@coasys/ad4m 0.10.1-release-candidate-4-test → 0.10.1-release-candidate-4-debug-strings
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/lib/index.cjs +93 -0
- package/lib/index.js +94 -1
- package/lib/src/language/Language.d.ts +3 -0
- package/lib/src/runtime/RuntimeClient.d.ts +3 -0
- package/lib/src/runtime/RuntimeClient.js +30 -0
- package/lib/src/runtime/RuntimeResolver.d.ts +9 -0
- package/lib/src/runtime/RuntimeResolver.js +54 -0
- package/lib/src/schema.gql +10 -0
- package/lib/src/typeDefs.js +10 -0
- package/package.json +1 -1
- package/src/language/Language.ts +6 -2
- package/src/runtime/RuntimeClient.ts +33 -0
- package/src/runtime/RuntimeResolver.ts +34 -0
package/lib/index.cjs
CHANGED
|
@@ -7188,6 +7188,36 @@ class RuntimeClient {
|
|
|
7188
7188
|
}));
|
|
7189
7189
|
return runtimeHcAgentInfos;
|
|
7190
7190
|
}
|
|
7191
|
+
async getNetworkMetrics() {
|
|
7192
|
+
const { runtimeGetNetworkMetrics } = unwrapApolloResult(await __classPrivateFieldGet$5(this, _RuntimeClient_apolloClient, "f").query({
|
|
7193
|
+
query: gql `query runtimeGetNetworkMetrics {
|
|
7194
|
+
runtimeGetNetworkMetrics
|
|
7195
|
+
}`,
|
|
7196
|
+
}));
|
|
7197
|
+
return runtimeGetNetworkMetrics;
|
|
7198
|
+
}
|
|
7199
|
+
async debugStrings(neighbourhoodUrl) {
|
|
7200
|
+
const { runtimeDebugStrings } = unwrapApolloResult(await __classPrivateFieldGet$5(this, _RuntimeClient_apolloClient, "f").query({
|
|
7201
|
+
query: gql `query runtimeDebugStrings($neighbourhoodUrl: String) {
|
|
7202
|
+
runtimeDebugStrings(neighbourhoodUrl: $neighbourhoodUrl) {
|
|
7203
|
+
neighbourhoodUrl
|
|
7204
|
+
debugString
|
|
7205
|
+
operation
|
|
7206
|
+
timestamp
|
|
7207
|
+
}
|
|
7208
|
+
}`,
|
|
7209
|
+
variables: { neighbourhoodUrl }
|
|
7210
|
+
}));
|
|
7211
|
+
return runtimeDebugStrings;
|
|
7212
|
+
}
|
|
7213
|
+
async restartHolochain() {
|
|
7214
|
+
const { runtimeRestartHolochain } = unwrapApolloResult(await __classPrivateFieldGet$5(this, _RuntimeClient_apolloClient, "f").mutate({
|
|
7215
|
+
mutation: gql `mutation runtimeRestartHolochain {
|
|
7216
|
+
runtimeRestartHolochain
|
|
7217
|
+
}`,
|
|
7218
|
+
}));
|
|
7219
|
+
return runtimeRestartHolochain;
|
|
7220
|
+
}
|
|
7191
7221
|
async hcAddAgentInfos(agentInfos) {
|
|
7192
7222
|
const { runtimeHcAddAgentInfos } = unwrapApolloResult(await __classPrivateFieldGet$5(this, _RuntimeClient_apolloClient, "f").mutate({
|
|
7193
7223
|
mutation: gql `mutation runtimeHcAddAgentInfos($agentInfos: String!) {
|
|
@@ -16353,6 +16383,13 @@ input CapabilityInput {
|
|
|
16353
16383
|
|
|
16354
16384
|
scalar DateTime
|
|
16355
16385
|
|
|
16386
|
+
type DebugStringEntry {
|
|
16387
|
+
debugString: String!
|
|
16388
|
+
neighbourhoodUrl: String!
|
|
16389
|
+
operation: String!
|
|
16390
|
+
timestamp: String!
|
|
16391
|
+
}
|
|
16392
|
+
|
|
16356
16393
|
type EntanglementProof {
|
|
16357
16394
|
deviceKey: String!
|
|
16358
16395
|
deviceKeySignedByDid: String!
|
|
@@ -16628,6 +16665,7 @@ type Mutation {
|
|
|
16628
16665
|
runtimeRemoveKnownLinkLanguageTemplates(addresses: [String!]!): [String!]!
|
|
16629
16666
|
runtimeRemoveNotification(id: String!): Boolean!
|
|
16630
16667
|
runtimeRequestInstallNotification(notification: NotificationInput!): String!
|
|
16668
|
+
runtimeRestartHolochain: Boolean!
|
|
16631
16669
|
runtimeSetStatus(status: PerspectiveInput!): Boolean!
|
|
16632
16670
|
runtimeUpdateNotification(id: String!, notification: NotificationInput!): Boolean!
|
|
16633
16671
|
}
|
|
@@ -16728,8 +16766,10 @@ type Query {
|
|
|
16728
16766
|
perspectiveQueryProlog(query: String!, uuid: String!): String!
|
|
16729
16767
|
perspectiveSnapshot(uuid: String!): Perspective
|
|
16730
16768
|
perspectives: [PerspectiveHandle!]!
|
|
16769
|
+
runtimeDebugStrings(neighbourhoodUrl: String): [DebugStringEntry!]!
|
|
16731
16770
|
runtimeFriendStatus(did: String!): PerspectiveExpression
|
|
16732
16771
|
runtimeFriends: [String!]!
|
|
16772
|
+
runtimeGetNetworkMetrics: String!
|
|
16733
16773
|
runtimeHcAgentInfos: String!
|
|
16734
16774
|
runtimeInfo: RuntimeInfo!
|
|
16735
16775
|
runtimeKnownLinkLanguageTemplates: [String!]!
|
|
@@ -17016,6 +17056,27 @@ __decorate([
|
|
|
17016
17056
|
exports.TriggeredNotification = __decorate([
|
|
17017
17057
|
ObjectType()
|
|
17018
17058
|
], exports.TriggeredNotification);
|
|
17059
|
+
exports.DebugStringEntry = class DebugStringEntry {
|
|
17060
|
+
};
|
|
17061
|
+
__decorate([
|
|
17062
|
+
Field(),
|
|
17063
|
+
__metadata("design:type", String)
|
|
17064
|
+
], exports.DebugStringEntry.prototype, "neighbourhoodUrl", void 0);
|
|
17065
|
+
__decorate([
|
|
17066
|
+
Field(),
|
|
17067
|
+
__metadata("design:type", String)
|
|
17068
|
+
], exports.DebugStringEntry.prototype, "debugString", void 0);
|
|
17069
|
+
__decorate([
|
|
17070
|
+
Field(),
|
|
17071
|
+
__metadata("design:type", String)
|
|
17072
|
+
], exports.DebugStringEntry.prototype, "operation", void 0);
|
|
17073
|
+
__decorate([
|
|
17074
|
+
Field(),
|
|
17075
|
+
__metadata("design:type", String)
|
|
17076
|
+
], exports.DebugStringEntry.prototype, "timestamp", void 0);
|
|
17077
|
+
exports.DebugStringEntry = __decorate([
|
|
17078
|
+
ObjectType()
|
|
17079
|
+
], exports.DebugStringEntry);
|
|
17019
17080
|
exports.ImportStats = class ImportStats {
|
|
17020
17081
|
};
|
|
17021
17082
|
__decorate([
|
|
@@ -17122,6 +17183,10 @@ let RuntimeResolver = class RuntimeResolver {
|
|
|
17122
17183
|
runtimeKnownLinkLanguageTemplates() {
|
|
17123
17184
|
return ["Qm12345abcdef"];
|
|
17124
17185
|
}
|
|
17186
|
+
runtimeDebugStrings(neighbourhoodUrl) {
|
|
17187
|
+
// Real implementation will be provided by the executor
|
|
17188
|
+
return [];
|
|
17189
|
+
}
|
|
17125
17190
|
runtimeAddKnownLinkLanguageTemplates(addresses) {
|
|
17126
17191
|
return addresses;
|
|
17127
17192
|
}
|
|
@@ -17140,6 +17205,15 @@ let RuntimeResolver = class RuntimeResolver {
|
|
|
17140
17205
|
runtimeHcAgentInfos() {
|
|
17141
17206
|
return JSON.stringify([{ "agent": { "type": "Buffer", "data": [9, 191, 231, 58, 255, 107, 202, 55, 206, 57, 9, 103, 17, 34, 206, 195, 207, 114, 5, 73, 77, 198, 56, 136, 17, 227, 242, 231, 194, 135, 128, 48, 170, 189, 119, 186] }, "signature": { "type": "Buffer", "data": [195, 143, 170, 36, 234, 123, 255, 85, 188, 138, 124, 2, 91, 18, 53, 231, 44, 41, 240, 8, 80, 131, 100, 150, 165, 125, 146, 90, 17, 200, 190, 129, 114, 211, 11, 146, 150, 128, 198, 199, 79, 118, 157, 101, 194, 68, 58, 245, 98, 182, 79, 139, 140, 41, 143, 129, 8, 136, 87, 77, 180, 231, 218, 11] }, "agent_info": { "type": "Buffer", "data": [134, 165, 115, 112, 97, 99, 101, 196, 36, 203, 165, 212, 173, 24, 215, 165, 196, 25, 145, 248, 113, 246, 139, 205, 182, 241, 138, 57, 0, 26, 8, 217, 179, 23, 126, 59, 136, 128, 213, 110, 225, 173, 72, 197, 95, 165, 97, 103, 101, 110, 116, 196, 36, 9, 191, 231, 58, 255, 107, 202, 55, 206, 57, 9, 103, 17, 34, 206, 195, 207, 114, 5, 73, 77, 198, 56, 136, 17, 227, 242, 231, 194, 135, 128, 48, 170, 189, 119, 186, 164, 117, 114, 108, 115, 145, 217, 99, 107, 105, 116, 115, 117, 110, 101, 45, 112, 114, 111, 120, 121, 58, 47, 47, 101, 83, 52, 86, 112, 54, 109, 118, 80, 48, 122, 116, 85, 101, 104, 114, 117, 113, 89, 52, 102, 66, 53, 101, 69, 98, 121, 48, 69, 66, 100, 89, 84, 50, 95, 67, 48, 69, 112, 77, 111, 76, 111, 47, 107, 105, 116, 115, 117, 110, 101, 45, 113, 117, 105, 99, 47, 104, 47, 49, 57, 50, 46, 49, 54, 56, 46, 49, 55, 56, 46, 54, 48, 47, 112, 47, 55, 55, 52, 52, 47, 45, 45, 172, 115, 105, 103, 110, 101, 100, 95, 97, 116, 95, 109, 115, 207, 0, 0, 1, 123, 233, 104, 189, 50, 176, 101, 120, 112, 105, 114, 101, 115, 95, 97, 102, 116, 101, 114, 95, 109, 115, 206, 0, 18, 79, 128, 169, 109, 101, 116, 97, 95, 105, 110, 102, 111, 196, 34, 129, 187, 100, 104, 116, 95, 115, 116, 111, 114, 97, 103, 101, 95, 97, 114, 99, 95, 104, 97, 108, 102, 95, 108, 101, 110, 103, 116, 104, 206, 128, 0, 0, 1] } }, { "agent": { "type": "Buffer", "data": [98, 187, 145, 48, 115, 209, 94, 143, 31, 153, 102, 69, 138, 29, 133, 213, 34, 52, 39, 164, 157, 139, 178, 111, 23, 33, 118, 250, 28, 155, 78, 246, 128, 49, 179, 38] }, "signature": { "type": "Buffer", "data": [233, 192, 38, 3, 59, 248, 124, 231, 57, 255, 40, 154, 50, 60, 119, 252, 68, 198, 154, 109, 175, 155, 106, 217, 211, 155, 109, 223, 249, 91, 221, 210, 17, 132, 72, 230, 11, 230, 247, 119, 72, 244, 145, 91, 75, 7, 67, 5, 130, 151, 44, 231, 52, 220, 28, 154, 212, 82, 58, 90, 203, 211, 236, 4] }, "agent_info": { "type": "Buffer", "data": [134, 165, 115, 112, 97, 99, 101, 196, 36, 203, 165, 212, 173, 24, 215, 165, 196, 25, 145, 248, 113, 246, 139, 205, 182, 241, 138, 57, 0, 26, 8, 217, 179, 23, 126, 59, 136, 128, 213, 110, 225, 173, 72, 197, 95, 165, 97, 103, 101, 110, 116, 196, 36, 98, 187, 145, 48, 115, 209, 94, 143, 31, 153, 102, 69, 138, 29, 133, 213, 34, 52, 39, 164, 157, 139, 178, 111, 23, 33, 118, 250, 28, 155, 78, 246, 128, 49, 179, 38, 164, 117, 114, 108, 115, 145, 217, 99, 107, 105, 116, 115, 117, 110, 101, 45, 112, 114, 111, 120, 121, 58, 47, 47, 55, 101, 77, 106, 48, 73, 83, 72, 56, 56, 81, 56, 45, 89, 51, 74, 89, 70, 53, 76, 72, 57, 83, 54, 68, 119, 71, 73, 49, 88, 45, 115, 87, 53, 68, 104, 66, 87, 121, 71, 119, 78, 115, 47, 107, 105, 116, 115, 117, 110, 101, 45, 113, 117, 105, 99, 47, 104, 47, 49, 57, 50, 46, 49, 54, 56, 46, 49, 55, 56, 46, 54, 48, 47, 112, 47, 55, 55, 52, 52, 47, 45, 45, 172, 115, 105, 103, 110, 101, 100, 95, 97, 116, 95, 109, 115, 207, 0, 0, 1, 123, 233, 103, 45, 197, 176, 101, 120, 112, 105, 114, 101, 115, 95, 97, 102, 116, 101, 114, 95, 109, 115, 206, 0, 18, 79, 128, 169, 109, 101, 116, 97, 95, 105, 110, 102, 111, 196, 34, 129, 187, 100, 104, 116, 95, 115, 116, 111, 114, 97, 103, 101, 95, 97, 114, 99, 95, 104, 97, 108, 102, 95, 108, 101, 110, 103, 116, 104, 206, 128, 0, 0, 1] } }, { "agent": { "type": "Buffer", "data": [181, 101, 115, 45, 214, 127, 198, 153, 159, 184, 30, 87, 67, 224, 208, 184, 203, 176, 130, 158, 236, 127, 153, 125, 243, 183, 188, 167, 154, 25, 118, 254, 101, 145, 210, 109] }, "signature": { "type": "Buffer", "data": [88, 189, 229, 122, 44, 171, 194, 156, 90, 79, 148, 49, 207, 224, 34, 199, 219, 88, 24, 243, 103, 127, 123, 41, 87, 171, 127, 92, 6, 216, 198, 171, 26, 226, 237, 217, 122, 78, 98, 146, 55, 255, 68, 240, 202, 83, 58, 140, 147, 185, 3, 66, 15, 216, 210, 22, 99, 197, 73, 234, 120, 17, 74, 1] }, "agent_info": { "type": "Buffer", "data": [134, 165, 115, 112, 97, 99, 101, 196, 36, 203, 165, 212, 173, 24, 215, 165, 196, 25, 145, 248, 113, 246, 139, 205, 182, 241, 138, 57, 0, 26, 8, 217, 179, 23, 126, 59, 136, 128, 213, 110, 225, 173, 72, 197, 95, 165, 97, 103, 101, 110, 116, 196, 36, 181, 101, 115, 45, 214, 127, 198, 153, 159, 184, 30, 87, 67, 224, 208, 184, 203, 176, 130, 158, 236, 127, 153, 125, 243, 183, 188, 167, 154, 25, 118, 254, 101, 145, 210, 109, 164, 117, 114, 108, 115, 145, 217, 99, 107, 105, 116, 115, 117, 110, 101, 45, 112, 114, 111, 120, 121, 58, 47, 47, 114, 70, 71, 83, 100, 113, 104, 101, 68, 107, 70, 70, 56, 69, 102, 109, 45, 69, 116, 55, 119, 81, 101, 120, 83, 88, 55, 65, 112, 69, 51, 89, 86, 99, 45, 120, 102, 52, 104, 106, 77, 115, 77, 47, 107, 105, 116, 115, 117, 110, 101, 45, 113, 117, 105, 99, 47, 104, 47, 49, 57, 50, 46, 49, 54, 56, 46, 49, 55, 56, 46, 54, 48, 47, 112, 47, 55, 55, 52, 52, 47, 45, 45, 172, 115, 105, 103, 110, 101, 100, 95, 97, 116, 95, 109, 115, 207, 0, 0, 1, 123, 233, 113, 23, 220, 176, 101, 120, 112, 105, 114, 101, 115, 95, 97, 102, 116, 101, 114, 95, 109, 115, 206, 0, 18, 79, 128, 169, 109, 101, 116, 97, 95, 105, 110, 102, 111, 196, 34, 129, 187, 100, 104, 116, 95, 115, 116, 111, 114, 97, 103, 101, 95, 97, 114, 99, 95, 104, 97, 108, 102, 95, 108, 101, 110, 103, 116, 104, 206, 128, 0, 0, 1] } }, { "agent": { "type": "Buffer", "data": [3, 171, 237, 107, 186, 245, 165, 47, 237, 235, 211, 49, 245, 62, 113, 53, 255, 252, 223, 226, 75, 118, 148, 187, 23, 53, 70, 174, 160, 184, 64, 63, 94, 210, 227, 56] }, "signature": { "type": "Buffer", "data": [129, 12, 55, 104, 239, 121, 138, 2, 86, 106, 136, 51, 219, 79, 170, 8, 195, 69, 81, 188, 225, 192, 247, 196, 54, 39, 164, 110, 75, 39, 240, 56, 245, 189, 154, 77, 72, 11, 97, 250, 202, 149, 242, 97, 128, 28, 47, 164, 236, 104, 136, 82, 212, 246, 44, 143, 132, 119, 255, 135, 112, 11, 20, 13] }, "agent_info": { "type": "Buffer", "data": [134, 165, 115, 112, 97, 99, 101, 196, 36, 203, 165, 212, 173, 24, 215, 165, 196, 25, 145, 248, 113, 246, 139, 205, 182, 241, 138, 57, 0, 26, 8, 217, 179, 23, 126, 59, 136, 128, 213, 110, 225, 173, 72, 197, 95, 165, 97, 103, 101, 110, 116, 196, 36, 3, 171, 237, 107, 186, 245, 165, 47, 237, 235, 211, 49, 245, 62, 113, 53, 255, 252, 223, 226, 75, 118, 148, 187, 23, 53, 70, 174, 160, 184, 64, 63, 94, 210, 227, 56, 164, 117, 114, 108, 115, 145, 217, 97, 107, 105, 116, 115, 117, 110, 101, 45, 112, 114, 111, 120, 121, 58, 47, 47, 104, 121, 112, 115, 86, 121, 103, 117, 80, 84, 115, 53, 118, 73, 80, 65, 102, 97, 112, 90, 88, 113, 117, 84, 115, 79, 80, 100, 67, 81, 79, 79, 117, 103, 57, 51, 82, 103, 106, 95, 114, 85, 73, 47, 107, 105, 116, 115, 117, 110, 101, 45, 113, 117, 105, 99, 47, 104, 47, 49, 54, 53, 46, 50, 50, 46, 51, 50, 46, 49, 49, 47, 112, 47, 53, 55, 55, 57, 47, 45, 45, 172, 115, 105, 103, 110, 101, 100, 95, 97, 116, 95, 109, 115, 207, 0, 0, 1, 123, 233, 113, 188, 123, 176, 101, 120, 112, 105, 114, 101, 115, 95, 97, 102, 116, 101, 114, 95, 109, 115, 206, 0, 18, 79, 128, 169, 109, 101, 116, 97, 95, 105, 110, 102, 111, 196, 34, 129, 187, 100, 104, 116, 95, 115, 116, 111, 114, 97, 103, 101, 95, 97, 114, 99, 95, 104, 97, 108, 102, 95, 108, 101, 110, 103, 116, 104, 206, 128, 0, 0, 1] } }]);
|
|
17142
17207
|
}
|
|
17208
|
+
runtimeGetNetworkMetrics() {
|
|
17209
|
+
return JSON.stringify({
|
|
17210
|
+
"metrics": {},
|
|
17211
|
+
"stats": {}
|
|
17212
|
+
});
|
|
17213
|
+
}
|
|
17214
|
+
runtimeRestartHolochain() {
|
|
17215
|
+
return true;
|
|
17216
|
+
}
|
|
17143
17217
|
runtimeHcAddAgentInfos(agentInfos) {
|
|
17144
17218
|
return true;
|
|
17145
17219
|
}
|
|
@@ -17276,6 +17350,13 @@ __decorate([
|
|
|
17276
17350
|
__metadata("design:paramtypes", []),
|
|
17277
17351
|
__metadata("design:returntype", Array)
|
|
17278
17352
|
], RuntimeResolver.prototype, "runtimeKnownLinkLanguageTemplates", null);
|
|
17353
|
+
__decorate([
|
|
17354
|
+
Query(),
|
|
17355
|
+
__param(0, Arg()),
|
|
17356
|
+
__metadata("design:type", Function),
|
|
17357
|
+
__metadata("design:paramtypes", [String]),
|
|
17358
|
+
__metadata("design:returntype", Array)
|
|
17359
|
+
], RuntimeResolver.prototype, "runtimeDebugStrings", null);
|
|
17279
17360
|
__decorate([
|
|
17280
17361
|
Mutation(),
|
|
17281
17362
|
__param(0, Arg()),
|
|
@@ -17316,6 +17397,18 @@ __decorate([
|
|
|
17316
17397
|
__metadata("design:paramtypes", []),
|
|
17317
17398
|
__metadata("design:returntype", String)
|
|
17318
17399
|
], RuntimeResolver.prototype, "runtimeHcAgentInfos", null);
|
|
17400
|
+
__decorate([
|
|
17401
|
+
Query(),
|
|
17402
|
+
__metadata("design:type", Function),
|
|
17403
|
+
__metadata("design:paramtypes", []),
|
|
17404
|
+
__metadata("design:returntype", String)
|
|
17405
|
+
], RuntimeResolver.prototype, "runtimeGetNetworkMetrics", null);
|
|
17406
|
+
__decorate([
|
|
17407
|
+
Mutation(),
|
|
17408
|
+
__metadata("design:type", Function),
|
|
17409
|
+
__metadata("design:paramtypes", []),
|
|
17410
|
+
__metadata("design:returntype", Boolean)
|
|
17411
|
+
], RuntimeResolver.prototype, "runtimeRestartHolochain", null);
|
|
17319
17412
|
__decorate([
|
|
17320
17413
|
Mutation(),
|
|
17321
17414
|
__param(0, Arg()),
|
package/lib/index.js
CHANGED
|
@@ -7184,6 +7184,36 @@ class RuntimeClient {
|
|
|
7184
7184
|
}));
|
|
7185
7185
|
return runtimeHcAgentInfos;
|
|
7186
7186
|
}
|
|
7187
|
+
async getNetworkMetrics() {
|
|
7188
|
+
const { runtimeGetNetworkMetrics } = unwrapApolloResult(await __classPrivateFieldGet$5(this, _RuntimeClient_apolloClient, "f").query({
|
|
7189
|
+
query: gql `query runtimeGetNetworkMetrics {
|
|
7190
|
+
runtimeGetNetworkMetrics
|
|
7191
|
+
}`,
|
|
7192
|
+
}));
|
|
7193
|
+
return runtimeGetNetworkMetrics;
|
|
7194
|
+
}
|
|
7195
|
+
async debugStrings(neighbourhoodUrl) {
|
|
7196
|
+
const { runtimeDebugStrings } = unwrapApolloResult(await __classPrivateFieldGet$5(this, _RuntimeClient_apolloClient, "f").query({
|
|
7197
|
+
query: gql `query runtimeDebugStrings($neighbourhoodUrl: String) {
|
|
7198
|
+
runtimeDebugStrings(neighbourhoodUrl: $neighbourhoodUrl) {
|
|
7199
|
+
neighbourhoodUrl
|
|
7200
|
+
debugString
|
|
7201
|
+
operation
|
|
7202
|
+
timestamp
|
|
7203
|
+
}
|
|
7204
|
+
}`,
|
|
7205
|
+
variables: { neighbourhoodUrl }
|
|
7206
|
+
}));
|
|
7207
|
+
return runtimeDebugStrings;
|
|
7208
|
+
}
|
|
7209
|
+
async restartHolochain() {
|
|
7210
|
+
const { runtimeRestartHolochain } = unwrapApolloResult(await __classPrivateFieldGet$5(this, _RuntimeClient_apolloClient, "f").mutate({
|
|
7211
|
+
mutation: gql `mutation runtimeRestartHolochain {
|
|
7212
|
+
runtimeRestartHolochain
|
|
7213
|
+
}`,
|
|
7214
|
+
}));
|
|
7215
|
+
return runtimeRestartHolochain;
|
|
7216
|
+
}
|
|
7187
7217
|
async hcAddAgentInfos(agentInfos) {
|
|
7188
7218
|
const { runtimeHcAddAgentInfos } = unwrapApolloResult(await __classPrivateFieldGet$5(this, _RuntimeClient_apolloClient, "f").mutate({
|
|
7189
7219
|
mutation: gql `mutation runtimeHcAddAgentInfos($agentInfos: String!) {
|
|
@@ -16349,6 +16379,13 @@ input CapabilityInput {
|
|
|
16349
16379
|
|
|
16350
16380
|
scalar DateTime
|
|
16351
16381
|
|
|
16382
|
+
type DebugStringEntry {
|
|
16383
|
+
debugString: String!
|
|
16384
|
+
neighbourhoodUrl: String!
|
|
16385
|
+
operation: String!
|
|
16386
|
+
timestamp: String!
|
|
16387
|
+
}
|
|
16388
|
+
|
|
16352
16389
|
type EntanglementProof {
|
|
16353
16390
|
deviceKey: String!
|
|
16354
16391
|
deviceKeySignedByDid: String!
|
|
@@ -16624,6 +16661,7 @@ type Mutation {
|
|
|
16624
16661
|
runtimeRemoveKnownLinkLanguageTemplates(addresses: [String!]!): [String!]!
|
|
16625
16662
|
runtimeRemoveNotification(id: String!): Boolean!
|
|
16626
16663
|
runtimeRequestInstallNotification(notification: NotificationInput!): String!
|
|
16664
|
+
runtimeRestartHolochain: Boolean!
|
|
16627
16665
|
runtimeSetStatus(status: PerspectiveInput!): Boolean!
|
|
16628
16666
|
runtimeUpdateNotification(id: String!, notification: NotificationInput!): Boolean!
|
|
16629
16667
|
}
|
|
@@ -16724,8 +16762,10 @@ type Query {
|
|
|
16724
16762
|
perspectiveQueryProlog(query: String!, uuid: String!): String!
|
|
16725
16763
|
perspectiveSnapshot(uuid: String!): Perspective
|
|
16726
16764
|
perspectives: [PerspectiveHandle!]!
|
|
16765
|
+
runtimeDebugStrings(neighbourhoodUrl: String): [DebugStringEntry!]!
|
|
16727
16766
|
runtimeFriendStatus(did: String!): PerspectiveExpression
|
|
16728
16767
|
runtimeFriends: [String!]!
|
|
16768
|
+
runtimeGetNetworkMetrics: String!
|
|
16729
16769
|
runtimeHcAgentInfos: String!
|
|
16730
16770
|
runtimeInfo: RuntimeInfo!
|
|
16731
16771
|
runtimeKnownLinkLanguageTemplates: [String!]!
|
|
@@ -17012,6 +17052,27 @@ __decorate([
|
|
|
17012
17052
|
TriggeredNotification = __decorate([
|
|
17013
17053
|
ObjectType()
|
|
17014
17054
|
], TriggeredNotification);
|
|
17055
|
+
let DebugStringEntry = class DebugStringEntry {
|
|
17056
|
+
};
|
|
17057
|
+
__decorate([
|
|
17058
|
+
Field(),
|
|
17059
|
+
__metadata("design:type", String)
|
|
17060
|
+
], DebugStringEntry.prototype, "neighbourhoodUrl", void 0);
|
|
17061
|
+
__decorate([
|
|
17062
|
+
Field(),
|
|
17063
|
+
__metadata("design:type", String)
|
|
17064
|
+
], DebugStringEntry.prototype, "debugString", void 0);
|
|
17065
|
+
__decorate([
|
|
17066
|
+
Field(),
|
|
17067
|
+
__metadata("design:type", String)
|
|
17068
|
+
], DebugStringEntry.prototype, "operation", void 0);
|
|
17069
|
+
__decorate([
|
|
17070
|
+
Field(),
|
|
17071
|
+
__metadata("design:type", String)
|
|
17072
|
+
], DebugStringEntry.prototype, "timestamp", void 0);
|
|
17073
|
+
DebugStringEntry = __decorate([
|
|
17074
|
+
ObjectType()
|
|
17075
|
+
], DebugStringEntry);
|
|
17015
17076
|
let ImportStats = class ImportStats {
|
|
17016
17077
|
};
|
|
17017
17078
|
__decorate([
|
|
@@ -17118,6 +17179,10 @@ let RuntimeResolver = class RuntimeResolver {
|
|
|
17118
17179
|
runtimeKnownLinkLanguageTemplates() {
|
|
17119
17180
|
return ["Qm12345abcdef"];
|
|
17120
17181
|
}
|
|
17182
|
+
runtimeDebugStrings(neighbourhoodUrl) {
|
|
17183
|
+
// Real implementation will be provided by the executor
|
|
17184
|
+
return [];
|
|
17185
|
+
}
|
|
17121
17186
|
runtimeAddKnownLinkLanguageTemplates(addresses) {
|
|
17122
17187
|
return addresses;
|
|
17123
17188
|
}
|
|
@@ -17136,6 +17201,15 @@ let RuntimeResolver = class RuntimeResolver {
|
|
|
17136
17201
|
runtimeHcAgentInfos() {
|
|
17137
17202
|
return JSON.stringify([{ "agent": { "type": "Buffer", "data": [9, 191, 231, 58, 255, 107, 202, 55, 206, 57, 9, 103, 17, 34, 206, 195, 207, 114, 5, 73, 77, 198, 56, 136, 17, 227, 242, 231, 194, 135, 128, 48, 170, 189, 119, 186] }, "signature": { "type": "Buffer", "data": [195, 143, 170, 36, 234, 123, 255, 85, 188, 138, 124, 2, 91, 18, 53, 231, 44, 41, 240, 8, 80, 131, 100, 150, 165, 125, 146, 90, 17, 200, 190, 129, 114, 211, 11, 146, 150, 128, 198, 199, 79, 118, 157, 101, 194, 68, 58, 245, 98, 182, 79, 139, 140, 41, 143, 129, 8, 136, 87, 77, 180, 231, 218, 11] }, "agent_info": { "type": "Buffer", "data": [134, 165, 115, 112, 97, 99, 101, 196, 36, 203, 165, 212, 173, 24, 215, 165, 196, 25, 145, 248, 113, 246, 139, 205, 182, 241, 138, 57, 0, 26, 8, 217, 179, 23, 126, 59, 136, 128, 213, 110, 225, 173, 72, 197, 95, 165, 97, 103, 101, 110, 116, 196, 36, 9, 191, 231, 58, 255, 107, 202, 55, 206, 57, 9, 103, 17, 34, 206, 195, 207, 114, 5, 73, 77, 198, 56, 136, 17, 227, 242, 231, 194, 135, 128, 48, 170, 189, 119, 186, 164, 117, 114, 108, 115, 145, 217, 99, 107, 105, 116, 115, 117, 110, 101, 45, 112, 114, 111, 120, 121, 58, 47, 47, 101, 83, 52, 86, 112, 54, 109, 118, 80, 48, 122, 116, 85, 101, 104, 114, 117, 113, 89, 52, 102, 66, 53, 101, 69, 98, 121, 48, 69, 66, 100, 89, 84, 50, 95, 67, 48, 69, 112, 77, 111, 76, 111, 47, 107, 105, 116, 115, 117, 110, 101, 45, 113, 117, 105, 99, 47, 104, 47, 49, 57, 50, 46, 49, 54, 56, 46, 49, 55, 56, 46, 54, 48, 47, 112, 47, 55, 55, 52, 52, 47, 45, 45, 172, 115, 105, 103, 110, 101, 100, 95, 97, 116, 95, 109, 115, 207, 0, 0, 1, 123, 233, 104, 189, 50, 176, 101, 120, 112, 105, 114, 101, 115, 95, 97, 102, 116, 101, 114, 95, 109, 115, 206, 0, 18, 79, 128, 169, 109, 101, 116, 97, 95, 105, 110, 102, 111, 196, 34, 129, 187, 100, 104, 116, 95, 115, 116, 111, 114, 97, 103, 101, 95, 97, 114, 99, 95, 104, 97, 108, 102, 95, 108, 101, 110, 103, 116, 104, 206, 128, 0, 0, 1] } }, { "agent": { "type": "Buffer", "data": [98, 187, 145, 48, 115, 209, 94, 143, 31, 153, 102, 69, 138, 29, 133, 213, 34, 52, 39, 164, 157, 139, 178, 111, 23, 33, 118, 250, 28, 155, 78, 246, 128, 49, 179, 38] }, "signature": { "type": "Buffer", "data": [233, 192, 38, 3, 59, 248, 124, 231, 57, 255, 40, 154, 50, 60, 119, 252, 68, 198, 154, 109, 175, 155, 106, 217, 211, 155, 109, 223, 249, 91, 221, 210, 17, 132, 72, 230, 11, 230, 247, 119, 72, 244, 145, 91, 75, 7, 67, 5, 130, 151, 44, 231, 52, 220, 28, 154, 212, 82, 58, 90, 203, 211, 236, 4] }, "agent_info": { "type": "Buffer", "data": [134, 165, 115, 112, 97, 99, 101, 196, 36, 203, 165, 212, 173, 24, 215, 165, 196, 25, 145, 248, 113, 246, 139, 205, 182, 241, 138, 57, 0, 26, 8, 217, 179, 23, 126, 59, 136, 128, 213, 110, 225, 173, 72, 197, 95, 165, 97, 103, 101, 110, 116, 196, 36, 98, 187, 145, 48, 115, 209, 94, 143, 31, 153, 102, 69, 138, 29, 133, 213, 34, 52, 39, 164, 157, 139, 178, 111, 23, 33, 118, 250, 28, 155, 78, 246, 128, 49, 179, 38, 164, 117, 114, 108, 115, 145, 217, 99, 107, 105, 116, 115, 117, 110, 101, 45, 112, 114, 111, 120, 121, 58, 47, 47, 55, 101, 77, 106, 48, 73, 83, 72, 56, 56, 81, 56, 45, 89, 51, 74, 89, 70, 53, 76, 72, 57, 83, 54, 68, 119, 71, 73, 49, 88, 45, 115, 87, 53, 68, 104, 66, 87, 121, 71, 119, 78, 115, 47, 107, 105, 116, 115, 117, 110, 101, 45, 113, 117, 105, 99, 47, 104, 47, 49, 57, 50, 46, 49, 54, 56, 46, 49, 55, 56, 46, 54, 48, 47, 112, 47, 55, 55, 52, 52, 47, 45, 45, 172, 115, 105, 103, 110, 101, 100, 95, 97, 116, 95, 109, 115, 207, 0, 0, 1, 123, 233, 103, 45, 197, 176, 101, 120, 112, 105, 114, 101, 115, 95, 97, 102, 116, 101, 114, 95, 109, 115, 206, 0, 18, 79, 128, 169, 109, 101, 116, 97, 95, 105, 110, 102, 111, 196, 34, 129, 187, 100, 104, 116, 95, 115, 116, 111, 114, 97, 103, 101, 95, 97, 114, 99, 95, 104, 97, 108, 102, 95, 108, 101, 110, 103, 116, 104, 206, 128, 0, 0, 1] } }, { "agent": { "type": "Buffer", "data": [181, 101, 115, 45, 214, 127, 198, 153, 159, 184, 30, 87, 67, 224, 208, 184, 203, 176, 130, 158, 236, 127, 153, 125, 243, 183, 188, 167, 154, 25, 118, 254, 101, 145, 210, 109] }, "signature": { "type": "Buffer", "data": [88, 189, 229, 122, 44, 171, 194, 156, 90, 79, 148, 49, 207, 224, 34, 199, 219, 88, 24, 243, 103, 127, 123, 41, 87, 171, 127, 92, 6, 216, 198, 171, 26, 226, 237, 217, 122, 78, 98, 146, 55, 255, 68, 240, 202, 83, 58, 140, 147, 185, 3, 66, 15, 216, 210, 22, 99, 197, 73, 234, 120, 17, 74, 1] }, "agent_info": { "type": "Buffer", "data": [134, 165, 115, 112, 97, 99, 101, 196, 36, 203, 165, 212, 173, 24, 215, 165, 196, 25, 145, 248, 113, 246, 139, 205, 182, 241, 138, 57, 0, 26, 8, 217, 179, 23, 126, 59, 136, 128, 213, 110, 225, 173, 72, 197, 95, 165, 97, 103, 101, 110, 116, 196, 36, 181, 101, 115, 45, 214, 127, 198, 153, 159, 184, 30, 87, 67, 224, 208, 184, 203, 176, 130, 158, 236, 127, 153, 125, 243, 183, 188, 167, 154, 25, 118, 254, 101, 145, 210, 109, 164, 117, 114, 108, 115, 145, 217, 99, 107, 105, 116, 115, 117, 110, 101, 45, 112, 114, 111, 120, 121, 58, 47, 47, 114, 70, 71, 83, 100, 113, 104, 101, 68, 107, 70, 70, 56, 69, 102, 109, 45, 69, 116, 55, 119, 81, 101, 120, 83, 88, 55, 65, 112, 69, 51, 89, 86, 99, 45, 120, 102, 52, 104, 106, 77, 115, 77, 47, 107, 105, 116, 115, 117, 110, 101, 45, 113, 117, 105, 99, 47, 104, 47, 49, 57, 50, 46, 49, 54, 56, 46, 49, 55, 56, 46, 54, 48, 47, 112, 47, 55, 55, 52, 52, 47, 45, 45, 172, 115, 105, 103, 110, 101, 100, 95, 97, 116, 95, 109, 115, 207, 0, 0, 1, 123, 233, 113, 23, 220, 176, 101, 120, 112, 105, 114, 101, 115, 95, 97, 102, 116, 101, 114, 95, 109, 115, 206, 0, 18, 79, 128, 169, 109, 101, 116, 97, 95, 105, 110, 102, 111, 196, 34, 129, 187, 100, 104, 116, 95, 115, 116, 111, 114, 97, 103, 101, 95, 97, 114, 99, 95, 104, 97, 108, 102, 95, 108, 101, 110, 103, 116, 104, 206, 128, 0, 0, 1] } }, { "agent": { "type": "Buffer", "data": [3, 171, 237, 107, 186, 245, 165, 47, 237, 235, 211, 49, 245, 62, 113, 53, 255, 252, 223, 226, 75, 118, 148, 187, 23, 53, 70, 174, 160, 184, 64, 63, 94, 210, 227, 56] }, "signature": { "type": "Buffer", "data": [129, 12, 55, 104, 239, 121, 138, 2, 86, 106, 136, 51, 219, 79, 170, 8, 195, 69, 81, 188, 225, 192, 247, 196, 54, 39, 164, 110, 75, 39, 240, 56, 245, 189, 154, 77, 72, 11, 97, 250, 202, 149, 242, 97, 128, 28, 47, 164, 236, 104, 136, 82, 212, 246, 44, 143, 132, 119, 255, 135, 112, 11, 20, 13] }, "agent_info": { "type": "Buffer", "data": [134, 165, 115, 112, 97, 99, 101, 196, 36, 203, 165, 212, 173, 24, 215, 165, 196, 25, 145, 248, 113, 246, 139, 205, 182, 241, 138, 57, 0, 26, 8, 217, 179, 23, 126, 59, 136, 128, 213, 110, 225, 173, 72, 197, 95, 165, 97, 103, 101, 110, 116, 196, 36, 3, 171, 237, 107, 186, 245, 165, 47, 237, 235, 211, 49, 245, 62, 113, 53, 255, 252, 223, 226, 75, 118, 148, 187, 23, 53, 70, 174, 160, 184, 64, 63, 94, 210, 227, 56, 164, 117, 114, 108, 115, 145, 217, 97, 107, 105, 116, 115, 117, 110, 101, 45, 112, 114, 111, 120, 121, 58, 47, 47, 104, 121, 112, 115, 86, 121, 103, 117, 80, 84, 115, 53, 118, 73, 80, 65, 102, 97, 112, 90, 88, 113, 117, 84, 115, 79, 80, 100, 67, 81, 79, 79, 117, 103, 57, 51, 82, 103, 106, 95, 114, 85, 73, 47, 107, 105, 116, 115, 117, 110, 101, 45, 113, 117, 105, 99, 47, 104, 47, 49, 54, 53, 46, 50, 50, 46, 51, 50, 46, 49, 49, 47, 112, 47, 53, 55, 55, 57, 47, 45, 45, 172, 115, 105, 103, 110, 101, 100, 95, 97, 116, 95, 109, 115, 207, 0, 0, 1, 123, 233, 113, 188, 123, 176, 101, 120, 112, 105, 114, 101, 115, 95, 97, 102, 116, 101, 114, 95, 109, 115, 206, 0, 18, 79, 128, 169, 109, 101, 116, 97, 95, 105, 110, 102, 111, 196, 34, 129, 187, 100, 104, 116, 95, 115, 116, 111, 114, 97, 103, 101, 95, 97, 114, 99, 95, 104, 97, 108, 102, 95, 108, 101, 110, 103, 116, 104, 206, 128, 0, 0, 1] } }]);
|
|
17138
17203
|
}
|
|
17204
|
+
runtimeGetNetworkMetrics() {
|
|
17205
|
+
return JSON.stringify({
|
|
17206
|
+
"metrics": {},
|
|
17207
|
+
"stats": {}
|
|
17208
|
+
});
|
|
17209
|
+
}
|
|
17210
|
+
runtimeRestartHolochain() {
|
|
17211
|
+
return true;
|
|
17212
|
+
}
|
|
17139
17213
|
runtimeHcAddAgentInfos(agentInfos) {
|
|
17140
17214
|
return true;
|
|
17141
17215
|
}
|
|
@@ -17272,6 +17346,13 @@ __decorate([
|
|
|
17272
17346
|
__metadata("design:paramtypes", []),
|
|
17273
17347
|
__metadata("design:returntype", Array)
|
|
17274
17348
|
], RuntimeResolver.prototype, "runtimeKnownLinkLanguageTemplates", null);
|
|
17349
|
+
__decorate([
|
|
17350
|
+
Query(),
|
|
17351
|
+
__param(0, Arg()),
|
|
17352
|
+
__metadata("design:type", Function),
|
|
17353
|
+
__metadata("design:paramtypes", [String]),
|
|
17354
|
+
__metadata("design:returntype", Array)
|
|
17355
|
+
], RuntimeResolver.prototype, "runtimeDebugStrings", null);
|
|
17275
17356
|
__decorate([
|
|
17276
17357
|
Mutation(),
|
|
17277
17358
|
__param(0, Arg()),
|
|
@@ -17312,6 +17393,18 @@ __decorate([
|
|
|
17312
17393
|
__metadata("design:paramtypes", []),
|
|
17313
17394
|
__metadata("design:returntype", String)
|
|
17314
17395
|
], RuntimeResolver.prototype, "runtimeHcAgentInfos", null);
|
|
17396
|
+
__decorate([
|
|
17397
|
+
Query(),
|
|
17398
|
+
__metadata("design:type", Function),
|
|
17399
|
+
__metadata("design:paramtypes", []),
|
|
17400
|
+
__metadata("design:returntype", String)
|
|
17401
|
+
], RuntimeResolver.prototype, "runtimeGetNetworkMetrics", null);
|
|
17402
|
+
__decorate([
|
|
17403
|
+
Mutation(),
|
|
17404
|
+
__metadata("design:type", Function),
|
|
17405
|
+
__metadata("design:paramtypes", []),
|
|
17406
|
+
__metadata("design:returntype", Boolean)
|
|
17407
|
+
], RuntimeResolver.prototype, "runtimeRestartHolochain", null);
|
|
17315
17408
|
__decorate([
|
|
17316
17409
|
Mutation(),
|
|
17317
17410
|
__param(0, Arg()),
|
|
@@ -18539,4 +18632,4 @@ class ModelQueryBuilder {
|
|
|
18539
18632
|
}
|
|
18540
18633
|
}
|
|
18541
18634
|
|
|
18542
|
-
export { AIClient, AIModelLoadingStatus, AIPromptExamples, AIPromptExamplesInput, AITask, AITaskInput, Ad4mClient, Ad4mModel, Agent, AgentClient, AgentExpression, AgentSignature, AgentStatus, Apps, AuthInfo, AuthInfoInput, Capability, CapabilityInput, Collection, Dna, EntanglementProof, EntanglementProofInput, ExceptionInfo, ExceptionType, Expression, ExpressionGeneric, ExpressionGenericInput, ExpressionProof, ExpressionProofInput, ExpressionRef, ExpressionRendered, Flag, Icon, ImportResult, ImportStats, InstanceQuery, InteractionCall, InteractionMeta, InteractionParameter, LanguageExpression, LanguageHandle, LanguageLanguageInput, LanguageMeta, LanguageMetaInput, LanguageMetaInternal, LanguageRef, Link, LinkExpression, LinkExpressionInput, LinkExpressionMutations, LinkExpressionUpdated, LinkInput, LinkMutations, LinkQuery, Literal, ModelOptions, ModelQueryBuilder, Neighbourhood, NeighbourhoodExpression, NeighbourhoodProxy, Notification, NotificationInput, OnlineAgent, Optional, Perspective, PerspectiveAction, PerspectiveDiff, PerspectiveDiffExpression, PerspectiveExpression, PerspectiveHandle, PerspectiveInput, PerspectiveProxy, PerspectiveState, PerspectiveUnsignedInput, Property, QuerySubscriptionProxy, ReadOnly, Resource, ResourceInput, RuntimeInfo, SMART_LITERAL_CONTENT_PREDICATE, SentMessage, SmartLiteral, Subject, TriggeredNotification, addLink, capSentence, exprRef2String, formatList, hasLink, isExpression, isLink, linkEqual, makeRandomPrologAtom, parseExprUrl, typeDefsString };
|
|
18635
|
+
export { AIClient, AIModelLoadingStatus, AIPromptExamples, AIPromptExamplesInput, AITask, AITaskInput, Ad4mClient, Ad4mModel, Agent, AgentClient, AgentExpression, AgentSignature, AgentStatus, Apps, AuthInfo, AuthInfoInput, Capability, CapabilityInput, Collection, DebugStringEntry, Dna, EntanglementProof, EntanglementProofInput, ExceptionInfo, ExceptionType, Expression, ExpressionGeneric, ExpressionGenericInput, ExpressionProof, ExpressionProofInput, ExpressionRef, ExpressionRendered, Flag, Icon, ImportResult, ImportStats, InstanceQuery, InteractionCall, InteractionMeta, InteractionParameter, LanguageExpression, LanguageHandle, LanguageLanguageInput, LanguageMeta, LanguageMetaInput, LanguageMetaInternal, LanguageRef, Link, LinkExpression, LinkExpressionInput, LinkExpressionMutations, LinkExpressionUpdated, LinkInput, LinkMutations, LinkQuery, Literal, ModelOptions, ModelQueryBuilder, Neighbourhood, NeighbourhoodExpression, NeighbourhoodProxy, Notification, NotificationInput, OnlineAgent, Optional, Perspective, PerspectiveAction, PerspectiveDiff, PerspectiveDiffExpression, PerspectiveExpression, PerspectiveHandle, PerspectiveInput, PerspectiveProxy, PerspectiveState, PerspectiveUnsignedInput, Property, QuerySubscriptionProxy, ReadOnly, Resource, ResourceInput, RuntimeInfo, SMART_LITERAL_CONTENT_PREDICATE, SentMessage, SmartLiteral, Subject, TriggeredNotification, addLink, capSentence, exprRef2String, formatList, hasLink, isExpression, isLink, linkEqual, makeRandomPrologAtom, parseExprUrl, typeDefsString };
|
|
@@ -118,6 +118,7 @@ export interface GetAllAdapter {
|
|
|
118
118
|
}
|
|
119
119
|
export type PerspectiveDiffObserver = (diff: PerspectiveDiff) => void;
|
|
120
120
|
export type SyncStateChangeObserver = (state: PerspectiveState) => void;
|
|
121
|
+
export type DebugStringObserver = (debugString: string, operation: string) => void;
|
|
121
122
|
/** Interface for "Link Languages" that facilitate the synchronization
|
|
122
123
|
* between agents' local Perspectives inside a Neighbourhood.
|
|
123
124
|
* The assumption is that every version of the shared Perspective
|
|
@@ -148,6 +149,8 @@ export interface LinkSyncAdapter {
|
|
|
148
149
|
addCallback(callback: PerspectiveDiffObserver): any;
|
|
149
150
|
/** Add a sync state callback method */
|
|
150
151
|
addSyncStateChangeCallback(callback: SyncStateChangeObserver): any;
|
|
152
|
+
/** Add a debug string callback method for capturing internal debug information */
|
|
153
|
+
addDebugStringCallback?(callback: DebugStringObserver): any;
|
|
151
154
|
}
|
|
152
155
|
export type MessageCallback = (message: PerspectiveExpression) => void;
|
|
153
156
|
export type StatusCallback = (caller: DID) => Perspective;
|
|
@@ -21,6 +21,9 @@ export declare class RuntimeClient {
|
|
|
21
21
|
removeFriends(dids: string[]): Promise<string[]>;
|
|
22
22
|
friends(): Promise<string[]>;
|
|
23
23
|
hcAgentInfos(): Promise<String>;
|
|
24
|
+
getNetworkMetrics(): Promise<String>;
|
|
25
|
+
debugStrings(neighbourhoodUrl?: string): Promise<any[]>;
|
|
26
|
+
restartHolochain(): Promise<Boolean>;
|
|
24
27
|
hcAddAgentInfos(agentInfos: String): Promise<void>;
|
|
25
28
|
verifyStringSignedByDid(did: string, didSigningKeyId: string, data: string, signedData: string): Promise<boolean>;
|
|
26
29
|
setStatus(perspective: Perspective): Promise<boolean>;
|
|
@@ -175,6 +175,36 @@ export class RuntimeClient {
|
|
|
175
175
|
}));
|
|
176
176
|
return runtimeHcAgentInfos;
|
|
177
177
|
}
|
|
178
|
+
async getNetworkMetrics() {
|
|
179
|
+
const { runtimeGetNetworkMetrics } = unwrapApolloResult(await __classPrivateFieldGet(this, _RuntimeClient_apolloClient, "f").query({
|
|
180
|
+
query: gql `query runtimeGetNetworkMetrics {
|
|
181
|
+
runtimeGetNetworkMetrics
|
|
182
|
+
}`,
|
|
183
|
+
}));
|
|
184
|
+
return runtimeGetNetworkMetrics;
|
|
185
|
+
}
|
|
186
|
+
async debugStrings(neighbourhoodUrl) {
|
|
187
|
+
const { runtimeDebugStrings } = unwrapApolloResult(await __classPrivateFieldGet(this, _RuntimeClient_apolloClient, "f").query({
|
|
188
|
+
query: gql `query runtimeDebugStrings($neighbourhoodUrl: String) {
|
|
189
|
+
runtimeDebugStrings(neighbourhoodUrl: $neighbourhoodUrl) {
|
|
190
|
+
neighbourhoodUrl
|
|
191
|
+
debugString
|
|
192
|
+
operation
|
|
193
|
+
timestamp
|
|
194
|
+
}
|
|
195
|
+
}`,
|
|
196
|
+
variables: { neighbourhoodUrl }
|
|
197
|
+
}));
|
|
198
|
+
return runtimeDebugStrings;
|
|
199
|
+
}
|
|
200
|
+
async restartHolochain() {
|
|
201
|
+
const { runtimeRestartHolochain } = unwrapApolloResult(await __classPrivateFieldGet(this, _RuntimeClient_apolloClient, "f").mutate({
|
|
202
|
+
mutation: gql `mutation runtimeRestartHolochain {
|
|
203
|
+
runtimeRestartHolochain
|
|
204
|
+
}`,
|
|
205
|
+
}));
|
|
206
|
+
return runtimeRestartHolochain;
|
|
207
|
+
}
|
|
178
208
|
async hcAddAgentInfos(agentInfos) {
|
|
179
209
|
const { runtimeHcAddAgentInfos } = unwrapApolloResult(await __classPrivateFieldGet(this, _RuntimeClient_apolloClient, "f").mutate({
|
|
180
210
|
mutation: gql `mutation runtimeHcAddAgentInfos($agentInfos: String!) {
|
|
@@ -42,6 +42,12 @@ export declare class TriggeredNotification {
|
|
|
42
42
|
perspectiveId: string;
|
|
43
43
|
triggerMatch: string;
|
|
44
44
|
}
|
|
45
|
+
export declare class DebugStringEntry {
|
|
46
|
+
neighbourhoodUrl: string;
|
|
47
|
+
debugString: string;
|
|
48
|
+
operation: string;
|
|
49
|
+
timestamp: string;
|
|
50
|
+
}
|
|
45
51
|
export declare class ImportStats {
|
|
46
52
|
total: number;
|
|
47
53
|
imported: number;
|
|
@@ -76,12 +82,15 @@ export default class RuntimeResolver {
|
|
|
76
82
|
deleteTrustedAgents(agents: string[]): string[];
|
|
77
83
|
getTrustedAgents(): string[];
|
|
78
84
|
runtimeKnownLinkLanguageTemplates(): string[];
|
|
85
|
+
runtimeDebugStrings(neighbourhoodUrl?: string): DebugStringEntry[];
|
|
79
86
|
runtimeAddKnownLinkLanguageTemplates(addresses: string[]): string[];
|
|
80
87
|
runtimeRemoveKnownLinkLanguageTemplates(addresses: string[]): string[];
|
|
81
88
|
runtimeFriends(): string[];
|
|
82
89
|
runtimeAddFriends(dids: string[]): string[];
|
|
83
90
|
runtimeRemoveFriends(dids: string[]): string[];
|
|
84
91
|
runtimeHcAgentInfos(): String;
|
|
92
|
+
runtimeGetNetworkMetrics(): String;
|
|
93
|
+
runtimeRestartHolochain(): Boolean;
|
|
85
94
|
runtimeHcAddAgentInfos(agentInfos: any): boolean;
|
|
86
95
|
runtimeVerifyStringSignedByDid(did: string, didSigningKeyId: string, data: string, signedData: string): boolean;
|
|
87
96
|
runtimeSetStatus(status: Perspective): boolean;
|
|
@@ -194,6 +194,28 @@ TriggeredNotification = __decorate([
|
|
|
194
194
|
ObjectType()
|
|
195
195
|
], TriggeredNotification);
|
|
196
196
|
export { TriggeredNotification };
|
|
197
|
+
let DebugStringEntry = class DebugStringEntry {
|
|
198
|
+
};
|
|
199
|
+
__decorate([
|
|
200
|
+
Field(),
|
|
201
|
+
__metadata("design:type", String)
|
|
202
|
+
], DebugStringEntry.prototype, "neighbourhoodUrl", void 0);
|
|
203
|
+
__decorate([
|
|
204
|
+
Field(),
|
|
205
|
+
__metadata("design:type", String)
|
|
206
|
+
], DebugStringEntry.prototype, "debugString", void 0);
|
|
207
|
+
__decorate([
|
|
208
|
+
Field(),
|
|
209
|
+
__metadata("design:type", String)
|
|
210
|
+
], DebugStringEntry.prototype, "operation", void 0);
|
|
211
|
+
__decorate([
|
|
212
|
+
Field(),
|
|
213
|
+
__metadata("design:type", String)
|
|
214
|
+
], DebugStringEntry.prototype, "timestamp", void 0);
|
|
215
|
+
DebugStringEntry = __decorate([
|
|
216
|
+
ObjectType()
|
|
217
|
+
], DebugStringEntry);
|
|
218
|
+
export { DebugStringEntry };
|
|
197
219
|
let ImportStats = class ImportStats {
|
|
198
220
|
};
|
|
199
221
|
__decorate([
|
|
@@ -302,6 +324,10 @@ let RuntimeResolver = class RuntimeResolver {
|
|
|
302
324
|
runtimeKnownLinkLanguageTemplates() {
|
|
303
325
|
return ["Qm12345abcdef"];
|
|
304
326
|
}
|
|
327
|
+
runtimeDebugStrings(neighbourhoodUrl) {
|
|
328
|
+
// Real implementation will be provided by the executor
|
|
329
|
+
return [];
|
|
330
|
+
}
|
|
305
331
|
runtimeAddKnownLinkLanguageTemplates(addresses) {
|
|
306
332
|
return addresses;
|
|
307
333
|
}
|
|
@@ -320,6 +346,15 @@ let RuntimeResolver = class RuntimeResolver {
|
|
|
320
346
|
runtimeHcAgentInfos() {
|
|
321
347
|
return JSON.stringify([{ "agent": { "type": "Buffer", "data": [9, 191, 231, 58, 255, 107, 202, 55, 206, 57, 9, 103, 17, 34, 206, 195, 207, 114, 5, 73, 77, 198, 56, 136, 17, 227, 242, 231, 194, 135, 128, 48, 170, 189, 119, 186] }, "signature": { "type": "Buffer", "data": [195, 143, 170, 36, 234, 123, 255, 85, 188, 138, 124, 2, 91, 18, 53, 231, 44, 41, 240, 8, 80, 131, 100, 150, 165, 125, 146, 90, 17, 200, 190, 129, 114, 211, 11, 146, 150, 128, 198, 199, 79, 118, 157, 101, 194, 68, 58, 245, 98, 182, 79, 139, 140, 41, 143, 129, 8, 136, 87, 77, 180, 231, 218, 11] }, "agent_info": { "type": "Buffer", "data": [134, 165, 115, 112, 97, 99, 101, 196, 36, 203, 165, 212, 173, 24, 215, 165, 196, 25, 145, 248, 113, 246, 139, 205, 182, 241, 138, 57, 0, 26, 8, 217, 179, 23, 126, 59, 136, 128, 213, 110, 225, 173, 72, 197, 95, 165, 97, 103, 101, 110, 116, 196, 36, 9, 191, 231, 58, 255, 107, 202, 55, 206, 57, 9, 103, 17, 34, 206, 195, 207, 114, 5, 73, 77, 198, 56, 136, 17, 227, 242, 231, 194, 135, 128, 48, 170, 189, 119, 186, 164, 117, 114, 108, 115, 145, 217, 99, 107, 105, 116, 115, 117, 110, 101, 45, 112, 114, 111, 120, 121, 58, 47, 47, 101, 83, 52, 86, 112, 54, 109, 118, 80, 48, 122, 116, 85, 101, 104, 114, 117, 113, 89, 52, 102, 66, 53, 101, 69, 98, 121, 48, 69, 66, 100, 89, 84, 50, 95, 67, 48, 69, 112, 77, 111, 76, 111, 47, 107, 105, 116, 115, 117, 110, 101, 45, 113, 117, 105, 99, 47, 104, 47, 49, 57, 50, 46, 49, 54, 56, 46, 49, 55, 56, 46, 54, 48, 47, 112, 47, 55, 55, 52, 52, 47, 45, 45, 172, 115, 105, 103, 110, 101, 100, 95, 97, 116, 95, 109, 115, 207, 0, 0, 1, 123, 233, 104, 189, 50, 176, 101, 120, 112, 105, 114, 101, 115, 95, 97, 102, 116, 101, 114, 95, 109, 115, 206, 0, 18, 79, 128, 169, 109, 101, 116, 97, 95, 105, 110, 102, 111, 196, 34, 129, 187, 100, 104, 116, 95, 115, 116, 111, 114, 97, 103, 101, 95, 97, 114, 99, 95, 104, 97, 108, 102, 95, 108, 101, 110, 103, 116, 104, 206, 128, 0, 0, 1] } }, { "agent": { "type": "Buffer", "data": [98, 187, 145, 48, 115, 209, 94, 143, 31, 153, 102, 69, 138, 29, 133, 213, 34, 52, 39, 164, 157, 139, 178, 111, 23, 33, 118, 250, 28, 155, 78, 246, 128, 49, 179, 38] }, "signature": { "type": "Buffer", "data": [233, 192, 38, 3, 59, 248, 124, 231, 57, 255, 40, 154, 50, 60, 119, 252, 68, 198, 154, 109, 175, 155, 106, 217, 211, 155, 109, 223, 249, 91, 221, 210, 17, 132, 72, 230, 11, 230, 247, 119, 72, 244, 145, 91, 75, 7, 67, 5, 130, 151, 44, 231, 52, 220, 28, 154, 212, 82, 58, 90, 203, 211, 236, 4] }, "agent_info": { "type": "Buffer", "data": [134, 165, 115, 112, 97, 99, 101, 196, 36, 203, 165, 212, 173, 24, 215, 165, 196, 25, 145, 248, 113, 246, 139, 205, 182, 241, 138, 57, 0, 26, 8, 217, 179, 23, 126, 59, 136, 128, 213, 110, 225, 173, 72, 197, 95, 165, 97, 103, 101, 110, 116, 196, 36, 98, 187, 145, 48, 115, 209, 94, 143, 31, 153, 102, 69, 138, 29, 133, 213, 34, 52, 39, 164, 157, 139, 178, 111, 23, 33, 118, 250, 28, 155, 78, 246, 128, 49, 179, 38, 164, 117, 114, 108, 115, 145, 217, 99, 107, 105, 116, 115, 117, 110, 101, 45, 112, 114, 111, 120, 121, 58, 47, 47, 55, 101, 77, 106, 48, 73, 83, 72, 56, 56, 81, 56, 45, 89, 51, 74, 89, 70, 53, 76, 72, 57, 83, 54, 68, 119, 71, 73, 49, 88, 45, 115, 87, 53, 68, 104, 66, 87, 121, 71, 119, 78, 115, 47, 107, 105, 116, 115, 117, 110, 101, 45, 113, 117, 105, 99, 47, 104, 47, 49, 57, 50, 46, 49, 54, 56, 46, 49, 55, 56, 46, 54, 48, 47, 112, 47, 55, 55, 52, 52, 47, 45, 45, 172, 115, 105, 103, 110, 101, 100, 95, 97, 116, 95, 109, 115, 207, 0, 0, 1, 123, 233, 103, 45, 197, 176, 101, 120, 112, 105, 114, 101, 115, 95, 97, 102, 116, 101, 114, 95, 109, 115, 206, 0, 18, 79, 128, 169, 109, 101, 116, 97, 95, 105, 110, 102, 111, 196, 34, 129, 187, 100, 104, 116, 95, 115, 116, 111, 114, 97, 103, 101, 95, 97, 114, 99, 95, 104, 97, 108, 102, 95, 108, 101, 110, 103, 116, 104, 206, 128, 0, 0, 1] } }, { "agent": { "type": "Buffer", "data": [181, 101, 115, 45, 214, 127, 198, 153, 159, 184, 30, 87, 67, 224, 208, 184, 203, 176, 130, 158, 236, 127, 153, 125, 243, 183, 188, 167, 154, 25, 118, 254, 101, 145, 210, 109] }, "signature": { "type": "Buffer", "data": [88, 189, 229, 122, 44, 171, 194, 156, 90, 79, 148, 49, 207, 224, 34, 199, 219, 88, 24, 243, 103, 127, 123, 41, 87, 171, 127, 92, 6, 216, 198, 171, 26, 226, 237, 217, 122, 78, 98, 146, 55, 255, 68, 240, 202, 83, 58, 140, 147, 185, 3, 66, 15, 216, 210, 22, 99, 197, 73, 234, 120, 17, 74, 1] }, "agent_info": { "type": "Buffer", "data": [134, 165, 115, 112, 97, 99, 101, 196, 36, 203, 165, 212, 173, 24, 215, 165, 196, 25, 145, 248, 113, 246, 139, 205, 182, 241, 138, 57, 0, 26, 8, 217, 179, 23, 126, 59, 136, 128, 213, 110, 225, 173, 72, 197, 95, 165, 97, 103, 101, 110, 116, 196, 36, 181, 101, 115, 45, 214, 127, 198, 153, 159, 184, 30, 87, 67, 224, 208, 184, 203, 176, 130, 158, 236, 127, 153, 125, 243, 183, 188, 167, 154, 25, 118, 254, 101, 145, 210, 109, 164, 117, 114, 108, 115, 145, 217, 99, 107, 105, 116, 115, 117, 110, 101, 45, 112, 114, 111, 120, 121, 58, 47, 47, 114, 70, 71, 83, 100, 113, 104, 101, 68, 107, 70, 70, 56, 69, 102, 109, 45, 69, 116, 55, 119, 81, 101, 120, 83, 88, 55, 65, 112, 69, 51, 89, 86, 99, 45, 120, 102, 52, 104, 106, 77, 115, 77, 47, 107, 105, 116, 115, 117, 110, 101, 45, 113, 117, 105, 99, 47, 104, 47, 49, 57, 50, 46, 49, 54, 56, 46, 49, 55, 56, 46, 54, 48, 47, 112, 47, 55, 55, 52, 52, 47, 45, 45, 172, 115, 105, 103, 110, 101, 100, 95, 97, 116, 95, 109, 115, 207, 0, 0, 1, 123, 233, 113, 23, 220, 176, 101, 120, 112, 105, 114, 101, 115, 95, 97, 102, 116, 101, 114, 95, 109, 115, 206, 0, 18, 79, 128, 169, 109, 101, 116, 97, 95, 105, 110, 102, 111, 196, 34, 129, 187, 100, 104, 116, 95, 115, 116, 111, 114, 97, 103, 101, 95, 97, 114, 99, 95, 104, 97, 108, 102, 95, 108, 101, 110, 103, 116, 104, 206, 128, 0, 0, 1] } }, { "agent": { "type": "Buffer", "data": [3, 171, 237, 107, 186, 245, 165, 47, 237, 235, 211, 49, 245, 62, 113, 53, 255, 252, 223, 226, 75, 118, 148, 187, 23, 53, 70, 174, 160, 184, 64, 63, 94, 210, 227, 56] }, "signature": { "type": "Buffer", "data": [129, 12, 55, 104, 239, 121, 138, 2, 86, 106, 136, 51, 219, 79, 170, 8, 195, 69, 81, 188, 225, 192, 247, 196, 54, 39, 164, 110, 75, 39, 240, 56, 245, 189, 154, 77, 72, 11, 97, 250, 202, 149, 242, 97, 128, 28, 47, 164, 236, 104, 136, 82, 212, 246, 44, 143, 132, 119, 255, 135, 112, 11, 20, 13] }, "agent_info": { "type": "Buffer", "data": [134, 165, 115, 112, 97, 99, 101, 196, 36, 203, 165, 212, 173, 24, 215, 165, 196, 25, 145, 248, 113, 246, 139, 205, 182, 241, 138, 57, 0, 26, 8, 217, 179, 23, 126, 59, 136, 128, 213, 110, 225, 173, 72, 197, 95, 165, 97, 103, 101, 110, 116, 196, 36, 3, 171, 237, 107, 186, 245, 165, 47, 237, 235, 211, 49, 245, 62, 113, 53, 255, 252, 223, 226, 75, 118, 148, 187, 23, 53, 70, 174, 160, 184, 64, 63, 94, 210, 227, 56, 164, 117, 114, 108, 115, 145, 217, 97, 107, 105, 116, 115, 117, 110, 101, 45, 112, 114, 111, 120, 121, 58, 47, 47, 104, 121, 112, 115, 86, 121, 103, 117, 80, 84, 115, 53, 118, 73, 80, 65, 102, 97, 112, 90, 88, 113, 117, 84, 115, 79, 80, 100, 67, 81, 79, 79, 117, 103, 57, 51, 82, 103, 106, 95, 114, 85, 73, 47, 107, 105, 116, 115, 117, 110, 101, 45, 113, 117, 105, 99, 47, 104, 47, 49, 54, 53, 46, 50, 50, 46, 51, 50, 46, 49, 49, 47, 112, 47, 53, 55, 55, 57, 47, 45, 45, 172, 115, 105, 103, 110, 101, 100, 95, 97, 116, 95, 109, 115, 207, 0, 0, 1, 123, 233, 113, 188, 123, 176, 101, 120, 112, 105, 114, 101, 115, 95, 97, 102, 116, 101, 114, 95, 109, 115, 206, 0, 18, 79, 128, 169, 109, 101, 116, 97, 95, 105, 110, 102, 111, 196, 34, 129, 187, 100, 104, 116, 95, 115, 116, 111, 114, 97, 103, 101, 95, 97, 114, 99, 95, 104, 97, 108, 102, 95, 108, 101, 110, 103, 116, 104, 206, 128, 0, 0, 1] } }]);
|
|
322
348
|
}
|
|
349
|
+
runtimeGetNetworkMetrics() {
|
|
350
|
+
return JSON.stringify({
|
|
351
|
+
"metrics": {},
|
|
352
|
+
"stats": {}
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
runtimeRestartHolochain() {
|
|
356
|
+
return true;
|
|
357
|
+
}
|
|
323
358
|
runtimeHcAddAgentInfos(agentInfos) {
|
|
324
359
|
return true;
|
|
325
360
|
}
|
|
@@ -456,6 +491,13 @@ __decorate([
|
|
|
456
491
|
__metadata("design:paramtypes", []),
|
|
457
492
|
__metadata("design:returntype", Array)
|
|
458
493
|
], RuntimeResolver.prototype, "runtimeKnownLinkLanguageTemplates", null);
|
|
494
|
+
__decorate([
|
|
495
|
+
Query(returns => [DebugStringEntry]),
|
|
496
|
+
__param(0, Arg("neighbourhoodUrl", type => String, { nullable: true })),
|
|
497
|
+
__metadata("design:type", Function),
|
|
498
|
+
__metadata("design:paramtypes", [String]),
|
|
499
|
+
__metadata("design:returntype", Array)
|
|
500
|
+
], RuntimeResolver.prototype, "runtimeDebugStrings", null);
|
|
459
501
|
__decorate([
|
|
460
502
|
Mutation(returns => [String]),
|
|
461
503
|
__param(0, Arg("addresses", type => [String])),
|
|
@@ -496,6 +538,18 @@ __decorate([
|
|
|
496
538
|
__metadata("design:paramtypes", []),
|
|
497
539
|
__metadata("design:returntype", String)
|
|
498
540
|
], RuntimeResolver.prototype, "runtimeHcAgentInfos", null);
|
|
541
|
+
__decorate([
|
|
542
|
+
Query(),
|
|
543
|
+
__metadata("design:type", Function),
|
|
544
|
+
__metadata("design:paramtypes", []),
|
|
545
|
+
__metadata("design:returntype", String)
|
|
546
|
+
], RuntimeResolver.prototype, "runtimeGetNetworkMetrics", null);
|
|
547
|
+
__decorate([
|
|
548
|
+
Mutation(returns => Boolean),
|
|
549
|
+
__metadata("design:type", Function),
|
|
550
|
+
__metadata("design:paramtypes", []),
|
|
551
|
+
__metadata("design:returntype", Boolean)
|
|
552
|
+
], RuntimeResolver.prototype, "runtimeRestartHolochain", null);
|
|
499
553
|
__decorate([
|
|
500
554
|
Mutation(returns => Boolean),
|
|
501
555
|
__param(0, Arg("agentInfos", type => String)),
|
package/lib/src/schema.gql
CHANGED
|
@@ -96,6 +96,13 @@ input CapabilityInput {
|
|
|
96
96
|
# The javascript `Date` as string. Type represents date and time as the ISO Date string.
|
|
97
97
|
scalar DateTime
|
|
98
98
|
|
|
99
|
+
type DebugStringEntry {
|
|
100
|
+
debugString: String!
|
|
101
|
+
neighbourhoodUrl: String!
|
|
102
|
+
operation: String!
|
|
103
|
+
timestamp: String!
|
|
104
|
+
}
|
|
105
|
+
|
|
99
106
|
type EntanglementProof {
|
|
100
107
|
deviceKey: String!
|
|
101
108
|
deviceKeySignedByDid: String!
|
|
@@ -371,6 +378,7 @@ type Mutation {
|
|
|
371
378
|
runtimeRemoveKnownLinkLanguageTemplates(addresses: [String!]!): [String!]!
|
|
372
379
|
runtimeRemoveNotification(id: String!): Boolean!
|
|
373
380
|
runtimeRequestInstallNotification(notification: NotificationInput!): String!
|
|
381
|
+
runtimeRestartHolochain: Boolean!
|
|
374
382
|
runtimeSetStatus(status: PerspectiveInput!): Boolean!
|
|
375
383
|
runtimeUpdateNotification(id: String!, notification: NotificationInput!): Boolean!
|
|
376
384
|
}
|
|
@@ -471,8 +479,10 @@ type Query {
|
|
|
471
479
|
perspectiveQueryProlog(query: String!, uuid: String!): String!
|
|
472
480
|
perspectiveSnapshot(uuid: String!): Perspective
|
|
473
481
|
perspectives: [PerspectiveHandle!]!
|
|
482
|
+
runtimeDebugStrings(neighbourhoodUrl: String): [DebugStringEntry!]!
|
|
474
483
|
runtimeFriendStatus(did: String!): PerspectiveExpression
|
|
475
484
|
runtimeFriends: [String!]!
|
|
485
|
+
runtimeGetNetworkMetrics: String!
|
|
476
486
|
runtimeHcAgentInfos: String!
|
|
477
487
|
runtimeInfo: RuntimeInfo!
|
|
478
488
|
runtimeKnownLinkLanguageTemplates: [String!]!
|
package/lib/src/typeDefs.js
CHANGED
|
@@ -92,6 +92,13 @@ input CapabilityInput {
|
|
|
92
92
|
|
|
93
93
|
scalar DateTime
|
|
94
94
|
|
|
95
|
+
type DebugStringEntry {
|
|
96
|
+
debugString: String!
|
|
97
|
+
neighbourhoodUrl: String!
|
|
98
|
+
operation: String!
|
|
99
|
+
timestamp: String!
|
|
100
|
+
}
|
|
101
|
+
|
|
95
102
|
type EntanglementProof {
|
|
96
103
|
deviceKey: String!
|
|
97
104
|
deviceKeySignedByDid: String!
|
|
@@ -367,6 +374,7 @@ type Mutation {
|
|
|
367
374
|
runtimeRemoveKnownLinkLanguageTemplates(addresses: [String!]!): [String!]!
|
|
368
375
|
runtimeRemoveNotification(id: String!): Boolean!
|
|
369
376
|
runtimeRequestInstallNotification(notification: NotificationInput!): String!
|
|
377
|
+
runtimeRestartHolochain: Boolean!
|
|
370
378
|
runtimeSetStatus(status: PerspectiveInput!): Boolean!
|
|
371
379
|
runtimeUpdateNotification(id: String!, notification: NotificationInput!): Boolean!
|
|
372
380
|
}
|
|
@@ -467,8 +475,10 @@ type Query {
|
|
|
467
475
|
perspectiveQueryProlog(query: String!, uuid: String!): String!
|
|
468
476
|
perspectiveSnapshot(uuid: String!): Perspective
|
|
469
477
|
perspectives: [PerspectiveHandle!]!
|
|
478
|
+
runtimeDebugStrings(neighbourhoodUrl: String): [DebugStringEntry!]!
|
|
470
479
|
runtimeFriendStatus(did: String!): PerspectiveExpression
|
|
471
480
|
runtimeFriends: [String!]!
|
|
481
|
+
runtimeGetNetworkMetrics: String!
|
|
472
482
|
runtimeHcAgentInfos: String!
|
|
473
483
|
runtimeInfo: RuntimeInfo!
|
|
474
484
|
runtimeKnownLinkLanguageTemplates: [String!]!
|
package/package.json
CHANGED
package/src/language/Language.ts
CHANGED
|
@@ -148,8 +148,9 @@ export interface GetAllAdapter {
|
|
|
148
148
|
getAll(filter: any, count: number, page: number): Promise<Expression[] | null>;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
export type PerspectiveDiffObserver = (diff: PerspectiveDiff)=>void;
|
|
152
|
-
export type SyncStateChangeObserver = (state: PerspectiveState)=>void;
|
|
151
|
+
export type PerspectiveDiffObserver = (diff: PerspectiveDiff) => void;
|
|
152
|
+
export type SyncStateChangeObserver = (state: PerspectiveState) => void;
|
|
153
|
+
export type DebugStringObserver = (debugString: string, operation: string) => void;
|
|
153
154
|
|
|
154
155
|
/** Interface for "Link Languages" that facilitate the synchronization
|
|
155
156
|
* between agents' local Perspectives inside a Neighbourhood.
|
|
@@ -187,6 +188,9 @@ export interface LinkSyncAdapter {
|
|
|
187
188
|
|
|
188
189
|
/** Add a sync state callback method */
|
|
189
190
|
addSyncStateChangeCallback(callback: SyncStateChangeObserver);
|
|
191
|
+
|
|
192
|
+
/** Add a debug string callback method for capturing internal debug information */
|
|
193
|
+
addDebugStringCallback?(callback: DebugStringObserver);
|
|
190
194
|
}
|
|
191
195
|
|
|
192
196
|
export type MessageCallback = (message: PerspectiveExpression) => void;
|
|
@@ -192,6 +192,39 @@ export class RuntimeClient {
|
|
|
192
192
|
return runtimeHcAgentInfos
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
async getNetworkMetrics(): Promise<String> {
|
|
196
|
+
const { runtimeGetNetworkMetrics } = unwrapApolloResult(await this.#apolloClient.query({
|
|
197
|
+
query: gql`query runtimeGetNetworkMetrics {
|
|
198
|
+
runtimeGetNetworkMetrics
|
|
199
|
+
}`,
|
|
200
|
+
}))
|
|
201
|
+
return runtimeGetNetworkMetrics
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
async debugStrings(neighbourhoodUrl?: string): Promise<any[]> {
|
|
205
|
+
const { runtimeDebugStrings } = unwrapApolloResult(await this.#apolloClient.query({
|
|
206
|
+
query: gql`query runtimeDebugStrings($neighbourhoodUrl: String) {
|
|
207
|
+
runtimeDebugStrings(neighbourhoodUrl: $neighbourhoodUrl) {
|
|
208
|
+
neighbourhoodUrl
|
|
209
|
+
debugString
|
|
210
|
+
operation
|
|
211
|
+
timestamp
|
|
212
|
+
}
|
|
213
|
+
}`,
|
|
214
|
+
variables: { neighbourhoodUrl }
|
|
215
|
+
}))
|
|
216
|
+
return runtimeDebugStrings
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
async restartHolochain(): Promise<Boolean> {
|
|
220
|
+
const { runtimeRestartHolochain } = unwrapApolloResult(await this.#apolloClient.mutate({
|
|
221
|
+
mutation: gql`mutation runtimeRestartHolochain {
|
|
222
|
+
runtimeRestartHolochain
|
|
223
|
+
}`,
|
|
224
|
+
}))
|
|
225
|
+
return runtimeRestartHolochain
|
|
226
|
+
}
|
|
227
|
+
|
|
195
228
|
async hcAddAgentInfos(agentInfos: String): Promise<void> {
|
|
196
229
|
const { runtimeHcAddAgentInfos } = unwrapApolloResult(await this.#apolloClient.mutate({
|
|
197
230
|
mutation: gql`mutation runtimeHcAddAgentInfos($agentInfos: String!) {
|
|
@@ -138,6 +138,21 @@ export class TriggeredNotification {
|
|
|
138
138
|
triggerMatch: string;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
@ObjectType()
|
|
142
|
+
export class DebugStringEntry {
|
|
143
|
+
@Field()
|
|
144
|
+
neighbourhoodUrl: string;
|
|
145
|
+
|
|
146
|
+
@Field()
|
|
147
|
+
debugString: string;
|
|
148
|
+
|
|
149
|
+
@Field()
|
|
150
|
+
operation: string;
|
|
151
|
+
|
|
152
|
+
@Field()
|
|
153
|
+
timestamp: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
141
156
|
@ObjectType()
|
|
142
157
|
export class ImportStats {
|
|
143
158
|
@Field()
|
|
@@ -239,6 +254,12 @@ export default class RuntimeResolver {
|
|
|
239
254
|
return ["Qm12345abcdef"]
|
|
240
255
|
}
|
|
241
256
|
|
|
257
|
+
@Query(returns => [DebugStringEntry])
|
|
258
|
+
runtimeDebugStrings(@Arg("neighbourhoodUrl", type => String, {nullable: true}) neighbourhoodUrl?: string): DebugStringEntry[] {
|
|
259
|
+
// Real implementation will be provided by the executor
|
|
260
|
+
return []
|
|
261
|
+
}
|
|
262
|
+
|
|
242
263
|
@Mutation(returns => [String])
|
|
243
264
|
runtimeAddKnownLinkLanguageTemplates(@Arg("addresses", type => [String]) addresses: string[]): string[] {
|
|
244
265
|
return addresses
|
|
@@ -269,6 +290,19 @@ export default class RuntimeResolver {
|
|
|
269
290
|
return JSON.stringify([{"agent":{"type":"Buffer","data":[9,191,231,58,255,107,202,55,206,57,9,103,17,34,206,195,207,114,5,73,77,198,56,136,17,227,242,231,194,135,128,48,170,189,119,186]},"signature":{"type":"Buffer","data":[195,143,170,36,234,123,255,85,188,138,124,2,91,18,53,231,44,41,240,8,80,131,100,150,165,125,146,90,17,200,190,129,114,211,11,146,150,128,198,199,79,118,157,101,194,68,58,245,98,182,79,139,140,41,143,129,8,136,87,77,180,231,218,11]},"agent_info":{"type":"Buffer","data":[134,165,115,112,97,99,101,196,36,203,165,212,173,24,215,165,196,25,145,248,113,246,139,205,182,241,138,57,0,26,8,217,179,23,126,59,136,128,213,110,225,173,72,197,95,165,97,103,101,110,116,196,36,9,191,231,58,255,107,202,55,206,57,9,103,17,34,206,195,207,114,5,73,77,198,56,136,17,227,242,231,194,135,128,48,170,189,119,186,164,117,114,108,115,145,217,99,107,105,116,115,117,110,101,45,112,114,111,120,121,58,47,47,101,83,52,86,112,54,109,118,80,48,122,116,85,101,104,114,117,113,89,52,102,66,53,101,69,98,121,48,69,66,100,89,84,50,95,67,48,69,112,77,111,76,111,47,107,105,116,115,117,110,101,45,113,117,105,99,47,104,47,49,57,50,46,49,54,56,46,49,55,56,46,54,48,47,112,47,55,55,52,52,47,45,45,172,115,105,103,110,101,100,95,97,116,95,109,115,207,0,0,1,123,233,104,189,50,176,101,120,112,105,114,101,115,95,97,102,116,101,114,95,109,115,206,0,18,79,128,169,109,101,116,97,95,105,110,102,111,196,34,129,187,100,104,116,95,115,116,111,114,97,103,101,95,97,114,99,95,104,97,108,102,95,108,101,110,103,116,104,206,128,0,0,1]}},{"agent":{"type":"Buffer","data":[98,187,145,48,115,209,94,143,31,153,102,69,138,29,133,213,34,52,39,164,157,139,178,111,23,33,118,250,28,155,78,246,128,49,179,38]},"signature":{"type":"Buffer","data":[233,192,38,3,59,248,124,231,57,255,40,154,50,60,119,252,68,198,154,109,175,155,106,217,211,155,109,223,249,91,221,210,17,132,72,230,11,230,247,119,72,244,145,91,75,7,67,5,130,151,44,231,52,220,28,154,212,82,58,90,203,211,236,4]},"agent_info":{"type":"Buffer","data":[134,165,115,112,97,99,101,196,36,203,165,212,173,24,215,165,196,25,145,248,113,246,139,205,182,241,138,57,0,26,8,217,179,23,126,59,136,128,213,110,225,173,72,197,95,165,97,103,101,110,116,196,36,98,187,145,48,115,209,94,143,31,153,102,69,138,29,133,213,34,52,39,164,157,139,178,111,23,33,118,250,28,155,78,246,128,49,179,38,164,117,114,108,115,145,217,99,107,105,116,115,117,110,101,45,112,114,111,120,121,58,47,47,55,101,77,106,48,73,83,72,56,56,81,56,45,89,51,74,89,70,53,76,72,57,83,54,68,119,71,73,49,88,45,115,87,53,68,104,66,87,121,71,119,78,115,47,107,105,116,115,117,110,101,45,113,117,105,99,47,104,47,49,57,50,46,49,54,56,46,49,55,56,46,54,48,47,112,47,55,55,52,52,47,45,45,172,115,105,103,110,101,100,95,97,116,95,109,115,207,0,0,1,123,233,103,45,197,176,101,120,112,105,114,101,115,95,97,102,116,101,114,95,109,115,206,0,18,79,128,169,109,101,116,97,95,105,110,102,111,196,34,129,187,100,104,116,95,115,116,111,114,97,103,101,95,97,114,99,95,104,97,108,102,95,108,101,110,103,116,104,206,128,0,0,1]}},{"agent":{"type":"Buffer","data":[181,101,115,45,214,127,198,153,159,184,30,87,67,224,208,184,203,176,130,158,236,127,153,125,243,183,188,167,154,25,118,254,101,145,210,109]},"signature":{"type":"Buffer","data":[88,189,229,122,44,171,194,156,90,79,148,49,207,224,34,199,219,88,24,243,103,127,123,41,87,171,127,92,6,216,198,171,26,226,237,217,122,78,98,146,55,255,68,240,202,83,58,140,147,185,3,66,15,216,210,22,99,197,73,234,120,17,74,1]},"agent_info":{"type":"Buffer","data":[134,165,115,112,97,99,101,196,36,203,165,212,173,24,215,165,196,25,145,248,113,246,139,205,182,241,138,57,0,26,8,217,179,23,126,59,136,128,213,110,225,173,72,197,95,165,97,103,101,110,116,196,36,181,101,115,45,214,127,198,153,159,184,30,87,67,224,208,184,203,176,130,158,236,127,153,125,243,183,188,167,154,25,118,254,101,145,210,109,164,117,114,108,115,145,217,99,107,105,116,115,117,110,101,45,112,114,111,120,121,58,47,47,114,70,71,83,100,113,104,101,68,107,70,70,56,69,102,109,45,69,116,55,119,81,101,120,83,88,55,65,112,69,51,89,86,99,45,120,102,52,104,106,77,115,77,47,107,105,116,115,117,110,101,45,113,117,105,99,47,104,47,49,57,50,46,49,54,56,46,49,55,56,46,54,48,47,112,47,55,55,52,52,47,45,45,172,115,105,103,110,101,100,95,97,116,95,109,115,207,0,0,1,123,233,113,23,220,176,101,120,112,105,114,101,115,95,97,102,116,101,114,95,109,115,206,0,18,79,128,169,109,101,116,97,95,105,110,102,111,196,34,129,187,100,104,116,95,115,116,111,114,97,103,101,95,97,114,99,95,104,97,108,102,95,108,101,110,103,116,104,206,128,0,0,1]}},{"agent":{"type":"Buffer","data":[3,171,237,107,186,245,165,47,237,235,211,49,245,62,113,53,255,252,223,226,75,118,148,187,23,53,70,174,160,184,64,63,94,210,227,56]},"signature":{"type":"Buffer","data":[129,12,55,104,239,121,138,2,86,106,136,51,219,79,170,8,195,69,81,188,225,192,247,196,54,39,164,110,75,39,240,56,245,189,154,77,72,11,97,250,202,149,242,97,128,28,47,164,236,104,136,82,212,246,44,143,132,119,255,135,112,11,20,13]},"agent_info":{"type":"Buffer","data":[134,165,115,112,97,99,101,196,36,203,165,212,173,24,215,165,196,25,145,248,113,246,139,205,182,241,138,57,0,26,8,217,179,23,126,59,136,128,213,110,225,173,72,197,95,165,97,103,101,110,116,196,36,3,171,237,107,186,245,165,47,237,235,211,49,245,62,113,53,255,252,223,226,75,118,148,187,23,53,70,174,160,184,64,63,94,210,227,56,164,117,114,108,115,145,217,97,107,105,116,115,117,110,101,45,112,114,111,120,121,58,47,47,104,121,112,115,86,121,103,117,80,84,115,53,118,73,80,65,102,97,112,90,88,113,117,84,115,79,80,100,67,81,79,79,117,103,57,51,82,103,106,95,114,85,73,47,107,105,116,115,117,110,101,45,113,117,105,99,47,104,47,49,54,53,46,50,50,46,51,50,46,49,49,47,112,47,53,55,55,57,47,45,45,172,115,105,103,110,101,100,95,97,116,95,109,115,207,0,0,1,123,233,113,188,123,176,101,120,112,105,114,101,115,95,97,102,116,101,114,95,109,115,206,0,18,79,128,169,109,101,116,97,95,105,110,102,111,196,34,129,187,100,104,116,95,115,116,111,114,97,103,101,95,97,114,99,95,104,97,108,102,95,108,101,110,103,116,104,206,128,0,0,1]}}])
|
|
270
291
|
}
|
|
271
292
|
|
|
293
|
+
@Query()
|
|
294
|
+
runtimeGetNetworkMetrics(): String {
|
|
295
|
+
return JSON.stringify({
|
|
296
|
+
"metrics": {},
|
|
297
|
+
"stats": {}
|
|
298
|
+
})
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
@Mutation(returns => Boolean)
|
|
302
|
+
runtimeRestartHolochain(): Boolean {
|
|
303
|
+
return true
|
|
304
|
+
}
|
|
305
|
+
|
|
272
306
|
@Mutation(returns => Boolean)
|
|
273
307
|
runtimeHcAddAgentInfos(@Arg("agentInfos", type => String) agentInfos): boolean {
|
|
274
308
|
return true
|