@fougere/core 0.5.0-alpha.1 → 0.6.0-alpha.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.
Files changed (219) hide show
  1. package/dist/boot/Emissions.d.ts +2 -2
  2. package/dist/boot/Emissions.d.ts.map +1 -1
  3. package/dist/boot/Emissions.js +1 -1
  4. package/dist/boot/HandlerFacade.d.ts +1 -1
  5. package/dist/boot/HandlerFacade.d.ts.map +1 -1
  6. package/dist/boot/HandlerFacade.js +1 -1
  7. package/dist/boot/HandlerFacade.js.map +1 -1
  8. package/dist/boot/auth.d.ts +6 -6
  9. package/dist/boot/auth.d.ts.map +1 -1
  10. package/dist/boot/boot.d.ts +2 -2
  11. package/dist/boot/boot.d.ts.map +1 -1
  12. package/dist/boot/boot.js +1 -1
  13. package/dist/boot/boot.js.map +1 -1
  14. package/dist/boot/bootstrap.d.ts.map +1 -1
  15. package/dist/boot/bootstrap.js +47 -38
  16. package/dist/boot/bootstrap.js.map +1 -1
  17. package/dist/boot/card.d.ts +21 -0
  18. package/dist/boot/card.d.ts.map +1 -0
  19. package/dist/boot/card.js +100 -0
  20. package/dist/boot/card.js.map +1 -0
  21. package/dist/boot/frame.d.ts +3 -3
  22. package/dist/boot/frame.d.ts.map +1 -1
  23. package/dist/boot/frame.js +7 -7
  24. package/dist/boot/frame.js.map +1 -1
  25. package/dist/boot/hosted.d.ts +8 -2
  26. package/dist/boot/hosted.d.ts.map +1 -1
  27. package/dist/boot/hosted.js +10 -10
  28. package/dist/boot/hosted.js.map +1 -1
  29. package/dist/boot/ownership.d.ts +7 -5
  30. package/dist/boot/ownership.d.ts.map +1 -1
  31. package/dist/boot/ownership.js +9 -14
  32. package/dist/boot/ownership.js.map +1 -1
  33. package/dist/boot/ports.d.ts +2 -2
  34. package/dist/boot/ports.d.ts.map +1 -1
  35. package/dist/boot/ports.js +1 -1
  36. package/dist/boot/runner.d.ts +28 -0
  37. package/dist/boot/runner.d.ts.map +1 -0
  38. package/dist/boot/runner.js +26 -0
  39. package/dist/boot/runner.js.map +1 -0
  40. package/dist/boot/seed.d.ts +2 -2
  41. package/dist/boot/seed.d.ts.map +1 -1
  42. package/dist/boot/seed.js +5 -5
  43. package/dist/boot/seed.js.map +1 -1
  44. package/dist/boot/statement-drift.d.ts +2 -1
  45. package/dist/boot/statement-drift.d.ts.map +1 -1
  46. package/dist/boot/statement-drift.js.map +1 -1
  47. package/dist/boot/together.d.ts +4 -4
  48. package/dist/boot/together.d.ts.map +1 -1
  49. package/dist/boot/together.js +17 -19
  50. package/dist/boot/together.js.map +1 -1
  51. package/dist/boot/types.d.ts +12 -11
  52. package/dist/boot/types.d.ts.map +1 -1
  53. package/dist/contract/CallLog.d.ts +2 -2
  54. package/dist/contract/CallLog.d.ts.map +1 -1
  55. package/dist/contract/RouteAddress.d.ts +2 -0
  56. package/dist/contract/RouteAddress.d.ts.map +1 -1
  57. package/dist/contract/RouteAddress.js.map +1 -1
  58. package/dist/{scan/declare.d.ts → declare.d.ts} +3 -3
  59. package/dist/declare.d.ts.map +1 -0
  60. package/dist/{scan/declare.js → declare.js} +3 -3
  61. package/dist/declare.js.map +1 -0
  62. package/dist/{scan → descriptor}/Fronds.d.ts +6 -7
  63. package/dist/descriptor/Fronds.d.ts.map +1 -0
  64. package/dist/{scan → descriptor}/Fronds.js +6 -7
  65. package/dist/descriptor/Fronds.js.map +1 -0
  66. package/dist/{scan → descriptor}/frond.d.ts +7 -47
  67. package/dist/descriptor/frond.d.ts.map +1 -0
  68. package/dist/{scan → descriptor}/frond.js.map +1 -1
  69. package/dist/dispatch/ArgumentResolver.d.ts +5 -2
  70. package/dist/dispatch/ArgumentResolver.d.ts.map +1 -1
  71. package/dist/dispatch/ArgumentResolver.js +48 -3
  72. package/dist/dispatch/ArgumentResolver.js.map +1 -1
  73. package/dist/dispatch/DispatchEvent.d.ts +1 -1
  74. package/dist/dispatch/DispatchEvent.d.ts.map +1 -1
  75. package/dist/dispatch/PresenterArgumentResolver.d.ts +1 -1
  76. package/dist/dispatch/PresenterArgumentResolver.d.ts.map +1 -1
  77. package/dist/dispatch/PresenterArgumentResolver.js +1 -1
  78. package/dist/dispatch/Route.d.ts +1 -2
  79. package/dist/dispatch/Route.d.ts.map +1 -1
  80. package/dist/dispatch/StorageGuard.d.ts +2 -2
  81. package/dist/dispatch/StorageGuard.d.ts.map +1 -1
  82. package/dist/dispatch/StorageGuard.js +7 -7
  83. package/dist/dispatch/StorageGuard.js.map +1 -1
  84. package/dist/effective-operation.d.ts +29 -3
  85. package/dist/effective-operation.d.ts.map +1 -1
  86. package/dist/effective-operation.js +52 -1
  87. package/dist/effective-operation.js.map +1 -1
  88. package/dist/emit.d.ts +1 -1
  89. package/dist/frond-config.d.ts +2 -2
  90. package/dist/graph.d.ts +1 -1
  91. package/dist/graph.d.ts.map +1 -1
  92. package/dist/imports.d.ts +1 -1
  93. package/dist/imports.d.ts.map +1 -1
  94. package/dist/index.d.ts +15 -10
  95. package/dist/index.d.ts.map +1 -1
  96. package/dist/index.js +9 -6
  97. package/dist/index.js.map +1 -1
  98. package/dist/prefab/collector.d.ts +2 -2
  99. package/dist/prefab/collector.js +2 -2
  100. package/dist/prefab/crud.d.ts +5 -5
  101. package/dist/prefab/crud.d.ts.map +1 -1
  102. package/dist/prefab/crud.js +12 -12
  103. package/dist/prefab/crud.js.map +1 -1
  104. package/dist/prefab/mirror.d.ts +5 -5
  105. package/dist/prefab/mirror.d.ts.map +1 -1
  106. package/dist/prefab/mirror.js +5 -5
  107. package/dist/prefab/mirror.js.map +1 -1
  108. package/dist/prefab/presenter.d.ts +2 -2
  109. package/dist/prefab/presenter.js +2 -2
  110. package/dist/prefab/repository.d.ts +14 -14
  111. package/dist/prefab/repository.d.ts.map +1 -1
  112. package/dist/prefab/repository.js +19 -19
  113. package/dist/prefab/repository.js.map +1 -1
  114. package/dist/rows.d.ts +40 -0
  115. package/dist/rows.d.ts.map +1 -0
  116. package/dist/rows.js +146 -0
  117. package/dist/rows.js.map +1 -0
  118. package/dist/scan/emit.d.ts +1 -1
  119. package/dist/scan/emit.d.ts.map +1 -1
  120. package/dist/scan/emit.js +1 -1
  121. package/dist/scan/emit.js.map +1 -1
  122. package/dist/scan/handler-parser.d.ts +11 -56
  123. package/dist/scan/handler-parser.d.ts.map +1 -1
  124. package/dist/scan/handler-parser.js +2 -2
  125. package/dist/scan/handler-parser.js.map +1 -1
  126. package/dist/scan/result.d.ts +41 -0
  127. package/dist/scan/result.d.ts.map +1 -0
  128. package/dist/scan/result.js +2 -0
  129. package/dist/scan/result.js.map +1 -0
  130. package/dist/scan/scanner.d.ts +1 -1
  131. package/dist/scan/scanner.d.ts.map +1 -1
  132. package/dist/scan/scanner.js +17 -17
  133. package/dist/scan/scanner.js.map +1 -1
  134. package/dist/scan/statement.d.ts +1 -1
  135. package/dist/scan/statement.d.ts.map +1 -1
  136. package/dist/scan/statement.js.map +1 -1
  137. package/dist/{orm.d.ts → storage.d.ts} +98 -16
  138. package/dist/storage.d.ts.map +1 -0
  139. package/dist/{orm.js → storage.js} +53 -5
  140. package/dist/storage.js.map +1 -0
  141. package/dist/verify.d.ts +1 -1
  142. package/dist/verify.d.ts.map +1 -1
  143. package/dist/verify.js +2 -2
  144. package/dist/verify.js.map +1 -1
  145. package/dist/{boot → wire}/binding.d.ts +2 -10
  146. package/dist/wire/binding.d.ts.map +1 -0
  147. package/dist/{boot → wire}/binding.js +0 -52
  148. package/dist/wire/binding.js.map +1 -0
  149. package/dist/wire/call.d.ts +2 -40
  150. package/dist/wire/call.d.ts.map +1 -1
  151. package/dist/wire/call.js +0 -125
  152. package/dist/wire/call.js.map +1 -1
  153. package/dist/wire/operation.d.ts +5 -31
  154. package/dist/wire/operation.d.ts.map +1 -1
  155. package/dist/wire/operation.js +0 -51
  156. package/dist/wire/operation.js.map +1 -1
  157. package/dist/wire/signature.d.ts +58 -0
  158. package/dist/wire/signature.d.ts.map +1 -0
  159. package/dist/wire/signature.js +2 -0
  160. package/dist/wire/signature.js.map +1 -0
  161. package/package.json +3 -3
  162. package/src/boot/Emissions.ts +2 -2
  163. package/src/boot/HandlerFacade.ts +3 -3
  164. package/src/boot/auth.ts +6 -6
  165. package/src/boot/boot.ts +3 -3
  166. package/src/boot/bootstrap.ts +50 -39
  167. package/src/boot/card.ts +113 -0
  168. package/src/boot/frame.ts +7 -7
  169. package/src/boot/hosted.ts +11 -14
  170. package/src/boot/ownership.ts +14 -15
  171. package/src/boot/ports.ts +2 -2
  172. package/src/boot/runner.ts +34 -0
  173. package/src/boot/seed.ts +6 -6
  174. package/src/boot/statement-drift.ts +5 -4
  175. package/src/boot/together.ts +24 -25
  176. package/src/boot/types.ts +12 -11
  177. package/src/contract/CallLog.ts +2 -2
  178. package/src/contract/RouteAddress.ts +3 -0
  179. package/src/{scan/declare.ts → declare.ts} +5 -5
  180. package/src/{scan → descriptor}/Fronds.ts +6 -7
  181. package/src/{scan → descriptor}/frond.ts +7 -48
  182. package/src/dispatch/ArgumentResolver.ts +53 -7
  183. package/src/dispatch/DispatchEvent.ts +1 -1
  184. package/src/dispatch/PresenterArgumentResolver.ts +2 -2
  185. package/src/dispatch/Route.ts +1 -3
  186. package/src/dispatch/StorageGuard.ts +7 -7
  187. package/src/effective-operation.ts +63 -11
  188. package/src/emit.ts +1 -1
  189. package/src/frond-config.ts +2 -2
  190. package/src/graph.ts +1 -1
  191. package/src/imports.ts +1 -1
  192. package/src/index.ts +15 -13
  193. package/src/prefab/collector.ts +2 -2
  194. package/src/prefab/crud.ts +18 -18
  195. package/src/prefab/mirror.ts +8 -8
  196. package/src/prefab/presenter.ts +2 -2
  197. package/src/prefab/repository.ts +32 -32
  198. package/src/rows.ts +155 -0
  199. package/src/scan/emit.ts +3 -5
  200. package/src/scan/handler-parser.ts +14 -67
  201. package/src/scan/result.ts +42 -0
  202. package/src/scan/scanner.ts +22 -21
  203. package/src/scan/statement.ts +2 -1
  204. package/src/{orm.ts → storage.ts} +126 -17
  205. package/src/verify.ts +3 -3
  206. package/src/{boot → wire}/binding.ts +2 -66
  207. package/src/wire/call.ts +1 -129
  208. package/src/wire/operation.ts +5 -62
  209. package/src/wire/signature.ts +59 -0
  210. package/dist/boot/binding.d.ts.map +0 -1
  211. package/dist/boot/binding.js.map +0 -1
  212. package/dist/orm.d.ts.map +0 -1
  213. package/dist/orm.js.map +0 -1
  214. package/dist/scan/Fronds.d.ts.map +0 -1
  215. package/dist/scan/Fronds.js.map +0 -1
  216. package/dist/scan/declare.d.ts.map +0 -1
  217. package/dist/scan/declare.js.map +0 -1
  218. package/dist/scan/frond.d.ts.map +0 -1
  219. /package/dist/{scan → descriptor}/frond.js +0 -0
