@krak-stack/registry 0.1.22 → 0.1.24

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.
@@ -89,15 +89,15 @@ export declare const createDocsSource: (config: DocsSourceConfig) => {
89
89
  readonly updatedAt?: string | undefined;
90
90
  readonly legacySlugs?: readonly string[] | undefined;
91
91
  readonly tags?: readonly string[] | undefined;
92
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
93
- readonly code: Schema.String;
94
- readonly language: Schema.String;
95
- }, "Type">[];
96
- readonly headings: readonly Schema.Struct.ReadonlySide<{
97
- readonly depth: Schema.Literals<readonly [2, 3]>;
98
- readonly id: Schema.String;
99
- readonly title: Schema.String;
100
- }, "Type">[];
92
+ readonly codeBlocks: readonly {
93
+ readonly code: string;
94
+ readonly language: string;
95
+ }[];
96
+ readonly headings: readonly {
97
+ readonly depth: 2 | 3;
98
+ readonly id: string;
99
+ readonly title: string;
100
+ }[];
101
101
  readonly html: string;
102
102
  readonly searchText: string;
103
103
  readonly sourceFile: string;
@@ -117,15 +117,15 @@ export declare const createDocsSource: (config: DocsSourceConfig) => {
117
117
  readonly updatedAt?: string | undefined;
118
118
  readonly legacySlugs?: readonly string[] | undefined;
119
119
  readonly tags?: readonly string[] | undefined;
120
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
121
- readonly code: Schema.String;
122
- readonly language: Schema.String;
123
- }, "Type">[];
124
- readonly headings: readonly Schema.Struct.ReadonlySide<{
125
- readonly depth: Schema.Literals<readonly [2, 3]>;
126
- readonly id: Schema.String;
127
- readonly title: Schema.String;
128
- }, "Type">[];
120
+ readonly codeBlocks: readonly {
121
+ readonly code: string;
122
+ readonly language: string;
123
+ }[];
124
+ readonly headings: readonly {
125
+ readonly depth: 2 | 3;
126
+ readonly id: string;
127
+ readonly title: string;
128
+ }[];
129
129
  readonly html: string;
130
130
  readonly searchText: string;
131
131
  readonly sourceFile: string;
@@ -146,15 +146,15 @@ export declare const createDocsSource: (config: DocsSourceConfig) => {
146
146
  readonly updatedAt?: string | undefined;
147
147
  readonly legacySlugs?: readonly string[] | undefined;
148
148
  readonly tags?: readonly string[] | undefined;
149
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
150
- readonly code: Schema.String;
151
- readonly language: Schema.String;
152
- }, "Type">[];
153
- readonly headings: readonly Schema.Struct.ReadonlySide<{
154
- readonly depth: Schema.Literals<readonly [2, 3]>;
155
- readonly id: Schema.String;
156
- readonly title: Schema.String;
157
- }, "Type">[];
149
+ readonly codeBlocks: readonly {
150
+ readonly code: string;
151
+ readonly language: string;
152
+ }[];
153
+ readonly headings: readonly {
154
+ readonly depth: 2 | 3;
155
+ readonly id: string;
156
+ readonly title: string;
157
+ }[];
158
158
  readonly html: string;
159
159
  readonly searchText: string;
160
160
  readonly sourceFile: string;
@@ -174,15 +174,15 @@ export declare const createDocsSource: (config: DocsSourceConfig) => {
174
174
  readonly updatedAt?: string | undefined;
175
175
  readonly legacySlugs?: readonly string[] | undefined;
176
176
  readonly tags?: readonly string[] | undefined;
177
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
178
- readonly code: Schema.String;
179
- readonly language: Schema.String;
180
- }, "Type">[];
181
- readonly headings: readonly Schema.Struct.ReadonlySide<{
182
- readonly depth: Schema.Literals<readonly [2, 3]>;
183
- readonly id: Schema.String;
184
- readonly title: Schema.String;
185
- }, "Type">[];
177
+ readonly codeBlocks: readonly {
178
+ readonly code: string;
179
+ readonly language: string;
180
+ }[];
181
+ readonly headings: readonly {
182
+ readonly depth: 2 | 3;
183
+ readonly id: string;
184
+ readonly title: string;
185
+ }[];
186
186
  readonly html: string;
