@fonoster/autopilot 0.12.10 → 0.12.11
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/machine/machine.d.ts +11 -12
- package/dist/machine/machine.js +11 -13
- package/package.json +2 -2
|
@@ -210,7 +210,17 @@ declare const machine: import("xstate").StateMachine<any, import("./types").Auto
|
|
|
210
210
|
readonly type: "interruptPlayback";
|
|
211
211
|
}, {
|
|
212
212
|
readonly type: "appendSpeech";
|
|
213
|
-
}
|
|
213
|
+
}, import("xstate").ActionFunction<any, {
|
|
214
|
+
type: "SPEECH_RESULT";
|
|
215
|
+
speech: string;
|
|
216
|
+
responseTime: number;
|
|
217
|
+
}, import("./types").AutopilotEvents, undefined, {
|
|
218
|
+
src: "doProcessUserRequest";
|
|
219
|
+
logic: import("xstate").PromiseActorLogic<void, {
|
|
220
|
+
context: import("./types").AutopilotContext;
|
|
221
|
+
}, import("xstate").EventObject>;
|
|
222
|
+
id: string;
|
|
223
|
+
}, never, never, never, never>];
|
|
214
224
|
readonly reenter: true;
|
|
215
225
|
};
|
|
216
226
|
};
|
|
@@ -242,16 +252,5 @@ declare const machine: import("xstate").StateMachine<any, import("./types").Auto
|
|
|
242
252
|
};
|
|
243
253
|
};
|
|
244
254
|
};
|
|
245
|
-
readonly on: {
|
|
246
|
-
readonly "*": {
|
|
247
|
-
readonly actions: import("xstate").ActionFunction<any, import("./types").AutopilotEvents, import("./types").AutopilotEvents, undefined, {
|
|
248
|
-
src: "doProcessUserRequest";
|
|
249
|
-
logic: import("xstate").PromiseActorLogic<void, {
|
|
250
|
-
context: import("./types").AutopilotContext;
|
|
251
|
-
}, import("xstate").EventObject>;
|
|
252
|
-
id: string;
|
|
253
|
-
}, never, never, never, never>;
|
|
254
|
-
};
|
|
255
|
-
};
|
|
256
255
|
}>;
|
|
257
256
|
export { machine };
|
package/dist/machine/machine.js
CHANGED
|
@@ -123,10 +123,19 @@ const machine = setup_1.machineSetup.createMachine({
|
|
|
123
123
|
actions: [{ type: "cleanSpeech" }]
|
|
124
124
|
},
|
|
125
125
|
SPEECH_RESULT: {
|
|
126
|
-
// This makes sure result that
|
|
127
126
|
target: "processingUserRequest",
|
|
128
127
|
description: "Append speech and go back to listening.",
|
|
129
|
-
actions: [
|
|
128
|
+
actions: [
|
|
129
|
+
{ type: "interruptPlayback" },
|
|
130
|
+
{ type: "appendSpeech" },
|
|
131
|
+
(0, xstate_2.assign)(({ context, self }) => {
|
|
132
|
+
const isReentry = self.getSnapshot().value === context.previousState;
|
|
133
|
+
return {
|
|
134
|
+
previousState: self.getSnapshot().value,
|
|
135
|
+
isReentry
|
|
136
|
+
};
|
|
137
|
+
})
|
|
138
|
+
],
|
|
130
139
|
reenter: true
|
|
131
140
|
}
|
|
132
141
|
},
|
|
@@ -147,17 +156,6 @@ const machine = setup_1.machineSetup.createMachine({
|
|
|
147
156
|
target: ".hangup",
|
|
148
157
|
actions: { type: "goodbye" }
|
|
149
158
|
}
|
|
150
|
-
},
|
|
151
|
-
on: {
|
|
152
|
-
"*": {
|
|
153
|
-
actions: (0, xstate_2.assign)(({ context, self }) => {
|
|
154
|
-
const isReentry = self.getSnapshot().value === context.previousState;
|
|
155
|
-
return {
|
|
156
|
-
previousState: self.getSnapshot().value,
|
|
157
|
-
isReentry
|
|
158
|
-
};
|
|
159
|
-
})
|
|
160
|
-
}
|
|
161
159
|
}
|
|
162
160
|
});
|
|
163
161
|
exports.machine = machine;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/autopilot",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.11",
|
|
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",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"xstate": "^5.17.3",
|
|
60
60
|
"zod": "^3.23.8"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "e17be36f4b161521bb87df754975f33a8a7b8aa9"
|
|
63
63
|
}
|