@astrale-os/shell-react 0.1.0 → 0.2.1

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.
Files changed (265) hide show
  1. package/dist/application/apps/app-host.d.ts +2 -2
  2. package/dist/application/apps/app-host.d.ts.map +1 -1
  3. package/dist/application/apps/app-host.js +3 -3
  4. package/dist/application/apps/apps.hook.d.ts +1 -1
  5. package/dist/application/apps/apps.hook.d.ts.map +1 -1
  6. package/dist/application/apps/apps.hook.js +4 -4
  7. package/dist/application/apps/open-app.hook.d.ts +1 -1
  8. package/dist/application/apps/open-app.hook.d.ts.map +1 -1
  9. package/dist/application/apps/open-app.hook.js +3 -3
  10. package/dist/application/index.d.ts +16 -16
  11. package/dist/application/index.d.ts.map +1 -1
  12. package/dist/application/index.js +9 -9
  13. package/dist/application/roles.hook.d.ts +1 -1
  14. package/dist/application/roles.hook.d.ts.map +1 -1
  15. package/dist/application/roles.hook.js +3 -3
  16. package/dist/application/spaces/current-space.hook.d.ts +1 -1
  17. package/dist/application/spaces/current-space.hook.d.ts.map +1 -1
  18. package/dist/application/spaces/current-space.hook.js +3 -3
  19. package/dist/application/spaces/space.hook.d.ts +1 -1
  20. package/dist/application/spaces/space.hook.d.ts.map +1 -1
  21. package/dist/application/spaces/space.hook.js +4 -4
  22. package/dist/application/spaces/spaces.hook.d.ts +2 -2
  23. package/dist/application/spaces/spaces.hook.d.ts.map +1 -1
  24. package/dist/application/spaces/spaces.hook.js +5 -5
  25. package/dist/application/user/user.hook.js +2 -2
  26. package/dist/auth/act-as.context.d.ts +1 -1
  27. package/dist/auth/act-as.context.d.ts.map +1 -1
  28. package/dist/auth/act-as.context.js +1 -1
  29. package/dist/auth/auth.hook.js +2 -2
  30. package/dist/auth/can.hook.d.ts +1 -1
  31. package/dist/auth/can.hook.d.ts.map +1 -1
  32. package/dist/auth/can.hook.js +2 -2
  33. package/dist/auth/index.d.ts +5 -5
  34. package/dist/auth/index.d.ts.map +1 -1
  35. package/dist/auth/index.js +4 -4
  36. package/dist/auth/self.hook.d.ts +1 -1
  37. package/dist/auth/self.hook.d.ts.map +1 -1
  38. package/dist/auth/self.hook.js +1 -1
  39. package/dist/auth/session-kernel.d.ts +1 -1
  40. package/dist/auth/session-kernel.d.ts.map +1 -1
  41. package/dist/auth/session-kernel.js +2 -2
  42. package/dist/graph/async.d.ts +1 -1
  43. package/dist/graph/async.d.ts.map +1 -1
  44. package/dist/graph/call/call.hook.d.ts +1 -1
  45. package/dist/graph/call/call.hook.d.ts.map +1 -1
  46. package/dist/graph/call/call.hook.js +2 -2
  47. package/dist/graph/call/stream.hook.js +1 -1
  48. package/dist/graph/index.d.ts +18 -18
  49. package/dist/graph/index.d.ts.map +1 -1
  50. package/dist/graph/index.js +8 -8
  51. package/dist/graph/memory/read/idle.d.ts +1 -1
  52. package/dist/graph/memory/read/idle.d.ts.map +1 -1
  53. package/dist/graph/memory/read/read.d.ts +1 -1
  54. package/dist/graph/memory/read/read.d.ts.map +1 -1
  55. package/dist/graph/memory/read/read.js +3 -3
  56. package/dist/graph/memory/scope.js +3 -3
  57. package/dist/graph/mutate/move.hook.d.ts +2 -2
  58. package/dist/graph/mutate/move.hook.d.ts.map +1 -1
  59. package/dist/graph/mutate/move.hook.js +3 -3
  60. package/dist/graph/mutate/mutate.hook.d.ts +1 -1
  61. package/dist/graph/mutate/mutate.hook.d.ts.map +1 -1
  62. package/dist/graph/mutate/mutate.hook.js +2 -2
  63. package/dist/graph/query/children.hook.d.ts +2 -2
  64. package/dist/graph/query/children.hook.d.ts.map +1 -1
  65. package/dist/graph/query/children.hook.js +2 -2
  66. package/dist/graph/query/graph.hook.js +1 -1
  67. package/dist/graph/query/neighbors.hook.d.ts +2 -2
  68. package/dist/graph/query/neighbors.hook.d.ts.map +1 -1
  69. package/dist/graph/query/neighbors.hook.js +2 -2
  70. package/dist/graph/query/node.hook.d.ts +2 -2
  71. package/dist/graph/query/node.hook.d.ts.map +1 -1
  72. package/dist/graph/query/node.hook.js +2 -2
  73. package/dist/graph/query/query.hook.d.ts +1 -1
  74. package/dist/graph/query/query.hook.d.ts.map +1 -1
  75. package/dist/graph/query/query.hook.js +1 -1
  76. package/dist/index.d.ts +25 -25
  77. package/dist/index.d.ts.map +1 -1
  78. package/dist/index.js +11 -11
  79. package/dist/intents/index.d.ts +5 -5
  80. package/dist/intents/index.d.ts.map +1 -1
  81. package/dist/intents/index.js +2 -2
  82. package/dist/intents/listen-intent.hook.d.ts +1 -1
  83. package/dist/intents/listen-intent.hook.d.ts.map +1 -1
  84. package/dist/intents/listen-intent.hook.js +3 -3
  85. package/dist/intents/reply.js +1 -1
  86. package/dist/intents/send-intent.hook.d.ts +1 -1
  87. package/dist/intents/send-intent.hook.d.ts.map +1 -1
  88. package/dist/intents/send-intent.hook.js +2 -2
  89. package/dist/navigation/adapters/adapter.d.ts +1 -1
  90. package/dist/navigation/adapters/adapter.d.ts.map +1 -1
  91. package/dist/navigation/adapters/memory.adapter.d.ts +2 -2
  92. package/dist/navigation/adapters/memory.adapter.d.ts.map +1 -1
  93. package/dist/navigation/adapters/url.adapter.d.ts +1 -1
  94. package/dist/navigation/adapters/url.adapter.d.ts.map +1 -1
  95. package/dist/navigation/hooks/ancestors.hook.d.ts +2 -2
  96. package/dist/navigation/hooks/ancestors.hook.d.ts.map +1 -1
  97. package/dist/navigation/hooks/ancestors.hook.js +5 -5
  98. package/dist/navigation/hooks/location.hook.d.ts +1 -1
  99. package/dist/navigation/hooks/location.hook.d.ts.map +1 -1
  100. package/dist/navigation/hooks/location.hook.js +2 -2
  101. package/dist/navigation/hooks/navigate.hook.d.ts +1 -1
  102. package/dist/navigation/hooks/navigate.hook.d.ts.map +1 -1
  103. package/dist/navigation/hooks/navigate.hook.js +1 -1
  104. package/dist/navigation/hooks/scope.hook.d.ts +3 -3
  105. package/dist/navigation/hooks/scope.hook.d.ts.map +1 -1
  106. package/dist/navigation/hooks/scope.hook.js +3 -3
  107. package/dist/navigation/index.d.ts +15 -15
  108. package/dist/navigation/index.d.ts.map +1 -1
  109. package/dist/navigation/index.js +8 -8
  110. package/dist/navigation/link.d.ts +1 -1
  111. package/dist/navigation/link.d.ts.map +1 -1
  112. package/dist/navigation/link.js +2 -2
  113. package/dist/navigation/location.d.ts +1 -1
  114. package/dist/navigation/location.d.ts.map +1 -1
  115. package/dist/navigation/scope.context.d.ts +5 -5
  116. package/dist/navigation/scope.context.d.ts.map +1 -1
  117. package/dist/navigation/scope.context.js +5 -5
  118. package/dist/navigation/snapshot.d.ts +3 -3
  119. package/dist/navigation/snapshot.d.ts.map +1 -1
  120. package/dist/schema/bind-read.d.ts +2 -2
  121. package/dist/schema/bind-read.d.ts.map +1 -1
  122. package/dist/schema/bind-read.js +5 -5
  123. package/dist/schema/binding.d.ts +1 -1
  124. package/dist/schema/binding.d.ts.map +1 -1
  125. package/dist/schema/binding.js +2 -2
  126. package/dist/schema/domain.hook.js +3 -3
  127. package/dist/schema/function.hook.d.ts +2 -2
  128. package/dist/schema/function.hook.d.ts.map +1 -1
  129. package/dist/schema/function.hook.js +2 -2
  130. package/dist/schema/index.d.ts +9 -9
  131. package/dist/schema/index.d.ts.map +1 -1
  132. package/dist/schema/index.js +6 -6
  133. package/dist/schema/kernel.hook.js +3 -3
  134. package/dist/schema/method.hook.d.ts +1 -1
  135. package/dist/schema/method.hook.d.ts.map +1 -1
  136. package/dist/schema/method.hook.js +2 -2
  137. package/dist/schema/types.d.ts +2 -2
  138. package/dist/schema/types.d.ts.map +1 -1
  139. package/dist/schema/write.d.ts +1 -1
  140. package/dist/schema/write.d.ts.map +1 -1
  141. package/dist/selection/index.d.ts +3 -3
  142. package/dist/selection/index.d.ts.map +1 -1
  143. package/dist/selection/index.js +2 -2
  144. package/dist/selection/live.js +1 -1
  145. package/dist/selection/scope.context.d.ts +1 -1
  146. package/dist/selection/scope.context.d.ts.map +1 -1
  147. package/dist/selection/scope.context.js +1 -1
  148. package/dist/selection/selection.hook.d.ts +1 -1
  149. package/dist/selection/selection.hook.d.ts.map +1 -1
  150. package/dist/selection/selection.hook.js +1 -1
  151. package/dist/session/boot/boot.d.ts +1 -1
  152. package/dist/session/boot/boot.d.ts.map +1 -1
  153. package/dist/session/boot/status.d.ts +1 -1
  154. package/dist/session/boot/status.d.ts.map +1 -1
  155. package/dist/session/connection/connection.hook.d.ts +1 -1
  156. package/dist/session/connection/connection.hook.d.ts.map +1 -1
  157. package/dist/session/connection/connection.hook.js +2 -2
  158. package/dist/session/index.d.ts +7 -7
  159. package/dist/session/index.d.ts.map +1 -1
  160. package/dist/session/index.js +5 -5
  161. package/dist/session/kernel-client.hook.js +1 -1
  162. package/dist/session/kernel-instance.hook.js +1 -1
  163. package/dist/session/provider.js +8 -8
  164. package/dist/session/shell.hook.js +1 -1
  165. package/dist/window/adopt.d.ts +2 -2
  166. package/dist/window/adopt.d.ts.map +1 -1
  167. package/dist/window/hooks/close-guard.hook.js +1 -1
  168. package/dist/window/hooks/target-node.hook.d.ts +2 -2
  169. package/dist/window/hooks/target-node.hook.d.ts.map +1 -1
  170. package/dist/window/hooks/target-node.hook.js +2 -2
  171. package/dist/window/hooks/views-for.hook.d.ts +2 -2
  172. package/dist/window/hooks/views-for.hook.d.ts.map +1 -1
  173. package/dist/window/hooks/views-for.hook.js +2 -2
  174. package/dist/window/hooks/window.hook.d.ts +1 -1
  175. package/dist/window/hooks/window.hook.d.ts.map +1 -1
  176. package/dist/window/hooks/window.hook.js +2 -2
  177. package/dist/window/hooks/windows.hook.js +2 -2
  178. package/dist/window/host.d.ts +2 -2
  179. package/dist/window/host.d.ts.map +1 -1
  180. package/dist/window/host.js +4 -4
  181. package/dist/window/hub.d.ts +3 -3
  182. package/dist/window/hub.d.ts.map +1 -1
  183. package/dist/window/hub.js +1 -1
  184. package/dist/window/index.d.ts +14 -14
  185. package/dist/window/index.d.ts.map +1 -1
  186. package/dist/window/index.js +7 -7
  187. package/dist/window/stage.js +3 -3
  188. package/package.json +9 -7
  189. package/src/application/apps/app-host.tsx +6 -6
  190. package/src/application/apps/apps.hook.ts +6 -6
  191. package/src/application/apps/open-app.hook.ts +4 -4
  192. package/src/application/index.ts +16 -16
  193. package/src/application/roles.hook.ts +4 -4
  194. package/src/application/spaces/current-space.hook.ts +4 -4
  195. package/src/application/spaces/space.hook.ts +5 -5
  196. package/src/application/spaces/spaces.hook.ts +7 -7
  197. package/src/application/user/user.hook.ts +2 -2
  198. package/src/auth/act-as.context.tsx +2 -2
  199. package/src/auth/auth.hook.ts +3 -3
  200. package/src/auth/can.hook.ts +3 -3
  201. package/src/auth/index.ts +5 -5
  202. package/src/auth/self.hook.ts +2 -2
  203. package/src/auth/session-kernel.ts +3 -3
  204. package/src/graph/async.ts +1 -1
  205. package/src/graph/call/call.hook.ts +3 -3
  206. package/src/graph/call/stream.hook.ts +1 -1
  207. package/src/graph/index.ts +18 -18
  208. package/src/graph/memory/read/idle.ts +1 -1
  209. package/src/graph/memory/read/read.ts +4 -4
  210. package/src/graph/memory/scope.ts +3 -3
  211. package/src/graph/mutate/move.hook.ts +5 -5
  212. package/src/graph/mutate/mutate.hook.ts +3 -3
  213. package/src/graph/query/children.hook.ts +4 -4
  214. package/src/graph/query/graph.hook.ts +1 -1
  215. package/src/graph/query/neighbors.hook.ts +4 -4
  216. package/src/graph/query/node.hook.ts +4 -4
  217. package/src/graph/query/query.hook.ts +2 -2
  218. package/src/index.ts +25 -25
  219. package/src/intents/index.ts +5 -5
  220. package/src/intents/listen-intent.hook.ts +4 -4
  221. package/src/intents/reply.ts +1 -1
  222. package/src/intents/send-intent.hook.ts +3 -3
  223. package/src/navigation/adapters/adapter.ts +1 -1
  224. package/src/navigation/adapters/memory.adapter.ts +2 -2
  225. package/src/navigation/adapters/url.adapter.ts +2 -2
  226. package/src/navigation/hooks/ancestors.hook.ts +7 -7
  227. package/src/navigation/hooks/location.hook.ts +3 -3
  228. package/src/navigation/hooks/navigate.hook.ts +2 -2
  229. package/src/navigation/hooks/scope.hook.ts +6 -6
  230. package/src/navigation/index.ts +15 -15
  231. package/src/navigation/link.tsx +3 -3
  232. package/src/navigation/location.ts +1 -1
  233. package/src/navigation/scope.context.tsx +9 -9
  234. package/src/navigation/snapshot.ts +3 -3
  235. package/src/schema/bind-read.ts +7 -7
  236. package/src/schema/binding.ts +3 -3
  237. package/src/schema/domain.hook.ts +3 -3
  238. package/src/schema/function.hook.ts +4 -4
  239. package/src/schema/index.ts +15 -9
  240. package/src/schema/kernel.hook.ts +3 -3
  241. package/src/schema/method.hook.ts +4 -4
  242. package/src/schema/types.ts +2 -2
  243. package/src/schema/write.ts +1 -1
  244. package/src/selection/index.ts +3 -3
  245. package/src/selection/live.ts +1 -1
  246. package/src/selection/scope.context.tsx +2 -2
  247. package/src/selection/selection.hook.ts +2 -2
  248. package/src/session/boot/boot.ts +1 -1
  249. package/src/session/boot/status.ts +1 -1
  250. package/src/session/connection/connection.hook.ts +3 -3
  251. package/src/session/index.ts +7 -7
  252. package/src/session/kernel-client.hook.ts +1 -1
  253. package/src/session/kernel-instance.hook.ts +1 -1
  254. package/src/session/provider.tsx +12 -12
  255. package/src/session/shell.hook.ts +1 -1
  256. package/src/window/adopt.ts +2 -2
  257. package/src/window/hooks/close-guard.hook.ts +1 -1
  258. package/src/window/hooks/target-node.hook.ts +4 -4
  259. package/src/window/hooks/views-for.hook.ts +4 -4
  260. package/src/window/hooks/window.hook.ts +3 -3
  261. package/src/window/hooks/windows.hook.ts +2 -2
  262. package/src/window/host.tsx +8 -8
  263. package/src/window/hub.ts +4 -4
  264. package/src/window/index.ts +14 -14
  265. package/src/window/stage.tsx +3 -3
