@arke-institute/sdk 2.3.14 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * Source: Arke v1 API
8
8
  * Version: 1.0.0
9
- * Generated: 2026-01-22T18:25:50.170Z
9
+ * Generated: 2026-01-25T03:52:16.348Z
10
10
  */
11
11
  type paths = {
12
12
  "/ops-reference": {
@@ -708,6 +708,17 @@ type paths = {
708
708
  * - Results use cosine similarity scores (0-1)
709
709
  * - Scores are comparable across collections
710
710
  *
711
+ * ## Entity Expansion
712
+ *
713
+ * Use `expand` in the request body to fetch entity data inline with search results:
714
+ *
715
+ * - **`expand: "preview"` (default)**: Adds `entity_preview` with fresh lightweight data (id, type, label, timestamps)
716
+ * - **`expand: "full"`**: Adds `entity` with complete manifest including all properties and relationships
717
+ * - **`expand: "none"`**: Returns search metadata only (fastest, lowest bandwidth)
718
+ *
719
+ * Preview mode is recommended for most use cases. Full expansion can result in large payloads.
720
+ * Gracefully handles deleted or inaccessible entities (returns results without expansion data).
721
+ *
711
722
  *
712
723
  * ---
713
724
  * **Permission:** `search:execute`
@@ -1848,6 +1859,18 @@ type paths = {
1848
1859
  *
1849
1860
  * Supports pagination and optional type filtering. Results are ordered by creation date (newest first).
1850
1861
  *
1862
+ * **Expansion Modes:**
1863
+ *
1864
+ * By default, returns lightweight summaries from GraphDB (pi, type, label, timestamps).
1865
+ *
1866
+ * Use the `expand` parameter to hydrate entity data from storage:
1867
+ *
1868
+ * - **`?expand=preview`**: Adds `preview` field with fresh lightweight data (label, truncated description/text, timestamps). ~5-10KB per entity.
1869
+ *
1870
+ * - **`?expand=full`**: Adds `entity` field with complete manifest (all properties, relationships, version history). ~20-50KB per entity.
1871
+ *
1872
+ * **Performance Note:** Expansion requires fetching each entity from storage. Limited to 100 entities per request. Use smaller `limit` values when expanding.
1873
+ *
1851
1874
  * ---
1852
1875
  * **Permission:** `collection:view`
1853
1876
  * **Auth:** optional
@@ -1858,6 +1881,7 @@ type paths = {
1858
1881
  type?: string;
1859
1882
  limit?: number;
1860
1883
  offset?: number | null;
1884
+ expand?: "preview" | "full";
1861
1885
  };
1862
1886
  header?: never;
1863
1887
  path: {
@@ -2051,13 +2075,64 @@ type paths = {
2051
2075
  * Get entity by ID
2052
2076
  * @description Returns any entity by ID. Permission check uses parent collection if entity belongs to one.
2053
2077
  *
2078
+ * **Relationship Expansion:**
2079
+ *
2080
+ * Use the `expand=relationships[:mode]` query parameter to hydrate relationship peer data:
2081
+ *
2082
+ * - **No expansion (default)**: Returns relationships with stored `peer_label`/`peer_type` (may be stale)
2083
+ * ```json
2084
+ * { "predicate": "contains", "peer": "01KDOC...", "peer_label": "Old Label" }
2085
+ * ```
2086
+ *
2087
+ * - **`?expand=relationships:preview`**: Adds `peer_preview` with fresh lightweight data (id, type, label, truncated description/text, timestamps)
2088
+ * ```json
2089
+ * {
2090
+ * "predicate": "contains",
2091
+ * "peer": "01KDOC...",
2092
+ * "peer_label": "Old Label",
2093
+ * "peer_preview": {
2094
+ * "id": "01KDOC...",
2095
+ * "type": "document",
2096
+ * "label": "Updated Label",
2097
+ * "description_preview": "This is a document with...",
2098
+ * "created_at": "2025-01-15T10:00:00Z",
2099
+ * "updated_at": "2025-01-20T14:30:00Z"
2100
+ * }
2101
+ * }
2102
+ * ```
2103
+ *
2104
+ * - **`?expand=relationships:full`**: Adds `peer_entity` with complete entity manifest (all properties, relationships, version history)
2105
+ * ```json
2106
+ * {
2107
+ * "predicate": "contains",
2108
+ * "peer": "01KDOC...",
2109
+ * "peer_label": "Old Label",
2110
+ * "peer_entity": {
2111
+ * "id": "01KDOC...",
2112
+ * "cid": "bafyrei...",
2113
+ * "type": "document",
2114
+ * "properties": { "label": "Updated Label", "text": "..." },
2115
+ * "relationships": [...],
2116
+ * "ver": 3,
2117
+ * "created_at": "2025-01-15T10:00:00Z",
2118
+ * "ts": 1737380000000,
2119
+ * "edited_by": { "user_id": "01JUSER...", "method": "manual" }
2120
+ * }
2121
+ * }
2122
+ * ```
2123
+ *
2124
+ * **Performance:** Preview expansion is recommended for most use cases. Full expansion with many large entities can result in multi-MB payloads.
2125
+ *
2054
2126
  * ---
2055
2127
  * **Permission:** `entity:view`
2056
2128
  * **Auth:** optional
2057
2129
  */
2058
2130
  get: {
2059
2131
  parameters: {
2060
- query?: never;
2132
+ query?: {
2133
+ /** @description Comma-separated list of fields to expand. Supports: relationships[:preview|full] */
2134
+ expand?: string;
2135
+ };
2061
2136
  header?: never;
2062
2137
  path: {
2063
2138
  /** @description Entity ID (ULID) */
@@ -2371,6 +2446,88 @@ type paths = {
2371
2446
  patch?: never;
2372
2447
  trace?: never;
2373
2448
  };
2449
+ "/entities/{id}/preview": {
2450
+ parameters: {
2451
+ query?: never;
2452
+ header?: never;
2453
+ path?: never;
2454
+ cookie?: never;
2455
+ };
2456
+ /**
2457
+ * Get entity preview
2458
+ * @description Returns lightweight preview data for an entity. Useful for:
2459
+ * - Link previews and hover cards
2460
+ * - Relationship metadata freshness (vs stale peer_label)
2461
+ * - AI context management (smaller payloads)
2462
+ * - Search result enhancement
2463
+ *
2464
+ * Returns: id, type, label, collection_pi, description_preview (200 chars), text_preview (200 chars), timestamps.
2465
+ *
2466
+ * **Performance:** Single KV fetch, ~40-60ms response time, typically <1KB payload.
2467
+ *
2468
+ * ---
2469
+ * **Permission:** `entity:view`
2470
+ * **Auth:** optional
2471
+ */
2472
+ get: {
2473
+ parameters: {
2474
+ query?: never;
2475
+ header?: never;
2476
+ path: {
2477
+ /** @description Entity ID (ULID) */
2478
+ id: string;
2479
+ };
2480
+ cookie?: never;
2481
+ };
2482
+ requestBody?: never;
2483
+ responses: {
2484
+ /** @description Entity preview data */
2485
+ 200: {
2486
+ headers: {
2487
+ [name: string]: unknown;
2488
+ };
2489
+ content: {
2490
+ "application/json": components["schemas"]["EntityPreview"];
2491
+ };
2492
+ };
2493
+ /** @description Forbidden - Insufficient permissions */
2494
+ 403: {
2495
+ headers: {
2496
+ [name: string]: unknown;
2497
+ };
2498
+ content: {
2499
+ /**
2500
+ * @example {
2501
+ * "error": "Forbidden: You do not have permission to perform this action"
2502
+ * }
2503
+ */
2504
+ "application/json": components["schemas"]["ErrorResponse"];
2505
+ };
2506
+ };
2507
+ /** @description Not Found - Resource does not exist */
2508
+ 404: {
2509
+ headers: {
2510
+ [name: string]: unknown;
2511
+ };
2512
+ content: {
2513
+ /**
2514
+ * @example {
2515
+ * "error": "Entity not found"
2516
+ * }
2517
+ */
2518
+ "application/json": components["schemas"]["ErrorResponse"];
2519
+ };
2520
+ };
2521
+ };
2522
+ };
2523
+ put?: never;
2524
+ post?: never;
2525
+ delete?: never;
2526
+ options?: never;
2527
+ head?: never;
2528
+ patch?: never;
2529
+ trace?: never;
2530
+ };
2374
2531
  "/entities/{id}/tip": {
2375
2532
  parameters: {
2376
2533
  query?: never;
@@ -6618,13 +6775,28 @@ type paths = {
6618
6775
  *
6619
6776
  * Use this when you know both endpoints and want to discover how they connect - for example, finding the chain of relationships between a person and a document.
6620
6777
  *
6778
+ * **Entity Expansion (default: preview):**
6779
+ * - Omit `expand` or use `?expand=preview` - Lightweight previews for all path entities
6780
+ * - `?expand=full` - Complete entity manifests (use with caution)
6781
+ * - `?expand=none` - Disable expansion (graph metadata only)
6782
+ *
6783
+ * **Performance Warning:** 100 paths can reference 400-800 unique entities, adding 5-10s latency with expansion.
6784
+ *
6785
+ * **Recommendations:**
6786
+ * - Use `limit: 10-20` when using expansion
6787
+ * - Prefer preview over full
6788
+ * - Use `expand=none` for large result sets, then fetch specific entities separately
6789
+ *
6621
6790
  * ---
6622
6791
  * **Permission:** `graph:query`
6623
6792
  * **Auth:** required
6624
6793
  */
6625
6794
  post: {
6626
6795
  parameters: {
6627
- query?: never;
6796
+ query?: {
6797
+ /** @description Entity expansion mode. Omit for preview (default), "full" for complete manifests, "none" to disable */
6798
+ expand?: "preview" | "full" | "none";
6799
+ };
6628
6800
  header?: never;
6629
6801
  path?: never;
6630
6802
  cookie?: never;
@@ -6692,13 +6864,23 @@ type paths = {
6692
6864
  *
6693
6865
  * **When to use this vs POST /query:** This endpoint returns exhaustive, unranked results - all reachable entities up to the limit. Use `POST /query` when you want relevance-ranked results combining semantic similarity with graph structure. Use this endpoint when you need comprehensive graph exploration from known entity IDs.
6694
6866
  *
6867
+ * **Target Expansion (default: preview):**
6868
+ * - Omit `expand` or use `?expand=preview` - Lightweight target previews
6869
+ * - `?expand=full` - Complete target manifests
6870
+ * - `?expand=none` - Disable expansion (graph metadata only)
6871
+ *
6872
+ * **Performance:** With 100 targets, expansion adds ~1s.
6873
+ *
6695
6874
  * ---
6696
6875
  * **Permission:** `graph:query`
6697
6876
  * **Auth:** required
6698
6877
  */
6699
6878
  post: {
6700
6879
  parameters: {
6701
- query?: never;
6880
+ query?: {
6881
+ /** @description Entity expansion mode. Omit for preview (default), "full" for complete manifests, "none" to disable */
6882
+ expand?: "preview" | "full" | "none";
6883
+ };
6702
6884
  header?: never;
6703
6885
  path?: never;
6704
6886
  cookie?: never;
@@ -6762,13 +6944,23 @@ type paths = {
6762
6944
  * Get entity from graph
6763
6945
  * @description Get entity details with all relationships from the graph database. Unlike the entity manifest, this includes both outgoing and incoming relationships - showing not just what this entity links to, but also what links to it.
6764
6946
  *
6947
+ * **Peer Expansion (default: preview):**
6948
+ * - Omit `expand` or use `?expand=preview` - Lightweight peer previews
6949
+ * - `?expand=full` - Complete peer manifests
6950
+ * - `?expand=none` - Disable expansion (graph metadata only)
6951
+ *
6952
+ * **Performance:** With 50 peers, expansion adds ~500ms.
6953
+ *
6765
6954
  * ---
6766
6955
  * **Permission:** `graph:query`
6767
6956
  * **Auth:** required
6768
6957
  */
6769
6958
  get: {
6770
6959
  parameters: {
6771
- query?: never;
6960
+ query?: {
6961
+ /** @description Entity expansion mode. Omit for preview (default), "full" for complete manifests, "none" to disable */
6962
+ expand?: "preview" | "full" | "none";
6963
+ };
6772
6964
  header?: never;
6773
6965
  path: {
6774
6966
  /** @description Entity ID (ULID) */
@@ -6882,6 +7074,23 @@ type paths = {
6882
7074
  * @01KE4ZY... -[*]{,2}-> type:person # From exact entity
6883
7075
  * ```
6884
7076
  *
7077
+ * ## Entity Expansion
7078
+ *
7079
+ * Control how much entity data is included in results via the `expand` parameter.
7080
+ *
7081
+ * | Value | Description | Use Case |
7082
+ * |-------|-------------|----------|
7083
+ * | (omitted) | **Preview** (default) - lightweight preview data | Best balance of detail and payload size |
7084
+ * | `preview` | Same as omitted - lightweight preview data | Explicit preview mode |
7085
+ * | `full` | Complete entity manifest | When you need all properties, relationships, versions |
7086
+ * | `none` | No expansion - Pinecone metadata only | Fastest response, smallest payload |
7087
+ *
7088
+ * **Preview mode** includes: label, truncated description/text (200 chars), created_at, updated_at.
7089
+ *
7090
+ * **Full mode** includes: all properties, relationships, version info, CID.
7091
+ *
7092
+ * Both result entities and path step entities are expanded.
7093
+ *
6885
7094
  *
6886
7095
  * ---
6887
7096
  * **Permission:** `query:execute`
@@ -6957,6 +7166,17 @@ type paths = {
6957
7166
  *
6958
7167
  * Uses the collection's weighted centroid vector (combination of description and entity embeddings) to find related collections.
6959
7168
  *
7169
+ * **Entity Expansion:**
7170
+ *
7171
+ * Use `expand` in the request body to fetch entity data inline with search results:
7172
+ *
7173
+ * - **`expand: "preview"` (default)**: Adds `entity_preview` with fresh lightweight data (id, type, label, timestamps)
7174
+ * - **`expand: "full"`**: Adds `entity` with complete manifest including all properties and relationships
7175
+ * - **`expand: "none"`**: Returns search metadata only (fastest, lowest bandwidth)
7176
+ *
7177
+ * Preview mode is recommended for most use cases. Full expansion can result in large payloads.
7178
+ * Gracefully handles deleted or inaccessible entities (returns results without expansion data).
7179
+ *
6960
7180
  * ---
6961
7181
  * **Permission:** `search:similar`
6962
7182
  * **Auth:** required
@@ -6983,6 +7203,12 @@ type paths = {
6983
7203
  * @default false
6984
7204
  */
6985
7205
  refresh?: boolean;
7206
+ /**
7207
+ * @description Entity expansion mode. Default: "preview" for lightweight previews, "full" for complete manifests, "none" for no expansion.
7208
+ * @example preview
7209
+ * @enum {string}
7210
+ */
7211
+ expand?: "preview" | "full" | "none";
6986
7212
  };
6987
7213
  };
6988
7214
  };
@@ -7000,6 +7226,8 @@ type paths = {
7000
7226
  score: number;
7001
7227
  created_at?: string;
7002
7228
  updated_at?: string;
7229
+ entity_preview?: components["schemas"]["EntityPreview"] & unknown;
7230
+ entity?: components["schemas"]["EntityResponse"] & unknown;
7003
7231
  }[];
7004
7232
  metadata: {
7005
7233
  source_pi: string;
@@ -7092,6 +7320,17 @@ type paths = {
7092
7320
  * 2. Then searches within each collection for similar items
7093
7321
  * 3. Aggregates and ranks results with diversity weighting
7094
7322
  *
7323
+ * **Entity Expansion:**
7324
+ *
7325
+ * Use `expand` in the request body to fetch entity data inline with search results:
7326
+ *
7327
+ * - **`expand: "preview"` (default)**: Adds `entity_preview` with fresh lightweight data (id, type, label, timestamps)
7328
+ * - **`expand: "full"`**: Adds `entity` with complete manifest including all properties and relationships
7329
+ * - **`expand: "none"`**: Returns search metadata only (fastest, lowest bandwidth)
7330
+ *
7331
+ * Preview mode is recommended for most use cases. Full expansion can result in large payloads.
7332
+ * Gracefully handles deleted or inaccessible entities (returns results without expansion data).
7333
+ *
7095
7334
  * ---
7096
7335
  * **Permission:** `search:similar`
7097
7336
  * **Auth:** required
@@ -7135,6 +7374,12 @@ type paths = {
7135
7374
  * @default false
7136
7375
  */
7137
7376
  refresh?: boolean;
7377
+ /**
7378
+ * @description Entity expansion mode. Default: "preview" for lightweight previews, "full" for complete manifests, "none" for no expansion.
7379
+ * @example preview
7380
+ * @enum {string}
7381
+ */
7382
+ expand?: "preview" | "full" | "none";
7138
7383
  };
7139
7384
  };
7140
7385
  };
@@ -7154,6 +7399,8 @@ type paths = {
7154
7399
  score: number;
7155
7400
  created_at?: string;
7156
7401
  updated_at?: string;
7402
+ entity_preview?: components["schemas"]["EntityPreview"] & unknown;
7403
+ entity?: components["schemas"]["EntityResponse"] & unknown;
7157
7404
  }[];
7158
7405
  metadata: {
7159
7406
  source_pi: string;
@@ -7244,6 +7491,17 @@ type paths = {
7244
7491
  *
7245
7492
  * Use this endpoint to discover collections about a topic. Results are ranked by semantic similarity to your query.
7246
7493
  *
7494
+ * **Entity Expansion:**
7495
+ *
7496
+ * Use `expand` in the request body to fetch entity data inline with search results:
7497
+ *
7498
+ * - **`expand: "preview"` (default)**: Adds `entity_preview` with fresh lightweight data (id, type, label, timestamps)
7499
+ * - **`expand: "full"`**: Adds `entity` with complete manifest including all properties and relationships
7500
+ * - **`expand: "none"`**: Returns search metadata only (fastest, lowest bandwidth)
7501
+ *
7502
+ * Preview mode is recommended for most use cases. Full expansion can result in large payloads.
7503
+ * Gracefully handles deleted or inaccessible entities (returns results without expansion data).
7504
+ *
7247
7505
  * ---
7248
7506
  * **Permission:** `search:query`
7249
7507
  * **Auth:** required
@@ -7267,6 +7525,12 @@ type paths = {
7267
7525
  limit?: number;
7268
7526
  /** @description Filter by collection types */
7269
7527
  types?: string[];
7528
+ /**
7529
+ * @description Entity expansion mode. Default: "preview" for lightweight previews, "full" for complete manifests, "none" for no expansion.
7530
+ * @example preview
7531
+ * @enum {string}
7532
+ */
7533
+ expand?: "preview" | "full" | "none";
7270
7534
  };
7271
7535
  };
7272
7536
  };
@@ -7285,6 +7549,8 @@ type paths = {
7285
7549
  score: number;
7286
7550
  created_at?: string;
7287
7551
  updated_at?: string;
7552
+ entity_preview?: components["schemas"]["EntityPreview"] & unknown;
7553
+ entity?: components["schemas"]["EntityResponse"] & unknown;
7288
7554
  }[];
7289
7555
  metadata: {
7290
7556
  query: string;
@@ -7358,6 +7624,17 @@ type paths = {
7358
7624
  *
7359
7625
  * Use this endpoint to discover agents across the network. Only active agents are returned. Results are ranked by semantic similarity to your query based on agent descriptions and capabilities.
7360
7626
  *
7627
+ * **Entity Expansion:**
7628
+ *
7629
+ * Use `expand` in the request body to fetch entity data inline with search results:
7630
+ *
7631
+ * - **`expand: "preview"` (default)**: Adds `entity_preview` with fresh lightweight data (id, type, label, timestamps)
7632
+ * - **`expand: "full"`**: Adds `entity` with complete manifest including all properties and relationships
7633
+ * - **`expand: "none"`**: Returns search metadata only (fastest, lowest bandwidth)
7634
+ *
7635
+ * Preview mode is recommended for most use cases. Full expansion can result in large payloads.
7636
+ * Gracefully handles deleted or inaccessible entities (returns results without expansion data).
7637
+ *
7361
7638
  * ---
7362
7639
  * **Permission:** `search:query`
7363
7640
  * **Auth:** required
@@ -7379,6 +7656,12 @@ type paths = {
7379
7656
  * @default 10
7380
7657
  */
7381
7658
  limit?: number;
7659
+ /**
7660
+ * @description Entity expansion mode. Default: "preview" for lightweight previews, "full" for complete manifests, "none" for no expansion.
7661
+ * @example preview
7662
+ * @enum {string}
7663
+ */
7664
+ expand?: "preview" | "full" | "none";
7382
7665
  };
7383
7666
  };
7384
7667
  };
@@ -7398,6 +7681,8 @@ type paths = {
7398
7681
  status?: string;
7399
7682
  created_at?: string;
7400
7683
  updated_at?: string;
7684
+ entity_preview?: components["schemas"]["EntityPreview"] & unknown;
7685
+ entity?: components["schemas"]["EntityResponse"] & unknown;
7401
7686
  }[];
7402
7687
  metadata: {
7403
7688
  query: string;
@@ -7473,6 +7758,17 @@ type paths = {
7473
7758
  *
7474
7759
  * Use `per_collection_limit` to ensure result diversity when searching multiple collections.
7475
7760
  *
7761
+ * **Entity Expansion:**
7762
+ *
7763
+ * Use `expand` in the request body to fetch entity data inline with search results:
7764
+ *
7765
+ * - **`expand: "preview"` (default)**: Adds `entity_preview` with fresh lightweight data (id, type, label, timestamps)
7766
+ * - **`expand: "full"`**: Adds `entity` with complete manifest including all properties and relationships
7767
+ * - **`expand: "none"`**: Returns search metadata only (fastest, lowest bandwidth)
7768
+ *
7769
+ * Preview mode is recommended for most use cases. Full expansion can result in large payloads.
7770
+ * Gracefully handles deleted or inaccessible entities (returns results without expansion data).
7771
+ *
7476
7772
  * ---
7477
7773
  * **Permission:** `search:query`
7478
7774
  * **Auth:** required
@@ -7502,6 +7798,12 @@ type paths = {
7502
7798
  types?: string[];
7503
7799
  /** @description Max results per collection for diversity */
7504
7800
  per_collection_limit?: number;
7801
+ /**
7802
+ * @description Entity expansion mode. Default: "preview" for lightweight previews, "full" for complete manifests, "none" for no expansion.
7803
+ * @example preview
7804
+ * @enum {string}
7805
+ */
7806
+ expand?: "preview" | "full" | "none";
7505
7807
  };
7506
7808
  };
7507
7809
  };
@@ -7521,6 +7823,8 @@ type paths = {
7521
7823
  collection_pi: string;
7522
7824
  created_at?: string;
7523
7825
  updated_at?: string;
7826
+ entity_preview?: components["schemas"]["EntityPreview"] & unknown;
7827
+ entity?: components["schemas"]["EntityResponse"] & unknown;
7524
7828
  }[];
7525
7829
  metadata: {
7526
7830
  collection_pis: string[];
@@ -7601,6 +7905,17 @@ type paths = {
7601
7905
  *
7602
7906
  * Great for exploration and AI agents navigating the network.
7603
7907
  *
7908
+ * **Entity Expansion:**
7909
+ *
7910
+ * Use `expand` in the request body to fetch entity data inline with search results:
7911
+ *
7912
+ * - **`expand: "preview"` (default)**: Adds `entity_preview` with fresh lightweight data (id, type, label, timestamps)
7913
+ * - **`expand: "full"`**: Adds `entity` with complete manifest including all properties and relationships
7914
+ * - **`expand: "none"`**: Returns search metadata only (fastest, lowest bandwidth)
7915
+ *
7916
+ * Preview mode is recommended for most use cases. Full expansion can result in large payloads.
7917
+ * Gracefully handles deleted or inaccessible entities (returns results without expansion data).
7918
+ *
7604
7919
  * ---
7605
7920
  * **Permission:** `search:query`
7606
7921
  * **Auth:** required
@@ -7634,6 +7949,12 @@ type paths = {
7634
7949
  * @default 5
7635
7950
  */
7636
7951
  per_collection_limit?: number;
7952
+ /**
7953
+ * @description Entity expansion mode. Default: "preview" for lightweight previews, "full" for complete manifests, "none" for no expansion.
7954
+ * @example preview
7955
+ * @enum {string}
7956
+ */
7957
+ expand?: "preview" | "full" | "none";
7637
7958
  };
7638
7959
  };
7639
7960
  };
@@ -7653,6 +7974,8 @@ type paths = {
7653
7974
  collection_pi: string;
7654
7975
  created_at?: string;
7655
7976
  updated_at?: string;
7977
+ entity_preview?: components["schemas"]["EntityPreview"] & unknown;
7978
+ entity?: components["schemas"]["EntityResponse"] & unknown;
7656
7979
  }[];
7657
7980
  metadata: {
7658
7981
  query: string;
@@ -8536,6 +8859,60 @@ type components = {
8536
8859
  has_more: boolean;
8537
8860
  };
8538
8861
  };
8862
+ /**
8863
+ * @description Lightweight entity preview with fresh data. Included by default (expand: "preview").
8864
+ * @example {
8865
+ * "id": "01KDETYWYWM0MJVKM8DK3AEXPY",
8866
+ * "type": "file",
8867
+ * "label": "Research Paper.pdf",
8868
+ * "collection_pi": "01JCOLLECTION123456789AB",
8869
+ * "description_preview": "A comprehensive study on distributed systems architecture...",
8870
+ * "created_at": "2026-01-12T00:00:00.000Z",
8871
+ * "updated_at": "2026-01-12T10:30:00.000Z"
8872
+ * }
8873
+ */
8874
+ EntityPreview: {
8875
+ /**
8876
+ * @description Entity ID (persistent identifier)
8877
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8878
+ */
8879
+ id: string;
8880
+ /**
8881
+ * @description Entity type
8882
+ * @example document
8883
+ */
8884
+ type: string;
8885
+ /**
8886
+ * @description Entity label (from properties.label, filename, or name)
8887
+ * @example Research Paper.pdf
8888
+ */
8889
+ label: string;
8890
+ /**
8891
+ * @description Collection ID this entity belongs to
8892
+ * @example 01JCOLLECTION123456789ABCD
8893
+ */
8894
+ collection_pi?: string;
8895
+ /**
8896
+ * @description Truncated description (max 200 chars + "...")
8897
+ * @example This document contains research findings from the 2025 study on entity management systems. It covers key architectural decisions and performance benchmarks...
8898
+ */
8899
+ description_preview?: string;
8900
+ /**
8901
+ * @description Truncated text content (max 200 chars + "...")
8902
+ * @example Introduction: The rise of decentralized entity management systems has created new challenges for data integrity and consistency. This paper explores...
8903
+ */
8904
+ text_preview?: string;
8905
+ /**
8906
+ * @description Entity creation timestamp (ISO 8601)
8907
+ * @example 2025-01-15T10:00:00.000Z
8908
+ */
8909
+ created_at: string;
8910
+ /**
8911
+ * @description Last update timestamp (ISO 8601)
8912
+ * @example 2025-01-20T14:30:00.000Z
8913
+ */
8914
+ updated_at: string;
8915
+ };
8539
8916
  SearchResultItem: {
8540
8917
  /**
8541
8918
  * @description Entity persistent identifier
@@ -8572,6 +8949,8 @@ type components = {
8572
8949
  * @example 2026-01-12T10:30:00.000Z
8573
8950
  */
8574
8951
  updated_at?: string;
8952
+ entity_preview?: components["schemas"]["EntityPreview"];
8953
+ entity?: components["schemas"]["EntityResponse"] & unknown;
8575
8954
  };
8576
8955
  /** @description Search metadata and statistics */
8577
8956
  SearchMetadata: {
@@ -8622,6 +9001,12 @@ type components = {
8622
9001
  * @example 50
8623
9002
  */
8624
9003
  limit: number;
9004
+ /**
9005
+ * @description Entity expansion mode. Default: "preview" for lightweight previews, "full" for complete manifests, "none" for no expansion.
9006
+ * @example preview
9007
+ * @enum {string}
9008
+ */
9009
+ expand?: "preview" | "full" | "none";
8625
9010
  };
8626
9011
  CollectionResponse: components["schemas"]["EntityResponse"] & {
8627
9012
  /** @enum {string} */
@@ -8995,7 +9380,7 @@ type components = {
8995
9380
  */
8996
9381
  type: string;
8997
9382
  /**
8998
- * @description Entity display label
9383
+ * @description Entity display label (from GraphDB, may be stale)
8999
9384
  * @example My Document
9000
9385
  */
9001
9386
  label: string;
@@ -9006,9 +9391,11 @@ type components = {
9006
9391
  created_at: string;
9007
9392
  /**
9008
9393
  * Format: date-time
9009
- * @description When the entity was last updated
9394
+ * @description When the entity was last updated (from GraphDB)
9010
9395
  */
9011
9396
  updated_at: string;
9397
+ preview?: components["schemas"]["EntityPreview"] & unknown;
9398
+ entity?: components["schemas"]["EntityResponse"] & unknown;
9012
9399
  };
9013
9400
  CollectionEntitiesResponse: {
9014
9401
  /** @description Collection ID */
@@ -11117,6 +11504,35 @@ type components = {
11117
11504
  */
11118
11505
  cursor: number;
11119
11506
  };
11507
+ /**
11508
+ * @example {
11509
+ * "subject_pi": "01KE4ZY69F9R40E88PK9S0TQRQ",
11510
+ * "subject_label": "Project Folder",
11511
+ * "subject_type": "folder",
11512
+ * "subject_preview": {
11513
+ * "id": "01KE4ZY69F9R40E88PK9S0TQRQ",
11514
+ * "type": "folder",
11515
+ * "label": "Project Folder",
11516
+ * "collection_pi": "01JCOLLECTION123456789ABCD",
11517
+ * "description_preview": "Main project folder containing research documents...",
11518
+ * "created_at": "2025-01-10T08:00:00.000Z",
11519
+ * "updated_at": "2025-01-18T16:45:00.000Z"
11520
+ * },
11521
+ * "predicate": "contains",
11522
+ * "object_pi": "01KE506KZGD8M2P1XK3VNQT4YR",
11523
+ * "object_label": "Research Paper.pdf",
11524
+ * "object_type": "file",
11525
+ * "object_preview": {
11526
+ * "id": "01KE506KZGD8M2P1XK3VNQT4YR",
11527
+ * "type": "file",
11528
+ * "label": "Research Paper.pdf",
11529
+ * "collection_pi": "01JCOLLECTION123456789ABCD",
11530
+ * "description_preview": "Analysis of entity management patterns and best practices...",
11531
+ * "created_at": "2025-01-15T10:00:00.000Z",
11532
+ * "updated_at": "2025-01-20T14:30:00.000Z"
11533
+ * }
11534
+ * }
11535
+ */
11120
11536
  PathEdge: {
11121
11537
  /**
11122
11538
  * @description Source entity PI
@@ -11127,6 +11543,8 @@ type components = {
11127
11543
  subject_label: string;
11128
11544
  /** @description Source entity type */
11129
11545
  subject_type: string;
11546
+ subject_preview?: components["schemas"]["EntityPreview"] & unknown;
11547
+ subject_entity?: components["schemas"]["EntityResponse"] & unknown;
11130
11548
  /** @description Relationship predicate */
11131
11549
  predicate: string;
11132
11550
  /**
@@ -11138,6 +11556,8 @@ type components = {
11138
11556
  object_label: string;
11139
11557
  /** @description Target entity type */
11140
11558
  object_type: string;
11559
+ object_preview?: components["schemas"]["EntityPreview"] & unknown;
11560
+ object_entity?: components["schemas"]["EntityResponse"] & unknown;
11141
11561
  };
11142
11562
  PathResult: {
11143
11563
  /**
@@ -11194,6 +11614,25 @@ type components = {
11194
11614
  */
11195
11615
  limit: number;
11196
11616
  };
11617
+ /**
11618
+ * @example {
11619
+ * "source_pi": "01KE4ZY69F9R40E88PK9S0TQRQ",
11620
+ * "target_pi": "01KE506KZGD8M2P1XK3VNQT4YR",
11621
+ * "target_label": "Research Paper.pdf",
11622
+ * "target_type": "file",
11623
+ * "length": 1,
11624
+ * "edges": [],
11625
+ * "target_preview": {
11626
+ * "id": "01KE506KZGD8M2P1XK3VNQT4YR",
11627
+ * "type": "file",
11628
+ * "label": "Research Paper.pdf",
11629
+ * "collection_pi": "01JCOLLECTION123456789ABCD",
11630
+ * "description_preview": "Analysis of entity management patterns and best practices...",
11631
+ * "created_at": "2025-01-15T10:00:00.000Z",
11632
+ * "updated_at": "2025-01-20T14:30:00.000Z"
11633
+ * }
11634
+ * }
11635
+ */
11197
11636
  ReachableResult: {
11198
11637
  /**
11199
11638
  * @description Entity ID (ULID format)
@@ -11210,6 +11649,8 @@ type components = {
11210
11649
  /** @description Path length (number of hops) */
11211
11650
  length: number;
11212
11651
  edges: components["schemas"]["PathEdge"][];
11652
+ target_preview?: components["schemas"]["EntityPreview"] & unknown;
11653
+ target_entity?: components["schemas"]["EntityResponse"] & unknown;
11213
11654
  };
11214
11655
  PathsReachableResponse: {
11215
11656
  results: components["schemas"]["ReachableResult"][];
@@ -11249,6 +11690,25 @@ type components = {
11249
11690
  */
11250
11691
  limit: number;
11251
11692
  };
11693
+ /**
11694
+ * @example {
11695
+ * "direction": "outgoing",
11696
+ * "predicate": "contains",
11697
+ * "peer_pi": "01KE506KZGD8M2P1XK3VNQT4YR",
11698
+ * "peer_type": "file",
11699
+ * "peer_label": "Research Paper.pdf",
11700
+ * "properties": {},
11701
+ * "peer_preview": {
11702
+ * "id": "01KE506KZGD8M2P1XK3VNQT4YR",
11703
+ * "type": "file",
11704
+ * "label": "Research Paper.pdf",
11705
+ * "collection_pi": "01KE4ZY69F9R40E88PK9S0TQRQ",
11706
+ * "description_preview": "Analysis of entity management patterns and best practices...",
11707
+ * "created_at": "2025-01-15T10:00:00.000Z",
11708
+ * "updated_at": "2025-01-20T14:30:00.000Z"
11709
+ * }
11710
+ * }
11711
+ */
11252
11712
  RelationshipInfo: {
11253
11713
  /** @enum {string} */
11254
11714
  direction: "outgoing" | "incoming";
@@ -11263,7 +11723,38 @@ type components = {
11263
11723
  properties: {
11264
11724
  [key: string]: unknown;
11265
11725
  };
11726
+ peer_preview?: components["schemas"]["EntityPreview"] & unknown;
11727
+ peer_entity?: components["schemas"]["EntityResponse"] & unknown;
11266
11728
  };
11729
+ /**
11730
+ * @example {
11731
+ * "pi": "01KE4ZY69F9R40E88PK9S0TQRQ",
11732
+ * "type": "folder",
11733
+ * "label": "Project Folder",
11734
+ * "collection_pi": "01JCOLLECTION123456789ABCD",
11735
+ * "created_at": "2025-01-10T08:00:00.000Z",
11736
+ * "updated_at": "2025-01-18T16:45:00.000Z",
11737
+ * "relationships": [
11738
+ * {
11739
+ * "direction": "outgoing",
11740
+ * "predicate": "contains",
11741
+ * "peer_pi": "01KE506KZGD8M2P1XK3VNQT4YR",
11742
+ * "peer_type": "file",
11743
+ * "peer_label": "Research Paper.pdf",
11744
+ * "properties": {},
11745
+ * "peer_preview": {
11746
+ * "id": "01KE506KZGD8M2P1XK3VNQT4YR",
11747
+ * "type": "file",
11748
+ * "label": "Research Paper.pdf",
11749
+ * "collection_pi": "01JCOLLECTION123456789ABCD",
11750
+ * "description_preview": "Analysis of entity management patterns and best practices...",
11751
+ * "created_at": "2025-01-15T10:00:00.000Z",
11752
+ * "updated_at": "2025-01-20T14:30:00.000Z"
11753
+ * }
11754
+ * }
11755
+ * ]
11756
+ * }
11757
+ */
11267
11758
  GraphEntityResponse: {
11268
11759
  /**
11269
11760
  * @description Entity ID (ULID format)
@@ -11279,34 +11770,30 @@ type components = {
11279
11770
  updated_at: string;
11280
11771
  relationships: components["schemas"]["RelationshipInfo"][];
11281
11772
  };
11282
- QueryEntity: {
11283
- /**
11284
- * @description Entity ID (ULID format)
11285
- * @example 01KDETYWYWM0MJVKM8DK3AEXPY
11286
- */
11287
- pi: string;
11288
- type: string;
11289
- label: string;
11290
- collection_pi: string | null;
11291
- };
11292
- EntityStep: {
11293
- entity: string;
11294
- label?: string;
11295
- type?: string;
11296
- score?: number;
11297
- };
11298
11773
  EdgeStep: {
11299
11774
  edge: string;
11300
11775
  /** @enum {string} */
11301
11776
  direction: "outgoing" | "incoming";
11302
11777
  score?: number;
11303
11778
  };
11304
- PathStep: components["schemas"]["EntityStep"] | components["schemas"]["EdgeStep"];
11305
- QueryResultItem: {
11306
- entity: components["schemas"]["QueryEntity"];
11307
- path: components["schemas"]["PathStep"][];
11308
- score: number;
11309
- };
11779
+ PathStep: {
11780
+ /**
11781
+ * @description Entity ID
11782
+ * @example 01KPERSON_EINSTEIN
11783
+ */
11784
+ entity: string;
11785
+ /** @example Albert Einstein */
11786
+ label?: string;
11787
+ /** @example person */
11788
+ type?: string;
11789
+ /**
11790
+ * @description Semantic similarity score (0-1)
11791
+ * @example 0.92
11792
+ */
11793
+ score?: number;
11794
+ preview_data?: components["schemas"]["EntityPreview"] & unknown;
11795
+ full_entity?: components["schemas"]["EntityResponse"] & unknown;
11796
+ } | components["schemas"]["EdgeStep"];
11310
11797
  QueryMetadata: {
11311
11798
  query: string;
11312
11799
  hops: number;
@@ -11321,7 +11808,48 @@ type components = {
11321
11808
  stopped_at_hop?: number;
11322
11809
  };
11323
11810
  QueryResponse: {
11324
- results: components["schemas"]["QueryResultItem"][];
11811
+ results: {
11812
+ /**
11813
+ * @description Query result entity with optional expansion data
11814
+ * @example {
11815
+ * "pi": "01KE4ZY69F9R40E88PK9S0TQRQ",
11816
+ * "type": "person",
11817
+ * "label": "Albert Einstein",
11818
+ * "collection_pi": "01JCOLL_RESEARCH",
11819
+ * "preview_data": {
11820
+ * "id": "01KE4ZY69F9R40E88PK9S0TQRQ",
11821
+ * "type": "person",
11822
+ * "label": "Albert Einstein",
11823
+ * "collection_pi": "01JCOLL_RESEARCH",
11824
+ * "description_preview": "German-born theoretical physicist who developed the theory of relativity...",
11825
+ * "created_at": "2025-01-15T10:00:00.000Z",
11826
+ * "updated_at": "2025-01-20T14:30:00.000Z"
11827
+ * }
11828
+ * }
11829
+ */
11830
+ entity: {
11831
+ /**
11832
+ * @description Entity ID (ULID format)
11833
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
11834
+ */
11835
+ pi: string;
11836
+ /** @example person */
11837
+ type: string;
11838
+ /** @example Albert Einstein */
11839
+ label: string;
11840
+ /** @example 01JCOLL_RESEARCH */
11841
+ collection_pi: string | null;
11842
+ preview_data?: components["schemas"]["EntityPreview"] & unknown;
11843
+ full_entity?: components["schemas"]["EntityResponse"] & unknown;
11844
+ };
11845
+ /** @description Path from entry point to result entity (empty for zero-hop queries) */
11846
+ path: components["schemas"]["PathStep"][];
11847
+ /**
11848
+ * @description Combined relevance score (semantic similarity + path length)
11849
+ * @example 0.89
11850
+ */
11851
+ score: number;
11852
+ }[];
11325
11853
  metadata: components["schemas"]["QueryMetadata"];
11326
11854
  };
11327
11855
  QueryRequest: {
@@ -11346,6 +11874,15 @@ type components = {
11346
11874
  * @example 01JCOLL_MEDICAL
11347
11875
  */
11348
11876
  collection?: string;
11877
+ /**
11878
+ * @description Control entity expansion in results and path steps.
11879
+ * - **omitted/preview** (default): Attach lightweight preview data (label, timestamps, truncated description/text)
11880
+ * - **full**: Attach complete entity manifest (all properties, relationships, version info)
11881
+ * - **none**: No expansion - return only Pinecone metadata (fastest, smallest payload)
11882
+ * @example preview
11883
+ * @enum {string}
11884
+ */
11885
+ expand?: "none" | "preview" | "full";
11349
11886
  };
11350
11887
  TextPart: {
11351
11888
  /** @enum {string} */