@graphrefly/graphrefly 0.1.0 → 0.5.0

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 CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  One primitive. Zero dependencies. Composable nodes with glitch-free diamond resolution, two-phase push propagation, durable streaming, and framework adapters for React, Vue, Svelte, Solid, and NestJS.
6
6
 
7
- [![npm](https://img.shields.io/npm/v/@graphrefly/graphrefly-ts?color=blue)](https://www.npmjs.com/package/@graphrefly/graphrefly-ts)
7
+ [![npm](https://img.shields.io/npm/v/@graphrefly/graphrefly?color=blue)](https://www.npmjs.com/package/@graphrefly/graphrefly)
8
8
  [![license](https://img.shields.io/github/license/graphrefly/graphrefly-ts)](./LICENSE)
9
9
 
10
10
  [Docs](https://graphrefly.dev) | [Spec](https://graphrefly.dev/spec/) | [Python](https://py.graphrefly.dev) | [API Reference](https://graphrefly.dev/api/node/)
@@ -14,11 +14,11 @@ One primitive. Zero dependencies. Composable nodes with glitch-free diamond reso
14
14
  ## Quick start
15
15
 
16
16
  ```bash
17
- npm install @graphrefly/graphrefly-ts
17
+ npm install @graphrefly/graphrefly
18
18
  ```
19
19
 
20
20
  ```ts
21
- import { state, derived, effect } from "@graphrefly/graphrefly-ts";
21
+ import { state, derived, effect } from "@graphrefly/graphrefly";
22
22
 
23
23
  const count = state(0);
24
24
  const doubled = derived([count], ([c]) => c * 2);
@@ -50,7 +50,7 @@ Most state libraries solve **one** problem well. GraphReFly solves the space bet
50
50
  Everything is a `node`. Sugar constructors give you the right shape:
51
51
 
52
52
  ```ts
53
- import { state, derived, producer, effect, pipe } from "@graphrefly/graphrefly-ts";
53
+ import { state, derived, producer, effect, pipe } from "@graphrefly/graphrefly";
54
54
 
55
55
  // Writable state
56
56
  const name = state("world");
@@ -76,7 +76,7 @@ const delayed = pipe(clock, delay(500), map(([, ts]) => new Date(ts)));
76
76
  70+ operators — transform, combine, buffer, window, rate-limit, retry, circuit-break:
77
77
 
78
78
  ```ts
79
- import { pipe, merge, switchMap, debounceTime, retry } from "@graphrefly/graphrefly-ts";
79
+ import { pipe, merge, switchMap, debounceTime, retry } from "@graphrefly/graphrefly";
80
80
 
81
81
  const search = pipe(
82
82
  input,
@@ -91,7 +91,7 @@ const search = pipe(
91
91
  Register nodes in a `Graph` for introspection, snapshot, and persistence:
92
92
 
93
93
  ```ts
94
- import { Graph, state, derived } from "@graphrefly/graphrefly-ts";
94
+ import { Graph, state, derived } from "@graphrefly/graphrefly";
95
95
 
96
96
  const g = new Graph("pricing");
97
97
  const price = g.register("price", state(100));
@@ -108,7 +108,7 @@ g.observe((e) => console.log(e)); // → live change stream
108
108
  First-class patterns for LLM streaming, agent loops, and human-in-the-loop workflows:
109
109
 
110
110
  ```ts
111
- import { chatStream, agentLoop, toolRegistry } from "@graphrefly/graphrefly-ts";
111
+ import { chatStream, agentLoop, toolRegistry } from "@graphrefly/graphrefly";
112
112
 
113
113
  // Streaming chat with tool use
114
114
  const chat = chatStream("assistant", {
@@ -129,23 +129,23 @@ Drop-in bindings — your framework, your way:
129
129
 
130
130
  ```tsx
131
131
  // React
132
- import { useNode } from "@graphrefly/graphrefly-ts/compat/react";
132
+ import { useNode } from "@graphrefly/graphrefly/compat/react";
133
133
  const [value, setValue] = useNode(count);
134
134
 
135
135
  // Vue
136
- import { useNode } from "@graphrefly/graphrefly-ts/compat/vue";
136
+ import { useNode } from "@graphrefly/graphrefly/compat/vue";
137
137
  const value = useNode(count); // → Ref<number>
138
138
 
139
139
  // Svelte
140
- import { toStore } from "@graphrefly/graphrefly-ts/compat/svelte";
140
+ import { toStore } from "@graphrefly/graphrefly/compat/svelte";
141
141
  const value = toStore(count); // → Svelte store
142
142
 
143
143
  // Solid
144
- import { useNode } from "@graphrefly/graphrefly-ts/compat/solid";
144
+ import { useNode } from "@graphrefly/graphrefly/compat/solid";
145
145
  const value = useNode(count); // → Signal<number>
146
146
 
147
147
  // NestJS
148
- import { GraphReflyModule } from "@graphrefly/graphrefly-ts/compat/nestjs";
148
+ import { GraphReflyModule } from "@graphrefly/graphrefly/compat/nestjs";
149
149
  @Module({ imports: [GraphReflyModule.forRoot()] })
150
150
  ```
151
151
 
@@ -154,15 +154,15 @@ import { GraphReflyModule } from "@graphrefly/graphrefly-ts/compat/nestjs";
154
154
  Prefer subpath imports for minimal bundle:
155
155
 
156
156
  ```ts
157
- import { node, batch, DATA } from "@graphrefly/graphrefly-ts/core";
158
- import { map, switchMap } from "@graphrefly/graphrefly-ts/extra";
159
- import { Graph } from "@graphrefly/graphrefly-ts/graph";
157
+ import { node, batch, DATA } from "@graphrefly/graphrefly/core";
158
+ import { map, switchMap } from "@graphrefly/graphrefly/extra";
159
+ import { Graph } from "@graphrefly/graphrefly/graph";
160
160
  ```
161
161
 
162
162
  The root entry re-exports everything:
163
163
 
164
164
  ```ts
165
- import { node, map, Graph } from "@graphrefly/graphrefly-ts";
165
+ import { node, map, Graph } from "@graphrefly/graphrefly";
166
166
  ```
167
167
 
168
168
  ## Resilience & checkpoints
@@ -170,7 +170,7 @@ import { node, map, Graph } from "@graphrefly/graphrefly-ts";
170
170
  Built-in retry, circuit breakers, rate limiters, and persistent checkpoints:
171
171
 
172
172
  ```ts
173
- import { retry, circuitBreaker, saveGraphCheckpoint, FileCheckpointAdapter } from "@graphrefly/graphrefly-ts";
173
+ import { retry, circuitBreaker, saveGraphCheckpoint, FileCheckpointAdapter } from "@graphrefly/graphrefly";
174
174
 
175
175
  // Retry with exponential backoff
176
176
  const resilient = pipe(source, retry({ strategy: "exponential" }));