@ontrails/core 1.0.0-beta.2 → 1.0.0-beta.21

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 (245) hide show
  1. package/CHANGELOG.md +283 -5
  2. package/README.md +113 -33
  3. package/package.json +11 -1
  4. package/src/activation-provenance.ts +111 -0
  5. package/src/activation-source-compatibility.ts +430 -0
  6. package/src/activation-source-projection.ts +221 -0
  7. package/src/activation-source.ts +91 -0
  8. package/src/blob-ref.ts +51 -0
  9. package/src/branded.ts +1 -1
  10. package/src/compose-batch.ts +69 -0
  11. package/src/compose-schema.ts +36 -0
  12. package/src/context.ts +44 -10
  13. package/src/contour.ts +346 -0
  14. package/src/derive.ts +59 -18
  15. package/src/detours.ts +8 -0
  16. package/src/draft.ts +342 -0
  17. package/src/error-projection.ts +51 -0
  18. package/src/errors.ts +309 -48
  19. package/src/execute.ts +1577 -0
  20. package/src/fire.ts +1169 -0
  21. package/src/index.ts +477 -32
  22. package/src/internal/fork-ctx.ts +69 -0
  23. package/src/layer-projection.ts +193 -0
  24. package/src/layer.ts +43 -6
  25. package/src/observe.ts +361 -0
  26. package/src/path-security.ts +1 -1
  27. package/src/permits.ts +12 -0
  28. package/src/redaction/patterns.ts +6 -3
  29. package/src/resilience.ts +11 -11
  30. package/src/resource-config.ts +792 -0
  31. package/src/resource.ts +194 -0
  32. package/src/result.ts +36 -4
  33. package/src/run.ts +76 -0
  34. package/src/schedule-runtime.ts +689 -0
  35. package/src/schedule.ts +326 -0
  36. package/src/serialization.ts +119 -39
  37. package/src/signal-diagnostics.ts +633 -0
  38. package/src/signal-ref.ts +87 -0
  39. package/src/signal.ts +104 -0
  40. package/src/store/accessor-protocol.ts +56 -0
  41. package/src/store/index.ts +4 -0
  42. package/src/structured-examples.ts +248 -0
  43. package/src/surface-derivation.ts +91 -0
  44. package/src/surface-filter.ts +176 -0
  45. package/src/surface-versioning.ts +42 -0
  46. package/src/topo.ts +769 -57
  47. package/src/tracing.ts +345 -0
  48. package/src/trail.ts +1161 -29
  49. package/src/trails/derive-trail.ts +842 -0
  50. package/src/trails/index.ts +9 -0
  51. package/src/trails/ingest.ts +139 -0
  52. package/src/trails-db.ts +208 -0
  53. package/src/transport-error-map.ts +174 -0
  54. package/src/type-utils.ts +87 -0
  55. package/src/types.ts +254 -12
  56. package/src/validate-established-topo.ts +69 -0
  57. package/src/validate-topo.ts +442 -35
  58. package/src/validation.ts +152 -4
  59. package/src/version-marker.ts +716 -0
  60. package/src/version-resolution.ts +308 -0
  61. package/src/version-runtime.ts +120 -0
  62. package/src/webhook.ts +278 -0
  63. package/src/workspace.ts +1 -1
  64. package/src/zod-wrappers.ts +72 -0
  65. package/.turbo/turbo-build.log +0 -1
  66. package/.turbo/turbo-lint.log +0 -3
  67. package/.turbo/turbo-typecheck.log +0 -1
  68. package/dist/adapters.d.ts +0 -39
  69. package/dist/adapters.d.ts.map +0 -1
  70. package/dist/adapters.js +0 -2
  71. package/dist/adapters.js.map +0 -1
  72. package/dist/blob-ref.d.ts +0 -20
  73. package/dist/blob-ref.d.ts.map +0 -1
  74. package/dist/blob-ref.js +0 -22
  75. package/dist/blob-ref.js.map +0 -1
  76. package/dist/branded.d.ts +0 -36
  77. package/dist/branded.d.ts.map +0 -1
  78. package/dist/branded.js +0 -89
  79. package/dist/branded.js.map +0 -1
  80. package/dist/collections.d.ts +0 -31
  81. package/dist/collections.d.ts.map +0 -1
  82. package/dist/collections.js +0 -60
  83. package/dist/collections.js.map +0 -1
  84. package/dist/context.d.ts +0 -10
  85. package/dist/context.d.ts.map +0 -1
  86. package/dist/context.js +0 -15
  87. package/dist/context.js.map +0 -1
  88. package/dist/derive.d.ts +0 -33
  89. package/dist/derive.d.ts.map +0 -1
  90. package/dist/derive.js +0 -122
  91. package/dist/derive.js.map +0 -1
  92. package/dist/errors.d.ts +0 -83
  93. package/dist/errors.d.ts.map +0 -1
  94. package/dist/errors.js +0 -142
  95. package/dist/errors.js.map +0 -1
  96. package/dist/event.d.ts +0 -45
  97. package/dist/event.d.ts.map +0 -1
  98. package/dist/event.js +0 -17
  99. package/dist/event.js.map +0 -1
  100. package/dist/fetch.d.ts +0 -15
  101. package/dist/fetch.d.ts.map +0 -1
  102. package/dist/fetch.js +0 -102
  103. package/dist/fetch.js.map +0 -1
  104. package/dist/guards.d.ts +0 -17
  105. package/dist/guards.d.ts.map +0 -1
  106. package/dist/guards.js +0 -25
  107. package/dist/guards.js.map +0 -1
  108. package/dist/health.d.ts +0 -18
  109. package/dist/health.d.ts.map +0 -1
  110. package/dist/health.js +0 -5
  111. package/dist/health.js.map +0 -1
  112. package/dist/hike.d.ts +0 -36
  113. package/dist/hike.d.ts.map +0 -1
  114. package/dist/hike.js +0 -20
  115. package/dist/hike.js.map +0 -1
  116. package/dist/index.d.ts +0 -34
  117. package/dist/index.d.ts.map +0 -1
  118. package/dist/index.js +0 -38
  119. package/dist/index.js.map +0 -1
  120. package/dist/job.d.ts +0 -24
  121. package/dist/job.d.ts.map +0 -1
  122. package/dist/job.js +0 -17
  123. package/dist/job.js.map +0 -1
  124. package/dist/layer.d.ts +0 -17
  125. package/dist/layer.d.ts.map +0 -1
  126. package/dist/layer.js +0 -21
  127. package/dist/layer.js.map +0 -1
  128. package/dist/path-security.d.ts +0 -28
  129. package/dist/path-security.d.ts.map +0 -1
  130. package/dist/path-security.js +0 -63
  131. package/dist/path-security.js.map +0 -1
  132. package/dist/patterns/bulk.d.ts +0 -15
  133. package/dist/patterns/bulk.d.ts.map +0 -1
  134. package/dist/patterns/bulk.js +0 -14
  135. package/dist/patterns/bulk.js.map +0 -1
  136. package/dist/patterns/change.d.ts +0 -10
  137. package/dist/patterns/change.d.ts.map +0 -1
  138. package/dist/patterns/change.js +0 -10
  139. package/dist/patterns/change.js.map +0 -1
  140. package/dist/patterns/date-range.d.ts +0 -10
  141. package/dist/patterns/date-range.d.ts.map +0 -1
  142. package/dist/patterns/date-range.js +0 -10
  143. package/dist/patterns/date-range.js.map +0 -1
  144. package/dist/patterns/index.d.ts +0 -9
  145. package/dist/patterns/index.d.ts.map +0 -1
  146. package/dist/patterns/index.js +0 -9
  147. package/dist/patterns/index.js.map +0 -1
  148. package/dist/patterns/pagination.d.ts +0 -18
  149. package/dist/patterns/pagination.d.ts.map +0 -1
  150. package/dist/patterns/pagination.js +0 -18
  151. package/dist/patterns/pagination.js.map +0 -1
  152. package/dist/patterns/progress.d.ts +0 -11
  153. package/dist/patterns/progress.d.ts.map +0 -1
  154. package/dist/patterns/progress.js +0 -11
  155. package/dist/patterns/progress.js.map +0 -1
  156. package/dist/patterns/sorting.d.ts +0 -13
  157. package/dist/patterns/sorting.d.ts.map +0 -1
  158. package/dist/patterns/sorting.js +0 -10
  159. package/dist/patterns/sorting.js.map +0 -1
  160. package/dist/patterns/status.d.ts +0 -15
  161. package/dist/patterns/status.d.ts.map +0 -1
  162. package/dist/patterns/status.js +0 -9
  163. package/dist/patterns/status.js.map +0 -1
  164. package/dist/patterns/timestamps.d.ts +0 -10
  165. package/dist/patterns/timestamps.d.ts.map +0 -1
  166. package/dist/patterns/timestamps.js +0 -10
  167. package/dist/patterns/timestamps.js.map +0 -1
  168. package/dist/redaction/index.d.ts +0 -4
  169. package/dist/redaction/index.d.ts.map +0 -1
  170. package/dist/redaction/index.js +0 -3
  171. package/dist/redaction/index.js.map +0 -1
  172. package/dist/redaction/patterns.d.ts +0 -9
  173. package/dist/redaction/patterns.d.ts.map +0 -1
  174. package/dist/redaction/patterns.js +0 -39
  175. package/dist/redaction/patterns.js.map +0 -1
  176. package/dist/redaction/redactor.d.ts +0 -27
  177. package/dist/redaction/redactor.d.ts.map +0 -1
  178. package/dist/redaction/redactor.js +0 -89
  179. package/dist/redaction/redactor.js.map +0 -1
  180. package/dist/resilience.d.ts +0 -34
  181. package/dist/resilience.d.ts.map +0 -1
  182. package/dist/resilience.js +0 -164
  183. package/dist/resilience.js.map +0 -1
  184. package/dist/result.d.ts +0 -57
  185. package/dist/result.d.ts.map +0 -1
  186. package/dist/result.js +0 -145
  187. package/dist/result.js.map +0 -1
  188. package/dist/serialization.d.ts +0 -27
  189. package/dist/serialization.d.ts.map +0 -1
  190. package/dist/serialization.js +0 -115
  191. package/dist/serialization.js.map +0 -1
  192. package/dist/topo.d.ts +0 -18
  193. package/dist/topo.d.ts.map +0 -1
  194. package/dist/topo.js +0 -74
  195. package/dist/topo.js.map +0 -1
  196. package/dist/trail.d.ts +0 -83
  197. package/dist/trail.d.ts.map +0 -1
  198. package/dist/trail.js +0 -16
  199. package/dist/trail.js.map +0 -1
  200. package/dist/types.d.ts +0 -46
  201. package/dist/types.d.ts.map +0 -1
  202. package/dist/types.js +0 -2
  203. package/dist/types.js.map +0 -1
  204. package/dist/validate-topo.d.ts +0 -24
  205. package/dist/validate-topo.d.ts.map +0 -1
  206. package/dist/validate-topo.js +0 -108
  207. package/dist/validate-topo.js.map +0 -1
  208. package/dist/validation.d.ts +0 -27
  209. package/dist/validation.d.ts.map +0 -1
  210. package/dist/validation.js +0 -134
  211. package/dist/validation.js.map +0 -1
  212. package/dist/workspace.d.ts +0 -25
  213. package/dist/workspace.d.ts.map +0 -1
  214. package/dist/workspace.js +0 -57
  215. package/dist/workspace.js.map +0 -1
  216. package/src/__tests__/blob-ref.test.ts +0 -103
  217. package/src/__tests__/branded.test.ts +0 -148
  218. package/src/__tests__/collections.test.ts +0 -126
  219. package/src/__tests__/context.test.ts +0 -66
  220. package/src/__tests__/derive.test.ts +0 -159
  221. package/src/__tests__/errors.test.ts +0 -309
  222. package/src/__tests__/event.test.ts +0 -82
  223. package/src/__tests__/fetch.test.ts +0 -217
  224. package/src/__tests__/guards.test.ts +0 -102
  225. package/src/__tests__/hike.test.ts +0 -117
  226. package/src/__tests__/job.test.ts +0 -98
  227. package/src/__tests__/layer.test.ts +0 -224
  228. package/src/__tests__/path-security.test.ts +0 -114
  229. package/src/__tests__/patterns.test.ts +0 -273
  230. package/src/__tests__/redaction.test.ts +0 -244
  231. package/src/__tests__/resilience.test.ts +0 -246
  232. package/src/__tests__/result.test.ts +0 -155
  233. package/src/__tests__/serialization.test.ts +0 -236
  234. package/src/__tests__/topo.test.ts +0 -184
  235. package/src/__tests__/trail.test.ts +0 -179
  236. package/src/__tests__/validate-topo.test.ts +0 -201
  237. package/src/__tests__/validation.test.ts +0 -283
  238. package/src/__tests__/workspace.test.ts +0 -183
  239. package/src/adapters.ts +0 -68
  240. package/src/event.ts +0 -77
  241. package/src/health.ts +0 -23
  242. package/src/hike.ts +0 -77
  243. package/src/job.ts +0 -20
  244. package/tsconfig.json +0 -9
  245. package/tsconfig.tsbuildinfo +0 -1
