durable-actors 0.7.3 → 0.7.5

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 (57) hide show
  1. package/README.md +1 -1
  2. package/dist/actor/actor.d.ts +3 -0
  3. package/dist/actor/actor.d.ts.map +1 -1
  4. package/dist/actor/actor.js +8 -1
  5. package/dist/actor/actor.js.map +1 -1
  6. package/dist/actor/database.d.ts +11 -0
  7. package/dist/actor/database.d.ts.map +1 -0
  8. package/dist/actor/database.js +31 -0
  9. package/dist/actor/database.js.map +1 -0
  10. package/dist/client-runtime/session.d.ts +1 -1
  11. package/dist/client-runtime/session.js +2 -2
  12. package/dist/client-runtime/session.js.map +1 -1
  13. package/dist/compiler/features/persistence.d.ts.map +1 -1
  14. package/dist/compiler/features/persistence.js +2 -0
  15. package/dist/compiler/features/persistence.js.map +1 -1
  16. package/dist/compiler/rpc-contract.js +1 -1
  17. package/dist/compiler/rpc-contract.js.map +1 -1
  18. package/dist/compiler/validate-public-contract.js +1 -1
  19. package/dist/compiler/validate-public-contract.js.map +1 -1
  20. package/dist/generated/client-runtime.d.ts.map +1 -1
  21. package/dist/generated/client-runtime.js +1 -1
  22. package/dist/generated/client-runtime.js.map +1 -1
  23. package/dist/host/actor-host.js +1 -1
  24. package/dist/host/actor-runtime.d.ts +8 -1
  25. package/dist/host/actor-runtime.d.ts.map +1 -1
  26. package/dist/host/actor-runtime.js +73 -28
  27. package/dist/host/actor-runtime.js.map +1 -1
  28. package/dist/host/actor-worker.js +2 -1
  29. package/dist/host/actor-worker.js.map +1 -1
  30. package/dist/host/generic-host.js +1 -1
  31. package/dist/host/litestream.d.ts +8 -0
  32. package/dist/host/litestream.d.ts.map +1 -0
  33. package/dist/host/litestream.js +40 -0
  34. package/dist/host/litestream.js.map +1 -0
  35. package/dist/host/protocol.d.ts +51 -14
  36. package/dist/host/protocol.d.ts.map +1 -1
  37. package/dist/host/protocol.js +9 -4
  38. package/dist/host/protocol.js.map +1 -1
  39. package/dist/host/sqlite.d.ts +50 -0
  40. package/dist/host/sqlite.d.ts.map +1 -0
  41. package/dist/host/sqlite.js +160 -0
  42. package/dist/host/sqlite.js.map +1 -0
  43. package/dist/index.d.ts +1 -0
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js.map +1 -1
  46. package/dist/runtimeInstaller.d.ts.map +1 -1
  47. package/dist/runtimeInstaller.js +5 -4
  48. package/dist/runtimeInstaller.js.map +1 -1
  49. package/dist/templates/actor/package.json +1 -1
  50. package/dist/templates/ai-chat/package.json +1 -1
  51. package/dist/templates/chat/package.json +1 -1
  52. package/dist/templates/documents/package.json +1 -1
  53. package/dist/templates/python/README.md +1 -1
  54. package/dist/templates/python/package.json +1 -1
  55. package/dist/templates/python/pyproject.toml +1 -1
  56. package/dist/templates/python/src/actors.py +2 -2
  57. package/package.json +2 -2
@@ -15,7 +15,7 @@
15
15
  "@ai-sdk/react": "^4.0.100",
16
16
  "ai": "^7.0.97",
17
17
  "express": "^5.2.1",
18
- "durable-actors": "0.7.3",
18
+ "durable-actors": "0.7.5",
19
19
  "react": "^19.3.0",
20
20
  "react-dom": "^19.3.0"
