17 KiB
@assistant-ui/store
0.2.19
Patch Changes
0.2.18
Patch Changes
-
#4392
4cc7eaa- chore: update peer and dependency ranges for @assistant-ui/tap 0.9 (@Yonom) -
#4392
4cc7eaa- fix: preserve tap context across nested tap root rerenders and mark tap context as supported (@Yonom)
0.2.17
Patch Changes
- #4385
ae59baf- feat: precompile packages with React Compiler (@Yonom)- aui-build runs React Compiler over packages that depend on tap and remaps
react/compiler-runtimeto the tap shim subpath, so compiled hooks and components work both in React components and inside tap resource renders @assistant-ui/tap/react-shimexportsuseMemoCache(tap inside a resource render,React.__COMPILER_RUNTIME.cotherwise, with a React 18 polyfill); new@assistant-ui/tap/react-shim/compiler-runtimesubpath mirrorsreact/compiler-runtime'scexport- tap implements
useSyncExternalStoreand a no-opuseDebugValue;useSubscribablenow builds onuseSyncExternalStoreso its store reads stay visible to the compiler AssistantProviderBaseopts out via"use no memo"because the runtime receives options through an effect inside a re-rendered child element
- aui-build runs React Compiler over packages that depend on tap and remaps
0.2.16
Patch Changes
-
#4366
3e58253- feat: host the assistant client with useTapHost so the tap commit runs in the passive phase (no paint blocking); AuiProvider mounts the host's commit effects ahead of its children's effects (@Yonom) -
#4325
5a4f20e- chore: update @assistant-ui/tap dependency ranges to ^0.7.0 (@Yonom)
0.2.15
Patch Changes
-
#4318
1b6a0d6- feat(tap): resources carry all hook arguments; elements are{ hook, args }(@Yonom)A
ResourceElementis now{ hook, args }(was{ type, props }): the underlying hook plus the full tuple of arguments to call it with. This lets a resource take multiple positional arguments, exactly like a hook, and makes hosting justhook(...args):const usePair = (a: number, b: string) => ({ a, b }); const Pair = resource(usePair); const element = Pair(1, "hi"); // { hook: usePair, args: [1, "hi"] }The single-object case is unchanged ergonomically (
Counter({ initialValue: 0 })still works; itsargsis just[{ initialValue: 0 }]), so existing resources and call sites are unaffected.resource()'s overloads collapse into one variadic signature, and thefnSymbol/callResourceFnindirection is gone (the element holds the hook directly;renderResourceFibercallsfiber.hook(...args)).Breaking (internal/advanced):
- The second type parameter of
Resource/ResourceElement/ContravariantResourcenow means the argument tupleA extends readonly unknown[]rather than a single payloadP. Explicit two-arg annotations must wrap the payload in a tuple (e.g.ResourceElement<R, [Props]>). - A resource's identity is now its hook. Reading
element.propsbecomeselement.args[0]; readingelement.typebecomeselement.hook.attachTransformScopesis now keyed by (and called with) the hook rather than the factory. useResource(element, deps)'s second arg is unchanged in behavior (renamedargsDeps).
- The second type parameter of
-
#4318
1b6a0d6- refactor: adopt the extracted-hook convention for resources (@Yonom)A resource body is a hook, so resources are now authored as a
use-prefixed hook wrapped withresource():const useCounter = () => { ... }; const Counter = resource(useCounter);resource()turns a hook into a Resource;useResource(Counter(props))turns it back into a hook call. Extracting the body to ause-prefixed hook lets React's stock rules-of-hooks and exhaustive-deps lint resource bodies directly. No public API or runtime behavior changes. -
#4318
1b6a0d6- refactor: rename the root APIs touseTapRoot/createTapRootand make them callback-based (@Yonom)useResourceRoot(element)is nowuseTapRoot(fn)andcreateResourceRoot().render(element)is nowcreateTapRoot(fn). Both take a render callback instead of a pre-built resource element, so you no longer have to wrap a hook inresource()just to host it as a root. The callback must be a named function expression (so React's rules-of-hooks lints the body):// before const root = createResourceRoot(); const handle = root.render(Counter()); handle.getValue(); // after const root = createTapRoot(function CounterRoot() { return useResource(Counter()); }); root.getValue();createTapRootreturns{ getValue, subscribe, unmount }directly (no separate.renderstep).flushResourcesSyncis also renamed toflushTapSync, to match thetapnaming of the root APIs (and to stay distinct from react-dom'sflushSync).
0.2.14
Patch Changes
-
#4282
01cf957- refactor: rename the client composition and event hooks to theuse*convention to match the tap resource API:tapClientResource->useClientResource,tapClientLookup->useClientLookup,tapClientList->useClientList,tapAssistantClientRef->useAssistantClientRef,tapAssistantEmit->useAssistantEmit. (@Yonom)
0.2.13
Patch Changes
-
#4151
299d448- chore: drop stalebiome-ignorepragmas now that the repo lints with oxlint (@okisdev) -
Updated dependencies [
299d448]:- @assistant-ui/tap@0.5.14
0.2.12
Patch Changes
-
#4097
1e21076- build(x-buildutils): migrateaui-buildfromts.createProgramtotsdownwithunbundle: true(@Yonom)Tsdown drives both JS and
.d.tsemission. Reference-directive restoration is preserved (tsdown/oxc drop/// <reference>lines, so we re-inject them in abuild:donehook).deps.skipNodeModulesBundle: truekeeps the old "never bundle anything fromnode_modules" behavior — devDependencies stay external instead of getting inlined intodist.Side fixes the new strict dts pipeline surfaced:
@assistant-ui/tap: dropped thefnSymbolbrand from the publicResourceElementtype. It referenced an@internalsymbol thatstripInternalremoved from emit, leaving the published.d.tswith a dangling reference.@assistant-ui/store: un-markedClientSchemaas@internal. It was already re-exported from the public package index; treating the re-export as authoritative.
-
Updated dependencies [
01244a5,1e21076]:- @assistant-ui/tap@0.5.12
0.2.11
Patch Changes
-
#4069
db721df- fix(store): keyDerivedscopes by{source, query}so a meta change produces a new client function in the same render pass. Previously aDerivedwhosequerychanged (e.g.MessageByIndexProviderwhoseindexprop changed across renders) kept its underlying resource fiber, and thegetclosure was updated viatapEffectEvent— which lags one commit. During the in-flight render after a meta change, child consumers reading through the derived scope could resolve through the previous closure and read an index the underlying store no longer had. Hashing the meta into thetapResourceskey forces the fiber to be replaced when meta changes, so the newclientFunction(and the newget) propagates through React context immediately. Also drops the unused dynamic-meta variant (Derived({ getMeta })); use staticsource/query. (@Yonom) -
#4023
94548fa- docs: add JSDoc foruseAui,useAuiState,useAuiEvent,AuiIf, andAuiProvider(@AVGVSTVS96) -
Updated dependencies []:
- @assistant-ui/tap@0.5.11
0.2.10
Patch Changes
-
#3937
5fdf17e- fix:RenderChildrenWithAccessorno longer misses re-renders when state updates after access (@Yonom)The accessor previously reused a single ref as both an "accessed" sentinel and the cached snapshot. A
useSyncExternalStorepost-commit consistency call could repopulate that cache with the current state, causing later real updates (e.g.message.composer.isEditingflipping) to be masked. Access is now tracked with a dedicated flag so children that read item state via the render prop re-render correctly when the underlying state changes. -
Updated dependencies [
b090acb]:- @assistant-ui/tap@0.5.11
0.2.9
Patch Changes
-
Updated dependencies [
005f83f]:- @assistant-ui/tap@0.5.10
0.2.8
Patch Changes
0.2.7
Patch Changes
- c988db8: chore: update dependencies
- Updated dependencies [c988db8]
- @assistant-ui/tap@0.5.8
0.2.6
Patch Changes
- bdce66f: chore: update dependencies
- 209ae81: chore: remove aui-source export condition from package.json exports
- 2dd0c9f: feat: add forwardTransformScopes utility
- Updated dependencies [bdce66f]
- Updated dependencies [209ae81]
- @assistant-ui/tap@0.5.6
0.2.5
Patch Changes
- 52403c3: chore: update dependencies
- Updated dependencies [52403c3]
- @assistant-ui/tap@0.5.5
0.2.4
Patch Changes
- 28a987a: feat: SingleThreadList resource refactor: attachTransformScopes should mutate the scopes instead of cloning it
- 736344c: chore: update dependencies
- c71cb58: chore: update dependencies
- Updated dependencies [736344c]
- Updated dependencies [c71cb58]
- @assistant-ui/tap@0.5.4
0.2.3
Patch Changes
- 349f3c7: chore: update deps
- Updated dependencies [349f3c7]
- @assistant-ui/tap@0.5.3
0.2.2
Patch Changes
- a845911: chore: update dependencies
- Updated dependencies [a845911]
- @assistant-ui/tap@0.5.2
0.2.1
Patch Changes
- 36ef3a2: chore: update dependencies
- fc98475: feat(store): move
@assistant-ui/coreand@assistant-ui/tapto peerDependencies to fix npm deduplication - a638f05: refactor(store): make store independent of core, add ScopeRegistry module augmentation support
- Updated dependencies [36ef3a2]
- @assistant-ui/tap@0.5.1
0.2.0
Minor Changes
- b65428e: refactor: only allow functions in scope methods
Patch Changes
- b65428e: refactor: replace peerScopes with transformScopes API
- 6e97999: feat(core): move store tap infrastructure to @assistant-ui/core/store
- 93910bd: Rename .tsx files to .ts where no JSX syntax is used
- b65428e: refactor: rename ClientRegistry to ScopeRegistry
- Updated dependencies [b65428e]
- Updated dependencies [546c053]
- Updated dependencies [a7039e3]
- Updated dependencies [16c10fd]
- Updated dependencies [40a67b6]
- Updated dependencies [b65428e]
- Updated dependencies [b181803]
- Updated dependencies [b65428e]
- Updated dependencies [6bd6419]
- Updated dependencies [b65428e]
- Updated dependencies [4d7f712]
- Updated dependencies [ecc29ec]
- Updated dependencies [6e97999]
- Updated dependencies [b65428e]
- Updated dependencies [60bbe53]
- Updated dependencies [b65428e]
- @assistant-ui/tap@0.5.0
- @assistant-ui/core@0.1.0
0.1.6
Patch Changes
- a088518: chore: update dependencies
- Updated dependencies [a088518]
- @assistant-ui/tap@0.4.5
0.1.5
Patch Changes
- 9ef966a: fix(store): memoize the aui client instance
- Updated dependencies [77af8c3]
- @assistant-ui/tap@0.4.4
0.1.4
Patch Changes
- d45b893: chore: update dependencies
- fe71bfc: feat: use enhanced tapSubscribableResource hook
- Updated dependencies [d45b893]
- Updated dependencies [fe71bfc]
- @assistant-ui/tap@0.4.3
0.1.3
Patch Changes
- 3bbe318: fix: allow destructuring proxy methods (e.g.
addToolResult,resumeToolCall)
0.1.2
Patch Changes
- 07d1c65: fix: nesting assistant providers
- 0371d72: feat: AssistantRuntimeProvider aui prop
- Updated dependencies [5ab3690]
- @assistant-ui/tap@0.4.2
0.1.1
Patch Changes
- 2e088eb: fix: restore React 18 compatibility by using use-effect-event polyfill
- a8be364: feat: log individual errors when throwing AggregateError
- 605d825: chore: update dependencies
- Updated dependencies [8cbf686]
- Updated dependencies [a8be364]
- Updated dependencies [605d825]
- Updated dependencies [fe15232]
- @assistant-ui/tap@0.4.1
0.1.0
Minor Changes
- 11625b5: feat: store v0.1
0.0.6
Patch Changes
- 3719567: chore: update deps
- Updated dependencies [3719567]
- @assistant-ui/tap@0.3.6
0.0.5
Patch Changes
- 57bd207: chore: update dependencies
- cce009d: chore: use tsc for building packages
- Updated dependencies [57bd207]
- Updated dependencies [cce009d]
- @assistant-ui/tap@0.3.5
0.0.4
Patch Changes
- Updated dependencies
- @assistant-ui/tap@0.3.4
0.0.3
Patch Changes
- bae3aa2: feat: overhaul store implementation
- e8ea57b: chore: update deps
- Updated dependencies [bae3aa2]
- Updated dependencies [bae3aa2]
- Updated dependencies [bae3aa2]
- Updated dependencies [bae3aa2]
- Updated dependencies [bae3aa2]
- Updated dependencies [bae3aa2]
- Updated dependencies [e8ea57b]
- Updated dependencies [bae3aa2]
- @assistant-ui/tap@0.3.3
0.0.2
Patch Changes
- 01c31fe: chore: update dependencies
- Updated dependencies [01c31fe]
- @assistant-ui/tap@0.3.2
0.0.1
Patch Changes
- ec662cd: chore: update dependencies
- Updated dependencies [ec662cd]
- @assistant-ui/tap@0.3.1