@m1kad0/hannah-proto 4.5.0 → 4.6.0

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 (53) hide show
  1. package/README.md +21 -0
  2. package/dist/compat_interceptor.js +6 -6
  3. package/dist/compat_versions.js +176 -88
  4. package/dist/descriptor.binpb +0 -0
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.js +2 -1
  7. package/dist/v1/activity_log.d.ts +60 -0
  8. package/dist/v1/activity_log.js +453 -0
  9. package/dist/v1/agent.d.ts +433 -0
  10. package/dist/v1/agent.js +2527 -0
  11. package/dist/v1/automation.d.ts +54 -0
  12. package/dist/v1/automation.js +303 -0
  13. package/dist/v1/car_state.d.ts +72 -0
  14. package/dist/v1/car_state.js +516 -0
  15. package/dist/v1/channel.d.ts +102 -0
  16. package/dist/v1/channel.js +587 -0
  17. package/dist/v1/control.d.ts +383 -0
  18. package/dist/v1/control.js +3879 -0
  19. package/dist/v1/device_control_menu.d.ts +88 -0
  20. package/dist/v1/device_control_menu.js +629 -0
  21. package/dist/v1/event_stream.d.ts +63 -0
  22. package/dist/v1/event_stream.js +494 -0
  23. package/dist/v1/hannah.d.ts +1644 -0
  24. package/dist/v1/hannah.js +968 -0
  25. package/dist/v1/index.d.ts +22 -0
  26. package/dist/v1/index.js +58 -0
  27. package/dist/v1/infrastructure.d.ts +98 -0
  28. package/dist/v1/infrastructure.js +652 -0
  29. package/dist/v1/logging.d.ts +189 -0
  30. package/dist/v1/logging.js +775 -0
  31. package/dist/v1/messages.d.ts +56 -0
  32. package/dist/v1/messages.js +398 -0
  33. package/dist/v1/satellite.d.ts +90 -0
  34. package/dist/v1/satellite.js +637 -0
  35. package/dist/v1/satellite_provisioning.d.ts +33 -0
  36. package/dist/v1/satellite_provisioning.js +84 -0
  37. package/dist/v1/satellite_proxy.d.ts +100 -0
  38. package/dist/v1/satellite_proxy.js +546 -0
  39. package/dist/v1/shared.d.ts +54 -0
  40. package/dist/v1/shared.js +249 -0
  41. package/dist/v1/speaker_enrollment.d.ts +44 -0
  42. package/dist/v1/speaker_enrollment.js +157 -0
  43. package/dist/v1/timer_admin.d.ts +42 -0
  44. package/dist/v1/timer_admin.js +273 -0
  45. package/dist/v1/timer_service.d.ts +133 -0
  46. package/dist/v1/timer_service.js +945 -0
  47. package/dist/v1/user_registry.d.ts +187 -0
  48. package/dist/v1/user_registry.js +1612 -0
  49. package/dist/v1/wakeword_capture.d.ts +101 -0
  50. package/dist/v1/wakeword_capture.js +611 -0
  51. package/dist/v1/weather.d.ts +81 -0
  52. package/dist/v1/weather.js +366 -0
  53. package/package.json +1 -1
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.12.1
5
+ // protoc unknown
6
+ // source: hannah/v1/satellite_provisioning.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ProvisionSatelliteRequest = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ exports.protobufPackage = "hannah.v1";
12
+ function createBaseProvisionSatelliteRequest() {
13
+ return { seed: "", displayName: "", roomId: "" };
14
+ }
15
+ exports.ProvisionSatelliteRequest = {
16
+ encode(message, writer = new wire_1.BinaryWriter()) {
17
+ if (message.seed !== "") {
18
+ writer.uint32(10).string(message.seed);
19
+ }
20
+ if (message.displayName !== "") {
21
+ writer.uint32(18).string(message.displayName);
22
+ }
23
+ if (message.roomId !== "") {
24
+ writer.uint32(26).string(message.roomId);
25
+ }
26
+ return writer;
27
+ },
28
+ decode(input, length) {
29
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
30
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
31
+ if (previousRecursionDepth >= 100) {
32
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
33
+ }
34
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
35
+ try {
36
+ const end = length === undefined ? reader.len : reader.pos + length;
37
+ const message = createBaseProvisionSatelliteRequest();
38
+ while (reader.pos < end) {
39
+ const tag = reader.uint32();
40
+ switch (tag >>> 3) {
41
+ case 1: {
42
+ if (tag !== 10) {
43
+ break;
44
+ }
45
+ message.seed = reader.string();
46
+ continue;
47
+ }
48
+ case 2: {
49
+ if (tag !== 18) {
50
+ break;
51
+ }
52
+ message.displayName = reader.string();
53
+ continue;
54
+ }
55
+ case 3: {
56
+ if (tag !== 26) {
57
+ break;
58
+ }
59
+ message.roomId = reader.string();
60
+ continue;
61
+ }
62
+ }
63
+ if ((tag & 7) === 4 || tag === 0) {
64
+ break;
65
+ }
66
+ reader.skip(tag & 7);
67
+ }
68
+ return message;
69
+ }
70
+ finally {
71
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
72
+ }
73
+ },
74
+ create(base) {
75
+ return exports.ProvisionSatelliteRequest.fromPartial(base ?? {});
76
+ },
77
+ fromPartial(object) {
78
+ const message = createBaseProvisionSatelliteRequest();
79
+ message.seed = object.seed ?? "";
80
+ message.displayName = object.displayName ?? "";
81
+ message.roomId = object.roomId ?? "";
82
+ return message;
83
+ },
84
+ };
@@ -0,0 +1,100 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "hannah.v1";
3
+ /** Sent by the proxy periodically to keep the RegisterProxy stream alive. */
4
+ export interface ProxyHeartbeat {
5
+ /** human-readable identifier, e.g. "hannah-proxy-living-room" */
6
+ proxyId: string;
7
+ /**
8
+ * UDP address the proxy is listening on for satellite connections.
9
+ * When set, Hannah publishes this address to the discovery topic so
10
+ * satellites connect to the proxy instead of Hannah's own UDP server.
11
+ */
12
+ udpHost: string;
13
+ /** UDP port, e.g. 7775 */
14
+ udpPort: number;
15
+ }
16
+ /** Sent by Hannah to the proxy over the RegisterProxy stream. */
17
+ export interface ProxyCommand {
18
+ /** initial confirmation when stream is established */
19
+ ack?: ProxyAck | undefined;
20
+ /** Hannah wants the proxy to play TTS on a satellite */
21
+ playAudio?: PlayAudioCommand | undefined;
22
+ }
23
+ /** Sent once by Hannah after RegisterProxy stream is established. */
24
+ export interface ProxyAck {
25
+ /** true = Hannah has disabled its own UDP server */
26
+ udpDisabled: boolean;
27
+ /** human-readable status, e.g. "UDP server stopped" */
28
+ message: string;
29
+ }
30
+ /**
31
+ * Hannah instructs the proxy to play TTS audio on a specific satellite.
32
+ * Used for announcements and other server-initiated audio.
33
+ * For streaming: Hannah sends multiple PlayAudioCommands with chunks of PCM.
34
+ * is_last=true on the final chunk signals the proxy to send tts_end to the satellite.
35
+ */
36
+ export interface PlayAudioCommand {
37
+ /** satellite device name (as registered via UDP or proxy) */
38
+ deviceId: string;
39
+ /** raw PCM, 16-bit signed mono */
40
+ audioPcm: Uint8Array;
41
+ /** e.g. 24000 (Azure) or 16000 (Piper) */
42
+ sampleRate: number;
43
+ /** true on the last chunk of a TTS response */
44
+ isLast: boolean;
45
+ }
46
+ /** Sent by the proxy when a satellite has finished recording an utterance. */
47
+ export interface SubmitSatelliteAudioRequest {
48
+ /** satellite device name */
49
+ deviceId: string;
50
+ /** room name (from proxy registration / config) */
51
+ room: string;
52
+ /** raw PCM, 16-bit signed mono, 16000 Hz */
53
+ audioPcm: Uint8Array;
54
+ /** sample rate of the audio (typically 16000) */
55
+ sampleRate: number;
56
+ }
57
+ export interface SubmitSatelliteAudioResponse {
58
+ /** STT result */
59
+ transcript: string;
60
+ /** text answer from Hannah */
61
+ answer: string;
62
+ /** e.g. "TurnOn", "CarQuery", "Unknown" */
63
+ intentName: string;
64
+ /** TTS response as raw PCM, 16-bit signed mono */
65
+ audioPcm: Uint8Array;
66
+ /** sample rate of audio_pcm */
67
+ sampleRate: number;
68
+ }
69
+ export interface SatelliteRegistration {
70
+ /** satellite device_id (== eFuse MAC since v0.34), e.g. "e072a1d01adc" */
71
+ deviceId: string;
72
+ /** IP of the UDP satellite as seen by the proxy, e.g. "192.168.8.42" */
73
+ address: string;
74
+ /** one-time pairing token from NVS (empty after successful pairing) */
75
+ seed: string;
76
+ }
77
+ export declare const ProxyHeartbeat: MessageFns<ProxyHeartbeat>;
78
+ export declare const ProxyCommand: MessageFns<ProxyCommand>;
79
+ export declare const ProxyAck: MessageFns<ProxyAck>;
80
+ export declare const PlayAudioCommand: MessageFns<PlayAudioCommand>;
81
+ export declare const SubmitSatelliteAudioRequest: MessageFns<SubmitSatelliteAudioRequest>;
82
+ export declare const SubmitSatelliteAudioResponse: MessageFns<SubmitSatelliteAudioResponse>;
83
+ export declare const SatelliteRegistration: MessageFns<SatelliteRegistration>;
84
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
85
+ export type DeepPartial<T> = T extends bigint ? string | number | bigint : T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
86
+ [K in keyof T]?: DeepPartial<T[K]>;
87
+ } : Partial<T>;
88
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
89
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
90
+ [K in keyof P]: Exact<P[K], I[K]>;
91
+ } & {
92
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
93
+ };
94
+ export interface MessageFns<T> {
95
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
96
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
97
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
98
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
99
+ }
100
+ export {};