blob: c6bdd99b3d75de4a8608580ff2b79defd917d370 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
syntax = "proto3";
package history;
service History {
rpc StartHistory(StartHistoryRequest) returns (StartHistoryReply);
rpc EndHistory(EndHistoryRequest) returns (EndHistoryReply);
rpc TailHistory(TailHistoryRequest) returns (stream TailHistoryReply);
// Request history from the daemon
rpc History(HistoryRequest) returns (HistoryReply);
}
message StartHistoryRequest {
Timestamp timestamp = 1;
string command = 2;
string cwd = 3;
string session = 4;
string hostname = 5;
string author = 6;
optional string intent = 7;
}
message StartHistoryReply {
string id = 1;
string version = 2;
uint32 protocol = 3;
}
message EndHistoryRequest {
string id = 1;
int64 exit = 2;
Duration duration = 3;
}
message EndHistoryReply {
string id = 1;
uint64 idx = 2;
string version = 3;
uint32 protocol = 4;
}
message TailHistoryRequest {}
message TailHistoryReply {
HistoryEventKind kind = 1;
HistoryEntry history = 2;
}
enum HistoryEventKind {
HISTORY_EVENT_KIND_UNSPECIFIED = 0;
HISTORY_EVENT_KIND_STARTED = 1;
HISTORY_EVENT_KIND_ENDED = 2;
}
message HistoryEntry {
Timestamp timestamp = 1;
string id = 2;
string command = 3;
string cwd = 4;
string session = 5;
string hostname = 6;
string author = 7;
string intent = 8;
int64 exit = 9;
Duration duration = 10;
}
message Range {
Timestamp start = 1;
Timestamp end = 2;
}
message Timestamp {
// Encoded as nanoseconds since the UNIX epoch.
uint64 value = 1;
}
message Duration {
// Encoded as nanoseconds.
uint64 value = 1;
}
message HistoryRequest {
Range range = 2;
}
message HistoryReply {
repeated HistoryEntry entries = 1;
}
|