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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ docs/generated/** text eol=lf
docs/model-catalogue/** text eol=lf
contracts/aether-code/host-v1/*.json text eol=lf
contracts/aether-code/host-v1/*.jsonl text eol=lf
contracts/managed-ats-tool-host/v1/*.json text eol=lf
test/fixtures/managed_tool_host_golden.json text eol=lf

# Source custody hashes canonical ATS bytes on every checkout platform.
packages/ats-skills/** text eol=lf
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ jobs:
- name: Verify independent Python ATS Spec 1 /2 closure
run: python test/fixtures/ats_contracts_v2_verify.py

- name: Verify independent Python managed tool host contract
run: python test/fixtures/managed_tool_host_verify.py

# Emit the compact, machine-readable package summary on both release
# platforms. The release-coherence suite binds the packet's named host
# measurement to this same npm pack result, so a value from one runner
Expand Down
89 changes: 89 additions & 0 deletions contracts/managed-ats-tool-host/v1/cancellation.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.aethersystems.net/managed-ats-tool-host/v1/cancellation.schema.json",
"x-aether-schema-id": "aether.managed-tool-cancellation/1",
"title": "ToolCancellationV1",
"description": "Targeted, idempotent cancellation of one call, fenced by the lease generation. issued_at falls within the live lease window after allowed skew. cancellation_digest follows the common digest rule.",
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"cancellation_id",
"cloud_tool_call_id",
"invocation_digest",
"lease_id",
"host_session_id",
"session_generation",
"revocation_epoch",
"reason",
"issued_at",
"cancellation_digest"
],
"properties": {
"schema": {
"type": "string",
"const": "aether.managed-tool-cancellation/1"
},
"cancellation_id": {
"$ref": "#/$defs/id"
},
"cloud_tool_call_id": {
"$ref": "#/$defs/id"
},
"invocation_digest": {
"$ref": "#/$defs/digest"
},
"lease_id": {
"$ref": "#/$defs/id"
},
"host_session_id": {
"$ref": "#/$defs/id"
},
"session_generation": {
"$ref": "#/$defs/positive_uint53"
},
"revocation_epoch": {
"$ref": "#/$defs/uint53"
},
"reason": {
"type": "string",
"enum": [
"user_cancelled",
"run_cancelled",
"session_closed",
"lease_revoked",
"deadline_exceeded"
]
},
"issued_at": {
"$ref": "#/$defs/timestamp"
},
"cancellation_digest": {
"$ref": "#/$defs/digest"
}
},
"$defs": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$"
},
"digest": {
"type": "string",
"pattern": "^sha256:[0-9a-f]{64}$"
},
"positive_uint53": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"uint53": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"timestamp": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$"
}
}
}
81 changes: 81 additions & 0 deletions contracts/managed-ats-tool-host/v1/common.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.aethersystems.net/managed-ats-tool-host/v1/common.schema.json",
"x-aether-schema-id": "aether.managed-tool-common/1",
"title": "Managed ATS tool host v1 common definitions",
"description": "Shared definitions. Every schema in this bundle carries an identical local copy of each definition it uses, so each schema digest covers everything that validates it. Validators also refuse Unicode Cc controls and unpaired surrogates in every string, check timestamps against the real calendar, and count string length in Unicode scalar values.",
"$defs": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$"
},
"device_id": {
"type": "string",
"pattern": "^scdev_[A-Za-z0-9._:-]{2,122}$"
},
"schema_id": {
"type": "string",
"maxLength": 128,
"pattern": "^aether[.][a-z0-9.-]+/[1-9][0-9]*$"
},
"digest": {
"type": "string",
"pattern": "^sha256:[0-9a-f]{64}$"
},
"timestamp": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$"
},
"uint53": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"positive_uint53": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"https_origin": {
"type": "string",
"maxLength": 256,
"pattern": "^https://[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+(:[1-9][0-9]{0,4})?$"
},
"base64url_32": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"
},
"base64url_64": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{85}[AQgw]$"
},
"runtime_version": {
"type": "string",
"pattern": "^[ -~]{1,64}$"
},
"tool_name": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$"
},
"tool_version": {
"type": "integer",
"minimum": 1,
"maximum": 65535
},
"execution_mode": {
"type": "string",
"enum": [
"observe",
"paper",
"approve",
"auto",
"unknown"
]
},
"safe_text": {
"type": "string",
"minLength": 1,
"maxLength": 256
}
}
}
94 changes: 94 additions & 0 deletions contracts/managed-ats-tool-host/v1/device-proof.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.aethersystems.net/managed-ats-tool-host/v1/device-proof.schema.json",
"x-aether-schema-id": "aether.managed-tool-device-proof/1",
"title": "EnrolledDeviceProofV1",
"description": "Cloud-signed enrollment of one scdev_ device key. proof_digest = sha256(schema id + LF + JCS(proof without proof_digest and cloud_signature)). cloud_signature is Ed25519 over schema id + LF + JCS(proof without cloud_signature), so it binds proof_digest. Lifetime at most 30 days.",
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"cloud_origin_id",
"account_scope_digest",
"device_id",
"device_public_key",
"issued_at",
"expires_at",
"revocation_epoch",
"signature_key_id",
"proof_digest",
"cloud_signature"
],
"properties": {
"schema": {
"type": "string",
"const": "aether.managed-tool-device-proof/1"
},
"cloud_origin_id": {
"$ref": "#/$defs/https_origin"
},
"account_scope_digest": {
"$ref": "#/$defs/digest"
},
"device_id": {
"$ref": "#/$defs/device_id"
},
"device_public_key": {
"$ref": "#/$defs/base64url_32"
},
"issued_at": {
"$ref": "#/$defs/timestamp"
},
"expires_at": {
"$ref": "#/$defs/timestamp"
},
"revocation_epoch": {
"$ref": "#/$defs/uint53"
},
"signature_key_id": {
"$ref": "#/$defs/id"
},
"proof_digest": {
"$ref": "#/$defs/digest"
},
"cloud_signature": {
"$ref": "#/$defs/base64url_64"
}
},
"$defs": {
"https_origin": {
"type": "string",
"maxLength": 256,
"pattern": "^https://[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+(:[1-9][0-9]{0,4})?$"
},
"digest": {
"type": "string",
"pattern": "^sha256:[0-9a-f]{64}$"
},
"device_id": {
"type": "string",
"pattern": "^scdev_[A-Za-z0-9._:-]{2,122}$"
},
"base64url_32": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"
},
"timestamp": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$"
},
"uint53": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$"
},
"base64url_64": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{85}[AQgw]$"
}
}
}
Loading
Loading