Open-source inference server and production cluster for all the models your agent needs.
Python bgecolbertdata-pipelinedeep-learningembeddingsinferenceinference-serverinformation-retrievalllmmlmlopsnatural-language-processingnlppythonrerankingretrievalretrieval-augmented-generationsemantic-searchspladevector-search
feat(examples): try a local System One model with the TypeSafe SDK
Rahul Parundekar1b11f4cd6709
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex c03f6cc1b..16f17abd8 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -87,6 +87,13 @@ jobs:mise exec -- uv run --frozen ruff format --check .mise exec -- uv run --frozen ruff check .mise exec -- uv run --frozen pytest -q+ - name: System One example checker+ working-directory: examples/systemone-local+ run: |+ mise exec -- uv lock --check+ mise exec -- uv run --frozen ruff format --check .+ mise exec -- uv run --frozen ruff check .+ mise exec -- uv run --frozen pytest -q- name: Pinned collector privacyrun: |mise run helm -- dependenciesdiff --git a/examples/README.md b/examples/README.mdindex cc9537708..915082e8e 100644--- a/examples/README.md+++ b/examples/README.md@@ -21,6 +21,7 @@ to a separately maintained repository (clone and run there).| [Extract the entity types you name, with no model to train](./custom-entity-types) | Asking for the 85 entity types of seven zero-shot NER sets and scoring exact spans against GPT-6 Luna, GPT-6 Sol, Claude Haiku 4.5, SIE Qwen3.8 27B, AWS Comprehend and spaCy, with a paired bootstrap and the price of each | `extract` | SIE server with GLiNER BioMed Large; `fetch.py` pulls the recorded run, `score.py` reproduces the figures with no key | Runnable recorded example || [Answer a question from a passage, and quote the sentence you used](./chat) | Checking a generated answer for its citation, its length and whether it declines a question the passage cannot answer | `chat/completions` | SIE Cloud with Qwen3.8 27B; `fetch.py` pulls the recorded run, `score.py` reproduces the numbers with no key | Runnable recorded example || [Run a coding agent on SIE with OpenCode](./coding-agent-opencode) | Pointing OpenCode at a laptop server, a self-hosted cluster or SIE Cloud, and checking the agent loop the way OpenCode drives it: streaming tool-call deltas, parallel calls, tool-result round trips, a 64K-plus prompt, finish reasons, usage and the reasoning field | `chat/completions` | An SIE Cloud endpoint that lists GLM-5.3-Flash via SIE Relay, or a local server; the laptop recipe was run on Apple Silicon with Qwen3.5-4B; `conformance.py` reports every case, `run_gate.sh` makes OpenCode fix a seeded failing test | Runnable check, laptop and SIE Cloud results recorded |+| [Try a local System One model](./systemone-local) | Running unchanged TypeSafe SDK code against SIE by changing its base URL, and checking every SDK call that reaches the server: each question type, state shape, `models.list()`, the async client and the error classes | `systemone` | A local `sie-server` with GLiNER2.5-Decide on CPU, or SIE Serverless; `conformance.py` reports every case | Runnable check || [Route requests while skipping most generation calls](./request-routing) | Assigning support, banking and assistant requests to routes with an embedding classifier and conditional generation | `encode`, `chat/completions` | SIE server with Qwen3 Embedding 4B and Qwen3.8 27B; recorded 3,000-case verification needs no API key | Runnable recorded example || [Send each request to a cheap or a strong LLM](./request-routing/cost) | Cutting LLM spend with a bge-m3 nearest-neighbour router that picks GPT-6 Luna or GPT-6.1 Sol per request: 38.6% less than always using GPT-6.1 Sol at 95.8% of its quality on 728 held-out requests of a pre-registered study | `encode` | SIE Serverless with bge-m3; `fetch.py` pulls the recorded study, `score.py` reproduces the held-out table with no key | Runnable recorded example || [Turn PDF pages into Markdown, scored on olmOCR-Bench](./document-to-markdown-olmocr) | Converting all 1,403 pages of Ai2's olmOCR-Bench with LightOnOCR-2-1B and scoring them with Ai2's own scorer, beside published Azure Document Intelligence and AWS Textract runs | `extract` | SIE Cloud with LightOnOCR-2-1B; `fetch.py` pulls the recorded run, `score.py` reproduces the scores with no key | Runnable recorded example |diff --git a/examples/systemone-local/README.md b/examples/systemone-local/README.mdnew file mode 100644index 000000000..1bf8213dc--- /dev/null+++ b/examples/systemone-local/README.md@@ -0,0 +1,141 @@+# Try a local System One model++## What this shows++SIE serves a System One-compatible API: `POST /v1/systemone` answers typed+`noul` (yes/no), `choice` (pick one) and `score` (ordinal) questions about a+text, and `GET /v1/models` lists the models with the fields the System One+model list carries. Code written with the TypeSafe SDK runs against SIE by+changing the SDK's base URL. Nothing else changes.++This directory has three pieces:++1. `decide.py`: ordinary TypeSafe Python SDK code. It asks three questions+ about a support ticket and prints the answers. Nothing in it names SIE.+2. `js/decide.mjs`: the same with the TypeSafe JS SDK.+3. `conformance.py`: runs the TypeSafe Python SDK, unchanged, through every+ SDK feature that reaches the server and reports each case as pass or fail.+ It covers each question type and builder, text, object and conversation+ states, questions without instructions, extra request fields,+ `models.list()`, the async client, and the SDK's error classes for an+ unknown model, an invalid question, too many score levels and a state that+ does not fit the model.++## Run it++Start SIE with a decision model. GLiNER2.5-Decide is a 340M-parameter+encoder, so a laptop CPU serves it:++```bash+# from the repository root, after ./tools/init.sh+mise run serve -- --models fastino/GLiNER2.5-Decide --port 8080 --device cpu+```++Wait until `curl -s localhost:8080/readyz` answers. The first start downloads+the model.++Point the TypeSafe SDK at it, then run the example:++```bash+cd examples/systemone-local+export TYPESAFE_BASE_URL=http://localhost:8080+export TYPESAFE_DEFAULT_MODEL=fastino/GLiNER2.5-Decide+export TYPESAFE_API_KEY=local # any value: a local sie-server checks no keys++uv run decide.py+uv run conformance.py --json results.json+```++The JS SDK reads the same variables:++```bash+cd js && npm install && npm run decide+```++## Point it at SIE Serverless++Use the same three variables with the Serverless endpoint and your SIE key:++```bash+export TYPESAFE_BASE_URL=<your SIE Serverless URL>+export TYPESAFE_DEFAULT_MODEL=fastino/GLiNER2.5-Decide+export TYPESAFE_API_KEY=$SIE_API_KEY+uv run conformance.py --check-auth+```++A Serverless model that has gone cold takes minutes to load. SIE answers+`503` with a `Retry-After` of at most 60 seconds while it loads, and the+TypeSafe SDK gives up after about 30 seconds of retries. Warm the model first,+for example with one call from the console playground.++## Limits++SIE's decision models read a fixed window per row. SIE refuses a request that+does not fit with `422` (the SDK's `TypeSafeUnprocessableEntityError`) and+never truncates the text silently:++| Model | Row | What shares the row |+|---|---|---|+| `fastino/GLiNER2.5-Decide` | 512 tokens | All of the request's questions (at most half the row) and the state |+| `fastino/GLiNER2.5-Decide-1B` | 2,048 tokens | Same; use it for longer text |+| `fastino/GLiNER2.5-multi-Decide` | 2,048 tokens | Same; multilingual |+| `convaiinnovations/laya-typed-decisions` | 1,024 tokens | One question and the state, per question |++Other differences from TypeSafe's hosted API:++- The model is an SIE model id; SIE has no `jev-latest`-style aliases. Set+ `TYPESAFE_DEFAULT_MODEL`, or pass `model=` per call.+- A score question takes 1 to 10 levels.+- `/v1/models` lists every model the server serves. `system_one` with a model+ that does not answer typed questions is refused with `422`.+- Confidences follow the System One definitions: for choice,+ `(p_max - 1/n) / (1 - 1/n)`; for score, one minus the spread around the most+ likely level relative to an even distribution.++## Test++```bash+uv run pytest -q+```++The tests run `conformance.py` against a stub that answers as SIE does, with+one knob per way to break it, so each case is shown to fail when it should.+They need no model and no network beyond installing the SDK.++## Recorded run++2026-10-14, local `sie-server` on an Apple M4 Max, CPU, serving+`fastino/GLiNER2.5-Decide`; `typesafe-sdk` 0.7.4 and `@typesafe-ai/sdk` 0.6.0,+unchanged. `conformance.py`: 15/15 passed (`--check-auth` not+run: a local server checks no keys).++| Case | Result | Seen |+|---|---|---|+| `models_list` | pass | 1 models; fastino/GLiNER2.5-Decide: release_date '2026-09-24' |+| `noul` | pass | noul=0.549 |+| `noul_criteria_only` | pass | no instructions sent; noul=0.689 |+| `choice` | pass | choice=billing confidence=0.632 |+| `score` | pass | score=1.999 confidence=0.998 |+| `dict_questions` | pass | noul, choice and score in one call |+| `object_state` | pass | object state; noul=0.646 |+| `conversation_state` | pass | conversation state; noul=0.977 |+| `extra_body` | pass | unknown request fields ignored |+| `envelope` | pass | model=fastino/GLiNER2.5-Decide input_tokens=22 |+| `async` | pass | AsyncTypeSafeClient noul=0.571 |+| `unknown_model` | pass | TypeSafeNotFoundError: POST http://localhost:8080/v1/systemone: 404 Model 'acme/no-such-model' not found |+| `invalid_question` | pass | TypeSafeUnprocessableEntityError: POST http://localhost:8080/v1/systemone: 422 question 'q': unknown type 'maybe'; use one of ['choice', 'noul', 'score'] |+| `too_many_levels` | pass | TypeSafeUnprocessableEntityError: POST http://localhost:8080/v1/systemone: 422 questions.q.criteria: score question 'q' has 11 levels; at most 10 are allowed |+| `state_too_long` | pass | TypeSafeUnprocessableEntityError: POST http://localhost:8080/v1/systemone: 422 state: The document does not fit in the 495 tokens the questions leave in the model's 512-token window (overflow_policy 'error') |++`decide.py` and `js/decide.mjs` printed the same answers:++```+model: fastino/GLiNER2.5-Decide+spam: P(yes) = 0.29+intent: billing (confidence 0.61)+urgency: 2.00 of 0-2 (confidence 0.99)+input tokens: 49+```++The probabilities are this model's; GLiNER2.5-Decide is weak on yes/no+questions in Superlinked's own benchmark, so read `spam` accordingly.diff --git a/examples/systemone-local/conformance.py b/examples/systemone-local/conformance.pynew file mode 100644index 000000000..3fd1b7be9--- /dev/null+++ b/examples/systemone-local/conformance.py@@ -0,0 +1,258 @@+"""Check that the TypeSafe SDK works against SIE, unchanged.++Points the official TypeSafe Python SDK at SIE's System One-compatible API+through the SDK's own environment variables and runs every SDK feature that+reaches the server: ``system_one`` with each question type and state shape,+``models.list``, the async client, and the error classes. Each case is+reported as pass or fail with what it saw, and the run exits non-zero if any+case fails.++ TYPESAFE_BASE_URL=http://localhost:8080 \\+ TYPESAFE_DEFAULT_MODEL=fastino/GLiNER2.5-Decide \\+ TYPESAFE_API_KEY=local \\+ uv run conformance.py [--check-auth] [--json results.json]++``--check-auth`` adds the bad-key case, for a deployment that checks keys+(a cluster gateway or SIE Serverless); a local ``sie-server`` checks none.+"""++from __future__ import annotations++import argparse+import asyncio+import json+import os+import sys+from collections.abc import Callable+from dataclasses import asdict, dataclass+from pathlib import Path+from typing import Any++from typesafe_sdk import (+ AsyncTypeSafeClient,+ Choice,+ Noul,+ Score,+ TypeSafeAuthenticationError,+ TypeSafeClient,+ TypeSafeNotFoundError,+ TypeSafeUnprocessableEntityError,+)++TICKET = "I was charged twice for my March invoice. Please refund one of the charges today."+CRITERIA = {"billing": "payments, invoices or refunds", "technical": "something is broken", "other": None}+LEVELS = ["can wait", "this week", "today"]+# Far more text than any decision model's row holds (512 to 2,048 tokens).+TOO_LONG = " ".join(["refund"] * 20_000)+++@dataclass+class Case:+ name: str+ passed: bool+ detail: str+++def _probability(value: float) -> bool:+ return 0.0 <= value <= 1.0+++def case_models_list(client: TypeSafeClient, model: str) -> str:+ listed = client.models.list()+ names = [entry.name for entry in listed.models]+ assert model in names, f"{model} not in {names[:5]}..."+ entry = next(entry for entry in listed.models if entry.name == model)+ return f"{len(names)} models; {model}: release_date {entry.release_date!r}"+++def case_noul(client: TypeSafeClient, model: str) -> str:+ answer = client.system_one(state=TICKET, questions={"spam": Noul(instructions="Is this spam?")}).nouls["spam"]+ assert _probability(answer.noul), answer+ return f"noul={answer.noul:.3f}"+++def case_noul_criteria_only(client: TypeSafeClient, model: str) -> str:+ question = Noul(criteria={"true": "asks for money back", "false": "anything else"})+ answer = client.system_one(state=TICKET, questions={"refund": question}).nouls["refund"]+ assert _probability(answer.noul), answer+ return f"no instructions sent; noul={answer.noul:.3f}"+++def case_choice(client: TypeSafeClient, model: str) -> str:+ question = Choice(instructions="What does the customer want?", criteria=CRITERIA)+ answer = client.system_one(state=TICKET, questions={"intent": question}).choices["intent"]+ assert answer.choice in CRITERIA, answer+ assert set(answer.probabilities) == set(CRITERIA), answer+ assert _probability(answer.confidence), answer+ return f"choice={answer.choice} confidence={answer.confidence:.3f}"+++def case_score(client: TypeSafeClient, model: str) -> str:+ question = Score(instructions="How urgent is this?", criteria=LEVELS)+ answer = client.system_one(state=TICKET, questions={"urgency": question}).scores["urgency"]+ assert 0.0 <= answer.score <= len(LEVELS) - 1, answer+ assert len(answer.legend) == len(answer.probabilities) == len(LEVELS), answer+ assert _probability(answer.confidence), answer+ return f"score={answer.score:.3f} confidence={answer.confidence:.3f}"+++def case_dict_questions(client: TypeSafeClient, model: str) -> str:+ response = client.system_one(+ state=TICKET,+ questions={+ "spam": {"type": "noul", "instructions": "Is this spam?"},+ "intent": {"type": "choice", "instructions": "What does the customer want?", "criteria": CRITERIA},+ "urgency": {"type": "score", "instructions": "How urgent?", "criteria": LEVELS},+ },+ )+ assert set(response.answers) == {"spam", "intent", "urgency"}, response.answers+ return "noul, choice and score in one call"+++def case_object_state(client: TypeSafeClient, model: str) -> str:+ state = {"subject": "Double charge", "body": TICKET, "plan": "pro"}+ answer = client.system_one(state=state, questions={"spam": Noul(instructions="Is this spam?")}).nouls["spam"]+ assert _probability(answer.noul), answer+ return f"object state; noul={answer.noul:.3f}"+++def case_conversation_state(client: TypeSafeClient, model: str) -> str:+ state = [{"role": "user", "content": "Hi"}, {"role": "user", "content": TICKET}]+ question = Noul(instructions="Does the customer ask for a refund?")+ answer = client.system_one(state=state, questions={"refund": question}).nouls["refund"]+ assert _probability(answer.noul), answer+ return f"conversation state; noul={answer.noul:.3f}"+++def case_extra_body(client: TypeSafeClient, model: str) -> str:+ response = client.system_one(+ state=TICKET,+ questions={"spam": Noul(instructions="Is this spam?")},+ extra_body={"metadata": {"user": "u1"}},+ )+ assert "spam" in response.answers+ return "unknown request fields ignored"+++def case_envelope(client: TypeSafeClient, model: str) -> str:+ response = client.system_one(state=TICKET, questions={"spam": Noul(instructions="Is this spam?")})+ assert response.model == model, response.model+ assert response.usage.input_tokens is not None and response.usage.input_tokens > 0, response.usage+ assert response.usage.output_tokens == 0, response.usage+ return f"model={response.model} input_tokens={response.usage.input_tokens}"+++def case_async(client: TypeSafeClient, model: str) -> str:+ async def run() -> float:+ async with AsyncTypeSafeClient() as async_client:+ response = await async_client.system_one(state=TICKET, questions={"spam": Noul(instructions="Spam?")})+ return response.nouls["spam"].noul++ noul = asyncio.run(run())+ assert _probability(noul), noul+ return f"AsyncTypeSafeClient noul={noul:.3f}"+++def case_unknown_model(client: TypeSafeClient, model: str) -> str:+ try:+ client.system_one(state=TICKET, questions={"q": Noul(instructions="?")}, model="acme/no-such-model")+ except TypeSafeNotFoundError as error:+ return f"TypeSafeNotFoundError: {error}"+ raise AssertionError("an unknown model was answered")+++def case_invalid_question(client: TypeSafeClient, model: str) -> str:+ try:+ client.system_one(state=TICKET, questions={"q": {"type": "maybe", "instructions": "?"}}) # type: ignore[dict-item]+ except TypeSafeUnprocessableEntityError as error:+ return f"TypeSafeUnprocessableEntityError: {error}"+ raise AssertionError("an unknown question type was answered")+++def case_too_many_levels(client: TypeSafeClient, model: str) -> str:+ try:+ client.system_one(state=TICKET, questions={"q": Score(criteria=[str(i) for i in range(11)])})+ except TypeSafeUnprocessableEntityError as error:+ return f"TypeSafeUnprocessableEntityError: {error}"+ raise AssertionError("11 score levels were answered")+++def case_state_too_long(client: TypeSafeClient, model: str) -> str:+ try:+ client.system_one(state=TOO_LONG, questions={"q": Noul(instructions="Is this spam?")})+ except TypeSafeUnprocessableEntityError as error:+ return f"TypeSafeUnprocessableEntityError: {error}"+ raise AssertionError("a state longer than the model's window was answered, not refused")+++def case_bad_key(client: TypeSafeClient, model: str) -> str:+ with TypeSafeClient(api_key="not-a-valid-key") as bad:+ try:+ bad.system_one(state=TICKET, questions={"q": Noul(instructions="?")})+ except TypeSafeAuthenticationError as error:+ return f"TypeSafeAuthenticationError: {error}"+ raise AssertionError("a bad key was accepted")+++CASES: list[Callable[[TypeSafeClient, str], str]] = [+ case_models_list,+ case_noul,+ case_noul_criteria_only,+ case_choice,+ case_score,+ case_dict_questions,+ case_object_state,+ case_conversation_state,+ case_extra_body,+ case_envelope,+ case_async,+ case_unknown_model,+ case_invalid_question,+ case_too_many_levels,+ case_state_too_long,+]+++def run(*, check_auth: bool = False) -> list[Case]:+ model = os.environ.get("TYPESAFE_DEFAULT_MODEL", "")+ if not model:+ raise SystemExit("Set TYPESAFE_DEFAULT_MODEL to an SIE decision model, e.g. fastino/GLiNER2.5-Decide")+ cases = [*CASES, case_bad_key] if check_auth else CASES+ results: list[Case] = []+ with TypeSafeClient() as client:+ for case in cases:+ name = case.__name__.removeprefix("case_")+ try:+ results.append(Case(name, True, case(client, model)))+ except Exception as error: # noqa: BLE001 - every failure is reported, not raised+ results.append(Case(name, False, f"{type(error).__name__}: {error}"))+ return results+++def report(results: list[Case]) -> str:+ width = max(len(result.name) for result in results)+ lines = [f"{'PASS' if r.passed else 'FAIL'} {r.name:<{width}} {r.detail}" for r in results]+ passed = sum(result.passed for result in results)+ lines.append(f"{passed}/{len(results)} passed")+ return "\n".join(lines)+++def main(argv: list[str] | None = None) -> int:+ parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)+ parser.add_argument("--check-auth", action="store_true", help="also check that a bad key is refused")+ parser.add_argument("--json", type=Path, help="write the results to this file")+ args = parser.parse_args(argv)+ results = run(check_auth=args.check_auth)+ print(report(results))+ if args.json:+ payload: dict[str, Any] = {+ "base_url": os.environ.get("TYPESAFE_BASE_URL"),+ "model": os.environ.get("TYPESAFE_DEFAULT_MODEL"),+ "cases": [asdict(result) for result in results],+ }+ args.json.write_text(json.dumps(payload, indent=2) + "\n", encoding="utf-8")+ return 0 if all(result.passed for result in results) else 1+++if __name__ == "__main__":+ sys.exit(main())diff --git a/examples/systemone-local/decide.py b/examples/systemone-local/decide.pynew file mode 100644index 000000000..791687c32--- /dev/null+++ b/examples/systemone-local/decide.py@@ -0,0 +1,46 @@+"""Typed decisions with the TypeSafe SDK, served by a local SIE.++This is ordinary TypeSafe SDK code. Nothing in it names SIE: the SDK reads+TYPESAFE_BASE_URL, TYPESAFE_DEFAULT_MODEL and TYPESAFE_API_KEY from the+environment, and those point it at SIE (see README.md).+"""++from __future__ import annotations++from typesafe_sdk import Choice, Noul, Score, TypeSafeClient++TICKET = "I was charged twice for my March invoice. Please refund one of the charges today."+++def main() -> None:+ with TypeSafeClient() as client:+ response = client.system_one(+ state=TICKET,+ questions={+ "spam": Noul(instructions="Is this message unsolicited spam?"),+ "intent": Choice(+ instructions="What does the customer want?",+ criteria={+ "billing": "payments, invoices or refunds",+ "technical": "something is broken",+ "other": None,+ },+ ),+ "urgency": Score(+ instructions="How urgent is this request?",+ criteria=["can wait", "this week", "today"],+ ),+ },+ )++ print(f"model: {response.model}")+ print(f"spam: P(yes) = {response.nouls['spam'].noul:.2f}")+ intent = response.choices["intent"]+ print(f"intent: {intent.choice} (confidence {intent.confidence:.2f})")+ urgency = response.scores["urgency"]+ print(f"urgency: {urgency.score:.2f} of 0-2 (confidence {urgency.confidence:.2f})")+ print(f"input tokens: {response.usage.input_tokens}")+++if __name__ == "__main__":+ main()diff --git a/examples/systemone-local/js/decide.mjs b/examples/systemone-local/js/decide.mjsnew file mode 100644index 000000000..d18267461--- /dev/null+++ b/examples/systemone-local/js/decide.mjs@@ -0,0 +1,31 @@+// Typed decisions with the TypeSafe JS SDK, served by a local SIE.+//+// Ordinary TypeSafe SDK code: the client reads TYPESAFE_BASE_URL,+// TYPESAFE_DEFAULT_MODEL and TYPESAFE_API_KEY from the environment, and those+// point it at SIE (see ../README.md).+import { TypeSafeClient, choice, noul, score } from "@typesafe-ai/sdk";++const TICKET = "I was charged twice for my March invoice. Please refund one of the charges today.";++const client = new TypeSafeClient();+const { model, answers, usage } = await client.systemOne({+ state: TICKET,+ questions: {+ spam: noul("Is this message unsolicited spam?"),+ intent: choice("What does the customer want?", {+ billing: "payments, invoices or refunds",+ technical: "something is broken",+ other: null,+ }),+ urgency: score("How urgent is this request?", ["can wait", "this week", "today"]),+ },+});++console.log(`model: ${model}`);+console.log(`spam: P(yes) = ${answers.spam.noul.toFixed(2)}`);+console.log(`intent: ${answers.intent.choice} (confidence ${answers.intent.confidence.toFixed(2)})`);+console.log(`urgency: ${answers.urgency.score.toFixed(2)} of 0-2 (confidence ${answers.urgency.confidence.toFixed(2)})`);+console.log(`input tokens: ${usage.input_tokens}`);++const models = await client.models.list();+console.log(`models listed: ${models.length}`);diff --git a/examples/systemone-local/js/package-lock.json b/examples/systemone-local/js/package-lock.jsonnew file mode 100644index 000000000..3d655fd50--- /dev/null+++ b/examples/systemone-local/js/package-lock.json@@ -0,0 +1,25 @@+{+ "name": "superlinked-sie-systemone-local-js",+ "lockfileVersion": 3,+ "requires": true,+ "packages": {+ "": {+ "name": "superlinked-sie-systemone-local-js",+ "dependencies": {+ "@typesafe-ai/sdk": "0.6.0"+ },+ "engines": {+ "node": ">=20"+ }+ },+ "node_modules/@typesafe-ai/sdk": {+ "version": "0.6.0",+ "resolved": "https://registry.npmjs.org/@typesafe-ai/sdk/-/sdk-0.6.0.tgz",+ "integrity": "sha512-IddX+Q0XM+VagOUZFeP7wZjaO4SHMdvnh2zEBdrZZnXedWI3BNK1lKhMx3ayrkFWvVLbVcUHJy6AVZlY+e6Jaw==",+ "license": "MIT",+ "engines": {+ "node": ">=20"+ }+ }+ }+}diff --git a/examples/systemone-local/js/package.json b/examples/systemone-local/js/package.jsonnew file mode 100644index 000000000..89320d296--- /dev/null+++ b/examples/systemone-local/js/package.json@@ -0,0 +1,8 @@+{+ "name": "superlinked-sie-systemone-local-js",+ "private": true,+ "type": "module",+ "engines": { "node": ">=20" },+ "scripts": { "decide": "node decide.mjs" },+ "dependencies": { "@typesafe-ai/sdk": "0.6.0" }+}diff --git a/examples/systemone-local/pyproject.toml b/examples/systemone-local/pyproject.tomlnew file mode 100644index 000000000..a5c4b5fb8--- /dev/null+++ b/examples/systemone-local/pyproject.toml@@ -0,0 +1,25 @@+[project]+name = "superlinked-sie-systemone-local-example"+version = "0.1.0"+description = "Run TypeSafe SDK code against a local SIE System One model, and check it"+requires-python = ">=3.12,<3.13"+dependencies = [+ "typesafe-sdk==0.7.4",+]++[tool.uv]+package = false++[dependency-groups]+dev = [+ "pytest>=8",+ "ruff>=0.14",+]++[tool.pytest.ini_options]+testpaths = ["tests"]+pythonpath = ["."]++[tool.ruff]+line-length = 120+target-version = "py312"diff --git a/examples/systemone-local/tests/test_conformance.py b/examples/systemone-local/tests/test_conformance.pynew file mode 100644index 000000000..ffbed9600--- /dev/null+++ b/examples/systemone-local/tests/test_conformance.py@@ -0,0 +1,152 @@+"""The conformance checker against a stub System One server.++The stub answers as SIE's ``POST /v1/systemone`` and ``GET /v1/models`` do,+and each knob breaks one thing, so every case is checked both for what it+accepts and for what it refuses. This checks the checker, offline; SIE itself+is checked by running ``conformance.py`` against a running server.+"""++from __future__ import annotations++import json+import threading+from collections.abc import Iterator+from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer+from typing import Any++import pytest++import conformance++MODEL = "acme/decide"+WINDOW_WORDS = 400+KNOBS: dict[str, Any] = {}+++def _answer(question: dict[str, Any]) -> dict[str, Any]:+ if question["type"] == "noul":+ return {"type": "noul", "noul": 0.25, "answer": False, "confidence": 0.75}+ if question["type"] == "choice":+ keys = list(question["criteria"])+ rest = 0.2 / max(1, len(keys) - 1)+ probabilities = {key: (0.8 if i == 0 else rest) for i, key in enumerate(keys)}+ return {"type": "choice", "choice": keys[0], "probabilities": probabilities, "confidence": 0.7}+ levels = question["criteria"]+ probabilities = {str(i): 1.0 / len(levels) for i in range(len(levels))}+ return {+ "type": "score",+ "score": (len(levels) - 1) / 2,+ "legend": {str(i): level for i, level in enumerate(levels)},+ "probabilities": probabilities,+ "confidence": 0.0,+ }+++def _invalid(message: str) -> tuple[int, dict[str, Any]]:+ return 422, {"detail": [{"type": "value_error", "loc": ["body"], "msg": message}]}+++def _systemone(body: dict[str, Any], authorization: str | None) -> tuple[int, dict[str, Any]]:+ if KNOBS.get("check_key") and authorization != "Bearer good-key":+ return 401, {"detail": {"error_type": "authentication_error", "message": "Invalid token"}}+ if body.get("model") != MODEL:+ return 404, {"detail": {"error_type": "not_found_error", "message": f"Model {body.get('model')!r} not found"}}+ questions = body.get("questions") or {}+ for question in questions.values():+ if question.get("type") not in {"noul", "choice", "score"}:+ return _invalid("unknown question type")+ if question["type"] == "score" and len(question.get("criteria", [])) > 10 and not KNOBS.get("any_levels"):+ return _invalid("at most 10 levels")+ state = body.get("state")+ if isinstance(state, str) and len(state.split()) > WINDOW_WORDS and not KNOBS.get("truncate"):+ return _invalid("the state does not fit the model's window")+ answers = {qid: _answer(question) for qid, question in questions.items()}+ if KNOBS.get("drop_answer"):+ answers.popitem()+ tokens: Any = 12.0 if KNOBS.get("float_tokens") else 12+ return 200, {"model": MODEL, "answers": answers, "usage": {"input_tokens": tokens, "output_tokens": 0}}+++def _models() -> dict[str, Any]:+ entry: dict[str, Any] = {"name": MODEL, "description": "A stub decision model.", "release_date": "2026-09-24"}+ if KNOBS.get("no_release_date"):+ del entry["release_date"]+ return {"models": [entry, {"name": "acme/embedder", "description": "", "release_date": ""}]}+++class Handler(BaseHTTPRequestHandler):+ def _send(self, status: int, body: dict[str, Any]) -> None:+ data = json.dumps(body).encode()+ self.send_response(status)+ self.send_header("Content-Type", "application/json")+ self.send_header("Content-Length", str(len(data)))+ self.end_headers()+ self.wfile.write(data)++ def do_GET(self) -> None:+ if self.path == "/v1/models":+ self._send(200, _models())+ else:+ self._send(404, {"detail": "Not Found"})++ def do_POST(self) -> None:+ body = json.loads(self.rfile.read(int(self.headers["Content-Length"])))+ if self.path == "/v1/systemone":+ self._send(*_systemone(body, self.headers.get("Authorization")))+ else:+ self._send(404, {"detail": "Not Found"})++ def log_message(self, *_: Any) -> None:+ pass+++def server(monkeypatch: pytest.MonkeyPatch) -> Iterator[str]:+ KNOBS.clear()+ httpd = ThreadingHTTPServer(("127.0.0.1", 0), Handler)+ thread = threading.Thread(target=httpd.serve_forever, daemon=True)+ thread.start()+ url = f"http://127.0.0.1:{httpd.server_address[1]}"+ monkeypatch.setenv("TYPESAFE_BASE_URL", url)+ monkeypatch.setenv("TYPESAFE_DEFAULT_MODEL", MODEL)+ monkeypatch.setenv("TYPESAFE_API_KEY", "good-key")+ yield url+ httpd.shutdown()+++def _verdicts(**kwargs: Any) -> dict[str, bool]:+ return {result.name: result.passed for result in conformance.run(**kwargs)}+++def test_conforming_server_passes_every_case(server: str) -> None:+ KNOBS["check_key"] = True+ verdicts = _verdicts(check_auth=True)+ assert all(verdicts.values()), [name for name, passed in verdicts.items() if not passed]+ assert len(verdicts) == len(conformance.CASES) + 1+++ ("knob", "failing"),+ [+ ("truncate", {"state_too_long"}),+ ("any_levels", {"too_many_levels"}),+ ("no_release_date", {"models_list"}),+ ("float_tokens", None),+ ("drop_answer", None),+ ],+)+def test_each_break_is_caught(server: str, knob: str, failing: set[str] | None) -> None:+ KNOBS[knob] = True+ verdicts = _verdicts()+ failed = {name for name, passed in verdicts.items() if not passed}+ if failing is None:+ # A body the SDK cannot parse, or a missing answer, fails every answering case.+ assert {"noul", "choice", "score", "envelope"} & failed+ else:+ assert failed == failing+++def test_report_lists_every_case(server: str) -> None:+ results = conformance.run()+ text = conformance.report(results)+ assert text.splitlines()[-1] == f"{len(results)}/{len(results)} passed"diff --git a/examples/systemone-local/uv.lock b/examples/systemone-local/uv.locknew file mode 100644index 000000000..d8c467307--- /dev/null+++ b/examples/systemone-local/uv.lock@@ -0,0 +1,288 @@+version = 1+requires-python = "==3.12.*"++[[package]]+name = "annotated-types"+version = "0.8.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/5f/56/a8120250d128bed162cd73c76d45f6ef9991f3e068f62a8ee060afa3104a/annotated_types-0.8.0.tar.gz", hash = "sha256:13b2beaad985e05e2d6407ee4c4f35590b11f8d693a258a561055cac8f64cab7", size = 15893 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/99/91/8acff4f5e50511b911bbccb72b8628a49c68ce14148cd9f6431094859a90/annotated_types-0.8.0-py3-none-any.whl", hash = "sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0", size = 13427 },+]++[[package]]+name = "anyio"+version = "4.15.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "idna" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/a9/d2/f4d173e22df740bc37b1db102b386ba719b66e95b0f0d751f556b387e6d2/anyio-4.15.1.tar.gz", hash = "sha256:9f28306018cbd6d329e64a36d58256edff76dd996fe423bc957326e578b82a94", size = 276966 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/12/b8/4bd346e22b28902df4d651910f5242c28d84e4a5c2435ca5c3f797ed7e2e/anyio-4.15.1-py3-none-any.whl", hash = "sha256:6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101", size = 132079 },+]++[[package]]+name = "colorama"+version = "0.4.6"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 },+]++[[package]]+name = "h11"+version = "0.16.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515 },+]++[[package]]+name = "httpcore2"+version = "2.13.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "h11" },+ { name = "truststore" },+]+sdist = { url = "https://files.pythonhosted.org/packages/cb/f3/1db7aa2bc2524062192bb0e0323969492d1883152a232fe36eea65f4e35c/httpcore2-2.13.1.tar.gz", hash = "sha256:e0aa977abe17e69a3b820a24542a6fa88702676d83880b8d194dcd18408e5103", size = 68071 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/09/ba/a4568248771ce81957bfb7cc600264a40fbcda092391ee1c415c50be4bea/httpcore2-2.13.1-py3-none-any.whl", hash = "sha256:e1e05d4f25f7d7d496bfb96748f6f4b67657b03da069b3a68c36069f3db73d0a", size = 83423 },+]++[[package]]+name = "httpx2"+version = "2.13.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "anyio", marker = "sys_platform != 'emscripten'" },+ { name = "httpcore2", marker = "sys_platform != 'emscripten'" },+ { name = "httpx2-jsfetch", marker = "sys_platform == 'emscripten'" },+ { name = "idna" },+ { name = "truststore", marker = "sys_platform != 'emscripten'" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/d5/44/474bef2a0e9d90f1715d32cb98b0738695ca17ba324095fb2497ed7fbd59/httpx2-2.13.1.tar.gz", hash = "sha256:e48744a19e3af5ee48313d0ce5fe941d5422fae5705ea922a4aabf94d7800dfa", size = 100405 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/d8/9c/6fe8931fd9f381042a9e4c7d5a7b4cbf7016b252bec0c99a49fce42c3326/httpx2-2.13.1-py3-none-any.whl", hash = "sha256:6dff50fabc270ee5fd25d845d0b078ed20564579744d6d962850975996d2f9a4", size = 95597 },+]++[[package]]+name = "httpx2-jsfetch"+version = "1.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/cd/c4/0e5636363151a2a1795e0a77617168b9ca438e1748ec05fc9b5687f93d64/httpx2_jsfetch-1.0.tar.gz", hash = "sha256:70a0e3eabfef7cce5ad9c629f7d01ca05e418f586646f4ddf14782e4c1454c60", size = 6872 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/9b/43/832f631d32e4f1211caa2ba368317739fe71f0b8530e4c9d15dc454bac2a/httpx2_jsfetch-1.0-py3-none-any.whl", hash = "sha256:cb916b707601e69a07721aabc8f3f6659be3a6893bc1ff5c6f9e02241df2da32", size = 6382 },+]++[[package]]+name = "idna"+version = "3.20"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44", size = 216463 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583 },+]++[[package]]+name = "iniconfig"+version = "2.3.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/01/e1/2069291243c926a2ff1cd706c7f3eeb9b62144bf60f77c9fb9ff2fb26bd3/iniconfig-2.3.1.tar.gz", hash = "sha256:67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960", size = 21209 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/56/43/4ca9e49d27a1fcf6bece6f6aec0ea46bb9112489b93d4b688fb415457bdb/iniconfig-2.3.1-py3-none-any.whl", hash = "sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7", size = 7552 },+]++[[package]]+name = "packaging"+version = "26.3"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956 },+]++[[package]]+name = "pluggy"+version = "1.6.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538 },+]++[[package]]+name = "pydantic"+version = "2.14.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "annotated-types" },+ { name = "pydantic-core" },+ { name = "typing-extensions" },+ { name = "typing-inspection" },+]+sdist = { url = "https://files.pythonhosted.org/packages/7c/0b/8e10b2e693af8ec54346a14caf36221334775975a747c9ceaa3f8371d96d/pydantic-2.14.1.tar.gz", hash = "sha256:94f478203dd03404682a1ada216965651dd74b1d2d5ffd62e00e0837caab5c26", size = 900362 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/35/ea/a56b9fe5066f3537b7882f77e9c5dfb26d8c2eefdaed9b5fc73d57b4dc22/pydantic-2.14.1-py3-none-any.whl", hash = "sha256:9195d967ec791692a04438115466764fb8b9a27b31f14a760437694f40d6b454", size = 488106 },+]++[[package]]+name = "pydantic-core"+version = "2.50.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/a6/24/af4ec4be49fbc810f35b0bdcacc3d433b56bbfa469fd3bfd4ae116cd9bf1/pydantic_core-2.50.1.tar.gz", hash = "sha256:e50d7b94baac6c7d09927fa5ca5800a0c7ee5015c7fcff65beb3a1931b5a6e09", size = 513515 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/ee/94/101b49a6c63f99586755690696eae14532772587d9e39e93f7b8d28a49da/pydantic_core-2.50.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:704075d10b74f2f3c6e15407c696d88701df35fc8953f434a431add0d0074db0", size = 2222428 },+ { url = "https://files.pythonhosted.org/packages/db/a3/f8b1b39349c33037c73d7a1b794c9c29d8f07d5bd2b74399c1375a529cc6/pydantic_core-2.50.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e8e1d6ce820aa23317e8209a86bd65a540973c12dc7552b48a4f6c8e9926815e", size = 2025779 },+ { url = "https://files.pythonhosted.org/packages/d2/2d/862a7d115305cc621358e51ba13f296e0ffdf4fbd984be9f63bc7862730b/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c18db21573bd2c6489f9a544b7499f0df2853958c568e5e783536ee1f690af41", size = 2048429 },+ { url = "https://files.pythonhosted.org/packages/c0/7d/fed95d18bf2b5abe2d5ab2bbec4184bfc22b6805994a33ccdae8edffd25a/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cb57f304525a5e3c13333b772bf9a473f36326e9c821b2e8e1b2fd36f80ae2c3", size = 2173274 },+ { url = "https://files.pythonhosted.org/packages/93/1e/c6f22ceac65dc3d291ff79bea0eb74cbd1de8b128f01fee48af03bcea1e1/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a27c09d86600f1bf2fe3f37e1ae697faf3143931c09322cd799da94deee923b5", size = 2360403 },+ { url = "https://files.pythonhosted.org/packages/2c/97/190b5b6bfe4c72f265feb657913eb30749193927a5ad7b83cfa7866a25a2/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:46b3301d3b5c886f77de7546e47274a5842c622ea2020b8c6524c6b66913b4a6", size = 2439799 },+ { url = "https://files.pythonhosted.org/packages/90/24/48cd98388e4ac2c08d0800af36d15413db15e20387f1038123a2c86cb2f6/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:93ba4e9d8210d941c200431a56b2c0400b131865947903937ed3ec5404307d2e", size = 2160157 },+ { url = "https://files.pythonhosted.org/packages/00/86/d909133d0b9979ed14c20f110f21124a0e346caf071bd66ac5af3009062b/pydantic_core-2.50.1-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:e5faeaee74a57d32b3ab3aebad2e348f06d3ba946fc5d28c1728455f00a3d13a", size = 2229523 },+ { url = "https://files.pythonhosted.org/packages/90/31/4b43f08131b2098e73a852fd932063385f3103b33839fd9d1abdb89e673d/pydantic_core-2.50.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a3cda0e538208e5d722bbf3698b24f19c0a7d05bc8d5f8a7f9b121ea7fa243d9", size = 2242700 },+ { url = "https://files.pythonhosted.org/packages/88/77/de39658569dc7a4c293d110a89629f61145e7538f00d1e4280c28debefd3/pydantic_core-2.50.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:57f51b31ff826e2859120cf4737c5a758a48d96f3e97da40ccee1796d58078ff", size = 2278452 },+ { url = "https://files.pythonhosted.org/packages/46/bd/1eeb9e4e791e81210ef9096f58080b32ba15b5b13c108d50aaa3f8ce9f73/pydantic_core-2.50.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:8daa7ee75245d43ad7d747e5c9ecc1b1d06552f72b14887e9276f787d57375f4", size = 2450098 },+ { url = "https://files.pythonhosted.org/packages/1c/e6/b2accfdff17e5a88d6358536702146de00f9339adaa4d5bbe1ee93cb4832/pydantic_core-2.50.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:acbf31f37c53a5ac0c34706c80b4f5107ba20b05fdd3816124bf236ef0c57dd2", size = 2476839 },+ { url = "https://files.pythonhosted.org/packages/3b/7e/c8a83eb5d2cd42c2e13507150fb777b1edea5a018adc9cbf2858a1d08285/pydantic_core-2.50.1-cp312-cp312-win32.whl", hash = "sha256:45b11cac094aa25725581d9304eee93c9028516b9ea80dd9e175e13a5a2c840e", size = 2101425 },+ { url = "https://files.pythonhosted.org/packages/c5/17/8bbd530b8659e9d963f5b16f6cb8e159f4cd174b4d6304e48969ab12dba8/pydantic_core-2.50.1-cp312-cp312-win_amd64.whl", hash = "sha256:132529c83901437ff642f585216831bf5fd7a91df66829907e155192ead62498", size = 2172522 },+ { url = "https://files.pythonhosted.org/packages/af/9f/a79d690b127e4e3cff143d031538ab9aa715f6b2fbeecbd07cd6f2bf9fb7/pydantic_core-2.50.1-cp312-cp312-win_arm64.whl", hash = "sha256:4e834f6a8e4ff772dcc34f58ef5504147a3ea5b0f4eeb13b0f8eb2ca75ac57f1", size = 2161366 },+]++[[package]]+name = "pygments"+version = "2.21.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c", size = 5005329 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147 },+]++[[package]]+name = "pytest"+version = "9.1.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "colorama", marker = "sys_platform == 'win32'" },+ { name = "iniconfig" },+ { name = "packaging" },+ { name = "pluggy" },+ { name = "pygments" },+]+sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536 },+]++[[package]]+name = "ruff"+version = "0.17.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/e9/a7/70debb024dfacda67b8e560cc7511f52b34b9348a8cc8c1ec23036dcd51d/ruff-0.17.0.tar.gz", hash = "sha256:5cd03240d8208a557c2a9655a5cb07ebe36aa6bb35065f97d48c1f6adef5a322", size = 5320554 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/bc/f8/ee5ab9da6089eae2a33e6008b01deb1eda19992c1c8e10661e98cee1640f/ruff-0.17.0-py3-none-linux_armv6l.whl", hash = "sha256:0e271826af9a20d18c6cfae8c51e82959167c24859686ddd3eb9a7f0842ce81e", size = 10148907 },+ { url = "https://files.pythonhosted.org/packages/9f/d9/2f81fb5a9d580afbb11b1c8ff915233a11f2a1b27405d7991f183c5e1976/ruff-0.17.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5f0ca4a40f81403689c04f12966e22f44e329ae362072d8f1587b7bda87f603b", size = 10224208 },+ { url = "https://files.pythonhosted.org/packages/a7/20/643f3c8f75594f937b2bf74801241c56a2e2b8e139d24dff8b66b28cdd7f/ruff-0.17.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:cbf7149e0927dc3295d5d64679a4765576eef71b00782b2ae969ef82274d6bb9", size = 9273324 },+ { url = "https://files.pythonhosted.org/packages/ec/91/627700b233d367736cb274f1bd0b47d1f2b12f68878192812bd875adadc3/ruff-0.17.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13ee90156522998c3037059d8f66885c8adeeaf7643bdce2caceee196ecd23e0", size = 9953190 },+ { url = "https://files.pythonhosted.org/packages/cd/92/91f7b5ed39490f89d6cbf56e1f543c383667a725efa8e2c2dee0f01f5591/ruff-0.17.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3d8e4a002a94cd9d0dc48b51dc69d807a172b5b9bf2b668e656424dc5b55ead1", size = 9961746 },+ { url = "https://files.pythonhosted.org/packages/87/c5/7310f9fc63ce11ff6394edbd5e85433dfb0e14c9fbf6ccc97f1538491bc7/ruff-0.17.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c0b8a60c06a218c337e1161638d34757f83449243e2db161483ddf948e53ad14", size = 10625483 },+ { url = "https://files.pythonhosted.org/packages/a5/8d/97443f0dca4a03a0bc7629fd396fd494a1cb6666121e38c5075acb217d8f/ruff-0.17.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a330178bdffc4205dbf3bda11d93e059e388fd6546f8cdd304501a9160363c0d", size = 11350129 },+ { url = "https://files.pythonhosted.org/packages/9c/0a/c525efd9777be4b6b012e6969a3012648468e7e6c4b3e5b46af69f46e8eb/ruff-0.17.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7bb08489e234876fa2da67ae3ea938e9a2156da80293e0e4365abd6973d98329", size = 10906223 },+ { url = "https://files.pythonhosted.org/packages/2c/3c/4a01195d93420cad1175bedad13a515dc8a56f95a6e39789b92e582682f5/ruff-0.17.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc73e7c133e82d55b5f15897b2a442d72c0cb4a0c886c46801ce3c247150b60c", size = 10386314 },+ { url = "https://files.pythonhosted.org/packages/c7/72/1a3951665485a921f6375f91e754a1854d5a645d41acc3642668064ff64d/ruff-0.17.0-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:db4f74c533403ab70fe4007873f6ae0c9f94a8b03158cf48d78788e47cdbe399", size = 10565464 },+ { url = "https://files.pythonhosted.org/packages/90/8c/539b4d8c082f57e18db8ae2be85a460d77861c79dcd5798e32b536a6a06f/ruff-0.17.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3d8cc360e666d1914e47b0777c6906d70cf18891a55532bd0a16844195d70859", size = 10079468 },+ { url = "https://files.pythonhosted.org/packages/e0/b8/84286966db79434e8c26b585b0a0f6897cb3ab1c51a4aa4df10c28488b62/ruff-0.17.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d66de796b726c4801e05fa99a2a8d7a780e107be222486c304ab61765561e866", size = 9958556 },+ { url = "https://files.pythonhosted.org/packages/69/50/27b6eed27b83fcdd5bfa0d52b83231e29094754374698da404d094487ae3/ruff-0.17.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:c3f268baf004aea944f040623327119527ea231af15f7fb7890e82cea0679589", size = 10352173 },+ { url = "https://files.pythonhosted.org/packages/2a/fa/955399fd13044cd827862044117d784a59e3196f6cce7424908ac9a7f914/ruff-0.17.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:864b6c1acb6b0bccf94b5a3938a1531fd09aaca5e5659a2e7bf0f3cf2a685540", size = 10791761 },+ { url = "https://files.pythonhosted.org/packages/ae/bf/024e01e1f6aec87768696725e648ed5b438941341eea8f8100beb681961f/ruff-0.17.0-py3-none-win32.whl", hash = "sha256:5e50aa5b84decd9fe5b0bb0e6f71c3b592f1767ed09faa4b7207d933961e35cd", size = 9904112 },+ { url = "https://files.pythonhosted.org/packages/cc/77/1ee73df41dcc8d1cdb686ee4bc46ea29704ea175feb6b95c78420f631ab8/ruff-0.17.0-py3-none-win_amd64.whl", hash = "sha256:8ab76bcda86dfd28e13776cb5de3c7bcdcf1ae3d37ed761113d1a5a415dc134c", size = 10115585 },+ { url = "https://files.pythonhosted.org/packages/fd/71/eb4f0ccc844aece56963e8578df9c95d4c00f580547d52329d4035d3af18/ruff-0.17.0-py3-none-win_arm64.whl", hash = "sha256:c154c73ff43f9854395e24cac507af13078962e53d2b511605058d22af1fdb88", size = 9872035 },+]++[[package]]+name = "superlinked-sie-systemone-local-example"+version = "0.1.0"+source = { virtual = "." }+dependencies = [+ { name = "typesafe-sdk" },+]++[package.dev-dependencies]+dev = [+ { name = "pytest" },+ { name = "ruff" },+]++[package.metadata]+requires-dist = [{ name = "typesafe-sdk", specifier = "==0.7.4" }]++[package.metadata.requires-dev]+dev = [+ { name = "pytest", specifier = ">=8" },+ { name = "ruff", specifier = ">=0.14" },+]++[[package]]+name = "tenacity"+version = "9.2.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/82/9e/497c1c8ebe5a5b5d1d4a7511aea22c0bb1a97e3170d98abdef0e1b34265a/tenacity-9.2.1.tar.gz", hash = "sha256:a606b5c808d0cded4a359d5b9932d867ff2a6a6b64d37350260fd01bbdf83839", size = 58261 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/d6/26/1ff2b0721ac66a3ec5b1402b333110b352ab0a8724052ac279a7b82d40c4/tenacity-9.2.1-py3-none-any.whl", hash = "sha256:9e56f17539296baab7beabb08b92f6ee3d7be92d8be72d763360677c2ad6580e", size = 32310 },+]++[[package]]+name = "truststore"+version = "0.10.5"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/ee/9f/c5201d42a484c061e528825fc8e2d565f5abd50a4ced6fb7d29c4ec99b2b/truststore-0.10.5.tar.gz", hash = "sha256:30d36967ccaded5cbb38d602c433f53600036c79d502f4533a49b60a03bbefcd", size = 28091 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/51/e9/3a7820be2bb0fe53b6bc9c3be26d3d1158004e4c3ab953aa6840b955b1e9/truststore-0.10.5-py3-none-any.whl", hash = "sha256:9aaaedaefaf06d8b206278cf8b5012bc897f485a874503501e12d776df78951c", size = 19017 },+]++[[package]]+name = "typesafe-sdk"+version = "0.7.4"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "httpx2" },+ { name = "packaging" },+ { name = "pydantic" },+ { name = "pydantic-core" },+ { name = "tenacity" },+ { name = "truststore", marker = "sys_platform != 'emscripten'" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/94/12/3a897e9f424be6f4db0648a955f8fadbe62149d118a03614df897b5a2ec9/typesafe_sdk-0.7.4.tar.gz", hash = "sha256:a20dca217a746db1ac5534ac502de16e1f86a400b4ec09f8594e6221c2bc9558", size = 24388 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/a2/49/6cd65684e41e25069f4d12c09cd7e1e3f81477f06acb29bf0d1815e27d1e/typesafe_sdk-0.7.4-py3-none-any.whl", hash = "sha256:61cf3f2fe9da20b68c3d3fe2fb76bbb2f35f8c4a9a65a6b81c43a535d2a53210", size = 37700 },+]++[[package]]+name = "typing-extensions"+version = "4.16.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571 },+]++[[package]]+name = "typing-inspection"+version = "0.4.4"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/a3/26/b09b8010994eccc3c09092e6b34058f36a460eea2d4c3e8b910c695975a0/typing_inspection-0.4.4.tar.gz", hash = "sha256:547274fa6b0a561ccf549cc9524b999a578e737d015d8709d021f9d0d13bea47", size = 76928 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/67/81/4add07e5172b7ac40d8ed5ff580409a7801a4fe26d529bdd915401dabfbe/typing_inspection-0.4.4-py3-none-any.whl", hash = "sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147", size = 14750 },+]