@m1kad0/hannah-proto 3.8.0 → 3.10.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 +7 -0
- package/dist/agent.js +12 -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
|
@@ -252,6 +252,13 @@ export interface AgentDevice {
|
|
|
252
252
|
* (hannah#256, hannah#257).
|
|
253
253
|
*/
|
|
254
254
|
canonicalKey: string;
|
|
255
|
+
/**
|
|
256
|
+
* Whether this device's actuator uses the inverted convention (0%=open,
|
|
257
|
+
* 100%=closed) instead of Hannah's default (0%=closed, 100%=open), e.g.
|
|
258
|
+
* some Homematic/KNX shutter/awning actuators. Unset = unknown/no override,
|
|
259
|
+
* not `false` (hannah-proto#4).
|
|
260
|
+
*/
|
|
261
|
+
inverted?: boolean | undefined;
|
|
255
262
|
}
|
|
256
263
|
export interface AgentDevice_RoomNamesEntry {
|
|
257
264
|
key: string;
|
package/dist/agent.js
CHANGED
|
@@ -1489,6 +1489,7 @@ function createBaseAgentDevice() {
|
|
|
1489
1489
|
writable: false,
|
|
1490
1490
|
deviceId: "",
|
|
1491
1491
|
canonicalKey: "",
|
|
1492
|
+
inverted: undefined,
|
|
1492
1493
|
};
|
|
1493
1494
|
}
|
|
1494
1495
|
exports.AgentDevice = {
|
|
@@ -1532,6 +1533,9 @@ exports.AgentDevice = {
|
|
|
1532
1533
|
if (message.canonicalKey !== "") {
|
|
1533
1534
|
writer.uint32(106).string(message.canonicalKey);
|
|
1534
1535
|
}
|
|
1536
|
+
if (message.inverted !== undefined) {
|
|
1537
|
+
writer.uint32(112).bool(message.inverted);
|
|
1538
|
+
}
|
|
1535
1539
|
return writer;
|
|
1536
1540
|
},
|
|
1537
1541
|
decode(input, length) {
|
|
@@ -1641,6 +1645,13 @@ exports.AgentDevice = {
|
|
|
1641
1645
|
message.canonicalKey = reader.string();
|
|
1642
1646
|
continue;
|
|
1643
1647
|
}
|
|
1648
|
+
case 14: {
|
|
1649
|
+
if (tag !== 112) {
|
|
1650
|
+
break;
|
|
1651
|
+
}
|
|
1652
|
+
message.inverted = reader.bool();
|
|
1653
|
+
continue;
|
|
1654
|
+
}
|
|
1644
1655
|
}
|
|
1645
1656
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1646
1657
|
break;
|
|
@@ -1680,6 +1691,7 @@ exports.AgentDevice = {
|
|
|
1680
1691
|
message.writable = object.writable ?? false;
|
|
1681
1692
|
message.deviceId = object.deviceId ?? "";
|
|
1682
1693
|
message.canonicalKey = object.canonicalKey ?? "";
|
|
1694
|
+
message.inverted = object.inverted ?? undefined;
|
|
1683
1695
|
return message;
|
|
1684
1696
|
},
|
|
1685
1697
|
};
|
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