package/dist/wire/call.js CHANGED
@@ -1,15 +1,4 @@
1
- /**
2
- * Call contract — a frond call is a value.
3
- *
4
- * (frond, entity, op, invocation) → result, or a thrown FougereError.
5
- * A transport is a function that executes this call elsewhere; the local
6
- * runner below is the reference realization. Transports move the value,
7
- * they never reshape it.
8
- */
9
- import { Card } from '@fougere/schema';
10
- import { factsAnnouncedBy } from '../emit.js';
11
1
  import { FougereError, ErrorCode } from './errors.js';
12
- import { createTransportEntry } from '../entry/TransportEntry.js';
13
2
  /** Reserved namespace — calls the runner answers itself, never a façade. */
14
3
  /**
15
4
  * What a receiver accepts before it stops reading a body.
@@ -81,118 +70,4 @@ export function facadeKeyOf(entityName, surface) {
81
70
  export function contractsKeyOf(entityName, surface) {
82
71
  return `${facadeKeyOf(entityName, surface)}:contracts`;
83
72
  }
84
- /**
85
- * Serialize what the app hosts, for one audience. Served on `rpc.discover`,
86
- * cached by callers.
87
- *
88
- * Hosting means answering: an entity with no façade declares no operation, so
89
- * it is not among the DOORS — publishing its shape would hand an anonymous caller
90
- * the structure of tables it can never reach (the auth tables, typically), and
91
- * `fougere sync` would rebuild a schema with nothing to call on it.
92
- *
93
- * `facts` is the one thing that shape-without-a-door rule does not cover, and the
94
- * reason is the opposite of a leak: an entity nobody exposed is silent, whereas a
95
- * fact was explicitly declared to leave.
96
- *
97
- * `surface` makes that sentence audience-aware rather than app-wide: a door
98
- * answers with what IT serves. Nothing falls back to the full façade — under a
99
- * named surface, an entity with no façade of its own is simply not there.
100
- */
101
- export function identityCardOf(app, surface) {
102
- const declared = app.fronds.schemas();
103
- return {
104
- fronds: app.fronds.map((frond) => {
105
- // What the frond answers to, not what it stores. This walked `frond.entities`, so a
106
- // handler carrying no entity — a health check, a search across shapes — was built,
107
- // served, and absent from the card: `sync` could not generate its door and a remote
108
- // consumer had no way to know it existed. The boot has said "pointing at nothing is
109
- // legal" since handlers became the subject; the card had not caught up.
110
- const byEntity = new Map(frond.entities.map((entity) => [entity.name, entity]));
111
- const addresses = [...new Set([
112
- ...frond.entities.map((entity) => entity.name),
113
- ...frond.handlers.map((handler) => handler.address),
114
- ])];
115
- return {
116
- name: frond.name,
117
- doors: addresses.flatMap((address) => {
118
- const ops = facadeOps(app, address, surface);
119
- if (ops.length === 0)
120
- return [];
121
- const entity = byEntity.get(address);
122
- return [{
123
- name: address,
124
- ops,
125
- // Absent when nothing of that name is stored. A door is still a door.
126
- ...(entity ? { schema: Card.fromSchema(entity.entityClass, address).descriptor } : {}),
127
- }];
128
- }),
129
- /**
130
- * What leaves on its own — the same list on every surface, deliberately.
131
- *
132
- * A door has an audience; a fact does not. `Emit<T>` names a subject and *the
133
- * number of readers is not the emitter's business* (`emit.ts`), so narrowing this
134
- * by `surface` would invent an axis the primitive refuses. The consequence is
135
- * stated rather than hidden: a fact's SHAPE is readable by anyone who can read the
136
- * card at all. What must not be published must not be announced.
137
- */
138
- facts: factsAnnouncedBy(frond.handlers).map((name) => {
139
- const entityClass = declared.get(name);
140
- return { name, ...(entityClass ? { schema: Card.fromSchema(entityClass, name).descriptor } : {}) };
141
- }),
142
- };
143
- }),
144
- };
145
- }
146
- function facadeOps(app, entityName, surface) {
147
- let facade;
148
- try {
149
- facade = app.container.resolve(facadeKeyOf(entityName, surface));
150
- }
151
- catch {
152
- return [];
153
- }
154
- // The façade is the list of names; the model is the resolved terms.
155
- const effective = app.operationsFor(entityName, surface);
156
- if (!effective) {
157
- throw new Error(`Facade '${facadeKeyOf(entityName, surface)}' exists without an effective operation table.`);
158
- }
159
- return Object.keys(facade).map((name) => {
160
- const contract = effective.get(name);
161
- if (!contract) {
162
- throw new Error(`Facade '${facadeKeyOf(entityName, surface)}' serves '${name}' without an effective contract.`);
163
- }
164
- return {
165
- name,
166
- ...(contract?.description && { description: contract.description }),
167
- ...(contract?.input && { input: Card.fromSchema(contract.input, name).descriptor }),
168
- ...(contract?.output && { output: Card.fromSchema(contract.output, name).descriptor }),
169
- ...(contract?.cardinality && { cardinality: contract.cardinality }),
170
- kind: contract.kind,
171
- };
172
- });
173
- }
174
- /**
175
- * Build the local runner — the reference realization of Transport.
176
- *
177
- * Resolves strictly from the app's own container: a call that lands here is
178
- * judged here. A miss is a typed NOT_FOUND, never a forward to another remote.
179
- */
180
- export function createLocalRunner(app, surface) {
181
- return createTransportEntry(app.local, surface);
182
- }
183
- /**
184
- * Build the app runner — same judgment, but resolution follows the app's
185
- * topology: local façades and remote doublures alike. This is the runner
186
- * an app's own entry points (browser endpoint, bridges) stand on.
187
- *
188
- * `surface` is the audience this runner serves, and it belongs to the DOOR that
189
- * builds the runner, never to the call: a caller cannot name its own audience
190
- * any more than it can name its own identity (`state` is stamped server-side
191
- * for the same reason). Reaching the admin door IS the proof. So `FrondCall`
192
- * gains nothing and the wire format gains nothing — a remote frond's audience
193
- * is simply which URL `remotes:` points at.
194
- */
195
- export function createAppRunner(app, surface) {
196
- return createTransportEntry(app, surface);
197
- }
198
73
  //# sourceMappingURL=call.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"call.js","sourceRoot":"","sources":["../../src/wire/call.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,IAAI,EAAyB,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,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G,+FAA+F;KACpG,CAAC,CAAC;AACL,CAAC;AAwBD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAC,UAAkB,EAAE,OAAgB;IAC9D,OAAO,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,UAAU,SAAS,CAAC,CAAC,CAAC,GAAG,UAAU,SAAS,CAAC;AAC9E,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB,EAAE,OAAgB;IACjE,OAAO,GAAG,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC;AACzD,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import type { SchemaView } from '@fougere/schema';
