akanjs 3.2.0-rc.11 → 3.2.0-rc.13

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 (173) hide show
  1. package/ARCHITECTURE.md +17 -17
  2. package/CHANGELOG.md +24 -0
  3. package/base/base.ts +2 -1
  4. package/client/clientRuntime.ts +1 -0
  5. package/client/cn.ts +2 -2
  6. package/client/csrTypes.ts +2 -0
  7. package/client/frameConfig.ts +1 -0
  8. package/client/index.ts +249 -26
  9. package/client/locale.ts +1 -0
  10. package/client/route/RouteDefinition.ts +24 -7
  11. package/client/route/routeArgs.ts +7 -0
  12. package/client/router.ts +12 -2
  13. package/client/rscNavigation.ts +1 -0
  14. package/common/CodeTranscript.ts +1 -1
  15. package/constant/constantRegistry.ts +4 -8
  16. package/constant/crystalize.ts +1 -2
  17. package/constant/getDefault.ts +1 -1
  18. package/constant/immerify.ts +1 -1
  19. package/constant/index.ts +78 -21
  20. package/constant/purify.ts +4 -9
  21. package/constant/serialize.ts +4 -2
  22. package/constant/types.ts +1 -0
  23. package/constant/via.ts +1 -2
  24. package/dictionary/locale.ts +1 -1
  25. package/document/databaseRegistry.ts +2 -1
  26. package/document/documentSchema.ts +1 -0
  27. package/document/filterMeta.ts +4 -1
  28. package/document/into.ts +2 -1
  29. package/document/loaderInfo.ts +2 -1
  30. package/document/types.ts +1 -1
  31. package/fetch/client/fetchClient.ts +3 -3
  32. package/fetch/client/httpClient.ts +2 -0
  33. package/fetch/client/wsClient.ts +1 -0
  34. package/package.json +1 -1
  35. package/server/akanApp.ts +103 -1270
  36. package/server/akanServer.ts +1 -1
  37. package/server/console.ts +3 -2
  38. package/server/gateway/childSupervisor.ts +325 -0
  39. package/server/gateway/devHostChannel.ts +40 -0
  40. package/server/gateway/gatewayChildren.ts +135 -0
  41. package/server/gateway/gatewayConfig.ts +182 -0
  42. package/server/gateway/gatewayHttpProxy.ts +231 -0
  43. package/server/gateway/gatewayLogging.ts +111 -0
  44. package/server/gateway/gatewayRooms.ts +134 -0
  45. package/server/gateway/gatewayStatus.ts +116 -0
  46. package/server/gateway/gatewayStatusPage.ts +54 -0
  47. package/server/gateway/gatewayWebSocketRelay.ts +149 -0
  48. package/server/index.ts +257 -17
  49. package/server/logging/logControlSocket.ts +42 -3
  50. package/server/mcp/McpDispatcher.ts +6 -24
  51. package/server/rscClient.tsx +14 -8
  52. package/server/sitemap.ts +1 -0
  53. package/service/injectInfo.ts +2 -1
  54. package/service/predefinedAdaptor/sql/driver/bunSqlite.ts +3 -3
  55. package/service/predefinedAdaptor/sql/driver/postgres.ts +1 -1
  56. package/service/serviceRegistry.ts +1 -0
  57. package/signal/SignalFailure.ts +21 -0
  58. package/signal/agentTurnStream.ts +5 -2
  59. package/signal/index.ts +298 -30
  60. package/signal/resolveFieldContext.ts +34 -0
  61. package/signal/serializer/fetch.serializer.ts +7 -10
  62. package/signal/signalContext.ts +4 -31
  63. package/signal/trace.ts +3 -0
  64. package/store/baseSt.ts +1 -0
  65. package/store/index.ts +125 -18
  66. package/store/stateBuilder.ts +2 -0
  67. package/types/base/base.d.ts +2 -1
  68. package/types/client/clientRuntime.d.ts +1 -0
  69. package/types/client/cn.d.ts +2 -2
  70. package/types/client/csrTypes.d.ts +2 -0
  71. package/types/client/frameConfig.d.ts +1 -0
  72. package/types/client/index.d.ts +25 -26
  73. package/types/client/locale.d.ts +1 -0
  74. package/types/client/route/RouteDefinition.d.ts +2 -2
  75. package/types/client/route/routeArgs.d.ts +6 -0
  76. package/types/client/router.d.ts +2 -1
  77. package/types/client/rscNavigation.d.ts +1 -0
  78. package/types/common/CodeTranscript.d.ts +1 -1
  79. package/types/constant/constantRegistry.d.ts +3 -1
  80. package/types/constant/crystalize.d.ts +1 -1
  81. package/types/constant/getDefault.d.ts +1 -1
  82. package/types/constant/immerify.d.ts +1 -1
  83. package/types/constant/index.d.ts +21 -21
  84. package/types/constant/purify.d.ts +2 -1
  85. package/types/constant/serialize.d.ts +1 -1
  86. package/types/constant/types.d.ts +1 -0
  87. package/types/dictionary/base.dictionary.d.ts +1 -1
  88. package/types/dictionary/dictionary.d.ts +8 -8
  89. package/types/dictionary/locale.d.ts +1 -1
  90. package/types/document/databaseRegistry.d.ts +2 -1
  91. package/types/document/documentSchema.d.ts +1 -0
  92. package/types/document/filterMeta.d.ts +4 -1
  93. package/types/document/into.d.ts +1 -1
  94. package/types/document/loaderInfo.d.ts +2 -1
  95. package/types/document/types.d.ts +1 -1
  96. package/types/fetch/client/fetchClient.d.ts +2 -1
  97. package/types/fetch/client/httpClient.d.ts +2 -0
  98. package/types/fetch/client/wsClient.d.ts +1 -0
  99. package/types/server/akanApp.d.ts +2 -20
  100. package/types/server/console.d.ts +3 -2
  101. package/types/server/gateway/childSupervisor.d.ts +33 -0
  102. package/types/server/gateway/devHostChannel.d.ts +13 -0
  103. package/types/server/gateway/gatewayChildren.d.ts +47 -0
  104. package/types/server/gateway/gatewayConfig.d.ts +82 -0
  105. package/types/server/gateway/gatewayHttpProxy.d.ts +22 -0
  106. package/types/server/gateway/gatewayLogging.d.ts +16 -0
  107. package/types/server/gateway/gatewayRooms.d.ts +22 -0
  108. package/types/server/gateway/gatewayStatus.d.ts +62 -0
  109. package/types/server/gateway/gatewayStatusPage.d.ts +9 -0
  110. package/types/server/gateway/gatewayWebSocketRelay.d.ts +17 -0
  111. package/types/server/index.d.ts +17 -17
  112. package/types/server/logging/rotatingLogWriter.d.ts +1 -1
  113. package/types/server/sitemap.d.ts +1 -0
  114. package/types/service/injectInfo.d.ts +2 -1
  115. package/types/service/predefinedAdaptor/sql/driver/bunSqlite.d.ts +1 -14
  116. package/types/service/predefinedAdaptor/sql/driver/postgres.d.ts +0 -8
  117. package/types/service/serviceRegistry.d.ts +1 -0
  118. package/types/signal/SignalFailure.d.ts +1 -0
  119. package/types/signal/agentTurnStream.d.ts +1 -0
  120. package/types/signal/index.d.ts +31 -30
  121. package/types/signal/resolveFieldContext.d.ts +15 -0
  122. package/types/signal/serializer/fetch.serializer.d.ts +3 -1
  123. package/types/signal/signalContext.d.ts +1 -13
  124. package/types/signal/trace.d.ts +3 -0
  125. package/types/store/baseSt.d.ts +1 -0
  126. package/types/store/index.d.ts +17 -17
  127. package/types/store/stateBuilder.d.ts +2 -0
  128. package/types/ui/Agent/Chat.d.ts +5 -2
  129. package/types/ui/Agent/ChatHeader.d.ts +13 -0
  130. package/types/ui/Agent/ChatPendingCards.d.ts +23 -0
  131. package/types/ui/Reference/origin.d.ts +1 -0
  132. package/types/ui/overlayLayer.d.ts +6 -1
  133. package/types/vendor/@akanjs/native/packages/cli/src/lib/project.d.ts +4 -0
  134. package/types/vendor/@akanjs/native/packages/desktop/src/relaunch.d.ts +1 -0
  135. package/types/vendor/@akanjs/native/plugins/external-view/src/index.d.ts +14 -10
  136. package/types/vendor/use-agentic/failureCode.d.ts +4 -0
  137. package/types/vendor/use-agentic/types.d.ts +6 -0
  138. package/types/webkit/CsrGuards.d.ts +2 -0
  139. package/ui/Agent/Chat.tsx +96 -116
  140. package/ui/Agent/ChatHeader.tsx +59 -0
  141. package/ui/Agent/ChatPendingCards.tsx +49 -0
  142. package/ui/Agent/fetchRunner.ts +8 -1
  143. package/ui/BottomSheet.tsx +1 -1
  144. package/ui/Dialog/LegacyModal.tsx +1 -1
  145. package/ui/Dialog/Modal.tsx +1 -1
  146. package/ui/Popconfirm.tsx +1 -1
  147. package/ui/Reference/origin.ts +1 -0
  148. package/ui/overlayLayer.ts +22 -1
  149. package/vendor/@akanjs/native/CHANGELOG.md +6 -1
  150. package/vendor/@akanjs/native/native/desktop/src/external.rs +213 -111
  151. package/vendor/@akanjs/native/native/desktop/src/lib.rs +12 -4
  152. package/vendor/@akanjs/native/native/desktop/src/linux/external.rs +275 -0
  153. package/vendor/@akanjs/native/native/desktop/src/linux/mod.rs +1 -0
  154. package/vendor/@akanjs/native/packages/cli/src/lib/native-plugins.ts +5 -3
  155. package/vendor/@akanjs/native/packages/cli/src/lib/project.ts +25 -1
  156. package/vendor/@akanjs/native/packages/desktop/src/deeplinks.ts +2 -2
  157. package/vendor/@akanjs/native/packages/desktop/src/host.ts +2 -2
  158. package/vendor/@akanjs/native/packages/desktop/src/relaunch.ts +8 -3
  159. package/vendor/@akanjs/native/plugins/app/src/desktop.ts +2 -2
  160. package/vendor/@akanjs/native/plugins/autostart/src/desktop.ts +2 -1
  161. package/vendor/@akanjs/native/plugins/external-view/native-plugin.json +4 -1
  162. package/vendor/@akanjs/native/plugins/external-view/src/index.ts +14 -10
  163. package/vendor/use-agentic/AgentSession.ts +11 -11
  164. package/vendor/use-agentic/CHANGELOG.md +6 -0
  165. package/vendor/use-agentic/Compaction.ts +2 -1
  166. package/vendor/use-agentic/ToolRunner.ts +3 -15
  167. package/vendor/use-agentic/Transcript.ts +6 -3
  168. package/vendor/use-agentic/WIRE.md +12 -1
  169. package/vendor/use-agentic/failureCode.ts +44 -0
  170. package/vendor/use-agentic/httpRunner.ts +14 -3
  171. package/vendor/use-agentic/types.ts +6 -0
  172. package/webkit/CsrGuards.ts +7 -2
  173. package/webkit/useLocation.ts +3 -2