187
187
  readonly searchText: string;
188
188
  readonly sourceFile: string;
@@ -203,15 +203,15 @@ export declare const createDocsSource: (config: DocsSourceConfig) => {
203
203
  readonly updatedAt?: string | undefined;
204
204
  readonly legacySlugs?: readonly string[] | undefined;
205
205
  readonly tags?: readonly string[] | undefined;
206
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
207
- readonly code: Schema.String;
208
- readonly language: Schema.String;
209
- }, "Type">[];
210
- readonly headings: readonly Schema.Struct.ReadonlySide<{
211
- readonly depth: Schema.Literals<readonly [2, 3]>;
212
- readonly id: Schema.String;
213
- readonly title: Schema.String;
214
- }, "Type">[];
206
+ readonly codeBlocks: readonly {
207
+ readonly code: string;
208
+ readonly language: string;
209
+ }[];
210
+ readonly headings: readonly {
211
+ readonly depth: 2 | 3;
212
+ readonly id: string;
213
+ readonly title: string;
214
+ }[];
215
215
  readonly html: string;
216
216
  readonly searchText: string;
217
217
  readonly sourceFile: string;
@@ -231,15 +231,15 @@ export declare const createDocsSource: (config: DocsSourceConfig) => {
231
231
  readonly updatedAt?: string | undefined;
232
232
  readonly legacySlugs?: readonly string[] | undefined;
233
233
  readonly tags?: readonly string[] | undefined;
234
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
235
- readonly code: Schema.String;
236
- readonly language: Schema.String;
237
- }, "Type">[];
238
- readonly headings: readonly Schema.Struct.ReadonlySide<{
239
- readonly depth: Schema.Literals<readonly [2, 3]>;
240
- readonly id: Schema.String;
241
- readonly title: Schema.String;
242
- }, "Type">[];
234
+ readonly codeBlocks: readonly {
235
+ readonly code: string;
236
+ readonly language: string;
237
+ }[];
238
+ readonly headings: readonly {
239
+ readonly depth: 2 | 3;
240
+ readonly id: string;
241
+ readonly title: string;
242
+ }[];
243
243
  readonly html: string;
244
244
  readonly searchText: string;
245
245
  readonly sourceFile: string;
@@ -357,15 +357,15 @@ export declare const makeDocs: (config: DocsConfig) => {
357
357
  readonly updatedAt?: string | undefined;
358
358
  readonly legacySlugs?: readonly string[] | undefined;
359
359
  readonly tags?: readonly string[] | undefined;
360
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
361
- readonly code: Schema.String;
362
- readonly language: Schema.String;
363
- }, "Type">[];
364
- readonly headings: readonly Schema.Struct.ReadonlySide<{
365
- readonly depth: Schema.Literals<readonly [2, 3]>;
366
- readonly id: Schema.String;
367
- readonly title: Schema.String;
368
- }, "Type">[];
360
+ readonly codeBlocks: readonly {
361
+ readonly code: string;
362
+ readonly language: string;
363
+ }[];
364
+ readonly headings: readonly {
365
+ readonly depth: 2 | 3;
366
+ readonly id: string;
367
+ readonly title: string;
368
+ }[];
369
369
  readonly html: string;
370
370
  readonly searchText: string;
371
371
  readonly sourceFile: string;
@@ -385,15 +385,15 @@ export declare const makeDocs: (config: DocsConfig) => {
385
385
  readonly updatedAt?: string | undefined;
386
386
  readonly legacySlugs?: readonly string[] | undefined;
387
387
  readonly tags?: readonly string[] | undefined;
388
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
389
- readonly code: Schema.String;
390
- readonly language: Schema.String;
391
- }, "Type">[];
392
- readonly headings: readonly Schema.Struct.ReadonlySide<{
393
- readonly depth: Schema.Literals<readonly [2, 3]>;
394
- readonly id: Schema.String;
395
- readonly title: Schema.String;
396
- }, "Type">[];
388
+ readonly codeBlocks: readonly {
389
+ readonly code: string;
390
+ readonly language: string;
391
+ }[];
392
+ readonly headings: readonly {
393
+ readonly depth: 2 | 3;
394
+ readonly id: string;
395
+ readonly title: string;
396
+ }[];
397
397
  readonly html: string;