2
- import type { BindingPlan } from '../boot/binding.js';
3
- import type { HandlerEntry, FrondDescriptor } from '../scan/frond.js';
4
- import type { ParsedMethod, ParsedType, ParsedParam } from '../scan/handler-parser.js';
2
+ import type { BindingPlan } from './binding.js';
3
+ import type { Signature, TypeRef, Param } from './signature.js';
5
4
  /**
6
5
  * The contract of one operation — everything the façade needs to serve a call.
7
6
  *
@@ -44,7 +43,7 @@ export interface OperationContract {
44
43
  * private material: a prefab fills it too, from signatures it wrote itself. `binding`
45
44
  * still wins on where an argument comes from.
46
45
  */
47
- signature?: ParsedMethod;
46
+ signature?: Signature;
48
47
  }
49
48
  /**
50
49
  * Read an op's cardinality off its parsed return type.
@@ -53,10 +52,10 @@ export interface OperationContract {
53
52
  * `Array<T>`, so it must be recognised BEFORE the array test or a page would read as
54
53
  * a plain list and lose its `total`/`hasMore`.
55
54
  */
56
- export declare function cardinalityOf(type: ParsedType | undefined): OperationContract['cardinality'];
55
+ export declare function cardinalityOf(type: TypeRef | undefined): OperationContract['cardinality'];
57
56
  /** Map of operation name → its contract. */
