thespis-sdk 0.3.1__tar.gz

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.
Files changed (70) hide show
  1. thespis_sdk-0.3.1/.gitignore +43 -0
  2. thespis_sdk-0.3.1/CHANGELOG.md +57 -0
  3. thespis_sdk-0.3.1/LICENSE +21 -0
  4. thespis_sdk-0.3.1/PKG-INFO +554 -0
  5. thespis_sdk-0.3.1/README.md +517 -0
  6. thespis_sdk-0.3.1/client/README.md +45 -0
  7. thespis_sdk-0.3.1/docs/README.md +29 -0
  8. thespis_sdk-0.3.1/docs/openapi-v1.json +2958 -0
  9. thespis_sdk-0.3.1/examples/quickstart/game.toml +85 -0
  10. thespis_sdk-0.3.1/examples/quickstart/quickstart.py +40 -0
  11. thespis_sdk-0.3.1/examples/tavern/game.toml +147 -0
  12. thespis_sdk-0.3.1/examples/tavern/scenarios.toml +67 -0
  13. thespis_sdk-0.3.1/fixtures/README.md +41 -0
  14. thespis_sdk-0.3.1/pyproject.toml +88 -0
  15. thespis_sdk-0.3.1/sdk/godot/README.md +209 -0
  16. thespis_sdk-0.3.1/sdk/godot/addons/thespis/api.gd +785 -0
  17. thespis_sdk-0.3.1/sdk/godot/addons/thespis/api.gd.uid +1 -0
  18. thespis_sdk-0.3.1/sdk/godot/addons/thespis/line.gd +38 -0
  19. thespis_sdk-0.3.1/sdk/godot/addons/thespis/line.gd.uid +1 -0
  20. thespis_sdk-0.3.1/sdk/godot/addons/thespis/plugin.cfg +7 -0
  21. thespis_sdk-0.3.1/sdk/godot/addons/thespis/plugin.gd +17 -0
  22. thespis_sdk-0.3.1/sdk/godot/addons/thespis/plugin.gd.uid +1 -0
  23. thespis_sdk-0.3.1/sdk/godot/addons/thespis/result.gd +35 -0
  24. thespis_sdk-0.3.1/sdk/godot/addons/thespis/result.gd.uid +1 -0
  25. thespis_sdk-0.3.1/sdk/godot/addons/thespis/sidecar.gd +121 -0
  26. thespis_sdk-0.3.1/sdk/godot/addons/thespis/sidecar.gd.uid +1 -0
  27. thespis_sdk-0.3.1/sdk/godot/addons/thespis/thespis.gd +418 -0
  28. thespis_sdk-0.3.1/sdk/godot/addons/thespis/thespis.gd.uid +1 -0
  29. thespis_sdk-0.3.1/sdk/unity/README.md +224 -0
  30. thespis_sdk-0.3.1/thespis/__init__.py +7 -0
  31. thespis_sdk-0.3.1/thespis/__main__.py +372 -0
  32. thespis_sdk-0.3.1/thespis/affordances.py +57 -0
  33. thespis_sdk-0.3.1/thespis/api.py +25 -0
  34. thespis_sdk-0.3.1/thespis/beliefs.py +268 -0
  35. thespis_sdk-0.3.1/thespis/brain.py +22 -0
  36. thespis_sdk-0.3.1/thespis/cast.py +95 -0
  37. thespis_sdk-0.3.1/thespis/claims.py +359 -0
  38. thespis_sdk-0.3.1/thespis/considerations.py +229 -0
  39. thespis_sdk-0.3.1/thespis/deception.py +27 -0
  40. thespis_sdk-0.3.1/thespis/decisions.py +61 -0
  41. thespis_sdk-0.3.1/thespis/director.py +39 -0
  42. thespis_sdk-0.3.1/thespis/expression.py +489 -0
  43. thespis_sdk-0.3.1/thespis/gateway.py +404 -0
  44. thespis_sdk-0.3.1/thespis/host.py +408 -0
  45. thespis_sdk-0.3.1/thespis/intents.py +715 -0
  46. thespis_sdk-0.3.1/thespis/ledger.py +154 -0
  47. thespis_sdk-0.3.1/thespis/minds.py +26 -0
  48. thespis_sdk-0.3.1/thespis/moderation.py +226 -0
  49. thespis_sdk-0.3.1/thespis/offline.py +82 -0
  50. thespis_sdk-0.3.1/thespis/perception.py +63 -0
  51. thespis_sdk-0.3.1/thespis/play.py +96 -0
  52. thespis_sdk-0.3.1/thespis/probe.py +175 -0
  53. thespis_sdk-0.3.1/thespis/profiles.py +101 -0
  54. thespis_sdk-0.3.1/thespis/py.typed +0 -0
  55. thespis_sdk-0.3.1/thespis/recall.py +168 -0
  56. thespis_sdk-0.3.1/thespis/retriever.py +22 -0
  57. thespis_sdk-0.3.1/thespis/runtime/__init__.py +5 -0
  58. thespis_sdk-0.3.1/thespis/runtime/download.py +99 -0
  59. thespis_sdk-0.3.1/thespis/runtime/hardware.py +127 -0
  60. thespis_sdk-0.3.1/thespis/runtime/local.py +297 -0
  61. thespis_sdk-0.3.1/thespis/runtime/registry.py +100 -0
  62. thespis_sdk-0.3.1/thespis/server.py +500 -0
  63. thespis_sdk-0.3.1/thespis/session.py +1065 -0
  64. thespis_sdk-0.3.1/thespis/storage.py +363 -0
  65. thespis_sdk-0.3.1/thespis/store.py +180 -0
  66. thespis_sdk-0.3.1/thespis/tick.py +139 -0
  67. thespis_sdk-0.3.1/thespis/tracing.py +66 -0
  68. thespis_sdk-0.3.1/thespis/vault.py +57 -0
  69. thespis_sdk-0.3.1/thespis/voice.py +216 -0
  70. thespis_sdk-0.3.1/thespis/world.py +80 -0