@@ -8,16 +8,12 @@ import {
8
8
  type PrimitiveValue,
9
9
  } from "akanjs/base";
10
10
  import { capitalize, lowerlize } from "akanjs/common";
11
- import {
12
- type ConstantCls,
13
- type ConstantModelRef,
14
- deserialize,
15
- type FieldObject,
16
- type PurifiedModel,
17
- serialize,
18
- } from ".";
11
+ import type { FieldObject } from "./fieldInfo";
12
+ import type { PurifiedModel } from "./purify";
19
13
  import { RefNameClaims, type RefNameOwner } from "./refNameClaims";
14
+ import { deserialize, serialize } from "./serialize";
20
15
  import type { ConstantType, DefaultOf, DocumentModel, QueryOf } from "./types";
16
+ import type { ConstantCls, ConstantModelRef } from "./via";
21
17
 
22
18
  export class ConstantRegistry {
23
19
  static database = new Map<string, ConstantModel>();
@@ -6,9 +6,8 @@ import {
6
6
  PrimitiveRegistry,
7
7
  type PrimitiveScalar,
8
8
  } from "akanjs/base";
9
-
10
- import type { FieldProps } from ".";
11
9
  import { ConstantRegistry } from "./constantRegistry";
10
+ import type { FieldProps } from "./fieldInfo";
12
11
 
13
12
  export type CrystalizeFunc<Model> = (self: GetStateObject<Model>, isChild?: boolean) => Model;
14
13
  export type Converter = (value: unknown) => unknown;
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_VALUE, FIELD_META, type PrimitiveScalar } from "akanjs/base";
2
- import type { FieldObject } from ".";
2
+ import type { FieldObject } from "./fieldInfo";
3
3
  import type { DefaultOf } from "./types";