398
398
  readonly searchText: string;
399
399
  readonly sourceFile: string;
@@ -414,15 +414,15 @@ export declare const makeDocs: (config: DocsConfig) => {
414
414
  readonly updatedAt?: string | undefined;
415
415
  readonly legacySlugs?: readonly string[] | undefined;
416
416
  readonly tags?: readonly string[] | undefined;
417
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
418
- readonly code: Schema.String;
419
- readonly language: Schema.String;
420
- }, "Type">[];
421
- readonly headings: readonly Schema.Struct.ReadonlySide<{
422
- readonly depth: Schema.Literals<readonly [2, 3]>;
423
- readonly id: Schema.String;
424
- readonly title: Schema.String;
425
- }, "Type">[];
417
+ readonly codeBlocks: readonly {
418
+ readonly code: string;
419
+ readonly language: string;
420
+ }[];
421
+ readonly headings: readonly {
422
+ readonly depth: 2 | 3;
423
+ readonly id: string;
424
+ readonly title: string;
425
+ }[];
426
426
  readonly html: string;
427
427
  readonly searchText: string;
428
428
  readonly sourceFile: string;
@@ -442,15 +442,15 @@ export declare const makeDocs: (config: DocsConfig) => {
442
442
  readonly updatedAt?: string | undefined;
443
443
  readonly legacySlugs?: readonly string[] | undefined;
444
444
  readonly tags?: readonly string[] | undefined;
445
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
446
- readonly code: Schema.String;
447
- readonly language: Schema.String;
448
- }, "Type">[];
449
- readonly headings: readonly Schema.Struct.ReadonlySide<{
450
- readonly depth: Schema.Literals<readonly [2, 3]>;
451
- readonly id: Schema.String;
452
- readonly title: Schema.String;
453
- }, "Type">[];
445
+ readonly codeBlocks: readonly {
446
+ readonly code: string;
447
+ readonly language: string;
448
+ }[];
449
+ readonly headings: readonly {
450
+ readonly depth: 2 | 3;
451
+ readonly id: string;
452
+ readonly title: string;
453
+ }[];
454
454
  readonly html: string;
455
455
  readonly searchText: string;
456
456
  readonly sourceFile: string;
@@ -471,15 +471,15 @@ export declare const makeDocs: (config: DocsConfig) => {
471
471
  readonly updatedAt?: string | undefined;
472
472
  readonly legacySlugs?: readonly string[] | undefined;
473
473
  readonly tags?: readonly string[] | undefined;
474
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
475
- readonly code: Schema.String;
476
- readonly language: Schema.String;
477
- }, "Type">[];
478
- readonly headings: readonly Schema.Struct.ReadonlySide<{
479
- readonly depth: Schema.Literals<readonly [2, 3]>;
480
- readonly id: Schema.String;
481
- readonly title: Schema.String;
482
- }, "Type">[];
474
+ readonly codeBlocks: readonly {
475
+ readonly code: string;
476
+ readonly language: string;
477
+ }[];
478
+ readonly headings: readonly {
479
+ readonly depth: 2 | 3;
480
+ readonly id: string;
481
+ readonly title: string;
482
+ }[];
483
483
  readonly html: string;
484
484
  readonly searchText: string;
485
485
  readonly sourceFile: string;
@@ -499,15 +499,15 @@ export declare const makeDocs: (config: DocsConfig) => {
499
499
  readonly updatedAt?: string | undefined;
500
500
  readonly legacySlugs?: readonly string[] | undefined;
501
501
  readonly tags?: readonly string[] | undefined;
502
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
503
- readonly code: Schema.String;
504
- readonly language: Schema.String;
505
- }, "Type">[];
506
- readonly headings: readonly Schema.Struct.ReadonlySide<{
507
- readonly depth: Schema.Literals<readonly [2, 3]>;
508
- readonly id: Schema.String;
509
- readonly title: Schema.String;
510
- }, "Type">[];
502
+ readonly codeBlocks: readonly {
503
+ readonly code: string;
504
+ readonly language: string;
505
+ }[];
506
+ readonly headings: readonly {
507
+ readonly depth: 2 | 3;
508
+ readonly id: string;
509
+ readonly title: string;
510
+ }[];
511
511
  readonly html: string;
512
512
  readonly searchText: string;
513
513
  readonly sourceFile: string;
@@ -528,15 +528,15 @@ export declare const makeDocs: (config: DocsConfig) => {
528
528
  readonly updatedAt?: string | undefined;
529
529
  readonly legacySlugs?: readonly string[] | undefined;
530
530
  readonly tags?: readonly string[] | undefined;
531
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
532
- readonly code: Schema.String;
533
- readonly language: Schema.String;
534
- }, "Type">[];
535
- readonly headings: readonly Schema.Struct.ReadonlySide<{
536
- readonly depth: Schema.Literals<readonly [2, 3]>;
537
- readonly id: Schema.String;
538
- readonly title: Schema.String;
539
- }, "Type">[];
531
+ readonly codeBlocks: readonly {
532
+ readonly code: string;
533
+ readonly language: string;
534
+ }[];
535
+ readonly headings: readonly {
536
+ readonly depth: 2 | 3;
537
+ readonly id: string;
538
+ readonly title: string;
539
+ }[];
540
540
  readonly html: string;
541
541
  readonly searchText: string;
542
542
  readonly sourceFile: string;
@@ -557,15 +557,15 @@ export declare const makeDocs: (config: DocsConfig) => {
557
557
  readonly updatedAt?: string | undefined;
558
558
  readonly legacySlugs?: readonly string[] | undefined;
559
559
  readonly tags?: readonly string[] | undefined;
560
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
561
- readonly code: Schema.String;
562
- readonly language: Schema.String;
563
- }, "Type">[];
564
- readonly headings: readonly Schema.Struct.ReadonlySide<{
565
- readonly depth: Schema.Literals<readonly [2, 3]>;
566
- readonly id: Schema.String;
567
- readonly title: Schema.String;
568
- }, "Type">[];
560
+ readonly codeBlocks: readonly {
561
+ readonly code: string;
562
+ readonly language: string;
563
+ }[];
564
+ readonly headings: readonly {
565
+ readonly depth: 2 | 3;
566
+ readonly id: string;
567
+ readonly title: string;
568
+ }[];
569
569
  readonly html: string;
570
570
  readonly searchText: string;
571
571
  readonly sourceFile: string;
@@ -587,15 +587,15 @@ export declare const makeDocs: (config: DocsConfig) => {
587
587
  readonly updatedAt?: string | undefined;
588
588
  readonly legacySlugs?: readonly string[] | undefined;
589
589
  readonly tags?: readonly string[] | undefined;
590
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
591
- readonly code: Schema.String;
592
- readonly language: Schema.String;
593
- }, "Type">[];
594
- readonly headings: readonly Schema.Struct.ReadonlySide<{
595
- readonly depth: Schema.Literals<readonly [2, 3]>;
596
- readonly id: Schema.String;
597
- readonly title: Schema.String;
598
- }, "Type">[];
590
+ readonly codeBlocks: readonly {
591
+ readonly code: string;
592
+ readonly language: string;
593
+ }[];
594
+ readonly headings: readonly {
595
+ readonly depth: 2 | 3;
596
+ readonly id: string;
597
+ readonly title: string;
598
+ }[];
599
599
  readonly html: string;
600
600
  readonly searchText: string;
601
601
  readonly sourceFile: string;
