zettcode-server 0.1.0__tar.gz → 0.1.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: zettcode-server
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: The ZettCode coding agent behind an HTTP API: prompts, streaming, sessions and models
5
5
  Project-URL: Repository, https://github.com/Chang-LeHung/zettcode
6
6
  Project-URL: Issues, https://github.com/Chang-LeHung/zettcode/issues
@@ -18,12 +18,13 @@ Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Classifier: Programming Language :: Python :: 3.13
20
20
  Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Programming Language :: Python :: 3.15
21
22
  Classifier: Typing :: Typed
22
23
  Requires-Python: >=3.10
23
24
  Requires-Dist: fastapi<1,>=0.115
24
25
  Requires-Dist: httpx<1,>=0.27
25
26
  Requires-Dist: uvicorn<1,>=0.35
26
- Requires-Dist: zettcode>=0.1.8
27
+ Requires-Dist: zettcode>=0.1.9
27
28
  Description-Content-Type: text/markdown
28
29
 
29
30
  # zettcode-server
@@ -40,7 +41,7 @@ zettcode-server --workspace ~/projects/api
40
41
  ```
41
42
 
42
43
  ```text
43
- zettcode-server 0.1.0 (zettcode 0.1.8) · http://127.0.0.1:3290 · workspace /home/you/projects/api · permission deny · token off
44
+ zettcode-server 0.1.1 (zettcode 0.1.9) · http://127.0.0.1:3290 · workspace /home/you/projects/api · permission deny · token off
44
45
  ```
45
46
 
46
47
  It binds loopback on port **3290**, denies shell commands by default, and asks for a bearer token only when one is
@@ -12,7 +12,7 @@ zettcode-server --workspace ~/projects/api
12
12
  ```
13
13
 
14
14
  ```text
15
- zettcode-server 0.1.0 (zettcode 0.1.8) · http://127.0.0.1:3290 · workspace /home/you/projects/api · permission deny · token off
15
+ zettcode-server 0.1.1 (zettcode 0.1.9) · http://127.0.0.1:3290 · workspace /home/you/projects/api · permission deny · token off
16
16
  ```
17
17
 
18
18
  It binds loopback on port **3290**, denies shell commands by default, and asks for a bearer token only when one is
@@ -19,12 +19,13 @@ classifiers = [
19
19
  "Programming Language :: Python :: 3.12",
20
20
  "Programming Language :: Python :: 3.13",
21
21
  "Programming Language :: Python :: 3.14",
22
+ "Programming Language :: Python :: 3.15",
22
23
  "Typing :: Typed",
23
24
  ]
24
25
  dependencies = [
25
26
  # The agent, as a released package: the server drives it through its SDK and
26
27
  # carries no copy of the model loop, the tools, or the session store.
27
- "zettcode>=0.1.8",
28
+ "zettcode>=0.1.9",
28
29
  "fastapi>=0.115,<1",
29
30
  "uvicorn>=0.35,<1",
30
31
  # Returned by every endpoint and read back by the tests; the SDK's own runs
@@ -11,7 +11,7 @@ from __future__ import annotations
11
11
 
12
12
  from typing import TYPE_CHECKING, Any
13
13
 
14
- __version__ = "0.1.0"
14
+ __version__ = "0.1.1"
15
15
 
16
16
  if TYPE_CHECKING: # pragma: no cover - annotations only; importing the app costs FastAPI
17
17
  from .app import create_app
@@ -271,6 +271,7 @@ class MessageOut(BaseModel):
271
271
  tool_name: str | None = None
272
272
  ok: bool = True
273
273
  images: int = 0
274
+ pictures: list[ImageIn] = Field(default_factory=list)
274
275
  usage: UsageOut | None = None
275
276
  seconds: float = 0.0
276
277
 
@@ -7,6 +7,7 @@ result are shaped by the same rules.
7
7
 
8
8
  from __future__ import annotations
9
9
 
10
+ import base64
10
11
  from typing import TYPE_CHECKING, Any
11
12
 
12
13
  from .schemas import (
@@ -15,6 +16,7 @@ from .schemas import (
15
16
  ContextShareOut,
16
17
  CurrentSessionOut,
17
18
  DayTotalsOut,
19
+ ImageIn,
18
20
  MentionOut,
19
21
  MessageOut,
20
22
  ModelCheckOut,
@@ -190,6 +192,10 @@ def message_out(message: Message) -> MessageOut:
190
192
  tool_name=message.tool_name,
191
193
  ok=message.ok,
192
194
  images=message.images,
195
+ pictures=[
196
+ ImageIn(data=base64.b64encode(picture.data).decode("ascii"), media_type=picture.media_type)
197
+ for picture in message.pictures
198
+ ],
193
199
  usage=None if message.usage is None else usage_out(message.usage),
194
200
  seconds=message.seconds,
195
201
  )