@scoutflo/topology-contracts 0.10.7-hyperdx.0 → 0.10.7-hyperdx.1

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.
Files changed (31) hide show
  1. package/dist/src/correlation/alertRouting.d.ts +8 -8
  2. package/dist/src/correlation/contracts/types.d.ts +8 -8
  3. package/dist/src/index.d.ts +1 -0
  4. package/dist/src/index.js +1 -0
  5. package/dist/src/index.js.map +1 -1
  6. package/dist/src/provenance/runtimeContainer.d.ts +44 -44
  7. package/dist/src/service-discovery/common.d.ts +44 -0
  8. package/dist/src/service-discovery/common.js +57 -0
  9. package/dist/src/service-discovery/common.js.map +1 -0
  10. package/dist/src/service-discovery/identity.d.ts +230 -0
  11. package/dist/src/service-discovery/identity.js +41 -0
  12. package/dist/src/service-discovery/identity.js.map +1 -0
  13. package/dist/src/service-discovery/index.d.ts +6 -0
  14. package/dist/src/service-discovery/index.js +23 -0
  15. package/dist/src/service-discovery/index.js.map +1 -0
  16. package/dist/src/service-discovery/outcome.d.ts +1546 -0
  17. package/dist/src/service-discovery/outcome.js +52 -0
  18. package/dist/src/service-discovery/outcome.js.map +1 -0
  19. package/dist/src/service-discovery/plan.d.ts +4024 -0
  20. package/dist/src/service-discovery/plan.js +55 -0
  21. package/dist/src/service-discovery/plan.js.map +1 -0
  22. package/dist/src/service-discovery/provenance.d.ts +1978 -0
  23. package/dist/src/service-discovery/provenance.js +109 -0
  24. package/dist/src/service-discovery/provenance.js.map +1 -0
  25. package/dist/src/service-discovery/review.d.ts +1916 -0
  26. package/dist/src/service-discovery/review.js +63 -0
  27. package/dist/src/service-discovery/review.js.map +1 -0
  28. package/dist/test/service-discovery.test.d.ts +1 -0
  29. package/dist/test/service-discovery.test.js +402 -0
  30. package/dist/test/service-discovery.test.js.map +1 -0
  31. package/package.json +1 -1
