id.openagent:openagent-sdk (Kotlin)
Unified SDKs source package and exported entry points.
Purpose
Unified SDKs package. See the linked task guide for its role in the integration.
Source contract
| Field | Value |
|---|---|
| Package | id.openagent:openagent-sdk |
| Version | 0.1.0 |
| Language | Kotlin |
| Runtime floor | JVM 17 / Kotlin 2.1.0 |
| Manifest | openagent-sdk/sdks/kotlin/build.gradle.kts |
| Distribution | Source package; registry publication not verified |
Manifest SHA-256: 6121fcc8a39d99568cb17d3a4c9f515cf106a4bf4ad67196a14ccada5c57c2b2. The recorded Git revision identifies the containing repository; the manifest and entry-point hashes identify this working-tree snapshot.
Integration
Use the package root above from an authorized source checkout. Preserve sibling dependencies and their version/feature requirements. Install the runtime and compile the selected package before using its generated artifacts. The task guide describes configuration, trust boundaries, and error behavior. Test/conformance and deployment packages are supporting tools, not interchangeable production identity providers.
Exported entry points
The declarations below are extracted from the named entry files. This is a navigable source reference, not compiler-generated documentation of every transitive module. Feature gates and runtime requirements still apply. Private implementation files are not promoted to public APIs merely because they contain a public declaration.
openagent-sdk/sdks/kotlin/src/main/kotlin/id/openagent/sdk/Act.kt
Source SHA-256: aac0a36eb4da201a849f7fbde56b007edf7fd7e53fa6c75532011165c747ae1f.
public object Act {
public const val FORMAT_VERSION: Int = 1
public const val ALGORITHM_ED25519: String = "Ed25519"
public const val MAX_ACT_BYTES: Int = 16 * 1024
public data class Claims(
public data class Envelope(
public fun decode(token: ByteArray): Envelope {
public class Verifier(
public val expectedIssuer: String,
public val expectedAudience: String,
public fun requiringScopes(scopes: List<Scope>): Verifier =
public fun withClock(nowUnixSeconds: Long): Verifier =
public fun verify(token: ByteArray): Claims {
public fun decodeUnverified(token: ByteArray): Claims? {openagent-sdk/sdks/kotlin/src/main/kotlin/id/openagent/sdk/Cbor.kt
Source SHA-256: bb753f89a2defadb8843cbfbd41b4646b4aa01612e658f1a626541021b52723f.
This entry point composes the application or reuses implementation modules; inspect the source file and task guide for its callable boundary.
openagent-sdk/sdks/kotlin/src/main/kotlin/id/openagent/sdk/Errors.kt
Source SHA-256: eb339f7e1a22fbedabe3e39d498aa7caf8d36731523741dbc234449ac896652c.
public class Config(detail: String) : OpenAgentError("config error: $detail")
public class TooLarge(size: Int, maximum: Int) :
public class EnvelopeDecode(detail: String) : OpenAgentError("envelope decode failed: $detail")
public class UnsupportedVersion(version: Int) :
public class UnsupportedAlgorithm(alg: String) :
public class MalformedSignature(detail: String) : OpenAgentError("malformed signature: $detail")
public class SignatureInvalid(trustedKeyCount: Int) :
public class ClaimsDecode(detail: String) : OpenAgentError("invalid claim set: $detail")
public class Expired(exp: Long, now: Long) : OpenAgentError("token expired at $exp (now $now)")
public class NotYetValid(nbf: Long, now: Long) :
public class IssuerMismatch(expected: String, actual: String) :
public class AudienceMismatch(expected: String) :
public class MissingScope(scope: String) : OpenAgentError("missing required scope: $scope")
public class MalformedScope(scope: String, reason: String) :openagent-sdk/sdks/kotlin/src/main/kotlin/id/openagent/sdk/Keys.kt
Source SHA-256: dd8c91c439923eb593cf259c0996bfd2c080dc35fe641a9b8e967b20c0a99da4.
public object Keys {
public data class AgentKeys(
public fun sign(message: ByteArray): ByteArray {
public fun verify(message: ByteArray, signature: ByteArray): Boolean {
public fun fromSeed(seed: ByteArray): AgentKeys {
public fun generate(): AgentKeys {
public fun fromSeedHex(hexSeed: String): AgentKeys {
public fun fromEnv(envVar: String): AgentKeys {
public fun saveSeed(keys: AgentKeys, path: Path) {
public fun fromSeedFile(path: Path): AgentKeys = fromSeed(Files.readAllBytes(path))
public fun seedToHex(seed: ByteArray): String =openagent-sdk/sdks/kotlin/src/main/kotlin/id/openagent/sdk/Ktor.kt
Source SHA-256: 4f873085a32ecf225237d843c1d219b8647bf560a88f48fbd891e6d8690db7c6.
public val ActClaimsKey: AttributeKey<Act.Claims> = AttributeKey("ActClaims")
public class ActAuthConfig {
public val ActAuth: ApplicationPlugin<ActAuthConfig> =openagent-sdk/sdks/kotlin/src/main/kotlin/id/openagent/sdk/Scope.kt
Source SHA-256: 46bafee5aba0dfb6052ccf66ed1969c6553ac326b48b9c63f6294a802ff7f5e6.
public class Scope private constructor(
public val service: String,
public val resource: String,
public val action: String,
public fun covers(requested: Scope): Boolean {
public const val SEGMENT_COUNT: Int = 3
public const val WILDCARD: String = "*"
public fun parse(text: String): Scope {