@mokei/host-protocol 0.14.0 → 0.15.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace-schemas.d.ts","sourceRoot":"","sources":["../src/trace-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAU,MAAM,eAAe,CAAA;AASvD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CJ,CAAA;AAC3B,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEhE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAeA,CAAA;AAC3B,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAExD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIA,CAAA;AAC3B,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAA;AAExD,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcR,CAAA;AAC3B,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAExE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMR,CAAA;AAC3B,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAExE,eAAO,MAAM,qBAAqB;;;;;;;;;CAKP,CAAA;AAE3B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWP,CAAA;AAC3B,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEtE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;CAKH,CAAA;AAC3B,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
@@ -0,0 +1,269 @@
1
+ import { jsonDefinitions, jsonObjectSchema, storedLogSchema, storedSpanSchema } from './flow-schemas.js';
2
+ export const traceSummarySchema = {
3
+ definitions: jsonDefinitions,
4
+ type: 'object',
5
+ properties: {
6
+ traceID: {
7
+ type: 'string'
8
+ },
9
+ rootSpanID: {
10
+ type: 'string'
11
+ },
12
+ activeSegmentSpanID: {
13
+ type: 'string'
14
+ },
15
+ kind: {
16
+ type: 'string',
17
+ enum: [
18
+ 'context',
19
+ 'mcp',
20
+ 'flow',
21
+ 'step'
22
+ ]
23
+ },
24
+ name: {
25
+ type: 'string'
26
+ },
27
+ active: {
28
+ type: 'boolean'
29
+ },
30
+ outcome: {
31
+ type: [
32
+ 'string',
33
+ 'null'
34
+ ],
35
+ enum: [
36
+ 'ok',
37
+ 'error',
38
+ 'interrupted',
39
+ null
40
+ ]
41
+ },
42
+ startTime: {
43
+ type: 'number'
44
+ },
45
+ endTime: {
46
+ type: 'number'
47
+ },
48
+ attributes: {
49
+ type: 'object',
50
+ properties: {
51
+ 'mokei.run.id': {
52
+ type: 'string'
53
+ },
54
+ 'mokei.flow.id': {
55
+ type: 'string'
56
+ },
57
+ 'mokei.context.id': {
58
+ type: 'string'
59
+ },
60
+ label: {
61
+ type: 'string'
62
+ }
63
+ },
64
+ additionalProperties: false
65
+ },
66
+ spanCount: {
67
+ type: 'integer'
68
+ },
69
+ errorCount: {
70
+ type: 'integer'
71
+ },
72
+ droppedCount: {
73
+ type: 'integer'
74
+ },
75
+ revision: {
76
+ type: 'integer'
77
+ }
78
+ },
79
+ required: [
80
+ 'traceID',
81
+ 'rootSpanID',
82
+ 'kind',
83
+ 'name',
84
+ 'active',
85
+ 'outcome',
86
+ 'startTime',
87
+ 'attributes',
88
+ 'spanCount',
89
+ 'errorCount',
90
+ 'droppedCount',
91
+ 'revision'
92
+ ],
93
+ additionalProperties: false
94
+ };
95
+ export const openSpanSchema = {
96
+ definitions: jsonDefinitions,
97
+ type: 'object',
98
+ properties: {
99
+ traceID: {
100
+ type: 'string'
101
+ },
102
+ spanID: {
103
+ type: 'string'
104
+ },
105
+ parentSpanID: {
106
+ type: 'string'
107
+ },
108
+ name: {
109
+ type: 'string'
110
+ },
111
+ kind: {
112
+ type: 'number'
113
+ },
114
+ startTime: {
115
+ type: 'number'
116
+ },
117
+ attributes: jsonObjectSchema,
118
+ links: {
119
+ type: 'array',
120
+ items: storedSpanSchema.properties.links.items
121
+ }
122
+ },
123
+ required: [
124
+ 'traceID',
125
+ 'spanID',
126
+ 'name',
127
+ 'kind',
128
+ 'startTime',
129
+ 'attributes',
130
+ 'links'
131
+ ],
132
+ additionalProperties: false
133
+ };
134
+ export const traceLogSchema = {
135
+ ...storedLogSchema,
136
+ properties: {
137
+ ...storedLogSchema.properties,
138
+ logID: {
139
+ type: 'string'
140
+ }
141
+ },
142
+ required: [
143
+ ...storedLogSchema.required,
144
+ 'logID'
145
+ ]
146
+ };
147
+ export const tracesListParamsSchema = {
148
+ type: 'object',
149
+ properties: {
150
+ kind: {
151
+ type: 'string',
152
+ enum: [
153
+ 'context',
154
+ 'mcp',
155
+ 'flow',
156
+ 'step'
157
+ ]
158
+ },
159
+ active: {
160
+ type: 'boolean'
161
+ },
162
+ outcome: {
163
+ type: [
164
+ 'string',
165
+ 'null'
166
+ ],
167
+ enum: [
168
+ 'ok',
169
+ 'error',
170
+ 'interrupted',
171
+ null
172
+ ]
173
+ },
174
+ name: {
175
+ type: 'string'
176
+ },
177
+ since: {
178
+ type: 'number'
179
+ },
180
+ until: {
181
+ type: 'number'
182
+ },
183
+ limit: {
184
+ type: 'integer'
185
+ },
186
+ cursor: {
187
+ type: 'string'
188
+ }
189
+ },
190
+ required: [
191
+ 'limit'
192
+ ],
193
+ additionalProperties: false
194
+ };
195
+ export const tracesListResultSchema = {
196
+ definitions: jsonDefinitions,
197
+ type: 'object',
198
+ properties: {
199
+ traces: {
200
+ type: 'array',
201
+ items: traceSummarySchema
202
+ },
203
+ cursor: {
204
+ type: 'string'
205
+ }
206
+ },
207
+ required: [
208
+ 'traces'
209
+ ],
210
+ additionalProperties: false
211
+ };
212
+ export const tracesGetParamsSchema = {
213
+ type: 'object',
214
+ properties: {
215
+ traceID: {
216
+ type: 'string'
217
+ }
218
+ },
219
+ required: [
220
+ 'traceID'
221
+ ],
222
+ additionalProperties: false
223
+ };
224
+ export const tracesGetResultSchema = {
225
+ definitions: jsonDefinitions,
226
+ type: 'object',
227
+ properties: {
228
+ summary: traceSummarySchema,
229
+ spans: {
230
+ type: 'array',
231
+ items: {
232
+ anyOf: [
233
+ storedSpanSchema,
234
+ openSpanSchema
235
+ ]
236
+ }
237
+ },
238
+ logs: {
239
+ type: 'array',
240
+ items: traceLogSchema
241
+ },
242
+ logsTruncated: {
243
+ type: 'boolean'
244
+ }
245
+ },
246
+ required: [
247
+ 'summary',
248
+ 'spans',
249
+ 'logs',
250
+ 'logsTruncated'
251
+ ],
252
+ additionalProperties: false
253
+ };
254
+ export const tracingInfoSchema = {
255
+ type: 'object',
256
+ properties: {
257
+ lostSummaryCount: {
258
+ type: 'integer'
259
+ },
260
+ droppedCount: {
261
+ type: 'integer'
262
+ }
263
+ },
264
+ required: [
265
+ 'lostSummaryCount',
266
+ 'droppedCount'
267
+ ],
268
+ additionalProperties: false
269
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mokei/host-protocol",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Mokei Host protocol",
5
5
  "keywords": [
6
6
  "model",
@@ -28,8 +28,8 @@
28
28
  "lib/*"
29
29
  ],
30
30
  "dependencies": {
31
- "@enkaku/protocol": "^0.21.1",
32
- "@sozai/schema": "^0.1.2"
31
+ "@enkaku/protocol": "^0.22.2",
32
+ "@sozai/schema": "^0.1.6"
33
33
  },
34
34
  "scripts": {
35
35
  "build": "pnpm run build:clean && pnpm run build:js && pnpm run build:types",
@@ -37,7 +37,8 @@
37
37
  "build:js": "del 'lib/**/*.js' && swc src -d ./lib --config-file ../../node_modules/@kigu/dev/swc.json --strip-leading-paths",
38
38
  "build:types": "del 'lib/**/*.d.ts' 'lib/**/*.d.ts.map' && tsc --emitDeclarationOnly --skipLibCheck",
39
39
  "build:types:ci": "tsc --emitDeclarationOnly --skipLibCheck --declarationMap false",
40
- "test": "pnpm run test:types",
41
- "test:types": "tsc --noEmit --skipLibCheck"
40
+ "test": "pnpm run test:types && pnpm run test:unit",
41
+ "test:types": "tsc --noEmit --skipLibCheck",
42
+ "test:unit": "vitest run"
42
43
  }
43
44
  }
package/CHANGELOG.md DELETED
@@ -1,11 +0,0 @@
1
- # @mokei/host-protocol
2
-
3
- ## 0.14.0
4
-
5
- ## 0.13.1
6
-
7
- ## 0.13.0
8
-
9
- ## 0.12.0
10
-
11
- ## 0.11.0