Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
346 changes: 346 additions & 0 deletions contracts/external-trust-signal-provider.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,346 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:srcos:agent-machine:schema:external-trust-signal-provider:v0.1.0",
"title": "ExternalTrustSignalProvider",
"description": "Secret-free adapter request/response contract for optional non-authoritative external identity, reputation, certificate-tier, counterparty, and registry lookup signals used as Agent Registry verifier inputs.",
"type": "object",
"additionalProperties": false,
"required": [
"specVersion",
"id",
"kind",
"request",
"response",
"receiptSafety",
"observedAt"
],
"$defs": {
"signalType": {
"type": "string",
"enum": [
"agent-identity",
"cert-tier",
"reputation-score",
"counterparty-check",
"registry-lookup",
"other"
]
},
"sha256Digest": {
"type": [
"string",
"null"
],
"pattern": "^sha256:[a-f0-9]{64}$"
},
"freshness": {
"type": "object",
"additionalProperties": false,
"required": [
"maxAgeSeconds",
"observedAgeSeconds",
"fresh"
],
"properties": {
"maxAgeSeconds": {
"type": "integer",
"minimum": 0
},
"observedAgeSeconds": {
"type": "integer",
"minimum": 0
},
"fresh": {
"type": "boolean"
}
}
},
"signature": {
"type": "object",
"additionalProperties": false,
"required": [
"required",
"observed",
"signatureRef",
"signerRef"
],
"properties": {
"required": {
"type": "boolean"
},
"observed": {
"type": "boolean"
},
"signatureRef": {
"type": [
"string",
"null"
]
},
"signerRef": {
"type": [
"string",
"null"
]
}
}
},
"externalTrustSignal": {
"type": "object",
"additionalProperties": false,
"required": [
"providerRef",
"signalType",
"signalRef",
"signalDigest",
"verifiedAt",
"freshness",
"signature",
"authority",
"failureReason"
],
"properties": {
"providerRef": {
"type": "string"
},
"signalType": {
"$ref": "#/$defs/signalType"
},
"signalRef": {
"type": "string"
},
"signalDigest": {
"$ref": "#/$defs/sha256Digest"
},
"verifiedAt": {
"type": "string"
},
"freshness": {
"$ref": "#/$defs/freshness"
},
"signature": {
"$ref": "#/$defs/signature"
},
"authority": {
"type": "string",
"const": "non-authoritative-verifier-input"
},
"failureReason": {
"type": [
"string",
"null"
]
},
"notes": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"properties": {
"specVersion": {
"type": "string",
"const": "0.1.0"
},
"id": {
"type": "string",
"pattern": "^urn:srcos:agent-machine:external-trust-signal-provider:[a-z0-9][a-z0-9-]*$"
},
"kind": {
"type": "string",
"const": "ExternalTrustSignalProvider"
},
"request": {
"type": "object",
"additionalProperties": false,
"required": [
"requestId",
"providerRef",
"agentPodId",
"requestedAgentIdentityRef",
"sessionRef",
"workroomRef",
"topicRef",
"requestedSignalTypes",
"verificationFreshnessSeconds",
"requestedExpiresAt",
"signatureRequired"
],
"properties": {
"requestId": {
"type": "string"
},
"providerRef": {
"type": "string"
},
"agentPodId": {
"type": "string",
"pattern": "^urn:srcos:agent-machine:agent-pod:[a-z0-9][a-z0-9-]*$"
},
"requestedAgentIdentityRef": {
"type": "string"
},
"sessionRef": {
"type": "string"
},
"workroomRef": {
"type": [
"string",
"null"
]
},
"topicRef": {
"type": [
"string",
"null"
]
},
"requestedSignalTypes": {
"type": "array",
"items": {
"$ref": "#/$defs/signalType"
},
"minItems": 1,
"uniqueItems": true
},
"verificationFreshnessSeconds": {
"type": "integer",
"minimum": 0
},
"requestedExpiresAt": {
"type": [
"string",
"null"
]
},
"signatureRequired": {
"type": "boolean"
}
}
},
"response": {
"type": "object",
"additionalProperties": false,
"required": [
"status",
"usableForGrantResolution",
"providerRef",
"authority",
"verifiedAt",
"freshness",
"signals",
"failureReason"
],
"properties": {
"status": {
"type": "string",
"enum": [
"available",
"unavailable",
"stale",
"malformed",
"unsigned",
"denied",
"error"
]
},
"usableForGrantResolution": {
"type": "boolean"
},
"providerRef": {
"type": "string"
},
"authority": {
"type": "string",
"const": "non-authoritative-verifier-input"
},
"verifiedAt": {
"type": [
"string",
"null"
]
},
"freshness": {
"$ref": "#/$defs/freshness"
},
"signals": {
"type": "array",
"items": {
"$ref": "#/$defs/externalTrustSignal"
}
},
"failureReason": {
"type": [
"string",
"null"
]
}
}
},
"receiptSafety": {
"type": "object",
"additionalProperties": false,
"required": [
"includeRawContent",
"rawPromptContentIncluded",
"rawKvCacheContentIncluded",
"secretValuesIncluded",
"privateMemoryIncluded",
"apiKeysIncluded",
"walletPrivateKeysIncluded",
"rawCredentialsIncluded",
"rawUserDataIncluded"
],
"properties": {
"includeRawContent": {
"type": "boolean",
"const": false
},
"rawPromptContentIncluded": {
"type": "boolean",
"const": false
},
"rawKvCacheContentIncluded": {
"type": "boolean",
"const": false
},
"secretValuesIncluded": {
"type": "boolean",
"const": false
},
"privateMemoryIncluded": {
"type": "boolean",
"const": false
},
"apiKeysIncluded": {
"type": "boolean",
"const": false
},
"walletPrivateKeysIncluded": {
"type": "boolean",
"const": false
},
"rawCredentialsIncluded": {
"type": "boolean",
"const": false
},
"rawUserDataIncluded": {
"type": "boolean",
"const": false
}
}
},
"observedAt": {
"type": "string"
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
Loading
Loading