@m1kad0/hannah-proto 4.4.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.
- package/README.md +21 -0
- package/dist/compat_interceptor.js +6 -6
- package/dist/compat_versions.js +176 -85
- package/dist/descriptor.binpb +0 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/logging.d.ts +189 -0
- package/dist/logging.js +775 -0
- package/dist/v1/activity_log.d.ts +60 -0
- package/dist/v1/activity_log.js +453 -0
- package/dist/v1/agent.d.ts +433 -0
- package/dist/v1/agent.js +2527 -0
- package/dist/v1/automation.d.ts +54 -0
- package/dist/v1/automation.js +303 -0
- package/dist/v1/car_state.d.ts +72 -0
- package/dist/v1/car_state.js +516 -0
- package/dist/v1/channel.d.ts +102 -0
- package/dist/v1/channel.js +587 -0
- package/dist/v1/control.d.ts +383 -0
- package/dist/v1/control.js +3879 -0
- package/dist/v1/device_control_menu.d.ts +88 -0
- package/dist/v1/device_control_menu.js +629 -0
- package/dist/v1/event_stream.d.ts +63 -0
- package/dist/v1/event_stream.js +494 -0
- package/dist/v1/hannah.d.ts +1644 -0
- package/dist/v1/hannah.js +968 -0
- package/dist/v1/index.d.ts +22 -0
- package/dist/v1/index.js +58 -0
- package/dist/v1/infrastructure.d.ts +98 -0
- package/dist/v1/infrastructure.js +652 -0
- package/dist/v1/logging.d.ts +189 -0
- package/dist/v1/logging.js +775 -0
- package/dist/v1/messages.d.ts +56 -0
- package/dist/v1/messages.js +398 -0
- package/dist/v1/satellite.d.ts +90 -0
- package/dist/v1/satellite.js +637 -0
- package/dist/v1/satellite_provisioning.d.ts +33 -0
- package/dist/v1/satellite_provisioning.js +84 -0
- package/dist/v1/satellite_proxy.d.ts +100 -0
- package/dist/v1/satellite_proxy.js +546 -0
- package/dist/v1/shared.d.ts +54 -0
- package/dist/v1/shared.js +249 -0
- package/dist/v1/speaker_enrollment.d.ts +44 -0
- package/dist/v1/speaker_enrollment.js +157 -0
- package/dist/v1/timer_admin.d.ts +42 -0
- package/dist/v1/timer_admin.js +273 -0
- package/dist/v1/timer_service.d.ts +133 -0
- package/dist/v1/timer_service.js +945 -0
- package/dist/v1/user_registry.d.ts +187 -0
- package/dist/v1/user_registry.js +1612 -0
- package/dist/v1/wakeword_capture.d.ts +101 -0
- package/dist/v1/wakeword_capture.js +611 -0
- package/dist/v1/weather.d.ts +81 -0
- package/dist/v1/weather.js +366 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,6 +16,27 @@ Three independent, tag-triggered publish targets — pick whichever matches your
|
|
|
16
16
|
|
|
17
17
|
Go has no separate package registry, so that tagged GitHub repo *is* the package — `go get` resolves it directly.
|
|
18
18
|
|
|
19
|
+
## API generations: hannah.v1
|
|
20
|
+
|
|
21
|
+
The schema exists in two packages side by side:
|
|
22
|
+
|
|
23
|
+
| Package | Files | Status |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| `hannah.v1` | `hannah/v1/*.proto` | **current generation** — all changes go here |
|
|
26
|
+
| `hannah` (unversioned) | `hannah/*.proto` | frozen (N−1), kept so older components keep working |
|
|
27
|
+
|
|
28
|
+
Both carry the same services and messages, but under different gRPC method paths (`/hannah.v1.HannahService/...` vs `/hannah.HannahService/...`), so a server can serve both at once and gRPC routes each call to the right one. Hannah Core serves the current generation and the one before it (N and N−1, never more). Clients use the current generation and fall back to the previous one if Core answers `UNIMPLEMENTED` (Core too old).
|
|
29
|
+
|
|
30
|
+
A breaking change never happens inside a generation — it starts the next one (`hannah.v2`), and the oldest one is removed. `hannah/options.proto` (the `compat_version` extension) is shared by both packages, not copied. The API generation is independent of the package version: `hannah.v1` ships in 4.x.
|
|
31
|
+
|
|
32
|
+
| Language | Current generation | Previous generation |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| Python | `from hannah_proto.v1 import hannah_pb2` | `from hannah_proto import hannah_pb2` |
|
|
35
|
+
| TypeScript | `import { v1 } from '@m1kad0/hannah-proto'` → `v1.agent.AgentMessage` | `import { agent } from '@m1kad0/hannah-proto'` |
|
|
36
|
+
| Go | `github.com/NurPech/hannah-proto-go/v4/hannahv1` | `github.com/NurPech/hannah-proto-go/v4` |
|
|
37
|
+
|
|
38
|
+
CI rejects any change under `hannah/` outside `hannah/v1/`.
|
|
39
|
+
|
|
19
40
|
## Versioning: PROTO_VERSION
|
|
20
41
|
|
|
21
42
|
Alongside the semver package/tag version, every release carries a single-integer `PROTO_VERSION` (see the `PROTO_VERSION` file). Hannah Core and its clients exchange this value on every call and reject a mismatch at runtime — that's the actual compatibility gate, not the semver tag. A breaking schema change requires bumping `PROTO_VERSION`; CI enforces this on every merge request via `buf breaking`.
|
|
@@ -5,10 +5,11 @@ const grpc_js_1 = require("@grpc/grpc-js");
|
|
|
5
5
|
const compat_versions_1 = require("./compat_versions");
|
|
6
6
|
Object.defineProperty(exports, "DEFAULT_COMPAT_VERSION", { enumerable: true, get: function () { return compat_versions_1.DEFAULT_COMPAT_VERSION; } });
|
|
7
7
|
exports.COMPAT_VERSION_METADATA_KEY = "x-compat-version";
|
|
8
|
-
/** `
|
|
9
|
-
* gen-compat-versions.js writes into REQUIRED_COMPAT_VERSIONS
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
/** `methodPath` is the full gRPC path (e.g. "/hannah.v1.HannahService/SubmitText"),
|
|
9
|
+
* matching the keys gen-compat-versions.js writes into REQUIRED_COMPAT_VERSIONS —
|
|
10
|
+
* the bare name would be ambiguous between hannah and hannah.v1. */
|
|
11
|
+
function getRequiredCompatVersion(methodPath) {
|
|
12
|
+
return compat_versions_1.REQUIRED_COMPAT_VERSIONS[methodPath] ?? compat_versions_1.DEFAULT_COMPAT_VERSION;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* grpc-js client interceptor: attaches x-compat-version metadata to every
|
|
@@ -18,8 +19,7 @@ function getRequiredCompatVersion(methodName) {
|
|
|
18
19
|
* hannah-proto#9, the SetGroupRooms incident).
|
|
19
20
|
*/
|
|
20
21
|
const compatVersionInterceptor = (options, nextCall) => {
|
|
21
|
-
const
|
|
22
|
-
const required = getRequiredCompatVersion(methodName);
|
|
22
|
+
const required = getRequiredCompatVersion(options.method_definition.path);
|
|
23
23
|
return new grpc_js_1.InterceptingCall(nextCall(options), {
|
|
24
24
|
start(metadata, listener, next) {
|
|
25
25
|
metadata.set(exports.COMPAT_VERSION_METADATA_KEY, String(required));
|
package/dist/compat_versions.js
CHANGED
|
@@ -4,89 +4,180 @@ exports.REQUIRED_COMPAT_VERSIONS = exports.DEFAULT_COMPAT_VERSION = void 0;
|
|
|
4
4
|
// Generated by scripts/gen-compat-versions.js — do not edit by hand.
|
|
5
5
|
exports.DEFAULT_COMPAT_VERSION = 1;
|
|
6
6
|
exports.REQUIRED_COMPAT_VERSIONS = {
|
|
7
|
-
"GetUsers": 1,
|
|
8
|
-
"GetUser": 1,
|
|
9
|
-
"LinkAccount": 1,
|
|
10
|
-
"UnlinkAccount": 1,
|
|
11
|
-
"CreateLinkToken": 1,
|
|
12
|
-
"SetTrustLevel": 1,
|
|
13
|
-
"SetSystemMessages": 1,
|
|
14
|
-
"SetAutomation": 1,
|
|
15
|
-
"Login": 1,
|
|
16
|
-
"CreateUser": 1,
|
|
17
|
-
"UpdateUser": 1,
|
|
18
|
-
"DeleteUser": 1,
|
|
19
|
-
"GetResidents": 1,
|
|
20
|
-
"GetDevices": 1,
|
|
21
|
-
"ControlDevice": 1,
|
|
22
|
-
"SubmitText": 1,
|
|
23
|
-
"SubmitVoice": 1,
|
|
24
|
-
"Announce": 1,
|
|
25
|
-
"Notify": 1,
|
|
26
|
-
"GetSatellites": 1,
|
|
27
|
-
"SetSatelliteRoom": 1,
|
|
28
|
-
"SetSatelliteDisplayName": 1,
|
|
29
|
-
"SetSatelliteOwner": 1,
|
|
30
|
-
"SetSatelliteSmalltalkFollowup": 1,
|
|
31
|
-
"DeleteSatellite": 1,
|
|
32
|
-
"GetRooms": 1,
|
|
33
|
-
"GetGroups": 1,
|
|
34
|
-
"CreateGroup": 1,
|
|
35
|
-
"UpdateGroup": 1,
|
|
36
|
-
"DeleteGroup": 1,
|
|
37
|
-
"SetGroupSatellites": 1,
|
|
38
|
-
"GetTriggers": 1,
|
|
39
|
-
"CreateTrigger": 2,
|
|
40
|
-
"UpdateTrigger": 2,
|
|
41
|
-
"DeleteTrigger": 1,
|
|
42
|
-
"GetAlarms": 1,
|
|
43
|
-
"CreateAlarm": 1,
|
|
44
|
-
"UpdateAlarm": 1,
|
|
45
|
-
"DeleteAlarm": 1,
|
|
46
|
-
"GetSettings": 1,
|
|
47
|
-
"UpdateConfig": 1,
|
|
48
|
-
"GetBleTags": 1,
|
|
49
|
-
"CreateBleTag": 1,
|
|
50
|
-
"UpdateBleTag": 1,
|
|
51
|
-
"DeleteBleTag": 1,
|
|
52
|
-
"GetPresenceSources": 1,
|
|
53
|
-
"CreatePresenceSource": 1,
|
|
54
|
-
"UpdatePresenceSource": 1,
|
|
55
|
-
"DeletePresenceSource": 1,
|
|
56
|
-
"GetCars": 1,
|
|
57
|
-
"CreateCar": 1,
|
|
58
|
-
"UpdateCar": 1,
|
|
59
|
-
"DeleteCar": 1,
|
|
60
|
-
"GetCarState": 1,
|
|
61
|
-
"GetAllCarStates": 1,
|
|
62
|
-
"SubscribeEvents": 1,
|
|
63
|
-
"TriggerFirmwareUpdate": 1,
|
|
64
|
-
"TriggerSatelliteRestart": 1,
|
|
65
|
-
"RequestSatelliteCapture": 1,
|
|
66
|
-
"ReleaseSatelliteCapture": 1,
|
|
67
|
-
"StreamSatelliteAudio": 1,
|
|
68
|
-
"TriggerPlink": 1,
|
|
69
|
-
"CollectorConnect": 2,
|
|
70
|
-
"TriggerCollectorCapture": 2,
|
|
71
|
-
"RegisterProxy": 1,
|
|
72
|
-
"SubmitSatelliteAudio": 3,
|
|
73
|
-
"NotifySatelliteRegistered": 1,
|
|
74
|
-
"NotifySatelliteGone": 1,
|
|
75
|
-
"ProvisionSatellite": 1,
|
|
76
|
-
"StartVoiceEnrollment": 1,
|
|
77
|
-
"EnrollVoiceprint": 1,
|
|
78
|
-
"TimerConnect": 1,
|
|
79
|
-
"GetTimers": 1,
|
|
80
|
-
"DeleteTimer": 1,
|
|
81
|
-
"AgentConnect": 1,
|
|
82
|
-
"AutomationConnect": 1,
|
|
83
|
-
"ChannelConnect": 1,
|
|
84
|
-
"GetChannels": 1,
|
|
85
|
-
"SubscribeInfrastructure": 1,
|
|
86
|
-
"LogCollectorConnect": 1,
|
|
87
|
-
"ListActivityLog": 1,
|
|
88
|
-
"StreamActivityAudio": 1,
|
|
89
|
-
"CreateMessage": 1,
|
|
90
|
-
"ListMessages": 1,
|
|
91
|
-
"DeleteMessage": 1
|
|
7
|
+
"/hannah.HannahService/GetUsers": 1,
|
|
8
|
+
"/hannah.HannahService/GetUser": 1,
|
|
9
|
+
"/hannah.HannahService/LinkAccount": 1,
|
|
10
|
+
"/hannah.HannahService/UnlinkAccount": 1,
|
|
11
|
+
"/hannah.HannahService/CreateLinkToken": 1,
|
|
12
|
+
"/hannah.HannahService/SetTrustLevel": 1,
|
|
13
|
+
"/hannah.HannahService/SetSystemMessages": 1,
|
|
14
|
+
"/hannah.HannahService/SetAutomation": 1,
|
|
15
|
+
"/hannah.HannahService/Login": 1,
|
|
16
|
+
"/hannah.HannahService/CreateUser": 1,
|
|
17
|
+
"/hannah.HannahService/UpdateUser": 1,
|
|
18
|
+
"/hannah.HannahService/DeleteUser": 1,
|
|
19
|
+
"/hannah.HannahService/GetResidents": 1,
|
|
20
|
+
"/hannah.HannahService/GetDevices": 1,
|
|
21
|
+
"/hannah.HannahService/ControlDevice": 1,
|
|
22
|
+
"/hannah.HannahService/SubmitText": 1,
|
|
23
|
+
"/hannah.HannahService/SubmitVoice": 1,
|
|
24
|
+
"/hannah.HannahService/Announce": 1,
|
|
25
|
+
"/hannah.HannahService/Notify": 1,
|
|
26
|
+
"/hannah.HannahService/GetSatellites": 1,
|
|
27
|
+
"/hannah.HannahService/SetSatelliteRoom": 1,
|
|
28
|
+
"/hannah.HannahService/SetSatelliteDisplayName": 1,
|
|
29
|
+
"/hannah.HannahService/SetSatelliteOwner": 1,
|
|
30
|
+
"/hannah.HannahService/SetSatelliteSmalltalkFollowup": 1,
|
|
31
|
+
"/hannah.HannahService/DeleteSatellite": 1,
|
|
32
|
+
"/hannah.HannahService/GetRooms": 1,
|
|
33
|
+
"/hannah.HannahService/GetGroups": 1,
|
|
34
|
+
"/hannah.HannahService/CreateGroup": 1,
|
|
35
|
+
"/hannah.HannahService/UpdateGroup": 1,
|
|
36
|
+
"/hannah.HannahService/DeleteGroup": 1,
|
|
37
|
+
"/hannah.HannahService/SetGroupSatellites": 1,
|
|
38
|
+
"/hannah.HannahService/GetTriggers": 1,
|
|
39
|
+
"/hannah.HannahService/CreateTrigger": 2,
|
|
40
|
+
"/hannah.HannahService/UpdateTrigger": 2,
|
|
41
|
+
"/hannah.HannahService/DeleteTrigger": 1,
|
|
42
|
+
"/hannah.HannahService/GetAlarms": 1,
|
|
43
|
+
"/hannah.HannahService/CreateAlarm": 1,
|
|
44
|
+
"/hannah.HannahService/UpdateAlarm": 1,
|
|
45
|
+
"/hannah.HannahService/DeleteAlarm": 1,
|
|
46
|
+
"/hannah.HannahService/GetSettings": 1,
|
|
47
|
+
"/hannah.HannahService/UpdateConfig": 1,
|
|
48
|
+
"/hannah.HannahService/GetBleTags": 1,
|
|
49
|
+
"/hannah.HannahService/CreateBleTag": 1,
|
|
50
|
+
"/hannah.HannahService/UpdateBleTag": 1,
|
|
51
|
+
"/hannah.HannahService/DeleteBleTag": 1,
|
|
52
|
+
"/hannah.HannahService/GetPresenceSources": 1,
|
|
53
|
+
"/hannah.HannahService/CreatePresenceSource": 1,
|
|
54
|
+
"/hannah.HannahService/UpdatePresenceSource": 1,
|
|
55
|
+
"/hannah.HannahService/DeletePresenceSource": 1,
|
|
56
|
+
"/hannah.HannahService/GetCars": 1,
|
|
57
|
+
"/hannah.HannahService/CreateCar": 1,
|
|
58
|
+
"/hannah.HannahService/UpdateCar": 1,
|
|
59
|
+
"/hannah.HannahService/DeleteCar": 1,
|
|
60
|
+
"/hannah.HannahService/GetCarState": 1,
|
|
61
|
+
"/hannah.HannahService/GetAllCarStates": 1,
|
|
62
|
+
"/hannah.HannahService/SubscribeEvents": 1,
|
|
63
|
+
"/hannah.HannahService/TriggerFirmwareUpdate": 1,
|
|
64
|
+
"/hannah.HannahService/TriggerSatelliteRestart": 1,
|
|
65
|
+
"/hannah.HannahService/RequestSatelliteCapture": 1,
|
|
66
|
+
"/hannah.HannahService/ReleaseSatelliteCapture": 1,
|
|
67
|
+
"/hannah.HannahService/StreamSatelliteAudio": 1,
|
|
68
|
+
"/hannah.HannahService/TriggerPlink": 1,
|
|
69
|
+
"/hannah.HannahService/CollectorConnect": 2,
|
|
70
|
+
"/hannah.HannahService/TriggerCollectorCapture": 2,
|
|
71
|
+
"/hannah.HannahService/RegisterProxy": 1,
|
|
72
|
+
"/hannah.HannahService/SubmitSatelliteAudio": 3,
|
|
73
|
+
"/hannah.HannahService/NotifySatelliteRegistered": 1,
|
|
74
|
+
"/hannah.HannahService/NotifySatelliteGone": 1,
|
|
75
|
+
"/hannah.HannahService/ProvisionSatellite": 1,
|
|
76
|
+
"/hannah.HannahService/StartVoiceEnrollment": 1,
|
|
77
|
+
"/hannah.HannahService/EnrollVoiceprint": 1,
|
|
78
|
+
"/hannah.HannahService/TimerConnect": 1,
|
|
79
|
+
"/hannah.HannahService/GetTimers": 1,
|
|
80
|
+
"/hannah.HannahService/DeleteTimer": 1,
|
|
81
|
+
"/hannah.HannahService/AgentConnect": 1,
|
|
82
|
+
"/hannah.HannahService/AutomationConnect": 1,
|
|
83
|
+
"/hannah.HannahService/ChannelConnect": 1,
|
|
84
|
+
"/hannah.HannahService/GetChannels": 1,
|
|
85
|
+
"/hannah.HannahService/SubscribeInfrastructure": 1,
|
|
86
|
+
"/hannah.HannahService/LogCollectorConnect": 1,
|
|
87
|
+
"/hannah.HannahService/ListActivityLog": 1,
|
|
88
|
+
"/hannah.HannahService/StreamActivityAudio": 1,
|
|
89
|
+
"/hannah.HannahService/CreateMessage": 1,
|
|
90
|
+
"/hannah.HannahService/ListMessages": 1,
|
|
91
|
+
"/hannah.HannahService/DeleteMessage": 1,
|
|
92
|
+
"/hannah.LogService/Ship": 1,
|
|
93
|
+
"/hannah.LogService/GetSources": 1,
|
|
94
|
+
"/hannah.LogService/Export": 1,
|
|
95
|
+
"/hannah.v1.HannahService/GetUsers": 1,
|
|
96
|
+
"/hannah.v1.HannahService/GetUser": 1,
|
|
97
|
+
"/hannah.v1.HannahService/LinkAccount": 1,
|
|
98
|
+
"/hannah.v1.HannahService/UnlinkAccount": 1,
|
|
99
|
+
"/hannah.v1.HannahService/CreateLinkToken": 1,
|
|
100
|
+
"/hannah.v1.HannahService/SetTrustLevel": 1,
|
|
101
|
+
"/hannah.v1.HannahService/SetSystemMessages": 1,
|
|
102
|
+
"/hannah.v1.HannahService/SetAutomation": 1,
|
|
103
|
+
"/hannah.v1.HannahService/Login": 1,
|
|
104
|
+
"/hannah.v1.HannahService/CreateUser": 1,
|
|
105
|
+
"/hannah.v1.HannahService/UpdateUser": 1,
|
|
106
|
+
"/hannah.v1.HannahService/DeleteUser": 1,
|
|
107
|
+
"/hannah.v1.HannahService/GetResidents": 1,
|
|
108
|
+
"/hannah.v1.HannahService/GetDevices": 1,
|
|
109
|
+
"/hannah.v1.HannahService/ControlDevice": 1,
|
|
110
|
+
"/hannah.v1.HannahService/SubmitText": 1,
|
|
111
|
+
"/hannah.v1.HannahService/SubmitVoice": 1,
|
|
112
|
+
"/hannah.v1.HannahService/Announce": 1,
|
|
113
|
+
"/hannah.v1.HannahService/Notify": 1,
|
|
114
|
+
"/hannah.v1.HannahService/GetSatellites": 1,
|
|
115
|
+
"/hannah.v1.HannahService/SetSatelliteRoom": 1,
|
|
116
|
+
"/hannah.v1.HannahService/SetSatelliteDisplayName": 1,
|
|
117
|
+
"/hannah.v1.HannahService/SetSatelliteOwner": 1,
|
|
118
|
+
"/hannah.v1.HannahService/SetSatelliteSmalltalkFollowup": 1,
|
|
119
|
+
"/hannah.v1.HannahService/DeleteSatellite": 1,
|
|
120
|
+
"/hannah.v1.HannahService/GetRooms": 1,
|
|
121
|
+
"/hannah.v1.HannahService/GetGroups": 1,
|
|
122
|
+
"/hannah.v1.HannahService/CreateGroup": 1,
|
|
123
|
+
"/hannah.v1.HannahService/UpdateGroup": 1,
|
|
124
|
+
"/hannah.v1.HannahService/DeleteGroup": 1,
|
|
125
|
+
"/hannah.v1.HannahService/SetGroupSatellites": 1,
|
|
126
|
+
"/hannah.v1.HannahService/GetTriggers": 1,
|
|
127
|
+
"/hannah.v1.HannahService/CreateTrigger": 2,
|
|
128
|
+
"/hannah.v1.HannahService/UpdateTrigger": 2,
|
|
129
|
+
"/hannah.v1.HannahService/DeleteTrigger": 1,
|
|
130
|
+
"/hannah.v1.HannahService/GetAlarms": 1,
|
|
131
|
+
"/hannah.v1.HannahService/CreateAlarm": 1,
|
|
132
|
+
"/hannah.v1.HannahService/UpdateAlarm": 1,
|
|
133
|
+
"/hannah.v1.HannahService/DeleteAlarm": 1,
|
|
134
|
+
"/hannah.v1.HannahService/GetSettings": 1,
|
|
135
|
+
"/hannah.v1.HannahService/UpdateConfig": 1,
|
|
136
|
+
"/hannah.v1.HannahService/GetBleTags": 1,
|
|
137
|
+
"/hannah.v1.HannahService/CreateBleTag": 1,
|
|
138
|
+
"/hannah.v1.HannahService/UpdateBleTag": 1,
|
|
139
|
+
"/hannah.v1.HannahService/DeleteBleTag": 1,
|
|
140
|
+
"/hannah.v1.HannahService/GetPresenceSources": 1,
|
|
141
|
+
"/hannah.v1.HannahService/CreatePresenceSource": 1,
|
|
142
|
+
"/hannah.v1.HannahService/UpdatePresenceSource": 1,
|
|
143
|
+
"/hannah.v1.HannahService/DeletePresenceSource": 1,
|
|
144
|
+
"/hannah.v1.HannahService/GetCars": 1,
|
|
145
|
+
"/hannah.v1.HannahService/CreateCar": 1,
|
|
146
|
+
"/hannah.v1.HannahService/UpdateCar": 1,
|
|
147
|
+
"/hannah.v1.HannahService/DeleteCar": 1,
|
|
148
|
+
"/hannah.v1.HannahService/GetCarState": 1,
|
|
149
|
+
"/hannah.v1.HannahService/GetAllCarStates": 1,
|
|
150
|
+
"/hannah.v1.HannahService/SubscribeEvents": 1,
|
|
151
|
+
"/hannah.v1.HannahService/TriggerFirmwareUpdate": 1,
|
|
152
|
+
"/hannah.v1.HannahService/TriggerSatelliteRestart": 1,
|
|
153
|
+
"/hannah.v1.HannahService/RequestSatelliteCapture": 1,
|
|
154
|
+
"/hannah.v1.HannahService/ReleaseSatelliteCapture": 1,
|
|
155
|
+
"/hannah.v1.HannahService/StreamSatelliteAudio": 1,
|
|
156
|
+
"/hannah.v1.HannahService/TriggerPlink": 1,
|
|
157
|
+
"/hannah.v1.HannahService/CollectorConnect": 2,
|
|
158
|
+
"/hannah.v1.HannahService/TriggerCollectorCapture": 2,
|
|
159
|
+
"/hannah.v1.HannahService/RegisterProxy": 1,
|
|
160
|
+
"/hannah.v1.HannahService/SubmitSatelliteAudio": 3,
|
|
161
|
+
"/hannah.v1.HannahService/NotifySatelliteRegistered": 1,
|
|
162
|
+
"/hannah.v1.HannahService/NotifySatelliteGone": 1,
|
|
163
|
+
"/hannah.v1.HannahService/ProvisionSatellite": 1,
|
|
164
|
+
"/hannah.v1.HannahService/StartVoiceEnrollment": 1,
|
|
165
|
+
"/hannah.v1.HannahService/EnrollVoiceprint": 1,
|
|
166
|
+
"/hannah.v1.HannahService/TimerConnect": 1,
|
|
167
|
+
"/hannah.v1.HannahService/GetTimers": 1,
|
|
168
|
+
"/hannah.v1.HannahService/DeleteTimer": 1,
|
|
169
|
+
"/hannah.v1.HannahService/AgentConnect": 1,
|
|
170
|
+
"/hannah.v1.HannahService/AutomationConnect": 1,
|
|
171
|
+
"/hannah.v1.HannahService/ChannelConnect": 1,
|
|
172
|
+
"/hannah.v1.HannahService/GetChannels": 1,
|
|
173
|
+
"/hannah.v1.HannahService/SubscribeInfrastructure": 1,
|
|
174
|
+
"/hannah.v1.HannahService/LogCollectorConnect": 1,
|
|
175
|
+
"/hannah.v1.HannahService/ListActivityLog": 1,
|
|
176
|
+
"/hannah.v1.HannahService/StreamActivityAudio": 1,
|
|
177
|
+
"/hannah.v1.HannahService/CreateMessage": 1,
|
|
178
|
+
"/hannah.v1.HannahService/ListMessages": 1,
|
|
179
|
+
"/hannah.v1.HannahService/DeleteMessage": 1,
|
|
180
|
+
"/hannah.v1.LogService/Ship": 1,
|
|
181
|
+
"/hannah.v1.LogService/GetSources": 1,
|
|
182
|
+
"/hannah.v1.LogService/Export": 1
|
|
92
183
|
};
|
package/dist/descriptor.binpb
CHANGED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * as device_control_menu from './device_control_menu';
|
|
|
11
11
|
export * as event_stream from './event_stream';
|
|
12
12
|
export * as hannah from './hannah';
|
|
13
13
|
export * as infrastructure from './infrastructure';
|
|
14
|
+
export * as logging from './logging';
|
|
14
15
|
export * as messages from './messages';
|
|
15
16
|
export * as options from './options';
|
|
16
17
|
export * as satellite from './satellite';
|
|
@@ -23,3 +24,4 @@ export * as timer_service from './timer_service';
|
|
|
23
24
|
export * as user_registry from './user_registry';
|
|
24
25
|
export * as wakeword_capture from './wakeword_capture';
|
|
25
26
|
export * as weather from './weather';
|
|
27
|
+
export * as v1 from './v1';
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.weather = exports.wakeword_capture = exports.user_registry = exports.timer_service = exports.timer_admin = exports.speaker_enrollment = exports.shared = exports.satellite_proxy = exports.satellite_provisioning = exports.satellite = exports.options = exports.messages = exports.infrastructure = exports.hannah = exports.event_stream = exports.device_control_menu = exports.control = exports.compat_versions = exports.compat_interceptor = exports.channel = exports.car_state = exports.automation = exports.agent = exports.activity_log = void 0;
|
|
39
|
+
exports.v1 = exports.weather = exports.wakeword_capture = exports.user_registry = exports.timer_service = exports.timer_admin = exports.speaker_enrollment = exports.shared = exports.satellite_proxy = exports.satellite_provisioning = exports.satellite = exports.options = exports.messages = exports.logging = exports.infrastructure = exports.hannah = exports.event_stream = exports.device_control_menu = exports.control = exports.compat_versions = exports.compat_interceptor = exports.channel = exports.car_state = exports.automation = exports.agent = exports.activity_log = void 0;
|
|
40
40
|
__exportStar(require("./version"), exports);
|
|
41
41
|
exports.activity_log = __importStar(require("./activity_log"));
|
|
42
42
|
exports.agent = __importStar(require("./agent"));
|
|
@@ -50,6 +50,7 @@ exports.device_control_menu = __importStar(require("./device_control_menu"));
|
|
|
50
50
|
exports.event_stream = __importStar(require("./event_stream"));
|
|
51
51
|
exports.hannah = __importStar(require("./hannah"));
|
|
52
52
|
exports.infrastructure = __importStar(require("./infrastructure"));
|
|
53
|
+
exports.logging = __importStar(require("./logging"));
|
|
53
54
|
exports.messages = __importStar(require("./messages"));
|
|
54
55
|
exports.options = __importStar(require("./options"));
|
|
55
56
|
exports.satellite = __importStar(require("./satellite"));
|
|
@@ -62,3 +63,4 @@ exports.timer_service = __importStar(require("./timer_service"));
|
|
|
62
63
|
exports.user_registry = __importStar(require("./user_registry"));
|
|
63
64
|
exports.wakeword_capture = __importStar(require("./wakeword_capture"));
|
|
64
65
|
exports.weather = __importStar(require("./weather"));
|
|
66
|
+
exports.v1 = __importStar(require("./v1"));
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { type CallOptions, type ChannelCredentials, Client, type ClientOptions, type ClientReadableStream, type ClientUnaryCall, type ClientWritableStream, type handleClientStreamingCall, type handleServerStreamingCall, type handleUnaryCall, type Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
3
|
+
import { Empty } from "./shared";
|
|
4
|
+
export declare const protobufPackage = "hannah";
|
|
5
|
+
export declare enum LogLevel {
|
|
6
|
+
LOG_LEVEL_UNSPECIFIED = 0,
|
|
7
|
+
LOG_LEVEL_DEBUG = 1,
|
|
8
|
+
LOG_LEVEL_INFO = 2,
|
|
9
|
+
LOG_LEVEL_WARNING = 3,
|
|
10
|
+
LOG_LEVEL_ERROR = 4,
|
|
11
|
+
LOG_LEVEL_CRITICAL = 5,
|
|
12
|
+
UNRECOGNIZED = -1
|
|
13
|
+
}
|
|
14
|
+
/** Lets an export leave out sensitive content (e.g. before posting it in a forum). */
|
|
15
|
+
export declare enum LogCategory {
|
|
16
|
+
LOG_CATEGORY_UNSPECIFIED = 0,
|
|
17
|
+
LOG_CATEGORY_GENERAL = 1,
|
|
18
|
+
/** LOG_CATEGORY_TRANSCRIPT - speech transcripts / user utterances */
|
|
19
|
+
LOG_CATEGORY_TRANSCRIPT = 2,
|
|
20
|
+
/** LOG_CATEGORY_METADATA - room/device names, presence and similar */
|
|
21
|
+
LOG_CATEGORY_METADATA = 3,
|
|
22
|
+
UNRECOGNIZED = -1
|
|
23
|
+
}
|
|
24
|
+
export interface ShipMessage {
|
|
25
|
+
/** exactly once, as the first message */
|
|
26
|
+
hello?: ShipHello | undefined;
|
|
27
|
+
entry?: LogEntry | undefined;
|
|
28
|
+
/** the component's buffer overflowed, entries were dropped */
|
|
29
|
+
gap?: LogGap | undefined;
|
|
30
|
+
}
|
|
31
|
+
/** Identifies the source of all entries on this stream. */
|
|
32
|
+
export interface ShipHello {
|
|
33
|
+
/** e.g. "core", "telegram", "voiceid" */
|
|
34
|
+
component: string;
|
|
35
|
+
/** distinguishes several instances of the same component */
|
|
36
|
+
instance: string;
|
|
37
|
+
/** component version, shown in the export manifest */
|
|
38
|
+
version: string;
|
|
39
|
+
}
|
|
40
|
+
export interface LogEntry {
|
|
41
|
+
/** Unix ms at the time of logging in the component, not of receipt */
|
|
42
|
+
timestampMs: bigint;
|
|
43
|
+
level: LogLevel;
|
|
44
|
+
/** e.g. the Python logger name */
|
|
45
|
+
logger: string;
|
|
46
|
+
/** secrets are filtered out by the component before sending */
|
|
47
|
+
message: string;
|
|
48
|
+
category: LogCategory;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Entries the component had to drop (buffer overflow while the collector was
|
|
52
|
+
* unreachable). Listed in the export manifest so gaps are visible.
|
|
53
|
+
*/
|
|
54
|
+
export interface LogGap {
|
|
55
|
+
dropped: bigint;
|
|
56
|
+
fromMs: bigint;
|
|
57
|
+
toMs: bigint;
|
|
58
|
+
}
|
|
59
|
+
export interface ShipAck {
|
|
60
|
+
/** number of entries stored from this stream */
|
|
61
|
+
accepted: bigint;
|
|
62
|
+
}
|
|
63
|
+
export interface LogSource {
|
|
64
|
+
component: string;
|
|
65
|
+
instance: string;
|
|
66
|
+
/** from the most recent ShipHello */
|
|
67
|
+
version: string;
|
|
68
|
+
oldestMs: bigint;
|
|
69
|
+
newestMs: bigint;
|
|
70
|
+
entries: bigint;
|
|
71
|
+
}
|
|
72
|
+
export interface GetSourcesResponse {
|
|
73
|
+
sources: LogSource[];
|
|
74
|
+
}
|
|
75
|
+
export interface ExportRequest {
|
|
76
|
+
sinceMs: bigint;
|
|
77
|
+
/** 0 = now */
|
|
78
|
+
untilMs: bigint;
|
|
79
|
+
/** empty = all */
|
|
80
|
+
components: string[];
|
|
81
|
+
excludeCategories: LogCategory[];
|
|
82
|
+
}
|
|
83
|
+
export interface ExportChunk {
|
|
84
|
+
data: Uint8Array;
|
|
85
|
+
}
|
|
86
|
+
export declare const ShipMessage: MessageFns<ShipMessage>;
|
|
87
|
+
export declare const ShipHello: MessageFns<ShipHello>;
|
|
88
|
+
export declare const LogEntry: MessageFns<LogEntry>;
|
|
89
|
+
export declare const LogGap: MessageFns<LogGap>;
|
|
90
|
+
export declare const ShipAck: MessageFns<ShipAck>;
|
|
91
|
+
export declare const LogSource: MessageFns<LogSource>;
|
|
92
|
+
export declare const GetSourcesResponse: MessageFns<GetSourcesResponse>;
|
|
93
|
+
export declare const ExportRequest: MessageFns<ExportRequest>;
|
|
94
|
+
export declare const ExportChunk: MessageFns<ExportChunk>;
|
|
95
|
+
export type LogServiceService = typeof LogServiceService;
|
|
96
|
+
export declare const LogServiceService: {
|
|
97
|
+
/**
|
|
98
|
+
* Component → collector. First message is a ShipHello, then any number of
|
|
99
|
+
* entries/gaps. The stream stays open for as long as the component runs.
|
|
100
|
+
*/
|
|
101
|
+
readonly ship: {
|
|
102
|
+
readonly path: "/hannah.LogService/Ship";
|
|
103
|
+
readonly requestStream: true;
|
|
104
|
+
readonly responseStream: false;
|
|
105
|
+
readonly requestSerialize: (value: ShipMessage) => Buffer;
|
|
106
|
+
readonly requestDeserialize: (value: Buffer) => ShipMessage;
|
|
107
|
+
readonly responseSerialize: (value: ShipAck) => Buffer;
|
|
108
|
+
readonly responseDeserialize: (value: Buffer) => ShipAck;
|
|
109
|
+
};
|
|
110
|
+
/** Which sources the collector currently holds logs for, and how far back. */
|
|
111
|
+
readonly getSources: {
|
|
112
|
+
readonly path: "/hannah.LogService/GetSources";
|
|
113
|
+
readonly requestStream: false;
|
|
114
|
+
readonly responseStream: false;
|
|
115
|
+
readonly requestSerialize: (value: Empty) => Buffer;
|
|
116
|
+
readonly requestDeserialize: (value: Buffer) => Empty;
|
|
117
|
+
readonly responseSerialize: (value: GetSourcesResponse) => Buffer;
|
|
118
|
+
readonly responseDeserialize: (value: Buffer) => GetSourcesResponse;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Archive of the requested logs (tar.gz: one file per source plus a manifest),
|
|
122
|
+
* split into chunks — the client concatenates ExportChunk.data in order.
|
|
123
|
+
*/
|
|
124
|
+
readonly export: {
|
|
125
|
+
readonly path: "/hannah.LogService/Export";
|
|
126
|
+
readonly requestStream: false;
|
|
127
|
+
readonly responseStream: true;
|
|
128
|
+
readonly requestSerialize: (value: ExportRequest) => Buffer;
|
|
129
|
+
readonly requestDeserialize: (value: Buffer) => ExportRequest;
|
|
130
|
+
readonly responseSerialize: (value: ExportChunk) => Buffer;
|
|
131
|
+
readonly responseDeserialize: (value: Buffer) => ExportChunk;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
export interface LogServiceServer extends UntypedServiceImplementation {
|
|
135
|
+
/**
|
|
136
|
+
* Component → collector. First message is a ShipHello, then any number of
|
|
137
|
+
* entries/gaps. The stream stays open for as long as the component runs.
|
|
138
|
+
*/
|
|
139
|
+
ship: handleClientStreamingCall<ShipMessage, ShipAck>;
|
|
140
|
+
/** Which sources the collector currently holds logs for, and how far back. */
|
|
141
|
+
getSources: handleUnaryCall<Empty, GetSourcesResponse>;
|
|
142
|
+
/**
|
|
143
|
+
* Archive of the requested logs (tar.gz: one file per source plus a manifest),
|
|
144
|
+
* split into chunks — the client concatenates ExportChunk.data in order.
|
|
145
|
+
*/
|
|
146
|
+
export: handleServerStreamingCall<ExportRequest, ExportChunk>;
|
|
147
|
+
}
|
|
148
|
+
export interface LogServiceClient extends Client {
|
|
149
|
+
/**
|
|
150
|
+
* Component → collector. First message is a ShipHello, then any number of
|
|
151
|
+
* entries/gaps. The stream stays open for as long as the component runs.
|
|
152
|
+
*/
|
|
153
|
+
ship(callback: (error: ServiceError | null, response: ShipAck) => void): ClientWritableStream<ShipMessage>;
|
|
154
|
+
ship(metadata: Metadata, callback: (error: ServiceError | null, response: ShipAck) => void): ClientWritableStream<ShipMessage>;
|
|
155
|
+
ship(options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ShipAck) => void): ClientWritableStream<ShipMessage>;
|
|
156
|
+
ship(metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ShipAck) => void): ClientWritableStream<ShipMessage>;
|
|
157
|
+
/** Which sources the collector currently holds logs for, and how far back. */
|
|
158
|
+
getSources(request: Empty, callback: (error: ServiceError | null, response: GetSourcesResponse) => void): ClientUnaryCall;
|
|
159
|
+
getSources(request: Empty, metadata: Metadata, callback: (error: ServiceError | null, response: GetSourcesResponse) => void): ClientUnaryCall;
|
|
160
|
+
getSources(request: Empty, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: GetSourcesResponse) => void): ClientUnaryCall;
|
|
161
|
+
/**
|
|
162
|
+
* Archive of the requested logs (tar.gz: one file per source plus a manifest),
|
|
163
|
+
* split into chunks — the client concatenates ExportChunk.data in order.
|
|
164
|
+
*/
|
|
165
|
+
export(request: ExportRequest, options?: Partial<CallOptions>): ClientReadableStream<ExportChunk>;
|
|
166
|
+
export(request: ExportRequest, metadata?: Metadata, options?: Partial<CallOptions>): ClientReadableStream<ExportChunk>;
|
|
167
|
+
}
|
|
168
|
+
export declare const LogServiceClient: {
|
|
169
|
+
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): LogServiceClient;
|
|
170
|
+
service: typeof LogServiceService;
|
|
171
|
+
serviceName: string;
|
|
172
|
+
};
|
|
173
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
174
|
+
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 {} ? {
|
|
175
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
176
|
+
} : Partial<T>;
|
|
177
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
178
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
179
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
180
|
+
} & {
|
|
181
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
182
|
+
};
|
|
183
|
+
export interface MessageFns<T> {
|
|
184
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
185
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
186
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
187
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
188
|
+
}
|
|
189
|
+
export {};
|