@m1kad0/hannah-proto 3.7.2 → 3.9.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.
- package/dist/agent.d.ts +17 -0
- package/dist/agent.js +24 -0
- package/dist/compat_versions.js +1 -0
- package/dist/descriptor.binpb +0 -0
- package/dist/hannah.d.ts +35 -4
- package/dist/hannah.js +16 -1
- package/dist/speaker_enrollment.d.ts +16 -0
- package/dist/speaker_enrollment.js +74 -1
- package/package.json +1 -1
package/dist/agent.d.ts
CHANGED
|
@@ -235,6 +235,23 @@ export interface AgentDevice {
|
|
|
235
235
|
enumValues: EnumValues | undefined;
|
|
236
236
|
/** derived from ioBroker's common.write */
|
|
237
237
|
writable: boolean;
|
|
238
|
+
/**
|
|
239
|
+
* Grouping ID for the device this state belongs to (the adapter's own
|
|
240
|
+
* `deviceId`, one path segment up from state_id) — lets Core group sibling
|
|
241
|
+
* states without guessing from state_id's path depth. Empty = adapter hasn't
|
|
242
|
+
* been updated yet; Core falls back to its own path-depth heuristic (hannah#257).
|
|
243
|
+
*/
|
|
244
|
+
deviceId: string;
|
|
245
|
+
/**
|
|
246
|
+
* Semantic role of this specific state (e.g. "on", "level", "color", "current",
|
|
247
|
+
* "expected"), resolved by the adapter from the state's ioBroker common.role —
|
|
248
|
+
* same per-state basis as device_type, not aggregated across sibling states
|
|
249
|
+
* (a thermostat's "current" and "expected" states have different roles but
|
|
250
|
+
* belong to one device). Empty = adapter hasn't been updated yet or role is
|
|
251
|
+
* unresolvable; Core falls back to its iobroker.state_names default table
|
|
252
|
+
* (hannah#256, hannah#257).
|
|
253
|
+
*/
|
|
254
|
+
canonicalKey: string;
|
|
238
255
|
}
|
|
239
256
|
export interface AgentDevice_RoomNamesEntry {
|
|
240
257
|
key: string;
|
package/dist/agent.js
CHANGED
|
@@ -1487,6 +1487,8 @@ function createBaseAgentDevice() {
|
|
|
1487
1487
|
stateType: 0,
|
|
1488
1488
|
enumValues: undefined,
|
|
1489
1489
|
writable: false,
|
|
1490
|
+
deviceId: "",
|
|
1491
|
+
canonicalKey: "",
|
|
1490
1492
|
};
|
|
1491
1493
|
}
|
|
1492
1494
|
exports.AgentDevice = {
|
|
@@ -1524,6 +1526,12 @@ exports.AgentDevice = {
|
|
|
1524
1526
|
if (message.writable !== false) {
|
|
1525
1527
|
writer.uint32(88).bool(message.writable);
|
|
1526
1528
|
}
|
|
1529
|
+
if (message.deviceId !== "") {
|
|
1530
|
+
writer.uint32(98).string(message.deviceId);
|
|
1531
|
+
}
|
|
1532
|
+
if (message.canonicalKey !== "") {
|
|
1533
|
+
writer.uint32(106).string(message.canonicalKey);
|
|
1534
|
+
}
|
|
1527
1535
|
return writer;
|
|
1528
1536
|
},
|
|
1529
1537
|
decode(input, length) {
|
|
@@ -1619,6 +1627,20 @@ exports.AgentDevice = {
|
|
|
1619
1627
|
message.writable = reader.bool();
|
|
1620
1628
|
continue;
|
|
1621
1629
|
}
|
|
1630
|
+
case 12: {
|
|
1631
|
+
if (tag !== 98) {
|
|
1632
|
+
break;
|
|
1633
|
+
}
|
|
1634
|
+
message.deviceId = reader.string();
|
|
1635
|
+
continue;
|
|
1636
|
+
}
|
|
1637
|
+
case 13: {
|
|
1638
|
+
if (tag !== 106) {
|
|
1639
|
+
break;
|
|
1640
|
+
}
|
|
1641
|
+
message.canonicalKey = reader.string();
|
|
1642
|
+
continue;
|
|
1643
|
+
}
|
|
1622
1644
|
}
|
|
1623
1645
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1624
1646
|
break;
|
|
@@ -1656,6 +1678,8 @@ exports.AgentDevice = {
|
|
|
1656
1678
|
? shared_1.EnumValues.fromPartial(object.enumValues)
|
|
1657
1679
|
: undefined;
|
|
1658
1680
|
message.writable = object.writable ?? false;
|
|
1681
|
+
message.deviceId = object.deviceId ?? "";
|
|
1682
|
+
message.canonicalKey = object.canonicalKey ?? "";
|
|
1659
1683
|
return message;
|
|
1660
1684
|
},
|
|
1661
1685
|
};
|
package/dist/compat_versions.js
CHANGED
package/dist/descriptor.binpb
CHANGED
|
Binary file
|
package/dist/hannah.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { DeleteSatelliteRequest, GetSatellitesResponse, SetSatelliteDisplayNameR
|
|
|
11
11
|
import { ProvisionSatelliteRequest } from "./satellite_provisioning";
|
|
12
12
|
import { ProxyCommand, ProxyHeartbeat, SatelliteRegistration, SubmitSatelliteAudioRequest, SubmitSatelliteAudioResponse } from "./satellite_proxy";
|
|
13
13
|
import { Empty, StatusResponse } from "./shared";
|
|
14
|
-
import { EnrollVoiceprintRequest } from "./speaker_enrollment";
|
|
14
|
+
import { EnrollVoiceprintRequest, StartVoiceEnrollmentRequest } from "./speaker_enrollment";
|
|
15
15
|
import { DeleteTimerRequest, GetTimersRequest, GetTimersResponse } from "./timer_admin";
|
|
16
16
|
import { TimerCommand, TimerMessage } from "./timer_service";
|
|
17
17
|
import { CreateUserRequest, CreateUserResponse, DeleteUserRequest, GetResidentsResponse, GetUserRequest, GetUsersRequest, GetUsersResponse, LinkAccountRequest, LoginRequest, SetAutomationRequest, SetSystemMessagesRequest, SetTrustLevelRequest, UnlinkAccountRequest, UpdateUserRequest, UserResponse } from "./user_registry";
|
|
@@ -698,7 +698,22 @@ export declare const HannahServiceService: {
|
|
|
698
698
|
readonly responseSerialize: (value: StatusResponse) => Buffer;
|
|
699
699
|
readonly responseDeserialize: (value: Buffer) => StatusResponse;
|
|
700
700
|
};
|
|
701
|
-
/**
|
|
701
|
+
/**
|
|
702
|
+
* --- Speaker Enrollment ---
|
|
703
|
+
* Trigger a guided voice-enrollment dialog for user_id at satellite_id (hannah#8);
|
|
704
|
+
* Core orchestrates the dialog itself. EnrollVoiceprint stays available as the
|
|
705
|
+
* low-level "store one already-captured sample" call — kept for now (additive,
|
|
706
|
+
* no hard cut) until hannah#8 confirms Core no longer needs it as an external RPC.
|
|
707
|
+
*/
|
|
708
|
+
readonly startVoiceEnrollment: {
|
|
709
|
+
readonly path: "/hannah.HannahService/StartVoiceEnrollment";
|
|
710
|
+
readonly requestStream: false;
|
|
711
|
+
readonly responseStream: false;
|
|
712
|
+
readonly requestSerialize: (value: StartVoiceEnrollmentRequest) => Buffer;
|
|
713
|
+
readonly requestDeserialize: (value: Buffer) => StartVoiceEnrollmentRequest;
|
|
714
|
+
readonly responseSerialize: (value: StatusResponse) => Buffer;
|
|
715
|
+
readonly responseDeserialize: (value: Buffer) => StatusResponse;
|
|
716
|
+
};
|
|
702
717
|
readonly enrollVoiceprint: {
|
|
703
718
|
readonly path: "/hannah.HannahService/EnrollVoiceprint";
|
|
704
719
|
readonly requestStream: false;
|
|
@@ -1002,7 +1017,14 @@ export interface HannahServiceServer extends UntypedServiceImplementation {
|
|
|
1002
1017
|
* When the satellite first connects with that seed, Hannah links serial → pre-config and clears the seed.
|
|
1003
1018
|
*/
|
|
1004
1019
|
provisionSatellite: handleUnaryCall<ProvisionSatelliteRequest, StatusResponse>;
|
|
1005
|
-
/**
|
|
1020
|
+
/**
|
|
1021
|
+
* --- Speaker Enrollment ---
|
|
1022
|
+
* Trigger a guided voice-enrollment dialog for user_id at satellite_id (hannah#8);
|
|
1023
|
+
* Core orchestrates the dialog itself. EnrollVoiceprint stays available as the
|
|
1024
|
+
* low-level "store one already-captured sample" call — kept for now (additive,
|
|
1025
|
+
* no hard cut) until hannah#8 confirms Core no longer needs it as an external RPC.
|
|
1026
|
+
*/
|
|
1027
|
+
startVoiceEnrollment: handleUnaryCall<StartVoiceEnrollmentRequest, StatusResponse>;
|
|
1006
1028
|
enrollVoiceprint: handleUnaryCall<EnrollVoiceprintRequest, StatusResponse>;
|
|
1007
1029
|
/**
|
|
1008
1030
|
* --- Timer Service ---
|
|
@@ -1344,7 +1366,16 @@ export interface HannahServiceClient extends Client {
|
|
|
1344
1366
|
provisionSatellite(request: ProvisionSatelliteRequest, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
|
1345
1367
|
provisionSatellite(request: ProvisionSatelliteRequest, metadata: Metadata, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
|
1346
1368
|
provisionSatellite(request: ProvisionSatelliteRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
|
1347
|
-
/**
|
|
1369
|
+
/**
|
|
1370
|
+
* --- Speaker Enrollment ---
|
|
1371
|
+
* Trigger a guided voice-enrollment dialog for user_id at satellite_id (hannah#8);
|
|
1372
|
+
* Core orchestrates the dialog itself. EnrollVoiceprint stays available as the
|
|
1373
|
+
* low-level "store one already-captured sample" call — kept for now (additive,
|
|
1374
|
+
* no hard cut) until hannah#8 confirms Core no longer needs it as an external RPC.
|
|
1375
|
+
*/
|
|
1376
|
+
startVoiceEnrollment(request: StartVoiceEnrollmentRequest, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
|
1377
|
+
startVoiceEnrollment(request: StartVoiceEnrollmentRequest, metadata: Metadata, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
|
1378
|
+
startVoiceEnrollment(request: StartVoiceEnrollmentRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
|
1348
1379
|
enrollVoiceprint(request: EnrollVoiceprintRequest, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
|
1349
1380
|
enrollVoiceprint(request: EnrollVoiceprintRequest, metadata: Metadata, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
|
1350
1381
|
enrollVoiceprint(request: EnrollVoiceprintRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: StatusResponse) => void): ClientUnaryCall;
|
package/dist/hannah.js
CHANGED
|
@@ -706,7 +706,22 @@ exports.HannahServiceService = {
|
|
|
706
706
|
responseSerialize: (value) => Buffer.from(shared_1.StatusResponse.encode(value).finish()),
|
|
707
707
|
responseDeserialize: (value) => shared_1.StatusResponse.decode(value),
|
|
708
708
|
},
|
|
709
|
-
/**
|
|
709
|
+
/**
|
|
710
|
+
* --- Speaker Enrollment ---
|
|
711
|
+
* Trigger a guided voice-enrollment dialog for user_id at satellite_id (hannah#8);
|
|
712
|
+
* Core orchestrates the dialog itself. EnrollVoiceprint stays available as the
|
|
713
|
+
* low-level "store one already-captured sample" call — kept for now (additive,
|
|
714
|
+
* no hard cut) until hannah#8 confirms Core no longer needs it as an external RPC.
|
|
715
|
+
*/
|
|
716
|
+
startVoiceEnrollment: {
|
|
717
|
+
path: "/hannah.HannahService/StartVoiceEnrollment",
|
|
718
|
+
requestStream: false,
|
|
719
|
+
responseStream: false,
|
|
720
|
+
requestSerialize: (value) => Buffer.from(speaker_enrollment_1.StartVoiceEnrollmentRequest.encode(value).finish()),
|
|
721
|
+
requestDeserialize: (value) => speaker_enrollment_1.StartVoiceEnrollmentRequest.decode(value),
|
|
722
|
+
responseSerialize: (value) => Buffer.from(shared_1.StatusResponse.encode(value).finish()),
|
|
723
|
+
responseDeserialize: (value) => shared_1.StatusResponse.decode(value),
|
|
724
|
+
},
|
|
710
725
|
enrollVoiceprint: {
|
|
711
726
|
path: "/hannah.HannahService/EnrollVoiceprint",
|
|
712
727
|
requestStream: false,
|
|
@@ -8,7 +8,23 @@ export interface EnrollVoiceprintRequest {
|
|
|
8
8
|
/** e.g. 16000 */
|
|
9
9
|
sampleRate: number;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Triggers a guided voice-enrollment dialog (hannah#8) for user_id at satellite_id.
|
|
13
|
+
* Called by an already-authenticated external client (WebUI/Telegram) against Core,
|
|
14
|
+
* which then orchestrates the recording dialog itself (STT prompts, sample capture,
|
|
15
|
+
* eventually calling voiceid_client.enroll() directly) instead of the caller submitting
|
|
16
|
+
* samples via EnrollVoiceprint. requestor_id/user_id follow the same split as
|
|
17
|
+
* ListActivityLogRequest (activity_log.proto): enrolling another user
|
|
18
|
+
* (requestor_id != user_id) requires the requestor's trust_level >= 10 — enforced by
|
|
19
|
+
* Core, not expressed in this schema.
|
|
20
|
+
*/
|
|
21
|
+
export interface StartVoiceEnrollmentRequest {
|
|
22
|
+
requestorId: number;
|
|
23
|
+
userId: number;
|
|
24
|
+
satelliteId: string;
|
|
25
|
+
}
|
|
11
26
|
export declare const EnrollVoiceprintRequest: MessageFns<EnrollVoiceprintRequest>;
|
|
27
|
+
export declare const StartVoiceEnrollmentRequest: MessageFns<StartVoiceEnrollmentRequest>;
|
|
12
28
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
13
29
|
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 {} ? {
|
|
14
30
|
[K in keyof T]?: DeepPartial<T[K]>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc unknown
|
|
6
6
|
// source: hannah/speaker_enrollment.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.EnrollVoiceprintRequest = exports.protobufPackage = void 0;
|
|
8
|
+
exports.StartVoiceEnrollmentRequest = exports.EnrollVoiceprintRequest = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
11
|
exports.protobufPackage = "hannah";
|
|
@@ -82,3 +82,76 @@ exports.EnrollVoiceprintRequest = {
|
|
|
82
82
|
return message;
|
|
83
83
|
},
|
|
84
84
|
};
|
|
85
|
+
function createBaseStartVoiceEnrollmentRequest() {
|
|
86
|
+
return { requestorId: 0, userId: 0, satelliteId: "" };
|
|
87
|
+
}
|
|
88
|
+
exports.StartVoiceEnrollmentRequest = {
|
|
89
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
90
|
+
if (message.requestorId !== 0) {
|
|
91
|
+
writer.uint32(8).int32(message.requestorId);
|
|
92
|
+
}
|
|
93
|
+
if (message.userId !== 0) {
|
|
94
|
+
writer.uint32(16).int32(message.userId);
|
|
95
|
+
}
|
|
96
|
+
if (message.satelliteId !== "") {
|
|
97
|
+
writer.uint32(26).string(message.satelliteId);
|
|
98
|
+
}
|
|
99
|
+
return writer;
|
|
100
|
+
},
|
|
101
|
+
decode(input, length) {
|
|
102
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
103
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
104
|
+
if (previousRecursionDepth >= 100) {
|
|
105
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
106
|
+
}
|
|
107
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
108
|
+
try {
|
|
109
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
110
|
+
const message = createBaseStartVoiceEnrollmentRequest();
|
|
111
|
+
while (reader.pos < end) {
|
|
112
|
+
const tag = reader.uint32();
|
|
113
|
+
switch (tag >>> 3) {
|
|
114
|
+
case 1: {
|
|
115
|
+
if (tag !== 8) {
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
message.requestorId = reader.int32();
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
case 2: {
|
|
122
|
+
if (tag !== 16) {
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
message.userId = reader.int32();
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
case 3: {
|
|
129
|
+
if (tag !== 26) {
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
message.satelliteId = reader.string();
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
reader.skip(tag & 7);
|
|
140
|
+
}
|
|
141
|
+
return message;
|
|
142
|
+
}
|
|
143
|
+
finally {
|
|
144
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
create(base) {
|
|
148
|
+
return exports.StartVoiceEnrollmentRequest.fromPartial(base ?? {});
|
|
149
|
+
},
|
|
150
|
+
fromPartial(object) {
|
|
151
|
+
const message = createBaseStartVoiceEnrollmentRequest();
|
|
152
|
+
message.requestorId = object.requestorId ?? 0;
|
|
153
|
+
message.userId = object.userId ?? 0;
|
|
154
|
+
message.satelliteId = object.satelliteId ?? "";
|
|
155
|
+
return message;
|
|
156
|
+
},
|
|
157
|
+
};
|
package/package.json
CHANGED