Skip to content
System One

epiphany-dynamics/port-cleanup

A native macOS utility that has Jev recommend which stale listening ports are safe to stop, with the evidence shown and nothing closed automatically.

Port Cleanup hero image showing a listening port listed with a Jev typed judgment, its evidence summary, and a human-confirmed stop action
Image from github.com

epiphany-dynamics/port-cleanup on GitHub

Stars
0
Forks
1
Language
Swift
License
MIT
Last push
19 Sep 2026

Read from GitHub on . Counts change daily.

How it uses Jev

public static func analyze(rows: [Listener], rules: String, finished: Set<String> = []) async throws -> [Int32: Recommendation] {
    guard !rows.isEmpty else { return [:] }
    let body = try payload(rows: rows, rules: rules, finished: finished)
    let key = try Credential.read()
    var request = URLRequest(url: URL(string: "https://api.typesafe.ai/v1/systemone")!)
    request.httpMethod = "POST"; request.timeoutInterval = 60; request.httpBody = body
    request.setValue("Bearer \(key)", forHTTPHeaderField: "Authorization")
    request.setValue("application/json", forHTTPHeaderField: "Content-Type")
    let configuration = URLSessionConfiguration.ephemeral
    configuration.timeoutIntervalForResource = 65
    let session = URLSession(configuration: configuration); defer { session.finishTasksAndInvalidate() }
    let (data, response) = try await session.data(for: request)
    guard let response = response as? HTTPURLResponse else { throw PortError("No TypeSafe response") }
    guard response.statusCode == 200 else { throw PortError("TypeSafe returned HTTP \(response.statusCode). No retry or model fallback was made.") }
    return try decode(data, rows: rows)

View in Sources/PortCore/Core.swift

Open on GitHub

More like this

Use cases this is tagged with