ForgeTelemetry
Swift ForgeTelemetry library product.
Swift ForgeTelemetry library product.
Package contract
| Field | Value |
|---|---|
| Language | swift |
| Source version | Swift package source snapshot |
| Manifest | forge-swift/Package.swift |
| Source files | 4 |
| Evidence | Source reference; registry publication and runtime conformance are separate checks |
Import boundary
import ForgeTelemetryUse a source checkout or your verified private registry. Manifest coordinates identify the package; they do not establish that a public registry release exists.
Source reference
Download package reference JSON. Each original source file and generated declaration artifact has its own SHA-256 digest. Function bodies and constant values are omitted from downloads. These are source declaration inventories, not compiler-resolved rustdoc, TypeDoc, DocC, or Dokka output. Private modules can contain public declarations that are not reachable through the package boundary; consult the entry point before importing.
AuditTrail.swift
Read declaration text · 17 declaration entries
public enum AuditEntryKind: String, Codable, Sendable, Hashable, CaseIterable
public struct AuditEntry: Codable, Sendable, Equatable
public let id: String
/// The kind of operation recorded.
public let kind: AuditEntryKind
/// The agent DID that performed the operation.
public let agentDid: String
/// When the operation occurred.
public let timestamp: Timestamp
/// Operation-specific details.
public let details: JSONValue
/// Optional Ed25519 signature over the entry.
///
/// When present, the signature covers the canonical JSON serialization
/// of (id, kind, agentDid, timestamp, details). Verification uses the
/// agent's public key from their OAS DID document.
public let signature: String?
/// Creates a new audit entry.
///
/// - Parameters:
/// - id: Unique entry identifier. Defaults to a new UUID.
/// - kind: The kind of operation.
/// - agentDid: The agent DID.
/// - details: Operation-specific details.
/// - signature: Optional signature.
/// - timestamp: When the operation occurred. Defaults to now.
public init(
public let kind: AuditEntryKind
/// The agent DID that performed the operation.
public let agentDid: String
/// When the operation occurred.
public let timestamp: Timestamp
/// Operation-specific details.
public let details: JSONValue
/// Optional Ed25519 signature over the entry.
///
/// When present, the signature covers the canonical JSON serialization
/// of (id, kind, agentDid, timestamp, details). Verification uses the
/// agent's public key from their OAS DID document.
public let signature: String?
/// Creates a new audit entry.
///
/// - Parameters:
/// - id: Unique entry identifier. Defaults to a new UUID.
/// - kind: The kind of operation.
/// - agentDid: The agent DID.
/// - details: Operation-specific details.
/// - signature: Optional signature.
/// - timestamp: When the operation occurred. Defaults to now.
public init(
id: String;
public let agentDid: String
/// When the operation occurred.
public let timestamp: Timestamp
/// Operation-specific details.
public let details: JSONValue
/// Optional Ed25519 signature over the entry.
///
/// When present, the signature covers the canonical JSON serialization
/// of (id, kind, agentDid, timestamp, details). Verification uses the
/// agent's public key from their OAS DID document.
public let signature: String?
/// Creates a new audit entry.
///
/// - Parameters:
/// - id: Unique entry identifier. Defaults to a new UUID.
/// - kind: The kind of operation.
/// - agentDid: The agent DID.
/// - details: Operation-specific details.
/// - signature: Optional signature.
/// - timestamp: When the operation occurred. Defaults to now.
public init(
id: String;
public let timestamp: Timestamp
/// Operation-specific details.
public let details: JSONValue
/// Optional Ed25519 signature over the entry.
///
/// When present, the signature covers the canonical JSON serialization
/// of (id, kind, agentDid, timestamp, details). Verification uses the
/// agent's public key from their OAS DID document.
public let signature: String?
/// Creates a new audit entry.
///
/// - Parameters:
/// - id: Unique entry identifier. Defaults to a new UUID.
/// - kind: The kind of operation.
/// - agentDid: The agent DID.
/// - details: Operation-specific details.
/// - signature: Optional signature.
/// - timestamp: When the operation occurred. Defaults to now.
public init(
id: String;
public let details: JSONValue
/// Optional Ed25519 signature over the entry.
///
/// When present, the signature covers the canonical JSON serialization
/// of (id, kind, agentDid, timestamp, details). Verification uses the
/// agent's public key from their OAS DID document.
public let signature: String?
/// Creates a new audit entry.
///
/// - Parameters:
/// - id: Unique entry identifier. Defaults to a new UUID.
/// - kind: The kind of operation.
/// - agentDid: The agent DID.
/// - details: Operation-specific details.
/// - signature: Optional signature.
/// - timestamp: When the operation occurred. Defaults to now.
public init(
id: String;
public let signature: String?
/// Creates a new audit entry.
///
/// - Parameters:
/// - id: Unique entry identifier. Defaults to a new UUID.
/// - kind: The kind of operation.
/// - agentDid: The agent DID.
/// - details: Operation-specific details.
/// - signature: Optional signature.
/// - timestamp: When the operation occurred. Defaults to now.
public init(
id: String;
public init(
id: String;
public final class AuditTrail: @unchecked Sendable
public let agentDid: String
private var _entries: [AuditEntry];
public init(agentDid: String, maxEntries: Int;
public func append(
kind: AuditEntryKind,
details: JSONValue;
public func entries() -> [AuditEntry]
public var count: Int
public func entries(ofKind kind: AuditEntryKind) -> [AuditEntry]
public func entries(from: Timestamp, to: Timestamp) -> [AuditEntry]SpanCollector.swift
Read declaration text · 7 declaration entries
public protocol SpanCollector: Sendable
public final class InMemorySpanCollector: SpanCollector, @unchecked Sendable
public init()
public func collect(_ span: ForgeSpan)
public func spans() -> [ForgeSpan]
public var count: Int
public func clear()TelemetryContract.swift
Read declaration text · 6 declaration entries
public protocol TelemetryContract: Sendable
public final class NoopTelemetry: TelemetryContract, Sendable
public init()
public func emitSpan(_ span: ForgeSpan)
public func emitEvent(_ event: ForgeEvent)
public func recordMetric(_ name: String, value: Double, labels: [String: String])TelemetryError.swift
Read declaration text · 2 declaration entries
public enum TelemetryError: Error, Sendable, Equatable
public var errorDescription: String?