@peasant-labs/schema 0.45.0 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -392,6 +392,57 @@ export interface paths {
392
392
  patch?: never;
393
393
  trace?: never;
394
394
  };
395
+ "/api/v1/sessions/{id}/transcript/segments": {
396
+ parameters: {
397
+ query?: never;
398
+ header?: never;
399
+ path?: never;
400
+ cookie?: never;
401
+ };
402
+ /** @description Read the transcript segment directory by session ID: the transcript's only global index, one ref per segment with the cut's revision and scalars and no turn content. Each ref names its segment ordinal and the closed range of sparse turn identities it covers; the segment read serves those turns. A session of zero segments answers an empty segments array with totalSegments 0. Above 10,000 segments the read serves one page of 10,000 refs, keeps the true totalSegments, and sets directoryPage and directoryPerPage; page is one-based, omitted defaults to 1, and a request past the last page is served the last page. The directory is cut under the store revision it reports; a segment cut under another revision must not be placed beside it. revision is optional and the current revision is served when it is omitted. The saved ingestion selection never narrows this stored read. */
403
+ get: operations["getSessionTranscriptSegments"];
404
+ put?: never;
405
+ post?: never;
406
+ delete?: never;
407
+ options?: never;
408
+ head?: never;
409
+ patch?: never;
410
+ trace?: never;
411
+ };
412
+ "/api/v1/sessions/{id}/transcript/segments/{index}": {
413
+ parameters: {
414
+ query?: never;
415
+ header?: never;
416
+ path?: never;
417
+ cookie?: never;
418
+ };
419
+ /** @description Read one transcript segment by its directory ordinal. The segment is cut on complete entries and whole turns, so every turn it serves is whole and its firstTurn and lastTurn are exactly the range the directory declared. Each turn row embeds the shared turn detail beside truncated and the pre-bound byteLength. hasOlder and hasNewer say whether the transcript continues on that side. revision is optional and the current revision is served when it is omitted. A non-numeric or negative index is a 400, an index at or past totalSegments is a 404 naming the directory's segment count, and a stale revision is a 409 naming both revisions. When the store returns fewer turns than the directory declared, the read answers 409 with the declared and returned ranges and the re-index command rather than serving a short segment. The saved ingestion selection never narrows this stored read. */
420
+ get: operations["getSessionTranscriptSegment"];
421
+ put?: never;
422
+ post?: never;
423
+ delete?: never;
424
+ options?: never;
425
+ head?: never;
426
+ patch?: never;
427
+ trace?: never;
428
+ };
429
+ "/api/v1/sessions/{id}/transcript/window": {
430
+ parameters: {
431
+ query?: never;
432
+ header?: never;
433
+ path?: never;
434
+ cookie?: never;
435
+ };
436
+ /** @description Resolve a turn identity to a contiguous transcript window and answer a descriptor that names where the window is, never what is in it. anchor is a non-negative turn identity: when the turn there is a user turn it is the anchor, otherwise the read snaps to the nearest lower user turn, or the nearest higher one when none is lower, and requestedAnchor and anchorTurn report both. span is the number of assistant turns collected on each side, 1..10, and omitted defaults to the design value 10; the parameter narrows a window and cannot widen it. The window is the contiguous range from the first collected turn to the last, so every interleaved user, system, and subagent turn is included. segments is the ordered contiguous run of segment ordinals that covers the range; the viewer loads exactly those through the segment read. hasOlder and hasNewer are true only when the transcript continues past that edge. revision is optional and the current revision is served when it is omitted. A missing, non-numeric, or negative anchor and a span outside 1..10 are 400; a session with no user turn is a 404, because a window requires one; a stale revision is a 409 naming both revisions. The saved ingestion selection never narrows this stored read. */
437
+ get: operations["getSessionTranscriptWindow"];
438
+ put?: never;
439
+ post?: never;
440
+ delete?: never;
441
+ options?: never;
442
+ head?: never;
443
+ patch?: never;
444
+ trace?: never;
445
+ };
395
446
  "/api/v1/settings": {
396
447
  parameters: {
397
448
  query?: never;
@@ -1616,8 +1667,11 @@ export interface components {
1616
1667
  * @example 99d59925-36bc-424c-a789-8be54d9702ba
1617
1668
  */
1618
1669
  SchemaTranscriptID: Schema.TranscriptID;
1670
+ SchemaTranscriptSegment: Schema.TranscriptSegment;
1671
+ SchemaTranscriptSegmentDirectory: Schema.TranscriptSegmentDirectory;
1619
1672
  SchemaTranscriptSegmentRef: Schema.TranscriptSegmentRef;
1620
1673
  SchemaTranscriptTurn: Schema.TranscriptTurn;
1674
+ SchemaTranscriptWindow: Schema.TranscriptWindow;
1621
1675
  SchemaTurnContentPart: Schema.TurnContentPart;
1622
1676
  SchemaTurnDetail: Schema.TurnDetail;
1623
1677
  /**
@@ -2408,6 +2462,215 @@ export interface operations {
2408
2462
  };
2409
2463
  };
2410
2464
  };
2465
+ getSessionTranscriptSegments: {
2466
+ parameters: {
2467
+ query?: {
2468
+ /** @description One-based directory page; omitted defaults to 1 */
2469
+ page?: number;
2470
+ /** @description Store revision to read; omitted serves the current revision */
2471
+ revision?: string;
2472
+ };
2473
+ header?: never;
2474
+ path: {
2475
+ id: string;
2476
+ };
2477
+ cookie?: never;
2478
+ };
2479
+ requestBody?: never;
2480
+ responses: {
2481
+ /** @description OK */
2482
+ 200: {
2483
+ headers: {
2484
+ [name: string]: unknown;
2485
+ };
2486
+ content: {
2487
+ "application/json": components["schemas"]["SchemaTranscriptSegmentDirectory"];
2488
+ };
2489
+ };
2490
+ /** @description Bad Request */
2491
+ 400: {
2492
+ headers: {
2493
+ [name: string]: unknown;
2494
+ };
2495
+ content: {
2496
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2497
+ };
2498
+ };
2499
+ /** @description Conflict */
2500
+ 409: {
2501
+ headers: {
2502
+ [name: string]: unknown;
2503
+ };
2504
+ content: {
2505
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2506
+ };
2507
+ };
2508
+ /** @description Internal Server Error */
2509
+ 500: {
2510
+ headers: {
2511
+ [name: string]: unknown;
2512
+ };
2513
+ content: {
2514
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2515
+ };
2516
+ };
2517
+ /** @description Service Unavailable */
2518
+ 503: {
2519
+ headers: {
2520
+ [name: string]: unknown;
2521
+ };
2522
+ content: {
2523
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2524
+ };
2525
+ };
2526
+ };
2527
+ };
2528
+ getSessionTranscriptSegment: {
2529
+ parameters: {
2530
+ query?: {
2531
+ /** @description Store revision to read; omitted serves the current revision */
2532
+ revision?: string;
2533
+ };
2534
+ header?: never;
2535
+ path: {
2536
+ id: string;
2537
+ /** @description Segment ordinal from the directory read */
2538
+ index: number;
2539
+ };
2540
+ cookie?: never;
2541
+ };
2542
+ requestBody?: never;
2543
+ responses: {
2544
+ /** @description OK */
2545
+ 200: {
2546
+ headers: {
2547
+ [name: string]: unknown;
2548
+ };
2549
+ content: {
2550
+ "application/json": components["schemas"]["SchemaTranscriptSegment"];
2551
+ };
2552
+ };
2553
+ /** @description Bad Request */
2554
+ 400: {
2555
+ headers: {
2556
+ [name: string]: unknown;
2557
+ };
2558
+ content: {
2559
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2560
+ };
2561
+ };
2562
+ /** @description Not Found */
2563
+ 404: {
2564
+ headers: {
2565
+ [name: string]: unknown;
2566
+ };
2567
+ content: {
2568
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2569
+ };
2570
+ };
2571
+ /** @description Conflict */
2572
+ 409: {
2573
+ headers: {
2574
+ [name: string]: unknown;
2575
+ };
2576
+ content: {
2577
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2578
+ };
2579
+ };
2580
+ /** @description Internal Server Error */
2581
+ 500: {
2582
+ headers: {
2583
+ [name: string]: unknown;
2584
+ };
2585
+ content: {
2586
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2587
+ };
2588
+ };
2589
+ /** @description Service Unavailable */
2590
+ 503: {
2591
+ headers: {
2592
+ [name: string]: unknown;
2593
+ };
2594
+ content: {
2595
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2596
+ };
2597
+ };
2598
+ };
2599
+ };
2600
+ getSessionTranscriptWindow: {
2601
+ parameters: {
2602
+ query: {
2603
+ /** @description Turn identity to centre the window on */
2604
+ anchor: number;
2605
+ /** @description Assistant turns collected on each side, 1..10; omitted defaults to 10 */
2606
+ span?: number;
2607
+ /** @description Store revision to read; omitted serves the current revision */
2608
+ revision?: string;
2609
+ };
2610
+ header?: never;
2611
+ path: {
2612
+ id: string;
2613
+ };
2614
+ cookie?: never;
2615
+ };
2616
+ requestBody?: never;
2617
+ responses: {
2618
+ /** @description OK */
2619
+ 200: {
2620
+ headers: {
2621
+ [name: string]: unknown;
2622
+ };
2623
+ content: {
2624
+ "application/json": components["schemas"]["SchemaTranscriptWindow"];
2625
+ };
2626
+ };
2627
+ /** @description Bad Request */
2628
+ 400: {
2629
+ headers: {
2630
+ [name: string]: unknown;
2631
+ };
2632
+ content: {
2633
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2634
+ };
2635
+ };
2636
+ /** @description Not Found */
2637
+ 404: {
2638
+ headers: {
2639
+ [name: string]: unknown;
2640
+ };
2641
+ content: {
2642
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2643
+ };
2644
+ };
2645
+ /** @description Conflict */
2646
+ 409: {
2647
+ headers: {
2648
+ [name: string]: unknown;
2649
+ };
2650
+ content: {
2651
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2652
+ };
2653
+ };
2654
+ /** @description Internal Server Error */
2655
+ 500: {
2656
+ headers: {
2657
+ [name: string]: unknown;
2658
+ };
2659
+ content: {
2660
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2661
+ };
2662
+ };
2663
+ /** @description Service Unavailable */
2664
+ 503: {
2665
+ headers: {
2666
+ [name: string]: unknown;
2667
+ };
2668
+ content: {
2669
+ "application/json": components["schemas"]["OpenapiLocalErrorResponse"];
2670
+ };
2671
+ };
2672
+ };
2673
+ };
2411
2674
  getSettings: {
2412
2675
  parameters: {
2413
2676
  query?: never;
@@ -1,4 +1,4 @@
1
1
  export declare const VillageAPIVersion: "0.37.0";
2
- export declare const PeasantLocalAPIVersion: "0.31.0";
2
+ export declare const PeasantLocalAPIVersion: "0.32.0";
3
3
  export declare const TypesVersion: "0.45.0";
4
4
  export declare const MetadataSchemaVersion: 12;
@@ -1,5 +1,5 @@
1
1
  // Code generated from the canonical Go/OpenAPI contract. DO NOT EDIT.
2
2
  export const VillageAPIVersion = "0.37.0";
3
- export const PeasantLocalAPIVersion = "0.31.0";
3
+ export const PeasantLocalAPIVersion = "0.32.0";
4
4
  export const TypesVersion = "0.45.0";
5
5
  export const MetadataSchemaVersion = 12;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peasant-labs/schema",
3
- "version": "0.45.0",
3
+ "version": "0.46.0",
4
4
  "description": "Generated TypeScript contract bindings for the peasant-labs schema module",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {