@kindgi/sdk 0.1.4-rc.2 → 0.1.4-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kindgi/sdk",
3
- "version": "0.1.4-rc.2",
3
+ "version": "0.1.4-rc.4",
4
4
  "description": "@kindgi/sdk — the authoring SDK for Kindgi™. Facade over the individual @kindgi/* packages + @kindgi/client. Unifies pack authoring (defineTool / defineCheck / defineAgent / defineFlow) and client callsites (createClient) behind three sub-paths: /define, /client, /types. Re-export facade; zero behavior.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -55,15 +55,15 @@
55
55
  "README.md"
56
56
  ],
57
57
  "dependencies": {
58
- "@kindgi/agents": "0.1.4-rc.2",
59
- "@kindgi/client": "0.1.4-rc.2",
60
- "@kindgi/crypto": "0.1.4-rc.2",
61
- "@kindgi/flow": "0.1.4-rc.2",
62
- "@kindgi/guardrails": "0.1.4-rc.2",
63
- "@kindgi/handler-runtime": "0.1.4-rc.2",
64
- "@kindgi/schema": "0.1.4-rc.2",
65
- "@kindgi/tools": "0.1.4-rc.2",
66
- "@kindgi/types": "0.1.4-rc.2"
58
+ "@kindgi/agents": "0.1.4-rc.4",
59
+ "@kindgi/client": "0.1.4-rc.4",
60
+ "@kindgi/crypto": "0.1.4-rc.4",
61
+ "@kindgi/flow": "0.1.4-rc.4",
62
+ "@kindgi/guardrails": "0.1.4-rc.4",
63
+ "@kindgi/handler-runtime": "0.1.4-rc.4",
64
+ "@kindgi/schema": "0.1.4-rc.4",
65
+ "@kindgi/tools": "0.1.4-rc.4",
66
+ "@kindgi/types": "0.1.4-rc.4"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "zod": "^4.0.0"
@@ -22,7 +22,7 @@ description: >
22
22
  kindgi-getting-started.
23
23
  type: core
24
24
  library: "@kindgi/sdk"
25
- version: "0.9.3"
25
+ version: "0.9.4"
26
26
  sdk_version: "0.0.0"
27
27
  pack_languages: [node, python]
28
28
  sources:
@@ -305,15 +305,23 @@ kindgi secrets set GROQ_API_KEY --env=local --scope=tenant
305
305
 
306
306
  **Steps 3–5** same as Path A.
307
307
 
308
- ## Path C — Local via in-process ONNX
308
+ ## Path C — Local via in-process ONNX (runtime from source only)
309
+
310
+ > ⚠️ **Not in the runtime image, so not under `kindgi dev`.** The adapter
311
+ > runs ONNX through `onnxruntime-node`, which ships glibc binaries only,
312
+ > and the Kindgi runtime image is Alpine (musl): the adapter can't load
313
+ > there (`Error loading shared library ld-linux-…`). `kindgi dev` runs
314
+ > that image, so this path fails under it. It works only when the
315
+ > runtime itself runs from source on macOS or a glibc Linux. **For a
316
+ > local model under `kindgi dev`, use Ollama** ([Local via Ollama](#local-via-ollama-via-path-b)).
309
317
 
310
318
  > ⚠️ **Dev-only.** The in-process ONNX adapter writes weights to
311
319
  > `~/.cache/huggingface/hub/` — a per-machine cache with no production
312
320
  > recipe (no volume-mount recipe, no image-bake pattern, no offline
313
- > mode, no SHA pinning). Good for local dev, smoke tests, and CI
314
- > runners that keep the same disk between runs. **Do not ship packs
315
- > that rely on this adapter to production.** Use hosted providers
316
- > (Path A) or Ollama (Path B) instead.
321
+ > mode, no SHA pinning). Good for smoke tests and CI runners that run
322
+ > the runtime from source and keep the same disk between runs. **Do not
323
+ > ship packs that rely on this adapter to production.** Use hosted
324
+ > providers (Path A) or Ollama (Path B) instead.
317
325
 
318
326
  No API key. No network. Bundled with the framework — the adapter ships
319
327
  `smollm2-360m` by default (~273 MB weights, cached at
@@ -385,7 +393,8 @@ production. Skip only for scripted teardown where the model is already
385
393
  cached (`~/.cache/huggingface/hub/models--HuggingFaceTB--SmolLM2-360M-Instruct/`).
386
394
 
387
395
  `prepare` is idempotent: subsequent invocations are cache hits and
388
- return almost instantly, so put it in every `kindgi dev` boot script.
396
+ return almost instantly, so put it in the script that boots your
397
+ from-source runtime.
389
398
 
390
399
  Multi-model providers: prepare each model separately.
391
400
  ```sh
@@ -15,7 +15,7 @@ description: >
15
15
  model by kindgi-authoring-providers.
16
16
  type: core
17
17
  library: "kindgi (Python)"
18
- version: "0.1.0"
18
+ version: "0.1.1"
19
19
  sdk_version: "0.0.0"
20
20
  pack_languages: [python]
21
21
  sources:
@@ -25,9 +25,11 @@ sources:
25
25
 
26
26
  # Authoring Kindgi agents in Python
27
27
 
28
- > **Running `kindgi`:** a Python pack has no Node project, so the
29
- > `kindgi` CLI is the one on `PATH`. Python commands run in the pack's
30
- > environment: `uv run …` (or `.venv/bin/python …`).
28
+ > **Running `kindgi`:** the CLI is `kindgi-cli` from PyPI, pinned in the
29
+ > pack's dev group, so every `kindgi <command>` below runs as
30
+ > `uv run kindgi <command>` (Poetry: `poetry run kindgi <command>`). Python
31
+ > commands run in the pack's environment the same way: `uv run …` (or
32
+ > `.venv/bin/python …`).
31
33
 
32
34
  An **agent** is a versioned, model-driven orchestrator: instructions (a
33
35
  prompt template), the tools it may call, the capabilities its model
@@ -16,7 +16,7 @@ description: >
16
16
  kindgi-python-authoring-agents.
17
17
  type: core
18
18
  library: "kindgi (Python)"
19
- version: "0.1.1"
19
+ version: "0.1.2"
20
20
  sdk_version: "0.0.0"
21
21
  pack_languages: [python]
22
22
  sources:
@@ -27,9 +27,11 @@ sources:
27
27
 
28
28
  # Authoring Kindgi flows in Python
29
29
 
30
- > **Running `kindgi`:** a Python pack has no Node project, so the
31
- > `kindgi` CLI is the one on `PATH`. Python commands run in the pack's
32
- > environment: `uv run …` (or `.venv/bin/python …`).
30
+ > **Running `kindgi`:** the CLI is `kindgi-cli` from PyPI, pinned in the
31
+ > pack's dev group, so every `kindgi <command>` below runs as
32
+ > `uv run kindgi <command>` (Poetry: `poetry run kindgi <command>`). Python
33
+ > commands run in the pack's environment the same way: `uv run …` (or
34
+ > `.venv/bin/python …`).
33
35
 
34
36
  A **flow** is a versioned, durable graph of steps: tools (your code) and
35
37
  agents (a model's judgment), joined by edges that can carry conditions.
@@ -14,7 +14,7 @@ description: >
14
14
  kindgi-python-authoring-tools.
15
15
  type: core
16
16
  library: "kindgi (Python)"
17
- version: "0.1.1"
17
+ version: "0.1.2"
18
18
  sdk_version: "0.0.0"
19
19
  pack_languages: [python]
20
20
  sources:
@@ -25,9 +25,11 @@ sources:
25
25
 
26
26
  # Authoring Kindgi guardrails in Python
27
27
 
28
- > **Running `kindgi`:** a Python pack has no Node project, so the
29
- > `kindgi` CLI is the one on `PATH`. Python commands run in the pack's
30
- > environment: `uv run …` (or `.venv/bin/python …`).
28
+ > **Running `kindgi`:** the CLI is `kindgi-cli` from PyPI, pinned in the
29
+ > pack's dev group, so every `kindgi <command>` below runs as
30
+ > `uv run kindgi <command>` (Poetry: `poetry run kindgi <command>`). Python
31
+ > commands run in the pack's environment the same way: `uv run …` (or
32
+ > `.venv/bin/python …`).
31
33
 
32
34
  A **guardrail** is a rule an agent's turn must satisfy: a **check** (a
33
35
  function over the turn's trace) plus an **action** (what happens when it
@@ -14,7 +14,7 @@ description: >
14
14
  kindgi-python-getting-started.
15
15
  type: core
16
16
  library: "kindgi (Python)"
17
- version: "0.1.1"
17
+ version: "0.1.2"
18
18
  sdk_version: "0.0.0"
19
19
  pack_languages: [python]
20
20
  sources:
@@ -25,9 +25,11 @@ sources:
25
25
 
26
26
  # Authoring Kindgi tools in Python
27
27
 
28
- > **Running `kindgi`:** a Python pack has no Node project, so the
29
- > `kindgi` CLI is the one on `PATH`. Python commands run in the pack's
30
- > environment: `uv run …` (or `.venv/bin/python …`).
28
+ > **Running `kindgi`:** the CLI is `kindgi-cli` from PyPI, pinned in the
29
+ > pack's dev group, so every `kindgi <command>` below runs as
30
+ > `uv run kindgi <command>` (Poetry: `poetry run kindgi <command>`). Python
31
+ > commands run in the pack's environment the same way: `uv run …` (or
32
+ > `.venv/bin/python …`).
31
33
 
32
34
  A **tool** is a unit of work an agent (or a flow step) calls: typed
33
35
  input, typed output, your code in between. In a Python pack it is a
@@ -14,7 +14,7 @@ description: >
14
14
  kindgi-python-authoring-agents; models by kindgi-authoring-providers.
15
15
  type: core
16
16
  library: "kindgi (Python)"
17
- version: "0.1.5"
17
+ version: "0.1.6"
18
18
  sdk_version: "0.0.0"
19
19
  pack_languages: [python]
20
20
  sources:
@@ -25,9 +25,11 @@ sources:
25
25
 
26
26
  # Getting started with Kindgi in Python
27
27
 
28
- > **Running `kindgi`:** a Python pack has no Node project, so the
29
- > `kindgi` CLI (a Node 22.12+ program) is the one on `PATH`. Python
30
- > commands run in the pack's environment: `uv run …`.
28
+ > **Running `kindgi`:** the CLI is `kindgi-cli` from PyPI (the Kindgi CLI
29
+ > with its own Node, so no Node install), pinned in the pack's dev group.
30
+ > Every `kindgi <command>` below runs as `uv run kindgi <command>` (Poetry:
31
+ > `poetry run kindgi <command>`). Python commands run in the pack's
32
+ > environment the same way: `uv run …`.
31
33
 
32
34
  ## What a pack is
33
35
 
@@ -52,11 +54,11 @@ primitive; `test_*.py`, `*_test.py` and `conftest.py` are skipped.
52
54
  ## Scaffold a new pack
53
55
 
54
56
  ```sh
55
- kindgi init my-pack --template=python
57
+ uvx --from "kindgi-cli>=0.1,<0.2" kindgi init my-pack --template=python
56
58
  cd my-pack
57
- uv sync # .venv with the kindgi package
59
+ uv sync # .venv with the kindgi package and the kindgi CLI
58
60
  uv run pytest
59
- kindgi dev # boots Kindgi locally and runs this pack, reloading on save
61
+ uv run kindgi dev # boots Kindgi locally and runs this pack, reloading on save
60
62
  ```
61
63
 
62
64
  `kindgi dev` needs Postgres: it starts one in Docker unless
@@ -70,9 +72,10 @@ kindgi dev # boots Kindgi locally and runs this pack, reloading on save
70
72
  In the app's directory (where its `pyproject.toml` is):
71
73
 
72
74
  ```sh
73
- kindgi init # --pack-id=<id> if the app's name doesn't make one
75
+ uv add --dev "kindgi-cli>=0.1,<0.2" # the CLI (Poetry: poetry add --group dev …)
76
+ uv run kindgi init # --pack-id=<id> if the app's name doesn't make one
74
77
  uv sync # or what it prints for Poetry / pip
75
- kindgi dev
78
+ uv run kindgi dev
76
79
  ```
77
80
 
78
81
  `kindgi init` edits the app's `pyproject.toml` in place — your layout and
@@ -116,7 +119,7 @@ The `[tool.kindgi]` keys are the ones `kindgi.config.ts` takes —
116
119
  With `kindgi dev` running, from another terminal in the pack directory:
117
120
 
118
121
  ```sh
119
- kindgi runs start --agent=my-pack.echo-agent --input='{"userMessage":"Ada"}'
122
+ uv run kindgi runs start --agent=my-pack.echo-agent --input='{"userMessage":"Ada"}'
120
123
  ```
121
124
 
122
125
  The answer comes from `dev-echo`, a **fallback** provider a new pack
@@ -125,8 +128,8 @@ responded: …", and the turn carries a `fallback-provider` warning. For
125
128
  a real model, put the key in `.env` and register a provider:
126
129
 
127
130
  ```sh
128
- kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt
129
- kindgi providers register --preset=anthropic
131
+ uv run kindgi secrets set ANTHROPIC_API_KEY --env=local --scope=tenant # no-echo prompt
132
+ uv run kindgi providers register --preset=anthropic
130
133
  ```
131
134
 
132
135
  It takes over at the next turn. That registration is in this project's dev