harness-sdk-python 0.1.0__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.
@@ -0,0 +1,19 @@
1
+ node_modules
2
+ .next
3
+ dist
4
+ dist-test
5
+ .wrangler
6
+ .DS_Store
7
+ .env
8
+ .env.local
9
+ .dev.vars
10
+ *.tsbuildinfo
11
+ .harness-runs
12
+ __pycache__
13
+ .venv
14
+ .pytest_cache
15
+ *.egg-info
16
+
17
+ # agentdoc mounted docs
18
+ /d[0-9]*.md
19
+ /doc_*.md
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.4
2
+ Name: harness-sdk-python
3
+ Version: 0.1.0
4
+ Summary: RunManager: the harness-sdk runs subsystem for Python Statewire hosts
5
+ Project-URL: Repository, https://github.com/assistant-ui/harness-sdk
6
+ License-Expression: MIT
7
+ Requires-Python: <4.0,>=3.11
8
+ Requires-Dist: statewire<0.3,>=0.2.0
9
+ Description-Content-Type: text/markdown
10
+
11
+ # harness-sdk-python
12
+
13
+ RunManager: the harness-sdk runs subsystem for Python Statewire hosts — the
14
+ `run/*` command protocol (queues, steering, edit/reload, stop/resume, crash
15
+ replay) driving a single async `start(ctx)` executor entrypoint.
16
+
17
+ ```python
18
+ class MyHost(Statewire):
19
+ async def lifespan(self):
20
+ self.state = initial_state()
21
+ self.runs = RunManager(
22
+ state=self.state["runs"],
23
+ start=self._start,
24
+ get_message_meta=self._get_message_meta,
25
+ create_task=self.create_task,
26
+ capabilities=("rewind",),
27
+ )
28
+ yield
29
+
30
+ @command("run/enqueue")
31
+ async def run_enqueue(self, params, *, caller):
32
+ return await self.runs.enqueue(params, caller=caller)
33
+
34
+ @command("run/steer")
35
+ async def run_steer(self, params, *, caller):
36
+ return await self.runs.steer(params, caller=caller)
37
+
38
+ @command("run/dequeue")
39
+ async def run_dequeue(self, params):
40
+ return await self.runs.dequeue(params)
41
+
42
+ @command("run/edit")
43
+ async def run_edit(self, params):
44
+ return await self.runs.edit(params)
45
+
46
+ @command("run/reload")
47
+ async def run_reload(self, params):
48
+ return await self.runs.reload(params)
49
+
50
+ @command("run/stop")
51
+ async def run_stop(self):
52
+ return await self.runs.stop()
53
+
54
+ @command("run/continue")
55
+ async def run_continue(self):
56
+ return await self.runs.continue_run()
57
+ ```
@@ -0,0 +1,47 @@
1
+ # harness-sdk-python
2
+
3
+ RunManager: the harness-sdk runs subsystem for Python Statewire hosts — the
4
+ `run/*` command protocol (queues, steering, edit/reload, stop/resume, crash
5
+ replay) driving a single async `start(ctx)` executor entrypoint.
6
+
7
+ ```python
8
+ class MyHost(Statewire):
9
+ async def lifespan(self):
10
+ self.state = initial_state()
11
+ self.runs = RunManager(
12
+ state=self.state["runs"],
13
+ start=self._start,
14
+ get_message_meta=self._get_message_meta,
15
+ create_task=self.create_task,
16
+ capabilities=("rewind",),
17
+ )
18
+ yield
19
+
20
+ @command("run/enqueue")
21
+ async def run_enqueue(self, params, *, caller):
22
+ return await self.runs.enqueue(params, caller=caller)
23
+
24
+ @command("run/steer")
25
+ async def run_steer(self, params, *, caller):
26
+ return await self.runs.steer(params, caller=caller)
27
+
28
+ @command("run/dequeue")
29
+ async def run_dequeue(self, params):
30
+ return await self.runs.dequeue(params)
31
+
32
+ @command("run/edit")
33
+ async def run_edit(self, params):
34
+ return await self.runs.edit(params)
35
+
36
+ @command("run/reload")
37
+ async def run_reload(self, params):
38
+ return await self.runs.reload(params)
39
+
40
+ @command("run/stop")
41
+ async def run_stop(self):
42
+ return await self.runs.stop()
43
+
44
+ @command("run/continue")
45
+ async def run_continue(self):
46
+ return await self.runs.continue_run()
47
+ ```
@@ -0,0 +1,21 @@
1
+ [project]
2
+ name = "harness-sdk-python"
3
+ version = "0.1.0"
4
+ description = "RunManager: the harness-sdk runs subsystem for Python Statewire hosts"
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ requires-python = ">=3.11,<4.0"
8
+ dependencies = ["statewire>=0.2.0,<0.3"]
9
+
10
+ [project.urls]
11
+ Repository = "https://github.com/assistant-ui/harness-sdk"
12
+
13
+ [tool.uv.sources]
14
+ statewire = { workspace = true }
15
+
16
+ [build-system]
17
+ requires = ["hatchling"]
18
+ build-backend = "hatchling.build"
19
+
20
+ [tool.hatch.build.targets.wheel]
21
+ packages = ["src/harness_sdk"]
@@ -0,0 +1,3 @@
1
+ from .run_manager import RunManager
2
+
3
+ __all__ = ["RunManager"]