pi-agent-python-sdk 0.2.4__py3-none-any.whl → 0.2.5__py3-none-any.whl
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.
- pi_agent/_launch.py +2 -1
- pi_agent/types.py +13 -2
- {pi_agent_python_sdk-0.2.4.dist-info → pi_agent_python_sdk-0.2.5.dist-info}/METADATA +24 -24
- {pi_agent_python_sdk-0.2.4.dist-info → pi_agent_python_sdk-0.2.5.dist-info}/RECORD +6 -6
- {pi_agent_python_sdk-0.2.4.dist-info → pi_agent_python_sdk-0.2.5.dist-info}/WHEEL +0 -0
- {pi_agent_python_sdk-0.2.4.dist-info → pi_agent_python_sdk-0.2.5.dist-info}/licenses/LICENSE +0 -0
pi_agent/_launch.py
CHANGED
|
@@ -13,7 +13,7 @@ from ._transport import _close_process_pipes, _wait_for_exit
|
|
|
13
13
|
from .errors import PiProcessError, PiVersionError
|
|
14
14
|
|
|
15
15
|
MINIMUM_PI_VERSION = "0.85.1"
|
|
16
|
-
TESTED_PI_VERSION = "1.
|
|
16
|
+
TESTED_PI_VERSION = "1.3.0"
|
|
17
17
|
|
|
18
18
|
# The client owns these options. In particular --print consumes an initial prompt.
|
|
19
19
|
_RESERVED = {
|
|
@@ -59,6 +59,7 @@ _VALUES = {
|
|
|
59
59
|
"--tui-mode",
|
|
60
60
|
}
|
|
61
61
|
_FLAGS = {
|
|
62
|
+
"--no-mcp",
|
|
62
63
|
"--no-tools",
|
|
63
64
|
"-nt",
|
|
64
65
|
"--no-builtin-tools",
|
pi_agent/types.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Pi 1.
|
|
1
|
+
"""Pi 1.3.0 wire annotations and small Python conveniences.
|
|
2
2
|
|
|
3
3
|
Wire fields retain Pi's spelling and remain ordinary dictionaries. These
|
|
4
4
|
annotations describe known shapes, not a recursive runtime validator: extensions
|
|
@@ -54,6 +54,7 @@ class ToolCall(TypedDict):
|
|
|
54
54
|
arguments: JSONObject
|
|
55
55
|
thoughtSignature: NotRequired[str]
|
|
56
56
|
namespace: NotRequired[str]
|
|
57
|
+
argumentsError: NotRequired[str]
|
|
57
58
|
|
|
58
59
|
|
|
59
60
|
class UsageCost(TypedDict):
|
|
@@ -143,6 +144,7 @@ class AssistantMessage(TypedDict):
|
|
|
143
144
|
rawStopReason: NotRequired[str]
|
|
144
145
|
endTurn: NotRequired[bool]
|
|
145
146
|
timestamp: float
|
|
147
|
+
durationMs: NotRequired[float]
|
|
146
148
|
|
|
147
149
|
|
|
148
150
|
class NestedToolCallRecord(TypedDict):
|
|
@@ -171,6 +173,7 @@ class ToolResultMessage(TypedDict):
|
|
|
171
173
|
addedToolNames: NotRequired[list[str]] # Legacy Pi 0.85.1 field.
|
|
172
174
|
isError: bool
|
|
173
175
|
timestamp: float
|
|
176
|
+
durationMs: NotRequired[float]
|
|
174
177
|
|
|
175
178
|
|
|
176
179
|
class BashExecutionMessage(TypedDict):
|
|
@@ -273,6 +276,7 @@ class Model(TypedDict):
|
|
|
273
276
|
contextWindow: float
|
|
274
277
|
maxTokens: float
|
|
275
278
|
samplingParams: NotRequired[JSONObject]
|
|
279
|
+
samplingParamsByThinkingLevel: NotRequired[dict[ThinkingLevel, JSONObject]]
|
|
276
280
|
headers: NotRequired[dict[str, str]]
|
|
277
281
|
compat: NotRequired[JSONObject]
|
|
278
282
|
promptCache: NotRequired[ModelPromptCache]
|
|
@@ -716,7 +720,12 @@ AssistantMessageEvent: TypeAlias = (
|
|
|
716
720
|
|
|
717
721
|
|
|
718
722
|
class EmptySessionEvent(TypedDict):
|
|
719
|
-
type: Literal["agent_start", "
|
|
723
|
+
type: Literal["agent_start", "turn_start", "summarization_retry_finished"]
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
class AgentSettledEvent(TypedDict):
|
|
727
|
+
type: Literal["agent_settled"]
|
|
728
|
+
aborted: NotRequired[bool] # Absent on older supported runtimes.
|
|
720
729
|
|
|
721
730
|
|
|
722
731
|
class AgentEndEvent(TypedDict):
|
|
@@ -767,6 +776,7 @@ class ToolExecutionEndEvent(TypedDict):
|
|
|
767
776
|
toolName: str
|
|
768
777
|
result: JSONValue
|
|
769
778
|
isError: bool
|
|
779
|
+
durationMs: NotRequired[float]
|
|
770
780
|
parentToolCallId: NotRequired[str]
|
|
771
781
|
|
|
772
782
|
|
|
@@ -837,6 +847,7 @@ class BashExecutionUpdateEvent(TypedDict):
|
|
|
837
847
|
|
|
838
848
|
SessionEvent: TypeAlias = (
|
|
839
849
|
EmptySessionEvent
|
|
850
|
+
| AgentSettledEvent
|
|
840
851
|
| AgentEndEvent
|
|
841
852
|
| TurnEndEvent
|
|
842
853
|
| MessageBoundaryEvent
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pi-agent-python-sdk
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: Typed async and synchronous Python clients for Pi's agent RPC runtime
|
|
5
5
|
Project-URL: Homepage, https://github.com/cheenulabs/pi-agent-python-sdk
|
|
6
|
-
Project-URL: Documentation, https://github.com/cheenulabs/pi-agent-python-sdk/tree/v0.2.
|
|
6
|
+
Project-URL: Documentation, https://github.com/cheenulabs/pi-agent-python-sdk/tree/v0.2.5/docs
|
|
7
7
|
Project-URL: Issues, https://github.com/cheenulabs/pi-agent-python-sdk/issues
|
|
8
|
-
Project-URL: Changelog, https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.
|
|
8
|
+
Project-URL: Changelog, https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.5/CHANGELOG.md
|
|
9
9
|
Author: cheenulabs
|
|
10
10
|
License-Expression: MIT
|
|
11
11
|
License-File: LICENSE
|
|
@@ -29,7 +29,7 @@ Description-Content-Type: text/markdown
|
|
|
29
29
|
|
|
30
30
|
<p align="center">
|
|
31
31
|
<a href="https://github.com/cheenulabs/pi-agent-python-sdk">
|
|
32
|
-
<img alt="Pi Agent Python SDK" src="https://raw.githubusercontent.com/cheenulabs/pi-agent-python-sdk/v0.2.
|
|
32
|
+
<img alt="Pi Agent Python SDK" src="https://raw.githubusercontent.com/cheenulabs/pi-agent-python-sdk/v0.2.5/docs/logo.svg" width="160">
|
|
33
33
|
</a>
|
|
34
34
|
</p>
|
|
35
35
|
|
|
@@ -78,8 +78,8 @@ Requires an installed, configured Pi CLI — see [Prerequisites](#prerequisites)
|
|
|
78
78
|
| Requirement | Notes |
|
|
79
79
|
| --- | --- |
|
|
80
80
|
| Python **3.11+** | Package metadata requires 3.11 or newer |
|
|
81
|
-
| Node.js **22.19.0+** | Required by Pi 1.
|
|
82
|
-
| Pi **0.85.1+** | Minimum accepted version; **1.
|
|
81
|
+
| Node.js **22.19.0+** | Required by Pi 1.3.0 |
|
|
82
|
+
| Pi **0.85.1+** | Minimum accepted version; **1.3.0** is the tested baseline |
|
|
83
83
|
| Model provider | Required; configure with the Pi CLI (see Quick start) |
|
|
84
84
|
|
|
85
85
|
## Quick start
|
|
@@ -87,7 +87,7 @@ Requires an installed, configured Pi CLI — see [Prerequisites](#prerequisites)
|
|
|
87
87
|
Install Pi with Node.js **22.19.0 or newer** (pin matches the tested baseline):
|
|
88
88
|
|
|
89
89
|
```sh
|
|
90
|
-
npm install -g @earendil-works/pi-coding-agent@1.
|
|
90
|
+
npm install -g @earendil-works/pi-coding-agent@1.3.0
|
|
91
91
|
pi --version
|
|
92
92
|
```
|
|
93
93
|
|
|
@@ -316,7 +316,7 @@ the [command reference][commands] for every method.
|
|
|
316
316
|
| [RPC structure][rpc] | How the Python client maps to Pi's protocol |
|
|
317
317
|
| [Compatibility][compatibility] | Runtime versions and platform validation |
|
|
318
318
|
| [Examples][examples] | Runnable sync, async, streaming, sessions, steering, and UI examples |
|
|
319
|
-
| [Release notes][release] | Changes included in 0.2.
|
|
319
|
+
| [Release notes][release] | Changes included in 0.2.5 |
|
|
320
320
|
|
|
321
321
|
Examples use your configured Pi and may make provider calls. Development checks
|
|
322
322
|
use an isolated local test provider; see [CONTRIBUTING.md][contributing] for
|
|
@@ -332,7 +332,7 @@ setup and validation commands.
|
|
|
332
332
|
| Symptom | What to check |
|
|
333
333
|
| --- | --- |
|
|
334
334
|
| `pi` not found / launch fails | Ensure the Pi CLI is on `PATH`, or pass `executable=` to the client |
|
|
335
|
-
| Version rejected | Upgrade to Pi **0.85.1+**; prefer the tested baseline **1.
|
|
335
|
+
| Version rejected | Upgrade to Pi **0.85.1+**; prefer the tested baseline **1.3.0** |
|
|
336
336
|
| No model / auth errors | Run `pi` once and complete provider setup |
|
|
337
337
|
| Unexpected file or command changes | Review Pi tool/extension settings before automation |
|
|
338
338
|
|
|
@@ -347,20 +347,20 @@ setup and validation commands.
|
|
|
347
347
|
[MIT][license]
|
|
348
348
|
|
|
349
349
|
[pypi]: https://pypi.org/project/pi-agent-python-sdk/
|
|
350
|
-
[release]: https://github.com/cheenulabs/pi-agent-python-sdk/releases/tag/v0.2.
|
|
351
|
-
[metadata]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.
|
|
352
|
-
[license]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.
|
|
353
|
-
[compatibility]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.
|
|
354
|
-
[errors]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.
|
|
355
|
-
[stream-example]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.
|
|
356
|
-
[constructor-options]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.
|
|
357
|
-
[extensions]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.
|
|
358
|
-
[ui-example]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.
|
|
359
|
-
[rpc]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.
|
|
360
|
-
[commands]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.
|
|
361
|
-
[usage]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.
|
|
362
|
-
[api]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.
|
|
363
|
-
[examples]: https://github.com/cheenulabs/pi-agent-python-sdk/tree/v0.2.
|
|
364
|
-
[contributing]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.
|
|
350
|
+
[release]: https://github.com/cheenulabs/pi-agent-python-sdk/releases/tag/v0.2.5
|
|
351
|
+
[metadata]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.5/pyproject.toml
|
|
352
|
+
[license]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.5/LICENSE
|
|
353
|
+
[compatibility]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.5/docs/compatibility.md
|
|
354
|
+
[errors]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.5/docs/errors.md
|
|
355
|
+
[stream-example]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.5/examples/stream.py
|
|
356
|
+
[constructor-options]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.5/docs/api.md#constructor-options
|
|
357
|
+
[extensions]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.5/docs/usage.md#using-your-own-extensions
|
|
358
|
+
[ui-example]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.5/examples/ui.py
|
|
359
|
+
[rpc]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.5/docs/rpc.md
|
|
360
|
+
[commands]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.5/docs/api.md#all-33-rpc-commands
|
|
361
|
+
[usage]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.5/docs/usage.md
|
|
362
|
+
[api]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.5/docs/api.md
|
|
363
|
+
[examples]: https://github.com/cheenulabs/pi-agent-python-sdk/tree/v0.2.5/examples
|
|
364
|
+
[contributing]: https://github.com/cheenulabs/pi-agent-python-sdk/blob/v0.2.5/CONTRIBUTING.md
|
|
365
365
|
[issues]: https://github.com/cheenulabs/pi-agent-python-sdk/issues
|
|
366
366
|
[security]: https://github.com/cheenulabs/pi-agent-python-sdk/security/advisories/new
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
pi_agent/__init__.py,sha256=Tb-KJ6Ur9H0WfwGdk5DkPQtTNKsLPeqcJx3lEh67gJI,1117
|
|
2
2
|
pi_agent/_collections.py,sha256=1oSSh9u2OAXlVCu5t392go3wTQ2AruYm74prVfKBbgc,2174
|
|
3
3
|
pi_agent/_events.py,sha256=fkt5KAM5esgdYHxzGX6fLXrTDv4jhzhcypPYy9z3HvM,5068
|
|
4
|
-
pi_agent/_launch.py,sha256=
|
|
4
|
+
pi_agent/_launch.py,sha256=fBNdv6uyW0BHLwSY-gD5KTD_5zr6BetzksBeXtRtcq8,6980
|
|
5
5
|
pi_agent/_observation.py,sha256=GUe5VkoB5dFx1NY9VwAILjSRFa-th8O17OHMmcQ8q9Y,3297
|
|
6
6
|
pi_agent/_runs.py,sha256=hxKhs5Oi8NLMdufJ72cdXy8tffdZ04XEb2xJzWfOiaQ,14219
|
|
7
7
|
pi_agent/_transport.py,sha256=7mFkVjNSWBzvZw4zGwjtDNTe_FxF0Vxl0SD2z-58QuM,20040
|
|
@@ -10,8 +10,8 @@ pi_agent/client.py,sha256=_Rw595kc0fu6cSFq7vEzfrIOF3U17vSgANuW8OtJKaM,43923
|
|
|
10
10
|
pi_agent/errors.py,sha256=FJtF8jwfGITMp_MzNHbUKutYRrdx_BH8kJI7-17WbJk,2573
|
|
11
11
|
pi_agent/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
pi_agent/sync.py,sha256=dPyGHpJGmhg09u3QFrYdSJYGUB7_8_kupBxXCm8gu6o,33658
|
|
13
|
-
pi_agent/types.py,sha256=
|
|
14
|
-
pi_agent_python_sdk-0.2.
|
|
15
|
-
pi_agent_python_sdk-0.2.
|
|
16
|
-
pi_agent_python_sdk-0.2.
|
|
17
|
-
pi_agent_python_sdk-0.2.
|
|
13
|
+
pi_agent/types.py,sha256=uHijPR1l4_97O88Bx0qp0CpMFktpVHObAQ-OQMCGjEI,25558
|
|
14
|
+
pi_agent_python_sdk-0.2.5.dist-info/METADATA,sha256=kSA9ZhfoOPoyIwASDlom39HQ3Z8kifIdA9ywbGOaExA,13257
|
|
15
|
+
pi_agent_python_sdk-0.2.5.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
16
|
+
pi_agent_python_sdk-0.2.5.dist-info/licenses/LICENSE,sha256=VVC0d0PIT1GtbRUJluzmcIv-UYtsqsBfvWLFu5Qrbco,1067
|
|
17
|
+
pi_agent_python_sdk-0.2.5.dist-info/RECORD,,
|
|
File without changes
|
{pi_agent_python_sdk-0.2.4.dist-info → pi_agent_python_sdk-0.2.5.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|