Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -797,11 +797,25 @@ RUN dnf install -y clang gcc-c++ && dnf clean all \
&& mkdir -p /usr/lib/llvm-${CLANG_VERSION}/lib \
&& ln -sf /usr/lib/clang /usr/lib/llvm-${CLANG_VERSION}/lib/clang

# The `manylinux` image comes with multiple Python versions. We'll use
# 3.10 to match our main build environment. Set up symlinks so `python`
# and `python3` point to Python 3.10.
RUN ln -sf /opt/python/cp310-cp310/bin/python /usr/local/bin/python \
&& ln -sf /opt/python/cp310-cp310/bin/python /usr/local/bin/python3 \
# The `manylinux` image comes with multiple Python versions, but all
# of them are built `--disable-shared` with no `libpython` installed,
# and embedding Python — which building `reboot_native.node` does —
# needs `-lpython3.10` at link time. Point `python` and `python3` at a
# python-build-standalone CPython 3.10 instead, which ships
# `libpython3.10.so`; it is the same build
# `reboot/nodejs/prepare_environment.sh` uses. `pip` and `pip3` stay
# on the manylinux 3.10, whose layout `auditwheel` and the wheel
# builds expect, so `python3` and `pip` deliberately name different
# installations.
RUN set -e; \
if [ "${TARGETARCH}" = "amd64" ]; then ARCH=x86_64; else ARCH=aarch64; fi; \
mkdir /tmp/python-build-standalone; \
wget -qO- "https://github.com/indygreg/python-build-standalone/releases/download/20240814/cpython-3.10.14+20240814-${ARCH}-unknown-linux-gnu-install_only.tar.gz" \
| tar -xzf - -C /tmp/python-build-standalone \
&& mv /tmp/python-build-standalone/python /opt/reboot-python \
&& rmdir /tmp/python-build-standalone \
&& ln -sf /opt/reboot-python/bin/python3 /usr/local/bin/python \
&& ln -sf /opt/reboot-python/bin/python3 /usr/local/bin/python3 \
&& ln -sf /opt/python/cp310-cp310/bin/pip /usr/local/bin/pip \
&& ln -sf /opt/python/cp310-cp310/bin/pip /usr/local/bin/pip3

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ api = API(
request=None,
response=CreateCounterResponse,
description="Create a new Counter.",
mcp=Tool(),
),
),
),
Expand All @@ -84,6 +85,8 @@ api = API(
request=None,
response=None,
factory=True,
description="Create the counter at zero.",
mcp=None,
),
get=Reader(
request=None,
Expand Down
2 changes: 2 additions & 0 deletions documentation/docs/ai_chat_apps/get_started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ api = API(
request=InitializeCounterRequest,
response=None,
factory=True,
description="Create the counter at its initial value. "
"Called by `User.create_counter`, not by the AI.",
mcp=None,
),
get=Reader(
Expand Down
2 changes: 2 additions & 0 deletions documentation/docs/ai_chat_apps/what_is.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ api = API(
request=InitializeCounterRequest,
response=None,
factory=True,
description="Create the counter at its initial value. "
"Called by `User.create_counter`, not by the AI.",
mcp=None,
),
get=Reader(
Expand Down
2 changes: 2 additions & 0 deletions documentation/docs/full_stack_apps/python.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,12 @@ ChatRoomMethods = Methods(
messages=Reader(
request=None,
response=MessagesResponse,
description="Every message posted to the room so far.",
),
send=Writer(
request=SendRequest,
response=None,
description="Post one message to the room.",
),
)

Expand Down
4 changes: 3 additions & 1 deletion documentation/docs/learn_more/call/from_react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const api = {
</TabItem>
<TabItem value="python" label="Pydantic">
<!-- MARKDOWN-AUTO-DOCS:START
(CODE:src=../../../../tests/reboot/documentation/chat_room_pydantic.py&lines=1-37) -->
(CODE:src=../../../../tests/reboot/documentation/chat_room_pydantic.py&lines=1-39) -->
<!-- The below code snippet is automatically added from ../../../../tests/reboot/documentation/chat_room_pydantic.py -->

```py
Expand All @@ -78,12 +78,14 @@ ChatRoomMethods = Methods(
messages=Reader(
request=None,
response=MessagesResponse,
description="Every message posted to the room so far.",
mcp=None,
),
# Adds a new message to the list of recorded messages.
send=Writer(
request=SendRequest,
response=None,
description="Post one message to the room.",
mcp=None,
),
)
Expand Down
4 changes: 3 additions & 1 deletion documentation/docs/learn_more/call/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ the `Open` method as an explicit constructor for `Account`:

<Tabs groupId="language">
<TabItem value="python" label="Pydantic" default>
<!-- MARKDOWN-AUTO-DOCS:START (CODE:src=../../../../reboot/examples/bank-pydantic/api/bank/v1/account.py&syntax=python&lines=24-31) -->
<!-- MARKDOWN-AUTO-DOCS:START (CODE:src=../../../../reboot/examples/bank-pydantic/api/bank/v1/account.py&syntax=python&lines=24-33) -->
<!-- The below code snippet is automatically added from ../../../../reboot/examples/bank-pydantic/api/bank/v1/account.py -->

```python
Expand All @@ -159,6 +159,8 @@ AccountMethods = Methods(
request=None,
response=None,
factory=True,
description="Bring the account into existence with a zero "
"balance.",
mcp=None,
),
```
Expand Down
6 changes: 6 additions & 0 deletions documentation/docs/learn_more/define/pydantic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ api = API(
request=InitializeCounterRequest,
response=None,
factory=True,
description="Create the counter at its initial value. "
"Called by `User.create_counter`, not by the AI.",
mcp=None,
),
get=Reader(
Expand Down Expand Up @@ -235,6 +237,8 @@ CounterMethods = Methods(
request=None,
response=None,
factory=True,
description="Create the counter at zero. Called by "
"`User.create_counter`, not by the AI.",
mcp=None,
),
)
Expand Down Expand Up @@ -324,10 +328,12 @@ ChatRoomMethods = Methods(
messages=Reader(
request=None,
response=MessagesResponse,
description="Every message posted to the room so far.",
),
send=Writer(
request=SendRequest,
response=None,
description="Post one message to the room.",
),
)

Expand Down
4 changes: 3 additions & 1 deletion documentation/docs/learn_more/errors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ method's `errors`:
<Tabs groupId="language">
<TabItem value="python" label="Pydantic" default>
<!-- MARKDOWN-AUTO-DOCS:START
(CODE:src=../../../tests/reboot/documentation/errors_pydantic.py&lines=1-22) -->
(CODE:src=../../../tests/reboot/documentation/errors_pydantic.py&lines=1-24) -->
<!-- The below code snippet is automatically added from ../../../tests/reboot/documentation/errors_pydantic.py -->

```py
Expand All @@ -65,6 +65,8 @@ AccountMethods = Methods(
request=WithdrawRequest,
response=None,
errors=[OverdraftError],
description="Take funds out, or raise `OverdraftError` if the "
"balance would go negative.",
mcp=None,
),
# ...
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@reboot-dev/reboot-std": "1.4.1",
"@reboot-dev/reboot-web": "1.4.1",
"@reboot-dev/reboot": "1.4.1",
"@stoplight/json-schema-tree": "4.0.0",
"@modelcontextprotocol/ext-apps": "1.5.0",
"@modelcontextprotocol/sdk": "1.29.0",
"@bufbuild/protobuf": "1.10.1",
Expand Down
Loading
Loading