@@ -0,0 +1,43 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .pytest_cache/
6
+ .ruff_cache/
7
+ .mypy_cache/
8
+ .coverage
9
+ htmlcov/
10
+ dist/
11
+ build/
12
+
13
+ # Virtual environments
14
+ .venv/
15
+ venv/
16
+ env/
17
+
18
+ # IDEs (each of us uses our own settings)
19
+ .idea/
20
+ .vscode/
21
+ *.swp
22
+
23
+ # Secrets and local config: never commit keys
24
+ .env
25
+ .env.*
26
+ !.env.example
27
+
28
+ # Local data
29
+ *.sqlite
30
+ *.sqlite3
31
+ *.db
32
+ data/
33
+ backups/
34
+ recordings/
35
+
36
+ # Client
37
+ node_modules/
38
+ client/dist/
39
+ client/.vite/
40
+
41
+ # OS
42
+ .DS_Store
43
+ Thumbs.db
@@ -0,0 +1,57 @@
1
+ # Changelog
2
+
3
+ Thespis follows semantic versioning at 0.x: a minor release may change anything outside `thespis.api` and the `/v1`
4
+ protocol, and those change only with a note here. A release is made by pushing its tag (`v0.3.1`), which publishes it
5
+ to PyPI and GitHub Releases from the section below that has its number.
6
+
7
+ ## 0.3.1
8
+
9
+ The first release on PyPI, as `thespis-sdk` (the name `thespis` was taken). It installs and imports as `thespis`:
10
+
11
+ ```bash
12
+ pip install thespis-sdk
13
+ ```
14
+
15
+ - **For newcomers:** a quickstart (`examples/quickstart`), and a guide to putting Thespis in your own game
16
+ (`docs/getting-started.md`).
17
+ - **Typed:** the package ships `py.typed`, so type checkers read its annotations.
18
+ - No change to `thespis.api`, `/v1` or snapshots.
19
+
20
+ ## 0.3.0 (12 October 2026)
21
+
22
+ At town size, with a cast that grows in play.
23
+
24
+ - **A cast that grows:** `[kind.<id>]` declares kinds of people; `add`, `retire`, `tie` and `untie` change the cast
25
+ and its ties in play.
26
+ - **One culprit:** `[claims] one_actor`. Told two stories of one deed, an NPC keeps the one from the source it
27
+ trusts more, and trusts the other teller less (`caught`). `first_hand` counts a teller who saw it for more.
28
+ - **At town size:** beliefs and the ledger are indexed; `[gossip] most` caps what a tick tells; `tools/town_bench.py`
29
+ holds a tick, an `observe`, a `decide` and a save to budgets in CI.
30
+ - **Statements believed as the engine's rules say:** `observe(..., conf=)`.
31
+ - **A second witness:** `[gossip] corroborate` lets a report from a different witness count, and
32
+ `gossips = "everyone"` lets anyone pass news on.
33
+
34
+ ## 0.2.0 (8 to 10 October 2026)
35
+
36
+ Thespis for any game and any engine.
37
+
38
+ - **The protocol and the library:** a game is one TOML file; `thespis.api` (`Game`, `Session`) makes the calls, and
39
+ `thespis serve` makes the same ones over `/v1` HTTP, as a sidecar beside a game or a server for many projects.
40
+ - **Engines:** a Godot 4 addon and a Unity package.
41
+ - **Models:** profiles for any provider (OpenAI, Azure, Anthropic, Gemini, Groq, vLLM, llama.cpp, Ollama), and a
42
+ local runtime for playing offline (Gemma 4 E4B by default).
43
+ - **Minds:** players as agents, feelings and their decay, gossip along ties, denials, told scenes, and memory by
44
+ meaning.
45
+ - **The player's words:** `understand` reads what a player types as one of the acts open now, or as talk.
46
+ - **Rehearsal** runs offline, with calibrated judges and hand-reads, on any game.
47
+
48
+ ## 0.1.0 (3 to 6 October 2026)
49
+
50
+ Built for the Cambridge University x Arcade AI Hackathon, 3 to 4 October 2026, then hardened. Not tagged.
51
+
52
+ - **The core:** an append-only ledger, beliefs with sources and confidence that can be false, drives and trust, a
53
+ utility brain, and a model that only voices what code decided, citing the events behind each line, with the
54
+ game's own words to fall back on.
55
+ - **Two games on it:** The Crypt Road and the manor mystery.
56
+ - **Rehearsal v1** and the claim check: what each line claims, checked in code against the ledger and against what
57
+ the speaker could know.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thespis contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.