Skip to content
Merged
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
4 changes: 2 additions & 2 deletions charts/reboot/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: 3.3.2
name: reboot
version: "1.0.3"
version: "1.0.4"
description: Reboot is a programming framework that enables transactional microservices built with the developer in mind.
type: application
keywords:
Expand All @@ -10,4 +10,4 @@ keywords:
- scalable
- reactive
home: https://docs.reboot.dev/
appVersion: "1.0.3"
appVersion: "1.0.4"
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"private": true,
"dependencies": {
"@reboot-dev/reboot-api": "1.0.3",
"@reboot-dev/reboot-react": "1.0.3",
"@reboot-dev/reboot-std-api": "1.0.3",
"@reboot-dev/reboot-std-react": "1.0.3",
"@reboot-dev/reboot-std": "1.0.3",
"@reboot-dev/reboot-web": "1.0.3",
"@reboot-dev/reboot": "1.0.3",
"@reboot-dev/reboot-api": "1.0.4",
"@reboot-dev/reboot-react": "1.0.4",
"@reboot-dev/reboot-std-api": "1.0.4",
"@reboot-dev/reboot-std-react": "1.0.4",
"@reboot-dev/reboot-std": "1.0.4",
"@reboot-dev/reboot-web": "1.0.4",
"@reboot-dev/reboot": "1.0.4",
"@modelcontextprotocol/ext-apps": "1.5.0",
"@modelcontextprotocol/sdk": "1.29.0",
"@bufbuild/protobuf": "1.10.1",
Expand Down
2 changes: 1 addition & 1 deletion rbt/std/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reboot-dev/reboot-std-api",
"version": "1.0.3",
"version": "1.0.4",
"description": "Reboot standard library API.",
"main": "index.js",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion rbt/v1alpha1/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reboot-dev/reboot-api",
"version": "1.0.3",
"version": "1.0.4",
"type": "module",
"description": "npm package for Reboot API",
"main": "index.js",
Expand Down
8 changes: 4 additions & 4 deletions reboot-skills/skills/reboot-chat-app/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,14 @@ dependencies = [
"httpx>=0.27,<1.0",
"uuid7>=0.1.0",
"anyio>=4.0.0",
"reboot>=1.0.3",
"reboot>=1.0.4",
]

[tool.rye]
dev-dependencies = [
"mypy==1.18.1",
"types-protobuf>=4.24.0.20240129",
"reboot>=1.0.3",
"reboot>=1.0.4",
]

virtual = true
Expand Down Expand Up @@ -860,8 +860,8 @@ scripts directly.**
"dependencies": {
"@modelcontextprotocol/ext-apps": "1.5.0",
"@modelcontextprotocol/sdk": "1.29.0",
"@reboot-dev/reboot-react": "1.0.3",
"@reboot-dev/reboot-api": "1.0.3",
"@reboot-dev/reboot-react": "1.0.4",
"@reboot-dev/reboot-api": "1.0.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"zod": "^3.25.0"
Expand Down
12 changes: 11 additions & 1 deletion reboot/agents/pydantic_ai/_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pydantic_ai.models import ModelRequestParameters, StreamedResponse
from pydantic_ai.models.wrapper import CompletedStreamedResponse, WrapperModel
from pydantic_ai.settings import ModelSettings
from reboot.aio.workflows import at_least_once
from reboot.aio.workflows import EffectValidation, at_least_once
from typing import Any

# NOTE: this file is using the `T | None` style for optional types
Expand Down Expand Up @@ -69,6 +69,11 @@ async def call() -> ModelResponse:
self._make_alias(),
context,
call,
# We will re-run the `call` twice to validate effects by
# default in the `at_least_once`, but we turn it off here
# to save the cost of calling the model provider multiple
# times.
effect_validation=EffectValidation.DISABLED,
)

@asynccontextmanager
Expand Down Expand Up @@ -98,6 +103,11 @@ async def call() -> ModelResponse:
self._make_alias(),
context,
call,
# We will re-run the `call` twice to validate effects by
# default in the `at_least_once`, but we turn it off here
# to save the cost of calling the model provider multiple
# times.
effect_validation=EffectValidation.DISABLED,
)

yield CompletedStreamedResponse(
Expand Down
4 changes: 3 additions & 1 deletion reboot/aio/memoize.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ async def memoize(
at_most_once: bool,
until: bool = False,
retryable_exceptions: Optional[list[type[Exception]]] = None,
effect_validation: EffectValidation | None = None,
) -> T:
"""Memoizes the result of running `callable`, only attempting to do so
once if `at_most_once=True`.
Expand Down Expand Up @@ -162,7 +163,8 @@ async def callable_validating_effects():

if (
at_most_once or until or
context._effect_validation == EffectValidation.DISABLED
context._effect_validation == EffectValidation.DISABLED or
effect_validation == EffectValidation.DISABLED
):
return t

Expand Down
13 changes: 12 additions & 1 deletion reboot/aio/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
import types
import typing
from reboot.aio.contexts import WorkflowContext
from reboot.aio.contexts import EffectValidation, WorkflowContext # noqa: F401
from reboot.aio.idempotency import ( # noqa: F401
ALWAYS,
PER_ITERATION,
Expand Down Expand Up @@ -189,6 +189,7 @@ async def __call__(
at_most_once: bool,
until: bool = False,
retryable_exceptions: Optional[list[type[Exception]]] = None,
effect_validation: EffectValidation | None = None,
) -> T:
...

Expand Down Expand Up @@ -283,6 +284,7 @@ async def at_least_once(
callable: Callable[[], Awaitable[T]],
*,
type: Type | _Unset = _UNSET,
effect_validation: EffectValidation | None = None,
) -> T:
"""Attempts to run and memoize the result of calling `callable` while
supporting retrying as many times as necessary until `callable`
Expand All @@ -294,6 +296,12 @@ async def at_least_once(
a clear error if the callable actually returns a non-`None`
value in that case.

`effect_validation=EffectValidation.DISABLED` disables
the per-call effect-validation re-run even when the context has
effect validation enabled. Use this for callables that are
intentionally non-deterministic or expensive to re-run (e.g., LLM
model requests).

NOTE: this is the Python wrapper for `reboot.memoize.v1` and as
such uses `pickle` to serialize the result of calling `callable`
which therefore must be pickle-able.
Expand All @@ -307,6 +315,7 @@ async def at_least_once(
type_t=type_t,
type_t_inferred=type_t_inferred,
at_most_once=False,
effect_validation=effect_validation,
)


Expand All @@ -316,13 +325,15 @@ async def at_least_once_per_workflow(
callable: Callable[[], Awaitable[T]],
*,
type: Type | _Unset = _UNSET,
effect_validation: EffectValidation | None = None,
) -> T:
"""Syntactic sugar for calling without an idempotency tuple."""
return await at_least_once(
(idempotency_alias, PER_WORKFLOW),
context,
callable,
type=type,
effect_validation=effect_validation,
)


Expand Down
30 changes: 15 additions & 15 deletions reboot/benchmarks/construct/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion reboot/benchmarks/construct/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"type": "module",
"dependencies": {
"@bufbuild/protobuf": "1.10.1",
"@reboot-dev/reboot": "1.0.3",
"@reboot-dev/reboot": "1.0.4",
"@supercharge/promise-pool": "^3.2.0",
"uuid": "11.1.0",
"parse-duration": "2.1.3"
Expand Down
2 changes: 1 addition & 1 deletion reboot/cli/cloud/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
)
from typing import Optional

DEFAULT_REBOOT_CLOUD_URL = "https://cloud.prod1.rbt.cloud:9991"
DEFAULT_REBOOT_CLOUD_URL = "https://cloud.prod1.rbt.cloud"

_API_KEY_FLAG = '--api-key'

Expand Down
21 changes: 15 additions & 6 deletions reboot/cli/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,8 @@ def add_es_opts(
proto_directory += os.path.sep
# Expand any directories to be short-form for 'directory/**/*.proto'.
if not await aiofiles.os.path.isdir(proto_directory):
terminal.fail(f"Failed to find directory '{proto_directory}'")
terminal.error(f"Failed to find directory '{proto_directory}'")
return 1
else:
# Also add any directories given to us as part of the import path.
common_args.append(f'--proto_path={proto_directory}')
Expand Down Expand Up @@ -794,9 +795,10 @@ def add_es_opts(
pydantic_schemas_by_directory[proto_directory].append(file)

if not found_protos and not found_schemas:
terminal.fail(
terminal.error(
f"'{proto_directory}' did not match any '.ts', '.py' files containing schemas or '.proto' files"
)
return 1

proto_files: list[str] = []

Expand Down Expand Up @@ -876,9 +878,10 @@ def add_es_opts(
stdout, _ = await process.communicate()

if process.returncode != 0:
terminal.fail(
terminal.error(
"Failed to generate code from schema in '.ts'"
)
return process.returncode or 1

# Expecting 'path/to/generated/protos/directory'
generated_protos_directory = stdout.decode().strip()
Expand Down Expand Up @@ -911,11 +914,12 @@ def add_es_opts(
proto_files.extend(generated_protos)

if not generated_proto_from_schema:
terminal.fail(
terminal.error(
"No '.ts' schemas found in the specified proto directories. "
"Please add a '.ts' file with a schema to your proto directory "
"which exports 'api'"
)
return 1

# We have to propagate the output directory of each of 'nodejs',
# 'web', and 'react' to the 'Protoc*' plugin, so we can infer
Expand Down Expand Up @@ -969,7 +973,11 @@ def add_es_opts(
all_pydantic_files.append(
str(Path(file).relative_to(proto_directory))
)
global_error_models = collect_all_error_models(all_pydantic_files)
try:
global_error_models = collect_all_error_models(all_pydantic_files)
except Exception as e:
terminal.error(f"Failed to import schema file: {e}\n")
return 1

for (proto_directory,
schemas) in pydantic_schemas_by_directory.items():
Expand Down Expand Up @@ -1116,11 +1124,12 @@ def add_es_opts(
generated_proto_from_schema = True

if not generated_proto_from_schema:
terminal.fail(
terminal.error(
"No '.py' schemas found in the specified proto directories. "
"Please add a '.py' file with a schema to your proto directory "
"which defines 'api'"
)
return 1

if not terminal.is_verbose():
terminal.info(
Expand Down
2 changes: 1 addition & 1 deletion reboot/cli/init/templates/backend_package.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"type": "module",
"dependencies": {
"@reboot-dev/reboot": "1.0.3",
"@reboot-dev/reboot": "1.0.4",
"typescript": "^5.5.2"
}
}
2 changes: 1 addition & 1 deletion reboot/cli/init/templates/package.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@reboot-dev/reboot-react": "1.0.3",
"@reboot-dev/reboot-react": "1.0.4",
"@types/jest": "^27.5.2",
"@types/node": "^20.11.5",
"@types/react": "^19.2.1",
Expand Down
2 changes: 1 addition & 1 deletion reboot/create-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@reboot-dev/create-ui",
"version": "1.0.3",
"version": "1.0.4",
"description": "Scaffold React implementation for Reboot AI Chat App UIs",
"type": "commonjs",
"bin": {
Expand Down
4 changes: 2 additions & 2 deletions reboot/create-ui/src/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ export function packageJson(
dependencies: {
"@modelcontextprotocol/ext-apps": "1.5.0",
"@modelcontextprotocol/sdk": "1.29.0",
"@reboot-dev/reboot-react": "1.0.3",
"@reboot-dev/reboot-api": "1.0.3",
"@reboot-dev/reboot-react": "1.0.4",
"@reboot-dev/reboot-api": "1.0.4",
react: "^18.2.0",
"react-dom": "^18.2.0",
zod: "^3.25.0",
Expand Down
Loading
Loading