4
4
 
5
5
  export interface DefaultPlan {
@@ -1,7 +1,7 @@
1
1
  import { FIELD_META } from "akanjs/base";
2
2
  import { plainFieldsOf } from "akanjs/common";
3
3
  import { immerable } from "immer";
4
- import type { ConstantModelRef } from ".";
4
+ import type { ConstantModelRef } from "./via";
5
5
 
6
6
  export const immerify = <T extends object>(modelRef: ConstantModelRef, objOrArr: T): T => {
7
7
  if (Array.isArray(objOrArr)) return objOrArr.map((val) => immerify(modelRef, val as object)) as T;
package/constant/index.ts CHANGED
@@ -1,21 +1,78 @@
1
- export * from "./cascadePaths";
2
- export * from "./constantRegistry";
3
- export * from "./crystalize";
4
- export * from "./dateSlot";
5
- export * from "./fieldInfo";
6
- export * from "./fieldPlan";
7
- export * from "./fieldQueryMeta";
8
- export * from "./getDefault";
9
- export * from "./hydrationPlan";
10
- export * from "./immerify";
11
- export * from "./inputParser";
12
- export * from "./invalidInputError";
13
- export * from "./labelOf";
14
- export * from "./mask";
15
- export * from "./purify";
16
- export * from "./requestValue";
17
- export * from "./serialize";
18
- export * from "./textFieldPathSet";
19
- export * from "./textFieldPaths";
20
- export * from "./types";
21
- export * from "./via";
1
+ export { type CascadeAction, CascadePaths, type CascadeWithPath, cascadeActions } from "./cascadePaths";
2
+ export {
3
+ type ConstantModel,
4
+ type ConstantOriginKind,
5
+ ConstantRegistry,
6
+ type ScalarConstantModel,
7
+ } from "./constantRegistry";
8
+ export { type Converter, type CrystalizeFunc, converterOf, crystalize, withSharedInstances } from "./crystalize";
9
+ export { dateAccessorOf, dateSlotOf, isDateSlotField, toDateValue } from "./dateSlot";
10
+ export {
11
+ ConstantField,
12
+ type ConstantFieldKind,
13
+ type ConstantFieldProps,
14
+ type ConstantFieldType,
15
+ type ConstantFieldTypeInput,
16
+ type ExtractFieldInfoObject,
17
+ type FieldBuilder,
18
+ type FieldInfoObject,
19
+ type FieldInfoObjectToFieldObject,
20
+ type FieldObject,
21
+ type FieldPreset,
22
+ type FieldProps,
23
+ type FieldResolver,
24
+ type FieldToValue,
25
+ field,
26
+ fieldPresets,
27
+ type ParamFieldType,
28
+ type PlainTypeToFieldType,
29
+ resolve,
30
+ } from "./fieldInfo";
31
+ export { FieldPlan, type FieldPlanEntry, type FieldPlanKind } from "./fieldPlan";
32
+ export { type FieldQueryMeta, fieldQueryMetaOf } from "./fieldQueryMeta";
33
+ export { type DefaultPlan, defaultPlanOf, freshPrimitiveValue, getDefault } from "./getDefault";
34
+ export { HydrationPlan } from "./hydrationPlan";
35
+ export { immerify } from "./immerify";
36
+ export { InputParser } from "./inputParser";
37
+ export { InvalidInputError } from "./invalidInputError";
38
+ export { labelOf } from "./labelOf";
39
+ export { agentRead, leakingFieldsOf, type MaskModel, mask, maskFieldsOf, stripSecrets } from "./mask";
40
+ export { makePurify, type PurifiedModel, type PurifyFunc, type PurifyFuncV2, type UploadableClientArg } from "./purify";
41
+ export { RequestValue } from "./requestValue";
42
+ export { deserialize, type Serialized, serialize } from "./serialize";
43
+ export { TextFieldPathSet } from "./textFieldPathSet";
44
+ export { TextFieldPaths, type TextFieldRole, textFieldRoles } from "./textFieldPaths";
45
+ export {
46
+ BaseInsight,
47
+ BaseObject,
48
+ type ConstantType,
49
+ DEFAULT_PAGE_SIZE,
50
+ type DefaultOf,
51
+ type DefaultOfSchema,
52
+ type DocumentModel,
53
+ type FieldState,
54
+ type GetPlainObject,
55
+ MAX_INT,
56
+ MAX_PAGE_SIZE,
57
+ type NonFunctionalKeys,
58
+ type ProtoAppInfo,
59
+ type ProtoFile,
60
+ type ProtoLightFile,
61
+ type ProtoPatch,
62
+ type QueryOf,
63
+ Responsive,
64
+ resolvePageLimit,
65
+ resolvePageSkip,
66
+ responsiveWidths,
67
+ type ServerArgModel,
68
+ unsetDate,
69
+ } from "./types";
70
+ export {
71
+ type ConstantCls,
72
+ type ConstantMethods,
73
+ type ConstantModelRef,
74
+ type ConstantStatics,
75
+ type DatabaseConstantStatics,
76
+ type DocumentConstantModelRef,
77
+ via,
78
+ } from "./via";
@@ -12,15 +12,10 @@ import {
12
12
  type PrimitiveScalar,
13
13
  } from "akanjs/base";
14
14
  import { Logger } from "akanjs/common";
15
-
16
- import {
17
- type BaseObject,
18
- type ConstantModelRef,
19
- ConstantRegistry,
20
- type DefaultOf,
21
- type DefaultOfSchema,
22
- type FieldProps,
23
- } from ".";
15
+ import { ConstantRegistry } from "./constantRegistry";
16
+ import type { FieldProps } from "./fieldInfo";
17
+ import type { BaseObject, DefaultOf, DefaultOfSchema } from "./types";
18
+ import type { ConstantModelRef } from "./via";
24
19
 
25
20
  type Purified<O> = O extends BaseObject
26
21
  ? string
@@ -10,9 +10,11 @@ import {
10
10
  PrimitiveRegistry,
11
11
  type PrimitiveScalar,
12
12
  } from "akanjs/base";
13
-
14
- import { type ConstantCls, type ConstantModelRef, ConstantRegistry, type FieldProps, withSharedInstances } from ".";
13
+ import { ConstantRegistry } from "./constantRegistry";
14
+ import { withSharedInstances } from "./crystalize";
15
+ import type { FieldProps } from "./fieldInfo";
15
16
  import { FieldPlan } from "./fieldPlan";
17
+ import type { ConstantCls, ConstantModelRef } from "./via";
16
18
 
17
19
  export type Serialized<O> = O extends (infer V)[]
18
20
  ? Serialized<V>[]
package/constant/types.ts CHANGED
@@ -139,6 +139,7 @@ export type NonFunctionalKeys<T> = {
139
139
  }[keyof T];
140
140
 
141
141
  export const unsetDate = dayjs(new Date("0000"));
142
+ /** @deprecated Unused by akanjs; write the int32 bound `2 ** 31 - 1` where it is meant. */
142
143
  export const MAX_INT = 2147483647;
143
144
 
144
145
  export class Responsive extends enumOf("responsive", ["xl", "lg", "md", "sm", "xs"] as const) {}
package/constant/via.ts CHANGED
@@ -13,8 +13,6 @@ import {
13
13
  } from "akanjs/base";
14
14
  import { applyMixins, plainFieldsOf } from "akanjs/common";
15
15
  import { immerable } from "immer";
16
-
17
- import { getDefault } from ".";
18
16
  import { CascadePaths } from "./cascadePaths";
19
17
  import { ConstantRegistry } from "./constantRegistry";
20
18
  import { dateAccessorOf, isDateSlotField } from "./dateSlot";
@@ -30,6 +28,7 @@ import {
30
28
  resolve,
31
29
  } from "./fieldInfo";
32
30
  import { FieldPlan } from "./fieldPlan";
31
+ import { getDefault } from "./getDefault";
33
32
  import { HydrationPlan } from "./hydrationPlan";
34
33
  import { makePurify, type PurifiedModel, type PurifyFunc } from "./purify";
35
34
  import { TextFieldPaths } from "./textFieldPaths";
@@ -1,7 +1,7 @@
1
1
  import type { GetStateObject, MergedValues } from "akanjs/base";
2
2
  import type { BaseInsight, BaseObject } from "akanjs/constant";
3
3
  import type { SliceInfo, SliceInfoArgNames, SliceInfoRefName } from "akanjs/signal";
4
- import type { ModelDictInfo, ScalarDictInfo, ServiceDictInfo } from ".";
4
+ import type { ModelDictInfo, ScalarDictInfo, ServiceDictInfo } from "./dictInfo";
5
5
  import type { DictArgNames, DictEndpointShape, DictFilterQuery, DictFilterSort, DictSliceShape } from "./dictShape";
6
6
 
7
7
  interface Trans {
@@ -1,5 +1,6 @@
1
1
  import type { ConstantCls } from "akanjs/constant";
2
- import type { DatabaseCls, ExtractQuery, ExtractSort, FilterCls, FilterInstance } from ".";
2
+ import type { DatabaseCls } from "./by";
3
+ import type { ExtractQuery, ExtractSort, FilterCls, FilterInstance } from "./filterMeta";
3
4
  import type { ModelCls } from "./loaderInfo";
4
5
 
5
6
  export interface DatabaseModel<
@@ -105,4 +105,5 @@ export class DocumentSchema<Doc = unknown> {
105
105
 
106
106
  export type SchemaOf<Mdl = unknown, Doc = unknown> = DocumentSchema<Doc> & { readonly __model?: Mdl };
107
107
 
108
+ /** @deprecated Construct `new DocumentSchema()`. */
108
109
  export const getDefaultSchemaOptions = <_TSchema, TDocument>() => new DocumentSchema<TDocument>();
@@ -26,6 +26,7 @@ import type { ConstantFilterMeta } from "./types";
26
26
  const isObjectRecord = (value: unknown): value is Record<string, unknown> =>
27
27
  typeof value === "object" && value !== null;
28
28
 
29
+ /** @deprecated Unused by akanjs; `getFilterMeta(ref, { allowEmpty: true }) !== undefined` answers the same. */
29
30
  export const isFilterModel = (filterRef: Cls<unknown, { [FILTER_META]?: ConstantFilterMeta }>): boolean =>
30
31
  filterRef[FILTER_META] !== undefined;
31
32
  export const getFilterMeta = <AllowEmpty extends boolean = false>(
@@ -36,6 +37,7 @@ export const getFilterMeta = <AllowEmpty extends boolean = false>(
36
37
  if (!filterMeta && !allowEmpty) throw new Error("filterMeta is not defined");
37
38
  return filterMeta as AllowEmpty extends true ? ConstantFilterMeta | undefined : ConstantFilterMeta;
38
39
  };
40
+ /** @internal */
39
41
  export const setFilterMeta = (
40
42
  filterRef: Cls<unknown, { [FILTER_META]?: ConstantFilterMeta; sortField: Set<string> }>,
41
43
  filterMeta: ConstantFilterMeta,
@@ -79,6 +81,7 @@ export const getFilterInfoByKey = <ArgNames extends string[] = [], Args extends
79
81
  if (!queryMeta) throw new Error(`queryMeta is not defined for key: ${key}`);
80
82
  return queryMeta;
81
83
  };
84
+ /** @deprecated Unused by akanjs; declare the query in the filter class built with `from(model, (filter) => …)`. */
82
85
  export const setFilterInfoByKey = <ArgNames extends string[] = [], Args extends any[] = any[], Model = any>(
83
86
  modelRef: Cls<Model>,
84
87
  key: string,
@@ -126,7 +129,7 @@ export interface FilterArgInfo {
126
129
  }
127
130
 
128
131
  export const DEFAULT_FILTER_ARG_MAX_ITEMS = 1000;
129
- /** Unwraps a filter arg's declaration the way `EndpointInfo.getArgInfo` unwraps an endpoint's. */
132
+ /** @internal Unwraps a filter arg's declaration the way `EndpointInfo.getArgInfo` unwraps an endpoint's. */
130
133
  export const getFilterArgInfo = (arg: FilterInfo["args"][number]): FilterArgInfo => {
131
134
  const [singleArg, arrDepth] = getNonArrayModel(arg.argRef as Cls);
132
135
  const argIsEnum = isEnum(singleArg);
package/document/into.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { type Cls, LOADER_META, type PromiseOrObject } from "akanjs/base";
2
2
  import { applyMixins } from "akanjs/common";
3
3
  import type { DocumentModel, QueryOf } from "akanjs/constant";
4
- import type { FilterCls, FilterQueryOf, FilterSortOf, SchemaOf } from ".";
5
4
  import type { CacheDatabase, QueryMethodPart } from "./database";
6
5
  import type { DataLoader } from "./dataLoader";
7
6
  import type {
@@ -11,6 +10,8 @@ import type {
11
10
  DocumentUpdateInput,
12
11
  DocumentUpdateOptions,
13
12
  } from "./documentQuery";
13
+ import type { SchemaOf } from "./documentSchema";
14
+ import type { FilterCls, FilterQueryOf, FilterSortOf } from "./filterMeta";
14
15
  import { type LoaderBuilder, type ModelCls, makeLoaderBuilder } from "./loaderInfo";
15
16
  import type { DocumentProjection } from "./types";
16
17
 
@@ -1,6 +1,7 @@
1
1
  import { type Cls, LOADER_META } from "akanjs/base";
2
2
  import type { QueryOf } from "akanjs/constant";
3
- import type { Loader, SchemaOf } from ".";
3
+ import type { Loader } from "./dataLoader";
4
+ import type { SchemaOf } from "./documentSchema";
4
5
 
5
6
  type LoaderType = "field" | "arrayField" | "query";
6
7
 
package/document/types.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { EnumInstance, GetStateObject } from "akanjs/base";
2
- import type { FilterInfo } from ".";
2
+ import type { FilterInfo } from "./filterMeta";
3
3
 
4
4
  export type DataInputOf<Input = any, Obj = any> = {
5
5
  [K in keyof Input as Input[K] extends (...args: any[]) => any ? never : K]: Input[K] extends any[]
@@ -264,11 +264,11 @@ export class FetchClient {
264
264
  setTimeout(timeout?: number | false) {
265
265
  this.http.setTimeout(timeout);
266
266
  }
267
+ /** @deprecated Every `Err` is `akanjs/common`'s, which a restored error already is; drop the call. */
267
268
  setErrorConstructor(ErrorCls?: ErrorConstructor) {
268
269
  this.ErrorCls = ErrorCls;
269
270
  this.http.setErrorConstructor(ErrorCls);
270
- this.ws.setErrorConstructor(ErrorCls);
271
- for (const ws of this.#originWs.values()) ws.setErrorConstructor(ErrorCls);
271
+ for (const ws of [this.ws, ...this.#originWs.values()]) ws.setErrorConstructor(ErrorCls);
272
272
  }
273
273
  applySignal(serializedSignal: { [key: string]: SerializedSignal }, { share = true }: { share?: boolean } = {}) {
274
274
  if (share && Object.keys(serializedSignal).length > 0) {
@@ -1104,7 +1104,7 @@ export class FetchClient {
1104
1104
  origin?: string;
1105
1105
  connect?: boolean;
1106
1106
  base?: FetchProxy;
1107
- Err?: ErrorConstructor;
1107
+ /** @deprecated Every `Err` is `akanjs/common`'s, which a restored error already is. */ Err?: ErrorConstructor;
1108
1108
  /** This app's own default request budget, for calls no endpoint and no caller gave one. */
1109
1109
  timeout?: number | false;
1110
1110
  } = {},
@@ -11,6 +11,7 @@ export interface HttpClientOptions {
11
11
  headers?: Record<string, string>;
12
12
  /** Milliseconds before the request is abandoned; `false` waits as long as the browser will. */
13
13
  timeout?: number | false;
14
+ /** @deprecated Every `Err` is `akanjs/common`'s, which a restored error already is. */
14
15
  ErrorCls?: ErrorConstructor;
15
16
  }
16
17
 
@@ -62,6 +63,7 @@ export class HttpClient {
62
63
  this.ErrorCls = options.ErrorCls;
63
64
  }
64
65
 
66
+ /** @deprecated Every `Err` is `akanjs/common`'s, which a restored error already is; drop the call. */
65
67
  setErrorConstructor(ErrorCls?: ErrorConstructor) {
66
68
  this.ErrorCls = ErrorCls;
67
69
  }
@@ -120,6 +120,7 @@ export class WsClient {
120
120
  this.url = url;
121
121
  }
122
122
 
123
+ /** @deprecated Every `Err` is `akanjs/common`'s, which a restored error already is; drop the call. */
123
124
  setErrorConstructor(ErrorCls?: ErrorConstructor) {
124
125
  this.ErrorCls = ErrorCls;
125
126
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akanjs",
3
- "version": "3.2.0-rc.11",
3
+ "version": "3.2.0-rc.13",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {