Skip to content

typesafe-sdk-swift

Small dependency-free Swift SDK for TypeSafe where answer types are inferred from the questions passed.

LibrarybetaMIT

Overview

InsaneArts' TypeSafe AI Swift SDK is a community package for Swift 6.0+, macOS 13 and iOS 16, with no dependencies. You create a client that reads TYPESAFE_API_KEY and call systemOne with state and question values; answer types are inferred, and with several questions the answers come back as a tuple in question order.

The README notes that the model sees Choice options in the order given and that order can change the probabilities. It is MIT licensed, with source files documenting the client, questions and retry policy. Retry behavior and question options are defined in a few small source files, which the README points to instead of separate documentation.

What the decision model decides

TypeQuestionAnswers
ChoiceWhat is this ticket about?billing · technical · other

How it works

  1. Add the Swift package.
  2. Create TypeSafeClient.
  3. Call systemOne with state and questions.
  4. Read the inferred typed answers.

Strengths

  • Type inference from questions.
  • No dependencies.

Caveats

  • Small, early package (0.1.0).
  • Option order can affect probabilities.

Getting started

.package(url: "https://github.com/InsaneArts/typesafe-sdk-swift", from: "0.1.0")

At a glance

Type
Library
Status
beta
Language
Swift
Runtime
Apple platforms library
Has code
yes
License
MIT

Use cases and integrations

How curated lists describe it

Frequently asked questions

How are multiple answers returned?

As a tuple in the order of the questions.

Does option order matter?

Yes, the README notes it can change probabilities.

Requirements?

Swift 6.0+, macOS 13 or iOS 16.

Related projects

  • Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.

    MCP serverproductionTypeScript
  • Ax, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.

    PluginproductionTypeScript
  • Effect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.

    ProjectproductionTypeScript
  • PHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.

    ProjectproductionPHP
  • Go MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.

    MCP serverproductionGo
  • Simon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.

    PluginproductionPython