TypeSafe Swift SDK
SwiftPM client for System One following the official JS SDK, with enum-typed choices and struct-declared question sets.
Overview
Marcin Krzyżanowski's TypeSafe Swift SDK is a Swift Package Manager client for the System One API whose behavior follows the official JavaScript SDK. Question sets are declared as structs conforming to SystemOneQuestions, with Choice generic over your own enum, Noul and Score fields, and a matching Answers type, so results come back as your enum and typed values.
The key is read from TYPESAFE_API_KEY or passed in configuration, and the README warns that a key shipped inside an iOS or macOS app is visible to users, so calls should go through a server you control. A demo target asks noul, choice and score questions about a sample ticket. Developers can run swift test and a TypeSafeDemo executable that asks noul, choice and score questions about a sample billing ticket.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | What is this ticket about? | billing · technical · other |
| Yes / no | Is this ticket about billing? | yes · no |
| Score | How urgent is this ticket? | can wait · this week · today |
How it works
- Declare a SystemOneQuestions struct.
- Create TypeSafeClient.
- Call systemOne with state and the struct.
- Read typed answers.
Strengths
- Enum-typed choices.
- Clear warning about key exposure in apps.
- Demo target included.
Caveats
- Early version (0.1.x).
- Community SDK.
Getting started
.package(url: "https://github.com/krzyzanowskim/TypeSafe", .upToNextMinor(from: "0.1.0"))At a glance
- Type
- Library
- Status
- beta
- Language
- Swift
- Runtime
- Apple platforms library
- Has code
- yes
- Has tests
- yes
Use cases and integrations
How curated lists describe it
SwiftPM client whose behaviour follows the official JavaScript SDK.
MrJev/awesome-jev
Frequently asked questions
Can I ship the key in my app?
The README warns against it; call the API from your own server.
How are questions declared?
As a struct conforming to SystemOneQuestions with a matching Answers type.
What does it follow?
The official JavaScript SDK's behavior.
Related projects
Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.
MCP serverproductionTypeScriptAx, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.
PluginproductionTypeScriptEffect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.
ProjectproductionTypeScriptPHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.
ProjectproductionPHPGo MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.
MCP serverproductionGoSimon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.
PluginproductionPython