package/dist/errors.d.ts DELETED
@@ -1,83 +0,0 @@
1
- /**
2
- * Error taxonomy for @ontrails/core
3
- *
4
- * Provides a structured error hierarchy with category-based mapping
5
- * to exit codes, HTTP status codes, and JSON-RPC error codes.
6
- */
7
- export type ErrorCategory = 'validation' | 'not_found' | 'conflict' | 'permission' | 'timeout' | 'rate_limit' | 'network' | 'internal' | 'auth' | 'cancelled';
8
- export declare abstract class TrailsError extends Error {
9
- abstract readonly category: ErrorCategory;
10
- abstract readonly retryable: boolean;
11
- readonly context?: Record<string, unknown> | undefined;
12
- constructor(message: string, options?: {
13
- cause?: Error;
14
- context?: Record<string, unknown>;
15
- });
16
- }
17
- export declare class ValidationError extends TrailsError {
18
- readonly category: "validation";
19
- readonly retryable: false;
20
- }
21
- export declare class AmbiguousError extends TrailsError {
22
- readonly category: "validation";
23
- readonly retryable: false;
24
- }
25
- export declare class AssertionError extends TrailsError {
26
- readonly category: "internal";
27
- readonly retryable: false;
28
- }
29
- export declare class NotFoundError extends TrailsError {
30
- readonly category: "not_found";
31
- readonly retryable: false;
32
- }
33
- export declare class AlreadyExistsError extends TrailsError {
34
- readonly category: "conflict";
35
- readonly retryable: false;
36
- }
37
- export declare class ConflictError extends TrailsError {
38
- readonly category: "conflict";
39
- readonly retryable: false;
40
- }
41
- export declare class PermissionError extends TrailsError {
42
- readonly category: "permission";
43
- readonly retryable: false;
44
- }
45
- export declare class TimeoutError extends TrailsError {
46
- readonly category: "timeout";
47
- readonly retryable: true;
48
- }
49
- export declare class RateLimitError extends TrailsError {
50
- readonly category: "rate_limit";
51
- readonly retryable: true;
52
- readonly retryAfter?: number | undefined;
53
- constructor(message: string, options?: {
54
- cause?: Error;
55
- context?: Record<string, unknown>;
56
- retryAfter?: number;
57
- });
58
- }
59
- export declare class NetworkError extends TrailsError {
60
- readonly category: "network";
61
- readonly retryable: true;
62
- }
63
- export declare class InternalError extends TrailsError {
64
- readonly category: "internal";
65
- readonly retryable: false;
66
- }
67
- export declare class AuthError extends TrailsError {
68
- readonly category: "auth";
69
- readonly retryable: false;
70
- }
71
- export declare class CancelledError extends TrailsError {
72
- readonly category: "cancelled";
73
- readonly retryable: false;
74
- }
75
- export declare const exitCodeMap: Record<ErrorCategory, number>;
76
- export declare const statusCodeMap: Record<ErrorCategory, number>;
77
- export declare const jsonRpcCodeMap: Record<ErrorCategory, number>;
78
- export declare const retryableMap: Record<ErrorCategory, boolean>;
79
- /** Type guard: narrows unknown to TrailsError */
80
- export declare const isTrailsError: (error?: unknown) => error is TrailsError;
81
- /** Returns true if the error is retryable (TrailsError with retryable category). */
82
- export declare const isRetryable: (error: Error) => boolean;
83
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAMH,MAAM,MAAM,aAAa,GACrB,YAAY,GACZ,WAAW,GACX,UAAU,GACV,YAAY,GACZ,SAAS,GACT,YAAY,GACZ,SAAS,GACT,UAAU,GACV,MAAM,GACN,WAAW,CAAC;AAMhB,8BAAsB,WAAY,SAAQ,KAAK;IAC7C,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IAC1C,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,OAAO,CAAC,EAAE,M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Q,OAAO,KAAG,KAAK,IAAI,WAC3B,CAAC;AAE/B,oFAAoF;AACpF,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,KAAG,OAK1C,CAAC"}
package/dist/errors.js DELETED
@@ -1,142 +0,0 @@
1
- /* oxlint-disable max-classes-per-file -- error taxonomy requires co-located class definitions */
2
- /**
3
- * Error taxonomy for @ontrails/core
4
- *
5
- * Provides a structured error hierarchy with category-based mapping
6
- * to exit codes, HTTP status codes, and JSON-RPC error codes.
7
- */
8
- // ---------------------------------------------------------------------------
9
- // Base class
10
- // ---------------------------------------------------------------------------
11
- export class TrailsError extends Error {
12
- context;
13
- constructor(message, options) {
14
- super(message, { cause: options?.cause });
15
- this.name = this.constructor.name;
16
- this.context = options?.context;
17
- }
18
- }
19
- // ---------------------------------------------------------------------------
20
- // Concrete error classes
21
- // ---------------------------------------------------------------------------
22
- export class ValidationError extends TrailsError {
23
- category = 'validation';
24
- retryable = false;
25
- }
26
- export class AmbiguousError extends TrailsError {
27
- category = 'validation';
28
- retryable = false;
29
- }
30
- export class AssertionError extends TrailsError {
31
- category = 'internal';
32
- retryable = false;
33
- }
34
- export class NotFoundError extends TrailsError {
35
- category = 'not_found';
36
- retryable = false;
37
- }
38
- export class AlreadyExistsError extends TrailsError {
39
- category = 'conflict';
40
- retryable = false;
41
- }
42
- export class ConflictError extends TrailsError {
43
- category = 'conflict';
44
- retryable = false;
45
- }
46
- export class PermissionError extends TrailsError {
47
- category = 'permission';
48
- retryable = false;
49
- }
50
- export class TimeoutError extends TrailsError {
51
- category = 'timeout';
52
- retryable = true;
53
- }
54
- export class RateLimitError extends TrailsError {
55
- category = 'rate_limit';
56
- retryable = true;
57
- retryAfter;
58
- constructor(message, options) {
59
- super(message, options);
60
- this.retryAfter = options?.retryAfter;
61
- }
62
- }
63
- export class NetworkError extends TrailsError {
64
- category = 'network';
65
- retryable = true;
66
- }
67
- export class InternalError extends TrailsError {
68
- category = 'internal';
69
- retryable = false;
70
- }
71
- export class AuthError extends TrailsError {
72
- category = 'auth';
73
- retryable = false;
74
- }
75
- export class CancelledError extends TrailsError {
76
- category = 'cancelled';
77
- retryable = false;
78
- }
79
- // ---------------------------------------------------------------------------
80
- // Taxonomy maps
81
- // ---------------------------------------------------------------------------
82
- export const exitCodeMap = {
83
- auth: 9,
84
- cancelled: 130,
85
- conflict: 3,
86
- internal: 8,
87
- network: 7,
88
- not_found: 2,
89
- permission: 4,
90
- rate_limit: 6,
91
- timeout: 5,
92
- validation: 1,
93
- };
94
- export const statusCodeMap = {
95
- auth: 401,
96
- cancelled: 499,
97
- conflict: 409,
98
- internal: 500,
99
- network: 502,
100
- not_found: 404,
101
- permission: 403,
102
- rate_limit: 429,
103
- timeout: 504,
104
- validation: 400,
105
- };
106
- export const jsonRpcCodeMap = {
107
- auth: -32_600,
108
- cancelled: -32_603,
109
- conflict: -32_603,
110
- internal: -32_603,
111
- network: -32_603,
112
- not_found: -32_601,
113
- permission: -32_600,
114
- rate_limit: -32_603,
115
- timeout: -32_603,
116
- validation: -32_602,
117
- };
118
- export const retryableMap = {
119
- auth: false,
120
- cancelled: false,
121
- conflict: false,
122
- internal: false,
123
- network: true,
124
- not_found: false,
125
- permission: false,
126
- rate_limit: true,
127
- timeout: true,
128
- validation: false,
129
- };
130
- // ---------------------------------------------------------------------------
131
- // Helper functions
132
- // ---------------------------------------------------------------------------
133
- /** Type guard: narrows unknown to TrailsError */
134
- export const isTrailsError = (error) => error instanceof TrailsError;
135
- /** Returns true if the error is retryable (TrailsError with retryable category). */
136
- export const isRetryable = (error) => {
137
- if (isTrailsError(error)) {
138
- return retryableMap[error.category];
139
- }
140
- return false;
141
- };
142
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG;;;;;GAKG;AAkBH,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E,MAAM,OAAgB,WAAY,SAAQ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ACP,CAAC;AAEX,MAAM,CAAC,MAAM,cAAc,GAAkC;IAC3D,IAAI,EAAE,CAAC,MAAM;IACb,SAAS,EAAE,CAAC,MAAM;IAClB,QAAQ,EAAE,CAAC,MAAM;IACjB,QAAQ,EAAE,CAAC,MAAM;IACjB,OAAO,EAAE,CAAC,MAAM;IAChB,SAAS,EAAE,CAAC,MAAM;IAClB,UAAU,EAAE,CAAC,MAAM;IACnB,UAAU,EAAE,CAAC,MAAM;IACnB,OAAO,EAAE,CAAC,MAAM;IAChB,UAAU,EAAE,CAAC,MAAM;CACX,CAAC;AAEX,MAAM,CAAC,MAAM,YAAY,GAAmC;IAC1D,IAAI,EAAE,KAAK;IACX,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,KAAK;CACT,CAAC;AAEX,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,iDAAiD;AACjD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAe,EAAwB,EAAE,CACrE,KAAK,YAAY,WAAW,CAAC;AAE/B,oFAAoF;AACpF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAY,EAAW,EAAE;IACnD,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
package/dist/event.d.ts DELETED
@@ -1,45 +0,0 @@
1
- /**
2
- * Event — a named payload schema with optional provenance metadata.
3
- */
4
- import type { z } from 'zod';
5
- export interface EventSpec<T> {
6
- readonly payload: z.ZodType<T>;
7
- readonly description?: string | undefined;
8
- readonly markers?: Readonly<Record<string, unknown>> | undefined;
9
- /** Trail IDs that produce this event (e.g. the trails it originates from). */
10
- readonly from?: readonly string[] | undefined;
11
- }
12
- export interface Event<T> {
13
- readonly id: string;
14
- readonly kind: 'event';
15
- readonly payload: z.ZodType<T>;
16
- readonly description?: string | undefined;
17
- readonly markers?: Readonly<Record<string, unknown>> | undefined;
18
- /** Trail IDs that produce this event (e.g. the trails it originates from). */
19
- readonly from?: readonly string[] | undefined;
20
- }
21
- /**
22
- * Create an event definition.
23
- *
24
- * An event is a named payload schema describing something that happened.
25
- * Returns a frozen object with `kind: "event"` and all spec fields.
26
- *
27
- * @example
28
- * ```typescript
29
- * // ID as first argument
30
- * const updated = event("entity.updated", {
31
- * payload: EntityUpdatedSchema,
32
- * from: ["entity.add", "entity.update"],
33
- * });
34
- *
35
- * // Full spec object (programmatic)
36
- * const updated = event({ id: "entity.updated", payload: ..., from: [...] });
37
- * ```
38
- */
39
- export declare function event<T>(id: string, spec: EventSpec<T>): Event<T>;
40
- export declare function event<T>(spec: EventSpec<T> & {
41
- readonly id: string;
42
- }): Event<T>;
43
- /** Existential type for heterogeneous event collections */
44
- export type AnyEvent = Event<unknown>;
45
- //# sourceMappingURL=event.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAM7B,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC/B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IACjE,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;CAC/C;AAMD,MAAM,WAAW,KAAK,CAAC,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC/B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IACjE,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;CAC/C;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AACnE,wBAAgB,KAAK,CAAC,CAAC,EACrB,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC3C,KAAK,CAAC,CAAC,CAAC,CAAC;AAkBZ,2DAA2D;AAC3D,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC"}
package/dist/event.js DELETED
@@ -1,17 +0,0 @@
1
- /**
2
- * Event — a named payload schema with optional provenance metadata.
3
- */
4
- export function event(idOrSpec, maybeSpec) {
5
- const resolvedId = typeof idOrSpec === 'string' ? idOrSpec : idOrSpec.id;
6
- // oxlint-disable-next-line no-non-null-assertion -- overload guarantees maybeSpec when idOrSpec is string
7
- const resolvedSpec = typeof idOrSpec === 'string' ? maybeSpec : idOrSpec;
8
- return Object.freeze({
9
- description: resolvedSpec.description,
10
- from: resolvedSpec.from ? Object.freeze([...resolvedSpec.from]) : undefined,
11
- id: resolvedId,
12
- kind: 'event',
13
- markers: resolvedSpec.markers,
14
- payload: resolvedSpec.payload,
15
- });
16
- }
17
- //# sourceMappingURL=event.js.map
package/dist/event.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"event.js","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"AAAA;;GAEG;AAwDH,MAAM,UAAU,KAAK,CACnB,QAA2D,EAC3D,SAAwB;IAExB,MAAM,UAAU,GAAG,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;IACzE,0GAA0G;IAC1G,MAAM,YAAY,GAAG,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAU,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC1E,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,WAAW,EAAE,YAAY,CAAC,WAAW;QACrC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;QAC3E,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,OAAgB;QACtB,OAAO,EAAE,YAAY,CAAC,OAAO;QAC7B,OAAO,EAAE,YAAY,CAAC,OAAO;KAC9B,CAAC,CAAC;AACL,CAAC"}
package/dist/fetch.d.ts DELETED
@@ -1,15 +0,0 @@
1
- /**
2
- * Fetch utilities for @ontrails/core
3
- *
4
- * Wraps the standard fetch API, mapping errors and HTTP status codes
5
- * to the TrailsError taxonomy.
6
- */
7
- import { Result } from './result.js';
8
- /**
9
- * Wrap a fetch call in a Result, mapping failures to TrailsError subclasses.
10
- *
11
- * Network errors become NetworkError. Abort signals become CancelledError.
12
- * HTTP error status codes map to the appropriate error category.
13
- */
14
- export declare const fromFetch: (input: string | URL | Request, init?: RequestInit) => Promise<Result<Response, Error>>;
15
- //# sourceMappingURL=fetch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAcH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AA+FrC;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GACpB,OAAO,MAAM,GAAG,GAAG,GAAG,OAAO,EAC7B,OAAO,WAAW,KACjB,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAcjC,CAAC"}
package/dist/fetch.js DELETED
@@ -1,102 +0,0 @@
1
- /**
2
- * Fetch utilities for @ontrails/core
3
- *
4
- * Wraps the standard fetch API, mapping errors and HTTP status codes
5
- * to the TrailsError taxonomy.
6
- */
7
- import { AuthError, CancelledError, ConflictError, InternalError, NetworkError, NotFoundError, PermissionError, RateLimitError, TimeoutError, ValidationError, } from './errors.js';
8
- import { Result } from './result.js';
9
- // ---------------------------------------------------------------------------
10
- // Internal helpers (defined before usage)
11
- // ---------------------------------------------------------------------------
12
- const toError = (err) => err instanceof Error ? err : new Error(String(err));
13
- const parseRetryAfter = (header) => {
14
- if (!header) {
15
- return undefined;
16
- }
17
- const seconds = Number(header);
18
- if (Number.isFinite(seconds) && seconds > 0) {
19
- return seconds;
20
- }
21
- // Try parsing as HTTP-date
22
- const date = Date.parse(header);
23
- if (!Number.isNaN(date)) {
24
- const delta = Math.ceil((date - Date.now()) / 1000);
25
- return delta > 0 ? delta : undefined;
26
- }
27
- return undefined;
28
- };
29
- const mapFetchError = (err) => {
30
- if (err instanceof DOMException && err.name === 'AbortError') {
31
- return new CancelledError('Request was aborted', { cause: toError(err) });
32
- }
33
- // TypeError is thrown for network failures in the fetch spec
34
- if (err instanceof TypeError) {
35
- return new NetworkError('Network request failed', { cause: err });
36
- }
37
- return new NetworkError('Network request failed', {
38
- cause: toError(err),
39
- });
40
- };
41
- const statusMappers = {
42
- 401: (ctx) => new AuthError('Unauthorized', { context: ctx }),
43
- 403: (ctx) => new PermissionError('Forbidden', { context: ctx }),
44
- 404: (ctx) => new NotFoundError('Not found', { context: ctx }),
45
- 429: (ctx, response) => {
46
- const retryAfter = parseRetryAfter(response.headers.get('retry-after'));
47
- const opts = {
48
- context: ctx,
49
- };
50
- if (retryAfter !== undefined) {
51
- opts.retryAfter = retryAfter;
52
- }
53
- return new RateLimitError('Rate limited', opts);
54
- },
55
- 500: (ctx) => new InternalError('Internal server error', { context: ctx }),
56
- 502: (ctx) => new NetworkError('Bad gateway', { context: ctx }),
57
- 504: (ctx) => new TimeoutError('Gateway timeout', { context: ctx }),
58
- };
59
- /** Map 4xx status codes not in the explicit mapper to appropriate error types. */
60
- const mapClientError = (status, context) => {
61
- if (status === 400 || status === 422) {
62
- return new ValidationError(`Validation error (${status})`, { context });
63
- }
64
- if (status === 409) {
65
- return new ConflictError(`Conflict (${status})`, { context });
66
- }
67
- return new InternalError(`HTTP error (${status})`, { context });
68
- };
69
- const mapStatusCode = (response) => {
70
- const context = { status: response.status, url: response.url };
71
- const mapper = statusMappers[response.status];
72
- if (mapper) {
73
- return mapper(context, response);
74
- }
75
- if (response.status >= 500) {
76
- return new InternalError(`Server error (${response.status})`, { context });
77
- }
78
- return mapClientError(response.status, context);
79
- };
80
- // ---------------------------------------------------------------------------
81
- // fromFetch
82
- // ---------------------------------------------------------------------------
83
- /**
84
- * Wrap a fetch call in a Result, mapping failures to TrailsError subclasses.
85
- *
86
- * Network errors become NetworkError. Abort signals become CancelledError.
87
- * HTTP error status codes map to the appropriate error category.
88
- */
89
- export const fromFetch = async (input, init) => {
90
- let response;
91
- try {
92
- response = await fetch(input, init);
93
- }
94
- catch (error) {
95
- return Result.err(mapFetchError(error));
96
- }
97
- if (response.ok) {
98
- return Result.ok(response);
99
- }
100
- return Result.err(mapStatusCode(response));
101
- };
102
- //# sourceMappingURL=fetch.js.map
package/dist/fetch.js.map DELETED
@@ -1 +0,0 @@
1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,OAAO,IAAI,aAAa,CAAC,iBAAiB,QAAQ,CAAC,MAAM,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,cAAc,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,EAC5B,KAA6B,EAC7B,IAAkB,EACgB,EAAE;IACpC,IAAI,QAAkB,CAAC;IAEvB,IAAI,CAAC;QACH,QAAQ,GAAG,MAAM,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,QAAQ,CAAC,EAAE,EAAE,CAAC;QAChB,OAAO,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAED,OAAO,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC7C,CAAC,CAAC"}
package/dist/guards.d.ts DELETED
@@ -1,17 +0,0 @@
1
- /**
2
- * Type guards and assertion helpers for @ontrails/core.
3
- */
4
- /** Narrows `T | null | undefined` to `T`. */
5
- export declare const isDefined: <T>(value?: T | null | undefined) => value is T;
6
- /** Returns true when `value` is a string with length > 0. */
7
- export declare const isNonEmptyString: (value?: unknown) => value is string;
8
- /** Returns true when `value` is a plain object (not an array, Date, etc.). */
9
- export declare const isPlainObject: (value: unknown) => value is Record<string, unknown>;
10
- /** Checks that `obj` is an object with the given key present. */
11
- export declare const hasProperty: <K extends string>(obj: unknown, key: K) => obj is Record<K, unknown>;
12
- /**
13
- * Exhaustive switch helper. Place in the `default` branch to get a compile
14
- * error when a union case is unhandled.
15
- */
16
- export declare const assertNever: (value: never) => never;
17
- //# sourceMappingURL=guards.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../src/guards.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,6CAA6C;AAC7C,eAAO,MAAM,SAAS,GAAI,CAAC,EAAE,QAAQ,CAAC,GAAG,IAAI,GAAG,SAAS,KAAG,KAAK,IAAI,CAC9B,CAAC;AAExC,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO,KAAG,KAAK,IAAI,MACb,CAAC;AAEhD,8EAA8E;AAC9E,eAAO,MAAM,aAAa,GACxB,OAAO,OAAO,KACb,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAMjC,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,EAC1C,KAAK,OAAO,EACZ,KAAK,CAAC,KACL,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,OAAO,CAC4B,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,KAAG,KAE1C,CAAC"}
package/dist/guards.js DELETED
@@ -1,25 +0,0 @@
1
- /**
2
- * Type guards and assertion helpers for @ontrails/core.
3
- */
4
- /** Narrows `T | null | undefined` to `T`. */
5
- export const isDefined = (value) => value !== null && value !== undefined;
6
- /** Returns true when `value` is a string with length > 0. */
7
- export const isNonEmptyString = (value) => typeof value === 'string' && value.length > 0;
8
- /** Returns true when `value` is a plain object (not an array, Date, etc.). */
9
- export const isPlainObject = (value) => {
10
- if (typeof value !== 'object' || value === null) {
11
- return false;
12
- }
13
- const proto = Object.getPrototypeOf(value);
14
- return proto === Object.prototype || proto === null;
15
- };
16
- /** Checks that `obj` is an object with the given key present. */
17
- export const hasProperty = (obj, key) => typeof obj === 'object' && obj !== null && key in obj;
18
- /**
19
- * Exhaustive switch helper. Place in the `default` branch to get a compile
20
- * error when a union case is unhandled.
21
- */
22
- export const assertNever = (value) => {
23
- throw new Error(`Unexpected value: ${String(value)}`);
24
- };
25
- //# sourceMappingURL=guards.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"guards.js","sourceRoot":"","sources":["../src/guards.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,6CAA6C;AAC7C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAI,KAA4B,EAAc,EAAE,CACvE,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAExC,6DAA6D;AAC7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAe,EAAmB,EAAE,CACnE,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AAEhD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,KAAc,EACoB,EAAE;IACpC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAY,CAAC;IACtD,OAAO,KAAK,KAAK,MAAM,CAAC,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AACtD,CAAC,CAAC;AAEF,iEAAiE;AACjE,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,GAAY,EACZ,GAAM,EACqB,EAAE,CAC7B,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,CAAC;AAExD;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAY,EAAS,EAAE;IACjD,MAAM,IAAI,KAAK,CAAC,qBAAqB,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACxD,CAAC,CAAC"}
package/dist/health.d.ts DELETED
@@ -1,18 +0,0 @@
1
- /** Aggregate health status */
2
- export type HealthStatus = 'healthy' | 'degraded' | 'unhealthy';
3
- /** Individual component check result */
4
- export interface HealthCheck {
5
- readonly status: HealthStatus;
6
- readonly message?: string | undefined;
7
- /** Latency in milliseconds */
8
- readonly latency?: number | undefined;
9
- }
10
- /** Full health report returned by a health endpoint */
11
- export interface HealthResult {
12
- readonly status: HealthStatus;
13
- readonly checks: Readonly<Record<string, HealthCheck>>;
14
- readonly version?: string | undefined;
15
- /** Uptime in seconds */
16
- readonly uptime?: number | undefined;
17
- }
18
- //# sourceMappingURL=health.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../src/health.ts"],"names":[],"mappings":"AAIA,8BAA8B;AAC9B,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;AAEhE,wCAAwC;AACxC,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,8BAA8B;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC;AAED,uDAAuD;AACvD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;IACvD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,wBAAwB;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC"}
package/dist/health.js DELETED
@@ -1,5 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- // Health check types
3
- // ---------------------------------------------------------------------------
4
- export {};
5
- //# sourceMappingURL=health.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"health.js","sourceRoot":"","sources":["../src/health.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,qBAAqB;AACrB,8EAA8E"}
package/dist/hike.d.ts DELETED
@@ -1,36 +0,0 @@
1
- /**
2
- * Hike — a composition that follows trails.
3
- */
4
- import type { Trail, TrailSpec } from './trail.js';
5
- export interface HikeSpec<I, O> extends TrailSpec<I, O> {
6
- readonly follows: readonly string[];
7
- }
8
- export interface Hike<I, O> extends Omit<Trail<I, O>, 'kind'> {
9
- readonly kind: 'hike';
10
- readonly follows: readonly string[];
11
- }
12
- /**
13
- * Create a hike definition.
14
- *
15
- * A hike is a composition that declares which trails it follows.
16
- * Returns a frozen object with `kind: "hike"` and all spec fields.
17
- *
18
- * @example
19
- * ```typescript
20
- * // ID as first argument
21
- * const onboard = hike("entity.onboard", {
22
- * follows: ["entity.add", "entity.relate"],
23
- * input: z.object({ name: z.string() }),
24
- * implementation: (input, ctx) => Result.ok(...),
25
- * });
26
- *
27
- * // Full spec object (programmatic)
28
- * const onboard = hike({ id: "entity.onboard", follows: [...], ... });
29
- * ```
30
- */
31
- export declare function hike<I, O>(id: string, spec: HikeSpec<I, O>): Hike<I, O>;
32
- export declare function hike<I, O>(spec: HikeSpec<I, O> & {
33
- readonly id: string;
34
- }): Hike<I, O>;
35
- export type AnyHike = Hike<any, any>;
36
- //# sourceMappingURL=hike.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hike.d.ts","sourceRoot":"","sources":["../src/hike.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAOnD,MAAM,WAAW,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;IACrD,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAMD,MAAM,WAAW,IAAI,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAC3D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACzE,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EACvB,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC7C,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AA0Bd,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC"}
package/dist/hike.js DELETED
@@ -1,20 +0,0 @@
1
- /**
2
- * Hike — a composition that follows trails.
3
- */
4
- export function hike(idOrSpec, maybeSpec) {
5
- const resolved = typeof idOrSpec === 'string'
6
- ? { id: idOrSpec, spec: maybeSpec }
7
- : { id: idOrSpec.id, spec: idOrSpec };
8
- if (!resolved.spec) {
9
- throw new TypeError('hike() requires a spec when an id is provided');
10
- }
11
- const { follows, implementation, ...rest } = resolved.spec;
12
- return Object.freeze({
13
- ...rest,
14
- follows: Object.freeze([...follows]),
15
- id: resolved.id,
16
- implementation: async (input, ctx) => await implementation(input, ctx),
17
- kind: 'hike',
18
- });
19
- }
20
- //# sourceMappingURL=hike.js.map
package/dist/hike.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"hike.js","sourceRoot":"","sources":["../src/hike.ts"],"names":[],"mappings":"AAAA;;GAEG;AAiDH,MAAM,UAAU,IAAI,CAClB,QAA6D,EAC7D,SAA0B;IAE1B,MAAM,QAAQ,GACZ,OAAO,QAAQ,KAAK,QAAQ;QAC1B,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;QACnC,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAE1C,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,SAAS,CAAC,+CAA+C,CAAC,CAAC;IACvE,CAAC;IAED,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC3D,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,GAAG,IAAI;QACP,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC;QACpC,EAAE,EAAE,QAAQ,CAAC,EAAE;QACf,cAAc,EAAE,KAAK,EAAE,KAAQ,EAAE,GAAiB,EAAE,EAAE,CACpD,MAAM,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC;QAClC,IAAI,EAAE,MAAe;KACtB,CAAC,CAAC;AACL,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,34 +0,0 @@
1
- export { Result } from './result.js';
2
- export { TrailsError, ValidationError, AmbiguousError, AssertionError, NotFoundError, AlreadyExistsError, ConflictError, PermissionError, TimeoutError, RateLimitError, NetworkError, InternalError, AuthError, CancelledError, exitCodeMap, statusCodeMap, jsonRpcCodeMap, retryableMap, isRetryable, isTrailsError, } from './errors.js';
3
- export type { ErrorCategory } from './errors.js';
4
- export type { Implementation, TrailContext, FollowFn, ProgressCallback, ProgressEvent, Logger, Surface, } from './types.js';
5
- export { createTrailContext } from './context.js';
6
- export { trail } from './trail.js';
7
- export type { AnyTrail, Trail, TrailSpec, TrailExample } from './trail.js';
8
- export { hike } from './hike.js';
9
- export type { AnyHike, Hike, HikeSpec } from './hike.js';
10
- export { event } from './event.js';
11
- export type { AnyEvent, Event, EventSpec } from './event.js';
12
- export { topo } from './topo.js';
13
- export type { Topo } from './topo.js';
14
- export { validateTopo } from './validate-topo.js';
15
- export type { TopoIssue } from './validate-topo.js';
16
- export { composeLayers } from './layer.js';
17
- export type { Layer } from './layer.js';
18
- export type { HealthStatus, HealthResult } from './health.js';
19
- export type { IndexAdapter, StorageAdapter, CacheAdapter, SearchOptions, SearchResult, StorageOptions, } from './adapters.js';
20
- export { deriveFields } from './derive.js';
21
- export type { Field, FieldOverride } from './derive.js';
22
- export { validateInput, validateOutput, formatZodIssues, zodToJsonSchema, } from './validation.js';
23
- export { serializeError, deserializeError } from './serialization.js';
24
- export type { SerializedError } from './serialization.js';
25
- export { retry, withTimeout, shouldRetry, getBackoffDelay, } from './resilience.js';
26
- export type { RetryOptions } from './resilience.js';
27
- export { brand, unbrand, uuid, email, nonEmptyString, positiveInt, shortId, hashId, } from './branded.js';
28
- export type { Branded, UUID, Email, NonEmptyString, PositiveInt, } from './branded.js';
29
- export { securePath, isPathSafe, resolveSafePath } from './path-security.js';
30
- export { findWorkspaceRoot, isInsideWorkspace, getRelativePath, } from './workspace.js';
31
- export { isDefined, isNonEmptyString, isPlainObject, hasProperty, assertNever, } from './guards.js';
32
- export { chunk, dedupe, groupBy, sortBy, isNonEmptyArray, } from './collections.js';
33
- export type { NonEmptyArray, DeepPartial, Prettify, AtLeastOne, } from './collections.js';
34
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EACL,WAAW,EACX,eAAe,EACf,cAAc,EACd,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,aAAa,EACb,SAAS,EACT,cAAc,EACd,WAAW,EACX,aAAa,EACb,cAAc,EACd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