@reboot-dev/reboot-std 0.44.0 → 0.45.2

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.
package/README.md ADDED
@@ -0,0 +1,160 @@
1
+ <div align="center">
2
+
3
+ <img src="https://docs.reboot.dev/img/reboot-logo-green.svg"
4
+ alt="Reboot" width="200" />
5
+
6
+ # Reboot
7
+
8
+ **Build AI Chat Apps — and full-stack web apps — with reactive, durable backends.**
9
+
10
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
11
+ [![PyPI](https://img.shields.io/pypi/v/reboot)](https://pypi.org/project/reboot/)
12
+ [![npm](https://img.shields.io/npm/v/@reboot-dev/reboot)](https://www.npmjs.com/package/@reboot-dev/reboot)
13
+ [![Discord](https://img.shields.io/badge/Discord-join-5865F2?logo=discord&logoColor=white)](https://discord.gg/cRbdcS94Nr)
14
+ [![Docs](https://img.shields.io/badge/docs-reboot.dev-green)](https://docs.reboot.dev/)
15
+
16
+ </div>
17
+
18
+ ---
19
+
20
+ Reboot is a framework for building **reactive, stateful, multiplayer AI chat
21
+ apps** — visual apps that run inside ChatGPT, Claude, VS Code, Goose, and more.
22
+ It also builds full-stack web apps with reactive backends and React frontends.
23
+
24
+ With Reboot, you just write business logic — no wiring up databases, caches,
25
+ queues, or retry loops. State survives failures by default. ACID transactions
26
+ span multiple states. The React frontend stays in sync in real time. And your
27
+ backend is automatically an MCP server.
28
+
29
+ ## AI Chat Apps
30
+
31
+ Build visual, interactive apps that run inside AI chat interfaces. Define a
32
+ `Session` type as an entry point and your methods automatically become tools
33
+ the AI can call:
34
+
35
+ ```python
36
+ from reboot.api import (
37
+ API, Field, Methods, Model, Reader, Tool,
38
+ Transaction, Type, UI, Writer,
39
+ )
40
+
41
+
42
+ class CreateCounterResponse(Model):
43
+ counter_id: str = Field(tag=1)
44
+
45
+
46
+ class SessionState(Model):
47
+ pass
48
+
49
+
50
+ class CounterState(Model):
51
+ value: int = Field(tag=1, default=0)
52
+
53
+
54
+ class GetResponse(Model):
55
+ value: int = Field(tag=1)
56
+
57
+
58
+ class IncrementRequest(Model):
59
+ """Request with an amount parameter."""
60
+ amount: int | None = Field(tag=1, default=None)
61
+
62
+
63
+ api = API(
64
+ Session=Type(
65
+ state=SessionState,
66
+ methods=Methods(
67
+ create_counter=Transaction(
68
+ request=None,
69
+ response=CreateCounterResponse,
70
+ description="Create a new Counter.",
71
+ ),
72
+ ),
73
+ ),
74
+ Counter=Type(
75
+ state=CounterState,
76
+ methods=Methods(
77
+ show_clicker=UI(
78
+ request=None,
79
+ path="web/ui/clicker",
80
+ title="Counter Clicker",
81
+ description="Interactive clicker UI.",
82
+ ),
83
+ create=Writer(
84
+ request=None,
85
+ response=None,
86
+ factory=True,
87
+ ),
88
+ get=Reader(
89
+ request=None,
90
+ response=GetResponse,
91
+ description="Get the current counter "
92
+ "value.",
93
+ mcp=Tool(),
94
+ ),
95
+ increment=Writer(
96
+ request=IncrementRequest,
97
+ response=None,
98
+ description="Increment the counter.",
99
+ mcp=Tool(),
100
+ ),
101
+ ),
102
+ ),
103
+ )
104
+ ```
105
+
106
+ ### Dive in!
107
+
108
+ - [What is an AI Chat App?](https://docs.reboot.dev/ai_chat_apps/what_is)
109
+ - [Get Started (Python)](https://docs.reboot.dev/ai_chat_apps/get_started)
110
+ - [AI Chat App Examples](https://docs.reboot.dev/ai_chat_apps/examples)
111
+
112
+ ## Full-stack apps
113
+
114
+ Build reactive backends with React frontends — great as a full-page extension
115
+ of your AI chat app, or as a standalone web app.
116
+
117
+ - [TypeScript Quickstart](https://docs.reboot.dev/full_stack_apps/typescript)
118
+ - [Python Quickstart](https://docs.reboot.dev/full_stack_apps/python)
119
+ - [Full-stack Examples](https://docs.reboot.dev/full_stack_apps/examples)
120
+
121
+ ## Key features
122
+
123
+ **Automatic MCP server.** `Session` methods are automatically exposed as
124
+ MCP tools. Other types can opt in with `mcp=Tool()`. `UI` methods open
125
+ React apps in the AI's chat. No glue code.
126
+
127
+ **Durable state by default.** States survive process crashes, deployments, and
128
+ chaos. No external database required.
129
+
130
+ **ACID transactions across states.** `transaction` methods compose atomically
131
+ across many state instances running on different machines.
132
+
133
+ **Reactive React frontend.** Generated hooks keep your UI in sync
134
+ without manual management of WebSockets, caches, or polling.
135
+
136
+ **Method system.** Code is safer to write (and _read_) with a clear API
137
+ and methods with enforced constraints: `reader` (concurrent, read-only),
138
+ `writer` (serialized, mutating), `transaction` (ACID, cross-state),
139
+ `workflow` (long-running, durable, cancellable), `ui` (React app in AI
140
+ chat). The runtime enforces these guarantees.
141
+
142
+ **API-first, code-generated.** Define APIs using Pydantic (Python) or
143
+ Zod (TypeScript). Reboot generates type-safe client, server, and React
144
+ stubs.
145
+
146
+ ## Documentation
147
+
148
+ Full documentation at [docs.reboot.dev](https://docs.reboot.dev/).
149
+
150
+ ## Community
151
+
152
+ - **Discord**: [discord.gg/cRbdcS94Nr](https://discord.gg/cRbdcS94Nr) — fastest way to get help or share what you're building
153
+ - **Issues**: [github.com/reboot-dev/reboot/issues](https://github.com/reboot-dev/reboot/issues)
154
+
155
+ Contributions are welcome. Open an issue to discuss substantial changes before
156
+ sending a pull request.
157
+
158
+ ## License
159
+
160
+ [Apache 2.0](LICENSE)
@@ -1,6 +1,11 @@
1
- import { NativeServicer } from "@reboot-dev/reboot";
1
+ import { NativeLibrary, NativeServicer } from "@reboot-dev/reboot";
2
+ import { SortedMap } from "@reboot-dev/reboot-std-api/collections/v1/sorted_map_rbt.js";
2
3
  export * from "@reboot-dev/reboot-std-api/collections/v1/sorted_map_rbt.js";
3
4
  declare const _default: {
4
5
  servicers: () => NativeServicer[];
5
6
  };
6
7
  export default _default;
8
+ export declare const SORTED_MAP_LIBRARY_NAME = "reboot.std.collections.v1.sorted_map";
9
+ export declare function sortedMapLibrary({ authorizer, }?: {
10
+ authorizer?: InstanceType<typeof SortedMap.Authorizer>;
11
+ }): NativeLibrary;
@@ -8,3 +8,11 @@ export default {
8
8
  ];
9
9
  },
10
10
  };
11
+ export const SORTED_MAP_LIBRARY_NAME = "reboot.std.collections.v1.sorted_map";
12
+ export function sortedMapLibrary({ authorizer, } = {}) {
13
+ return {
14
+ nativeLibraryModule: "reboot.std.collections.v1.sorted_map",
15
+ nativeLibraryFunction: "sorted_map_library",
16
+ authorizer,
17
+ };
18
+ }
@@ -0,0 +1 @@
1
+ export * from "@reboot-dev/reboot-std-api/item/v1/item_rbt.js";
@@ -0,0 +1 @@
1
+ export * from "@reboot-dev/reboot-std-api/item/v1/item_rbt.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reboot-dev/reboot-std",
3
- "version": "0.44.0",
3
+ "version": "0.45.2",
4
4
  "description": "Reboot standard library.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -10,8 +10,8 @@
10
10
  },
11
11
  "author": "reboot-dev",
12
12
  "dependencies": {
13
- "@reboot-dev/reboot-std-api": "0.44.0",
14
- "@reboot-dev/reboot": "0.44.0",
13
+ "@reboot-dev/reboot-std-api": "0.45.2",
14
+ "@reboot-dev/reboot": "0.45.2",
15
15
  "@scarf/scarf": "1.4.0"
16
16
  },
17
17
  "license": "Apache-2.0",
@@ -24,6 +24,7 @@
24
24
  "./collections/queue/v1": "./collections/queue/v1/index.js",
25
25
  "./collections/ordered_map/v1": "./collections/ordered_map/v1/index.js",
26
26
  "./collections/v1/sorted_map.js": "./collections/v1/sorted_map.js",
27
+ "./item/v1": "./item/v1/index.js",
27
28
  "./presence/v1": "./presence/v1/index.js",
28
29
  "./presence/subscriber/v1": "./presence/subscriber/v1/index.js",
29
30
  "./presence/mouse_tracker/v1": "./presence/mouse_tracker/v1/index.js",