21
21
  },
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "express": "^5.2.1",
15
- "durable-actors": "0.7.3",
15
+ "durable-actors": "0.7.5",
16
16
  "react": "^19.3.0",
17
17
  "react-dom": "^19.3.0"
18
18
  },
@@ -19,7 +19,7 @@
19
19
  "@tiptap/y-tiptap": "^3.0.7",
20
20
  "express": "^5.2.1",
21
21
  "lib0": "^0.2.117",
22
- "durable-actors": "0.7.3",
22
+ "durable-actors": "0.7.5",
23
23
  "react": "^19.3.0",
24
24
  "react-dom": "^19.3.0",
25
25
  "yjs": "^13.6.32"
@@ -2,6 +2,6 @@
2
2
 
3
3
  Install Node.js 22+, Python 3.11+, and uv. Run `pnpm install`, `uv sync`, then `pnpm exec durable-actors dev`. The shared TypeScript CLI selects `.venv` and checks actor types before starting and reloading.
4
4
 
5
- Edit `src/actors.py`. Write synchronous actor methods with ordinary `def`. Annotated fields persist by default; use `emitted()` for state broadcasts and `ephemeral()` for temporary values such as caches and service clients. From your client application, install `durable-actors[codegen]` and run `pnpm exec durable-actors generate` against the running server. Generated Python clients include synchronous typed methods and models. Import `actors` from the generated package and use `actors.Counter.get("one")`; the SDK manages the HTTP connection pool. Actors with emitted fields also expose `actor.subscribe(callback)` for typed live state; close the returned subscription when finished. The CLI runs strict mypy after generation.
5
+ Edit `src/actors.py`. Write synchronous actor methods with ordinary `def`. Every instance field must use `persisted()` or `ephemeral()`. Use `emitted(persisted(...))` for state broadcasts and `ephemeral()` for temporary values such as caches and service clients. From your client application, install `durable-actors[codegen]` and run `pnpm exec durable-actors generate` against the running server. Generated Python clients include synchronous typed methods and models. Import `actors` from the generated package and use `actors.Counter.get("one")`; the SDK manages the HTTP connection pool. Actors with emitted fields also expose `actor.subscribe(callback)` for typed live state; close the returned subscription when finished. The CLI runs strict mypy after generation.
6
6
 
7
7
  Set `DURABLE_ACTORS_PYTHON` to select another interpreter. `DURABLE_ACTORS_BINARY` selects a locally built runtime.
@@ -2,7 +2,7 @@
2
2
  "name": "durable-actors-example-python",
3
3
  "private": true,
4
4
  "dependencies": {
5
- "durable-actors": "0.7.3"
5
+ "durable-actors": "0.7.5"
6
6
  },
7
7
  "scripts": {
8
8
  "dev": "durable-actors dev",
@@ -2,7 +2,7 @@
2
2
  name = "durable-actors-example"
3
3
  version = "0.1.0"
4
4
  requires-python = ">=3.11"
5
- dependencies = ["durable-actors[codegen]==0.7.3"]
5
+ dependencies = ["durable-actors[codegen]==0.7.5"]
6
6
 
7
7
  [tool.mypy]
8
8
  strict = true
@@ -1,8 +1,8 @@
1
- from durable_actors import Actor
1
+ from durable_actors import Actor, persisted
2
2
 
3
3
 
4
4
  class Counter(Actor):
5
- count: int = 0
5
+ count: int = persisted(0)
6
6
 
7
7
  def increment(self, amount: int = 1) -> int:
8
8
  self.count += amount
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "durable-actors",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "description": "Provider-neutral actors for sandbox compute",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -92,7 +92,7 @@
92
92
  "vite": "^8.3.0",
93
93
  "ws": "^8.18.3",
94
94
  "zod": "^4.3.6",
95
- "durable-actors-observer": "0.7.3"
95
+ "durable-actors-observer": "0.7.5"
96
96
  },
97
97
  "devDependencies": {
98
98
  "@types/node": "^22.0.0",