@@ -615,15 +615,15 @@ export declare const makeDocs: (config: DocsConfig) => {
615
615
  readonly updatedAt?: string | undefined;
616
616
  readonly legacySlugs?: readonly string[] | undefined;
617
617
  readonly tags?: readonly string[] | undefined;
618
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
619
- readonly code: Schema.String;
620
- readonly language: Schema.String;
621
- }, "Type">[];
622
- readonly headings: readonly Schema.Struct.ReadonlySide<{
623
- readonly depth: Schema.Literals<readonly [2, 3]>;
624
- readonly id: Schema.String;
625
- readonly title: Schema.String;
626
- }, "Type">[];
618
+ readonly codeBlocks: readonly {
619
+ readonly code: string;
620
+ readonly language: string;
621
+ }[];
622
+ readonly headings: readonly {
623
+ readonly depth: 2 | 3;
624
+ readonly id: string;
625
+ readonly title: string;
626
+ }[];
627
627
  readonly html: string;
628
628
  readonly searchText: string;
629
629
  readonly sourceFile: string;
@@ -650,15 +650,15 @@ export declare const makeDocs: (config: DocsConfig) => {
650
650
  readonly updatedAt?: string | undefined;
651
651
  readonly legacySlugs?: readonly string[] | undefined;
652
652
  readonly tags?: readonly string[] | undefined;
653
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
654
- readonly code: Schema.String;
655
- readonly language: Schema.String;
656
- }, "Type">[];
657
- readonly headings: readonly Schema.Struct.ReadonlySide<{
658
- readonly depth: Schema.Literals<readonly [2, 3]>;
659
- readonly id: Schema.String;
660
- readonly title: Schema.String;
661
- }, "Type">[];
653
+ readonly codeBlocks: readonly {
654
+ readonly code: string;
655
+ readonly language: string;
656
+ }[];
657
+ readonly headings: readonly {
658
+ readonly depth: 2 | 3;
659
+ readonly id: string;
660
+ readonly title: string;
661
+ }[];
662
662
  readonly html: string;
663
663
  readonly searchText: string;
664
664
  readonly sourceFile: string;
@@ -83,15 +83,15 @@ export declare const readDocumentation: (args_0: {
83
83
  readonly updatedAt?: string | undefined;
84
84
  readonly legacySlugs?: readonly string[] | undefined;
85
85
  readonly tags?: readonly string[] | undefined;
86
- readonly codeBlocks: readonly Schema.Struct.ReadonlySide<{
87
- readonly code: Schema.String;
88
- readonly language: Schema.String;
89
- }, "Type">[];
90
- readonly headings: readonly Schema.Struct.ReadonlySide<{
91
- readonly depth: Schema.Literals<readonly [2, 3]>;
92
- readonly id: Schema.String;
93
- readonly title: Schema.String;
94
- }, "Type">[];
86
+ readonly codeBlocks: readonly {
87
+ readonly code: string;
88
+ readonly language: string;
89
+ }[];
90
+ readonly headings: readonly {
91
+ readonly depth: 2 | 3;
92
+ readonly id: string;
93
+ readonly title: string;
94
+ }[];
95
95
  readonly html: string;
96
96
  readonly searchText: string;
97
97
  readonly sourceFile: string;
@@ -387,7 +387,7 @@ class HttpApiSpec extends Context2.Service()("HttpApiSpec", {
387
387
  if (reflected)
388
388
  return reflected;
389
389
  const document = JsonSchema.fromSchemaOpenApi3_1(operationJsonSchema(operation));
390
- return reflectedSchema2(SchemaRepresentation.toSchema(SchemaRepresentation.fromJsonSchemaDocument(document)));
390
+ return reflectedSchema2(SchemaRepresentation.fromJsonSchemaDocument(document));
391
391
  }
392
392
  };
393
393
  },
@@ -261,7 +261,7 @@ class HttpApiSpec extends Context.Service()("HttpApiSpec", {
261
261
  if (reflected)
262
262
  return reflected;
263
263
  const document = JsonSchema.fromSchemaOpenApi3_1(operationJsonSchema(operation));
264
- return reflectedSchema(SchemaRepresentation.toSchema(SchemaRepresentation.fromJsonSchemaDocument(document)));
264
+ return reflectedSchema(SchemaRepresentation.fromJsonSchemaDocument(document));
265
265
  }
266
266
  };
267
267
  },
