@arke-institute/sdk 2.3.5 → 2.3.7

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.
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * Source: Arke v1 API
8
8
  * Version: 1.0.0
9
- * Generated: 2026-01-05T15:10:38.577Z
9
+ * Generated: 2026-01-12T16:14:47.577Z
10
10
  */
11
11
  type paths = {
12
12
  "/auth/register": {
@@ -491,6 +491,106 @@ type paths = {
491
491
  patch?: never;
492
492
  trace?: never;
493
493
  };
494
+ "/users/{id}/collections": {
495
+ parameters: {
496
+ query?: never;
497
+ header?: never;
498
+ path?: never;
499
+ cookie?: never;
500
+ };
501
+ /**
502
+ * List collections user has access to
503
+ * @description Returns all collections where the user has a role relationship (owner, editor, viewer, etc.).
504
+ *
505
+ * Queries GraphDB for collections with relationships pointing to this user where peer_type is 'user'.
506
+ * Results include the role predicate so clients know what access the user has to each collection.
507
+ *
508
+ * Supports filtering by predicate (role name) and pagination.
509
+ */
510
+ get: {
511
+ parameters: {
512
+ query?: {
513
+ predicate?: string;
514
+ limit?: string;
515
+ offset?: string;
516
+ };
517
+ header?: never;
518
+ path: {
519
+ /** @description Entity ID (ULID) */
520
+ id: string;
521
+ };
522
+ cookie?: never;
523
+ };
524
+ requestBody?: never;
525
+ responses: {
526
+ /** @description List of collections */
527
+ 200: {
528
+ headers: {
529
+ [name: string]: unknown;
530
+ };
531
+ content: {
532
+ "application/json": components["schemas"]["UserCollectionsResponse"];
533
+ };
534
+ };
535
+ /** @description Unauthorized - Missing or invalid authentication */
536
+ 401: {
537
+ headers: {
538
+ [name: string]: unknown;
539
+ };
540
+ content: {
541
+ /**
542
+ * @example {
543
+ * "error": "Unauthorized: Missing or invalid authentication token"
544
+ * }
545
+ */
546
+ "application/json": components["schemas"]["ErrorResponse"];
547
+ };
548
+ };
549
+ /** @description Forbidden - Insufficient permissions */
550
+ 403: {
551
+ headers: {
552
+ [name: string]: unknown;
553
+ };
554
+ content: {
555
+ /**
556
+ * @example {
557
+ * "error": "Forbidden: You do not have permission to perform this action"
558
+ * }
559
+ */
560
+ "application/json": components["schemas"]["ErrorResponse"];
561
+ };
562
+ };
563
+ /** @description Not Found - Resource does not exist */
564
+ 404: {
565
+ headers: {
566
+ [name: string]: unknown;
567
+ };
568
+ content: {
569
+ /**
570
+ * @example {
571
+ * "error": "Entity not found"
572
+ * }
573
+ */
574
+ "application/json": components["schemas"]["ErrorResponse"];
575
+ };
576
+ };
577
+ /** @description GraphDB service unavailable */
578
+ 503: {
579
+ headers: {
580
+ [name: string]: unknown;
581
+ };
582
+ content?: never;
583
+ };
584
+ };
585
+ };
586
+ put?: never;
587
+ post?: never;
588
+ delete?: never;
589
+ options?: never;
590
+ head?: never;
591
+ patch?: never;
592
+ trace?: never;
593
+ };
494
594
  "/collections": {
495
595
  parameters: {
496
596
  query?: never;
@@ -2453,7 +2553,7 @@ type paths = {
2453
2553
  patch?: never;
2454
2554
  trace?: never;
2455
2555
  };
2456
- "/files": {
2556
+ "/connect": {
2457
2557
  parameters: {
2458
2558
  query?: never;
2459
2559
  header?: never;
@@ -2463,18 +2563,16 @@ type paths = {
2463
2563
  get?: never;
2464
2564
  put?: never;
2465
2565
  /**
2466
- * Create file entity
2467
- * @description Creates a new file entity.
2566
+ * Connect two entities
2567
+ * @description Creates a unidirectional relationship from source to target entity.
2468
2568
  *
2469
- * ## Flow
2470
- * 1. Call this endpoint with file metadata (key, filename, content_type, size)
2471
- * 2. Receive entity data (uploaded: false)
2472
- * 3. POST the file content to /{id}/content
2473
- * 4. Entity will be updated with uploaded: true and verified CID
2569
+ * This is a shorthand for adding a relationship with sensible defaults:
2570
+ * - Default predicate: `connects_to` (customizable)
2571
+ * - Optional label and description stored in relationship properties
2572
+ * - Only requires `entity:update` permission on source entity
2474
2573
  *
2475
- * ## Key Best Practice
2476
- * Use a unique identifier as the key (e.g., version number, timestamp).
2477
- * The actual CID is computed during upload.
2574
+ * Use this for simple entity linking. For bidirectional relationships or
2575
+ * advanced options, use the `/relationships` endpoint.
2478
2576
  */
2479
2577
  post: {
2480
2578
  parameters: {
@@ -2485,17 +2583,17 @@ type paths = {
2485
2583
  };
2486
2584
  requestBody?: {
2487
2585
  content: {
2488
- "application/json": components["schemas"]["CreateFileRequest"];
2586
+ "application/json": components["schemas"]["ConnectRequest"];
2489
2587
  };
2490
2588
  };
2491
2589
  responses: {
2492
- /** @description File entity created */
2590
+ /** @description Connection created */
2493
2591
  201: {
2494
2592
  headers: {
2495
2593
  [name: string]: unknown;
2496
2594
  };
2497
2595
  content: {
2498
- "application/json": components["schemas"]["CreateFileResponse"];
2596
+ "application/json": components["schemas"]["ConnectResponse"];
2499
2597
  };
2500
2598
  };
2501
2599
  /** @description Bad Request - Invalid input */
@@ -2537,38 +2635,52 @@ type paths = {
2537
2635
  "application/json": components["schemas"]["ErrorResponse"];
2538
2636
  };
2539
2637
  };
2540
- /** @description Conflict - CAS validation failed (entity was modified) */
2541
- 409: {
2638
+ /** @description Forbidden - Insufficient permissions */
2639
+ 403: {
2542
2640
  headers: {
2543
2641
  [name: string]: unknown;
2544
2642
  };
2545
2643
  content: {
2546
2644
  /**
2547
2645
  * @example {
2548
- * "error": "Conflict: entity was modified",
2549
- * "details": {
2550
- * "expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
2551
- * "actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
2552
- * }
2646
+ * "error": "Forbidden: You do not have permission to perform this action"
2553
2647
  * }
2554
2648
  */
2555
- "application/json": components["schemas"]["CASErrorResponse"];
2649
+ "application/json": components["schemas"]["ErrorResponse"];
2556
2650
  };
2557
2651
  };
2558
- /** @description Internal Server Error */
2559
- 500: {
2652
+ /** @description Not Found - Resource does not exist */
2653
+ 404: {
2560
2654
  headers: {
2561
2655
  [name: string]: unknown;
2562
2656
  };
2563
2657
  content: {
2564
2658
  /**
2565
2659
  * @example {
2566
- * "error": "Internal server error"
2660
+ * "error": "Entity not found"
2567
2661
  * }
2568
2662
  */
2569
2663
  "application/json": components["schemas"]["ErrorResponse"];
2570
2664
  };
2571
2665
  };
2666
+ /** @description Conflict - CAS validation failed (entity was modified) */
2667
+ 409: {
2668
+ headers: {
2669
+ [name: string]: unknown;
2670
+ };
2671
+ content: {
2672
+ /**
2673
+ * @example {
2674
+ * "error": "Conflict: entity was modified",
2675
+ * "details": {
2676
+ * "expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
2677
+ * "actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
2678
+ * }
2679
+ * }
2680
+ */
2681
+ "application/json": components["schemas"]["CASErrorResponse"];
2682
+ };
2683
+ };
2572
2684
  };
2573
2685
  };
2574
2686
  delete?: never;
@@ -2577,101 +2689,45 @@ type paths = {
2577
2689
  patch?: never;
2578
2690
  trace?: never;
2579
2691
  };
2580
- "/files/{id}": {
2692
+ "/connect/disconnect": {
2581
2693
  parameters: {
2582
2694
  query?: never;
2583
2695
  header?: never;
2584
2696
  path?: never;
2585
2697
  cookie?: never;
2586
2698
  };
2699
+ get?: never;
2700
+ put?: never;
2587
2701
  /**
2588
- * Get file metadata
2589
- * @description Returns file entity metadata. Use /{id}/content to download the file content.
2590
- */
2591
- get: {
2592
- parameters: {
2593
- query?: never;
2594
- header?: never;
2595
- path: {
2596
- /** @description Entity ID (ULID) */
2597
- id: string;
2598
- };
2599
- cookie?: never;
2600
- };
2601
- requestBody?: never;
2602
- responses: {
2603
- /** @description File found */
2604
- 200: {
2605
- headers: {
2606
- [name: string]: unknown;
2607
- };
2608
- content: {
2609
- "application/json": components["schemas"]["FileResponse"];
2610
- };
2611
- };
2612
- /** @description Forbidden - Insufficient permissions */
2613
- 403: {
2614
- headers: {
2615
- [name: string]: unknown;
2616
- };
2617
- content: {
2618
- /**
2619
- * @example {
2620
- * "error": "Forbidden: You do not have permission to perform this action"
2621
- * }
2622
- */
2623
- "application/json": components["schemas"]["ErrorResponse"];
2624
- };
2625
- };
2626
- /** @description Not Found - Resource does not exist */
2627
- 404: {
2628
- headers: {
2629
- [name: string]: unknown;
2630
- };
2631
- content: {
2632
- /**
2633
- * @example {
2634
- * "error": "Entity not found"
2635
- * }
2636
- */
2637
- "application/json": components["schemas"]["ErrorResponse"];
2638
- };
2639
- };
2640
- };
2641
- };
2642
- /**
2643
- * Update file metadata
2644
- * @description Updates file metadata without changing the file content.
2702
+ * Disconnect two entities
2703
+ * @description Removes a unidirectional relationship from source to target entity.
2645
2704
  *
2646
- * ## Key Changes
2647
- * The key can be changed, but ONLY to a key that already exists in R2.
2648
- * This allows "regressing" to a previous file version.
2705
+ * This is a shorthand for removing a relationship:
2706
+ * - Default predicate: `connects_to` (customizable)
2707
+ * - Only requires `entity:update` permission on source entity
2649
2708
  *
2650
- * To upload a new file, use POST /{id}/reupload instead.
2709
+ * For bidirectional removal, use the `/relationships` endpoint.
2651
2710
  */
2652
- put: {
2711
+ post: {
2653
2712
  parameters: {
2654
2713
  query?: never;
2655
2714
  header?: never;
2656
- path: {
2657
- /** @description Entity ID (ULID) */
2658
- id: string;
2659
- };
2715
+ path?: never;
2660
2716
  cookie?: never;
2661
2717
  };
2662
2718
  requestBody?: {
2663
2719
  content: {
2664
- "application/json": components["schemas"]["UpdateFileRequest"];
2720
+ "application/json": components["schemas"]["DisconnectRequest"];
2665
2721
  };
2666
2722
  };
2667
2723
  responses: {
2668
- /** @description File updated */
2724
+ /** @description Connection removed */
2669
2725
  200: {
2670
2726
  headers: {
2671
2727
  [name: string]: unknown;
2672
2728
  };
2673
2729
  content: {
2674
- "application/json": components["schemas"]["UpdateFileResponse"];
2730
+ "application/json": components["schemas"]["DisconnectResponse"];
2675
2731
  };
2676
2732
  };
2677
2733
  /** @description Bad Request - Invalid input */
@@ -2761,54 +2817,368 @@ type paths = {
2761
2817
  };
2762
2818
  };
2763
2819
  };
2764
- post?: never;
2765
2820
  delete?: never;
2766
2821
  options?: never;
2767
2822
  head?: never;
2768
2823
  patch?: never;
2769
2824
  trace?: never;
2770
2825
  };
2771
- "/files/{id}/content": {
2826
+ "/files": {
2772
2827
  parameters: {
2773
2828
  query?: never;
2774
2829
  header?: never;
2775
2830
  path?: never;
2776
2831
  cookie?: never;
2777
2832
  };
2833
+ get?: never;
2834
+ put?: never;
2778
2835
  /**
2779
- * Download file content
2780
- * @description Downloads the binary content of a file entity.
2836
+ * Create file entity
2837
+ * @description Creates a new file entity.
2781
2838
  *
2782
- * ## Response Headers
2783
- * - Content-Type: The MIME type of the file
2784
- * - Content-Length: File size in bytes
2785
- * - Content-Disposition: attachment; filename="original_filename"
2839
+ * ## Flow
2840
+ * 1. Call this endpoint with file metadata (key, filename, content_type, size)
2841
+ * 2. Receive entity data (uploaded: false)
2842
+ * 3. POST the file content to /{id}/content
2843
+ * 4. Entity will be updated with uploaded: true and verified CID
2786
2844
  *
2787
- * ## Streaming
2788
- * Response is streamed directly from R2 storage.
2845
+ * ## Key Best Practice
2846
+ * Use a unique identifier as the key (e.g., version number, timestamp).
2847
+ * The actual CID is computed during upload.
2789
2848
  */
2790
- get: {
2849
+ post: {
2791
2850
  parameters: {
2792
2851
  query?: never;
2793
2852
  header?: never;
2794
- path: {
2795
- /** @description Entity ID (ULID) */
2796
- id: string;
2797
- };
2853
+ path?: never;
2798
2854
  cookie?: never;
2799
2855
  };
2800
- requestBody?: never;
2856
+ requestBody?: {
2857
+ content: {
2858
+ "application/json": components["schemas"]["CreateFileRequest"];
2859
+ };
2860
+ };
2801
2861
  responses: {
2802
- /** @description File content */
2803
- 200: {
2862
+ /** @description File entity created */
2863
+ 201: {
2804
2864
  headers: {
2805
2865
  [name: string]: unknown;
2806
2866
  };
2807
2867
  content: {
2808
- "application/octet-stream": string;
2868
+ "application/json": components["schemas"]["CreateFileResponse"];
2809
2869
  };
2810
2870
  };
2811
- /** @description Forbidden - Insufficient permissions */
2871
+ /** @description Bad Request - Invalid input */
2872
+ 400: {
2873
+ headers: {
2874
+ [name: string]: unknown;
2875
+ };
2876
+ content: {
2877
+ /**
2878
+ * @example {
2879
+ * "error": "Validation failed",
2880
+ * "details": {
2881
+ * "issues": [
2882
+ * {
2883
+ * "path": [
2884
+ * "properties",
2885
+ * "label"
2886
+ * ],
2887
+ * "message": "Required"
2888
+ * }
2889
+ * ]
2890
+ * }
2891
+ * }
2892
+ */
2893
+ "application/json": components["schemas"]["ValidationErrorResponse"];
2894
+ };
2895
+ };
2896
+ /** @description Unauthorized - Missing or invalid authentication */
2897
+ 401: {
2898
+ headers: {
2899
+ [name: string]: unknown;
2900
+ };
2901
+ content: {
2902
+ /**
2903
+ * @example {
2904
+ * "error": "Unauthorized: Missing or invalid authentication token"
2905
+ * }
2906
+ */
2907
+ "application/json": components["schemas"]["ErrorResponse"];
2908
+ };
2909
+ };
2910
+ /** @description Conflict - CAS validation failed (entity was modified) */
2911
+ 409: {
2912
+ headers: {
2913
+ [name: string]: unknown;
2914
+ };
2915
+ content: {
2916
+ /**
2917
+ * @example {
2918
+ * "error": "Conflict: entity was modified",
2919
+ * "details": {
2920
+ * "expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
2921
+ * "actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
2922
+ * }
2923
+ * }
2924
+ */
2925
+ "application/json": components["schemas"]["CASErrorResponse"];
2926
+ };
2927
+ };
2928
+ /** @description Internal Server Error */
2929
+ 500: {
2930
+ headers: {
2931
+ [name: string]: unknown;
2932
+ };
2933
+ content: {
2934
+ /**
2935
+ * @example {
2936
+ * "error": "Internal server error"
2937
+ * }
2938
+ */
2939
+ "application/json": components["schemas"]["ErrorResponse"];
2940
+ };
2941
+ };
2942
+ };
2943
+ };
2944
+ delete?: never;
2945
+ options?: never;
2946
+ head?: never;
2947
+ patch?: never;
2948
+ trace?: never;
2949
+ };
2950
+ "/files/{id}": {
2951
+ parameters: {
2952
+ query?: never;
2953
+ header?: never;
2954
+ path?: never;
2955
+ cookie?: never;
2956
+ };
2957
+ /**
2958
+ * Get file metadata
2959
+ * @description Returns file entity metadata. Use /{id}/content to download the file content.
2960
+ */
2961
+ get: {
2962
+ parameters: {
2963
+ query?: never;
2964
+ header?: never;
2965
+ path: {
2966
+ /** @description Entity ID (ULID) */
2967
+ id: string;
2968
+ };
2969
+ cookie?: never;
2970
+ };
2971
+ requestBody?: never;
2972
+ responses: {
2973
+ /** @description File found */
2974
+ 200: {
2975
+ headers: {
2976
+ [name: string]: unknown;
2977
+ };
2978
+ content: {
2979
+ "application/json": components["schemas"]["FileResponse"];
2980
+ };
2981
+ };
2982
+ /** @description Forbidden - Insufficient permissions */
2983
+ 403: {
2984
+ headers: {
2985
+ [name: string]: unknown;
2986
+ };
2987
+ content: {
2988
+ /**
2989
+ * @example {
2990
+ * "error": "Forbidden: You do not have permission to perform this action"
2991
+ * }
2992
+ */
2993
+ "application/json": components["schemas"]["ErrorResponse"];
2994
+ };
2995
+ };
2996
+ /** @description Not Found - Resource does not exist */
2997
+ 404: {
2998
+ headers: {
2999
+ [name: string]: unknown;
3000
+ };
3001
+ content: {
3002
+ /**
3003
+ * @example {
3004
+ * "error": "Entity not found"
3005
+ * }
3006
+ */
3007
+ "application/json": components["schemas"]["ErrorResponse"];
3008
+ };
3009
+ };
3010
+ };
3011
+ };
3012
+ /**
3013
+ * Update file metadata
3014
+ * @description Updates file metadata without changing the file content.
3015
+ *
3016
+ * ## Key Changes
3017
+ * The key can be changed, but ONLY to a key that already exists in R2.
3018
+ * This allows "regressing" to a previous file version.
3019
+ *
3020
+ * To upload a new file, use POST /{id}/reupload instead.
3021
+ */
3022
+ put: {
3023
+ parameters: {
3024
+ query?: never;
3025
+ header?: never;
3026
+ path: {
3027
+ /** @description Entity ID (ULID) */
3028
+ id: string;
3029
+ };
3030
+ cookie?: never;
3031
+ };
3032
+ requestBody?: {
3033
+ content: {
3034
+ "application/json": components["schemas"]["UpdateFileRequest"];
3035
+ };
3036
+ };
3037
+ responses: {
3038
+ /** @description File updated */
3039
+ 200: {
3040
+ headers: {
3041
+ [name: string]: unknown;
3042
+ };
3043
+ content: {
3044
+ "application/json": components["schemas"]["UpdateFileResponse"];
3045
+ };
3046
+ };
3047
+ /** @description Bad Request - Invalid input */
3048
+ 400: {
3049
+ headers: {
3050
+ [name: string]: unknown;
3051
+ };
3052
+ content: {
3053
+ /**
3054
+ * @example {
3055
+ * "error": "Validation failed",
3056
+ * "details": {
3057
+ * "issues": [
3058
+ * {
3059
+ * "path": [
3060
+ * "properties",
3061
+ * "label"
3062
+ * ],
3063
+ * "message": "Required"
3064
+ * }
3065
+ * ]
3066
+ * }
3067
+ * }
3068
+ */
3069
+ "application/json": components["schemas"]["ValidationErrorResponse"];
3070
+ };
3071
+ };
3072
+ /** @description Unauthorized - Missing or invalid authentication */
3073
+ 401: {
3074
+ headers: {
3075
+ [name: string]: unknown;
3076
+ };
3077
+ content: {
3078
+ /**
3079
+ * @example {
3080
+ * "error": "Unauthorized: Missing or invalid authentication token"
3081
+ * }
3082
+ */
3083
+ "application/json": components["schemas"]["ErrorResponse"];
3084
+ };
3085
+ };
3086
+ /** @description Forbidden - Insufficient permissions */
3087
+ 403: {
3088
+ headers: {
3089
+ [name: string]: unknown;
3090
+ };
3091
+ content: {
3092
+ /**
3093
+ * @example {
3094
+ * "error": "Forbidden: You do not have permission to perform this action"
3095
+ * }
3096
+ */
3097
+ "application/json": components["schemas"]["ErrorResponse"];
3098
+ };
3099
+ };
3100
+ /** @description Not Found - Resource does not exist */
3101
+ 404: {
3102
+ headers: {
3103
+ [name: string]: unknown;
3104
+ };
3105
+ content: {
3106
+ /**
3107
+ * @example {
3108
+ * "error": "Entity not found"
3109
+ * }
3110
+ */
3111
+ "application/json": components["schemas"]["ErrorResponse"];
3112
+ };
3113
+ };
3114
+ /** @description Conflict - CAS validation failed (entity was modified) */
3115
+ 409: {
3116
+ headers: {
3117
+ [name: string]: unknown;
3118
+ };
3119
+ content: {
3120
+ /**
3121
+ * @example {
3122
+ * "error": "Conflict: entity was modified",
3123
+ * "details": {
3124
+ * "expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
3125
+ * "actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
3126
+ * }
3127
+ * }
3128
+ */
3129
+ "application/json": components["schemas"]["CASErrorResponse"];
3130
+ };
3131
+ };
3132
+ };
3133
+ };
3134
+ post?: never;
3135
+ delete?: never;
3136
+ options?: never;
3137
+ head?: never;
3138
+ patch?: never;
3139
+ trace?: never;
3140
+ };
3141
+ "/files/{id}/content": {
3142
+ parameters: {
3143
+ query?: never;
3144
+ header?: never;
3145
+ path?: never;
3146
+ cookie?: never;
3147
+ };
3148
+ /**
3149
+ * Download file content
3150
+ * @description Downloads the binary content of a file entity.
3151
+ *
3152
+ * ## Response Headers
3153
+ * - Content-Type: The MIME type of the file
3154
+ * - Content-Length: File size in bytes
3155
+ * - Content-Disposition: attachment; filename="original_filename"
3156
+ *
3157
+ * ## Streaming
3158
+ * Response is streamed directly from R2 storage.
3159
+ */
3160
+ get: {
3161
+ parameters: {
3162
+ query?: never;
3163
+ header?: never;
3164
+ path: {
3165
+ /** @description Entity ID (ULID) */
3166
+ id: string;
3167
+ };
3168
+ cookie?: never;
3169
+ };
3170
+ requestBody?: never;
3171
+ responses: {
3172
+ /** @description File content */
3173
+ 200: {
3174
+ headers: {
3175
+ [name: string]: unknown;
3176
+ };
3177
+ content: {
3178
+ "application/octet-stream": string;
3179
+ };
3180
+ };
3181
+ /** @description Forbidden - Insufficient permissions */
2812
3182
  403: {
2813
3183
  headers: {
2814
3184
  [name: string]: unknown;
@@ -3278,55 +3648,327 @@ type paths = {
3278
3648
  content: {
3279
3649
  /**
3280
3650
  * @example {
3281
- * "error": "Forbidden: You do not have permission to perform this action"
3651
+ * "error": "Forbidden: You do not have permission to perform this action"
3652
+ * }
3653
+ */
3654
+ "application/json": components["schemas"]["ErrorResponse"];
3655
+ };
3656
+ };
3657
+ /** @description Not Found - Resource does not exist */
3658
+ 404: {
3659
+ headers: {
3660
+ [name: string]: unknown;
3661
+ };
3662
+ content: {
3663
+ /**
3664
+ * @example {
3665
+ * "error": "Entity not found"
3666
+ * }
3667
+ */
3668
+ "application/json": components["schemas"]["ErrorResponse"];
3669
+ };
3670
+ };
3671
+ };
3672
+ };
3673
+ /**
3674
+ * Update folder
3675
+ * @description Updates folder properties (label, description, metadata). Properties are merged.
3676
+ */
3677
+ put: {
3678
+ parameters: {
3679
+ query?: never;
3680
+ header?: never;
3681
+ path: {
3682
+ /** @description Entity ID (ULID) */
3683
+ id: string;
3684
+ };
3685
+ cookie?: never;
3686
+ };
3687
+ requestBody?: {
3688
+ content: {
3689
+ "application/json": components["schemas"]["UpdateFolderRequest"];
3690
+ };
3691
+ };
3692
+ responses: {
3693
+ /** @description Folder updated */
3694
+ 200: {
3695
+ headers: {
3696
+ [name: string]: unknown;
3697
+ };
3698
+ content: {
3699
+ "application/json": components["schemas"]["UpdateFolderResponse"];
3700
+ };
3701
+ };
3702
+ /** @description Bad Request - Invalid input */
3703
+ 400: {
3704
+ headers: {
3705
+ [name: string]: unknown;
3706
+ };
3707
+ content: {
3708
+ /**
3709
+ * @example {
3710
+ * "error": "Validation failed",
3711
+ * "details": {
3712
+ * "issues": [
3713
+ * {
3714
+ * "path": [
3715
+ * "properties",
3716
+ * "label"
3717
+ * ],
3718
+ * "message": "Required"
3719
+ * }
3720
+ * ]
3721
+ * }
3722
+ * }
3723
+ */
3724
+ "application/json": components["schemas"]["ValidationErrorResponse"];
3725
+ };
3726
+ };
3727
+ /** @description Unauthorized - Missing or invalid authentication */
3728
+ 401: {
3729
+ headers: {
3730
+ [name: string]: unknown;
3731
+ };
3732
+ content: {
3733
+ /**
3734
+ * @example {
3735
+ * "error": "Unauthorized: Missing or invalid authentication token"
3736
+ * }
3737
+ */
3738
+ "application/json": components["schemas"]["ErrorResponse"];
3739
+ };
3740
+ };
3741
+ /** @description Forbidden - Insufficient permissions */
3742
+ 403: {
3743
+ headers: {
3744
+ [name: string]: unknown;
3745
+ };
3746
+ content: {
3747
+ /**
3748
+ * @example {
3749
+ * "error": "Forbidden: You do not have permission to perform this action"
3750
+ * }
3751
+ */
3752
+ "application/json": components["schemas"]["ErrorResponse"];
3753
+ };
3754
+ };
3755
+ /** @description Not Found - Resource does not exist */
3756
+ 404: {
3757
+ headers: {
3758
+ [name: string]: unknown;
3759
+ };
3760
+ content: {
3761
+ /**
3762
+ * @example {
3763
+ * "error": "Entity not found"
3764
+ * }
3765
+ */
3766
+ "application/json": components["schemas"]["ErrorResponse"];
3767
+ };
3768
+ };
3769
+ /** @description Conflict - CAS validation failed (entity was modified) */
3770
+ 409: {
3771
+ headers: {
3772
+ [name: string]: unknown;
3773
+ };
3774
+ content: {
3775
+ /**
3776
+ * @example {
3777
+ * "error": "Conflict: entity was modified",
3778
+ * "details": {
3779
+ * "expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
3780
+ * "actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
3781
+ * }
3782
+ * }
3783
+ */
3784
+ "application/json": components["schemas"]["CASErrorResponse"];
3785
+ };
3786
+ };
3787
+ };
3788
+ };
3789
+ post?: never;
3790
+ delete?: never;
3791
+ options?: never;
3792
+ head?: never;
3793
+ patch?: never;
3794
+ trace?: never;
3795
+ };
3796
+ "/folders/{id}/children": {
3797
+ parameters: {
3798
+ query?: never;
3799
+ header?: never;
3800
+ path?: never;
3801
+ cookie?: never;
3802
+ };
3803
+ get?: never;
3804
+ put?: never;
3805
+ /**
3806
+ * Add child to folder
3807
+ * @description Adds a child entity (file or folder) to this folder.
3808
+ *
3809
+ * Creates bidirectional relationship:
3810
+ * - Folder contains child
3811
+ * - Child is in folder
3812
+ *
3813
+ * **Idempotent**: if relationship already exists, returns current state without error.
3814
+ */
3815
+ post: {
3816
+ parameters: {
3817
+ query?: never;
3818
+ header?: never;
3819
+ path: {
3820
+ /** @description Entity ID (ULID) */
3821
+ id: string;
3822
+ };
3823
+ cookie?: never;
3824
+ };
3825
+ requestBody?: {
3826
+ content: {
3827
+ "application/json": components["schemas"]["AddChildRequest"];
3828
+ };
3829
+ };
3830
+ responses: {
3831
+ /** @description Child added */
3832
+ 200: {
3833
+ headers: {
3834
+ [name: string]: unknown;
3835
+ };
3836
+ content: {
3837
+ "application/json": components["schemas"]["AddChildResponse"];
3838
+ };
3839
+ };
3840
+ /** @description Bad Request - Invalid input */
3841
+ 400: {
3842
+ headers: {
3843
+ [name: string]: unknown;
3844
+ };
3845
+ content: {
3846
+ /**
3847
+ * @example {
3848
+ * "error": "Validation failed",
3849
+ * "details": {
3850
+ * "issues": [
3851
+ * {
3852
+ * "path": [
3853
+ * "properties",
3854
+ * "label"
3855
+ * ],
3856
+ * "message": "Required"
3857
+ * }
3858
+ * ]
3859
+ * }
3860
+ * }
3861
+ */
3862
+ "application/json": components["schemas"]["ValidationErrorResponse"];
3863
+ };
3864
+ };
3865
+ /** @description Unauthorized - Missing or invalid authentication */
3866
+ 401: {
3867
+ headers: {
3868
+ [name: string]: unknown;
3869
+ };
3870
+ content: {
3871
+ /**
3872
+ * @example {
3873
+ * "error": "Unauthorized: Missing or invalid authentication token"
3874
+ * }
3875
+ */
3876
+ "application/json": components["schemas"]["ErrorResponse"];
3877
+ };
3878
+ };
3879
+ /** @description Forbidden - Insufficient permissions */
3880
+ 403: {
3881
+ headers: {
3882
+ [name: string]: unknown;
3883
+ };
3884
+ content: {
3885
+ /**
3886
+ * @example {
3887
+ * "error": "Forbidden: You do not have permission to perform this action"
3888
+ * }
3889
+ */
3890
+ "application/json": components["schemas"]["ErrorResponse"];
3891
+ };
3892
+ };
3893
+ /** @description Not Found - Resource does not exist */
3894
+ 404: {
3895
+ headers: {
3896
+ [name: string]: unknown;
3897
+ };
3898
+ content: {
3899
+ /**
3900
+ * @example {
3901
+ * "error": "Entity not found"
3282
3902
  * }
3283
3903
  */
3284
3904
  "application/json": components["schemas"]["ErrorResponse"];
3285
3905
  };
3286
3906
  };
3287
- /** @description Not Found - Resource does not exist */
3288
- 404: {
3907
+ /** @description Conflict - CAS validation failed (entity was modified) */
3908
+ 409: {
3289
3909
  headers: {
3290
3910
  [name: string]: unknown;
3291
3911
  };
3292
3912
  content: {
3293
3913
  /**
3294
3914
  * @example {
3295
- * "error": "Entity not found"
3915
+ * "error": "Conflict: entity was modified",
3916
+ * "details": {
3917
+ * "expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
3918
+ * "actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
3919
+ * }
3296
3920
  * }
3297
3921
  */
3298
- "application/json": components["schemas"]["ErrorResponse"];
3922
+ "application/json": components["schemas"]["CASErrorResponse"];
3299
3923
  };
3300
3924
  };
3301
3925
  };
3302
3926
  };
3927
+ delete?: never;
3928
+ options?: never;
3929
+ head?: never;
3930
+ patch?: never;
3931
+ trace?: never;
3932
+ };
3933
+ "/folders/{id}/children/{childId}": {
3934
+ parameters: {
3935
+ query?: never;
3936
+ header?: never;
3937
+ path?: never;
3938
+ cookie?: never;
3939
+ };
3940
+ get?: never;
3941
+ put?: never;
3942
+ post?: never;
3303
3943
  /**
3304
- * Update folder
3305
- * @description Updates folder properties (label, description, metadata). Properties are merged.
3944
+ * Remove child from folder
3945
+ * @description Removes a child entity from this folder (bidirectional).
3306
3946
  */
3307
- put: {
3947
+ delete: {
3308
3948
  parameters: {
3309
3949
  query?: never;
3310
3950
  header?: never;
3311
3951
  path: {
3312
3952
  /** @description Entity ID (ULID) */
3313
3953
  id: string;
3954
+ /** @description Child entity ID */
3955
+ childId: string;
3314
3956
  };
3315
3957
  cookie?: never;
3316
3958
  };
3317
3959
  requestBody?: {
3318
3960
  content: {
3319
- "application/json": components["schemas"]["UpdateFolderRequest"];
3961
+ "application/json": components["schemas"]["RemoveChildRequest"];
3320
3962
  };
3321
3963
  };
3322
3964
  responses: {
3323
- /** @description Folder updated */
3965
+ /** @description Child removed */
3324
3966
  200: {
3325
3967
  headers: {
3326
3968
  [name: string]: unknown;
3327
3969
  };
3328
3970
  content: {
3329
- "application/json": components["schemas"]["UpdateFolderResponse"];
3971
+ "application/json": components["schemas"]["RemoveChildResponse"];
3330
3972
  };
3331
3973
  };
3332
3974
  /** @description Bad Request - Invalid input */
@@ -3416,14 +4058,12 @@ type paths = {
3416
4058
  };
3417
4059
  };
3418
4060
  };
3419
- post?: never;
3420
- delete?: never;
3421
4061
  options?: never;
3422
4062
  head?: never;
3423
4063
  patch?: never;
3424
4064
  trace?: never;
3425
4065
  };
3426
- "/folders/{id}/children": {
4066
+ "/folders/{id}/children/bulk": {
3427
4067
  parameters: {
3428
4068
  query?: never;
3429
4069
  header?: never;
@@ -3433,14 +4073,18 @@ type paths = {
3433
4073
  get?: never;
3434
4074
  put?: never;
3435
4075
  /**
3436
- * Add child to folder
3437
- * @description Adds a child entity (file or folder) to this folder.
4076
+ * Bulk add children to folder
4077
+ * @description Efficiently adds multiple children to a folder.
3438
4078
  *
3439
- * Creates bidirectional relationship:
3440
- * - Folder contains child
3441
- * - Child is in folder
4079
+ * **Limit**: Maximum 50 children per request. For larger batches, make multiple
4080
+ * requests, refetching the folder's CID between each to satisfy the CAS guard.
3442
4081
  *
3443
- * **Idempotent**: if relationship already exists, returns current state without error.
4082
+ * **Strategy**:
4083
+ * 1. Updates folder once with all 'contains' relationships
4084
+ * 2. Updates each child in parallel with 'in' back-link
4085
+ *
4086
+ * **Idempotent**: skips children that already have the relationship.
4087
+ * Returns both added and skipped children in the response.
3444
4088
  */
3445
4089
  post: {
3446
4090
  parameters: {
@@ -3454,17 +4098,17 @@ type paths = {
3454
4098
  };
3455
4099
  requestBody?: {
3456
4100
  content: {
3457
- "application/json": components["schemas"]["AddChildRequest"];
4101
+ "application/json": components["schemas"]["BulkAddChildrenRequest"];
3458
4102
  };
3459
4103
  };
3460
4104
  responses: {
3461
- /** @description Child added */
4105
+ /** @description Children added */
3462
4106
  200: {
3463
4107
  headers: {
3464
4108
  [name: string]: unknown;
3465
4109
  };
3466
4110
  content: {
3467
- "application/json": components["schemas"]["AddChildResponse"];
4111
+ "application/json": components["schemas"]["BulkAddChildrenResponse"];
3468
4112
  };
3469
4113
  };
3470
4114
  /** @description Bad Request - Invalid input */
@@ -3560,7 +4204,7 @@ type paths = {
3560
4204
  patch?: never;
3561
4205
  trace?: never;
3562
4206
  };
3563
- "/folders/{id}/children/{childId}": {
4207
+ "/folders/{id}/parents": {
3564
4208
  parameters: {
3565
4209
  query?: never;
3566
4210
  header?: never;
@@ -3569,36 +4213,39 @@ type paths = {
3569
4213
  };
3570
4214
  get?: never;
3571
4215
  put?: never;
3572
- post?: never;
3573
4216
  /**
3574
- * Remove child from folder
3575
- * @description Removes a child entity from this folder (bidirectional).
4217
+ * Add parent to folder
4218
+ * @description Adds this folder to a parent folder.
4219
+ *
4220
+ * Creates bidirectional relationship:
4221
+ * - Parent contains this folder
4222
+ * - This folder is in parent
4223
+ *
4224
+ * **Idempotent**: if relationship already exists, returns current state without error.
3576
4225
  */
3577
- delete: {
4226
+ post: {
3578
4227
  parameters: {
3579
4228
  query?: never;
3580
4229
  header?: never;
3581
4230
  path: {
3582
4231
  /** @description Entity ID (ULID) */
3583
4232
  id: string;
3584
- /** @description Child entity ID */
3585
- childId: string;
3586
4233
  };
3587
4234
  cookie?: never;
3588
4235
  };
3589
4236
  requestBody?: {
3590
4237
  content: {
3591
- "application/json": components["schemas"]["RemoveChildRequest"];
4238
+ "application/json": components["schemas"]["AddParentRequest"];
3592
4239
  };
3593
4240
  };
3594
4241
  responses: {
3595
- /** @description Child removed */
4242
+ /** @description Parent added */
3596
4243
  200: {
3597
4244
  headers: {
3598
4245
  [name: string]: unknown;
3599
4246
  };
3600
4247
  content: {
3601
- "application/json": components["schemas"]["RemoveChildResponse"];
4248
+ "application/json": components["schemas"]["AddParentResponse"];
3602
4249
  };
3603
4250
  };
3604
4251
  /** @description Bad Request - Invalid input */
@@ -3688,12 +4335,13 @@ type paths = {
3688
4335
  };
3689
4336
  };
3690
4337
  };
4338
+ delete?: never;
3691
4339
  options?: never;
3692
4340
  head?: never;
3693
4341
  patch?: never;
3694
4342
  trace?: never;
3695
4343
  };
3696
- "/folders/{id}/children/bulk": {
4344
+ "/folders/{id}/parents/{parentId}": {
3697
4345
  parameters: {
3698
4346
  query?: never;
3699
4347
  header?: never;
@@ -3702,43 +4350,36 @@ type paths = {
3702
4350
  };
3703
4351
  get?: never;
3704
4352
  put?: never;
4353
+ post?: never;
3705
4354
  /**
3706
- * Bulk add children to folder
3707
- * @description Efficiently adds multiple children to a folder.
3708
- *
3709
- * **Limit**: Maximum 50 children per request. For larger batches, make multiple
3710
- * requests, refetching the folder's CID between each to satisfy the CAS guard.
3711
- *
3712
- * **Strategy**:
3713
- * 1. Updates folder once with all 'contains' relationships
3714
- * 2. Updates each child in parallel with 'in' back-link
3715
- *
3716
- * **Idempotent**: skips children that already have the relationship.
3717
- * Returns both added and skipped children in the response.
4355
+ * Remove parent from folder
4356
+ * @description Removes this folder from a parent folder (bidirectional).
3718
4357
  */
3719
- post: {
4358
+ delete: {
3720
4359
  parameters: {
3721
4360
  query?: never;
3722
4361
  header?: never;
3723
4362
  path: {
3724
4363
  /** @description Entity ID (ULID) */
3725
4364
  id: string;
4365
+ /** @description Parent folder ID */
4366
+ parentId: string;
3726
4367
  };
3727
4368
  cookie?: never;
3728
4369
  };
3729
4370
  requestBody?: {
3730
4371
  content: {
3731
- "application/json": components["schemas"]["BulkAddChildrenRequest"];
4372
+ "application/json": components["schemas"]["RemoveParentRequest"];
3732
4373
  };
3733
4374
  };
3734
4375
  responses: {
3735
- /** @description Children added */
4376
+ /** @description Parent removed */
3736
4377
  200: {
3737
4378
  headers: {
3738
4379
  [name: string]: unknown;
3739
4380
  };
3740
4381
  content: {
3741
- "application/json": components["schemas"]["BulkAddChildrenResponse"];
4382
+ "application/json": components["schemas"]["RemoveParentResponse"];
3742
4383
  };
3743
4384
  };
3744
4385
  /** @description Bad Request - Invalid input */
@@ -3828,34 +4469,30 @@ type paths = {
3828
4469
  };
3829
4470
  };
3830
4471
  };
3831
- delete?: never;
3832
4472
  options?: never;
3833
4473
  head?: never;
3834
4474
  patch?: never;
3835
4475
  trace?: never;
3836
4476
  };
3837
- "/folders/{id}/parents": {
4477
+ "/versions/{id}": {
3838
4478
  parameters: {
3839
4479
  query?: never;
3840
4480
  header?: never;
3841
4481
  path?: never;
3842
4482
  cookie?: never;
3843
4483
  };
3844
- get?: never;
3845
- put?: never;
3846
4484
  /**
3847
- * Add parent to folder
3848
- * @description Adds this folder to a parent folder.
3849
- *
3850
- * Creates bidirectional relationship:
3851
- * - Parent contains this folder
3852
- * - This folder is in parent
3853
- *
3854
- * **Idempotent**: if relationship already exists, returns current state without error.
4485
+ * List version history
4486
+ * @description Returns version metadata for an entity (newest first). Use pagination for entities with many versions.
3855
4487
  */
3856
- post: {
4488
+ get: {
3857
4489
  parameters: {
3858
- query?: never;
4490
+ query?: {
4491
+ /** @description Maximum versions to return (1-10, default 10) */
4492
+ limit?: number;
4493
+ /** @description CID to start from (for pagination) */
4494
+ from?: string;
4495
+ };
3859
4496
  header?: never;
3860
4497
  path: {
3861
4498
  /** @description Entity ID (ULID) */
@@ -3863,19 +4500,15 @@ type paths = {
3863
4500
  };
3864
4501
  cookie?: never;
3865
4502
  };
3866
- requestBody?: {
3867
- content: {
3868
- "application/json": components["schemas"]["AddParentRequest"];
3869
- };
3870
- };
4503
+ requestBody?: never;
3871
4504
  responses: {
3872
- /** @description Parent added */
4505
+ /** @description Version list */
3873
4506
  200: {
3874
4507
  headers: {
3875
4508
  [name: string]: unknown;
3876
4509
  };
3877
4510
  content: {
3878
- "application/json": components["schemas"]["AddParentResponse"];
4511
+ "application/json": components["schemas"]["VersionListResponse"];
3879
4512
  };
3880
4513
  };
3881
4514
  /** @description Bad Request - Invalid input */
@@ -3903,20 +4536,76 @@ type paths = {
3903
4536
  "application/json": components["schemas"]["ValidationErrorResponse"];
3904
4537
  };
3905
4538
  };
3906
- /** @description Unauthorized - Missing or invalid authentication */
3907
- 401: {
4539
+ /** @description Forbidden - Insufficient permissions */
4540
+ 403: {
3908
4541
  headers: {
3909
4542
  [name: string]: unknown;
3910
4543
  };
3911
4544
  content: {
3912
4545
  /**
3913
4546
  * @example {
3914
- * "error": "Unauthorized: Missing or invalid authentication token"
4547
+ * "error": "Forbidden: You do not have permission to perform this action"
4548
+ * }
4549
+ */
4550
+ "application/json": components["schemas"]["ErrorResponse"];
4551
+ };
4552
+ };
4553
+ /** @description Not Found - Resource does not exist */
4554
+ 404: {
4555
+ headers: {
4556
+ [name: string]: unknown;
4557
+ };
4558
+ content: {
4559
+ /**
4560
+ * @example {
4561
+ * "error": "Entity not found"
3915
4562
  * }
3916
4563
  */
3917
4564
  "application/json": components["schemas"]["ErrorResponse"];
3918
4565
  };
3919
4566
  };
4567
+ };
4568
+ };
4569
+ put?: never;
4570
+ post?: never;
4571
+ delete?: never;
4572
+ options?: never;
4573
+ head?: never;
4574
+ patch?: never;
4575
+ trace?: never;
4576
+ };
4577
+ "/versions/manifest/{cid}": {
4578
+ parameters: {
4579
+ query?: never;
4580
+ header?: never;
4581
+ path?: never;
4582
+ cookie?: never;
4583
+ };
4584
+ /**
4585
+ * Get manifest by CID
4586
+ * @description Returns the full manifest for any version by its CID. Permission is checked against the entity ID in the manifest.
4587
+ */
4588
+ get: {
4589
+ parameters: {
4590
+ query?: never;
4591
+ header?: never;
4592
+ path: {
4593
+ /** @description IPFS Content Identifier (CID) of the manifest */
4594
+ cid: string;
4595
+ };
4596
+ cookie?: never;
4597
+ };
4598
+ requestBody?: never;
4599
+ responses: {
4600
+ /** @description Manifest found */
4601
+ 200: {
4602
+ headers: {
4603
+ [name: string]: unknown;
4604
+ };
4605
+ content: {
4606
+ "application/json": components["schemas"]["ManifestResponse"];
4607
+ };
4608
+ };
3920
4609
  /** @description Forbidden - Insufficient permissions */
3921
4610
  403: {
3922
4611
  headers: {
@@ -3945,33 +4634,63 @@ type paths = {
3945
4634
  "application/json": components["schemas"]["ErrorResponse"];
3946
4635
  };
3947
4636
  };
3948
- /** @description Conflict - CAS validation failed (entity was modified) */
3949
- 409: {
4637
+ };
4638
+ };
4639
+ put?: never;
4640
+ post?: never;
4641
+ delete?: never;
4642
+ options?: never;
4643
+ head?: never;
4644
+ patch?: never;
4645
+ trace?: never;
4646
+ };
4647
+ "/permissions": {
4648
+ parameters: {
4649
+ query?: never;
4650
+ header?: never;
4651
+ path?: never;
4652
+ cookie?: never;
4653
+ };
4654
+ /**
4655
+ * Get permission system metadata
4656
+ * @description Returns all registered actions, verbs, types, verb implications, wildcard patterns, and default roles.
4657
+ *
4658
+ * This endpoint is useful for:
4659
+ * - Building dynamic role editors
4660
+ * - Understanding available permissions
4661
+ * - Validating actions client-side
4662
+ *
4663
+ * All data is auto-generated from the actual permission system, so it's always in sync with the code.
4664
+ */
4665
+ get: {
4666
+ parameters: {
4667
+ query?: never;
4668
+ header?: never;
4669
+ path?: never;
4670
+ cookie?: never;
4671
+ };
4672
+ requestBody?: never;
4673
+ responses: {
4674
+ /** @description Permission system metadata */
4675
+ 200: {
3950
4676
  headers: {
3951
4677
  [name: string]: unknown;
3952
4678
  };
3953
4679
  content: {
3954
- /**
3955
- * @example {
3956
- * "error": "Conflict: entity was modified",
3957
- * "details": {
3958
- * "expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
3959
- * "actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
3960
- * }
3961
- * }
3962
- */
3963
- "application/json": components["schemas"]["CASErrorResponse"];
4680
+ "application/json": components["schemas"]["PermissionsResponse"];
3964
4681
  };
3965
4682
  };
3966
4683
  };
3967
4684
  };
4685
+ put?: never;
4686
+ post?: never;
3968
4687
  delete?: never;
3969
4688
  options?: never;
3970
4689
  head?: never;
3971
4690
  patch?: never;
3972
4691
  trace?: never;
3973
4692
  };
3974
- "/folders/{id}/parents/{parentId}": {
4693
+ "/agents": {
3975
4694
  parameters: {
3976
4695
  query?: never;
3977
4696
  header?: never;
@@ -3980,36 +4699,30 @@ type paths = {
3980
4699
  };
3981
4700
  get?: never;
3982
4701
  put?: never;
3983
- post?: never;
3984
4702
  /**
3985
- * Remove parent from folder
3986
- * @description Removes this folder from a parent folder (bidirectional).
4703
+ * Create an agent
4704
+ * @description Creates a new agent entity. Requires agent:create permission in the target collection.
3987
4705
  */
3988
- delete: {
4706
+ post: {
3989
4707
  parameters: {
3990
4708
  query?: never;
3991
4709
  header?: never;
3992
- path: {
3993
- /** @description Entity ID (ULID) */
3994
- id: string;
3995
- /** @description Parent folder ID */
3996
- parentId: string;
3997
- };
4710
+ path?: never;
3998
4711
  cookie?: never;
3999
4712
  };
4000
4713
  requestBody?: {
4001
4714
  content: {
4002
- "application/json": components["schemas"]["RemoveParentRequest"];
4715
+ "application/json": components["schemas"]["CreateAgentRequest"];
4003
4716
  };
4004
4717
  };
4005
4718
  responses: {
4006
- /** @description Parent removed */
4007
- 200: {
4719
+ /** @description Agent created */
4720
+ 201: {
4008
4721
  headers: {
4009
4722
  [name: string]: unknown;
4010
4723
  };
4011
4724
  content: {
4012
- "application/json": components["schemas"]["RemoveParentResponse"];
4725
+ "application/json": components["schemas"]["AgentResponse"];
4013
4726
  };
4014
4727
  };
4015
4728
  /** @description Bad Request - Invalid input */
@@ -4079,32 +4792,15 @@ type paths = {
4079
4792
  "application/json": components["schemas"]["ErrorResponse"];
4080
4793
  };
4081
4794
  };
4082
- /** @description Conflict - CAS validation failed (entity was modified) */
4083
- 409: {
4084
- headers: {
4085
- [name: string]: unknown;
4086
- };
4087
- content: {
4088
- /**
4089
- * @example {
4090
- * "error": "Conflict: entity was modified",
4091
- * "details": {
4092
- * "expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
4093
- * "actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
4094
- * }
4095
- * }
4096
- */
4097
- "application/json": components["schemas"]["CASErrorResponse"];
4098
- };
4099
- };
4100
4795
  };
4101
4796
  };
4797
+ delete?: never;
4102
4798
  options?: never;
4103
4799
  head?: never;
4104
4800
  patch?: never;
4105
4801
  trace?: never;
4106
4802
  };
4107
- "/versions/{id}": {
4803
+ "/agents/{id}": {
4108
4804
  parameters: {
4109
4805
  query?: never;
4110
4806
  header?: never;
@@ -4112,17 +4808,12 @@ type paths = {
4112
4808
  cookie?: never;
4113
4809
  };
4114
4810
  /**
4115
- * List version history
4116
- * @description Returns version metadata for an entity (newest first). Use pagination for entities with many versions.
4811
+ * Get agent by ID
4812
+ * @description Returns an agent entity by ID.
4117
4813
  */
4118
4814
  get: {
4119
4815
  parameters: {
4120
- query?: {
4121
- /** @description Maximum versions to return (1-10, default 10) */
4122
- limit?: number;
4123
- /** @description CID to start from (for pagination) */
4124
- from?: string;
4125
- };
4816
+ query?: never;
4126
4817
  header?: never;
4127
4818
  path: {
4128
4819
  /** @description Entity ID (ULID) */
@@ -4132,38 +4823,13 @@ type paths = {
4132
4823
  };
4133
4824
  requestBody?: never;
4134
4825
  responses: {
4135
- /** @description Version list */
4826
+ /** @description Agent found */
4136
4827
  200: {
4137
4828
  headers: {
4138
4829
  [name: string]: unknown;
4139
4830
  };
4140
4831
  content: {
4141
- "application/json": components["schemas"]["VersionListResponse"];
4142
- };
4143
- };
4144
- /** @description Bad Request - Invalid input */
4145
- 400: {
4146
- headers: {
4147
- [name: string]: unknown;
4148
- };
4149
- content: {
4150
- /**
4151
- * @example {
4152
- * "error": "Validation failed",
4153
- * "details": {
4154
- * "issues": [
4155
- * {
4156
- * "path": [
4157
- * "properties",
4158
- * "label"
4159
- * ],
4160
- * "message": "Required"
4161
- * }
4162
- * ]
4163
- * }
4164
- * }
4165
- */
4166
- "application/json": components["schemas"]["ValidationErrorResponse"];
4832
+ "application/json": components["schemas"]["AgentResponse"];
4167
4833
  };
4168
4834
  };
4169
4835
  /** @description Forbidden - Insufficient permissions */
@@ -4196,44 +4862,72 @@ type paths = {
4196
4862
  };
4197
4863
  };
4198
4864
  };
4199
- put?: never;
4200
- post?: never;
4201
- delete?: never;
4202
- options?: never;
4203
- head?: never;
4204
- patch?: never;
4205
- trace?: never;
4206
- };
4207
- "/versions/manifest/{cid}": {
4208
- parameters: {
4209
- query?: never;
4210
- header?: never;
4211
- path?: never;
4212
- cookie?: never;
4213
- };
4214
4865
  /**
4215
- * Get manifest by CID
4216
- * @description Returns the full manifest for any version by its CID. Permission is checked against the entity ID in the manifest.
4866
+ * Update agent
4867
+ * @description Updates an agent. Requires agent:update permission.
4217
4868
  */
4218
- get: {
4869
+ put: {
4219
4870
  parameters: {
4220
4871
  query?: never;
4221
4872
  header?: never;
4222
4873
  path: {
4223
- /** @description IPFS Content Identifier (CID) of the manifest */
4224
- cid: string;
4874
+ /** @description Entity ID (ULID) */
4875
+ id: string;
4225
4876
  };
4226
4877
  cookie?: never;
4227
4878
  };
4228
- requestBody?: never;
4879
+ requestBody?: {
4880
+ content: {
4881
+ "application/json": components["schemas"]["UpdateAgentRequest"];
4882
+ };
4883
+ };
4229
4884
  responses: {
4230
- /** @description Manifest found */
4885
+ /** @description Agent updated */
4231
4886
  200: {
4232
4887
  headers: {
4233
4888
  [name: string]: unknown;
4234
4889
  };
4235
4890
  content: {
4236
- "application/json": components["schemas"]["ManifestResponse"];
4891
+ "application/json": components["schemas"]["AgentUpdateResponse"];
4892
+ };
4893
+ };
4894
+ /** @description Bad Request - Invalid input */
4895
+ 400: {
4896
+ headers: {
4897
+ [name: string]: unknown;
4898
+ };
4899
+ content: {
4900
+ /**
4901
+ * @example {
4902
+ * "error": "Validation failed",
4903
+ * "details": {
4904
+ * "issues": [
4905
+ * {
4906
+ * "path": [
4907
+ * "properties",
4908
+ * "label"
4909
+ * ],
4910
+ * "message": "Required"
4911
+ * }
4912
+ * ]
4913
+ * }
4914
+ * }
4915
+ */
4916
+ "application/json": components["schemas"]["ValidationErrorResponse"];
4917
+ };
4918
+ };
4919
+ /** @description Unauthorized - Missing or invalid authentication */
4920
+ 401: {
4921
+ headers: {
4922
+ [name: string]: unknown;
4923
+ };
4924
+ content: {
4925
+ /**
4926
+ * @example {
4927
+ * "error": "Unauthorized: Missing or invalid authentication token"
4928
+ * }
4929
+ */
4930
+ "application/json": components["schemas"]["ErrorResponse"];
4237
4931
  };
4238
4932
  };
4239
4933
  /** @description Forbidden - Insufficient permissions */
@@ -4264,55 +4958,26 @@ type paths = {
4264
4958
  "application/json": components["schemas"]["ErrorResponse"];
4265
4959
  };
4266
4960
  };
4267
- };
4268
- };
4269
- put?: never;
4270
- post?: never;
4271
- delete?: never;
4272
- options?: never;
4273
- head?: never;
4274
- patch?: never;
4275
- trace?: never;
4276
- };
4277
- "/permissions": {
4278
- parameters: {
4279
- query?: never;
4280
- header?: never;
4281
- path?: never;
4282
- cookie?: never;
4283
- };
4284
- /**
4285
- * Get permission system metadata
4286
- * @description Returns all registered actions, verbs, types, verb implications, wildcard patterns, and default roles.
4287
- *
4288
- * This endpoint is useful for:
4289
- * - Building dynamic role editors
4290
- * - Understanding available permissions
4291
- * - Validating actions client-side
4292
- *
4293
- * All data is auto-generated from the actual permission system, so it's always in sync with the code.
4294
- */
4295
- get: {
4296
- parameters: {
4297
- query?: never;
4298
- header?: never;
4299
- path?: never;
4300
- cookie?: never;
4301
- };
4302
- requestBody?: never;
4303
- responses: {
4304
- /** @description Permission system metadata */
4305
- 200: {
4961
+ /** @description Conflict - CAS validation failed (entity was modified) */
4962
+ 409: {
4306
4963
  headers: {
4307
4964
  [name: string]: unknown;
4308
4965
  };
4309
4966
  content: {
4310
- "application/json": components["schemas"]["PermissionsResponse"];
4967
+ /**
4968
+ * @example {
4969
+ * "error": "Conflict: entity was modified",
4970
+ * "details": {
4971
+ * "expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
4972
+ * "actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
4973
+ * }
4974
+ * }
4975
+ */
4976
+ "application/json": components["schemas"]["CASErrorResponse"];
4311
4977
  };
4312
4978
  };
4313
4979
  };
4314
4980
  };
4315
- put?: never;
4316
4981
  post?: never;
4317
4982
  delete?: never;
4318
4983
  options?: never;
@@ -4320,7 +4985,7 @@ type paths = {
4320
4985
  patch?: never;
4321
4986
  trace?: never;
4322
4987
  };
4323
- "/agents": {
4988
+ "/agents/{id}/invoke": {
4324
4989
  parameters: {
4325
4990
  query?: never;
4326
4991
  header?: never;
@@ -4330,29 +4995,47 @@ type paths = {
4330
4995
  get?: never;
4331
4996
  put?: never;
4332
4997
  /**
4333
- * Create an agent
4334
- * @description Creates a new agent entity. Requires agent:create permission in the target collection.
4998
+ * Invoke an agent
4999
+ * @description Invoke an agent to perform work on a target collection.
5000
+ *
5001
+ * **Two-phase interaction:**
5002
+ * 1. First call with `confirm: false` (default) returns a preview of permissions that will be granted
5003
+ * 2. After user reviews and confirms, call again with `confirm: true` to execute
5004
+ *
5005
+ * The agent receives temporal (time-limited) permissions on the target collection.
4335
5006
  */
4336
5007
  post: {
4337
5008
  parameters: {
4338
5009
  query?: never;
4339
5010
  header?: never;
4340
- path?: never;
5011
+ path: {
5012
+ /** @description Entity ID (ULID) */
5013
+ id: string;
5014
+ };
4341
5015
  cookie?: never;
4342
5016
  };
4343
5017
  requestBody?: {
4344
5018
  content: {
4345
- "application/json": components["schemas"]["CreateAgentRequest"];
5019
+ "application/json": components["schemas"]["InvokeAgentRequest"];
5020
+ };
5021
+ };
5022
+ responses: {
5023
+ /** @description Invoke preview (confirm: false) or execution started (confirm: true) */
5024
+ 200: {
5025
+ headers: {
5026
+ [name: string]: unknown;
5027
+ };
5028
+ content: {
5029
+ "application/json": components["schemas"]["InvokePreviewResponse"];
5030
+ };
4346
5031
  };
4347
- };
4348
- responses: {
4349
- /** @description Agent created */
4350
- 201: {
5032
+ /** @description Agent execution started */
5033
+ 202: {
4351
5034
  headers: {
4352
5035
  [name: string]: unknown;
4353
5036
  };
4354
5037
  content: {
4355
- "application/json": components["schemas"]["AgentResponse"];
5038
+ "application/json": components["schemas"]["InvokeConfirmedResponse"];
4356
5039
  };
4357
5040
  };
4358
5041
  /** @description Bad Request - Invalid input */
@@ -4430,7 +5113,7 @@ type paths = {
4430
5113
  patch?: never;
4431
5114
  trace?: never;
4432
5115
  };
4433
- "/agents/{id}": {
5116
+ "/agents/{id}/keys": {
4434
5117
  parameters: {
4435
5118
  query?: never;
4436
5119
  header?: never;
@@ -4438,8 +5121,8 @@ type paths = {
4438
5121
  cookie?: never;
4439
5122
  };
4440
5123
  /**
4441
- * Get agent by ID
4442
- * @description Returns an agent entity by ID.
5124
+ * List API keys for agent
5125
+ * @description Lists all active API keys for the agent (without the actual key values).
4443
5126
  */
4444
5127
  get: {
4445
5128
  parameters: {
@@ -4453,13 +5136,27 @@ type paths = {
4453
5136
  };
4454
5137
  requestBody?: never;
4455
5138
  responses: {
4456
- /** @description Agent found */
5139
+ /** @description API keys listed */
4457
5140
  200: {
4458
5141
  headers: {
4459
5142
  [name: string]: unknown;
4460
5143
  };
4461
5144
  content: {
4462
- "application/json": components["schemas"]["AgentResponse"];
5145
+ "application/json": components["schemas"]["ListAgentApiKeysResponse"];
5146
+ };
5147
+ };
5148
+ /** @description Unauthorized - Missing or invalid authentication */
5149
+ 401: {
5150
+ headers: {
5151
+ [name: string]: unknown;
5152
+ };
5153
+ content: {
5154
+ /**
5155
+ * @example {
5156
+ * "error": "Unauthorized: Missing or invalid authentication token"
5157
+ * }
5158
+ */
5159
+ "application/json": components["schemas"]["ErrorResponse"];
4463
5160
  };
4464
5161
  };
4465
5162
  /** @description Forbidden - Insufficient permissions */
@@ -4492,11 +5189,12 @@ type paths = {
4492
5189
  };
4493
5190
  };
4494
5191
  };
5192
+ put?: never;
4495
5193
  /**
4496
- * Update agent
4497
- * @description Updates an agent. Requires agent:update permission.
5194
+ * Create API key for agent
5195
+ * @description Creates an API key for the agent. The full key is only returned once.
4498
5196
  */
4499
- put: {
5197
+ post: {
4500
5198
  parameters: {
4501
5199
  query?: never;
4502
5200
  header?: never;
@@ -4508,17 +5206,17 @@ type paths = {
4508
5206
  };
4509
5207
  requestBody?: {
4510
5208
  content: {
4511
- "application/json": components["schemas"]["UpdateAgentRequest"];
5209
+ "application/json": components["schemas"]["CreateAgentApiKeyRequest"];
4512
5210
  };
4513
5211
  };
4514
5212
  responses: {
4515
- /** @description Agent updated */
4516
- 200: {
5213
+ /** @description API key created */
5214
+ 201: {
4517
5215
  headers: {
4518
5216
  [name: string]: unknown;
4519
5217
  };
4520
5218
  content: {
4521
- "application/json": components["schemas"]["AgentUpdateResponse"];
5219
+ "application/json": components["schemas"]["CreateAgentApiKeyResponse"];
4522
5220
  };
4523
5221
  };
4524
5222
  /** @description Bad Request - Invalid input */
@@ -4588,34 +5286,230 @@ type paths = {
4588
5286
  "application/json": components["schemas"]["ErrorResponse"];
4589
5287
  };
4590
5288
  };
4591
- /** @description Conflict - CAS validation failed (entity was modified) */
4592
- 409: {
5289
+ };
5290
+ };
5291
+ delete?: never;
5292
+ options?: never;
5293
+ head?: never;
5294
+ patch?: never;
5295
+ trace?: never;
5296
+ };
5297
+ "/agents/{id}/keys/{prefix}": {
5298
+ parameters: {
5299
+ query?: never;
5300
+ header?: never;
5301
+ path?: never;
5302
+ cookie?: never;
5303
+ };
5304
+ get?: never;
5305
+ put?: never;
5306
+ post?: never;
5307
+ /**
5308
+ * Revoke API key
5309
+ * @description Revokes an API key for the agent.
5310
+ */
5311
+ delete: {
5312
+ parameters: {
5313
+ query?: never;
5314
+ header?: never;
5315
+ path: {
5316
+ /** @description Entity ID (ULID) */
5317
+ id: string;
5318
+ prefix: string;
5319
+ };
5320
+ cookie?: never;
5321
+ };
5322
+ requestBody?: never;
5323
+ responses: {
5324
+ /** @description API key revoked */
5325
+ 204: {
5326
+ headers: {
5327
+ [name: string]: unknown;
5328
+ };
5329
+ content?: never;
5330
+ };
5331
+ /** @description Unauthorized - Missing or invalid authentication */
5332
+ 401: {
4593
5333
  headers: {
4594
5334
  [name: string]: unknown;
4595
5335
  };
4596
5336
  content: {
4597
5337
  /**
4598
5338
  * @example {
4599
- * "error": "Conflict: entity was modified",
5339
+ * "error": "Unauthorized: Missing or invalid authentication token"
5340
+ * }
5341
+ */
5342
+ "application/json": components["schemas"]["ErrorResponse"];
5343
+ };
5344
+ };
5345
+ /** @description Forbidden - Insufficient permissions */
5346
+ 403: {
5347
+ headers: {
5348
+ [name: string]: unknown;
5349
+ };
5350
+ content: {
5351
+ /**
5352
+ * @example {
5353
+ * "error": "Forbidden: You do not have permission to perform this action"
5354
+ * }
5355
+ */
5356
+ "application/json": components["schemas"]["ErrorResponse"];
5357
+ };
5358
+ };
5359
+ /** @description Not Found - Resource does not exist */
5360
+ 404: {
5361
+ headers: {
5362
+ [name: string]: unknown;
5363
+ };
5364
+ content: {
5365
+ /**
5366
+ * @example {
5367
+ * "error": "Entity not found"
5368
+ * }
5369
+ */
5370
+ "application/json": components["schemas"]["ErrorResponse"];
5371
+ };
5372
+ };
5373
+ };
5374
+ };
5375
+ options?: never;
5376
+ head?: never;
5377
+ patch?: never;
5378
+ trace?: never;
5379
+ };
5380
+ "/events": {
5381
+ parameters: {
5382
+ query?: never;
5383
+ header?: never;
5384
+ path?: never;
5385
+ cookie?: never;
5386
+ };
5387
+ /**
5388
+ * List entity change events
5389
+ * @description Returns a cursor-based list of entity change events for client synchronization.
5390
+ *
5391
+ * **Usage:**
5392
+ * - Call without cursor to get newest events
5393
+ * - Use returned `cursor` as `?cursor=` to get older events
5394
+ * - Poll without cursor periodically to check for new events
5395
+ *
5396
+ * **Sync flow:**
5397
+ * 1. Initial: `GET /events` → get newest, save highest `id` as high-water mark
5398
+ * 2. Paginate: `GET /events?cursor=X` → get older events until `has_more=false`
5399
+ * 3. Poll: `GET /events` → if newest `id` > high-water mark, process new events
5400
+ *
5401
+ * **Event data:**
5402
+ * - `id`: Auto-increment ID
5403
+ * - `pi`: Entity ID that changed
5404
+ * - `cid`: New manifest CID
5405
+ * - `ts`: ISO timestamp
5406
+ *
5407
+ * Events are ephemeral (30-day rolling window) - for full sync, use snapshots.
5408
+ */
5409
+ get: {
5410
+ parameters: {
5411
+ query?: {
5412
+ /** @description Return events older than this id (from previous response cursor) */
5413
+ cursor?: number;
5414
+ /** @description Maximum number of events to return (default: 100, max: 1000) */
5415
+ limit?: number;
5416
+ /** @description Network to query (default: main) */
5417
+ network?: "main" | "test";
5418
+ };
5419
+ header?: never;
5420
+ path?: never;
5421
+ cookie?: never;
5422
+ };
5423
+ requestBody?: never;
5424
+ responses: {
5425
+ /** @description Events list */
5426
+ 200: {
5427
+ headers: {
5428
+ [name: string]: unknown;
5429
+ };
5430
+ content: {
5431
+ "application/json": components["schemas"]["EventsListResponse"];
5432
+ };
5433
+ };
5434
+ };
5435
+ };
5436
+ put?: never;
5437
+ post?: never;
5438
+ delete?: never;
5439
+ options?: never;
5440
+ head?: never;
5441
+ patch?: never;
5442
+ trace?: never;
5443
+ };
5444
+ "/graph/paths": {
5445
+ parameters: {
5446
+ query?: never;
5447
+ header?: never;
5448
+ path?: never;
5449
+ cookie?: never;
5450
+ };
5451
+ get?: never;
5452
+ put?: never;
5453
+ /**
5454
+ * Find paths between entities
5455
+ * @description Find shortest paths between source and target entity sets using graph traversal.
5456
+ */
5457
+ post: {
5458
+ parameters: {
5459
+ query?: never;
5460
+ header?: never;
5461
+ path?: never;
5462
+ cookie?: never;
5463
+ };
5464
+ requestBody?: {
5465
+ content: {
5466
+ "application/json": components["schemas"]["PathsBetweenRequest"];
5467
+ };
5468
+ };
5469
+ responses: {
5470
+ /** @description Paths found */
5471
+ 200: {
5472
+ headers: {
5473
+ [name: string]: unknown;
5474
+ };
5475
+ content: {
5476
+ "application/json": components["schemas"]["PathsBetweenResponse"];
5477
+ };
5478
+ };
5479
+ /** @description Bad Request - Invalid input */
5480
+ 400: {
5481
+ headers: {
5482
+ [name: string]: unknown;
5483
+ };
5484
+ content: {
5485
+ /**
5486
+ * @example {
5487
+ * "error": "Validation failed",
4600
5488
  * "details": {
4601
- * "expected": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy",
4602
- * "actual": "bafyreinewabc123456789defghijklmnopqrstuvwxyz"
5489
+ * "issues": [
5490
+ * {
5491
+ * "path": [
5492
+ * "properties",
5493
+ * "label"
5494
+ * ],
5495
+ * "message": "Required"
5496
+ * }
5497
+ * ]
4603
5498
  * }
4604
5499
  * }
4605
5500
  */
4606
- "application/json": components["schemas"]["CASErrorResponse"];
5501
+ "application/json": components["schemas"]["ValidationErrorResponse"];
4607
5502
  };
4608
5503
  };
4609
5504
  };
4610
5505
  };
4611
- post?: never;
4612
5506
  delete?: never;
4613
5507
  options?: never;
4614
5508
  head?: never;
4615
5509
  patch?: never;
4616
5510
  trace?: never;
4617
5511
  };
4618
- "/agents/{id}/invoke": {
5512
+ "/graph/reachable": {
4619
5513
  parameters: {
4620
5514
  query?: never;
4621
5515
  header?: never;
@@ -4625,47 +5519,29 @@ type paths = {
4625
5519
  get?: never;
4626
5520
  put?: never;
4627
5521
  /**
4628
- * Invoke an agent
4629
- * @description Invoke an agent to perform work on a target collection.
4630
- *
4631
- * **Two-phase interaction:**
4632
- * 1. First call with `confirm: false` (default) returns a preview of permissions that will be granted
4633
- * 2. After user reviews and confirms, call again with `confirm: true` to execute
4634
- *
4635
- * The agent receives temporal (time-limited) permissions on the target collection.
5522
+ * Find reachable entities
5523
+ * @description Find all entities of a specific type reachable from source entities within N hops.
4636
5524
  */
4637
5525
  post: {
4638
5526
  parameters: {
4639
5527
  query?: never;
4640
5528
  header?: never;
4641
- path: {
4642
- /** @description Entity ID (ULID) */
4643
- id: string;
4644
- };
5529
+ path?: never;
4645
5530
  cookie?: never;
4646
5531
  };
4647
5532
  requestBody?: {
4648
5533
  content: {
4649
- "application/json": components["schemas"]["InvokeAgentRequest"];
5534
+ "application/json": components["schemas"]["PathsReachableRequest"];
4650
5535
  };
4651
5536
  };
4652
5537
  responses: {
4653
- /** @description Invoke preview (confirm: false) or execution started (confirm: true) */
5538
+ /** @description Reachable entities found */
4654
5539
  200: {
4655
5540
  headers: {
4656
5541
  [name: string]: unknown;
4657
5542
  };
4658
5543
  content: {
4659
- "application/json": components["schemas"]["InvokePreviewResponse"];
4660
- };
4661
- };
4662
- /** @description Agent execution started */
4663
- 202: {
4664
- headers: {
4665
- [name: string]: unknown;
4666
- };
4667
- content: {
4668
- "application/json": components["schemas"]["InvokeConfirmedResponse"];
5544
+ "application/json": components["schemas"]["PathsReachableResponse"];
4669
5545
  };
4670
5546
  };
4671
5547
  /** @description Bad Request - Invalid input */
@@ -4693,48 +5569,6 @@ type paths = {
4693
5569
  "application/json": components["schemas"]["ValidationErrorResponse"];
4694
5570
  };
4695
5571
  };
4696
- /** @description Unauthorized - Missing or invalid authentication */
4697
- 401: {
4698
- headers: {
4699
- [name: string]: unknown;
4700
- };
4701
- content: {
4702
- /**
4703
- * @example {
4704
- * "error": "Unauthorized: Missing or invalid authentication token"
4705
- * }
4706
- */
4707
- "application/json": components["schemas"]["ErrorResponse"];
4708
- };
4709
- };
4710
- /** @description Forbidden - Insufficient permissions */
4711
- 403: {
4712
- headers: {
4713
- [name: string]: unknown;
4714
- };
4715
- content: {
4716
- /**
4717
- * @example {
4718
- * "error": "Forbidden: You do not have permission to perform this action"
4719
- * }
4720
- */
4721
- "application/json": components["schemas"]["ErrorResponse"];
4722
- };
4723
- };
4724
- /** @description Not Found - Resource does not exist */
4725
- 404: {
4726
- headers: {
4727
- [name: string]: unknown;
4728
- };
4729
- content: {
4730
- /**
4731
- * @example {
4732
- * "error": "Entity not found"
4733
- * }
4734
- */
4735
- "application/json": components["schemas"]["ErrorResponse"];
4736
- };
4737
- };
4738
5572
  };
4739
5573
  };
4740
5574
  delete?: never;
@@ -4743,7 +5577,7 @@ type paths = {
4743
5577
  patch?: never;
4744
5578
  trace?: never;
4745
5579
  };
4746
- "/agents/{id}/keys": {
5580
+ "/graph/entity/{id}": {
4747
5581
  parameters: {
4748
5582
  query?: never;
4749
5583
  header?: never;
@@ -4751,8 +5585,8 @@ type paths = {
4751
5585
  cookie?: never;
4752
5586
  };
4753
5587
  /**
4754
- * List API keys for agent
4755
- * @description Lists all active API keys for the agent (without the actual key values).
5588
+ * Get entity from graph
5589
+ * @description Get entity details with all relationships from the graph database.
4756
5590
  */
4757
5591
  get: {
4758
5592
  parameters: {
@@ -4766,41 +5600,13 @@ type paths = {
4766
5600
  };
4767
5601
  requestBody?: never;
4768
5602
  responses: {
4769
- /** @description API keys listed */
5603
+ /** @description Entity found */
4770
5604
  200: {
4771
5605
  headers: {
4772
5606
  [name: string]: unknown;
4773
5607
  };
4774
5608
  content: {
4775
- "application/json": components["schemas"]["ListAgentApiKeysResponse"];
4776
- };
4777
- };
4778
- /** @description Unauthorized - Missing or invalid authentication */
4779
- 401: {
4780
- headers: {
4781
- [name: string]: unknown;
4782
- };
4783
- content: {
4784
- /**
4785
- * @example {
4786
- * "error": "Unauthorized: Missing or invalid authentication token"
4787
- * }
4788
- */
4789
- "application/json": components["schemas"]["ErrorResponse"];
4790
- };
4791
- };
4792
- /** @description Forbidden - Insufficient permissions */
4793
- 403: {
4794
- headers: {
4795
- [name: string]: unknown;
4796
- };
4797
- content: {
4798
- /**
4799
- * @example {
4800
- * "error": "Forbidden: You do not have permission to perform this action"
4801
- * }
4802
- */
4803
- "application/json": components["schemas"]["ErrorResponse"];
5609
+ "application/json": components["schemas"]["GraphEntityResponse"];
4804
5610
  };
4805
5611
  };
4806
5612
  /** @description Not Found - Resource does not exist */
@@ -4820,33 +5626,79 @@ type paths = {
4820
5626
  };
4821
5627
  };
4822
5628
  put?: never;
5629
+ post?: never;
5630
+ delete?: never;
5631
+ options?: never;
5632
+ head?: never;
5633
+ patch?: never;
5634
+ trace?: never;
5635
+ };
5636
+ "/query": {
5637
+ parameters: {
5638
+ query?: never;
5639
+ header?: never;
5640
+ path?: never;
5641
+ cookie?: never;
5642
+ };
5643
+ get?: never;
5644
+ put?: never;
4823
5645
  /**
4824
- * Create API key for agent
4825
- * @description Creates an API key for the agent. The full key is only returned once.
5646
+ * Execute Argo query
5647
+ * @description Execute an Argo DSL query for path-based graph traversal.
5648
+ *
5649
+ * ## Query Syntax
5650
+ *
5651
+ * ```
5652
+ * ENTRY_POINT [ENTRY_FILTER] [-[RELATION]{DEPTH}-> TARGET_FILTER]...
5653
+ * ```
5654
+ *
5655
+ * ### Entry Points
5656
+ *
5657
+ * | Syntax | Description | Example |
5658
+ * |--------|-------------|---------|
5659
+ * | `"text"` | Semantic search | `"george washington"` |
5660
+ * | `@id` | Exact entity ID | `@01KE4ZY69F9R40E88PK9S0TQRQ` |
5661
+ * | `type:X` | All entities of type | `type:person` |
5662
+ * | `type:X ~ "text"` | Semantic search within type | `type:person ~ "physician"` |
5663
+ *
5664
+ * ### Edges (Hops)
5665
+ *
5666
+ * | Syntax | Direction |
5667
+ * |--------|-----------|
5668
+ * | `-[*]->` | Outgoing |
5669
+ * | `<-[*]-` | Incoming |
5670
+ * | `<-[*]->` | Both |
5671
+ * | `-[*]{,4}->` | Variable depth (1-4) |
5672
+ *
5673
+ * ### Examples
5674
+ *
5675
+ * ```
5676
+ * "george washington" # Simple semantic search
5677
+ * "albert einstein" type:person # With type filter
5678
+ * "medical college" -[*]{,4}-> type:file # Find files connected to concept
5679
+ * @01KE4ZY... -[*]{,2}-> type:person # Find people near entity
5680
+ * ```
4826
5681
  */
4827
5682
  post: {
4828
5683
  parameters: {
4829
5684
  query?: never;
4830
5685
  header?: never;
4831
- path: {
4832
- /** @description Entity ID (ULID) */
4833
- id: string;
4834
- };
5686
+ path?: never;
4835
5687
  cookie?: never;
4836
5688
  };
4837
5689
  requestBody?: {
4838
5690
  content: {
4839
- "application/json": components["schemas"]["CreateAgentApiKeyRequest"];
5691
+ "application/json": components["schemas"]["QueryRequest"];
4840
5692
  };
4841
5693
  };
4842
5694
  responses: {
4843
- /** @description API key created */
4844
- 201: {
5695
+ /** @description Query executed successfully */
5696
+ 200: {
4845
5697
  headers: {
4846
5698
  [name: string]: unknown;
4847
5699
  };
4848
5700
  content: {
4849
- "application/json": components["schemas"]["CreateAgentApiKeyResponse"];
5701
+ "application/json": components["schemas"]["QueryResponse"];
4850
5702
  };
4851
5703
  };
4852
5704
  /** @description Bad Request - Invalid input */
@@ -4874,18 +5726,55 @@ type paths = {
4874
5726
  "application/json": components["schemas"]["ValidationErrorResponse"];
4875
5727
  };
4876
5728
  };
4877
- /** @description Unauthorized - Missing or invalid authentication */
4878
- 401: {
5729
+ };
5730
+ };
5731
+ delete?: never;
5732
+ options?: never;
5733
+ head?: never;
5734
+ patch?: never;
5735
+ trace?: never;
5736
+ };
5737
+ "/entities/{id}/attestation": {
5738
+ parameters: {
5739
+ query?: never;
5740
+ header?: never;
5741
+ path?: never;
5742
+ cookie?: never;
5743
+ };
5744
+ /**
5745
+ * Get latest attestation
5746
+ * @description Returns the Arweave attestation for the current (latest) version of an entity.
5747
+ *
5748
+ * Returns 202 Accepted if the attestation upload is still pending.
5749
+ */
5750
+ get: {
5751
+ parameters: {
5752
+ query?: never;
5753
+ header?: never;
5754
+ path: {
5755
+ /** @description Entity ID (ULID) */
5756
+ id: string;
5757
+ };
5758
+ cookie?: never;
5759
+ };
5760
+ requestBody?: never;
5761
+ responses: {
5762
+ /** @description Attestation found */
5763
+ 200: {
4879
5764
  headers: {
4880
5765
  [name: string]: unknown;
4881
5766
  };
4882
5767
  content: {
4883
- /**
4884
- * @example {
4885
- * "error": "Unauthorized: Missing or invalid authentication token"
4886
- * }
4887
- */
4888
- "application/json": components["schemas"]["ErrorResponse"];
5768
+ "application/json": components["schemas"]["AttestationResponse"];
5769
+ };
5770
+ };
5771
+ /** @description Attestation pending */
5772
+ 202: {
5773
+ headers: {
5774
+ [name: string]: unknown;
5775
+ };
5776
+ content: {
5777
+ "application/json": components["schemas"]["AttestationPendingResponse"];
4889
5778
  };
4890
5779
  };
4891
5780
  /** @description Forbidden - Insufficient permissions */
@@ -4918,58 +5807,46 @@ type paths = {
4918
5807
  };
4919
5808
  };
4920
5809
  };
5810
+ put?: never;
5811
+ post?: never;
4921
5812
  delete?: never;
4922
5813
  options?: never;
4923
5814
  head?: never;
4924
5815
  patch?: never;
4925
5816
  trace?: never;
4926
5817
  };
4927
- "/agents/{id}/keys/{prefix}": {
5818
+ "/versions/{id}/{ver}/attestation": {
4928
5819
  parameters: {
4929
5820
  query?: never;
4930
5821
  header?: never;
4931
5822
  path?: never;
4932
5823
  cookie?: never;
4933
5824
  };
4934
- get?: never;
4935
- put?: never;
4936
- post?: never;
4937
5825
  /**
4938
- * Revoke API key
4939
- * @description Revokes an API key for the agent.
5826
+ * Get version attestation
5827
+ * @description Returns the Arweave attestation for a specific version of an entity.
4940
5828
  */
4941
- delete: {
5829
+ get: {
4942
5830
  parameters: {
4943
5831
  query?: never;
4944
5832
  header?: never;
4945
5833
  path: {
4946
5834
  /** @description Entity ID (ULID) */
4947
5835
  id: string;
4948
- prefix: string;
5836
+ /** @description Version number */
5837
+ ver: number;
4949
5838
  };
4950
5839
  cookie?: never;
4951
5840
  };
4952
5841
  requestBody?: never;
4953
5842
  responses: {
4954
- /** @description API key revoked */
4955
- 204: {
4956
- headers: {
4957
- [name: string]: unknown;
4958
- };
4959
- content?: never;
4960
- };
4961
- /** @description Unauthorized - Missing or invalid authentication */
4962
- 401: {
5843
+ /** @description Attestation found */
5844
+ 200: {
4963
5845
  headers: {
4964
5846
  [name: string]: unknown;
4965
5847
  };
4966
5848
  content: {
4967
- /**
4968
- * @example {
4969
- * "error": "Unauthorized: Missing or invalid authentication token"
4970
- * }
4971
- */
4972
- "application/json": components["schemas"]["ErrorResponse"];
5849
+ "application/json": components["schemas"]["AttestationResponse"];
4973
5850
  };
4974
5851
  };
4975
5852
  /** @description Forbidden - Insufficient permissions */
@@ -5002,12 +5879,15 @@ type paths = {
5002
5879
  };
5003
5880
  };
5004
5881
  };
5882
+ put?: never;
5883
+ post?: never;
5884
+ delete?: never;
5005
5885
  options?: never;
5006
5886
  head?: never;
5007
5887
  patch?: never;
5008
5888
  trace?: never;
5009
5889
  };
5010
- "/events": {
5890
+ "/attestations/verify/{tx}": {
5011
5891
  parameters: {
5012
5892
  query?: never;
5013
5893
  header?: never;
@@ -5015,50 +5895,44 @@ type paths = {
5015
5895
  cookie?: never;
5016
5896
  };
5017
5897
  /**
5018
- * List entity change events
5019
- * @description Returns a cursor-based list of entity change events for client synchronization.
5020
- *
5021
- * **Usage:**
5022
- * - Call without cursor to get newest events
5023
- * - Use returned `cursor` as `?cursor=` to get older events
5024
- * - Poll without cursor periodically to check for new events
5025
- *
5026
- * **Sync flow:**
5027
- * 1. Initial: `GET /events` → get newest, save highest `id` as high-water mark
5028
- * 2. Paginate: `GET /events?cursor=X` → get older events until `has_more=false`
5029
- * 3. Poll: `GET /events` → if newest `id` > high-water mark, process new events
5898
+ * Verify attestation
5899
+ * @description Fetches an attestation from Arweave and verifies the CID matches the manifest content.
5030
5900
  *
5031
- * **Event data:**
5032
- * - `id`: Auto-increment ID
5033
- * - `pi`: Entity ID that changed
5034
- * - `cid`: New manifest CID
5035
- * - `ts`: ISO timestamp
5036
- *
5037
- * Events are ephemeral (30-day rolling window) - for full sync, use snapshots.
5901
+ * This is a public endpoint - anyone can verify attestations.
5038
5902
  */
5039
5903
  get: {
5040
5904
  parameters: {
5041
- query?: {
5042
- /** @description Return events older than this id (from previous response cursor) */
5043
- cursor?: number;
5044
- /** @description Maximum number of events to return (default: 100, max: 1000) */
5045
- limit?: number;
5046
- /** @description Network to query (default: main) */
5047
- network?: "main" | "test";
5048
- };
5905
+ query?: never;
5049
5906
  header?: never;
5050
- path?: never;
5907
+ path: {
5908
+ /** @description Arweave transaction ID */
5909
+ tx: string;
5910
+ };
5051
5911
  cookie?: never;
5052
5912
  };
5053
5913
  requestBody?: never;
5054
5914
  responses: {
5055
- /** @description Events list */
5915
+ /** @description Verification result */
5056
5916
  200: {
5057
5917
  headers: {
5058
5918
  [name: string]: unknown;
5059
5919
  };
5060
5920
  content: {
5061
- "application/json": components["schemas"]["EventsListResponse"];
5921
+ "application/json": components["schemas"]["VerifyAttestationResponse"];
5922
+ };
5923
+ };
5924
+ /** @description Not Found - Resource does not exist */
5925
+ 404: {
5926
+ headers: {
5927
+ [name: string]: unknown;
5928
+ };
5929
+ content: {
5930
+ /**
5931
+ * @example {
5932
+ * "error": "Entity not found"
5933
+ * }
5934
+ */
5935
+ "application/json": components["schemas"]["ErrorResponse"];
5062
5936
  };
5063
5937
  };
5064
5938
  };
@@ -5078,7 +5952,7 @@ type components = {
5078
5952
  /** @example 01J1SHMAE10000000000000000 */
5079
5953
  id: string;
5080
5954
  /**
5081
- * @description IPFS Content Identifier (CID)
5955
+ * @description Content Identifier (CID) - content-addressed hash
5082
5956
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
5083
5957
  */
5084
5958
  cid: string;
@@ -5123,7 +5997,7 @@ type components = {
5123
5997
  */
5124
5998
  id: string;
5125
5999
  /**
5126
- * @description IPFS Content Identifier (CID)
6000
+ * @description Content Identifier (CID) - content-addressed hash
5127
6001
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
5128
6002
  */
5129
6003
  cid: string;
@@ -5338,6 +6212,48 @@ type components = {
5338
6212
  /** @description List of API keys */
5339
6213
  keys: components["schemas"]["ApiKeyInfo"][];
5340
6214
  };
6215
+ UserCollectionItem: {
6216
+ /**
6217
+ * @description Collection persistent identifier
6218
+ * @example 01JCOLLECTION123456789AB
6219
+ */
6220
+ pi: string;
6221
+ /**
6222
+ * @description Collection label/name
6223
+ * @example My Research Collection
6224
+ */
6225
+ label: string;
6226
+ /**
6227
+ * @description Role predicate indicating user's relationship to collection
6228
+ * @example owner
6229
+ */
6230
+ predicate: string;
6231
+ /**
6232
+ * @description When the collection was created
6233
+ * @example 2026-01-12T00:00:00.000Z
6234
+ */
6235
+ created_at: string;
6236
+ };
6237
+ UserCollectionsResponse: {
6238
+ /**
6239
+ * @description User persistent identifier
6240
+ * @example 01JUSER123456789ABCDEFGH
6241
+ */
6242
+ user_id: string;
6243
+ /** @description Collections the user has access to */
6244
+ collections: components["schemas"]["UserCollectionItem"][];
6245
+ /** @description Pagination metadata */
6246
+ pagination: {
6247
+ /** @description Current offset */
6248
+ offset: number;
6249
+ /** @description Results per page */
6250
+ limit: number;
6251
+ /** @description Number of results returned */
6252
+ count: number;
6253
+ /** @description Whether more results exist */
6254
+ has_more: boolean;
6255
+ };
6256
+ };
5341
6257
  CollectionResponse: components["schemas"]["EntityResponse"] & {
5342
6258
  /** @enum {string} */
5343
6259
  type?: "collection";
@@ -5499,12 +6415,12 @@ type components = {
5499
6415
  */
5500
6416
  id: string;
5501
6417
  /**
5502
- * @description IPFS Content Identifier (CID)
6418
+ * @description Content Identifier (CID) - content-addressed hash
5503
6419
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
5504
6420
  */
5505
6421
  cid: string;
5506
6422
  /**
5507
- * @description IPFS Content Identifier (CID)
6423
+ * @description Content Identifier (CID) - content-addressed hash
5508
6424
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
5509
6425
  */
5510
6426
  prev_cid: string;
@@ -5609,12 +6525,12 @@ type components = {
5609
6525
  */
5610
6526
  id: string;
5611
6527
  /**
5612
- * @description IPFS Content Identifier (CID)
6528
+ * @description Content Identifier (CID) - content-addressed hash
5613
6529
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
5614
6530
  */
5615
6531
  cid: string;
5616
6532
  /**
5617
- * @description IPFS Content Identifier (CID)
6533
+ * @description Content Identifier (CID) - content-addressed hash
5618
6534
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
5619
6535
  */
5620
6536
  prev_cid: string;
@@ -5666,12 +6582,12 @@ type components = {
5666
6582
  */
5667
6583
  id: string;
5668
6584
  /**
5669
- * @description IPFS Content Identifier (CID)
6585
+ * @description Content Identifier (CID) - content-addressed hash
5670
6586
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
5671
6587
  */
5672
6588
  cid: string;
5673
6589
  /**
5674
- * @description IPFS Content Identifier (CID)
6590
+ * @description Content Identifier (CID) - content-addressed hash
5675
6591
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
5676
6592
  */
5677
6593
  prev_cid: string;
@@ -5749,7 +6665,7 @@ type components = {
5749
6665
  */
5750
6666
  id: string;
5751
6667
  /**
5752
- * @description IPFS Content Identifier (CID)
6668
+ * @description Content Identifier (CID) - content-addressed hash
5753
6669
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
5754
6670
  */
5755
6671
  cid: string;
@@ -5920,7 +6836,7 @@ type components = {
5920
6836
  */
5921
6837
  id: string;
5922
6838
  /**
5923
- * @description IPFS Content Identifier (CID)
6839
+ * @description Content Identifier (CID) - content-addressed hash
5924
6840
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
5925
6841
  */
5926
6842
  cid: string;
@@ -5935,7 +6851,7 @@ type components = {
5935
6851
  */
5936
6852
  ver: number;
5937
6853
  /**
5938
- * @description IPFS Content Identifier (CID)
6854
+ * @description Content Identifier (CID) - content-addressed hash
5939
6855
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
5940
6856
  */
5941
6857
  prev_cid: string;
@@ -6072,6 +6988,76 @@ type components = {
6072
6988
  */
6073
6989
  expect_target_tip?: string;
6074
6990
  };
6991
+ ConnectResponse: {
6992
+ source: components["schemas"]["EntityResponse"] & unknown;
6993
+ };
6994
+ ConnectRequest: {
6995
+ /**
6996
+ * @description Optional note describing this change
6997
+ * @example Added Chapter 42: The Whiteness of the Whale
6998
+ */
6999
+ note?: string;
7000
+ /**
7001
+ * @description Source entity ID (the entity you're connecting FROM)
7002
+ * @example 01JFKY3XQWM0MJVKM8DK3AEXPY
7003
+ */
7004
+ source_id: string;
7005
+ /**
7006
+ * @description Target entity ID (the entity you're connecting TO)
7007
+ * @example 01JFKY3XQWM0MJVKM8DK3AEXQZ
7008
+ */
7009
+ target_id: string;
7010
+ /**
7011
+ * @description Expected current tip CID of source entity
7012
+ * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
7013
+ */
7014
+ expect_tip: string;
7015
+ /**
7016
+ * @description Relationship predicate. Defaults to "connects_to".
7017
+ * @example connects_to
7018
+ */
7019
+ predicate?: string;
7020
+ /**
7021
+ * @description Optional display label for this connection
7022
+ * @example Related document
7023
+ */
7024
+ label?: string;
7025
+ /**
7026
+ * @description Optional description explaining why this connection exists
7027
+ * @example Links to the supporting research paper
7028
+ */
7029
+ description?: string;
7030
+ };
7031
+ DisconnectResponse: {
7032
+ source: components["schemas"]["EntityResponse"] & unknown;
7033
+ };
7034
+ DisconnectRequest: {
7035
+ /**
7036
+ * @description Optional note describing this change
7037
+ * @example Added Chapter 42: The Whiteness of the Whale
7038
+ */
7039
+ note?: string;
7040
+ /**
7041
+ * @description Source entity ID
7042
+ * @example 01JFKY3XQWM0MJVKM8DK3AEXPY
7043
+ */
7044
+ source_id: string;
7045
+ /**
7046
+ * @description Target entity ID (peer of the connection to remove)
7047
+ * @example 01JFKY3XQWM0MJVKM8DK3AEXQZ
7048
+ */
7049
+ target_id: string;
7050
+ /**
7051
+ * @description Expected current tip CID of source entity
7052
+ * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
7053
+ */
7054
+ expect_tip: string;
7055
+ /**
7056
+ * @description Relationship predicate to remove. Defaults to "connects_to".
7057
+ * @example connects_to
7058
+ */
7059
+ predicate?: string;
7060
+ };
6075
7061
  CreateFileResponse: {
6076
7062
  /**
6077
7063
  * @description Entity ID (ULID format)
@@ -6079,7 +7065,7 @@ type components = {
6079
7065
  */
6080
7066
  id: string;
6081
7067
  /**
6082
- * @description IPFS Content Identifier (CID)
7068
+ * @description Content Identifier (CID) - content-addressed hash
6083
7069
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
6084
7070
  */
6085
7071
  cid: string;
@@ -6316,7 +7302,7 @@ type components = {
6316
7302
  */
6317
7303
  id: string;
6318
7304
  /**
6319
- * @description IPFS Content Identifier (CID)
7305
+ * @description Content Identifier (CID) - content-addressed hash
6320
7306
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
6321
7307
  */
6322
7308
  cid: string;
@@ -6501,7 +7487,7 @@ type components = {
6501
7487
  */
6502
7488
  id: string;
6503
7489
  /**
6504
- * @description IPFS Content Identifier (CID)
7490
+ * @description Content Identifier (CID) - content-addressed hash
6505
7491
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
6506
7492
  */
6507
7493
  cid: string;
@@ -6539,7 +7525,7 @@ type components = {
6539
7525
  */
6540
7526
  id: string;
6541
7527
  /**
6542
- * @description IPFS Content Identifier (CID)
7528
+ * @description Content Identifier (CID) - content-addressed hash
6543
7529
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
6544
7530
  */
6545
7531
  cid: string;
@@ -6572,7 +7558,7 @@ type components = {
6572
7558
  */
6573
7559
  id: string;
6574
7560
  /**
6575
- * @description IPFS Content Identifier (CID)
7561
+ * @description Content Identifier (CID) - content-addressed hash
6576
7562
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
6577
7563
  */
6578
7564
  cid: string;
@@ -6666,7 +7652,7 @@ type components = {
6666
7652
  */
6667
7653
  ver: number;
6668
7654
  /**
6669
- * @description IPFS Content Identifier (CID)
7655
+ * @description Content Identifier (CID) - content-addressed hash
6670
7656
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
6671
7657
  */
6672
7658
  cid: string;
@@ -6691,6 +7677,17 @@ type components = {
6691
7677
  };
6692
7678
  /** @description Optional note describing this version */
6693
7679
  note?: string;
7680
+ /**
7681
+ * @description Arweave transaction ID if this version has been attested
7682
+ * @example abc123xyz...
7683
+ */
7684
+ arweave_tx?: string;
7685
+ /**
7686
+ * Format: uri
7687
+ * @description Arweave gateway URL for the attestation
7688
+ * @example https://arweave.net/abc123xyz...
7689
+ */
7690
+ arweave_url?: string;
6694
7691
  };
6695
7692
  VersionListResponse: {
6696
7693
  /**
@@ -6710,7 +7707,7 @@ type components = {
6710
7707
  };
6711
7708
  ManifestResponse: {
6712
7709
  /**
6713
- * @description IPFS Content Identifier (CID)
7710
+ * @description Content Identifier (CID) - content-addressed hash
6714
7711
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
6715
7712
  */
6716
7713
  cid: string;
@@ -7068,6 +8065,7 @@ type components = {
7068
8065
  role: string;
7069
8066
  already_granted: boolean;
7070
8067
  expired?: boolean;
8068
+ missing_actions?: boolean;
7071
8069
  /** Format: date-time */
7072
8070
  current_expires_at?: string;
7073
8071
  };
@@ -7106,7 +8104,7 @@ type components = {
7106
8104
  job_collection: string;
7107
8105
  grants: components["schemas"]["InvokeGrantResult"][];
7108
8106
  /**
7109
- * @description IPFS Content Identifier (CID)
8107
+ * @description Content Identifier (CID) - content-addressed hash
7110
8108
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
7111
8109
  */
7112
8110
  target_cid: string;
@@ -7122,7 +8120,7 @@ type components = {
7122
8120
  retry_after?: number;
7123
8121
  grants: components["schemas"]["InvokeGrantResult"][];
7124
8122
  /**
7125
- * @description IPFS Content Identifier (CID)
8123
+ * @description Content Identifier (CID) - content-addressed hash
7126
8124
  * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
7127
8125
  */
7128
8126
  target_cid: string;
@@ -7235,6 +8233,343 @@ type components = {
7235
8233
  */
7236
8234
  cursor: number;
7237
8235
  };
8236
+ PathEdge: {
8237
+ /**
8238
+ * @description Source entity PI
8239
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8240
+ */
8241
+ subject_pi: string;
8242
+ /** @description Source entity label */
8243
+ subject_label: string;
8244
+ /** @description Source entity type */
8245
+ subject_type: string;
8246
+ /** @description Relationship predicate */
8247
+ predicate: string;
8248
+ /**
8249
+ * @description Target entity PI
8250
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8251
+ */
8252
+ object_pi: string;
8253
+ /** @description Target entity label */
8254
+ object_label: string;
8255
+ /** @description Target entity type */
8256
+ object_type: string;
8257
+ };
8258
+ PathResult: {
8259
+ /**
8260
+ * @description Entity ID (ULID format)
8261
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8262
+ */
8263
+ source_pi: string;
8264
+ /**
8265
+ * @description Entity ID (ULID format)
8266
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8267
+ */
8268
+ target_pi: string;
8269
+ /** @description Path length (number of hops) */
8270
+ length: number;
8271
+ edges: components["schemas"]["PathEdge"][];
8272
+ };
8273
+ PathsBetweenResponse: {
8274
+ paths: components["schemas"]["PathResult"][];
8275
+ /** @description Whether results were truncated due to limit */
8276
+ truncated: boolean;
8277
+ };
8278
+ PathsBetweenRequest: {
8279
+ /**
8280
+ * @description Starting entity PIs
8281
+ * @example [
8282
+ * "01KE4ZY69F9R40E88PK9S0TQRQ"
8283
+ * ]
8284
+ */
8285
+ source_pis: string[];
8286
+ /**
8287
+ * @description Target entity PIs
8288
+ * @example [
8289
+ * "01KE506KZGD8M2P1XK3VNQT4YR"
8290
+ * ]
8291
+ */
8292
+ target_pis: string[];
8293
+ /**
8294
+ * @description Maximum path depth (1-4)
8295
+ * @default 4
8296
+ * @example 3
8297
+ */
8298
+ max_depth: number;
8299
+ /**
8300
+ * @description Relationship traversal direction
8301
+ * @default both
8302
+ * @example both
8303
+ * @enum {string}
8304
+ */
8305
+ direction: "outgoing" | "incoming" | "both";
8306
+ /**
8307
+ * @description Maximum number of paths to return
8308
+ * @default 100
8309
+ * @example 10
8310
+ */
8311
+ limit: number;
8312
+ };
8313
+ ReachableResult: {
8314
+ /**
8315
+ * @description Entity ID (ULID format)
8316
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8317
+ */
8318
+ source_pi: string;
8319
+ /**
8320
+ * @description Entity ID (ULID format)
8321
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8322
+ */
8323
+ target_pi: string;
8324
+ target_label: string;
8325
+ target_type: string;
8326
+ /** @description Path length (number of hops) */
8327
+ length: number;
8328
+ edges: components["schemas"]["PathEdge"][];
8329
+ };
8330
+ PathsReachableResponse: {
8331
+ results: components["schemas"]["ReachableResult"][];
8332
+ /** @description Whether results were truncated due to limit */
8333
+ truncated: boolean;
8334
+ };
8335
+ PathsReachableRequest: {
8336
+ /**
8337
+ * @description Starting entity PIs
8338
+ * @example [
8339
+ * "01KE4ZY69F9R40E88PK9S0TQRQ"
8340
+ * ]
8341
+ */
8342
+ source_pis: string[];
8343
+ /**
8344
+ * @description Target entity type to find
8345
+ * @example file
8346
+ */
8347
+ target_type: string;
8348
+ /**
8349
+ * @description Maximum path depth (1-4)
8350
+ * @default 4
8351
+ * @example 3
8352
+ */
8353
+ max_depth: number;
8354
+ /**
8355
+ * @description Relationship traversal direction
8356
+ * @default both
8357
+ * @example both
8358
+ * @enum {string}
8359
+ */
8360
+ direction: "outgoing" | "incoming" | "both";
8361
+ /**
8362
+ * @description Maximum number of results to return
8363
+ * @default 100
8364
+ * @example 50
8365
+ */
8366
+ limit: number;
8367
+ };
8368
+ RelationshipInfo: {
8369
+ /** @enum {string} */
8370
+ direction: "outgoing" | "incoming";
8371
+ predicate: string;
8372
+ /**
8373
+ * @description Entity ID (ULID format)
8374
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8375
+ */
8376
+ peer_pi: string;
8377
+ peer_type: string;
8378
+ peer_label: string;
8379
+ properties: {
8380
+ [key: string]: unknown;
8381
+ };
8382
+ };
8383
+ GraphEntityResponse: {
8384
+ /**
8385
+ * @description Entity ID (ULID format)
8386
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8387
+ */
8388
+ pi: string;
8389
+ type: string;
8390
+ label: string;
8391
+ collection_pi: string | null;
8392
+ /** Format: date-time */
8393
+ created_at: string;
8394
+ /** Format: date-time */
8395
+ updated_at: string;
8396
+ relationships: components["schemas"]["RelationshipInfo"][];
8397
+ };
8398
+ QueryEntity: {
8399
+ /**
8400
+ * @description Entity ID (ULID format)
8401
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8402
+ */
8403
+ pi: string;
8404
+ type: string;
8405
+ label: string;
8406
+ collection_pi: string | null;
8407
+ };
8408
+ EntityStep: {
8409
+ entity: string;
8410
+ label?: string;
8411
+ type?: string;
8412
+ score?: number;
8413
+ };
8414
+ EdgeStep: {
8415
+ edge: string;
8416
+ /** @enum {string} */
8417
+ direction: "outgoing" | "incoming";
8418
+ score?: number;
8419
+ };
8420
+ PathStep: components["schemas"]["EntityStep"] | components["schemas"]["EdgeStep"];
8421
+ QueryResultItem: {
8422
+ entity: components["schemas"]["QueryEntity"];
8423
+ path: components["schemas"]["PathStep"][];
8424
+ score: number;
8425
+ };
8426
+ QueryMetadata: {
8427
+ query: string;
8428
+ hops: number;
8429
+ k: number;
8430
+ k_explore: number;
8431
+ total_candidates_explored: number;
8432
+ execution_time_ms: number;
8433
+ collection?: string;
8434
+ error?: string;
8435
+ reason?: string;
8436
+ partial_path?: components["schemas"]["PathStep"][];
8437
+ stopped_at_hop?: number;
8438
+ };
8439
+ QueryResponse: {
8440
+ results: components["schemas"]["QueryResultItem"][];
8441
+ metadata: components["schemas"]["QueryMetadata"];
8442
+ };
8443
+ QueryRequest: {
8444
+ /**
8445
+ * @description Argo query string
8446
+ * @example "medical college" -[*]{,4}-> type:file
8447
+ */
8448
+ path: string;
8449
+ /**
8450
+ * @description Maximum number of results to return
8451
+ * @default 10
8452
+ * @example 10
8453
+ */
8454
+ k: number;
8455
+ /**
8456
+ * @description Beam width for exploration (default: k * 3)
8457
+ * @example 30
8458
+ */
8459
+ k_explore?: number;
8460
+ /**
8461
+ * @description Scope query to collection PI
8462
+ * @example 01JCOLL_MEDICAL
8463
+ */
8464
+ collection?: string;
8465
+ };
8466
+ AttestationResponse: {
8467
+ /**
8468
+ * @description Entity ID (ULID format)
8469
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8470
+ */
8471
+ pi: string;
8472
+ /**
8473
+ * @description Entity version number
8474
+ * @example 1
8475
+ */
8476
+ ver: number;
8477
+ /**
8478
+ * @description Content Identifier (CID) - content-addressed hash
8479
+ * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
8480
+ */
8481
+ cid: string;
8482
+ /**
8483
+ * @description Arweave transaction ID
8484
+ * @example abc123xyz...
8485
+ */
8486
+ arweave_tx: string;
8487
+ /**
8488
+ * Format: uri
8489
+ * @description Arweave gateway URL for direct access
8490
+ * @example https://arweave.net/abc123xyz...
8491
+ */
8492
+ arweave_url: string;
8493
+ /**
8494
+ * @description Unix timestamp (milliseconds) of the operation
8495
+ * @example 1704455200000
8496
+ */
8497
+ ts: number;
8498
+ };
8499
+ AttestationPendingResponse: {
8500
+ /**
8501
+ * @description Entity ID (ULID format)
8502
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8503
+ */
8504
+ pi: string;
8505
+ /**
8506
+ * @description Entity version number
8507
+ * @example 1
8508
+ */
8509
+ ver: number;
8510
+ /**
8511
+ * @description Content Identifier (CID) - content-addressed hash
8512
+ * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
8513
+ */
8514
+ cid: string;
8515
+ /**
8516
+ * @description Attestation upload status
8517
+ * @enum {string}
8518
+ */
8519
+ attestation_status: "pending";
8520
+ /**
8521
+ * @description Status message
8522
+ * @example Attestation upload in progress
8523
+ */
8524
+ message: string;
8525
+ };
8526
+ VerifyAttestationResponse: {
8527
+ arweave_tx: string;
8528
+ attestation: {
8529
+ /**
8530
+ * @description Entity ID (ULID format)
8531
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8532
+ */
8533
+ pi: string;
8534
+ /**
8535
+ * @description Entity version number
8536
+ * @example 1
8537
+ */
8538
+ ver: number;
8539
+ /**
8540
+ * @description Content Identifier (CID) - content-addressed hash
8541
+ * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
8542
+ */
8543
+ cid: string;
8544
+ /**
8545
+ * @description Operation type: C=Create, U=Update
8546
+ * @enum {string}
8547
+ */
8548
+ op: "C" | "U";
8549
+ /**
8550
+ * @description Visibility at time of operation
8551
+ * @enum {string}
8552
+ */
8553
+ vis: "pub" | "priv";
8554
+ /**
8555
+ * @description Previous version CID (null for creates)
8556
+ * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
8557
+ */
8558
+ prev_cid: string | null;
8559
+ /** @description Unix timestamp (milliseconds) */
8560
+ ts: number;
8561
+ };
8562
+ /** @description True if hash(manifest) matches the attested CID */
8563
+ cid_valid: boolean;
8564
+ /** @description Truncated preview of the manifest content */
8565
+ manifest_preview: {
8566
+ /**
8567
+ * @description Entity type
8568
+ * @example collection
8569
+ */
8570
+ type: string;
8571
+ };
8572
+ };
7238
8573
  };
7239
8574
  responses: never;
7240
8575
  parameters: never;