@skrr-ai/signals 0.1.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.
- package/CHANGELOG.md +11 -0
- package/README.md +41 -0
- package/contracts/README.md +28 -0
- package/contracts/asyncapi.v1.json +80 -0
- package/contracts/public-signal-source.v1.schema.json +58 -0
- package/contracts/signal-envelope.v1.schema.json +94 -0
- package/contracts/signal-receipt.v1.schema.json +27 -0
- package/contracts/signal-source-credential-grant.v1.schema.json +26 -0
- package/contracts/signal-type-definition.v1.schema.json +146 -0
- package/dist/index.cjs +563 -0
- package/dist/index.d.cts +254 -0
- package/dist/index.d.ts +254 -0
- package/dist/index.js +527 -0
- package/package.json +62 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
- First stable public release of the CloudEvents 1.0 Signal contracts and
|
|
6
|
+
generic publisher SDK.
|
|
7
|
+
|
|
8
|
+
## 0.1.0-alpha.0
|
|
9
|
+
|
|
10
|
+
- Initial CloudEvents 1.0 Signal contract, source contracts, receipt contracts,
|
|
11
|
+
and generic publisher SDK.
|
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# `@skrr-ai/signals`
|
|
2
|
+
|
|
3
|
+
CloudEvents-native public contracts and a small, transport-only publisher for
|
|
4
|
+
the OverSky Signal Plane.
|
|
5
|
+
|
|
6
|
+
This package submits immutable facts to `POST /v1/signals`. It does **not**
|
|
7
|
+
create a Commitment, select a Monitor, wake an Agent, or grant any execution
|
|
8
|
+
authority. Those are server-owned control-plane decisions.
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { SignalPublisher } from '@skrr-ai/signals';
|
|
12
|
+
|
|
13
|
+
const signals = new SignalPublisher({
|
|
14
|
+
endpoint: 'https://api.oversky.ai/v1/signals',
|
|
15
|
+
source: 'urn:oversky:signal-source:src_payments_production',
|
|
16
|
+
token: process.env.OVERSKY_SIGNAL_TOKEN!,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
await signals.emit({
|
|
20
|
+
type: 'io.acme.payments.http-request-failed.v1',
|
|
21
|
+
subject: 'service/payments-api',
|
|
22
|
+
dataschema:
|
|
23
|
+
'https://schemas.acme.example/signals/http-request-failed/1.0.0.json',
|
|
24
|
+
data: {
|
|
25
|
+
'service.name': 'payments-api',
|
|
26
|
+
'deployment.environment.name': 'production',
|
|
27
|
+
'http.route': 'POST /payments',
|
|
28
|
+
'http.response.status_code': 500,
|
|
29
|
+
'error.type': 'db-connection-timeout',
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Use the versioned JSON Schema and AsyncAPI files under [`contracts/`](./contracts)
|
|
35
|
+
to integrate non-JavaScript producers. The package serializes structured-mode
|
|
36
|
+
CloudEvents (`application/cloudevents+json`) and keeps the CloudEvents `id`
|
|
37
|
+
stable across retries.
|
|
38
|
+
|
|
39
|
+
The Signal Source credential determines the tenant and allowed source. Never
|
|
40
|
+
put workspace, Commitment, Agent, authorization, request bodies, cookies,
|
|
41
|
+
access tokens, or arbitrary stack traces in an event payload.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Signal Plane public contracts
|
|
2
|
+
|
|
3
|
+
These versioned artifacts are the public, partner-facing contract for the
|
|
4
|
+
OverSky Signal Plane. They are shipped with `@skrr-ai/signals` so a producer
|
|
5
|
+
can pin an exact version without scraping application documentation.
|
|
6
|
+
|
|
7
|
+
- `signal-envelope.v1.schema.json` — CloudEvents 1.0 structured JSON envelope
|
|
8
|
+
accepted by `POST /v1/signals`.
|
|
9
|
+
- `signal-type-definition.v1.schema.json` — source-owned type registry entry
|
|
10
|
+
and safe field classifications for the Monitor builder.
|
|
11
|
+
- `public-signal-source.v1.schema.json` — safe source and credential result
|
|
12
|
+
shapes; it intentionally excludes credential secrets.
|
|
13
|
+
- `signal-source-credential-grant.v1.schema.json` — one-time credential
|
|
14
|
+
creation/rotation result. Its secret is write-only and must never be stored
|
|
15
|
+
or logged by a client.
|
|
16
|
+
- `signal-receipt.v1.schema.json` — the durable-acceptance response shape.
|
|
17
|
+
- `asyncapi.v1.json` — AsyncAPI 2.6 description of the HTTP publish channel.
|
|
18
|
+
|
|
19
|
+
Versioning policy:
|
|
20
|
+
|
|
21
|
+
1. Every schema `$id` is immutable once released.
|
|
22
|
+
2. Breaking data changes require a new major Signal `type` (`…v2`) and a new
|
|
23
|
+
schema URI.
|
|
24
|
+
3. Compatible optional-field additions create a new immutable schema version;
|
|
25
|
+
active Monitors remain pinned to their approved compatibility range.
|
|
26
|
+
4. A source credential, not any event payload field, determines tenancy and
|
|
27
|
+
source identity. These contracts never accept Monitor, Commitment, Agent,
|
|
28
|
+
workspace, or authorization selectors in Signal data.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"asyncapi": "2.6.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "OverSky Signal Plane API",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Source-scoped CloudEvents ingestion. A successful receipt only proves durable acceptance; it does not directly invoke a Monitor, Commitment, or Agent."
|
|
7
|
+
},
|
|
8
|
+
"servers": {
|
|
9
|
+
"production": {
|
|
10
|
+
"url": "api.oversky.ai",
|
|
11
|
+
"protocol": "https",
|
|
12
|
+
"description": "OverSky public API"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"channels": {
|
|
16
|
+
"/v1/signals": {
|
|
17
|
+
"description": "Submit a single Signal as CloudEvents 1.0 structured JSON.",
|
|
18
|
+
"publish": {
|
|
19
|
+
"operationId": "publishSignal",
|
|
20
|
+
"summary": "Durably submit one source-scoped Signal",
|
|
21
|
+
"message": {
|
|
22
|
+
"$ref": "#/components/messages/Signal"
|
|
23
|
+
},
|
|
24
|
+
"bindings": {
|
|
25
|
+
"http": {
|
|
26
|
+
"type": "request",
|
|
27
|
+
"method": "POST"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"components": {
|
|
34
|
+
"securitySchemes": {
|
|
35
|
+
"sourceBearer": {
|
|
36
|
+
"type": "http",
|
|
37
|
+
"scheme": "bearer",
|
|
38
|
+
"bearerFormat": "OverSky Signal Source Token",
|
|
39
|
+
"description": "A source-scoped token. It binds tenant and source identity; it is not a user API key."
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"messages": {
|
|
43
|
+
"Signal": {
|
|
44
|
+
"name": "Signal",
|
|
45
|
+
"title": "CloudEvents Signal v1",
|
|
46
|
+
"contentType": "application/cloudevents+json",
|
|
47
|
+
"payload": {
|
|
48
|
+
"$ref": "./signal-envelope.v1.schema.json"
|
|
49
|
+
},
|
|
50
|
+
"examples": [
|
|
51
|
+
{
|
|
52
|
+
"name": "httpRequestFailed",
|
|
53
|
+
"payload": {
|
|
54
|
+
"specversion": "1.0",
|
|
55
|
+
"id": "evt_01JABC",
|
|
56
|
+
"source": "urn:oversky:signal-source:src_payments_production",
|
|
57
|
+
"type": "io.acme.payments.http-request-failed.v1",
|
|
58
|
+
"subject": "service/payments-api",
|
|
59
|
+
"time": "2026-08-24T22:00:00Z",
|
|
60
|
+
"datacontenttype": "application/json",
|
|
61
|
+
"dataschema": "https://schemas.acme.example/signals/http-request-failed/1.0.0.json",
|
|
62
|
+
"data": {
|
|
63
|
+
"service.name": "payments-api",
|
|
64
|
+
"deployment.environment.name": "production",
|
|
65
|
+
"http.route": "POST /payments",
|
|
66
|
+
"http.response.status_code": 500,
|
|
67
|
+
"error.type": "db-connection-timeout"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"security": [
|
|
76
|
+
{
|
|
77
|
+
"sourceBearer": []
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.oversky.dev/signals/public-signal-source/1.0.0.json",
|
|
4
|
+
"title": "OverSky Public Signal Source v1",
|
|
5
|
+
"description": "Safe Signal Source API response. Credential secrets are excluded and appear only in a separate one-time grant.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["sourceId", "workspaceId", "label", "transport", "status", "cloudEventSource", "typeDefinitions", "credentialCount", "policy", "health", "createdAt", "updatedAt"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"sourceId": { "type": "string", "minLength": 1 },
|
|
11
|
+
"workspaceId": { "type": "string", "minLength": 1 },
|
|
12
|
+
"label": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
13
|
+
"transport": { "enum": ["sdk", "direct_api", "webhook", "oauth_connector", "otel", "pull_connector"] },
|
|
14
|
+
"status": { "enum": ["active", "paused", "disabled"] },
|
|
15
|
+
"cloudEventSource": { "type": "string", "format": "uri" },
|
|
16
|
+
"typeDefinitions": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": { "$ref": "signal-type-definition.v1.schema.json" }
|
|
19
|
+
},
|
|
20
|
+
"credentialCount": { "type": "integer", "minimum": 0, "maximum": 20 },
|
|
21
|
+
"policy": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"required": ["limits", "rateLimit", "redaction", "retention"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"limits": { "type": "object", "required": ["maxEventBytes", "maxDataBytes", "maxDataDepth", "maxDataFields"], "properties": { "maxEventBytes": { "type": "integer", "minimum": 1 }, "maxDataBytes": { "type": "integer", "minimum": 1 }, "maxDataDepth": { "type": "integer", "minimum": 1 }, "maxDataFields": { "type": "integer", "minimum": 1 } } },
|
|
26
|
+
"rateLimit": { "type": "object", "required": ["maxPerMinute"], "properties": { "maxPerMinute": { "type": "integer", "minimum": 1 } } },
|
|
27
|
+
"redaction": { "type": "object", "required": ["additionalSensitiveKeys", "retainTracestate"], "properties": { "additionalSensitiveKeys": { "type": "array", "items": { "type": "string" } }, "retainTracestate": { "type": "boolean" } } },
|
|
28
|
+
"retention": { "type": "object", "required": ["normalizedSignalDays"], "properties": { "normalizedSignalDays": { "type": "integer", "minimum": 1, "maximum": 3650 }, "residency": { "type": "string", "maxLength": 80 } } }
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"health": { "type": "object", "properties": { "lastAcceptedAt": { "type": "string", "format": "date-time" }, "lastRejectedAt": { "type": "string", "format": "date-time" }, "lastErrorCode": { "type": "string", "maxLength": 120 } } },
|
|
32
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
33
|
+
"updatedAt": { "type": "string", "format": "date-time" }
|
|
34
|
+
},
|
|
35
|
+
"$defs": {
|
|
36
|
+
"publicCredential": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": ["id", "credentialId", "sourceId", "kind", "status", "label", "algorithm", "notBefore", "createdAt"],
|
|
40
|
+
"properties": {
|
|
41
|
+
"id": { "type": "string", "minLength": 1 },
|
|
42
|
+
"credentialId": { "type": "string", "minLength": 1 },
|
|
43
|
+
"sourceId": { "type": "string", "minLength": 1 },
|
|
44
|
+
"kind": { "enum": ["bearer_token", "webhook_hmac"] },
|
|
45
|
+
"status": { "enum": ["active", "revoked", "expired"] },
|
|
46
|
+
"label": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
47
|
+
"algorithm": { "enum": ["bearer-token", "hmac-sha256"] },
|
|
48
|
+
"notBefore": { "type": "string", "format": "date-time" },
|
|
49
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
50
|
+
"lastUsedAt": { "type": "string", "format": "date-time" },
|
|
51
|
+
"expiresAt": { "type": "string", "format": "date-time" },
|
|
52
|
+
"revokedAt": { "type": "string", "format": "date-time" },
|
|
53
|
+
"revokeReason": { "type": "string", "maxLength": 240 },
|
|
54
|
+
"lastRotatedAt": { "type": "string", "format": "date-time" }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.oversky.dev/signals/signal-envelope/1.0.0.json",
|
|
4
|
+
"title": "OverSky Signal Envelope v1",
|
|
5
|
+
"description": "CloudEvents 1.0 structured JSON Signal accepted by POST /v1/signals. The source credential determines tenant and source authorization.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"specversion",
|
|
9
|
+
"id",
|
|
10
|
+
"source",
|
|
11
|
+
"type",
|
|
12
|
+
"time",
|
|
13
|
+
"datacontenttype",
|
|
14
|
+
"dataschema",
|
|
15
|
+
"data"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"specversion": {
|
|
19
|
+
"const": "1.0"
|
|
20
|
+
},
|
|
21
|
+
"id": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1,
|
|
24
|
+
"maxLength": 512,
|
|
25
|
+
"description": "Stable occurrence identity. Source plus id is the deduplication key."
|
|
26
|
+
},
|
|
27
|
+
"source": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"minLength": 1,
|
|
30
|
+
"maxLength": 2048,
|
|
31
|
+
"pattern": "^\\S+$",
|
|
32
|
+
"description": "Canonical Signal Source URI. It must match the source-scoped credential."
|
|
33
|
+
},
|
|
34
|
+
"type": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9][a-z0-9-]*)+\\.v[1-9][0-9]*$",
|
|
37
|
+
"description": "Producer-owned reverse-DNS type that carries its major version."
|
|
38
|
+
},
|
|
39
|
+
"subject": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 1,
|
|
42
|
+
"maxLength": 2048
|
|
43
|
+
},
|
|
44
|
+
"time": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"format": "date-time",
|
|
47
|
+
"description": "When the observed fact occurred; receipt time is server-owned and separate."
|
|
48
|
+
},
|
|
49
|
+
"datacontenttype": {
|
|
50
|
+
"const": "application/json"
|
|
51
|
+
},
|
|
52
|
+
"dataschema": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"format": "uri",
|
|
55
|
+
"minLength": 1,
|
|
56
|
+
"description": "Immutable URI for the data schema version."
|
|
57
|
+
},
|
|
58
|
+
"data": {
|
|
59
|
+
"$ref": "#/$defs/jsonValue",
|
|
60
|
+
"description": "Bounded, structured fact data. Source policy and the registered data schema add stricter limits."
|
|
61
|
+
},
|
|
62
|
+
"traceparent": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"pattern": "^[\u0021-\u007E]+$",
|
|
65
|
+
"description": "W3C Trace Context correlation only; it is never an authorization value."
|
|
66
|
+
},
|
|
67
|
+
"tracestate": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"maxLength": 512
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"not": {
|
|
73
|
+
"required": ["data_base64"]
|
|
74
|
+
},
|
|
75
|
+
"additionalProperties": true,
|
|
76
|
+
"$defs": {
|
|
77
|
+
"jsonValue": {
|
|
78
|
+
"anyOf": [
|
|
79
|
+
{ "type": "null" },
|
|
80
|
+
{ "type": "boolean" },
|
|
81
|
+
{ "type": "number" },
|
|
82
|
+
{ "type": "string" },
|
|
83
|
+
{
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": { "$ref": "#/$defs/jsonValue" }
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "object",
|
|
89
|
+
"additionalProperties": { "$ref": "#/$defs/jsonValue" }
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.oversky.dev/signals/signal-receipt/1.0.0.json",
|
|
4
|
+
"title": "OverSky Signal Receipt v1",
|
|
5
|
+
"description": "A durable Signal acceptance response. Accepted or duplicate confirms receipt ownership, not that a Monitor or Agent has executed.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"receiptId",
|
|
10
|
+
"sourceId",
|
|
11
|
+
"canonicalSource",
|
|
12
|
+
"eventId",
|
|
13
|
+
"outcome",
|
|
14
|
+
"processingStatus",
|
|
15
|
+
"receivedAt"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"receiptId": { "type": "string", "minLength": 1 },
|
|
19
|
+
"sourceId": { "type": "string", "minLength": 1 },
|
|
20
|
+
"canonicalSource": { "type": "string", "minLength": 1 },
|
|
21
|
+
"eventId": { "type": "string", "minLength": 1 },
|
|
22
|
+
"outcome": { "enum": ["accepted", "duplicate"] },
|
|
23
|
+
"processingStatus": { "enum": ["pending", "processing", "completed"] },
|
|
24
|
+
"receivedAt": { "type": "string", "format": "date-time" },
|
|
25
|
+
"requestId": { "type": "string", "minLength": 1 }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.oversky.dev/signals/signal-source-credential-grant/1.0.0.json",
|
|
4
|
+
"title": "OverSky Signal Source Credential Grant v1",
|
|
5
|
+
"description": "One-time source credential creation/rotation response. The secret must not be retained in source read responses, logs, or analytics.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["credential", "secret", "secretKind", "shownOnce"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"credential": {
|
|
11
|
+
"$ref": "public-signal-source.v1.schema.json#/$defs/publicCredential"
|
|
12
|
+
},
|
|
13
|
+
"secret": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"writeOnly": true,
|
|
17
|
+
"description": "Display exactly once over an authenticated TLS response. Never include in a PublicSignalSource response."
|
|
18
|
+
},
|
|
19
|
+
"secretKind": {
|
|
20
|
+
"enum": ["bearer_token", "webhook_hmac"]
|
|
21
|
+
},
|
|
22
|
+
"shownOnce": {
|
|
23
|
+
"const": true
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.oversky.dev/signals/signal-type-definition/1.0.0.json",
|
|
4
|
+
"title": "OverSky Signal Type Definition v1",
|
|
5
|
+
"description": "A source-approved type, immutable data schema URI, and safe field catalogue. Field names are declared semantic names, never arbitrary JSONPath expressions.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"type",
|
|
10
|
+
"dataschema",
|
|
11
|
+
"displayName",
|
|
12
|
+
"description",
|
|
13
|
+
"subjectKinds",
|
|
14
|
+
"fields",
|
|
15
|
+
"compatibility"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"type": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9][a-z0-9-]*)+\\.v[1-9][0-9]*$"
|
|
21
|
+
},
|
|
22
|
+
"dataschema": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"format": "uri"
|
|
25
|
+
},
|
|
26
|
+
"displayName": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1,
|
|
29
|
+
"maxLength": 160
|
|
30
|
+
},
|
|
31
|
+
"description": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"minLength": 1,
|
|
34
|
+
"maxLength": 2000
|
|
35
|
+
},
|
|
36
|
+
"subjectKinds": {
|
|
37
|
+
"type": "array",
|
|
38
|
+
"minItems": 1,
|
|
39
|
+
"uniqueItems": true,
|
|
40
|
+
"items": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"minLength": 1,
|
|
43
|
+
"maxLength": 80
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"fields": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"minItems": 1,
|
|
49
|
+
"items": { "$ref": "#/$defs/field" }
|
|
50
|
+
},
|
|
51
|
+
"compatibility": {
|
|
52
|
+
"const": "backward_compatible_additions"
|
|
53
|
+
},
|
|
54
|
+
"schemaVersion": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"minLength": 1,
|
|
57
|
+
"maxLength": 120,
|
|
58
|
+
"description": "Source-local reviewed schema revision label."
|
|
59
|
+
},
|
|
60
|
+
"enabled": {
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"description": "Whether this registered type/schema pair may currently be ingested."
|
|
63
|
+
},
|
|
64
|
+
"deprecatedAt": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"format": "date-time"
|
|
67
|
+
},
|
|
68
|
+
"migrationGuide": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"format": "uri"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"$defs": {
|
|
74
|
+
"field": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"required": [
|
|
78
|
+
"name",
|
|
79
|
+
"displayName",
|
|
80
|
+
"dataType",
|
|
81
|
+
"classifications",
|
|
82
|
+
"cardinality"
|
|
83
|
+
],
|
|
84
|
+
"properties": {
|
|
85
|
+
"name": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"pattern": "^[a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)*$",
|
|
88
|
+
"description": "Declared semantic field name, for example service.name or http.route."
|
|
89
|
+
},
|
|
90
|
+
"displayName": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"minLength": 1,
|
|
93
|
+
"maxLength": 160
|
|
94
|
+
},
|
|
95
|
+
"dataType": {
|
|
96
|
+
"enum": ["string", "number", "integer", "boolean", "timestamp", "uri"]
|
|
97
|
+
},
|
|
98
|
+
"classifications": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"minItems": 1,
|
|
101
|
+
"uniqueItems": true,
|
|
102
|
+
"items": {
|
|
103
|
+
"enum": ["filterable", "groupable", "displayable", "sensitive", "evidence_only"]
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"required": { "type": "boolean" },
|
|
107
|
+
"cardinality": {
|
|
108
|
+
"enum": ["low", "bounded", "high"]
|
|
109
|
+
},
|
|
110
|
+
"maxLength": {
|
|
111
|
+
"type": "integer",
|
|
112
|
+
"minimum": 1,
|
|
113
|
+
"maximum": 16384
|
|
114
|
+
},
|
|
115
|
+
"description": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"maxLength": 2000
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"allOf": [
|
|
121
|
+
{
|
|
122
|
+
"not": {
|
|
123
|
+
"properties": {
|
|
124
|
+
"cardinality": { "const": "high" },
|
|
125
|
+
"classifications": { "contains": { "const": "groupable" } }
|
|
126
|
+
},
|
|
127
|
+
"required": ["cardinality", "classifications"]
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"not": {
|
|
132
|
+
"properties": {
|
|
133
|
+
"classifications": {
|
|
134
|
+
"allOf": [
|
|
135
|
+
{ "contains": { "const": "sensitive" } },
|
|
136
|
+
{ "contains": { "const": "groupable" } }
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"required": ["classifications"]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|