@@ -11,9 +11,9 @@ import type { ReactElement, ReactNode } from 'react'
11
11
  */
12
12
  import { createContext, useContext, useEffect, useMemo, useState } from 'react'
13
13
 
14
- import type { SelfNode } from '../session/session.context'
14
+ import type { SelfNode } from '../session/session.context.js'
15
15
 
16
- import { ShellContext } from '../session/session.context'
16
+ import { ShellContext } from '../session/session.context.js'
17
17
 
18
18
  /** A bound session view — the kernel surface `session.as(cred)` yields. */
19
19
  export type SessionView = BoundClientSessionView<FnMap>
@@ -11,10 +11,10 @@ import type { AuthApi } from '@astrale-os/kernel-client/auth'
11
11
  */
12
12
  import { useMemo } from 'react'
13
13
 
14
- import type { SessionView } from './act-as.context'
14
+ import type { SessionView } from './act-as.context.js'
15
15
 
16
- import { useIdentityBinding } from './act-as.context'
17
- import { ledgerFor } from './can.hook'
16
+ import { useIdentityBinding } from './act-as.context.js'
17
+ import { ledgerFor } from './can.hook.js'
18
18
 
19
19
  export function useAuth(): AuthApi {
20
20
  const { kernel } = useIdentityBinding()
@@ -12,10 +12,10 @@ import { rawOf } from '@astrale-os/kernel-client/graph'
12
12
  */
13
13
  import { useCallback, useMemo, useSyncExternalStore } from 'react'
14
14
 
15
- import type { NodeValue, SessionView } from './act-as.context'
15
+ import type { NodeValue, SessionView } from './act-as.context.js'
16
16
 
17
- import { isIdleInput } from '../graph/memory/read/idle'
18
- import { useIdentityBinding } from './act-as.context'
17
+ import { isIdleInput } from '../graph/memory/read/idle.js'
18
+ import { useIdentityBinding } from './act-as.context.js'
19
19
 
20
20
  const NOOP_UNSUB = (): void => undefined
21
21
 
package/src/auth/index.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // auth — API §4 (useSelf, useCan, useAuth, ActAs). See SHELL_REACT_API.md.
2
- export { ActAs } from './act-as.context'
3
- export type { ActAsProps } from './act-as.context'
4
- export { useAuth } from './auth.hook'
5
- export { useCan } from './can.hook'
6
- export { useSelf } from './self.hook'
2
+ export { ActAs } from './act-as.context.js'
3
+ export type { ActAsProps } from './act-as.context.js'
4
+ export { useAuth } from './auth.hook.js'
5
+ export { useCan } from './can.hook.js'
6
+ export { useSelf } from './self.hook.js'
@@ -1,4 +1,4 @@
1
- import type { NodeValue } from './act-as.context'
1
+ import type { NodeValue } from './act-as.context.js'
2
2
 
3
3
  /**
4
4
  * useSelf (API §4) — the caller's identity node, resolved at boot and read
@@ -7,7 +7,7 @@ import type { NodeValue } from './act-as.context'
7
7
  * live memory shape once the graph plane subscribes the self node — no signature
8
8
  * change.
9
9
  */
10
- import { useIdentityBinding } from './act-as.context'
10
+ import { useIdentityBinding } from './act-as.context.js'
11
11
 
12
12
  export function useSelf(): NodeValue {
13
13
  return useIdentityBinding().self
@@ -7,10 +7,10 @@
7
7
  */
8
8
  import { useContext } from 'react'
9
9
 
10
- import type { SessionView } from './act-as.context'
10
+ import type { SessionView } from './act-as.context.js'
11
11
 
12
- import { ShellContext } from '../session/session.context'
13
- import { IdentityContext } from './act-as.context'
12
+ import { ShellContext } from '../session/session.context.js'
13
+ import { IdentityContext } from './act-as.context.js'
14
14
 
15
15
  /** The EFFECTIVE dispatch kernel for this subtree. Throws outside a provider. */
16
16
  export function useSessionKernel(): SessionView {
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
8
8
 
9
- import type { ReadState } from './memory/read/envelope'
9
+ import type { ReadState } from './memory/read/envelope.js'
10
10
 
11
11
  export interface AsyncResource<T> extends ReadState {
12
12
  readonly data: T
@@ -6,10 +6,10 @@
6
6
  */
7
7
  import type { CallFns, FnMap } from '@astrale-os/kernel-client'
8
8
 
9
- import type { Action } from '../action'
9
+ import type { Action } from '../action.js'
10
10
 
11
- import { useSessionKernel } from '../../auth/session-kernel'
12
- import { useAction } from '../action'
11
+ import { useSessionKernel } from '../../auth/session-kernel.js'
12
+ import { useAction } from '../action.js'
13
13
 
14
14
  export interface CallOptions {
15
15
  /** Per-call timeout (ms), forwarded to the kernel dispatch. */
@@ -8,7 +8,7 @@ import type { FnMap, StreamFns } from '@astrale-os/kernel-client'
8
8
  */
9
9
  import { useCallback, useEffect, useReducer, useRef } from 'react'
10
10
 
11
- import { useSessionKernel } from '../../auth/session-kernel'
11
+ import { useSessionKernel } from '../../auth/session-kernel.js'
12
12
 
13
13
  export interface StreamOptions<T> {
14
14
  /** Notified per chunk as it arrives (in addition to `chunks` accumulation). */
@@ -1,20 +1,20 @@
1
1
  // graph — the graph plane (API §5 + §7). Merged read hooks, writes, dispatch.
2
- export { useNode } from './query/node.hook'
3
- export type { NodeResult } from './query/node.hook'
4
- export { useChildren } from './query/children.hook'
5
- export type { ChildrenOptions, ChildrenResult } from './query/children.hook'
6
- export { useQuery } from './query/query.hook'
7
- export type { QueryResult } from './query/query.hook'
8
- export { useGraph } from './query/graph.hook'
9
- export { useMutate } from './mutate/mutate.hook'
10
- export type { UseMutateOptions } from './mutate/mutate.hook'
11
- export { useMove } from './mutate/move.hook'
12
- export type { MoveAction } from './mutate/move.hook'
13
- export { useCall } from './call/call.hook'
14
- export type { CallOptions } from './call/call.hook'
15
- export { useStream } from './call/stream.hook'
16
- export type { StreamHandle, StreamOptions } from './call/stream.hook'
17
- export type { Action } from './action'
18
- export type { ReadState, ReadOptions, Windowed, Node } from './memory/read/envelope'
19
- export type { GraphMemory } from './graph.context'
2
+ export { useNode } from './query/node.hook.js'
3
+ export type { NodeResult } from './query/node.hook.js'
4
+ export { useChildren } from './query/children.hook.js'
5
+ export type { ChildrenOptions, ChildrenResult } from './query/children.hook.js'
6
+ export { useQuery } from './query/query.hook.js'
7
+ export type { QueryResult } from './query/query.hook.js'
8
+ export { useGraph } from './query/graph.hook.js'
9
+ export { useMutate } from './mutate/mutate.hook.js'
10
+ export type { UseMutateOptions } from './mutate/mutate.hook.js'
11
+ export { useMove } from './mutate/move.hook.js'
12
+ export type { MoveAction } from './mutate/move.hook.js'
13
+ export { useCall } from './call/call.hook.js'
14
+ export type { CallOptions } from './call/call.hook.js'
15
+ export { useStream } from './call/stream.hook.js'
16
+ export type { StreamHandle, StreamOptions } from './call/stream.hook.js'
17
+ export type { Action } from './action.js'
18
+ export type { ReadState, ReadOptions, Windowed, Node } from './memory/read/envelope.js'
19
+ export type { GraphMemory } from './graph.context.js'
20
20
  export type { ShapeInput } from '@astrale-os/kernel-client/store'
@@ -3,7 +3,7 @@
3
3
  * inert: `isIdleInput` is the one gate every read branches on, and
4
4
  * `idleReadState` is the settled, not-live, seq-0 envelope it returns.
5
5
  */
6
- import type { ReadState } from './envelope'
6
+ import type { ReadState } from './envelope.js'
7
7
 
8
8
  /**
9
9
  * The chaining rule: every read hook accepts `null | undefined` for its subject
@@ -14,11 +14,11 @@ import { canonicalizeAST, shapeInputToAST, stableStringify } from '@astrale-os/k
14
14
  */
15
15
  import { useCallback, useRef, useSyncExternalStore } from 'react'
16
16
 
17
- import type { CoreReadOptions, RawRead } from './envelope'
17
+ import type { CoreReadOptions, RawRead } from './envelope.js'
18
18
 
19
- import { useMemory } from '../scope'
20
- import { EMPTY_PENDING, IDLE_READ, withPending } from './envelope'
21
- import { isIdleInput } from './idle'
19
+ import { useMemory } from '../scope.js'
20
+ import { EMPTY_PENDING, IDLE_READ, withPending } from './envelope.js'
21
+ import { isIdleInput } from './idle.js'
22
22
 
23
23
  const NOOP_UNSUB = (): void => {}
24
24
  const IDLE_TOKEN = ' idle'
@@ -9,9 +9,9 @@ import type { GraphMemory } from '@astrale-os/kernel-client/store'
9
9
  */
10
10
  import { useContext, useMemo } from 'react'
11
11
 
12
- import { IdentityContext } from '../../auth/act-as.context'
13
- import { ShellContext } from '../../session/session.context'
14
- import { baseMemoryFor } from './base'
12
+ import { IdentityContext } from '../../auth/act-as.context.js'
13
+ import { ShellContext } from '../../session/session.context.js'
14
+ import { baseMemoryFor } from './base.js'
15
15
 
16
16
  /**
17
17
  * The memory for this subtree. Throws outside a `<ShellProvider>`. Above any
@@ -11,12 +11,12 @@ import { rawOf } from '@astrale-os/kernel-client/graph'
11
11
  */
12
12
  import { useCallback } from 'react'
13
13
 
14
- import type { Action } from '../action'
15
- import type { Node } from '../memory/read/envelope'
14
+ import type { Action } from '../action.js'
15
+ import type { Node } from '../memory/read/envelope.js'
16
16
 
17
- import { useSessionKernel } from '../../auth/session-kernel'
18
- import { useAction } from '../action'
19
- import { useMemory } from '../memory/scope'
17
+ import { useSessionKernel } from '../../auth/session-kernel.js'
18
+ import { useAction } from '../action.js'
19
+ import { useMemory } from '../memory/scope.js'
20
20
 
21
21
  export type MoveAction = Action<[node: Node | NodeRefInput, to: PathLike], void>
22
22
 
@@ -9,10 +9,10 @@ import type { GraphMemory } from '@astrale-os/kernel-client/store'
9
9
  */
10
10
  import { useCallback, useRef } from 'react'
11
11
 
12
- import type { Action } from '../action'
12
+ import type { Action } from '../action.js'
13
13
 
14
- import { useAction } from '../action'
15
- import { useMemory } from '../memory/scope'
14
+ import { useAction } from '../action.js'
15
+ import { useMemory } from '../memory/scope.js'
16
16
 
17
17
  export interface UseMutateOptions<A extends unknown[], R> {
18
18
  /**
@@ -17,11 +17,11 @@ import { rawOf } from '@astrale-os/kernel-client/graph'
17
17
  */
18
18
  import { useMemo } from 'react'
19
19
 
20
- import type { TypedChildrenResult } from '../../schema/types'
21
- import type { ReadState, Node, ReadOptions, Windowed } from '../memory/read/envelope'
20
+ import type { TypedChildrenResult } from '../../schema/types.js'
21
+ import type { ReadState, Node, ReadOptions, Windowed } from '../memory/read/envelope.js'
22
22
 
23
- import { useChildren as useChildrenTyped } from '../../schema/bind-read'
24
- import { useRead } from '../memory/read/read'
23
+ import { useChildren as useChildrenTyped } from '../../schema/bind-read.js'
24
+ import { useRead } from '../memory/read/read.js'
25
25
 
26
26
  export interface ChildrenOptions extends ReadOptions {
27
27
  /** Restrict to these classes (dual-path descent filter). */
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import type { GraphMemory } from '@astrale-os/kernel-client/store'
7
7
 
8
- import { useMemory } from '../memory/scope'
8
+ import { useMemory } from '../memory/scope.js'
9
9
 
10
10
  /** The memory for this subtree — the raw floor plus optimistic-auto shorthands (§5). */
11
11
  export function useGraph(): GraphMemory {
@@ -8,11 +8,11 @@ import type { Schema } from '@astrale-os/kernel-dsl'
8
8
  */
9
9
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
10
10
 
11
- import type { EndpointResult } from '../../schema/types'
12
- import type { ReadState, ReadOptions } from '../memory/read/envelope'
11
+ import type { EndpointResult } from '../../schema/types.js'
12
+ import type { ReadState, ReadOptions } from '../memory/read/envelope.js'
13
13
 
14
- import { schemaOf, tagSchema } from '../../schema/tag'
15
- import { isIdleInput } from '../memory/read/idle'
14
+ import { schemaOf, tagSchema } from '../../schema/tag.js'
15
+ import { isIdleInput } from '../memory/read/idle.js'
16
16
 
17
17
  export function useOut<S extends Schema, E extends EdgeNames<S>>(
18
18
  node: AnyBoundNode<S> | null | undefined,
@@ -11,11 +11,11 @@ import type { Schema } from '@astrale-os/kernel-dsl'
11
11
  */
12
12
  import { useMemo } from 'react'
13
13
 
14
- import type { TypedNodeResult } from '../../schema/types'
15
- import type { ReadState, Node, ReadOptions } from '../memory/read/envelope'
14
+ import type { TypedNodeResult } from '../../schema/types.js'
15
+ import type { ReadState, Node, ReadOptions } from '../memory/read/envelope.js'
16
16
 
17
- import { useNode as useNodeTyped } from '../../schema/bind-read'
18
- import { useRead } from '../memory/read/read'
17
+ import { useNode as useNodeTyped } from '../../schema/bind-read.js'
18
+ import { useRead } from '../memory/read/read.js'
19
19
 
20
20
  export interface NodeResult extends ReadState {
21
21
  /** The node, or `null` when missing ≡ masked (never throws NOT_FOUND). */
@@ -7,9 +7,9 @@ import type { GatherBuilder, QueryASTInput, QuerySource } from '@astrale-os/kern
7
7
  */
8
8
  import { useMemo } from 'react'
9
9
 
10
- import type { ReadState, Node, ReadOptions, Windowed } from '../memory/read/envelope'
10
+ import type { ReadState, Node, ReadOptions, Windowed } from '../memory/read/envelope.js'
11
11
 
12
- import { useRead } from '../memory/read/read'
12
+ import { useRead } from '../memory/read/read.js'
13
13
 
14
14
  export interface QueryResult extends ReadState, Windowed {
15
15
  readonly nodes: readonly Node[]
package/src/index.ts CHANGED
@@ -9,14 +9,14 @@
9
9
  */
10
10
 
11
11
  // ─── session (§2 provider + §3) ──────────────────────────────────────────────
12
- export { ShellProvider } from './session'
13
- export type { ShellError, ShellProviderProps } from './session'
14
- export { useConnection, useKernelClient, useKernelInstance, useShell } from './session'
15
- export type { KernelInstance } from './session'
12
+ export { ShellProvider } from './session/index.js'
13
+ export type { ShellError, ShellProviderProps } from './session/index.js'
14
+ export { useConnection, useKernelClient, useKernelInstance, useShell } from './session/index.js'
15
+ export type { KernelInstance } from './session/index.js'
16
16
 
17
17
  // ─── auth (§4) ───────────────────────────────────────────────────────────────
18
- export { ActAs, useAuth, useCan, useSelf } from './auth'
19
- export type { ActAsProps } from './auth'
18
+ export { ActAs, useAuth, useCan, useSelf } from './auth/index.js'
19
+ export type { ActAsProps } from './auth/index.js'
20
20
 
21
21
  // ─── graph — the untyped floor + writes + dispatch (§5, §7) ──────────────────
22
22
  // `useNode`/`useChildren` are single symbols merging the untyped floor + typed
@@ -30,7 +30,7 @@ export {
30
30
  useNode,
31
31
  useQuery,
32
32
  useStream,
33
- } from './graph'
33
+ } from './graph/index.js'
34
34
  export type {
35
35
  ChildrenOptions,
36
36
  ChildrenResult,
@@ -41,13 +41,13 @@ export type {
41
41
  QueryResult,
42
42
  ShapeInput,
43
43
  UseMutateOptions,
44
- } from './graph'
45
- export type { CallOptions, StreamHandle, StreamOptions } from './graph'
44
+ } from './graph/index.js'
45
+ export type { CallOptions, StreamHandle, StreamOptions } from './graph/index.js'
46
46
 
47
47
  // ─── schema — the typed substrate (§6) ───────────────────────────────────────
48
- export { useDomain, useFunction, useIn, useKernel, useMethod, useOut } from './schema'
49
- export type { FunctionOptions } from './schema'
50
- export type { MethodOptions } from './schema'
48
+ export { useDomain, useFunction, useIn, useKernel, useMethod, useOut } from './schema/index.js'
49
+ export type { FunctionOptions } from './schema/index.js'
50
+ export type { MethodOptions } from './schema/index.js'
51
51
  export type {
52
52
  AutoMethodAction,
53
53
  BoundMethodAction,
@@ -62,7 +62,7 @@ export type {
62
62
  TargetedMethodAction,
63
63
  TypedChildrenResult,
64
64
  TypedNodeResult,
65
- } from './schema'
65
+ } from './schema/index.js'
66
66
 
67
67
  // ─── navigation (§8) ─────────────────────────────────────────────────────────
68
68
  export {
@@ -74,7 +74,7 @@ export {
74
74
  useLocation,
75
75
  useNavScope,
76
76
  useNavigate,
77
- } from './navigation'
77
+ } from './navigation/index.js'
78
78
  export type {
79
79
  LinkProps,
80
80
  MissingPolicy,
@@ -86,11 +86,11 @@ export type {
86
86
  NavTarget,
87
87
  Navigate,
88
88
  SerializedLocation,
89
- } from './navigation'
89
+ } from './navigation/index.js'
90
90
 
91
91
  // ─── selection (§9) ──────────────────────────────────────────────────────────
92
- export { SelectionScope, useSelection } from './selection'
93
- export type { Selection, SelectionScopeProps } from './selection'
92
+ export { SelectionScope, useSelection } from './selection/index.js'
93
+ export type { Selection, SelectionScopeProps } from './selection/index.js'
94
94
 
95
95
  // ─── window (§10) ────────────────────────────────────────────────────────────
96
96
  export {
@@ -102,7 +102,7 @@ export {
102
102
  useWindows,
103
103
  ViewHost,
104
104
  ViewStage,
105
- } from './window'
105
+ } from './window/index.js'
106
106
  export type {
107
107
  CloseGuard,
108
108
  CloseVerdict,
@@ -114,11 +114,11 @@ export type {
114
114
  WindowListEntry,
115
115
  WindowState,
116
116
  WindowView,
117
- } from './window'
117
+ } from './window/index.js'
118
118
 
119
119
  // ─── intents (§11) ───────────────────────────────────────────────────────────
120
- export { useIntent, useSendIntent } from './intents'
121
- export type { IntentCtx, IntentPayload, IntentReply, SendIntent } from './intents'
120
+ export { useIntent, useSendIntent } from './intents/index.js'
121
+ export type { IntentCtx, IntentPayload, IntentReply, SendIntent } from './intents/index.js'
122
122
 
123
123
  // ─── application — the OS plane (§12) ────────────────────────────────────────
124
124
  export {
@@ -131,7 +131,7 @@ export {
131
131
  useSpace,
132
132
  useSpaces,
133
133
  useUser,
134
- } from './application'
134
+ } from './application/index.js'
135
135
  export type {
136
136
  AppHostFallbackState,
137
137
  AppHostProps,
@@ -141,15 +141,15 @@ export type {
141
141
  RolesResult,
142
142
  SpaceResult,
143
143
  SpacesResult,
144
- } from './application'
144
+ } from './application/index.js'
145
145
  // OS node/session types (from the shell package, single import surface).
146
146
  export type { ApplicationNode, AppSession, RoleNode, SpaceNode, UserNode } from '@astrale-os/shell'
147
147
 
148
148
  // ─── shared envelopes (§1) ───────────────────────────────────────────────────
149
- export type { Action, ReadState, ReadOptions, Windowed } from './graph'
149
+ export type { Action, ReadState, ReadOptions, Windowed } from './graph/index.js'
150
150
 
151
151
  // ─── error taxonomy (§1.4) — guards + classes, re-exported from kernel-client ─
152
- export * from './graph/guards.error'
152
+ export * from './graph/guards.error.js'
153
153
 
154
154
  // ─── re-exported kernel-client types (one import surface, §0 preamble) ───────
155
155
  export {
@@ -1,6 +1,6 @@
1
1
  // intents — API §11 (useIntent, useSendIntent). See SHELL_REACT_API.md.
2
- export { useIntent } from './listen-intent.hook'
3
- export type { IntentCtx } from './listen-intent.hook'
4
- export { useSendIntent } from './send-intent.hook'
5
- export type { SendIntent } from './send-intent.hook'
6
- export type { IntentPayload, IntentReply } from './envelope'
2
+ export { useIntent } from './listen-intent.hook.js'
3
+ export type { IntentCtx } from './listen-intent.hook.js'
4
+ export { useSendIntent } from './send-intent.hook.js'
5
+ export type { SendIntent } from './send-intent.hook.js'
6
+ export type { IntentPayload, IntentReply } from './envelope.js'
@@ -10,11 +10,11 @@ import type { IntentMessage, IntentRegistry } from '@astrale-os/shell'
10
10
  */
11
11
  import { useEffect, useRef } from 'react'
12
12
 
13
- import type { IntentPayload, IntentReply } from './envelope'
13
+ import type { IntentPayload, IntentReply } from './envelope.js'
14
14
 
15
- import { useShell } from '../session/shell.hook'
16
- import { NOOP } from './envelope'
17
- import { sendReply } from './reply'
15
+ import { useShell } from '../session/shell.hook.js'
16
+ import { NOOP } from './envelope.js'
17
+ import { sendReply } from './reply.js'
18
18
 
19
19
  /** Delivery context passed alongside an inbound intent's payload. */
20
20
  export interface IntentCtx<K extends keyof IntentRegistry> {
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import type { Shell } from '@astrale-os/shell'
7
7
 
8
- import { INTENT_REPLY, PARENT_SENDER, intentMessage } from './envelope'
8
+ import { INTENT_REPLY, PARENT_SENDER, intentMessage } from './envelope.js'
9
9
 
10
10
  /** Deliver a reply to whichever channel the request arrived on. Best-effort. */
11
11
  export function sendReply(
@@ -9,10 +9,10 @@ import type { IntentMessage, IntentRegistry, Shell } from '@astrale-os/shell'
9
9
  */
10
10
  import { useCallback, useEffect, useRef } from 'react'
11
11
 
12
- import type { IntentPayload, IntentReply } from './envelope'
12
+ import type { IntentPayload, IntentReply } from './envelope.js'
13
13
 
14
- import { useShell } from '../session/shell.hook'
15
- import { INTENT_REPLY, NOOP, intentMessage } from './envelope'
14
+ import { useShell } from '../session/shell.hook.js'
15
+ import { INTENT_REPLY, NOOP, intentMessage } from './envelope.js'
16
16
 
17
17
  /** The typed sender returned by {@link useSendIntent}. */
18
18
  export interface SendIntent {
@@ -3,7 +3,7 @@
3
3
  * location through. `href` is the URL-form probe `<Link>` needs: present → an
4
4
  * `<a href>` (cmd/ctrl-click falls through); absent → `role="link"`.
5
5
  */
6
- import type { SerializedLocation } from '../history'
6
+ import type { SerializedLocation } from '../history.js'
7
7
 
8
8
  export interface NavAdapter {
9
9
  read(): SerializedLocation | null
@@ -2,8 +2,8 @@
2
2
  * memoryAdapter (API §8.1) — the default scope backing: holds one location in a
3
3
  * closure (per-pane state, no URL form → Link renders `role="link"`).
4
4
  */
5
- import type { SerializedLocation } from '../history'
6
- import type { NavAdapter } from './adapter'
5
+ import type { SerializedLocation } from '../history.js'
6
+ import type { NavAdapter } from './adapter.js'
7
7
 
8
8
  /** In-memory adapter — the default scope backing (per-pane state, no URL). */
9
9
  export function memoryAdapter(initial?: SerializedLocation): NavAdapter {
@@ -3,8 +3,8 @@
3
3
  * query string (URL form → `<a href>`), owning the nav query keys (`param`,
4
4
  * `view`, the location's `params`).
5
5
  */
6
- import type { SerializedLocation } from '../history'
7
- import type { NavAdapter } from './adapter'
6
+ import type { SerializedLocation } from '../history.js'
7
+ import type { NavAdapter } from './adapter.js'
8
8
 
9
9
  const VIEW_KEY = 'view'
10
10
 
@@ -8,14 +8,14 @@ import type { LiveResult, ShapeInput } from '@astrale-os/kernel-client/store'
8
8
  */
9
9
  import { useMemo } from 'react'
10
10
 
11
- import type { ReadState } from '../../graph/memory/read/envelope'
12
- import type { Node } from '../location'
11
+ import type { ReadState } from '../../graph/memory/read/envelope.js'
12
+ import type { Node } from '../location.js'
13
13
 
14
- import { idleReadState } from '../../graph/memory/read/idle'
15
- import { useMemory } from '../../graph/memory/scope'
16
- import { chainPaths, pathHint, pathOf } from '../location'
17
- import { useHistoryVersion, useOptionalNavCtx, useMemoryShape } from '../scope.context'
18
- import { serializeTarget } from '../snapshot'
14
+ import { idleReadState } from '../../graph/memory/read/idle.js'
15
+ import { useMemory } from '../../graph/memory/scope.js'
16
+ import { chainPaths, pathHint, pathOf } from '../location.js'
17
+ import { useHistoryVersion, useOptionalNavCtx, useMemoryShape } from '../scope.context.js'
18
+ import { serializeTarget } from '../snapshot.js'
19
19
 
20
20
  /**
21
21
  * The root-first ancestor chain (inclusive of the node itself), live: a move
@@ -4,10 +4,10 @@
4
4
  */
5
5
  import { useMemo } from 'react'
6
6
 
7
- import type { NavLocation } from '../location'
7
+ import type { NavLocation } from '../location.js'
8
8
 
9
- import { buildLocation, useSettled } from '../location'
10
- import { useHistoryVersion, useNavCtx, useMemoryShape } from '../scope.context'
9
+ import { buildLocation, useSettled } from '../location.js'
10
+ import { useHistoryVersion, useNavCtx, useMemoryShape } from '../scope.context.js'
11
11
 
12
12
  /** The nearest scope's live location. Throws outside any {@link NavScope}. */
13
13
  export function useLocation(): NavLocation {
@@ -5,9 +5,9 @@
5
5
  */
6
6
  import { useMemo } from 'react'
7
7
 
8
- import type { MutableNavigate, NavCtx, Navigate } from '../scope.context'
8
+ import type { MutableNavigate, NavCtx, Navigate } from '../scope.context.js'
9
9
 
10
- import { useHistoryVersion, useNavCtx } from '../scope.context'
10
+ import { useHistoryVersion, useNavCtx } from '../scope.context.js'
11
11
 
12
12
  /** The nearest scope's imperative navigation surface. Throws outside a scope. */
13
13
  export function useNavigate(): Navigate {
@@ -5,13 +5,13 @@
5
5
  */
6
6
  import { useCallback, useMemo } from 'react'
7
7
 
8
- import type { NavSnapshot } from '../history'
9
- import type { NavLocation } from '../location'
10
- import type { Navigate } from '../scope.context'
8
+ import type { NavSnapshot } from '../history.js'
9
+ import type { NavLocation } from '../location.js'
10
+ import type { Navigate } from '../scope.context.js'
11
11
 
12
- import { buildLocation, useSettled } from '../location'
13
- import { useNavCtx, useMemoryShape } from '../scope.context'
14
- import { useNavigateHandle } from './navigate.hook'
12
+ import { buildLocation, useSettled } from '../location.js'
13
+ import { useNavCtx, useMemoryShape } from '../scope.context.js'
14
+ import { useNavigateHandle } from './navigate.hook.js'
15
15
 
16
16
  /** The nearest scope, for chrome/persistence (API §8.2). */
17
17
  export interface NavScopeHandle {