acp-sdk 0.2.5__py3-none-any.whl → 0.3.1__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.
- acp_sdk/models/models.py +10 -4
- acp_sdk/server/app.py +10 -0
- acp_sdk/server/bundle.py +2 -0
- acp_sdk/server/types.py +1 -1
- {acp_sdk-0.2.5.dist-info → acp_sdk-0.3.1.dist-info}/METADATA +10 -24
- {acp_sdk-0.2.5.dist-info → acp_sdk-0.3.1.dist-info}/RECORD +7 -7
- {acp_sdk-0.2.5.dist-info → acp_sdk-0.3.1.dist-info}/WHEEL +0 -0
acp_sdk/models/models.py
CHANGED
@@ -75,12 +75,18 @@ class RunStatus(str, Enum):
|
|
75
75
|
return self in terminal_states
|
76
76
|
|
77
77
|
|
78
|
-
class
|
79
|
-
type: Literal["
|
78
|
+
class MessageAwaitRequest(BaseModel):
|
79
|
+
type: Literal["message"] = "message"
|
80
|
+
message: Message
|
81
|
+
|
82
|
+
|
83
|
+
class MessageAwaitResume(BaseModel):
|
84
|
+
type: Literal["message"] = "message"
|
85
|
+
message: Message
|
80
86
|
|
81
87
|
|
82
|
-
|
83
|
-
|
88
|
+
AwaitRequest = Union[MessageAwaitRequest]
|
89
|
+
AwaitResume = Union[MessageAwaitResume]
|
84
90
|
|
85
91
|
|
86
92
|
class Run(BaseModel):
|
acp_sdk/server/app.py
CHANGED
@@ -144,6 +144,16 @@ def create_app(*agents: Agent) -> FastAPI:
|
|
144
144
|
@app.post("/runs/{run_id}")
|
145
145
|
async def resume_run(run_id: RunId, request: RunResumeRequest) -> RunResumeResponse:
|
146
146
|
bundle = find_run_bundle(run_id)
|
147
|
+
|
148
|
+
if bundle.run.await_request is None:
|
149
|
+
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=f"Run {run_id} has no await request")
|
150
|
+
|
151
|
+
if bundle.run.await_request.type != request.await_resume.type:
|
152
|
+
raise HTTPException(
|
153
|
+
status_code=status.HTTP_403_FORBIDDEN,
|
154
|
+
detail=f"Run {run_id} is expecting resume of type {bundle.run.await_request.type}",
|
155
|
+
)
|
156
|
+
|
147
157
|
await bundle.resume(request.await_resume)
|
148
158
|
match request.mode:
|
149
159
|
case RunMode.STREAM:
|
acp_sdk/server/bundle.py
CHANGED
acp_sdk/server/types.py
CHANGED
@@ -1,23 +1,21 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: acp-sdk
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.3.1
|
4
4
|
Summary: Agent Communication Protocol SDK
|
5
5
|
Author: IBM Corp.
|
6
6
|
Maintainer-email: Tomas Pilar <thomas7pilar@gmail.com>
|
7
7
|
License-Expression: Apache-2.0
|
8
8
|
Requires-Python: <4.0,>=3.11
|
9
|
+
Requires-Dist: fastapi[standard]>=0.115.8
|
10
|
+
Requires-Dist: httpx-sse>=0.4.0
|
11
|
+
Requires-Dist: httpx>=0.28.1
|
12
|
+
Requires-Dist: janus>=2.0.0
|
9
13
|
Requires-Dist: opentelemetry-api>=1.31.1
|
14
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.31.1
|
15
|
+
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.52b1
|
16
|
+
Requires-Dist: opentelemetry-instrumentation-httpx>=0.52b1
|
17
|
+
Requires-Dist: opentelemetry-sdk>=1.31.1
|
10
18
|
Requires-Dist: pydantic>=2.11.1
|
11
|
-
Provides-Extra: client
|
12
|
-
Requires-Dist: httpx-sse>=0.4.0; extra == 'client'
|
13
|
-
Requires-Dist: httpx>=0.28.1; extra == 'client'
|
14
|
-
Requires-Dist: opentelemetry-instrumentation-httpx>=0.52b1; extra == 'client'
|
15
|
-
Provides-Extra: server
|
16
|
-
Requires-Dist: fastapi[standard]>=0.115.8; extra == 'server'
|
17
|
-
Requires-Dist: janus>=2.0.0; extra == 'server'
|
18
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.31.1; extra == 'server'
|
19
|
-
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.52b1; extra == 'server'
|
20
|
-
Requires-Dist: opentelemetry-sdk>=1.31.1; extra == 'server'
|
21
19
|
Description-Content-Type: text/markdown
|
22
20
|
|
23
21
|
# Agent Communication Protocol SDK for Python
|
@@ -30,19 +28,7 @@ Agent Communication Protocol SDK for Python provides allows developers to serve
|
|
30
28
|
|
31
29
|
## Installation
|
32
30
|
|
33
|
-
Install
|
34
|
-
|
35
|
-
```shell
|
36
|
-
pip install acp-sdk[client]
|
37
|
-
```
|
38
|
-
|
39
|
-
Install to use server:
|
40
|
-
|
41
|
-
```shell
|
42
|
-
pip install acp-sdk[server]
|
43
|
-
```
|
44
|
-
|
45
|
-
Install to use models only:
|
31
|
+
Install with:
|
46
32
|
|
47
33
|
```shell
|
48
34
|
pip install acp-sdk
|
@@ -6,20 +6,20 @@ acp_sdk/client/__init__.py,sha256=Bca1DORrswxzZsrR2aUFpATuNG2xNSmYvF1Z2WJaVbc,51
|
|
6
6
|
acp_sdk/client/client.py,sha256=lEUs0Oc7MZbKkTF2E6e8Wn3dTW5cMVj6fD8TbuEOMDk,6584
|
7
7
|
acp_sdk/models/__init__.py,sha256=numSDBDT1QHx7n_Y3Deb5VOvKWcUBxbOEaMwQBSRHxc,151
|
8
8
|
acp_sdk/models/errors.py,sha256=rEyaMVvQuBi7fwWe_d0PGGySYsD3FZTluQ-SkC0yhAs,444
|
9
|
-
acp_sdk/models/models.py,sha256=
|
9
|
+
acp_sdk/models/models.py,sha256=GjsVvP5NVlW_9pbi47vBZA94WRL8bcMzbWIebwZuJGs,4158
|
10
10
|
acp_sdk/models/schemas.py,sha256=Kj7drJSR8d-N3KHzu_qTnLdagrMtAyhid5swluuhHTw,645
|
11
11
|
acp_sdk/server/__init__.py,sha256=mxBBBFaZuMEUENRMLwp1XZkuLeT9QghcFmNvjnqvAAU,377
|
12
12
|
acp_sdk/server/agent.py,sha256=fGky5MIuknw-Gy-THqhWLt9I9-gUyNIar8qEAvZb3uQ,6195
|
13
|
-
acp_sdk/server/app.py,sha256=
|
14
|
-
acp_sdk/server/bundle.py,sha256=
|
13
|
+
acp_sdk/server/app.py,sha256=3QJzGi05DKoIKyTeYYKKQhcYz4qorQKmVI94_guVkEY,6340
|
14
|
+
acp_sdk/server/bundle.py,sha256=6LZnxsP1rawxic9CwDAQCsOV1v31qNI9meKXMty_yWg,6260
|
15
15
|
acp_sdk/server/context.py,sha256=MgnLV6qcDIhc_0BjW7r4Jj1tHts4ZuwpdTGIBnz2Mgo,1036
|
16
16
|
acp_sdk/server/errors.py,sha256=IGtpPpb2ChtYvCac8kf_P-RkcY71gBvX0yq97uZWa-w,2104
|
17
17
|
acp_sdk/server/logging.py,sha256=Oc8yZigCsuDnHHPsarRzu0RX3NKaLEgpELM2yovGKDI,411
|
18
18
|
acp_sdk/server/server.py,sha256=-eT3fmnEsBUN44Spi2EP2eV0l4RAlKa8bzqxnhz16SM,5399
|
19
19
|
acp_sdk/server/session.py,sha256=0cDr924HC5x2bBNbK9NSKVHAt5A_mi5dK8P4jP_ugq0,629
|
20
20
|
acp_sdk/server/telemetry.py,sha256=1BUxNg-xL_Vqgs27PDWNc3HikrQW2lidAtT_FKlp_Qk,1833
|
21
|
-
acp_sdk/server/types.py,sha256=
|
21
|
+
acp_sdk/server/types.py,sha256=E0_9xWwgGzyvJjxtbeBBmSbIPhbbTSXLpHFL5dZDzxI,182
|
22
22
|
acp_sdk/server/utils.py,sha256=EfrF9VCyVk3AM_ao-BIB9EzGbfTrh4V2Bz-VFr6f6Sg,351
|
23
|
-
acp_sdk-0.
|
24
|
-
acp_sdk-0.
|
25
|
-
acp_sdk-0.
|
23
|
+
acp_sdk-0.3.1.dist-info/METADATA,sha256=Eng_oiR7OIfJK3XDKIAjlmlFX8eHoVqxkd_6XIVpXlQ,3119
|
24
|
+
acp_sdk-0.3.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
25
|
+
acp_sdk-0.3.1.dist-info/RECORD,,
|
File without changes
|