@@ -113,12 +113,12 @@ export declare const temporalOnCallEvidenceSchema: z.ZodEffects<z.ZodObject<{
113
113
  integration_id: string;
114
114
  provider: "pagerduty" | "zenduty";
115
115
  observed_at: string;
116
- provider_service_id: string;
117
- effective_bound: "unknown" | "known" | "open_start" | "open_end";
118
116
  provenance: {
119
117
  source_ref: string;
120
118
  source: "pagerduty_oncall_api" | "zenduty_oncall_api";
121
119
  };
120
+ provider_service_id: string;
121
+ effective_bound: "unknown" | "known" | "open_start" | "open_end";
122
122
  override_status: "unknown" | "active" | "none";
123
123
  freshness: "stale" | "degraded" | "current";
124
124
  policy_id?: string | undefined;
@@ -134,12 +134,12 @@ export declare const temporalOnCallEvidenceSchema: z.ZodEffects<z.ZodObject<{
134
134
  integration_id: string;
135
135
  provider: "pagerduty" | "zenduty";
136
136
  observed_at: string;
137
- provider_service_id: string;
138
- effective_bound: "unknown" | "known" | "open_start" | "open_end";
139
137
  provenance: {
140
138
  source_ref: string;
141
139
  source: "pagerduty_oncall_api" | "zenduty_oncall_api";
142
140
  };
141
+ provider_service_id: string;
142
+ effective_bound: "unknown" | "known" | "open_start" | "open_end";
143
143
  override_status: "unknown" | "active" | "none";
144
144
  freshness: "stale" | "degraded" | "current";
145
145
  policy_id?: string | undefined;
@@ -155,12 +155,12 @@ export declare const temporalOnCallEvidenceSchema: z.ZodEffects<z.ZodObject<{
155
155
  integration_id: string;
156
156
  provider: "pagerduty" | "zenduty";
157
157
  observed_at: string;
158
- provider_service_id: string;
159
- effective_bound: "unknown" | "known" | "open_start" | "open_end";
160
158
  provenance: {
161
159
  source_ref: string;
162
160
  source: "pagerduty_oncall_api" | "zenduty_oncall_api";
163
161
  };
162
+ provider_service_id: string;
163
+ effective_bound: "unknown" | "known" | "open_start" | "open_end";
164
164
  override_status: "unknown" | "active" | "none";
165
165
  freshness: "stale" | "degraded" | "current";
166
166
  policy_id?: string | undefined;
@@ -176,12 +176,12 @@ export declare const temporalOnCallEvidenceSchema: z.ZodEffects<z.ZodObject<{
176
176
  integration_id: string;
177
177
  provider: "pagerduty" | "zenduty";
178
178
  observed_at: string;
179
- provider_service_id: string;
180
- effective_bound: "unknown" | "known" | "open_start" | "open_end";
181
179
  provenance: {
182
180
  source_ref: string;
183
181
  source: "pagerduty_oncall_api" | "zenduty_oncall_api";
184
182
  };
183
+ provider_service_id: string;
184
+ effective_bound: "unknown" | "known" | "open_start" | "open_end";
185
185
  override_status: "unknown" | "active" | "none";
186
186
  freshness: "stale" | "degraded" | "current";
187
187
  policy_id?: string | undefined;
@@ -72,13 +72,13 @@ export declare const integrationRelationshipClaimLayersSchema: z.ZodObject<{
72
72
  diagnostic: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
73
73
  contract_scoped_identity: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
74
74
  }, "strip", z.ZodTypeAny, {
75
- identity: string[];
76
75
  scope: string[];
76
+ identity: string[];
77
77
  diagnostic: string[];
78
78
  contract_scoped_identity: string[];
79
79
  }, {
80
- identity?: string[] | undefined;
81
80
  scope?: string[] | undefined;
81
+ identity?: string[] | undefined;
82
82
  diagnostic?: string[] | undefined;
83
83
  contract_scoped_identity?: string[] | undefined;
84
84
  }>;
@@ -174,13 +174,13 @@ export declare const connectionContractMetadataSchema: z.ZodObject<{
174
174
  diagnostic: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
175
175
  contract_scoped_identity: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
176
176
  }, "strip", z.ZodTypeAny, {
177
- identity: string[];
178
177
  scope: string[];
178
+ identity: string[];
179
179
  diagnostic: string[];
180
180
  contract_scoped_identity: string[];
181
181
  }, {
182
- identity?: string[] | undefined;
183
182
  scope?: string[] | undefined;
183
+ identity?: string[] | undefined;
184
184
  diagnostic?: string[] | undefined;
185
185
  contract_scoped_identity?: string[] | undefined;
186
186
  }>>;
@@ -253,13 +253,13 @@ export declare const connectionContractMetadataSchema: z.ZodObject<{
253
253
  diagnostic: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
254
254
  contract_scoped_identity: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
255
255
  }, "strip", z.ZodTypeAny, {
256
- identity: string[];
257
256
  scope: string[];
257
+ identity: string[];
258
258
  diagnostic: string[];
259
259
  contract_scoped_identity: string[];
260
260
  }, {
261
- identity?: string[] | undefined;
262
261
  scope?: string[] | undefined;
262
+ identity?: string[] | undefined;
263
263
  diagnostic?: string[] | undefined;
264
264
  contract_scoped_identity?: string[] | undefined;
265
265
  }>>;
@@ -332,13 +332,13 @@ export declare const connectionContractMetadataSchema: z.ZodObject<{
332
332
  diagnostic: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
333
333
  contract_scoped_identity: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
334
334
  }, "strip", z.ZodTypeAny, {
335
- identity: string[];
336
335
  scope: string[];
336
+ identity: string[];
337
337
  diagnostic: string[];
338
338
  contract_scoped_identity: string[];
339
339
  }, {
340
- identity?: string[] | undefined;
341
340
  scope?: string[] | undefined;
341
+ identity?: string[] | undefined;
342
342
  diagnostic?: string[] | undefined;
343
343
  contract_scoped_identity?: string[] | undefined;
344
344
  }>>;
@@ -4,6 +4,7 @@ export * from './providers';
4
4
  export * from './product-identity';
5
5
  export * from './families';
6
6
  export * from './source-sync';
7
+ export * from './service-discovery';
7
8
  export * from './correlation';
8
9
  export * from './topology';
9
10
  export * from './investigation';
package/dist/src/index.js CHANGED
@@ -43,6 +43,7 @@ __exportStar(require("./providers"), exports);
43
43
  __exportStar(require("./product-identity"), exports);
44
44
  __exportStar(require("./families"), exports);
45
45
  __exportStar(require("./source-sync"), exports);
46
+ __exportStar(require("./service-discovery"), exports);
46
47
  __exportStar(require("./correlation"), exports);
47
48
  __exportStar(require("./topology"), exports);
48
49
  __exportStar(require("./investigation"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAa,QAAA,0BAA0B,GAAG,8BAA8B,CAAC;AAEzE,8EAA8D;AAE9D,8CAA4B;AAC5B,qDAAmC;AACnC,6CAA2B;AAC3B,gDAA8B;AAC9B,gDAA8B;AAC9B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,+CAA6B;AAC7B,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAa,QAAA,0BAA0B,GAAG,8BAA8B,CAAC;AAEzE,8EAA8D;AAE9D,8CAA4B;AAC5B,qDAAmC;AACnC,6CAA2B;AAC3B,gDAA8B;AAC9B,sDAAoC;AACpC,gDAA8B;AAC9B,6CAA2B;AAC3B,kDAAgC;AAChC,sDAAoC;AACpC,+CAA6B;AAC7B,4CAA0B"}
@@ -25,14 +25,14 @@ export declare const runtimeContainerProvenanceSchema: z.ZodEffects<z.ZodObject<
25
25
  pod_name: z.ZodOptional<z.ZodString>;
26
26
  }, "strict", z.ZodTypeAny, {
27
27
  namespace?: string | undefined;
28
+ workload_kind?: string | undefined;
28
29
  workload_name?: string | undefined;
29
30
  pod_name?: string | undefined;
30
- workload_kind?: string | undefined;
31
31
  }, {
32
32
  namespace?: string | undefined;
33
+ workload_kind?: string | undefined;
33
34
  workload_name?: string | undefined;
34
35
  pod_name?: string | undefined;
35
- workload_kind?: string | undefined;
36
36
  }>>;
37
37
  requested_image: z.ZodOptional<z.ZodString>;
38
38
  observed_image: z.ZodOptional<z.ZodString>;
@@ -49,13 +49,13 @@ export declare const runtimeContainerProvenanceSchema: z.ZodEffects<z.ZodObject<
49
49
  status: z.ZodEnum<["unverified", "unavailable"]>;
50
50
  reason: z.ZodOptional<z.ZodString>;
51
51
  }, "strict", z.ZodTypeAny, {
52
- status: "unavailable" | "unverified";
52
+ status: "unverified" | "unavailable";
53
53
  scope: "pod_metadata";
54
54
  repository?: string | undefined;
55
55
  reason?: string | undefined;
56
56
  commit_sha?: string | undefined;
57
57
  }, {
58
- status: "unavailable" | "unverified";
58
+ status: "unverified" | "unavailable";
59
59
  scope: "pod_metadata";
60
60
  repository?: string | undefined;
61
61
  reason?: string | undefined;
@@ -64,13 +64,13 @@ export declare const runtimeContainerProvenanceSchema: z.ZodEffects<z.ZodObject<
64
64
  }, "strict", z.ZodTypeAny, {
65
65
  kind: "regular" | "init" | "ephemeral";
66
66
  name: string;
67
- runtime_identity_status: "unavailable" | "verified" | "unverified";
67
+ runtime_identity_status: "unverified" | "unavailable" | "verified";
68
68
  consistency_status: "unknown" | "consistent" | "inconsistent";
69
69
  scope?: {
70
70
  namespace?: string | undefined;
71
+ workload_kind?: string | undefined;
71
72
  workload_name?: string | undefined;
72
73
  pod_name?: string | undefined;
73
- workload_kind?: string | undefined;
74
74
  } | undefined;
75
75
  requested_image?: string | undefined;
76
76
  observed_image?: string | undefined;
@@ -79,7 +79,7 @@ export declare const runtimeContainerProvenanceSchema: z.ZodEffects<z.ZodObject<
79
79
  runtime_identity_reason?: string | undefined;
80
80
  consistency_reason?: string | undefined;
81
81
  claimed_source?: {
82
- status: "unavailable" | "unverified";
82
+ status: "unverified" | "unavailable";
83
83
  scope: "pod_metadata";
84
84
  repository?: string | undefined;
85
85
  reason?: string | undefined;
@@ -88,13 +88,13 @@ export declare const runtimeContainerProvenanceSchema: z.ZodEffects<z.ZodObject<
88
88
  }, {
89
89
  kind: "regular" | "init" | "ephemeral";
90
90
  name: string;
91
- runtime_identity_status: "unavailable" | "verified" | "unverified";
91
+ runtime_identity_status: "unverified" | "unavailable" | "verified";
92
92
  consistency_status: "unknown" | "consistent" | "inconsistent";
93
93
  scope?: {
94
94
  namespace?: string | undefined;
95
+ workload_kind?: string | undefined;
95
96
  workload_name?: string | undefined;
96
97
  pod_name?: string | undefined;
97
- workload_kind?: string | undefined;
98
98
  } | undefined;
99
99
  requested_image?: string | undefined;
100
100
  observed_image?: string | undefined;
@@ -103,7 +103,7 @@ export declare const runtimeContainerProvenanceSchema: z.ZodEffects<z.ZodObject<
103
103
  runtime_identity_reason?: string | undefined;
104
104
  consistency_reason?: string | undefined;
105
105
  claimed_source?: {
106
- status: "unavailable" | "unverified";
106
+ status: "unverified" | "unavailable";
107
107
  scope: "pod_metadata";
108
108
  repository?: string | undefined;
109
109
  reason?: string | undefined;
@@ -112,13 +112,13 @@ export declare const runtimeContainerProvenanceSchema: z.ZodEffects<z.ZodObject<
112
112
  }>, {
113
113
  kind: "regular" | "init" | "ephemeral";
114
114
  name: string;
115
- runtime_identity_status: "unavailable" | "verified" | "unverified";
115
+ runtime_identity_status: "unverified" | "unavailable" | "verified";
116
116
  consistency_status: "unknown" | "consistent" | "inconsistent";
117
117
  scope?: {
118
118
  namespace?: string | undefined;
119
+ workload_kind?: string | undefined;
119
120
  workload_name?: string | undefined;
120
121
  pod_name?: string | undefined;
121
- workload_kind?: string | undefined;
122
122
  } | undefined;
123
123
  requested_image?: string | undefined;
124
124
  observed_image?: string | undefined;
@@ -127,7 +127,7 @@ export declare const runtimeContainerProvenanceSchema: z.ZodEffects<z.ZodObject<
127
127
  runtime_identity_reason?: string | undefined;
128
128
  consistency_reason?: string | undefined;
129
129
  claimed_source?: {
130
- status: "unavailable" | "unverified";
130
+ status: "unverified" | "unavailable";
131
131
  scope: "pod_metadata";
132
132
  repository?: string | undefined;
133
133
  reason?: string | undefined;
@@ -136,13 +136,13 @@ export declare const runtimeContainerProvenanceSchema: z.ZodEffects<z.ZodObject<
136
136
  }, {
137
137
  kind: "regular" | "init" | "ephemeral";
138
138
  name: string;
139
- runtime_identity_status: "unavailable" | "verified" | "unverified";
139
+ runtime_identity_status: "unverified" | "unavailable" | "verified";
140
140
  consistency_status: "unknown" | "consistent" | "inconsistent";
141
141
  scope?: {
142
142
  namespace?: string | undefined;
143
+ workload_kind?: string | undefined;
143
144
  workload_name?: string | undefined;
144
145
  pod_name?: string | undefined;
145
- workload_kind?: string | undefined;
146
146
  } | undefined;
147
147
  requested_image?: string | undefined;
148
148
  observed_image?: string | undefined;
@@ -151,7 +151,7 @@ export declare const runtimeContainerProvenanceSchema: z.ZodEffects<z.ZodObject<
151
151
  runtime_identity_reason?: string | undefined;
152
152
  consistency_reason?: string | undefined;
153
153
  claimed_source?: {
154
- status: "unavailable" | "unverified";
154
+ status: "unverified" | "unavailable";
155
155
  scope: "pod_metadata";
156
156
  repository?: string | undefined;
157
157
  reason?: string | undefined;
@@ -170,14 +170,14 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
170
170
  pod_name: z.ZodOptional<z.ZodString>;
171
171
  }, "strict", z.ZodTypeAny, {
172
172
  namespace?: string | undefined;
173
+ workload_kind?: string | undefined;
173
174
  workload_name?: string | undefined;
174
175
  pod_name?: string | undefined;
175
- workload_kind?: string | undefined;
176
176
  }, {
177
177
  namespace?: string | undefined;
178
+ workload_kind?: string | undefined;
178
179
  workload_name?: string | undefined;
179
180
  pod_name?: string | undefined;
180
- workload_kind?: string | undefined;
181
181
  }>>;
182
182
  requested_image: z.ZodOptional<z.ZodString>;
183
183
  observed_image: z.ZodOptional<z.ZodString>;
@@ -194,13 +194,13 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
194
194
  status: z.ZodEnum<["unverified", "unavailable"]>;
195
195
  reason: z.ZodOptional<z.ZodString>;
196
196
  }, "strict", z.ZodTypeAny, {
197
- status: "unavailable" | "unverified";
197
+ status: "unverified" | "unavailable";
198
198
  scope: "pod_metadata";
199
199
  repository?: string | undefined;
200
200
  reason?: string | undefined;
201
201
  commit_sha?: string | undefined;
202
202
  }, {
203
- status: "unavailable" | "unverified";
203
+ status: "unverified" | "unavailable";
204
204
  scope: "pod_metadata";
205
205
  repository?: string | undefined;
206
206
  reason?: string | undefined;
@@ -209,13 +209,13 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
209
209
  }, "strict", z.ZodTypeAny, {
210
210
  kind: "regular" | "init" | "ephemeral";
211
211
  name: string;
212
- runtime_identity_status: "unavailable" | "verified" | "unverified";
212
+ runtime_identity_status: "unverified" | "unavailable" | "verified";
213
213
  consistency_status: "unknown" | "consistent" | "inconsistent";
214
214
  scope?: {
215
215
  namespace?: string | undefined;
216
+ workload_kind?: string | undefined;
216
217
  workload_name?: string | undefined;
217
218
  pod_name?: string | undefined;
218
- workload_kind?: string | undefined;
219
219
  } | undefined;
220
220
  requested_image?: string | undefined;
221
221
  observed_image?: string | undefined;
@@ -224,7 +224,7 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
224
224
  runtime_identity_reason?: string | undefined;
225
225
  consistency_reason?: string | undefined;
226
226
  claimed_source?: {
227
- status: "unavailable" | "unverified";
227
+ status: "unverified" | "unavailable";
228
228
  scope: "pod_metadata";
229
229
  repository?: string | undefined;
230
230
  reason?: string | undefined;
@@ -233,13 +233,13 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
233
233
  }, {
234
234
  kind: "regular" | "init" | "ephemeral";
235
235
  name: string;
236
- runtime_identity_status: "unavailable" | "verified" | "unverified";
236
+ runtime_identity_status: "unverified" | "unavailable" | "verified";
237
237
  consistency_status: "unknown" | "consistent" | "inconsistent";
238
238
  scope?: {
239
239
  namespace?: string | undefined;
240
+ workload_kind?: string | undefined;
240
241
  workload_name?: string | undefined;
241
242
  pod_name?: string | undefined;
242
- workload_kind?: string | undefined;
243
243
  } | undefined;
244
244
  requested_image?: string | undefined;
245
245
  observed_image?: string | undefined;
@@ -248,7 +248,7 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
248
248
  runtime_identity_reason?: string | undefined;
249
249
  consistency_reason?: string | undefined;
250
250
  claimed_source?: {
251
- status: "unavailable" | "unverified";
251
+ status: "unverified" | "unavailable";
252
252
  scope: "pod_metadata";
253
253
  repository?: string | undefined;
254
254
  reason?: string | undefined;
@@ -257,13 +257,13 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
257
257
  }>, {
258
258
  kind: "regular" | "init" | "ephemeral";
259
259
  name: string;
260
- runtime_identity_status: "unavailable" | "verified" | "unverified";
260
+ runtime_identity_status: "unverified" | "unavailable" | "verified";
261
261
  consistency_status: "unknown" | "consistent" | "inconsistent";
262
262
  scope?: {
263
263
  namespace?: string | undefined;
264
+ workload_kind?: string | undefined;
264
265
  workload_name?: string | undefined;
265
266
  pod_name?: string | undefined;
266
- workload_kind?: string | undefined;
267
267
  } | undefined;
268
268
  requested_image?: string | undefined;
269
269
  observed_image?: string | undefined;
@@ -272,7 +272,7 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
272
272
  runtime_identity_reason?: string | undefined;
273
273
  consistency_reason?: string | undefined;
274
274
  claimed_source?: {
275
- status: "unavailable" | "unverified";
275
+ status: "unverified" | "unavailable";
276
276
  scope: "pod_metadata";
277
277
  repository?: string | undefined;
278
278
  reason?: string | undefined;
@@ -281,13 +281,13 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
281
281
  }, {
282
282
  kind: "regular" | "init" | "ephemeral";
283
283
  name: string;
284
- runtime_identity_status: "unavailable" | "verified" | "unverified";
284
+ runtime_identity_status: "unverified" | "unavailable" | "verified";
285
285
  consistency_status: "unknown" | "consistent" | "inconsistent";
286
286
  scope?: {
287
287
  namespace?: string | undefined;
288
+ workload_kind?: string | undefined;
288
289
  workload_name?: string | undefined;
289
290
  pod_name?: string | undefined;
290
- workload_kind?: string | undefined;
291
291
  } | undefined;
292
292
  requested_image?: string | undefined;
293
293
  observed_image?: string | undefined;
@@ -296,7 +296,7 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
296
296
  runtime_identity_reason?: string | undefined;
297
297
  consistency_reason?: string | undefined;
298
298
  claimed_source?: {
299
- status: "unavailable" | "unverified";
299
+ status: "unverified" | "unavailable";
300
300
  scope: "pod_metadata";
301
301
  repository?: string | undefined;
302
302
  reason?: string | undefined;
@@ -312,13 +312,13 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
312
312
  containers: {
313
313
  kind: "regular" | "init" | "ephemeral";
314
314
  name: string;
315
- runtime_identity_status: "unavailable" | "verified" | "unverified";
315
+ runtime_identity_status: "unverified" | "unavailable" | "verified";
316
316
  consistency_status: "unknown" | "consistent" | "inconsistent";
317
317
  scope?: {
318
318
  namespace?: string | undefined;
319
+ workload_kind?: string | undefined;
319
320
  workload_name?: string | undefined;
320
321
  pod_name?: string | undefined;
321
- workload_kind?: string | undefined;
322
322
  } | undefined;
323
323
  requested_image?: string | undefined;
324
324
  observed_image?: string | undefined;
@@ -327,7 +327,7 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
327
327
  runtime_identity_reason?: string | undefined;
328
328
  consistency_reason?: string | undefined;
329
329
  claimed_source?: {
330
- status: "unavailable" | "unverified";
330
+ status: "unverified" | "unavailable";
331
331
  scope: "pod_metadata";
332
332
  repository?: string | undefined;
333
333
  reason?: string | undefined;
@@ -341,13 +341,13 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
341
341
  containers: {
342
342
  kind: "regular" | "init" | "ephemeral";
343
343
  name: string;
344
- runtime_identity_status: "unavailable" | "verified" | "unverified";
344
+ runtime_identity_status: "unverified" | "unavailable" | "verified";
345
345
  consistency_status: "unknown" | "consistent" | "inconsistent";
346
346
  scope?: {
347
347
  namespace?: string | undefined;
348
+ workload_kind?: string | undefined;
348
349
  workload_name?: string | undefined;
349
350
  pod_name?: string | undefined;
350
- workload_kind?: string | undefined;
351
351
  } | undefined;
352
352
  requested_image?: string | undefined;
353
353
  observed_image?: string | undefined;
@@ -356,7 +356,7 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
356
356
  runtime_identity_reason?: string | undefined;
357
357
  consistency_reason?: string | undefined;
358
358
  claimed_source?: {
359
- status: "unavailable" | "unverified";
359
+ status: "unverified" | "unavailable";
360
360
  scope: "pod_metadata";
361
361
  repository?: string | undefined;
362
362
  reason?: string | undefined;
@@ -372,13 +372,13 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
372
372
  containers: {
373
373
  kind: "regular" | "init" | "ephemeral";
374
374
  name: string;
375
- runtime_identity_status: "unavailable" | "verified" | "unverified";
375
+ runtime_identity_status: "unverified" | "unavailable" | "verified";
376
376
  consistency_status: "unknown" | "consistent" | "inconsistent";
377
377
  scope?: {
378
378
  namespace?: string | undefined;
379
+ workload_kind?: string | undefined;
379
380
  workload_name?: string | undefined;
380
381
  pod_name?: string | undefined;
381
- workload_kind?: string | undefined;
382
382
  } | undefined;
383
383
  requested_image?: string | undefined;
384
384
  observed_image?: string | undefined;
@@ -387,7 +387,7 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
387
387
  runtime_identity_reason?: string | undefined;
388
388
  consistency_reason?: string | undefined;
389
389
  claimed_source?: {
390
- status: "unavailable" | "unverified";
390
+ status: "unverified" | "unavailable";
391
391
  scope: "pod_metadata";
392
392
  repository?: string | undefined;
393
393
  reason?: string | undefined;
@@ -401,13 +401,13 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
401
401
  containers: {
402
402
  kind: "regular" | "init" | "ephemeral";
403
403
  name: string;
404
- runtime_identity_status: "unavailable" | "verified" | "unverified";
404
+ runtime_identity_status: "unverified" | "unavailable" | "verified";
405
405
  consistency_status: "unknown" | "consistent" | "inconsistent";
406
406
  scope?: {
407
407
  namespace?: string | undefined;
408
+ workload_kind?: string | undefined;
408
409
  workload_name?: string | undefined;
409
410
  pod_name?: string | undefined;
410
- workload_kind?: string | undefined;
411
411
  } | undefined;
412
412
  requested_image?: string | undefined;
413
413
  observed_image?: string | undefined;
@@ -416,7 +416,7 @@ export declare const runtimeWorkloadProvenanceSchema: z.ZodEffects<z.ZodObject<{
416
416
  runtime_identity_reason?: string | undefined;
417
417
  consistency_reason?: string | undefined;
418
418
  claimed_source?: {
419
- status: "unavailable" | "unverified";
419
+ status: "unverified" | "unavailable";
420
420
  scope: "pod_metadata";
421
421
  repository?: string | undefined;
422
422
  reason?: string | undefined;
@@ -0,0 +1,44 @@
1
+ import { z } from 'zod';
2
+ export declare const SERVICE_DISCOVERY_LIMITS: {
3
+ readonly identity_bytes: 120;
4
+ readonly telemetry_proofs: 20;
5
+ readonly query_window_ns: "3600000000000";
6
+ readonly review_lifetime_ms: number;
7
+ readonly signed_timestamp_max_ns: "9223372036854775807";
8
+ };
9
+ export declare function serviceDiscoveryTextSchema(maxBytes: number, multiline?: boolean): z.ZodEffects<z.ZodString, string, string>;
10
+ export declare const serviceDiscoveryTokenSchema: z.ZodString;
11
+ export declare const serviceDiscoveryDigestSchema: z.ZodString;
12
+ export declare const serviceDiscoverySourceIdSchema: z.ZodString;
13
+ export declare const serviceDiscoveryRevisionSchema: z.ZodNumber;
14
+ export declare const serviceDiscoveryEpochMsSchema: z.ZodNumber;
15
+ export declare const serviceDiscoveryTimestampNsSchema: z.ZodEffects<z.ZodString, string, string>;
16
+ export declare const serviceDiscoveryUtcTimeSchema: z.ZodEffects<z.ZodString, string, string>;
17
+ export declare const serviceDiscoverySemanticNameSchema: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
18
+ export declare const serviceDiscoveryNamespaceSchema: z.ZodEffects<z.ZodString, string, string>;
19
+ export declare const serviceDiscoveryKubernetesNameSchema: z.ZodEffects<z.ZodString, string, string>;
20
+ export declare const serviceDiscoveryScopeSchema: z.ZodReadonly<z.ZodObject<{
21
+ account_id: z.ZodString;
22
+ workspace_id: z.ZodString;
23
+ topology_version_id: z.ZodString;
24
+ }, "strict", z.ZodTypeAny, {
25
+ account_id: string;
26
+ workspace_id: string;
27
+ topology_version_id: string;
28
+ }, {
29
+ account_id: string;
30
+ workspace_id: string;
31
+ topology_version_id: string;
32
+ }>>;
33
+ export declare const serviceDiscoverySemanticIdentitySchema: z.ZodReadonly<z.ZodObject<{
34
+ service_name: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
35
+ service_namespace: z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
36
+ }, "strict", z.ZodTypeAny, {
37
+ service_name: string;
38
+ service_namespace: string | null;
39
+ }, {
40
+ service_name: string;
41
+ service_namespace: string | null;
42
+ }>>;
43
+ export type ServiceDiscoveryScope = z.infer<typeof serviceDiscoveryScopeSchema>;
44
+ export type ServiceDiscoverySemanticIdentity = z.infer<typeof serviceDiscoverySemanticIdentitySchema>;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.serviceDiscoverySemanticIdentitySchema = exports.serviceDiscoveryScopeSchema = exports.serviceDiscoveryKubernetesNameSchema = exports.serviceDiscoveryNamespaceSchema = exports.serviceDiscoverySemanticNameSchema = exports.serviceDiscoveryUtcTimeSchema = exports.serviceDiscoveryTimestampNsSchema = exports.serviceDiscoveryEpochMsSchema = exports.serviceDiscoveryRevisionSchema = exports.serviceDiscoverySourceIdSchema = exports.serviceDiscoveryDigestSchema = exports.serviceDiscoveryTokenSchema = exports.SERVICE_DISCOVERY_LIMITS = void 0;
4
+ exports.serviceDiscoveryTextSchema = serviceDiscoveryTextSchema;
5
+ const zod_1 = require("zod");
6
+ exports.SERVICE_DISCOVERY_LIMITS = {
7
+ identity_bytes: 120,
8
+ telemetry_proofs: 20,
9
+ query_window_ns: '3600000000000',
10
+ review_lifetime_ms: 30 * 60 * 1000,
11
+ signed_timestamp_max_ns: '9223372036854775807',
12
+ };
13
+ // Browser-safe byte accounting. Reject malformed UTF-16 instead of silently
14
+ // replacing it, so server and browser cannot hash different identity strings.
15
+ function utf8Bytes(value) {
16
+ let bytes = 0;
17
+ for (const character of value) {
18
+ const point = character.codePointAt(0);
19
+ if (point >= 0xd800 && point <= 0xdfff)
20
+ return Infinity;
21
+ bytes += point <= 0x7f ? 1 : point <= 0x7ff ? 2 : point <= 0xffff ? 3 : 4;
22
+ }
23
+ return bytes;
24
+ }
25
+ function serviceDiscoveryTextSchema(maxBytes, multiline = false) {
26
+ return zod_1.z.string().min(1).max(maxBytes).refine((value) => value === value.trim() && utf8Bytes(value) <= maxBytes &&
27
+ !(multiline ? /[\u0000-\u0008\u000b-\u001f\u007f]/ : /[\u0000-\u001f\u007f]/).test(value), 'Invalid bounded text');
28
+ }
29
+ exports.serviceDiscoveryTokenSchema = zod_1.z.string().min(1).max(120).regex(/^[A-Za-z0-9][A-Za-z0-9_.:-]*$/);
30
+ exports.serviceDiscoveryDigestSchema = zod_1.z.string().regex(/^[a-f0-9]{64}$/);
31
+ exports.serviceDiscoverySourceIdSchema = zod_1.z.string().regex(/^[a-f0-9]{24}$/);
32
+ exports.serviceDiscoveryRevisionSchema = zod_1.z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
33
+ exports.serviceDiscoveryEpochMsSchema = zod_1.z.number().int().nonnegative().max(8640000000000000);
34
+ exports.serviceDiscoveryTimestampNsSchema = zod_1.z.string().regex(/^(?:0|[1-9][0-9]{0,18})$/)
35
+ .refine((value) => /^(?:0|[1-9][0-9]{0,18})$/.test(value) &&
36
+ BigInt(value) <= BigInt(exports.SERVICE_DISCOVERY_LIMITS.signed_timestamp_max_ns), 'Invalid signed timestamp');
37
+ exports.serviceDiscoveryUtcTimeSchema = zod_1.z.string().max(30).refine((value) => {
38
+ if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,9})?Z$/.test(value))
39
+ return false;
40
+ const parsed = Date.parse(value);
41
+ return Number.isFinite(parsed) && new Date(parsed).toISOString().slice(0, 19) === value.slice(0, 19);
42
+ }, 'Invalid UTC timestamp');
43
+ exports.serviceDiscoverySemanticNameSchema = serviceDiscoveryTextSchema(120).refine((value) => !/:\/\/|@|\bBearer\s|\[(?:REDACTED|URL_REDACTED|EMAIL_REDACTED|STRUCTURED_LOG_OMITTED)\]/i.test(value), 'Invalid semantic identity');
44
+ const dnsLabel = (value) => value.length <= 63 && /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(value);
45
+ exports.serviceDiscoveryNamespaceSchema = zod_1.z.string().min(1).max(63).refine(dnsLabel, 'Invalid namespace');
46
+ exports.serviceDiscoveryKubernetesNameSchema = zod_1.z.string().min(1).max(120)
47
+ .refine((value) => value.split('.').every(dnsLabel), 'Invalid Kubernetes name');
48
+ exports.serviceDiscoveryScopeSchema = zod_1.z.object({
49
+ account_id: exports.serviceDiscoveryTokenSchema,
50
+ workspace_id: exports.serviceDiscoveryTokenSchema,
51
+ topology_version_id: exports.serviceDiscoveryTokenSchema,
52
+ }).strict().readonly();
53
+ exports.serviceDiscoverySemanticIdentitySchema = zod_1.z.object({
54
+ service_name: exports.serviceDiscoverySemanticNameSchema,
55
+ service_namespace: exports.serviceDiscoverySemanticNameSchema.nullable(),
56
+ }).strict().readonly();
57
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/service-discovery/common.ts"],"names":[],"mappings":";;;AAsBA,gEAKC;AA3BD,6BAAwB;AAEX,QAAA,wBAAwB,GAAG;IACtC,cAAc,EAAE,GAAG;IACnB,gBAAgB,EAAE,EAAE;IACpB,eAAe,EAAE,eAAe;IAChC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;IAClC,uBAAuB,EAAE,qBAAqB;CACtC,CAAC;AAEX,4EAA4E;AAC5E,8EAA8E;AAC9E,SAAS,SAAS,CAAC,KAAa;IAC9B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,SAAS,IAAI,KAAK,EAAE,CAAC;QAC9B,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC,CAAE,CAAC;QACxC,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,MAAM;YAAE,OAAO,QAAQ,CAAC;QACxD,KAAK,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,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