@urk/react-urk 0.1.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 ADDED
@@ -0,0 +1,63 @@
1
+ # @urk/react-urk
2
+
3
+ Thin React bindings for consuming an existing URK kernel instance.
4
+
5
+ If you are consuming URK inside a Next App Router client boundary, prefer `@urk/next-urk`
6
+ on top of this package instead of rebuilding that boundary yourself.
7
+
8
+ This package stays wrapper-only:
9
+
10
+ - it accepts an existing `Kernel`
11
+ - it subscribes to `RuntimeStore`
12
+ - it exposes the kernel event bus
13
+ - it does not introduce a React-owned runtime model
14
+
15
+ ## Public API
16
+
17
+ - `UrkProvider`
18
+ - `useKernel()`
19
+ - `useRuntimeSnapshot()`
20
+ - `useRuntimePhase()`
21
+ - `useRuntimeInspector()`
22
+ - `useRuntimeInspectorSnapshot()`
23
+ - `useEventBus()`
24
+ - `useKernelEvent()`
25
+ - `KernelEventListener`
26
+
27
+ ## Usage
28
+
29
+ ```tsx
30
+ import { useMemo } from 'react';
31
+ import { createKernel } from '@urk/core';
32
+ import { createLoadingAdapter } from '@urk/adapters/dom';
33
+ import { UrkProvider, useKernelEvent, useRuntimeInspectorSnapshot, useRuntimePhase } from '@urk/react-urk';
34
+
35
+ function RuntimeView() {
36
+ const phase = useRuntimePhase();
37
+ const inspector = useRuntimeInspectorSnapshot();
38
+
39
+ useKernelEvent('runtime:paused', (event) => {
40
+ console.log(event.type);
41
+ });
42
+
43
+ return <div>{phase} / {inspector.frameCount}</div>;
44
+ }
45
+
46
+ export function App() {
47
+ const kernel = useMemo(() => {
48
+ return createKernel({
49
+ adapters: [createLoadingAdapter()],
50
+ });
51
+ }, []);
52
+
53
+ return (
54
+ <UrkProvider kernel={kernel}>
55
+ <RuntimeView />
56
+ </UrkProvider>
57
+ );
58
+ }
59
+ ```
60
+
61
+ `UrkProvider` auto-boots by default. It only shuts the kernel down on unmount when the provider was responsible for booting the kernel in the first place.
62
+
63
+ This package is validated through type-check/build plus the private React proof route in `examples/react-starter/`, including wrapper-facing runtime inspector consumption.
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Company: EonHive Inc.
3
+ * Title: URK React Hooks
4
+ * Purpose: Provide thin React hooks for consuming an existing URK kernel instance.
5
+ * Author: Stan Nesi
6
+ * Created: 2026-04-23
7
+ * Updated: 2026-04-23
8
+ * Notes: Vibe coded with Codex.
9
+ */
10
+ import type { KernelEvent, RuntimeInspector, RuntimeInspectorSnapshot, RuntimePhase, RuntimeSnapshot } from '@urk/core';
11
+ export type KernelEventListener<TPayload = unknown> = (event: KernelEvent & {
12
+ payload?: TPayload;
13
+ }) => void;
14
+ export declare function useKernel(): import("@urk/core").Kernel;
15
+ export declare function useRuntimeSnapshot(): RuntimeSnapshot;
16
+ export declare function useRuntimePhase(): RuntimePhase;
17
+ export declare function useRuntimeInspector(): RuntimeInspector;
18
+ export declare function useRuntimeInspectorSnapshot(): RuntimeInspectorSnapshot;
19
+ export declare function useEventBus(): import("@urk/core").EventBus<KernelEvent>;
20
+ export declare function useKernelEvent<TPayload = unknown>(type: string, listener: KernelEventListener<TPayload>): void;
21
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,wBAAwB,EACxB,YAAY,EACZ,eAAe,EAChB,MAAM,WAAW,CAAC;AAGnB,MAAM,MAAM,mBAAmB,CAAC,QAAQ,GAAG,OAAO,IAAI,CACpD,KAAK,EAAE,WAAW,GAAG;IAAE,OAAO,CAAC,EAAE,QAAQ,CAAA;CAAE,KACxC,IAAI,CAAC;AAEV,wBAAgB,SAAS,+BAQxB;AAED,wBAAgB,kBAAkB,IAAI,eAAe,CA6BpD;AAED,wBAAgB,eAAe,IAAI,YAAY,CAE9C;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,CAEtD;AAED,wBAAgB,2BAA2B,IAAI,wBAAwB,CAwBtE;AAED,wBAAgB,WAAW,8CAE1B;AAED,wBAAgB,cAAc,CAAC,QAAQ,GAAG,OAAO,EAC/C,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,mBAAmB,CAAC,QAAQ,CAAC,GACtC,IAAI,CAWN"}
package/dist/hooks.js ADDED
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Company: EonHive Inc.
3
+ * Title: URK React Hooks
4
+ * Purpose: Provide thin React hooks for consuming an existing URK kernel instance.
5
+ * Author: Stan Nesi
6
+ * Created: 2026-04-23
7
+ * Updated: 2026-04-23
8
+ * Notes: Vibe coded with Codex.
9
+ */
10
+ import { useContext, useEffect, useRef, useSyncExternalStore } from 'react';
11
+ import { KernelContext } from './provider.js';
12
+ export function useKernel() {
13
+ const kernel = useContext(KernelContext);
14
+ if (!kernel) {
15
+ throw new Error('URK React hooks must be used inside an UrkProvider.');
16
+ }
17
+ return kernel;
18
+ }
19
+ export function useRuntimeSnapshot() {
20
+ const kernel = useKernel();
21
+ const store = kernel.getContext().state;
22
+ const snapshotRef = useRef(store.getSnapshot());
23
+ const getStableSnapshot = () => {
24
+ const next = store.getSnapshot();
25
+ const previous = snapshotRef.current;
26
+ if (previous.phase === next.phase &&
27
+ previous.reason === next.reason &&
28
+ previous.updatedAt === next.updatedAt) {
29
+ return previous;
30
+ }
31
+ snapshotRef.current = next;
32
+ return next;
33
+ };
34
+ return useSyncExternalStore((onStoreChange) => store.subscribe(() => {
35
+ onStoreChange();
36
+ }), getStableSnapshot, getStableSnapshot);
37
+ }
38
+ export function useRuntimePhase() {
39
+ return useRuntimeSnapshot().phase;
40
+ }
41
+ export function useRuntimeInspector() {
42
+ return useKernel().getInspector();
43
+ }
44
+ export function useRuntimeInspectorSnapshot() {
45
+ const inspector = useRuntimeInspector();
46
+ const snapshotRef = useRef(inspector.getSnapshot());
47
+ const getStableSnapshot = () => {
48
+ const next = inspector.getSnapshot();
49
+ const previous = snapshotRef.current;
50
+ if (previous.updatedAt === next.updatedAt) {
51
+ return previous;
52
+ }
53
+ snapshotRef.current = next;
54
+ return next;
55
+ };
56
+ return useSyncExternalStore((onStoreChange) => inspector.subscribe(() => {
57
+ onStoreChange();
58
+ }), getStableSnapshot, getStableSnapshot);
59
+ }
60
+ export function useEventBus() {
61
+ return useKernel().getEventBus();
62
+ }
63
+ export function useKernelEvent(type, listener) {
64
+ const eventBus = useEventBus();
65
+ const listenerRef = useRef(listener);
66
+ listenerRef.current = listener;
67
+ useEffect(() => {
68
+ return eventBus.on(type, (event) => {
69
+ listenerRef.current(event);
70
+ });
71
+ }, [eventBus, type]);
72
+ }
73
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAQ5E,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAM9C,MAAM,UAAU,SAAS;IACvB,MAAM,MAAM,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAEzC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC;IACxC,MAAM,WAAW,GAAG,MAAM,CAAkB,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;IAEjE,MAAM,iBAAiB,GAAG,GAAoB,EAAE;QAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;QACjC,MAAM,QA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AAC,GAAG,EAAE;QACvB,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,EACJ,iBAAiB,EACjB,iBAAiB,CAClB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,WAAW;IACzB,OAAO,SAAS,EAAE,CAAC,WAAW,EAAE,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,IAAY,EACZ,QAAuC;IAEvC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAErC,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IAE/B,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;YACjC,WAAW,CAAC,OAAO,CAAC,KAA6C,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;AACvB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Company: EonHive Inc.
3
+ * Title: React Wrapper Exports
4
+ * Purpose: Export the public React wrapper surface for URK.
5
+ * Author: Stan Nesi
6
+ * Created: 2026-04-23
7
+ * Updated: 2026-04-23
8
+ * Notes: Vibe coded with Codex.
9
+ */
10
+ export * from './hooks.js';
11
+ export * from './provider.js';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Company: EonHive Inc.
3
+ * Title: React Wrapper Exports
4
+ * Purpose: Export the public React wrapper surface for URK.
5
+ * Author: Stan Nesi
6
+ * Created: 2026-04-23
7
+ * Updated: 2026-04-23
8
+ * Notes: Vibe coded with Codex.
9
+ */
10
+ export * from './hooks.js';
11
+ export * from './provider.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Company: EonHive Inc.
3
+ * Title: URK React Provider
4
+ * Purpose: Expose a thin React provider around an existing URK kernel instance.
5
+ * Author: Stan Nesi
6
+ * Created: 2026-04-23
7
+ * Updated: 2026-04-23
8
+ * Notes: Vibe coded with Codex.
9
+ */
10
+ import { type ReactNode } from 'react';
11
+ import type { Kernel } from '@urk/core';
12
+ export interface UrkProviderProps {
13
+ kernel: Kernel;
14
+ autoBoot?: boolean;
15
+ bootReason?: string;
16
+ shutdownReason?: string;
17
+ children?: ReactNode;
18
+ }
19
+ export declare const KernelContext: import("react").Context<Kernel | null>;
20
+ export declare function UrkProvider({ kernel, autoBoot, bootReason, shutdownReason, children, }: UrkProviderProps): import("react/jsx-runtime").JSX.Element;
21
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,wCAAqC,CAAC;AAgBhE,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,QAAe,EACf,UAAkC,EAClC,cAA0C,EAC1C,QAAQ,GACT,EAAE,gBAAgB,2CAuElB"}
@@ -0,0 +1,86 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * Company: EonHive Inc.
4
+ * Title: URK React Provider
5
+ * Purpose: Expose a thin React provider around an existing URK kernel instance.
6
+ * Author: Stan Nesi
7
+ * Created: 2026-04-23
8
+ * Updated: 2026-04-23
9
+ * Notes: Vibe coded with Codex.
10
+ */
11
+ import { createContext, useEffect, useRef } from 'react';
12
+ export const KernelContext = createContext(null);
13
+ function emitLifecycleEvent(kernel, type, reason) {
14
+ kernel.getEventBus().emit({
15
+ type,
16
+ source: 'react-urk',
17
+ payload: { reason },
18
+ timestamp: Date.now(),
19
+ });
20
+ }
21
+ function reportLifecycleError(action, error) {
22
+ const message = error instanceof Error ? error.message : `Unknown ${action} error`;
23
+ console.error(`[react-urk] ${action} failed: ${message}`);
24
+ }
25
+ export function UrkProvider({ kernel, autoBoot = true, bootReason = 'react-urk:auto-boot', shutdownReason = 'react-urk:auto-shutdown', children, }) {
26
+ const stableKernelRef = useRef(kernel);
27
+ const bootStartedRef = useRef(false);
28
+ const bootOwnershipRef = useRef(false);
29
+ const bootOwnedByProviderRef = useRef(false);
30
+ const bootPromiseRef = useRef(null);
31
+ const pendingShutdownTimerRef = useRef(null);
32
+ if (stableKernelRef.current !== kernel) {
33
+ throw new Error('UrkProvider does not support replacing the kernel instance after mount.');
34
+ }
35
+ useEffect(() => {
36
+ const currentKernel = stableKernelRef.current;
37
+ if (pendingShutdownTimerRef.current) {
38
+ clearTimeout(pendingShutdownTimerRef.current);
39
+ pendingShutdownTimerRef.current = null;
40
+ }
41
+ if (!autoBoot) {
42
+ return () => undefined;
43
+ }
44
+ if (!bootStartedRef.current) {
45
+ bootStartedRef.current = true;
46
+ bootOwnershipRef.current = currentKernel.getState().phase === 'boot';
47
+ emitLifecycleEvent(currentKernel, 'react-urk:boot-requested', bootReason);
48
+ const bootPromise = currentKernel.boot();
49
+ bootPromiseRef.current = bootPromise;
50
+ void bootPromise
51
+ .then(() => {
52
+ bootOwnedByProviderRef.current = bootOwnershipRef.current;
53
+ emitLifecycleEvent(currentKernel, 'react-urk:booted', bootReason);
54
+ })
55
+ .catch((error) => {
56
+ bootStartedRef.current = false;
57
+ reportLifecycleError('boot', error);
58
+ });
59
+ }
60
+ return () => {
61
+ if (!bootOwnershipRef.current) {
62
+ return;
63
+ }
64
+ pendingShutdownTimerRef.current = setTimeout(() => {
65
+ pendingShutdownTimerRef.current = null;
66
+ void (async () => {
67
+ if (bootPromiseRef.current) {
68
+ try {
69
+ await bootPromiseRef.current;
70
+ }
71
+ catch {
72
+ // Ignore boot errors here and still attempt shutdown for cleanup.
73
+ }
74
+ }
75
+ bootOwnedByProviderRef.current = false;
76
+ emitLifecycleEvent(currentKernel, 'react-urk:shutdown-requested', shutdownReason);
77
+ await currentKernel.shutdown(shutdownReason);
78
+ })().catch((error) => {
79
+ reportLifecycleError('shutdown', error);
80
+ });
81
+ }, 0);
82
+ };
83
+ }, [autoBoot, bootReason, shutdownReason]);
84
+ return _jsx(KernelContext.Provider, { value: stableKernelRef.current, children: children });
85
+ }
86
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAC;AAWzE,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAgB,IAAI,CAAC,CAAC;AAEhE,SAAS,kBAAkB,CAAC,MAAc,EAAE,IAAY,EAAE,MAAc;IACtE,MAAM,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC;QACxB,IAAI;QACJ,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE,EAAE,MAAM,EAAE;QACnB,SAAS,EAAE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CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;gBAC/C,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;oBAC5B,oBAAoB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;gBAC1C,CAAC,CAAC,CAAC;YACL,CAAC,EAAE,CAAC,CAAC,CAAC;QACR,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC;IAE3C,OAAO,KAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,eAAe,CAAC,OAAO,YAAG,QAAQ,GAA0B,CAAC;AACrG,CAAC"}
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@urk/react-urk",
3
+ "version": "0.1.0",
4
+ "description": "URK React wrapper - thin provider and hooks around an existing kernel",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "scripts": {
22
+ "build": "rm -rf dist && tsc",
23
+ "dev": "tsc --watch",
24
+ "test": "echo 'manual validation only for this milestone'",
25
+ "lint": "echo 'no lint yet'"
26
+ },
27
+ "peerDependencies": {
28
+ "@urk/core": "^0.1.1",
29
+ "react": "^18.3.1 || ^19.0.0"
30
+ },
31
+ "devDependencies": {
32
+ "@types/react": "^18.3.12",
33
+ "@urk/core": "^0.1.1",
34
+ "react": "^18.3.1",
35
+ "typescript": "^5.3.0"
36
+ }
37
+ }