stitchkit 0.68.0 → 0.68.2

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 (180) hide show
  1. package/dist/agent-runtime/admission-lanes.d.ts +1 -1
  2. package/dist/agent-runtime/compaction.d.ts +2 -2
  3. package/dist/agent-runtime/events.d.ts +1 -1
  4. package/dist/agent-runtime/history.d.ts +1 -1
  5. package/dist/agent-runtime/history.d.ts.map +1 -1
  6. package/dist/agent-runtime/injection.d.ts +1 -1
  7. package/dist/agent-runtime/managed-tools.d.ts +3 -3
  8. package/dist/agent-runtime/models.d.ts +1 -1
  9. package/dist/agent-runtime/observability.d.ts +1 -1
  10. package/dist/agent-runtime/prompt.d.ts +1 -1
  11. package/dist/agent-runtime/prompt.d.ts.map +1 -1
  12. package/dist/agent-runtime/protocol.d.ts +19 -1
  13. package/dist/agent-runtime/protocol.d.ts.map +1 -1
  14. package/dist/agent-runtime/run-execution.d.ts +5 -5
  15. package/dist/agent-runtime/run-execution.d.ts.map +1 -1
  16. package/dist/agent-runtime/runtime-internals.d.ts +1 -1
  17. package/dist/agent-runtime/runtime-result.d.ts +1 -1
  18. package/dist/agent-runtime/runtime.d.ts +14 -12
  19. package/dist/agent-runtime/runtime.d.ts.map +1 -1
  20. package/dist/agent-runtime/store-driver.d.ts +2 -2
  21. package/dist/agent-runtime/store.d.ts +2 -2
  22. package/dist/agent-runtime/terminal-commit.d.ts +2 -2
  23. package/dist/agent-runtime/terminal-status.d.ts +1 -1
  24. package/dist/agent-runtime-openrouter.d.ts +1 -1
  25. package/dist/agent-runtime.d.ts +15 -15
  26. package/dist/agent-runtime.d.ts.map +1 -1
  27. package/dist/agent-runtime.js +87 -26
  28. package/dist/application/admission.d.ts +1 -1
  29. package/dist/application/events.d.ts +2 -2
  30. package/dist/application/grammy.d.ts +2 -2
  31. package/dist/application/graph.d.ts +1 -1
  32. package/dist/application/health.d.ts +1 -1
  33. package/dist/application/kernel.d.ts +3 -3
  34. package/dist/application/opentelemetry.d.ts +3 -3
  35. package/dist/application/resource.d.ts +1 -1
  36. package/dist/application/schedule.d.ts +1 -1
  37. package/dist/application/server-resource.d.ts +7 -9
  38. package/dist/application/server-resource.d.ts.map +1 -1
  39. package/dist/application-grammy.d.ts +1 -1
  40. package/dist/application-opentelemetry.d.ts +1 -1
  41. package/dist/application.d.ts +11 -11
  42. package/dist/application.js +7 -7
  43. package/dist/browser/client-multipart.d.ts +1 -1
  44. package/dist/browser/client-url.d.ts +2 -2
  45. package/dist/browser/client.d.ts +4 -4
  46. package/dist/browser/client.d.ts.map +1 -1
  47. package/dist/browser/contract-stream.d.ts +1 -1
  48. package/dist/browser/http.d.ts +7 -7
  49. package/dist/browser/http.d.ts.map +1 -1
  50. package/dist/browser/socket-io.d.ts +12 -31
  51. package/dist/browser/socket-io.d.ts.map +1 -1
  52. package/dist/browser/stream.d.ts +2 -2
  53. package/dist/cli.d.ts +6 -6
  54. package/dist/cli.js +4 -3
  55. package/dist/contract/errors-factory.d.ts +1 -1
  56. package/dist/contract/factory.d.ts +1 -1
  57. package/dist/contract/index.d.ts +7 -7
  58. package/dist/files/boundary.d.ts +1 -1
  59. package/dist/files.d.ts +2 -2
  60. package/dist/{index-zd4v31v2.js → index-2ve29dzn.js} +3 -3
  61. package/dist/{index-nymn7wbg.js → index-3vq6we8m.js} +29 -17
  62. package/dist/index-7etq650s.js +75 -0
  63. package/dist/{index-7pn02bgv.js → index-cszjsxy5.js} +22 -83
  64. package/dist/index-g2j2m6vv.js +63 -0
  65. package/dist/index.d.ts +10 -10
  66. package/dist/index.js +4 -4
  67. package/dist/internal/errors.d.ts +1 -1
  68. package/dist/internal/observability-sink.d.ts +1 -1
  69. package/dist/node.d.ts +11 -11
  70. package/dist/node.d.ts.map +1 -1
  71. package/dist/node.js +2 -2
  72. package/dist/observability/audit.d.ts +5 -5
  73. package/dist/observability/context.d.ts +2 -2
  74. package/dist/observability/event.d.ts +2 -2
  75. package/dist/observability/index.d.ts +6 -6
  76. package/dist/react/entity-cache.d.ts +26 -1
  77. package/dist/react/entity-cache.d.ts.map +1 -1
  78. package/dist/react.d.ts +3 -3
  79. package/dist/react.d.ts.map +1 -1
  80. package/dist/react.js +136 -38
  81. package/dist/realtime/contract.d.ts +1 -1
  82. package/dist/realtime/index.d.ts +4 -4
  83. package/dist/realtime/rejection.d.ts +1 -1
  84. package/dist/realtime/request.d.ts +1 -1
  85. package/dist/realtime/socket.d.ts +2 -2
  86. package/dist/remote.d.ts +1 -1
  87. package/dist/remote.js +1 -1
  88. package/dist/server/bun.d.ts +3 -3
  89. package/dist/server/context-contribution.d.ts +1 -1
  90. package/dist/server/context.d.ts +4 -4
  91. package/dist/server/contract-stream.d.ts +2 -2
  92. package/dist/server/create.d.ts +1 -1
  93. package/dist/server/error-hook.d.ts +3 -3
  94. package/dist/server/file.d.ts +1 -1
  95. package/dist/server/implement.d.ts +2 -2
  96. package/dist/server/index.d.ts +31 -31
  97. package/dist/server/index.d.ts.map +1 -1
  98. package/dist/server/index.js +9 -9
  99. package/dist/server/lifecycle.d.ts +1 -1
  100. package/dist/server/logging.d.ts +1 -1
  101. package/dist/server/middleware/auth.d.ts +2 -2
  102. package/dist/server/multipart.d.ts +2 -2
  103. package/dist/server/node.d.ts +2 -2
  104. package/dist/server/openapi.d.ts +1 -1
  105. package/dist/server/process-signal-common.d.ts +1 -1
  106. package/dist/server/process-signals.d.ts +1 -1
  107. package/dist/server/realtime.d.ts +4 -4
  108. package/dist/server/response-metadata.d.ts +1 -1
  109. package/dist/server/router.d.ts +1 -1
  110. package/dist/server/shutdown.d.ts +1 -1
  111. package/dist/server/socket-io-node.d.ts +3 -3
  112. package/dist/server/socket-io.d.ts +6 -6
  113. package/dist/server/streaming-route.d.ts +2 -2
  114. package/dist/server/types.d.ts +6 -6
  115. package/dist/server/unix-client-body.d.ts +1 -1
  116. package/dist/server/unix-client-body.d.ts.map +1 -1
  117. package/dist/server/unix-client-bun.d.ts +1 -1
  118. package/dist/server/unix-client-bun.d.ts.map +1 -1
  119. package/dist/server/unix-client.d.ts +16 -5
  120. package/dist/server/unix-client.d.ts.map +1 -1
  121. package/dist/testing/agent-store-conformance.d.ts +1 -1
  122. package/dist/testing/managed-resource-conformance-contract.d.ts +1 -1
  123. package/dist/testing/managed-resource-conformance-driver.d.ts +2 -2
  124. package/dist/testing/managed-resource-conformance-scenarios.d.ts +2 -2
  125. package/dist/testing/managed-resource-conformance.d.ts +2 -2
  126. package/dist/testing/surface-conformance.d.ts +3 -3
  127. package/dist/testing/surface-manifest.d.ts +5 -5
  128. package/dist/testing.d.ts +8 -8
  129. package/dist/testing.js +1 -1
  130. package/dist/tool-invoker.d.ts +9 -0
  131. package/dist/tool-invoker.d.ts.map +1 -0
  132. package/dist/tool-invoker.js +16 -0
  133. package/dist/tools/agent.d.ts +4 -4
  134. package/dist/tools/async-operation.d.ts +3 -3
  135. package/dist/tools/cli-command.d.ts +3 -3
  136. package/dist/tools/cli-format.d.ts +1 -1
  137. package/dist/tools/cli-policy.d.ts +1 -1
  138. package/dist/tools/cli-wait.d.ts +1 -1
  139. package/dist/tools/cli.d.ts +7 -7
  140. package/dist/tools/define-download-tool.d.ts +4 -4
  141. package/dist/tools/define-upload-tool.d.ts +3 -3
  142. package/dist/tools/define-view-file-tool.d.ts +3 -3
  143. package/dist/tools/define-wait-tool.d.ts +2 -2
  144. package/dist/tools/download-core.d.ts +2 -2
  145. package/dist/tools/execute.d.ts +2 -2
  146. package/dist/tools/flatten-join.d.ts +1 -1
  147. package/dist/tools/internal/surface-projector.d.ts +3 -3
  148. package/dist/tools/invoker.d.ts +4 -4
  149. package/dist/tools/lifecycle.d.ts +1 -1
  150. package/dist/tools/list-names.d.ts +2 -2
  151. package/dist/tools/managed-file-error.d.ts +1 -1
  152. package/dist/tools/manifest.d.ts +3 -3
  153. package/dist/tools/mcp-handler.d.ts +4 -4
  154. package/dist/tools/mcp-prepare.d.ts +8 -8
  155. package/dist/tools/mcp-round-policy.d.ts +1 -1
  156. package/dist/tools/mcp-round.d.ts +3 -3
  157. package/dist/tools/mcp-stdio-signals.d.ts +2 -2
  158. package/dist/tools/mcp-stdio.d.ts +3 -3
  159. package/dist/tools/mcp.d.ts +7 -7
  160. package/dist/tools/mount-download.d.ts +1 -1
  161. package/dist/tools/mount-upload.d.ts +1 -1
  162. package/dist/tools/mount.d.ts +5 -5
  163. package/dist/tools/native-definition.d.ts +2 -2
  164. package/dist/tools/native-mcp.d.ts +3 -3
  165. package/dist/tools/oauth-metadata.d.ts +1 -1
  166. package/dist/tools/oauth-provider.d.ts +1 -1
  167. package/dist/tools/presentation.d.ts +1 -1
  168. package/dist/tools/remote.d.ts +3 -3
  169. package/dist/tools/runtime-tool.d.ts +2 -2
  170. package/dist/tools/surface.d.ts +5 -5
  171. package/dist/tools/tool-logger.d.ts +1 -1
  172. package/dist/tools/toolkit.d.ts +7 -7
  173. package/dist/tools/transports.d.ts +2 -2
  174. package/dist/tools/upload-core.d.ts +1 -1
  175. package/dist/tools/view-file.d.ts +1 -1
  176. package/dist/tools.d.ts +42 -42
  177. package/dist/tools.js +18 -61
  178. package/llms-full.txt +196 -20
  179. package/package.json +8 -4
  180. package/dist/{index-avjd67h6.js → index-cz32amcb.js} +3 -3
