@absolutejs/voice 0.0.22-beta.52 → 0.0.22-beta.54
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/angular/index.d.ts +0 -1
- package/dist/angular/index.js +37 -279
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +22 -0
- package/dist/client/opsStatusWidget.d.ts +1 -0
- package/dist/react/index.js +21 -0
- package/dist/svelte/index.js +21 -0
- package/dist/vue/index.js +21 -0
- package/package.json +1 -1
package/dist/angular/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { VoiceOpsStatusComponent } from './voice-ops-status.component';
|
|
2
1
|
export { VoiceAppKitStatusService } from './voice-app-kit-status.service';
|
|
3
2
|
export { VoiceStreamService } from './voice-stream.service';
|
|
4
3
|
export { VoiceControllerService } from './voice-controller.service';
|
package/dist/angular/index.js
CHANGED
|
@@ -69,8 +69,8 @@ var __decorateElement = (array, flags, name, decorators, target, extra) => {
|
|
|
69
69
|
return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
-
// src/angular/voice-
|
|
73
|
-
import {
|
|
72
|
+
// src/angular/voice-app-kit-status.service.ts
|
|
73
|
+
import { computed, Injectable, signal } from "@angular/core";
|
|
74
74
|
|
|
75
75
|
// src/client/appKitStatus.ts
|
|
76
76
|
var fetchVoiceAppKitStatus = async (path = "/app-kit/status", options = {}) => {
|
|
@@ -151,248 +151,7 @@ var createVoiceAppKitStatusStore = (path = "/app-kit/status", options = {}) => {
|
|
|
151
151
|
};
|
|
152
152
|
};
|
|
153
153
|
|
|
154
|
-
// src/client/opsStatusWidget.ts
|
|
155
|
-
var DEFAULT_TITLE = "Voice Ops Status";
|
|
156
|
-
var DEFAULT_DESCRIPTION = "Certified workflow, provider, and handoff readiness from the AbsoluteJS voice app kit.";
|
|
157
|
-
var SURFACE_LABELS = {
|
|
158
|
-
handoffs: "Handoffs",
|
|
159
|
-
providers: "Providers",
|
|
160
|
-
quality: "Quality",
|
|
161
|
-
sessions: "Sessions",
|
|
162
|
-
workflows: "Workflows"
|
|
163
|
-
};
|
|
164
|
-
var escapeHtml = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
165
|
-
var readNumber = (value, key) => value && typeof value === "object" && (key in value) ? Number(value[key] ?? 0) : 0;
|
|
166
|
-
var surfaceDetail = (surface) => {
|
|
167
|
-
const total = readNumber(surface, "total");
|
|
168
|
-
const failed = readNumber(surface, "failed");
|
|
169
|
-
const degraded = readNumber(surface, "degraded");
|
|
170
|
-
const source = surface && typeof surface === "object" && "source" in surface && typeof surface.source === "string" ? ` from ${surface.source}` : "";
|
|
171
|
-
if (degraded > 0) {
|
|
172
|
-
return `${degraded} degraded of ${total}`;
|
|
173
|
-
}
|
|
174
|
-
if (failed > 0) {
|
|
175
|
-
return `${failed} failing of ${total}${source}`;
|
|
176
|
-
}
|
|
177
|
-
return total > 0 ? `${total} passing${source}` : `No failures${source}`;
|
|
178
|
-
};
|
|
179
|
-
var getVoiceOpsStatusLabel = (report, error) => {
|
|
180
|
-
if (error) {
|
|
181
|
-
return "Unavailable";
|
|
182
|
-
}
|
|
183
|
-
if (!report) {
|
|
184
|
-
return "Checking";
|
|
185
|
-
}
|
|
186
|
-
return report.status === "pass" ? "Passing" : "Needs attention";
|
|
187
|
-
};
|
|
188
|
-
var createVoiceOpsStatusViewModel = (snapshot, options = {}) => {
|
|
189
|
-
const report = snapshot.report;
|
|
190
|
-
const surfaces = Object.entries(report?.surfaces ?? {}).map(([id, surface]) => {
|
|
191
|
-
const failed = readNumber(surface, "failed") || readNumber(surface, "degraded");
|
|
192
|
-
const total = readNumber(surface, "total");
|
|
193
|
-
const status = surface && typeof surface === "object" && "status" in surface ? surface.status ?? "pass" : "pass";
|
|
194
|
-
return {
|
|
195
|
-
detail: surfaceDetail(surface),
|
|
196
|
-
failed,
|
|
197
|
-
id,
|
|
198
|
-
label: SURFACE_LABELS[id] ?? id,
|
|
199
|
-
status,
|
|
200
|
-
total
|
|
201
|
-
};
|
|
202
|
-
});
|
|
203
|
-
return {
|
|
204
|
-
description: options.description ?? DEFAULT_DESCRIPTION,
|
|
205
|
-
error: snapshot.error,
|
|
206
|
-
isLoading: snapshot.isLoading,
|
|
207
|
-
label: getVoiceOpsStatusLabel(report, snapshot.error),
|
|
208
|
-
links: options.includeLinks === false ? [] : report?.links ?? [],
|
|
209
|
-
passed: report?.passed ?? 0,
|
|
210
|
-
status: snapshot.error ? "error" : report ? report.status : snapshot.isLoading ? "loading" : "loading",
|
|
211
|
-
surfaces,
|
|
212
|
-
title: options.title ?? DEFAULT_TITLE,
|
|
213
|
-
total: report?.total ?? 0,
|
|
214
|
-
updatedAt: snapshot.updatedAt
|
|
215
|
-
};
|
|
216
|
-
};
|
|
217
|
-
var renderVoiceOpsStatusHTML = (snapshot, options = {}) => {
|
|
218
|
-
const model = createVoiceOpsStatusViewModel(snapshot, options);
|
|
219
|
-
const surfaces = model.surfaces.length ? model.surfaces.map((surface) => `<li class="absolute-voice-ops-status__surface absolute-voice-ops-status__surface--${escapeHtml(surface.status)}">
|
|
220
|
-
<span>${escapeHtml(surface.label)}</span>
|
|
221
|
-
<strong>${escapeHtml(surface.detail)}</strong>
|
|
222
|
-
</li>`).join("") : '<li class="absolute-voice-ops-status__surface"><span>Status</span><strong>Waiting for first check</strong></li>';
|
|
223
|
-
const links = model.links.length ? `<nav class="absolute-voice-ops-status__links">${model.links.slice(0, 4).map((link) => `<a href="${escapeHtml(link.href)}">${escapeHtml(link.label)}</a>`).join("")}</nav>` : "";
|
|
224
|
-
return `<section class="absolute-voice-ops-status absolute-voice-ops-status--${escapeHtml(model.status)}">
|
|
225
|
-
<header class="absolute-voice-ops-status__header">
|
|
226
|
-
<span class="absolute-voice-ops-status__eyebrow">${escapeHtml(model.title)}</span>
|
|
227
|
-
<strong class="absolute-voice-ops-status__label">${escapeHtml(model.label)}</strong>
|
|
228
|
-
</header>
|
|
229
|
-
<p class="absolute-voice-ops-status__description">${escapeHtml(model.description)}</p>
|
|
230
|
-
<div class="absolute-voice-ops-status__summary">
|
|
231
|
-
<span>${model.passed} passing</span>
|
|
232
|
-
<span>${Math.max(model.total - model.passed, 0)} failing</span>
|
|
233
|
-
<span>${model.total} checks</span>
|
|
234
|
-
</div>
|
|
235
|
-
<ul class="absolute-voice-ops-status__surfaces">${surfaces}</ul>
|
|
236
|
-
${model.error ? `<p class="absolute-voice-ops-status__error">${escapeHtml(model.error)}</p>` : ""}
|
|
237
|
-
${links}
|
|
238
|
-
</section>`;
|
|
239
|
-
};
|
|
240
|
-
var getVoiceOpsStatusCSS = () => `.absolute-voice-ops-status{border:1px solid #d8d2c4;border-radius:20px;background:#fffaf0;color:#16130d;padding:18px;box-shadow:0 18px 40px rgba(47,37,18,.12);font-family:inherit}.absolute-voice-ops-status--fail,.absolute-voice-ops-status--error{border-color:#f2a7a7;background:#fff5f3}.absolute-voice-ops-status__header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-ops-status__eyebrow{color:#73664f;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-ops-status__label{font-size:28px;line-height:1}.absolute-voice-ops-status__description{color:#514733;margin:12px 0 0}.absolute-voice-ops-status__summary,.absolute-voice-ops-status__links{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.absolute-voice-ops-status__summary span,.absolute-voice-ops-status__links a{border:1px solid #e6ddca;border-radius:999px;color:inherit;padding:6px 10px;text-decoration:none}.absolute-voice-ops-status__surfaces{display:grid;gap:8px;list-style:none;margin:16px 0 0;padding:0}.absolute-voice-ops-status__surface{align-items:center;background:#fff;border:1px solid #eee4d2;border-radius:14px;display:flex;gap:12px;justify-content:space-between;padding:10px 12px}.absolute-voice-ops-status__surface--fail{border-color:#f2a7a7}.absolute-voice-ops-status__surface span{color:#655944}.absolute-voice-ops-status__error{color:#9f1239;font-weight:700}`;
|
|
241
|
-
var mountVoiceOpsStatus = (element, path = "/app-kit/status", options = {}) => {
|
|
242
|
-
const store = createVoiceAppKitStatusStore(path, options);
|
|
243
|
-
const render = () => {
|
|
244
|
-
element.innerHTML = renderVoiceOpsStatusHTML(store.getSnapshot(), options);
|
|
245
|
-
};
|
|
246
|
-
const unsubscribe = store.subscribe(render);
|
|
247
|
-
render();
|
|
248
|
-
store.refresh().catch(() => {});
|
|
249
|
-
return {
|
|
250
|
-
close: () => {
|
|
251
|
-
unsubscribe();
|
|
252
|
-
store.close();
|
|
253
|
-
},
|
|
254
|
-
refresh: store.refresh
|
|
255
|
-
};
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
// src/angular/voice-ops-status.component.ts
|
|
259
|
-
var _dec = [
|
|
260
|
-
Component({
|
|
261
|
-
selector: "absolute-voice-ops-status",
|
|
262
|
-
standalone: true,
|
|
263
|
-
template: `
|
|
264
|
-
<section
|
|
265
|
-
class="absolute-voice-ops-status"
|
|
266
|
-
[class.absolute-voice-ops-status--pass]="model().status === 'pass'"
|
|
267
|
-
[class.absolute-voice-ops-status--fail]="model().status === 'fail'"
|
|
268
|
-
[class.absolute-voice-ops-status--loading]="model().status === 'loading'"
|
|
269
|
-
[class.absolute-voice-ops-status--error]="model().status === 'error'"
|
|
270
|
-
>
|
|
271
|
-
<header class="absolute-voice-ops-status__header">
|
|
272
|
-
<span class="absolute-voice-ops-status__eyebrow">{{
|
|
273
|
-
model().title
|
|
274
|
-
}}</span>
|
|
275
|
-
<strong class="absolute-voice-ops-status__label">{{
|
|
276
|
-
model().label
|
|
277
|
-
}}</strong>
|
|
278
|
-
</header>
|
|
279
|
-
<p class="absolute-voice-ops-status__description">
|
|
280
|
-
{{ model().description }}
|
|
281
|
-
</p>
|
|
282
|
-
<div class="absolute-voice-ops-status__summary">
|
|
283
|
-
<span>{{ model().passed }} passing</span>
|
|
284
|
-
<span>{{ model().total - model().passed }} failing</span>
|
|
285
|
-
<span>{{ model().total }} checks</span>
|
|
286
|
-
</div>
|
|
287
|
-
<ul class="absolute-voice-ops-status__surfaces">
|
|
288
|
-
@if (model().surfaces.length > 0) {
|
|
289
|
-
@for (surface of model().surfaces; track surface.id) {
|
|
290
|
-
<li
|
|
291
|
-
class="absolute-voice-ops-status__surface"
|
|
292
|
-
[class.absolute-voice-ops-status__surface--pass]="
|
|
293
|
-
surface.status === 'pass'
|
|
294
|
-
"
|
|
295
|
-
[class.absolute-voice-ops-status__surface--fail]="
|
|
296
|
-
surface.status === 'fail'
|
|
297
|
-
"
|
|
298
|
-
>
|
|
299
|
-
<span>{{ surface.label }}</span>
|
|
300
|
-
<strong>{{ surface.detail }}</strong>
|
|
301
|
-
</li>
|
|
302
|
-
}
|
|
303
|
-
} @else {
|
|
304
|
-
<li class="absolute-voice-ops-status__surface">
|
|
305
|
-
<span>Status</span>
|
|
306
|
-
<strong>Waiting for first check</strong>
|
|
307
|
-
</li>
|
|
308
|
-
}
|
|
309
|
-
</ul>
|
|
310
|
-
@if (model().error) {
|
|
311
|
-
<p class="absolute-voice-ops-status__error">{{ model().error }}</p>
|
|
312
|
-
}
|
|
313
|
-
@if (model().links.length > 0) {
|
|
314
|
-
<nav class="absolute-voice-ops-status__links">
|
|
315
|
-
@for (link of model().links.slice(0, 4); track link.href) {
|
|
316
|
-
<a [href]="link.href">{{ link.label }}</a>
|
|
317
|
-
}
|
|
318
|
-
</nav>
|
|
319
|
-
}
|
|
320
|
-
</section>
|
|
321
|
-
`
|
|
322
|
-
})
|
|
323
|
-
];
|
|
324
|
-
var _dec2 = [
|
|
325
|
-
Input()
|
|
326
|
-
];
|
|
327
|
-
var _dec3 = [
|
|
328
|
-
Input()
|
|
329
|
-
];
|
|
330
|
-
var _dec4 = [
|
|
331
|
-
Input()
|
|
332
|
-
];
|
|
333
|
-
var _dec5 = [
|
|
334
|
-
Input()
|
|
335
|
-
];
|
|
336
|
-
var _dec6 = [
|
|
337
|
-
Input()
|
|
338
|
-
];
|
|
339
|
-
var _init = __decoratorStart(undefined);
|
|
340
|
-
|
|
341
|
-
class VoiceOpsStatusComponent {
|
|
342
|
-
constructor() {
|
|
343
|
-
this.description = __runInitializers(_init, 8, this);
|
|
344
|
-
__runInitializers(_init, 11, this);
|
|
345
|
-
this.includeLinks = __runInitializers(_init, 12, this, true);
|
|
346
|
-
__runInitializers(_init, 15, this);
|
|
347
|
-
this.intervalMs = __runInitializers(_init, 16, this);
|
|
348
|
-
__runInitializers(_init, 19, this);
|
|
349
|
-
this.path = __runInitializers(_init, 20, this, "/app-kit/status");
|
|
350
|
-
__runInitializers(_init, 23, this);
|
|
351
|
-
this.title = __runInitializers(_init, 24, this);
|
|
352
|
-
__runInitializers(_init, 27, this);
|
|
353
|
-
}
|
|
354
|
-
cleanup = () => {};
|
|
355
|
-
store;
|
|
356
|
-
model = signal(createVoiceOpsStatusViewModel({
|
|
357
|
-
error: null,
|
|
358
|
-
isLoading: true
|
|
359
|
-
}));
|
|
360
|
-
ngOnInit() {
|
|
361
|
-
const options = this.options();
|
|
362
|
-
this.store = createVoiceAppKitStatusStore(this.path, options);
|
|
363
|
-
const sync = () => {
|
|
364
|
-
this.model.set(createVoiceOpsStatusViewModel(this.store.getSnapshot(), options));
|
|
365
|
-
};
|
|
366
|
-
this.cleanup = this.store.subscribe(sync);
|
|
367
|
-
sync();
|
|
368
|
-
if (typeof window !== "undefined") {
|
|
369
|
-
this.store.refresh().catch(() => {});
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
ngOnDestroy() {
|
|
373
|
-
this.cleanup();
|
|
374
|
-
this.store?.close();
|
|
375
|
-
}
|
|
376
|
-
options() {
|
|
377
|
-
return {
|
|
378
|
-
description: this.description,
|
|
379
|
-
includeLinks: this.includeLinks,
|
|
380
|
-
intervalMs: this.intervalMs,
|
|
381
|
-
title: this.title
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
__decorateElement(_init, 5, "description", _dec2, VoiceOpsStatusComponent);
|
|
386
|
-
__decorateElement(_init, 5, "includeLinks", _dec3, VoiceOpsStatusComponent);
|
|
387
|
-
__decorateElement(_init, 5, "intervalMs", _dec4, VoiceOpsStatusComponent);
|
|
388
|
-
__decorateElement(_init, 5, "path", _dec5, VoiceOpsStatusComponent);
|
|
389
|
-
__decorateElement(_init, 5, "title", _dec6, VoiceOpsStatusComponent);
|
|
390
|
-
VoiceOpsStatusComponent = __decorateElement(_init, 0, "VoiceOpsStatusComponent", _dec, VoiceOpsStatusComponent);
|
|
391
|
-
__runInitializers(_init, 1, VoiceOpsStatusComponent);
|
|
392
|
-
__decoratorMetadata(_init, VoiceOpsStatusComponent);
|
|
393
|
-
let _VoiceOpsStatusComponent = VoiceOpsStatusComponent;
|
|
394
154
|
// src/angular/voice-app-kit-status.service.ts
|
|
395
|
-
import { computed, Injectable, signal as signal2 } from "@angular/core";
|
|
396
155
|
var _dec = [
|
|
397
156
|
Injectable({ providedIn: "root" })
|
|
398
157
|
];
|
|
@@ -401,10 +160,10 @@ var _init = __decoratorStart(undefined);
|
|
|
401
160
|
class VoiceAppKitStatusService {
|
|
402
161
|
connect(path = "/app-kit/status", options = {}) {
|
|
403
162
|
const store = createVoiceAppKitStatusStore(path, options);
|
|
404
|
-
const errorSignal =
|
|
405
|
-
const isLoadingSignal =
|
|
406
|
-
const reportSignal =
|
|
407
|
-
const updatedAtSignal =
|
|
163
|
+
const errorSignal = signal(null);
|
|
164
|
+
const isLoadingSignal = signal(false);
|
|
165
|
+
const reportSignal = signal(undefined);
|
|
166
|
+
const updatedAtSignal = signal(undefined);
|
|
408
167
|
const sync = () => {
|
|
409
168
|
const snapshot = store.getSnapshot();
|
|
410
169
|
errorSignal.set(snapshot.error);
|
|
@@ -435,7 +194,7 @@ __runInitializers(_init, 1, VoiceAppKitStatusService);
|
|
|
435
194
|
__decoratorMetadata(_init, VoiceAppKitStatusService);
|
|
436
195
|
let _VoiceAppKitStatusService = VoiceAppKitStatusService;
|
|
437
196
|
// src/angular/voice-stream.service.ts
|
|
438
|
-
import { computed as computed2, Injectable as Injectable2, signal as
|
|
197
|
+
import { computed as computed2, Injectable as Injectable2, signal as signal2 } from "@angular/core";
|
|
439
198
|
|
|
440
199
|
// src/client/actions.ts
|
|
441
200
|
var normalizeErrorMessage = (value) => {
|
|
@@ -959,15 +718,15 @@ var _init = __decoratorStart(undefined);
|
|
|
959
718
|
class VoiceStreamService {
|
|
960
719
|
connect(path, options = {}) {
|
|
961
720
|
const stream = createVoiceStream(path, options);
|
|
962
|
-
const assistantAudioSignal =
|
|
963
|
-
const assistantTextsSignal =
|
|
964
|
-
const callSignal =
|
|
965
|
-
const errorSignal =
|
|
966
|
-
const isConnectedSignal =
|
|
967
|
-
const partialSignal =
|
|
968
|
-
const sessionIdSignal =
|
|
969
|
-
const statusSignal =
|
|
970
|
-
const turnsSignal =
|
|
721
|
+
const assistantAudioSignal = signal2([]);
|
|
722
|
+
const assistantTextsSignal = signal2([]);
|
|
723
|
+
const callSignal = signal2(null);
|
|
724
|
+
const errorSignal = signal2(null);
|
|
725
|
+
const isConnectedSignal = signal2(false);
|
|
726
|
+
const partialSignal = signal2("");
|
|
727
|
+
const sessionIdSignal = signal2(stream.sessionId);
|
|
728
|
+
const statusSignal = signal2(stream.status);
|
|
729
|
+
const turnsSignal = signal2([]);
|
|
971
730
|
const sync = () => {
|
|
972
731
|
assistantAudioSignal.set([...stream.assistantAudio]);
|
|
973
732
|
assistantTextsSignal.set([...stream.assistantTexts]);
|
|
@@ -1006,7 +765,7 @@ __runInitializers(_init, 1, VoiceStreamService);
|
|
|
1006
765
|
__decoratorMetadata(_init, VoiceStreamService);
|
|
1007
766
|
let _VoiceStreamService = VoiceStreamService;
|
|
1008
767
|
// src/angular/voice-controller.service.ts
|
|
1009
|
-
import { computed as computed3, Injectable as Injectable3, signal as
|
|
768
|
+
import { computed as computed3, Injectable as Injectable3, signal as signal3 } from "@angular/core";
|
|
1010
769
|
|
|
1011
770
|
// src/client/htmx.ts
|
|
1012
771
|
var DEFAULT_EVENT_NAME = "voice-refresh";
|
|
@@ -1647,16 +1406,16 @@ var _init = __decoratorStart(undefined);
|
|
|
1647
1406
|
class VoiceControllerService {
|
|
1648
1407
|
connect(path, options = {}) {
|
|
1649
1408
|
const controller = createVoiceController(path, options);
|
|
1650
|
-
const assistantAudioSignal =
|
|
1651
|
-
const assistantTextsSignal =
|
|
1652
|
-
const errorSignal =
|
|
1653
|
-
const isConnectedSignal =
|
|
1654
|
-
const isRecordingSignal =
|
|
1655
|
-
const partialSignal =
|
|
1656
|
-
const recordingErrorSignal =
|
|
1657
|
-
const sessionIdSignal =
|
|
1658
|
-
const statusSignal =
|
|
1659
|
-
const turnsSignal =
|
|
1409
|
+
const assistantAudioSignal = signal3([]);
|
|
1410
|
+
const assistantTextsSignal = signal3([]);
|
|
1411
|
+
const errorSignal = signal3(null);
|
|
1412
|
+
const isConnectedSignal = signal3(false);
|
|
1413
|
+
const isRecordingSignal = signal3(false);
|
|
1414
|
+
const partialSignal = signal3("");
|
|
1415
|
+
const recordingErrorSignal = signal3(null);
|
|
1416
|
+
const sessionIdSignal = signal3(controller.sessionId);
|
|
1417
|
+
const statusSignal = signal3(controller.status);
|
|
1418
|
+
const turnsSignal = signal3([]);
|
|
1660
1419
|
const sync = () => {
|
|
1661
1420
|
assistantAudioSignal.set([...controller.assistantAudio]);
|
|
1662
1421
|
assistantTextsSignal.set([...controller.assistantTexts]);
|
|
@@ -1700,7 +1459,7 @@ __runInitializers(_init, 1, VoiceControllerService);
|
|
|
1700
1459
|
__decoratorMetadata(_init, VoiceControllerService);
|
|
1701
1460
|
let _VoiceControllerService = VoiceControllerService;
|
|
1702
1461
|
// src/angular/voice-provider-status.service.ts
|
|
1703
|
-
import { computed as computed4, Injectable as Injectable4, signal as
|
|
1462
|
+
import { computed as computed4, Injectable as Injectable4, signal as signal4 } from "@angular/core";
|
|
1704
1463
|
|
|
1705
1464
|
// src/client/providerStatus.ts
|
|
1706
1465
|
var fetchVoiceProviderStatus = async (path = "/api/provider-status", options = {}) => {
|
|
@@ -1791,10 +1550,10 @@ var _init = __decoratorStart(undefined);
|
|
|
1791
1550
|
class VoiceProviderStatusService {
|
|
1792
1551
|
connect(path = "/api/provider-status", options = {}) {
|
|
1793
1552
|
const store = createVoiceProviderStatusStore(path, options);
|
|
1794
|
-
const errorSignal =
|
|
1795
|
-
const isLoadingSignal =
|
|
1796
|
-
const providersSignal =
|
|
1797
|
-
const updatedAtSignal =
|
|
1553
|
+
const errorSignal = signal4(null);
|
|
1554
|
+
const isLoadingSignal = signal4(false);
|
|
1555
|
+
const providersSignal = signal4([]);
|
|
1556
|
+
const updatedAtSignal = signal4(undefined);
|
|
1798
1557
|
const sync = () => {
|
|
1799
1558
|
const snapshot = store.getSnapshot();
|
|
1800
1559
|
errorSignal.set(snapshot.error);
|
|
@@ -1823,7 +1582,7 @@ __runInitializers(_init, 1, VoiceProviderStatusService);
|
|
|
1823
1582
|
__decoratorMetadata(_init, VoiceProviderStatusService);
|
|
1824
1583
|
let _VoiceProviderStatusService = VoiceProviderStatusService;
|
|
1825
1584
|
// src/angular/voice-workflow-status.service.ts
|
|
1826
|
-
import { computed as computed5, Injectable as Injectable5, signal as
|
|
1585
|
+
import { computed as computed5, Injectable as Injectable5, signal as signal5 } from "@angular/core";
|
|
1827
1586
|
|
|
1828
1587
|
// src/client/workflowStatus.ts
|
|
1829
1588
|
var fetchVoiceWorkflowStatus = async (path = "/evals/scenarios/json", options = {}) => {
|
|
@@ -1913,10 +1672,10 @@ var _init = __decoratorStart(undefined);
|
|
|
1913
1672
|
class VoiceWorkflowStatusService {
|
|
1914
1673
|
connect(path = "/evals/scenarios/json", options = {}) {
|
|
1915
1674
|
const store = createVoiceWorkflowStatusStore(path, options);
|
|
1916
|
-
const errorSignal =
|
|
1917
|
-
const isLoadingSignal =
|
|
1918
|
-
const reportSignal =
|
|
1919
|
-
const updatedAtSignal =
|
|
1675
|
+
const errorSignal = signal5(null);
|
|
1676
|
+
const isLoadingSignal = signal5(false);
|
|
1677
|
+
const reportSignal = signal5(undefined);
|
|
1678
|
+
const updatedAtSignal = signal5(undefined);
|
|
1920
1679
|
const sync = () => {
|
|
1921
1680
|
const snapshot = store.getSnapshot();
|
|
1922
1681
|
errorSignal.set(snapshot.error);
|
|
@@ -1950,7 +1709,6 @@ export {
|
|
|
1950
1709
|
VoiceWorkflowStatusService,
|
|
1951
1710
|
VoiceStreamService,
|
|
1952
1711
|
VoiceProviderStatusService,
|
|
1953
|
-
VoiceOpsStatusComponent,
|
|
1954
1712
|
VoiceControllerService,
|
|
1955
1713
|
VoiceAppKitStatusService
|
|
1956
1714
|
};
|
package/dist/client/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { bindVoiceBargeIn, createVoiceDuplexController } from './duplex';
|
|
|
6
6
|
export { bindVoiceHTMX } from './htmx';
|
|
7
7
|
export { createMicrophoneCapture } from './microphone';
|
|
8
8
|
export { createVoiceAppKitStatusStore, fetchVoiceAppKitStatus } from './appKitStatus';
|
|
9
|
-
export { createVoiceOpsStatusViewModel, getVoiceOpsStatusCSS, getVoiceOpsStatusLabel, mountVoiceOpsStatus, renderVoiceOpsStatusHTML } from './opsStatusWidget';
|
|
9
|
+
export { createVoiceOpsStatusViewModel, defineVoiceOpsStatusElement, getVoiceOpsStatusCSS, getVoiceOpsStatusLabel, mountVoiceOpsStatus, renderVoiceOpsStatusHTML } from './opsStatusWidget';
|
|
10
10
|
export { createVoiceProviderStatusStore, fetchVoiceProviderStatus } from './providerStatus';
|
|
11
11
|
export { createVoiceWorkflowStatusStore, fetchVoiceWorkflowStatus } from './workflowStatus';
|
|
12
12
|
export type { VoiceAppKitStatusClientOptions, VoiceAppKitStatusSnapshot } from './appKitStatus';
|
package/dist/client/index.js
CHANGED
|
@@ -1804,6 +1804,27 @@ var mountVoiceOpsStatus = (element, path = "/app-kit/status", options = {}) => {
|
|
|
1804
1804
|
refresh: store.refresh
|
|
1805
1805
|
};
|
|
1806
1806
|
};
|
|
1807
|
+
var defineVoiceOpsStatusElement = (tagName = "absolute-voice-ops-status") => {
|
|
1808
|
+
if (typeof window === "undefined" || typeof customElements === "undefined" || customElements.get(tagName)) {
|
|
1809
|
+
return;
|
|
1810
|
+
}
|
|
1811
|
+
customElements.define(tagName, class AbsoluteVoiceOpsStatusElement extends HTMLElement {
|
|
1812
|
+
mounted;
|
|
1813
|
+
connectedCallback() {
|
|
1814
|
+
const intervalMs = Number(this.getAttribute("interval-ms") ?? 5000);
|
|
1815
|
+
this.mounted = mountVoiceOpsStatus(this, this.getAttribute("path") ?? "/app-kit/status", {
|
|
1816
|
+
description: this.getAttribute("description") ?? undefined,
|
|
1817
|
+
includeLinks: this.getAttribute("include-links") !== "false",
|
|
1818
|
+
intervalMs: Number.isFinite(intervalMs) ? intervalMs : 5000,
|
|
1819
|
+
title: this.getAttribute("title") ?? undefined
|
|
1820
|
+
});
|
|
1821
|
+
}
|
|
1822
|
+
disconnectedCallback() {
|
|
1823
|
+
this.mounted?.close();
|
|
1824
|
+
this.mounted = undefined;
|
|
1825
|
+
}
|
|
1826
|
+
});
|
|
1827
|
+
};
|
|
1807
1828
|
// src/client/providerStatus.ts
|
|
1808
1829
|
var fetchVoiceProviderStatus = async (path = "/api/provider-status", options = {}) => {
|
|
1809
1830
|
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
@@ -1969,6 +1990,7 @@ export {
|
|
|
1969
1990
|
fetchVoiceWorkflowStatus,
|
|
1970
1991
|
fetchVoiceProviderStatus,
|
|
1971
1992
|
fetchVoiceAppKitStatus,
|
|
1993
|
+
defineVoiceOpsStatusElement,
|
|
1972
1994
|
decodeVoiceAudioChunk,
|
|
1973
1995
|
createVoiceWorkflowStatusStore,
|
|
1974
1996
|
createVoiceStream,
|
package/dist/react/index.js
CHANGED
|
@@ -271,6 +271,27 @@ var mountVoiceOpsStatus = (element, path = "/app-kit/status", options = {}) => {
|
|
|
271
271
|
refresh: store.refresh
|
|
272
272
|
};
|
|
273
273
|
};
|
|
274
|
+
var defineVoiceOpsStatusElement = (tagName = "absolute-voice-ops-status") => {
|
|
275
|
+
if (typeof window === "undefined" || typeof customElements === "undefined" || customElements.get(tagName)) {
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
customElements.define(tagName, class AbsoluteVoiceOpsStatusElement extends HTMLElement {
|
|
279
|
+
mounted;
|
|
280
|
+
connectedCallback() {
|
|
281
|
+
const intervalMs = Number(this.getAttribute("interval-ms") ?? 5000);
|
|
282
|
+
this.mounted = mountVoiceOpsStatus(this, this.getAttribute("path") ?? "/app-kit/status", {
|
|
283
|
+
description: this.getAttribute("description") ?? undefined,
|
|
284
|
+
includeLinks: this.getAttribute("include-links") !== "false",
|
|
285
|
+
intervalMs: Number.isFinite(intervalMs) ? intervalMs : 5000,
|
|
286
|
+
title: this.getAttribute("title") ?? undefined
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
disconnectedCallback() {
|
|
290
|
+
this.mounted?.close();
|
|
291
|
+
this.mounted = undefined;
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
};
|
|
274
295
|
|
|
275
296
|
// src/react/VoiceOpsStatus.tsx
|
|
276
297
|
import { jsxDEV } from "react/jsx-dev-runtime";
|
package/dist/svelte/index.js
CHANGED
|
@@ -253,6 +253,27 @@ var mountVoiceOpsStatus = (element, path = "/app-kit/status", options = {}) => {
|
|
|
253
253
|
refresh: store.refresh
|
|
254
254
|
};
|
|
255
255
|
};
|
|
256
|
+
var defineVoiceOpsStatusElement = (tagName = "absolute-voice-ops-status") => {
|
|
257
|
+
if (typeof window === "undefined" || typeof customElements === "undefined" || customElements.get(tagName)) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
customElements.define(tagName, class AbsoluteVoiceOpsStatusElement extends HTMLElement {
|
|
261
|
+
mounted;
|
|
262
|
+
connectedCallback() {
|
|
263
|
+
const intervalMs = Number(this.getAttribute("interval-ms") ?? 5000);
|
|
264
|
+
this.mounted = mountVoiceOpsStatus(this, this.getAttribute("path") ?? "/app-kit/status", {
|
|
265
|
+
description: this.getAttribute("description") ?? undefined,
|
|
266
|
+
includeLinks: this.getAttribute("include-links") !== "false",
|
|
267
|
+
intervalMs: Number.isFinite(intervalMs) ? intervalMs : 5000,
|
|
268
|
+
title: this.getAttribute("title") ?? undefined
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
disconnectedCallback() {
|
|
272
|
+
this.mounted?.close();
|
|
273
|
+
this.mounted = undefined;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
};
|
|
256
277
|
|
|
257
278
|
// src/svelte/createVoiceOpsStatus.ts
|
|
258
279
|
var createVoiceOpsStatus = (path = "/app-kit/status", options = {}) => {
|
package/dist/vue/index.js
CHANGED
|
@@ -254,6 +254,27 @@ var mountVoiceOpsStatus = (element, path = "/app-kit/status", options = {}) => {
|
|
|
254
254
|
refresh: store.refresh
|
|
255
255
|
};
|
|
256
256
|
};
|
|
257
|
+
var defineVoiceOpsStatusElement = (tagName = "absolute-voice-ops-status") => {
|
|
258
|
+
if (typeof window === "undefined" || typeof customElements === "undefined" || customElements.get(tagName)) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
customElements.define(tagName, class AbsoluteVoiceOpsStatusElement extends HTMLElement {
|
|
262
|
+
mounted;
|
|
263
|
+
connectedCallback() {
|
|
264
|
+
const intervalMs = Number(this.getAttribute("interval-ms") ?? 5000);
|
|
265
|
+
this.mounted = mountVoiceOpsStatus(this, this.getAttribute("path") ?? "/app-kit/status", {
|
|
266
|
+
description: this.getAttribute("description") ?? undefined,
|
|
267
|
+
includeLinks: this.getAttribute("include-links") !== "false",
|
|
268
|
+
intervalMs: Number.isFinite(intervalMs) ? intervalMs : 5000,
|
|
269
|
+
title: this.getAttribute("title") ?? undefined
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
disconnectedCallback() {
|
|
273
|
+
this.mounted?.close();
|
|
274
|
+
this.mounted = undefined;
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
};
|
|
257
278
|
|
|
258
279
|
// src/vue/useVoiceAppKitStatus.ts
|
|
259
280
|
import { onUnmounted, ref, shallowRef } from "vue";
|