@adea-ai/runtime-gateway-protocol 1.2.2
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/LICENSE +201 -0
- package/README.md +43 -0
- package/dist/authentication.d.ts +37 -0
- package/dist/authentication.d.ts.map +1 -0
- package/dist/authentication.js +66 -0
- package/dist/authentication.js.map +1 -0
- package/dist/emulator.d.ts +25 -0
- package/dist/emulator.d.ts.map +1 -0
- package/dist/emulator.js +138 -0
- package/dist/emulator.js.map +1 -0
- package/dist/fixtures.d.ts +144 -0
- package/dist/fixtures.d.ts.map +1 -0
- package/dist/fixtures.js +49 -0
- package/dist/fixtures.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/protocol.d.ts +648 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +462 -0
- package/dist/protocol.js.map +1 -0
- package/fixtures/golden/envelopes.json +153 -0
- package/fixtures/index.mjs +4 -0
- package/fixtures/malformed/envelopes.json +70 -0
- package/package.json +57 -0
- package/schema/gateway-envelope.v1.json +893 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
export declare const inventoryFixtures: Readonly<{
|
|
2
|
+
noProvider: {
|
|
3
|
+
schemaVersion: 1;
|
|
4
|
+
protocolVersion: {
|
|
5
|
+
major: number;
|
|
6
|
+
minor: number;
|
|
7
|
+
};
|
|
8
|
+
sequence: number;
|
|
9
|
+
nodeId: string;
|
|
10
|
+
workspaceId: string;
|
|
11
|
+
traceId: string;
|
|
12
|
+
sentAt: string;
|
|
13
|
+
channelGeneration: number;
|
|
14
|
+
type: "inventory";
|
|
15
|
+
snapshotVersion: number;
|
|
16
|
+
observedAt: string;
|
|
17
|
+
runtimeDrivers: {
|
|
18
|
+
opaqueRef: string;
|
|
19
|
+
driverFamily: string;
|
|
20
|
+
driverVersion: string;
|
|
21
|
+
protocolVersion: {
|
|
22
|
+
major: number;
|
|
23
|
+
minor: number;
|
|
24
|
+
};
|
|
25
|
+
health: "degraded" | "healthy" | "unavailable";
|
|
26
|
+
capabilities: string[];
|
|
27
|
+
limitations: string[];
|
|
28
|
+
adapterVersion?: string | undefined;
|
|
29
|
+
harnessVersion?: string | undefined;
|
|
30
|
+
}[];
|
|
31
|
+
contextProviders: {
|
|
32
|
+
opaqueRef: string;
|
|
33
|
+
driverFamily: string;
|
|
34
|
+
driverVersion: string;
|
|
35
|
+
protocolVersion: {
|
|
36
|
+
major: number;
|
|
37
|
+
minor: number;
|
|
38
|
+
};
|
|
39
|
+
health: "degraded" | "healthy" | "unavailable";
|
|
40
|
+
capabilities: string[];
|
|
41
|
+
limitations: string[];
|
|
42
|
+
adapterVersion?: string | undefined;
|
|
43
|
+
harnessVersion?: string | undefined;
|
|
44
|
+
}[];
|
|
45
|
+
mode?: "snapshot" | "delta" | undefined;
|
|
46
|
+
baseSnapshotVersion?: number | undefined;
|
|
47
|
+
removedRuntimeRefs?: string[] | undefined;
|
|
48
|
+
};
|
|
49
|
+
cortanaCompatible: {
|
|
50
|
+
schemaVersion: 1;
|
|
51
|
+
protocolVersion: {
|
|
52
|
+
major: number;
|
|
53
|
+
minor: number;
|
|
54
|
+
};
|
|
55
|
+
sequence: number;
|
|
56
|
+
nodeId: string;
|
|
57
|
+
workspaceId: string;
|
|
58
|
+
traceId: string;
|
|
59
|
+
sentAt: string;
|
|
60
|
+
channelGeneration: number;
|
|
61
|
+
type: "inventory";
|
|
62
|
+
snapshotVersion: number;
|
|
63
|
+
observedAt: string;
|
|
64
|
+
runtimeDrivers: {
|
|
65
|
+
opaqueRef: string;
|
|
66
|
+
driverFamily: string;
|
|
67
|
+
driverVersion: string;
|
|
68
|
+
protocolVersion: {
|
|
69
|
+
major: number;
|
|
70
|
+
minor: number;
|
|
71
|
+
};
|
|
72
|
+
health: "degraded" | "healthy" | "unavailable";
|
|
73
|
+
capabilities: string[];
|
|
74
|
+
limitations: string[];
|
|
75
|
+
adapterVersion?: string | undefined;
|
|
76
|
+
harnessVersion?: string | undefined;
|
|
77
|
+
}[];
|
|
78
|
+
contextProviders: {
|
|
79
|
+
opaqueRef: string;
|
|
80
|
+
driverFamily: string;
|
|
81
|
+
driverVersion: string;
|
|
82
|
+
protocolVersion: {
|
|
83
|
+
major: number;
|
|
84
|
+
minor: number;
|
|
85
|
+
};
|
|
86
|
+
health: "degraded" | "healthy" | "unavailable";
|
|
87
|
+
capabilities: string[];
|
|
88
|
+
limitations: string[];
|
|
89
|
+
adapterVersion?: string | undefined;
|
|
90
|
+
harnessVersion?: string | undefined;
|
|
91
|
+
}[];
|
|
92
|
+
mode?: "snapshot" | "delta" | undefined;
|
|
93
|
+
baseSnapshotVersion?: number | undefined;
|
|
94
|
+
removedRuntimeRefs?: string[] | undefined;
|
|
95
|
+
};
|
|
96
|
+
alternateProvider: {
|
|
97
|
+
schemaVersion: 1;
|
|
98
|
+
protocolVersion: {
|
|
99
|
+
major: number;
|
|
100
|
+
minor: number;
|
|
101
|
+
};
|
|
102
|
+
sequence: number;
|
|
103
|
+
nodeId: string;
|
|
104
|
+
workspaceId: string;
|
|
105
|
+
traceId: string;
|
|
106
|
+
sentAt: string;
|
|
107
|
+
channelGeneration: number;
|
|
108
|
+
type: "inventory";
|
|
109
|
+
snapshotVersion: number;
|
|
110
|
+
observedAt: string;
|
|
111
|
+
runtimeDrivers: {
|
|
112
|
+
opaqueRef: string;
|
|
113
|
+
driverFamily: string;
|
|
114
|
+
driverVersion: string;
|
|
115
|
+
protocolVersion: {
|
|
116
|
+
major: number;
|
|
117
|
+
minor: number;
|
|
118
|
+
};
|
|
119
|
+
health: "degraded" | "healthy" | "unavailable";
|
|
120
|
+
capabilities: string[];
|
|
121
|
+
limitations: string[];
|
|
122
|
+
adapterVersion?: string | undefined;
|
|
123
|
+
harnessVersion?: string | undefined;
|
|
124
|
+
}[];
|
|
125
|
+
contextProviders: {
|
|
126
|
+
opaqueRef: string;
|
|
127
|
+
driverFamily: string;
|
|
128
|
+
driverVersion: string;
|
|
129
|
+
protocolVersion: {
|
|
130
|
+
major: number;
|
|
131
|
+
minor: number;
|
|
132
|
+
};
|
|
133
|
+
health: "degraded" | "healthy" | "unavailable";
|
|
134
|
+
capabilities: string[];
|
|
135
|
+
limitations: string[];
|
|
136
|
+
adapterVersion?: string | undefined;
|
|
137
|
+
harnessVersion?: string | undefined;
|
|
138
|
+
}[];
|
|
139
|
+
mode?: "snapshot" | "delta" | undefined;
|
|
140
|
+
baseSnapshotVersion?: number | undefined;
|
|
141
|
+
removedRuntimeRefs?: string[] | undefined;
|
|
142
|
+
};
|
|
143
|
+
}>;
|
|
144
|
+
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../src/fixtures.ts"],"names":[],"mappings":"AAsCA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY5B,CAAA"}
|
package/dist/fixtures.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { GatewayInventoryEnvelopeSchema } from './protocol.js';
|
|
2
|
+
const common = {
|
|
3
|
+
type: 'inventory',
|
|
4
|
+
schemaVersion: 1,
|
|
5
|
+
protocolVersion: { major: 1, minor: 0 },
|
|
6
|
+
sequence: 2,
|
|
7
|
+
nodeId: 'rnr_01JABCDEF0123456789ABCDEFG',
|
|
8
|
+
workspaceId: 'wsp_01JABCDEF0123456789ABCDEFG',
|
|
9
|
+
traceId: 'trc_01JABCDEF0123456789ABCDEFG',
|
|
10
|
+
sentAt: '2026-08-25T12:00:00.000Z',
|
|
11
|
+
channelGeneration: 1,
|
|
12
|
+
snapshotVersion: 1,
|
|
13
|
+
observedAt: '2026-08-25T12:00:00.000Z',
|
|
14
|
+
runtimeDrivers: [
|
|
15
|
+
{
|
|
16
|
+
opaqueRef: 'nref_01JABCDEF0123456789ABCDEFG',
|
|
17
|
+
driverFamily: 'reference-runtime',
|
|
18
|
+
driverVersion: '1.0.0',
|
|
19
|
+
harnessVersion: '1.0.0',
|
|
20
|
+
protocolVersion: { major: 1, minor: 0 },
|
|
21
|
+
health: 'healthy',
|
|
22
|
+
capabilities: ['runtime.execute'],
|
|
23
|
+
limitations: [],
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
};
|
|
27
|
+
const contextProvider = (driverFamily, opaqueRef) => ({
|
|
28
|
+
opaqueRef,
|
|
29
|
+
driverFamily,
|
|
30
|
+
driverVersion: '1.0.0',
|
|
31
|
+
protocolVersion: { major: 1, minor: 0 },
|
|
32
|
+
health: 'healthy',
|
|
33
|
+
capabilities: ['context.status', 'context.read'],
|
|
34
|
+
limitations: [],
|
|
35
|
+
});
|
|
36
|
+
export const inventoryFixtures = Object.freeze({
|
|
37
|
+
noProvider: GatewayInventoryEnvelopeSchema.parse({ ...common, contextProviders: [] }),
|
|
38
|
+
cortanaCompatible: GatewayInventoryEnvelopeSchema.parse({
|
|
39
|
+
...common,
|
|
40
|
+
snapshotVersion: 2,
|
|
41
|
+
contextProviders: [contextProvider('local-context', 'pvr_01JABCDEF0123456789ABCDEFG')],
|
|
42
|
+
}),
|
|
43
|
+
alternateProvider: GatewayInventoryEnvelopeSchema.parse({
|
|
44
|
+
...common,
|
|
45
|
+
snapshotVersion: 3,
|
|
46
|
+
contextProviders: [contextProvider('alternate-context', 'pvr_01JBBCDEF0123456789ABCDEFG')],
|
|
47
|
+
}),
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../src/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA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ACT,eAAe,EAAE,CAAC;QAClB,gBAAgB,EAAE,CAAC,eAAe,CAAC,eAAe,EAAE,gCAAgC,CAAC,CAAC;KACvF,CAAC;IACF,iBAAiB,EAAE,8BAA8B,CAAC,KAAK,CAAC;QACtD,GAAG,MAAM;QACT,eAAe,EAAE,CAAC;QAClB,gBAAgB,EAAE,CAAC,eAAe,CAAC,mBAAmB,EAAE,gCAAgC,CAAC,CAAC;KAC3F,CAAC;CACH,CAAC,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AAEnC,eAAO,MAAM,WAAW,6BAA6B,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AAEnC,MAAM,CAAC,MAAM,WAAW,GAAG,0BAA0B,CAAA"}
|