@@ -4,7 +4,7 @@
4
4
  * infinite TanStack Query data without changing its envelope metadata.
5
5
  */
6
6
  import type { QueryKey } from '@tanstack/react-query';
7
- import type { CacheBridgeHandler } from './cache-bridge';
7
+ import type { CacheBridgeHandler } from './cache-bridge.js';
8
8
  /** The `deleted` event may carry the whole entity or only its id. */
9
9
  export type DeletedPayload<TData> = TData | {
10
10
  id: string;
@@ -26,6 +26,27 @@ export type EntityCacheEvent<TData> = {
26
26
  /** A static cache key/prefix or an event-aware key factory. */
27
27
  export type EntityCacheKey<TData> = QueryKey | ((event: EntityCacheEvent<TData>) => QueryKey);
28
28
  export type EntityCacheListShape = 'array' | 'paginated' | 'infinite-array' | 'infinite-paginated';
29
+ export type EntityCacheMembership = 'include' | 'exclude' | 'unknown';
30
+ export interface EntityCacheMembershipPolicy<TData> {
31
+ /** Backend-equivalent membership for this exact cached query key. */
32
+ evaluate(event: EntityCacheEvent<TData>, queryKey: QueryKey): EntityCacheMembership;
33
+ /** What to do when the event cannot prove membership. Default `preserve`. */
34
+ unknown?: 'preserve' | 'invalidate';
35
+ }
36
+ export interface EntityCacheTotalDeltaInput<TData> {
37
+ event: EntityCacheEvent<TData>;
38
+ queryKey: QueryKey;
39
+ present: boolean;
40
+ membership: EntityCacheMembership;
41
+ }
42
+ export interface EntityCacheTotalPolicy<TData> {
43
+ /** Reconcile a numeric `total` field when the event proves a delta. */
44
+ mode: 'reconcile';
45
+ /** Override the conservative built-in delta when the event carries transition evidence. */
46
+ delta?(input: EntityCacheTotalDeltaInput<TData>): number | 'unknown';
47
+ /** What to do when an unseen id makes the delta unknowable. Default `preserve`. */
48
+ unknown?: 'preserve' | 'invalidate';
49
+ }
29
50
  /** List envelope, scoped key and explicit CRUD policies. */
30
51
  export interface EntityCacheListConfig<TData, TListItem> {
31
52
  /** Static query-key prefix or an event-aware scoped key factory. */
@@ -38,6 +59,10 @@ export interface EntityCacheListConfig<TData, TListItem> {
38
59
  compare?: (left: TListItem, right: TListItem) => number;
39
60
  /** Cached data envelope; no runtime shape inference is performed. */
40
61
  shape: EntityCacheListShape;
62
+ /** Optional per-query filter membership. Omit for the envelope-preserving legacy path. */
63
+ membership?: EntityCacheMembershipPolicy<TData>;
64
+ /** Optional reconciliation of a numeric paginated `total` field. */
65
+ total?: EntityCacheTotalPolicy<TData>;
41
66
  }
42
67
  /** Config for `createEntityCacheHandlers`. */
43
68
  export interface EntityCacheConfig<TData, TListItem = TData> {
@@ -1 +1 @@
1
- {"version":3,"file":"entity-cache.d.ts","sourceRoot":"","sources":["../../src/react/entity-cache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAgB,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGpE,OAAO,KAAK,EAAsB,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C;CACnC;AAED,0EAA0E;AAC1E,MAAM,WAAW,mBAAmB,CAAC,KAAK;IACxC,OAAO,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACnC,OAAO,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACnC,OAAO,EAAE,kBAAkB,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;CACpD;AAoQD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,SAAS,GAAG,KAAK,EAChE,MAAM,EAAE,iBAAiB,CAAC,KAAK,EAAE,SAAS,CAAC,GAC1C,mBAAmB,CAAC,KAAK,CAAC,CAyD5B"}
package/dist/react.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { type CacheBridge, type CacheBridgeConfig, type CacheBridgeContext, type CacheBridgeHandler, type CacheBridgeHandlers, type CacheBridgeSocket, createCacheBridge, } from './react/cache-bridge';
2
- export { type CursorQueryConfig, createCursorQuery } from './react/cursor-query';
3
- export { createEntityCacheHandlers, type DeletedPayload, type EntityCacheConfig, type EntityCacheEvent, type EntityCacheHandlers, type EntityCacheKey, type EntityCacheListConfig, type EntityCacheListShape, } from './react/entity-cache';
1
+ export { type CacheBridge, type CacheBridgeConfig, type CacheBridgeContext, type CacheBridgeHandler, type CacheBridgeHandlers, type CacheBridgeSocket, createCacheBridge, } from './react/cache-bridge.js';
2
+ export { type CursorQueryConfig, createCursorQuery } from './react/cursor-query.js';
3
+ export { createEntityCacheHandlers, type DeletedPayload, type EntityCacheConfig, type EntityCacheEvent, type EntityCacheHandlers, type EntityCacheKey, type EntityCacheListConfig, type EntityCacheListShape, type EntityCacheMembership, type EntityCacheMembershipPolicy, type EntityCacheTotalDeltaInput, type EntityCacheTotalPolicy, } from './react/entity-cache.js';
4
4
  //# sourceMappingURL=react.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EACL,yBAAyB,EACzB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EACL,yBAAyB,EACzB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,GAC5B,MAAM,sBAAsB,CAAC"}
package/dist/react.js CHANGED
@@ -104,20 +104,29 @@ function insertAt(items, item, at, compare) {
104
104
  function mutateItemArrays(arrays, mutation, config, getId) {
105
105
  const present = arrays.some((items) => items.some((item) => getId(item) === mutation.id));
106
106
  if (mutation.type === "created" && present)
107
- return arrays;
107
+ return { arrays, present };
108
108
  if (mutation.type === "updated" && !present && config.updateMissing === "skip") {
109
- return arrays;
109
+ return { arrays, present };
110
110
  }
111
111
  if (mutation.type !== "deleted" && (!present || mutation.type === "created")) {
112
112
  if (arrays.length === 0)
113
- return arrays;
113
+ return { arrays, present };
114
114
  const target = config.createAt === "start" ? 0 : arrays.length - 1;
115
- return arrays.map((items, index) => index === target ? insertAt(items, mutation.item, config.createAt, config.compare) : items);
115
+ return {
116
+ arrays: arrays.map((items, index) => index === target ? insertAt(items, mutation.item, config.createAt, config.compare) : items),
117
+ present
118
+ };
116
119
  }
117
120
  if (mutation.type === "deleted") {
118
- return arrays.map((items) => items.filter((item) => getId(item) !== mutation.id));
121
+ return {
122
+ arrays: arrays.map((items) => items.filter((item) => getId(item) !== mutation.id)),
123
+ present
124
+ };
119
125
  }
120
- return arrays.map((items) => ordered(items.map((item) => getId(item) === mutation.id ? mutation.item : item), config.compare));
126
+ return {
127
+ arrays: arrays.map((items) => ordered(items.map((item) => getId(item) === mutation.id ? mutation.item : item), config.compare)),
128
+ present
129
+ };
121
130
  }
122
131
  function firstArray(arrays) {
123
132
  const first = arrays[0];
@@ -125,51 +134,140 @@ function firstArray(arrays) {
125
134
  throw new Error("Entity cache list adapter lost its only item array");
126
135
  return first;
127
136
  }
137
+ function totalDelta(mutation, present, membership) {
138
+ if (mutation.type === "deleted") {
139
+ if (present)
140
+ return -1;
141
+ return "unknown";
142
+ }
143
+ if (membership === "unknown")
144
+ return "unknown";
145
+ if (mutation.type === "created") {
146
+ if (present)
147
+ return 0;
148
+ return membership === "include" ? 1 : 0;
149
+ }
150
+ if (present)
151
+ return membership === "exclude" ? -1 : 0;
152
+ return "unknown";
153
+ }
154
+ function reconcileTotal(value, delta) {
155
+ if (delta === "unknown")
156
+ return value;
157
+ if (!Number.isSafeInteger(delta)) {
158
+ throw new Error('Entity cache total delta must be a safe integer or "unknown"');
159
+ }
160
+ const current = Reflect.get(value, "total");
161
+ if (typeof current !== "number" || !Number.isSafeInteger(current) || current < 0) {
162
+ return value;
163
+ }
164
+ return { ...value, total: Math.max(0, current + delta) };
165
+ }
128
166
  function unsupportedListShape(shape) {
129
167
  throw new Error(`Unsupported entity cache list shape: ${String(shape)}`);
130
168
  }
131
- function patchList(context, key, config, mutation, getId) {
132
- const mutate = (arrays) => mutateItemArrays(arrays, mutation, config, getId);
133
- switch (config.shape) {
134
- case "array":
135
- context.queryClient.setQueriesData({ queryKey: key }, (old) => Array.isArray(old) ? firstArray(mutate([old])) : old);
136
- return;
137
- case "paginated":
138
- context.queryClient.setQueriesData({ queryKey: key }, (old) => isRecord(old) && Array.isArray(old.items) ? { ...old, items: firstArray(mutate([old.items])) } : old);
139
- return;
140
- case "infinite-array":
141
- context.queryClient.setQueriesData({ queryKey: key }, (old) => isRecord(old) && Array.isArray(old.pages) && old.pages.every((page) => Array.isArray(page)) ? { ...old, pages: mutate(old.pages) } : old);
142
- return;
143
- case "infinite-paginated":
144
- context.queryClient.setQueriesData({ queryKey: key }, (old) => {
145
- if (!isRecord(old) || !Array.isArray(old.pages) || !old.pages.every((page) => isRecord(page) && Array.isArray(page.items))) {
146
- return old;
147
- }
148
- const items = mutate(old.pages.map((page) => page.items));
149
- return {
150
- ...old,
151
- pages: old.pages.map((page, index) => {
152
- const pageItems = items[index];
153
- if (!pageItems) {
154
- throw new Error("Entity cache list adapter changed the page count");
155
- }
156
- return { ...page, items: pageItems };
157
- })
158
- };
159
- });
169
+ function patchList(context, key, config, event, mutation, getId) {
170
+ const queries = context.queryClient.getQueryCache().findAll({ queryKey: key });
171
+ const patchExact = (exactKey, membership) => {
172
+ const effectiveMutation = membership === "exclude" && mutation.type !== "deleted" ? { type: "deleted", id: mutation.id } : mutation;
173
+ const unknown = membership === "unknown";
174
+ if (unknown && mutation.type !== "deleted") {
175
+ if (config.membership?.unknown === "invalidate" || config.total?.unknown === "invalidate") {
176
+ context.queryClient.invalidateQueries({ queryKey: exactKey, exact: true });
177
+ }
160
178
  return;
161
- default:
162
- unsupportedListShape(config.shape);
179
+ }
180
+ let invalidateMembership = false;
181
+ const mutate = (arrays) => {
182
+ const result = mutateItemArrays(arrays, effectiveMutation, config, getId);
183
+ if (membership === "unknown" && mutation.type === "deleted" && !result.present && config.membership?.unknown === "invalidate") {
184
+ invalidateMembership = true;
185
+ }
186
+ return result;
187
+ };
188
+ let invalidateTotal = false;
189
+ const reconcile = (value, delta) => {
190
+ if (delta === "unknown" && config.total?.unknown === "invalidate") {
191
+ invalidateTotal = true;
192
+ }
193
+ return reconcileTotal(value, delta);
194
+ };
195
+ const invalidateIfNeeded = () => {
196
+ if (invalidateMembership || invalidateTotal) {
197
+ context.queryClient.invalidateQueries({ queryKey: exactKey, exact: true });
198
+ }
199
+ };
200
+ switch (config.shape) {
201
+ case "array":
202
+ context.queryClient.setQueryData(exactKey, (old) => Array.isArray(old) ? firstArray(mutate([old]).arrays) : old);
203
+ invalidateIfNeeded();
204
+ return;
205
+ case "paginated":
206
+ context.queryClient.setQueryData(exactKey, (old) => {
207
+ if (!isRecord(old) || !Array.isArray(old.items))
208
+ return old;
209
+ const result = mutate([old.items]);
210
+ const patched = { ...old, items: firstArray(result.arrays) };
211
+ const delta = config.total?.delta?.({
212
+ event,
213
+ queryKey: exactKey,
214
+ present: result.present,
215
+ membership
216
+ }) ?? totalDelta(mutation, result.present, membership);
217
+ return config.total ? reconcile(patched, delta) : patched;
218
+ });
219
+ invalidateIfNeeded();
220
+ return;
221
+ case "infinite-array":
222
+ context.queryClient.setQueryData(exactKey, (old) => isRecord(old) && Array.isArray(old.pages) && old.pages.every((page) => Array.isArray(page)) ? { ...old, pages: mutate(old.pages).arrays } : old);
223
+ invalidateIfNeeded();
224
+ return;
225
+ case "infinite-paginated":
226
+ context.queryClient.setQueryData(exactKey, (old) => {
227
+ if (!isRecord(old) || !Array.isArray(old.pages) || !old.pages.every((page) => isRecord(page) && Array.isArray(page.items))) {
228
+ return old;
229
+ }
230
+ const result = mutate(old.pages.map((page) => page.items));
231
+ const delta = config.total?.delta?.({
232
+ event,
233
+ queryKey: exactKey,
234
+ present: result.present,
235
+ membership
236
+ }) ?? totalDelta(mutation, result.present, membership);
237
+ return {
238
+ ...old,
239
+ pages: old.pages.map((page, index) => {
240
+ const pageItems = result.arrays[index];
241
+ if (!pageItems) {
242
+ throw new Error("Entity cache list adapter changed the page count");
243
+ }
244
+ const patched = { ...page, items: pageItems };
245
+ return config.total ? reconcile(patched, delta) : patched;
246
+ })
247
+ };
248
+ });
249
+ invalidateIfNeeded();
250
+ return;
251
+ default:
252
+ unsupportedListShape(config.shape);
253
+ }
254
+ };
255
+ for (const query of queries) {
256
+ const exactKey = query.queryKey;
257
+ patchExact(exactKey, config.membership?.evaluate(event, exactKey) ?? "include");
163
258
  }
164
259
  }
165
260
  function createEntityCacheHandlers(config) {
261
+ if (config.list.total && config.list.shape !== "paginated" && config.list.shape !== "infinite-paginated") {
262
+ throw new Error("Entity cache total policy requires a paginated list shape");
263
+ }
166
264
  const deletedId = config.getDeletedId ?? ((payload) => idOf(payload, config.getId));
167
265
  const apply = (event, mutation, context) => {
168
266
  const listKey = resolveKey(config.list.key, event);
169
267
  const detailKey = config.detailKey ? resolveKey(config.detailKey, event) : undefined;
170
268
  if (context.isFresh(detailKey ?? listKey))
171
269
  return false;
172
- patchList(context, listKey, config.list, mutation, config.getListItemId);
270
+ patchList(context, listKey, config.list, event, mutation, config.getListItemId);
173
271
  return true;
174
272
  };
175
273
  return {
@@ -1,5 +1,5 @@
1
1
  import type { z } from 'zod';
2
- import type { AppError } from '../contract/errors';
2
+ import type { AppError } from '../contract/errors.js';
3
3
  export interface RealtimeEventDefinition<TArgs extends z.ZodType<unknown[]> = z.ZodType<unknown[]>, TAck extends z.ZodType | undefined = z.ZodType | undefined> {
4
4
  args: TArgs;
5
5
  ack?: TAck;
@@ -1,5 +1,5 @@
1
- export { defineRealtimeContract, type InferRealtimeEventMap, type RealtimeAcknowledgedEvent, type RealtimeAcknowledgement, type RealtimeContract, type RealtimeEmitArguments, type RealtimeEventArguments, type RealtimeEventDefinition, type RealtimeEventHandler, type RealtimeEventRegistry, type RealtimeRejectDirection, type RealtimeRejectedEvent, type RealtimeRejectedEventHook, type RealtimeRequestArguments, } from './contract';
2
- export { asRealtimeRejection, REALTIME_REJECTION_KEY, type RealtimeRejectionEnvelope, type RealtimeRejectionIssue, type RealtimeRejectionReport, } from './rejected-frame';
3
- export { RealtimeRequestDisconnectedError, RealtimeRequestInvalidAcknowledgementError, type RealtimeRequestOptions, RealtimeRequestRejectedError, RealtimeRequestTimeoutError, } from './request';
4
- export type { ValidatedRealtimeSocket } from './socket';
1
+ export { defineRealtimeContract, type InferRealtimeEventMap, type RealtimeAcknowledgedEvent, type RealtimeAcknowledgement, type RealtimeContract, type RealtimeEmitArguments, type RealtimeEventArguments, type RealtimeEventDefinition, type RealtimeEventHandler, type RealtimeEventRegistry, type RealtimeRejectDirection, type RealtimeRejectedEvent, type RealtimeRejectedEventHook, type RealtimeRequestArguments, } from './contract.js';
2
+ export { asRealtimeRejection, REALTIME_REJECTION_KEY, type RealtimeRejectionEnvelope, type RealtimeRejectionIssue, type RealtimeRejectionReport, } from './rejected-frame.js';
3
+ export { RealtimeRequestDisconnectedError, RealtimeRequestInvalidAcknowledgementError, type RealtimeRequestOptions, RealtimeRequestRejectedError, RealtimeRequestTimeoutError, } from './request.js';
4
+ export type { ValidatedRealtimeSocket } from './socket.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { RealtimeRejectDirection, RealtimeRejectedEvent } from './contract';
1
+ import type { RealtimeRejectDirection, RealtimeRejectedEvent } from './contract.js';
2
2
  export declare function realtimeContractViolation(options: {
3
3
  event: string;
4
4
  direction: RealtimeRejectDirection;
@@ -1,4 +1,4 @@
1
- import type { RealtimeRejectionIssue } from './rejected-frame';
1
+ import type { RealtimeRejectionIssue } from './rejected-frame.js';
2
2
  export interface RealtimeRequestOptions {
3
3
  /** Maximum acknowledgement wait in milliseconds. Must be finite and > 0. */
4
4
  timeoutMs: number;
@@ -1,6 +1,6 @@
1
1
  import type { z } from 'zod';
2
- import type { StitchLogger } from '../logger';
3
- import type { RealtimeEmitArguments, RealtimeEventHandler, RealtimeEventRegistry, RealtimeRejectDirection, RealtimeRejectedEventHook } from './contract';
2
+ import type { StitchLogger } from '../logger.js';
3
+ import type { RealtimeEmitArguments, RealtimeEventHandler, RealtimeEventRegistry, RealtimeRejectDirection, RealtimeRejectedEventHook } from './contract.js';
4
4
  interface ValidatedRealtimeSocketOptions<TInbound extends RealtimeEventRegistry, TOutbound extends RealtimeEventRegistry> {
5
5
  target: object;
6
6
  inbound: TInbound;
package/dist/remote.d.ts CHANGED
@@ -5,5 +5,5 @@
5
5
  * own entrypoint lets CLI and other thin processes proxy a deployed API without
6
6
  * importing the MCP SDK or the AI SDK through the broad tools barrel.
7
7
  */
8
- export { type ImplementRemoteOptions, implementRemote } from './tools/remote';
8
+ export { type ImplementRemoteOptions, implementRemote } from './tools/remote.js';
9
9
  //# sourceMappingURL=remote.d.ts.map
package/dist/remote.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ApiError,
3
3
  createClient
4
- } from "./index-zd4v31v2.js";
4
+ } from "./index-2ve29dzn.js";
5
5
  import"./index-v5bayx1z.js";
6
6
  import {
7
7
  mergeMeta
@@ -1,6 +1,6 @@
1
- import { type ManagedServerHandle } from './shutdown';
2
- import type { SocketIOServerLifecycle } from './socket-io';
3
- import type { FetchComposition, FetchHandler, HandlerConfig, RawRoute, RawRouteContext } from './types';
1
+ import { type ManagedServerHandle } from './shutdown.js';
2
+ import type { SocketIOServerLifecycle } from './socket-io.js';
3
+ import type { FetchComposition, FetchHandler, HandlerConfig, RawRoute, RawRouteContext } from './types.js';
4
4
  /** The concrete `Bun.serve` server instance passed to Bun raw routes. */
5
5
  export type BunServer = ReturnType<typeof Bun.serve>;
6
6
  export type BunRawRoute = RawRoute<BunServer>;
@@ -1,4 +1,4 @@
1
- import type { RuntimeContext } from '../contract';
1
+ import type { RuntimeContext } from '../contract/index.js';
2
2
  /** Keys whose value is owned by a transport/runtime boundary, never by application enrichment. */
3
3
  export declare const RUNTIME_CONTEXT_RESERVED_KEYS: Set<string>;
4
4
  /**
@@ -2,10 +2,10 @@
2
2
  * `RuntimeContext` assembly — parses params / body / multipart against the
3
3
  * endpoint schemas and gathers request metadata (trace id, client info).
4
4
  */
5
- import { type RuntimeContext } from '../contract';
6
- import { type MultipartLifecycle } from './multipart';
7
- import { type ClientIpOptions } from './request';
8
- import type { AuthorizationContext, MethodDef } from './types';
5
+ import { type RuntimeContext } from '../contract/index.js';
6
+ import { type MultipartLifecycle } from './multipart.js';
7
+ import { type ClientIpOptions } from './request.js';
8
+ import type { AuthorizationContext, MethodDef } from './types.js';
9
9
  /**
10
10
  * Assemble everything knowable from the URL alone — path params, the request,
11
11
  * trace id and client info — **before** any schema parsing. Bound first so a
@@ -1,5 +1,5 @@
1
- import { type EndpointStreamDescriptor } from '../contract';
2
- import type { RawRouteContext } from './types';
1
+ import { type EndpointStreamDescriptor } from '../contract/index.js';
2
+ import type { RawRouteContext } from './types.js';
3
3
  /** Build the HTTP response for one contract-declared stream. */
4
4
  export declare function contractStreamResponse(request: Request, context: RawRouteContext, source: AsyncIterable<unknown>, descriptor: EndpointStreamDescriptor, operationAbort: AbortController): Promise<Response>;
5
5
  //# sourceMappingURL=contract-stream.d.ts.map
@@ -1,3 +1,3 @@
1
- import type { FetchHandler, HandlerConfig } from './types';
1
+ import type { FetchHandler, HandlerConfig } from './types.js';
2
2
  export declare function createHandler<TServer = unknown>(config: HandlerConfig<TServer>): FetchHandler<TServer>;
3
3
  //# sourceMappingURL=create.d.ts.map
@@ -35,9 +35,9 @@
35
35
  * createServer({ services, hooks: { onError } });
36
36
  * ```
37
37
  */
38
- import type { RuntimeContext } from '../contract';
39
- import { type StitchErrorCode } from '../contract';
40
- import type { LifecycleHooks, MethodDef } from './types';
38
+ import type { RuntimeContext } from '../contract/index.js';
39
+ import { type StitchErrorCode } from '../contract/index.js';
40
+ import type { LifecycleHooks, MethodDef } from './types.js';
41
41
  /** The normalised error handed to `render` — code already remapped. */
42
42
  export interface ResolvedError {
43
43
  /** Wire code — the app code from `codeMap` for a stitch error, else the thrown code. */
@@ -1,4 +1,4 @@
1
- import type { RawRoute } from './types';
1
+ import type { RawRoute } from './types.js';
2
2
  /**
3
3
  * Build a basic static-file route. URL-derived paths pass both lexical and
4
4
  * realpath containment checks, so an in-root symlink cannot escape `dir`.
@@ -1,6 +1,6 @@
1
1
  import type { ZodType } from 'zod';
2
- import type { ContractDef, EndpointDef, MultipartDescriptor, RuntimeContext } from '../contract';
3
- import type { EndpointHandlerContext, Handlers, MultipartReceiver, ScopeContexts, ScopedHandlers, ServiceDef, StreamingMultipartImplementation } from './types';
2
+ import type { ContractDef, EndpointDef, MultipartDescriptor, RuntimeContext } from '../contract/index.js';
3
+ import type { EndpointHandlerContext, Handlers, MultipartReceiver, ScopeContexts, ScopedHandlers, ServiceDef, StreamingMultipartImplementation } from './types.js';
4
4
  type StreamingEndpoint = EndpointDef & {
5
5
  multipart: MultipartDescriptor & {
6
6
  delivery: 'stream';
@@ -1,32 +1,32 @@
1
- export { AppError, appError, badRequest, conflict, forbidden, isStitchErrorCode, notFound, rateLimited, STITCH_ERROR_STATUS, type StitchErrorCode, unauthorized, } from '../contract';
2
- export { errorCode, formatZodError, normalizeError, type ZodIssueSummary, zodIssues, } from '../internal/errors';
3
- export { isWithinDir } from '../internal/within-dir';
4
- export { type BunFetchComposition as FetchComposition, type BunFetchHandler as FetchHandler, type BunHandlerConfig as HandlerConfig, type BunRawRoute as RawRoute, type BunRawRouteContext as RawRouteContext, type BunServer, type BunServerConfig, type BunServerHandle, createServer, type ServerPassthrough, type UnixListenConfig, } from './bun';
5
- export { type CacheOptions, cacheHeaders, createCache } from './cache';
6
- export { createHandler } from './create';
7
- export { createErrorHook, type ErrorHookConfig, type ResolvedError, } from './error-hook';
8
- export { createEventBus, type DefaultEventMap, type EventBus, type EventBusOptions, type EventHandler, } from './event-bus';
9
- export { type ByteRange, parseByteRange, type ServeFileOptions, serveFile, staticRoute, weakETag, } from './file';
10
- export { createImplement, createImplementRegistry, createMultipartStream, createScopedImplement, createScopedImplementRegistry, defineMultipartStream, type ExactRegistryHandlers, type ExactScopedRegistryHandlers, type ImplementationRegistry, implement, implementRegistry, type KeyedServices, type MultipartStreamConfig, type RegistryHandlers, type ScopedImplementationRegistry, type ScopedRegistryHandlers, type StreamScope, } from './implement';
11
- export { composeLifecycleHooks } from './lifecycle';
12
- export type { LogFormat } from './logger';
13
- export { type AuthHook, type AuthHookConfig, type AuthRule, type AuthRuleContribution, type AuthRules, type AuthScopes, type BearerResolverConfig, type ComposeAuthHooksConfig, type ComposedAuthScopes, composeAuthHooks, createAuthHook, createBearerResolver, extractToken, type JwtPayload, type RuleScopes, type ScopedAuthHook, type ScopedAuthRule, type SignJwtOptions, signJwt, type VerifyJwtOptions, verifyJwt, } from './middleware/auth';
14
- export { type CookieDef, type CookieOptions, defineCookie, parseCookies, serializeCookie, } from './middleware/cookies';
15
- export { type CorsConfig, corsHeaders, corsPreflightResponse, DEFAULT_CORS_ALLOW_HEADERS, DEFAULT_CORS_EXPOSE_HEADERS, } from './middleware/cors';
16
- export { deriveCodeChallenge, type PkceMethod, verifyPkce } from './middleware/pkce';
17
- export { type MultipartLifecycle, type MultipartResult, parseMultipart } from './multipart';
18
- export { generateOpenApiDocument, type OpenApiConfig, type OpenApiDocument, type OpenApiInfo, type OpenApiServer, openApiRoute, } from './openapi';
19
- export { bindProcessSignals, type ProcessSignalName, type ProcessSignalsBinding, type ProcessSignalsErrorPhase, type ProcessSignalsOptions, type ShutdownTarget, type SignalSource, } from './process-signals';
20
- export { createRateLimiter, type RateLimitConfig } from './rate-limit';
21
- export { errorResponse, parseBody, respondJson } from './raw';
22
- export { bindRealtimeServer, type RealtimeServer, type RealtimeServerConnection, type RealtimeServerHandle, } from './realtime';
23
- export { type ClientIpOptions, extractIp, generateTraceId, getClientInfo, resolveSocketIp, resolveTraceId, } from './request';
24
- export { type ManagedServerHandle, type ShutdownOptions, ShutdownOptionsSchema, type ShutdownResult, ShutdownResultSchema, type ShutdownState, ShutdownStateSchema, type ShutdownStatus, ShutdownStatusSchema, } from './shutdown';
25
- export type { SocketIOHandshakeConfig, SocketIOPeerLoaders, SocketIORequestPolicy, SocketIOServerConfig, SocketIOServerHandle, SocketIOServerLifecycle, } from './socket-io';
26
- export { createSocketIOServer, socketIoLane } from './socket-io';
27
- export { type ParseSSEOptions, parseSSE, streamSSE } from './stream';
28
- export { DEFAULT_STREAM_HEARTBEAT_MS, ndjsonRoute, type StreamingFormat, type StreamingRouteOptions, type StreamingSourceContext, sseRoute, streamingRoute, } from './streaming-route';
29
- export type { AuthorizationContext, EffectiveScope, EndpointHandlerContext, Handlers, LifecycleHooks, LoggingConfig, LogOutcome, MethodDef, MultipartFileMetadata, MultipartReceiver, MultipartReceiverResult, OperationIdentity, RouteGroup, ScopeContexts, ScopedHandlers, ServiceDef, StitchLogger, StreamingMultipartImplementation, } from './types';
30
- export { createUnixClientTransport, type UnixClientDeliveryState, type UnixClientTransport, type UnixClientTransportConfig, UnixClientTransportError, type UnixClientTransportErrorCode, } from './unix-client';
31
- export { type ComposedLane, composeWebSocketHandlers, type WebSocketComposeConfig, type WebSocketLane, webSocketLane, } from './websocket';
1
+ export { AppError, appError, badRequest, conflict, forbidden, isStitchErrorCode, notFound, rateLimited, STITCH_ERROR_STATUS, type StitchErrorCode, unauthorized, } from '../contract/index.js';
2
+ export { errorCode, formatZodError, normalizeError, type ZodIssueSummary, zodIssues, } from '../internal/errors.js';
3
+ export { isWithinDir } from '../internal/within-dir.js';
4
+ export { type BunFetchComposition as FetchComposition, type BunFetchHandler as FetchHandler, type BunHandlerConfig as HandlerConfig, type BunRawRoute as RawRoute, type BunRawRouteContext as RawRouteContext, type BunServer, type BunServerConfig, type BunServerHandle, createServer, type ServerPassthrough, type UnixListenConfig, } from './bun.js';
5
+ export { type CacheOptions, cacheHeaders, createCache } from './cache.js';
6
+ export { createHandler } from './create.js';
7
+ export { createErrorHook, type ErrorHookConfig, type ResolvedError, } from './error-hook.js';
8
+ export { createEventBus, type DefaultEventMap, type EventBus, type EventBusOptions, type EventHandler, } from './event-bus.js';
9
+ export { type ByteRange, parseByteRange, type ServeFileOptions, serveFile, staticRoute, weakETag, } from './file.js';
10
+ export { createImplement, createImplementRegistry, createMultipartStream, createScopedImplement, createScopedImplementRegistry, defineMultipartStream, type ExactRegistryHandlers, type ExactScopedRegistryHandlers, type ImplementationRegistry, implement, implementRegistry, type KeyedServices, type MultipartStreamConfig, type RegistryHandlers, type ScopedImplementationRegistry, type ScopedRegistryHandlers, type StreamScope, } from './implement.js';
11
+ export { composeLifecycleHooks } from './lifecycle.js';
12
+ export type { LogFormat } from './logger.js';
13
+ export { type AuthHook, type AuthHookConfig, type AuthRule, type AuthRuleContribution, type AuthRules, type AuthScopes, type BearerResolverConfig, type ComposeAuthHooksConfig, type ComposedAuthScopes, composeAuthHooks, createAuthHook, createBearerResolver, extractToken, type JwtPayload, type RuleScopes, type ScopedAuthHook, type ScopedAuthRule, type SignJwtOptions, signJwt, type VerifyJwtOptions, verifyJwt, } from './middleware/auth.js';
14
+ export { type CookieDef, type CookieOptions, defineCookie, parseCookies, serializeCookie, } from './middleware/cookies.js';
15
+ export { type CorsConfig, corsHeaders, corsPreflightResponse, DEFAULT_CORS_ALLOW_HEADERS, DEFAULT_CORS_EXPOSE_HEADERS, } from './middleware/cors.js';
16
+ export { deriveCodeChallenge, type PkceMethod, verifyPkce } from './middleware/pkce.js';
17
+ export { type MultipartLifecycle, type MultipartResult, parseMultipart } from './multipart.js';
18
+ export { generateOpenApiDocument, type OpenApiConfig, type OpenApiDocument, type OpenApiInfo, type OpenApiServer, openApiRoute, } from './openapi.js';
19
+ export { bindProcessSignals, type ProcessSignalName, type ProcessSignalsBinding, type ProcessSignalsErrorPhase, type ProcessSignalsOptions, type ShutdownTarget, type SignalSource, } from './process-signals.js';
20
+ export { createRateLimiter, type RateLimitConfig } from './rate-limit.js';
21
+ export { errorResponse, parseBody, respondJson } from './raw.js';
22
+ export { bindRealtimeServer, type RealtimeServer, type RealtimeServerConnection, type RealtimeServerHandle, } from './realtime.js';
23
+ export { type ClientIpOptions, extractIp, generateTraceId, getClientInfo, resolveSocketIp, resolveTraceId, } from './request.js';
24
+ export { type ManagedServerHandle, type ShutdownOptions, ShutdownOptionsSchema, type ShutdownResult, ShutdownResultSchema, type ShutdownState, ShutdownStateSchema, type ShutdownStatus, ShutdownStatusSchema, } from './shutdown.js';
25
+ export type { SocketIOHandshakeConfig, SocketIOPeerLoaders, SocketIORequestPolicy, SocketIOServerConfig, SocketIOServerHandle, SocketIOServerLifecycle, } from './socket-io.js';
26
+ export { createSocketIOServer, socketIoLane } from './socket-io.js';
27
+ export { type ParseSSEOptions, parseSSE, streamSSE } from './stream.js';
28
+ export { DEFAULT_STREAM_HEARTBEAT_MS, ndjsonRoute, type StreamingFormat, type StreamingRouteOptions, type StreamingSourceContext, sseRoute, streamingRoute, } from './streaming-route.js';
29
+ export type { AuthorizationContext, EffectiveScope, EndpointHandlerContext, Handlers, LifecycleHooks, LoggingConfig, LogOutcome, MethodDef, MultipartFileMetadata, MultipartReceiver, MultipartReceiverResult, OperationIdentity, RouteGroup, ScopeContexts, ScopedHandlers, ServiceDef, StitchLogger, StreamingMultipartImplementation, } from './types.js';
30
+ export { createUnixClientTransport, type UnixClientDeliveryState, type UnixClientTransport, type UnixClientTransportConfig, UnixClientTransportError, type UnixClientTransportErrorCode, type UnixResponseBodyMode, } from './unix-client.js';
31
+ export { type ComposedLane, composeWebSocketHandlers, type WebSocketComposeConfig, type WebSocketLane, webSocketLane, } from './websocket.js';
32
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,SAAS,EACT,iBAAiB,EACj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GACjC,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,yBAAyB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,wBAAwB,EACxB,KAAK,4BAA4B,GAClC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,YAAY,EACjB,wBAAwB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,aAAa,GACd,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,KAAK,eAAe,EACpB,YAAY,GACb,MAAM,aAAa,CAAC;AAIrB,OAAO,EACL,SAAS,EACT,cAAc,EACd,cAAc,EACd,KAAK,eAAe,EACpB,SAAS,GACV,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,KAAK,mBAAmB,IAAI,gBAAgB,EAC5C,KAAK,eAAe,IAAI,YAAY,EACpC,KAAK,gBAAgB,IAAI,aAAa,EACtC,KAAK,WAAW,IAAI,QAAQ,EAC5B,KAAK,kBAAkB,IAAI,eAAe,EAC1C,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,YAAY,EACZ,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,cAAc,EACd,KAAK,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AE,KAAK,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EACL,2BAA2B,EAC3B,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,QAAQ,EACR,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,UAAU,EACV,SAAS,EACT,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,cAAc,EACd,UAAU,EACV,YAAY,EACZ,gCAAgC,GACjC,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,yBAAyB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,wBAAwB,EACxB,KAAK,4BAA4B,EACjC,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,YAAY,EACjB,wBAAwB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,aAAa,GACd,MAAM,aAAa,CAAC"}
@@ -13,7 +13,7 @@ import {
13
13
  sseRoute,
14
14
  streamingRoute,
15
15
  webSocketLane
16
- } from "../index-nymn7wbg.js";
16
+ } from "../index-3vq6we8m.js";
17
17
  import {
18
18
  composeAuthHooks,
19
19
  createAuthHook,
@@ -41,6 +41,14 @@ import {
41
41
  implement,
42
42
  implementRegistry
43
43
  } from "../index-pr0qsmjy.js";
44
+ import {
45
+ extractIp,
46
+ generateTraceId,
47
+ getClientInfo,
48
+ getTraceId,
49
+ resolveSocketIp,
50
+ resolveTraceId
51
+ } from "../index-69m2278y.js";
44
52
  import {
45
53
  isWithinDir,
46
54
  realPathWithinDir
@@ -62,14 +70,6 @@ import {
62
70
  parseSSE,
63
71
  streamSSE
64
72
  } from "../index-v5bayx1z.js";
65
- import {
66
- extractIp,
67
- generateTraceId,
68
- getClientInfo,
69
- getTraceId,
70
- resolveSocketIp,
71
- resolveTraceId
72
- } from "../index-69m2278y.js";
73
73
  import {
74
74
  DEFAULT_CONTRACT_STREAM_FRAME_BYTES,
75
75
  errorCode,
@@ -1,4 +1,4 @@
1
- import type { LifecycleHooks } from './types';
1
+ import type { LifecycleHooks } from './types.js';
2
2
  /** Compose ordinary HTTP lifecycle hooks inside each existing phase slot. */
3
3
  export declare function composeLifecycleHooks(...hooks: readonly (LifecycleHooks | undefined)[]): LifecycleHooks;
4
4
  //# sourceMappingURL=lifecycle.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { LoggingConfig, LogOutcome } from './types';
1
+ import type { LoggingConfig, LogOutcome } from './types.js';
2
2
  /**
3
3
  * Normalise `logging` into either a config or `null` (off). `true` is shorthand
4
4
  * for `{}`: any object turns logging on, and `logger` decides which sink writes.
@@ -1,5 +1,5 @@
1
- import type { RuntimeContext } from '../../contract';
2
- import type { AuthorizationContext, OperationIdentity } from '../types';
1
+ import type { RuntimeContext } from '../../contract/index.js';
2
+ import type { AuthorizationContext, OperationIdentity } from '../types.js';
3
3
  export interface JwtPayload {
4
4
  [key: string]: unknown;
5
5
  }
@@ -1,5 +1,5 @@
1
- import type { MultipartDescriptor } from '../contract';
2
- import type { MultipartReceiver } from './types';
1
+ import type { MultipartDescriptor } from '../contract/index.js';
2
+ import type { MultipartReceiver } from './types.js';
3
3
  export interface MultipartLifecycle {
4
4
  rollback(): Promise<void>;
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import type { Server as HttpServer } from 'node:http';
2
2
  import { serve } from 'srvx/node';
3
- import { type ManagedServerHandle } from './shutdown';
4
- import type { FetchComposition, HandlerConfig } from './types';
3
+ import { type ManagedServerHandle } from './shutdown.js';
4
+ import type { FetchComposition, HandlerConfig } from './types.js';
5
5
  export interface NodeSocketLifecycle {
6
6
  attach(server: HttpServer): void;
7
7
  beginShutdown(): void;
@@ -10,7 +10,7 @@
10
10
  * emits — not a divergent code path. Schemas are inlined (valid OpenAPI);
11
11
  * `$ref` de-duplication can come later if a spec grows unwieldy.
12
12
  */
13
- import type { MethodDef, RawRoute, ServiceDef } from './types';
13
+ import type { MethodDef, RawRoute, ServiceDef } from './types.js';
14
14
  export interface OpenApiInfo {
15
15
  title: string;
16
16
  version: string;