@@ -16,5 +16,5 @@ export declare class HttpApiMcp extends HttpApiMcp_base {
16
16
  static readonly layer: (config: HttpApiMcpConfig) => Layer.Layer<HttpApiMcp, never, ApiClient | HttpApiSpec>;
17
17
  }
18
18
  export declare const httpApiMcpToolsLayer: Layer.Layer<never, Error, HttpApiMcp | McpServer.McpServer>;
19
- export declare const httpApiMcpServerLayer: (path: Parameters<typeof McpServer.layerHttp>[0]["path"]) => Layer.Layer<McpServer.McpServer | McpSchema.McpServerClient, never, HttpApiSpec | import("effect/unstable/http/HttpRouter").HttpRouter>;
19
+ export declare const httpApiMcpServerLayer: (path: Parameters<typeof McpServer.layerHttp>[0]["path"]) => Layer.Layer<McpServer.McpServer | McpSchema.McpServerClient, import("effect/Cause").IllegalArgumentError, HttpApiSpec | import("effect/unstable/http/HttpRouter").HttpRouter>;
20
20
  export {};
@@ -1,6 +1,6 @@
1
1
  // ../../src/lib/httpapi-mcp.ts
2
2
  import { Context as Context3, Effect as Effect3, Layer as Layer3, Option as Option2, Schema as Schema3 } from "effect";
3
- import { McpSchema, McpServer } from "effect/unstable/ai";
3
+ import { McpProtocol, McpSchema, McpServer } from "effect/unstable/ai";
4
4
 
5
5
  // ../../src/lib/httpapi-client.ts
6
6
  import { Context, Effect, Layer, Schema, SchemaTransformation } from "effect";
@@ -372,7 +372,7 @@ class HttpApiSpec extends Context2.Service()("HttpApiSpec", {
372
372
  if (reflected)
373
373
  return reflected;
374
374
  const document = JsonSchema.fromSchemaOpenApi3_1(operationJsonSchema(operation));
375
- return reflectedSchema2(SchemaRepresentation.toSchema(SchemaRepresentation.fromJsonSchemaDocument(document)));
375
+ return reflectedSchema2(SchemaRepresentation.fromJsonSchemaDocument(document));
376
376
  }
377
377
  };
378
378
  },
@@ -466,7 +466,8 @@ var httpApiMcpServerLayer = (path) => Layer3.unwrap(Effect3.gen(function* () {
466
466
  return McpServer.layerHttp({
467
467
  name: spec.info.title,
468
468
  version: spec.info.version,
469
- path
469
+ path,
470
+ protocols: [McpProtocol.v2025_11_25]
470
471
  });
471
472
  }));
472
473
  export {
@@ -372,7 +372,7 @@ class HttpApiSpec extends Context2.Service()("HttpApiSpec", {
372
372
  if (reflected)
373
373
  return reflected;
374
374
  const document = JsonSchema.fromSchemaOpenApi3_1(operationJsonSchema(operation));
375
- return reflectedSchema2(SchemaRepresentation.toSchema(SchemaRepresentation.fromJsonSchemaDocument(document)));
375
+ return reflectedSchema2(SchemaRepresentation.fromJsonSchemaDocument(document));
376
376
  }
377
377
  };
378
378
  },
@@ -25,10 +25,10 @@ export declare const Query: Schema.Struct<{
25
25
  readonly page: Schema.withDecodingDefaultKey<Schema.Int, never>;
26
26
  readonly pageSize: Schema.withDecodingDefaultKey<Schema.Int, never>;
27
27
  readonly globalFilter: Schema.optional<Schema.String>;
28
- readonly sort: Schema.optional<Schema.decodeTo<Schema.$Array<Schema.Struct<{
28
+ readonly sort: Schema.optional<Schema.$Array<Schema.Struct<{
29
29
  readonly id: Schema.NonEmptyString;
30
30
  readonly direction: Schema.Union<readonly [Schema.Literal<"asc">, Schema.Literal<"desc">]>;
31
- }>>, Schema.String, never, never>>;
31
+ }>>>;
32
32
  }>;