58
57
  export type OperationsMap = Map<string, OperationContract>;
59
- export type { ParsedType, ParsedParam };
58
+ export type { TypeRef, Param };
60
59
  export type OperationKind = 'query' | 'command';
61
60
  /** The convention's evidence, including both sides when a composed name contradicts itself. */
62
61
  export interface OperationKindInference {
@@ -88,29 +87,4 @@ export declare function isReadOp(name: string): boolean;
88
87
  export declare function resolveIsReadOp(name: string, overrides?: Record<string, {
89
88
  kind?: OperationKind;
90
89
  }>): boolean;
91
- /**
92
- * The contract of every operation a handler serves — the three producers, merged once.
93
- *
94
- * This lived inline in `buildFacade`, which made the façade the only thing that could
95
- * answer "what is this op's contract, really?". Anything else asking — a checker, a
96
- * client generator, a descriptor — had to redo the merge, and a second opinion that
97
- * drifts reports nothing wrong while looking at the wrong thing.
98
- *
99
- * The order is a claim about authority, not a convenience:
100
- *
101
- * 1. a prefab DECLARES what it built (`Crud(E).__ops`) — runtime, so it survives a
102
- * scan that resolved nothing;
103
- * 2. the scan DERIVES from source — a method written in this very file is the
104
- * author's own word and beats everything; a method it merely READ on a base
105
- * class is a guess about someone else's code, and yields to that code's own
106
- * declaration;
107
- * 3. `frond.config.ts` STATES — the most explicit statement, made by whoever
108
- * assembles the app, and the only answer for an op inherited from an installed
109
- * base class the workspace-only scan cannot see. Merged per key, so stating a
110
- * `binding` alone does not erase an `input` the scan found.
111
- *
112
- * Pure: no container, no instance, no disk. The binding plan is resolved here, so
113
- * nothing downstream ever meets an AST.
114
- */
115
- export declare function resolveContracts(handler: Pick<HandlerEntry, 'ctor' | 'operations'>, overrides: FrondDescriptor['operationsOverrides'], collectorTypeNames: Set<string>): OperationsMap;
116
90
  //# sourceMappingURL=operation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../src/wire/operation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,2BAA2B,C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;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAQzF;AAKD,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAE3D,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAQ/B,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,CAAC;AAEhD,+FAA+F;AAC/F,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AA2BD,oFAAoF;AACpF,wBAAgB,UAAU,IAAI;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAEnE;AAYD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,CA4BvE;AAED,qFAAqF;AACrF,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,CAAC,EAAE,aAAa,CAAA;CAAE,CAAC,GACnD,aAAa,GAAG,SAAS,CAE3B;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE9C;AAED,sFAAsF;AACtF,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,CAAC,EAAE,aAAa,CAAA;CAAE,CAAC,GACnD,OAAO,CAET"}
@@ -1,4 +1,3 @@
1
- import { computeBindingPlan } from '../boot/binding.js';
2
1
  /**
3
2
  * Read an op's cardinality off its parsed return type.
4
3
  *
@@ -114,54 +113,4 @@ function requireOperationKind(name, overrides) {
114
113
  throw new Error(`Cannot infer operation kind from '${name}'. `
115
114
  + `Declare operations.${name}.kind as 'query' or 'command' in frond.config.ts.`);
116
115
  }
117
- /**
118
- * The contract of every operation a handler serves — the three producers, merged once.
119
- *
120
- * This lived inline in `buildFacade`, which made the façade the only thing that could
121
- * answer "what is this op's contract, really?". Anything else asking — a checker, a
122
- * client generator, a descriptor — had to redo the merge, and a second opinion that
123
- * drifts reports nothing wrong while looking at the wrong thing.
124
- *
125
- * The order is a claim about authority, not a convenience:
126
- *
127
- * 1. a prefab DECLARES what it built (`Crud(E).__ops`) — runtime, so it survives a
128
- * scan that resolved nothing;
129
- * 2. the scan DERIVES from source — a method written in this very file is the
130
- * author's own word and beats everything; a method it merely READ on a base
131
- * class is a guess about someone else's code, and yields to that code's own
132
- * declaration;
133
- * 3. `frond.config.ts` STATES — the most explicit statement, made by whoever
134
- * assembles the app, and the only answer for an op inherited from an installed
135
- * base class the workspace-only scan cannot see. Merged per key, so stating a
136
- * `binding` alone does not erase an `input` the scan found.
137
- *
138
- * Pure: no container, no instance, no disk. The binding plan is resolved here, so
139
- * nothing downstream ever meets an AST.
140
- */
141
- export function resolveContracts(handler, overrides, collectorTypeNames) {
142
- const declared = handler.ctor.__ops ?? {};
143
- const contracts = new Map(Object.entries(declared));
144
- for (const [opName, scanned] of handler.operations) {
145
- if (scanned.signature?.inherited && opName in declared)
146
- continue;
147
- contracts.set(opName, {
148
- ...scanned,
149
- binding: scanned.binding
150
- ?? (scanned.signature ? computeBindingPlan(scanned.signature.params, collectorTypeNames) : undefined),
151
- });
152
- }
153
- for (const [opName, override] of Object.entries(overrides ?? {})) {
154
- const { input, output, binding, description } = override;
155
- if (input === undefined && output === undefined && binding === undefined && description === undefined)
156
- continue;
157
- contracts.set(opName, {
158
- ...contracts.get(opName),
159
- ...(input !== undefined && { input }),
160
- ...(output !== undefined && { output }),
161
- ...(binding !== undefined && { binding }),
162
- ...(description !== undefined && { description }),
163
- });
164
- }
165
- return contracts;
166
- }
167
116
  //# sourceMappingURL=operation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../src/wire/operation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAiDxD;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,IAA4B;IACxD,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAClE,IAAI,CAAC,KAAK;QAAE,OAAO,MAAM,CAAC;IAC1B,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY;QAAE,OAAO,MAAM,CAAC;IAC/C,IAAI,KAAK,CAAC,KAAK;QAAE,OAAO,MAAM,CAAC;IAC/B,IAAI,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;QAAE,OAAO,MAAM,CAAC;IACrD,OAAO,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AAC7D,CAAC;AAED,iFAAiF;AACjF,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;AAsB1G;;;;GAIG;AACH,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC1B,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM;IAClF,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,E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AO;QACL,IAAI,EAAE,YAAY,CAAC,MAAM,GAAG,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;YAC1D,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;gBACtD,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,SAAS;QACf,YAAY;QACZ,cAAc;KACf,CAAC;AACJ,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,oBAAoB,CAClC,IAAY,EACZ,SAAoD;IAEpD,OAAO,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,OAAO,oBAAoB,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC;AAChD,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,eAAe,CAC7B,IAAY,EACZ,SAAoD;IAEpD,OAAO,oBAAoB,CAAC,IAAI,EAAE,SAAS,CAAC,KAAK,OAAO,CAAC;AAC3D,CAAC;AAED,SAAS,oBAAoB,CAC3B,IAAY,EACZ,SAAoD;IAEpD,MAAM,IAAI,GAAG,oBAAoB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACnD,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IACtB,MAAM,IAAI,KAAK,CACb,qCAAqC,IAAI,KAAK;UAC5C,sBAAsB,IAAI,mDAAmD,CAChF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * A method's signature, as a contract is built from it — the shape, never the reading.
3
+ *
4
+ * The scan derives one from source; `frond.config.ts` states one. Neither owns the shape.
5
+ */
6
+ /** A type reference — primitives, entities, arrays, generics. */
7
+ export interface TypeRef {
8
+ /** Raw type text as written in source (e.g. 'Pagination<Post>'). */
9
+ raw: string;
10
+ /** Base type name (e.g. 'Pagination', 'string', 'Post'). */
11
+ name: string;
12
+ /** Whether this is an array (T[] or Array<T>) — true at any depth. */
13
+ array?: boolean;
14
+ /**
15
+ * How MANY array levels: `string[]` is 1, `string[][]` is 2. `array` only ever said
16
+ * "at least one", which sufficed while one level meant one thing. It stopped sufficing
17
+ * when a presenter method started taking the page — there the outer level IS the page
18
+ * and what remains is the field, so telling `string[]` from `string[][]` is telling a
19
+ * computed string from a computed list.
20
+ */
21
+ arrayDepth?: number;
22
+ /** Generic type arguments (e.g. for Pagination<Post> → [{ name: 'Post' }]). */
23
+ generics?: TypeRef[];
24
+ /** Whether `null` belongs to the type. */
25
+ nullable?: boolean;
26
+ /** Whether absence (`undefined` or `void`) belongs to the type. */
27
+ undefined?: boolean;
28
+ /** Whether this is a Promise wrapper (unwrapped in output). */
29
+ promise?: boolean;
30
+ }
31
+ /** One parameter of a signature. */
32
+ export interface Param {
33
+ name: string;
34
+ type: TypeRef;
35
+ optional?: boolean;
36
+ }
37
+ /** A method signature. */
38
+ export interface Signature {
39
+ name: string;
40
+ params: Param[];
41
+ returnType?: TypeRef;
42
+ /**
43
+ * Came from a base class, not from the file being scanned. What a prefab
44
+ * handler declares about its own ops beats this — the scan reads a signature
45
+ * and guesses, the builder knows.
46
+ */
47
+ inherited?: boolean;
48
+ /**
49
+ * The operation in words — the first sentence of the method's doc comment.
50
+ *
51
+ * Not a new thing to write: handlers already carry it (`/** Judge: the author,
52
+ * a draft… *&#47;`), the AST already holds it, and nothing read it. A caller that
53
+ * discovers an operation over the wire has its name and its schema; what the
54
+ * operation is FOR lived only in the source.
55
+ */
56
+ description?: string;
57
+ }
58
+ //# sourceMappingURL=signature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signature.d.ts","sourceRoot":"","sources":["../../src/wire/signature.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,iEAAiE;AACjE,MAAM,WAAW,OAAO;IACtB,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;IACZ,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,oCAAoC;AACpC,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,0BAA0B;AAC1B,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=signature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signature.js","sourceRoot":"","sources":["../../src/wire/signature.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fougere/core",
3
- "version": "0.5.0-alpha.1",
3
+ "version": "0.6.0-alpha.0",
4
4
  "description": "The core — scan, call contract, façades, remote stand-ins.",
5
5
  "keywords": [
6
6
  "fougere",
@@ -56,8 +56,8 @@
56
56
  "dependencies": {
57
57
  "@typescript/typescript6": "^6.0.2",
58
58
  "dequal": "^2.0.3",
59
- "@fougere/container": "0.5.0-alpha.1",
60
- "@fougere/schema": "0.5.0-alpha.1"
59
+ "@fougere/container": "0.6.0-alpha.0",
60
+ "@fougere/schema": "0.6.0-alpha.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/node": "^22.0.0"
@@ -5,7 +5,7 @@ import { emitKeyOf, factsAnnouncedBy } from '../emit.js';
5
5
  import { ambient } from '#ambient';
6
6
  import { EMPTY_INVOCATION } from '../contract/Invocation.js';
7
7
  import type { Logger } from '../builtins/logger.js';
8
- import type { Fronds } from '../scan/Fronds.js';
8
+ import type { Fronds } from '../descriptor/Fronds.js';
9
9
  import type { OperationsMap } from '../wire/operation.js';
10
10
 
11
11
  /** A door and the op on it that accepts a fact. */
@@ -183,7 +183,7 @@ export class Emissions {
183
183
  * The announcement realizes the fact's own `lifecycle.create` — a `created()` stamped,
184
184
  * an id generated, a default applied.
185
185
  *
186
- * `applyCreate` (`schema/src/axis/lifecycle/apply.ts`) is where the split is realized:
186
+ * `applyCreate` (`schema/src/schema/axis/lifecycle/apply.ts`) is where the split is realized:
187
187
  * the judge never fills a hole, the STORAGE does, at the point of persistence. A fact has no storage, so nobody did — the judge declared an
188
188
  * absent `created()` legal and omitted it, and a subscriber received a value missing a
189
189
  * field its own type promises. Announcing is a fact's point of persistence.
@@ -1,7 +1,7 @@
1
1
  import { lowerFirst, type Fields } from '@fougere/schema';
2
2
  import type { Container } from '@fougere/container';
3
3
  import type { AppMiddleware } from '../wire/middleware.js';
4
- import type { CollectorResolver } from './binding.js';
4
+ import type { CollectorResolver } from '../dispatch/ArgumentResolver.js';
5
5
  import { collectorKeyOf } from '../prefab/collector.js';
6
6
  import { presenterKeyOf } from '../prefab/presenter.js';
7
7
  import { repositoryKeyOf } from '../prefab/repository.js';
@@ -11,7 +11,7 @@ import type { EffectiveOperation, EffectiveOperationsMap } from '../effective-op
11
11
  import type { InvocationContext } from '../contract/Invocation.js';
12
12
  import type { Emissions } from './Emissions.js';
13
13
  import type { Logger } from '../builtins/logger.js';
14
- import type { EntityEntry, HandlerEntry, PresenterEntry } from '../scan/frond.js';
14
+ import type { EntityEntry, HandlerEntry, PresenterEntry } from '../descriptor/frond.js';
15
15
  import { InputValidator } from '../dispatch/InputValidator.js';
16
16
  import { ArgumentResolver } from '../dispatch/ArgumentResolver.js';
17
17
  import { OperationExecutor } from '../dispatch/OperationExecutor.js';
@@ -106,7 +106,7 @@ export class HandlerFacade {
106
106
  if (this.inheritsCrud(handler) && !entity) {
107
107
  // An installed Crud subject may be absent from the local scan.
108
108
  wiring.log.debug(`${handler.ctor.name} extends Crud() and no scanned entity is named `
109
- + `'${this.subjectOf(handler)}' — installed entity, or a missing one: no ORM will be injected`);
109
+ + `'${this.subjectOf(handler)}' — installed entity, or a missing one: no storage will be injected`);
110
110
  }
111
111
  }
112
112
 
package/src/boot/auth.ts CHANGED
@@ -3,14 +3,14 @@
3
3
  * the contract between core and an `@fougere/auth-*` package.
4
4
  */
5
5
  import type { SchemaView } from '@fougere/schema';
6
- import type { EntityOrm, OrmFactory } from '../orm.js';
6
+ import type { Storage, StorageFactory } from '../storage.js';
7
7
 
8
8
  /**
9
9
  * Lazy auth declaration written in fougere.config.ts.
10
10
  *
11
11
  * Each @fougere/auth-* package exports a factory (e.g. `betterAuth(opts)`) that
12
12
  * returns this shape. The `create()` method is called once at boot with the
13
- * resolved db + ormFactory, so the provider can wire its engine through Fougere.
13
+ * resolved db + storageFactory, so the provider can wire its engine through Fougere.
14
14
  */
15
15
  export interface AuthConfig {
16
16
  /** Build the runtime — invoked by createApp at boot with the resolved storage handles. */
@@ -29,8 +29,8 @@ export interface AuthConfig {
29
29
  export interface AuthContext {
30
30
  /** Storage handle (Kysely DB instance, Prisma client, etc.) — opaque to core. */
31
31
  db: unknown;
32
- /** Per-entity ORM factory — auth provider uses this to back its adapter. */
33
- ormFactory: OrmFactory;
32
+ /** Per-entity storage factory — auth provider uses this to back its adapter. */
33
+ storageFactory: StorageFactory;
34
34
  }
35
35
 
36
36
  /**
@@ -43,9 +43,9 @@ export interface AuthRuntime {
43
43
  /**
44
44
  * Per-entity ORMs the provider built for itself. Exposed so app code can
45
45
  * query auth tables (e.g. list active sessions for a user) without rebuilding
46
- * the same EntityOrm.
46
+ * the same Storage.
47
47
  */
48
- orms: Record<string, EntityOrm>;
48
+ storages: Record<string, Storage>;
49
49
  /** Web Standard handler that processes /auth/* requests. */
50
50
  handler: (request: Request) => Promise<Response>;
51
51
  /** Programmatic API exposed by the provider (getSession, signOut, ...). */
package/src/boot/boot.ts CHANGED
@@ -32,12 +32,12 @@ interface BootOptions {
32
32
  */
33
33
  onEmit?: CreateAppOptions['onEmit'];
34
34
  /**
35
- * ORM setup — returns the storage handle (db), an ormFactory, and its two halves.
35
+ * storage setup — returns the storage handle (db), an storageFactory, and its two halves.
36
36
  * The `db` value is forwarded to the auth provider via AuthContext when `auth` is set.
37
37
  */
38
38
  db?: (config: FougereConfig) => {
39
39
  db?: unknown;
40
- ormFactory: CreateAppOptions['ormFactory'];
40
+ storageFactory: CreateAppOptions['storageFactory'];
41
41
  /**
42
42
  * Bring the schema up to date — an extension's `up`, because it runs after the
43
43
  * container. It used to be called `afterBoot`, a word that also meant the host's
@@ -88,7 +88,7 @@ export async function boot(options: BootOptions): Promise<App> {
88
88
  // handed the answer and reaches for nothing.
89
89
  scan: await scanProject(root, options.fronds, config.conventions),
90
90
  createContainer: options.createContainer,
91
- ormFactory: dbSetup?.ormFactory,
91
+ storageFactory: dbSetup?.storageFactory,
92
92
  db: dbSetup?.db,
93
93
  auth: config.auth,
94
94
  remotes: options.remotes,