33
33
  export type QueryType = typeof Query.Type;
34
34
  export type QueryEncoded = typeof Query.Encoded;
package/dist/lib/query.js CHANGED
@@ -1,11 +1,5 @@
1
1
  // ../../src/lib/query.ts
2
- import {
3
- Effect,
4
- Option,
5
- Schema,
6
- SchemaIssue,
7
- SchemaTransformation
8
- } from "effect";
2
+ import { Effect, Schema, SchemaIssue, SchemaTransformation } from "effect";
9
3
  var parseSortParam = (sort) => {
10
4
  const id = sort.startsWith("-") ? sort.slice(1) : sort;
11
5
  if (!id || id.includes(",") || id.includes(":")) {
@@ -35,9 +29,7 @@ var SortParamFromString = Schema.String.pipe(Schema.decodeTo(SortParam, SchemaTr
35
29
  decode: (sort) => {
36
30
  const sortParam = parseSortParam(sort);
37
31
  if (!sortParam) {
38
- return Effect.fail(new SchemaIssue.InvalidValue(Option.some(sort), {
39
- message: 'Expected sort in the format "field" or "-field"'
40
- }));
32
+ return Effect.fail(new SchemaIssue.InvalidValue({ message: 'Expected sort in the format "field" or "-field"' }, sort));
41
33
  }
42
34
  return Effect.succeed(sortParam);
43
35
  },
@@ -55,9 +47,7 @@ var SortParamsFromString = Schema.String.pipe(Schema.decodeTo(Schema.Array(SortP
55
47
  for (const part of parts) {
56
48
  const sortParam = parseSortParam(part);
57
49
  if (!sortParam) {
58
- return Effect.fail(new SchemaIssue.InvalidValue(Option.some(sort), {
59
- message: 'Expected sort in the format "field,-otherField"'
60
- }));
50
+ return Effect.fail(new SchemaIssue.InvalidValue({ message: 'Expected sort in the format "field,-otherField"' }, sort));
61
51
  }
62
52
  sortParams.push(sortParam);
63
53
  }
@@ -79,7 +69,7 @@ var Query = Schema.Struct({
79
69
  page: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)).pipe(Schema.withDecodingDefaultKey(Effect.succeed(0))),
80
70
  pageSize: Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 100 })).pipe(Schema.withDecodingDefaultKey(Effect.succeed(10))),
81
71
  globalFilter: Schema.optional(Schema.String),
82
- sort: Schema.optional(SortParamsFromString)
72
+ sort: Schema.optional(Schema.Array(SortParam))
83
73
  }).annotate({
84
74
  identifier: "Query",
85
75
  title: "Query",
@@ -15,7 +15,7 @@ var FileExtractedTextSchema = Schema.Struct({
15
15
  truncated: Schema.Boolean
16
16
  }).annotate({ identifier: "FileExtractedText" });
17
17
 
18
- class FileExtractionFailed extends Schema.TaggedErrorClass()("FileExtractionFailed", { message: Schema.String }) {
18
+ class FileExtractionFailed extends Schema.TaggedError()("FileExtractionFailed", { message: Schema.String }) {
19
19
  }
20
20
 
21
21
  // ../../src/services/file-extraction/index.ts
@@ -222,7 +222,9 @@ var WebFetchToolkitLayer = (options = {}) => {
222
222
  const http = yield* HttpClient.HttpClient;
223
223
  const extraction = yield* FileExtractionService;
224
224
  return WebFetchToolkit.of({
225
- webFetch: ({ url }) => Effect2.gen(function* () {
225
+ webFetch: Effect2.fn("WebFetchToolkit.webFetch")(function* ({
226
+ url
227
+ }) {
226
228
  const request = HttpClientRequest.get(url).pipe(HttpClientRequest.setHeaders({
227
229
  accept: "text/markdown, text/plain;q=0.9, text/html;q=0.8, application/xhtml+xml;q=0.7, application/pdf;q=0.6, application/json;q=0.5",
228
230
  "user-agent": "krak-stack-webfetch/1.0"