@arke-institute/sdk 2.3.10 → 2.3.11

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-13T18:00:18.256Z
9
+ * Generated: 2026-01-14T01:00:30.186Z
10
10
  */
11
11
  type paths = {
12
12
  "/auth/register": {
@@ -2484,6 +2484,121 @@ type paths = {
2484
2484
  patch?: never;
2485
2485
  trace?: never;
2486
2486
  };
2487
+ "/entities/{id}/diff": {
2488
+ parameters: {
2489
+ query?: never;
2490
+ header?: never;
2491
+ path?: never;
2492
+ cookie?: never;
2493
+ };
2494
+ /**
2495
+ * Get diff between entity versions
2496
+ * @description Computes the difference between two versions of an entity.
2497
+ *
2498
+ * Query parameters:
2499
+ * - `from`: CID of the "from" version (defaults to prev of "to" version)
2500
+ * - `to`: CID of the "to" version (defaults to current tip)
2501
+ * - `format`: Output format - "semantic" (default) or "patch" (RFC 6902)
2502
+ *
2503
+ * Modes:
2504
+ * - No params: Compare current tip with its previous version
2505
+ * - `to` only: Compare that version with its prev
2506
+ * - `from` only: Compare from that version to current tip
2507
+ * - Both: Compare any two versions
2508
+ *
2509
+ * For version 1 entities (no previous version), "from" is null and all content appears as added.
2510
+ */
2511
+ get: {
2512
+ parameters: {
2513
+ query?: {
2514
+ /** @description CID of the "from" version. Defaults to prev of "to" version. */
2515
+ from?: string;
2516
+ /** @description CID of the "to" version. Defaults to current tip. */
2517
+ to?: string;
2518
+ /** @description Output format: "semantic" (default) or "patch" (RFC 6902) */
2519
+ format?: "semantic" | "patch";
2520
+ };
2521
+ header?: never;
2522
+ path: {
2523
+ /** @description Entity ID (ULID) */
2524
+ id: string;
2525
+ };
2526
+ cookie?: never;
2527
+ };
2528
+ requestBody?: never;
2529
+ responses: {
2530
+ /** @description Diff computed */
2531
+ 200: {
2532
+ headers: {
2533
+ [name: string]: unknown;
2534
+ };
2535
+ content: {
2536
+ "application/json": components["schemas"]["DiffResponse"];
2537
+ };
2538
+ };
2539
+ /** @description Bad Request - Invalid input */
2540
+ 400: {
2541
+ headers: {
2542
+ [name: string]: unknown;
2543
+ };
2544
+ content: {
2545
+ /**
2546
+ * @example {
2547
+ * "error": "Validation failed",
2548
+ * "details": {
2549
+ * "issues": [
2550
+ * {
2551
+ * "path": [
2552
+ * "properties",
2553
+ * "label"
2554
+ * ],
2555
+ * "message": "Required"
2556
+ * }
2557
+ * ]
2558
+ * }
2559
+ * }
2560
+ */
2561
+ "application/json": components["schemas"]["ValidationErrorResponse"];
2562
+ };
2563
+ };
2564
+ /** @description Forbidden - Insufficient permissions */
2565
+ 403: {
2566
+ headers: {
2567
+ [name: string]: unknown;
2568
+ };
2569
+ content: {
2570
+ /**
2571
+ * @example {
2572
+ * "error": "Forbidden: You do not have permission to perform this action"
2573
+ * }
2574
+ */
2575
+ "application/json": components["schemas"]["ErrorResponse"];
2576
+ };
2577
+ };
2578
+ /** @description Not Found - Resource does not exist */
2579
+ 404: {
2580
+ headers: {
2581
+ [name: string]: unknown;
2582
+ };
2583
+ content: {
2584
+ /**
2585
+ * @example {
2586
+ * "error": "Entity not found"
2587
+ * }
2588
+ */
2589
+ "application/json": components["schemas"]["ErrorResponse"];
2590
+ };
2591
+ };
2592
+ };
2593
+ };
2594
+ put?: never;
2595
+ post?: never;
2596
+ delete?: never;
2597
+ options?: never;
2598
+ head?: never;
2599
+ patch?: never;
2600
+ trace?: never;
2601
+ };
2487
2602
  "/relationships": {
2488
2603
  parameters: {
2489
2604
  query?: never;
@@ -5838,9 +5953,23 @@ type paths = {
5838
5953
  * ## Query Syntax
5839
5954
  *
5840
5955
  * ```
5841
- * ENTRY_POINT [ENTRY_FILTER] [-[RELATION]{DEPTH}-> TARGET_FILTER]...
5956
+ * [SCOPE_PREFIX] ENTRY_POINT [ENTRY_FILTER] [-[RELATION]{DEPTH}-> TARGET_FILTER]...
5842
5957
  * ```
5843
5958
  *
5959
+ * ## Scope Prefixes
5960
+ *
5961
+ * Control where semantic search looks for entry points. Default is discovery mode.
5962
+ *
5963
+ * | Prefix | Description | Example |
5964
+ * |--------|-------------|---------|
5965
+ * | (none) | **Discovery mode** (default) - find relevant collections, then search within each | `"medical notes"` |
5966
+ * | `@:collections` | Search for collections themselves | `@:collections "columbia archives"` |
5967
+ * | `@:collection(id)` | Search within a specific collection | `@:collection(01JCOLL123) "meeting"` |
5968
+ * | `@:discover` | Explicit discovery mode | `@:discover "research papers"` |
5969
+ * | `@:public` | Search public domain only | `@:public "orphaned data"` |
5970
+ *
5971
+ * **Note:** Graph traversal (hops) is always cross-collection regardless of scope.
5972
+ *
5844
5973
  * ### Entry Points
5845
5974
  *
5846
5975
  * | Syntax | Description | Example |
@@ -5862,10 +5991,11 @@ type paths = {
5862
5991
  * ### Examples
5863
5992
  *
5864
5993
  * ```
5865
- * "george washington" # Simple semantic search
5866
- * "albert einstein" type:person # With type filter
5867
- * "medical college" -[*]{,4}-> type:file # Find files connected to concept
5868
- * @01KE4ZY... -[*]{,2}-> type:person # Find people near entity
5994
+ * "george washington" # Discovery mode (default)
5995
+ * @:collections "columbia university" # Find collections
5996
+ * @:collection(01JCOLL123) "faculty meeting" # Within specific collection
5997
+ * @:discover "alice" -[*]{,2}-> type:person # Discover, then traverse
5998
+ * @01KE4ZY... -[*]{,2}-> type:person # From exact entity
5869
5999
  * ```
5870
6000
  */
5871
6001
  post: {
@@ -7842,6 +7972,139 @@ type components = {
7842
7972
  /** @description Whether results were truncated due to limit */
7843
7973
  truncated: boolean;
7844
7974
  };
7975
+ /** @description Metadata about the "from" version (null for version 1) */
7976
+ VersionMeta: {
7977
+ /**
7978
+ * @description Content Identifier (CID) - content-addressed hash
7979
+ * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
7980
+ */
7981
+ cid: string;
7982
+ /**
7983
+ * @description Entity version number
7984
+ * @example 1
7985
+ */
7986
+ ver: number;
7987
+ /**
7988
+ * Format: date-time
7989
+ * @description ISO 8601 datetime
7990
+ * @example 2025-12-26T12:00:00.000Z
7991
+ */
7992
+ ts: string;
7993
+ } | null;
7994
+ PropertyChange: {
7995
+ /** @description Previous value */
7996
+ from?: unknown;
7997
+ /** @description New value */
7998
+ to?: unknown;
7999
+ };
8000
+ PropertiesChanges: {
8001
+ /**
8002
+ * @description Properties that were added
8003
+ * @example {
8004
+ * "email": "new@example.com"
8005
+ * }
8006
+ */
8007
+ added: {
8008
+ [key: string]: unknown;
8009
+ };
8010
+ /**
8011
+ * @description Properties that were removed (includes old values)
8012
+ * @example {
8013
+ * "deprecated_field": "old value"
8014
+ * }
8015
+ */
8016
+ removed: {
8017
+ [key: string]: unknown;
8018
+ };
8019
+ /**
8020
+ * @description Properties that changed
8021
+ * @example {
8022
+ * "name": {
8023
+ * "from": "Old Name",
8024
+ * "to": "New Name"
8025
+ * }
8026
+ * }
8027
+ */
8028
+ changed: {
8029
+ [key: string]: components["schemas"]["PropertyChange"];
8030
+ };
8031
+ };
8032
+ RelationshipChange: {
8033
+ predicate: string;
8034
+ peer: string;
8035
+ peer_type?: string;
8036
+ peer_label?: string;
8037
+ properties: components["schemas"]["PropertyChange"];
8038
+ };
8039
+ RelationshipsChanges: {
8040
+ /** @description Relationships that were added */
8041
+ added: {
8042
+ predicate: string;
8043
+ peer: string;
8044
+ peer_type?: string;
8045
+ peer_label?: string;
8046
+ properties?: {
8047
+ [key: string]: unknown;
8048
+ };
8049
+ }[];
8050
+ /** @description Relationships that were removed */
8051
+ removed: {
8052
+ predicate: string;
8053
+ peer: string;
8054
+ peer_type?: string;
8055
+ peer_label?: string;
8056
+ properties?: {
8057
+ [key: string]: unknown;
8058
+ };
8059
+ }[];
8060
+ /** @description Relationships with changed properties */
8061
+ changed: components["schemas"]["RelationshipChange"][];
8062
+ };
8063
+ SemanticChanges: {
8064
+ properties: components["schemas"]["PropertiesChanges"];
8065
+ relationships: components["schemas"]["RelationshipsChanges"];
8066
+ };
8067
+ SemanticDiffResponse: {
8068
+ /**
8069
+ * @description Entity ID (ULID format)
8070
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8071
+ */
8072
+ entity_id: string;
8073
+ from: components["schemas"]["VersionMeta"];
8074
+ to: components["schemas"]["VersionMeta"];
8075
+ /** @enum {string} */
8076
+ format: "semantic";
8077
+ changes: components["schemas"]["SemanticChanges"];
8078
+ };
8079
+ PatchOperation: {
8080
+ /** @enum {string} */
8081
+ op: "add";
8082
+ path: string;
8083
+ value?: unknown;
8084
+ } | {
8085
+ /** @enum {string} */
8086
+ op: "remove";
8087
+ path: string;
8088
+ } | {
8089
+ /** @enum {string} */
8090
+ op: "replace";
8091
+ path: string;
8092
+ value?: unknown;
8093
+ };
8094
+ PatchDiffResponse: {
8095
+ /**
8096
+ * @description Entity ID (ULID format)
8097
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8098
+ */
8099
+ entity_id: string;
8100
+ from: components["schemas"]["VersionMeta"];
8101
+ to: components["schemas"]["VersionMeta"];
8102
+ /** @enum {string} */
8103
+ format: "patch";
8104
+ /** @description RFC 6902 JSON Patch operations */
8105
+ patch: components["schemas"]["PatchOperation"][];
8106
+ };
8107
+ DiffResponse: components["schemas"]["SemanticDiffResponse"] | components["schemas"]["PatchDiffResponse"];
7845
8108
  AddRelationshipResponse: {
7846
8109
  source: components["schemas"]["EntityResponse"] & unknown;
7847
8110
  target?: components["schemas"]["EntityResponse"] & unknown;
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * Source: Arke v1 API
8
8
  * Version: 1.0.0
9
- * Generated: 2026-01-13T18:00:18.256Z
9
+ * Generated: 2026-01-14T01:00:30.186Z
10
10
  */
11
11
  type paths = {
12
12
  "/auth/register": {
@@ -2484,6 +2484,121 @@ type paths = {
2484
2484
  patch?: never;
2485
2485
  trace?: never;
2486
2486
  };
2487
+ "/entities/{id}/diff": {
2488
+ parameters: {
2489
+ query?: never;
2490
+ header?: never;
2491
+ path?: never;
2492
+ cookie?: never;
2493
+ };
2494
+ /**
2495
+ * Get diff between entity versions
2496
+ * @description Computes the difference between two versions of an entity.
2497
+ *
2498
+ * Query parameters:
2499
+ * - `from`: CID of the "from" version (defaults to prev of "to" version)
2500
+ * - `to`: CID of the "to" version (defaults to current tip)
2501
+ * - `format`: Output format - "semantic" (default) or "patch" (RFC 6902)
2502
+ *
2503
+ * Modes:
2504
+ * - No params: Compare current tip with its previous version
2505
+ * - `to` only: Compare that version with its prev
2506
+ * - `from` only: Compare from that version to current tip
2507
+ * - Both: Compare any two versions
2508
+ *
2509
+ * For version 1 entities (no previous version), "from" is null and all content appears as added.
2510
+ */
2511
+ get: {
2512
+ parameters: {
2513
+ query?: {
2514
+ /** @description CID of the "from" version. Defaults to prev of "to" version. */
2515
+ from?: string;
2516
+ /** @description CID of the "to" version. Defaults to current tip. */
2517
+ to?: string;
2518
+ /** @description Output format: "semantic" (default) or "patch" (RFC 6902) */
2519
+ format?: "semantic" | "patch";
2520
+ };
2521
+ header?: never;
2522
+ path: {
2523
+ /** @description Entity ID (ULID) */
2524
+ id: string;
2525
+ };
2526
+ cookie?: never;
2527
+ };
2528
+ requestBody?: never;
2529
+ responses: {
2530
+ /** @description Diff computed */
2531
+ 200: {
2532
+ headers: {
2533
+ [name: string]: unknown;
2534
+ };
2535
+ content: {
2536
+ "application/json": components["schemas"]["DiffResponse"];
2537
+ };
2538
+ };
2539
+ /** @description Bad Request - Invalid input */
2540
+ 400: {
2541
+ headers: {
2542
+ [name: string]: unknown;
2543
+ };
2544
+ content: {
2545
+ /**
2546
+ * @example {
2547
+ * "error": "Validation failed",
2548
+ * "details": {
2549
+ * "issues": [
2550
+ * {
2551
+ * "path": [
2552
+ * "properties",
2553
+ * "label"
2554
+ * ],
2555
+ * "message": "Required"
2556
+ * }
2557
+ * ]
2558
+ * }
2559
+ * }
2560
+ */
2561
+ "application/json": components["schemas"]["ValidationErrorResponse"];
2562
+ };
2563
+ };
2564
+ /** @description Forbidden - Insufficient permissions */
2565
+ 403: {
2566
+ headers: {
2567
+ [name: string]: unknown;
2568
+ };
2569
+ content: {
2570
+ /**
2571
+ * @example {
2572
+ * "error": "Forbidden: You do not have permission to perform this action"
2573
+ * }
2574
+ */
2575
+ "application/json": components["schemas"]["ErrorResponse"];
2576
+ };
2577
+ };
2578
+ /** @description Not Found - Resource does not exist */
2579
+ 404: {
2580
+ headers: {
2581
+ [name: string]: unknown;
2582
+ };
2583
+ content: {
2584
+ /**
2585
+ * @example {
2586
+ * "error": "Entity not found"
2587
+ * }
2588
+ */
2589
+ "application/json": components["schemas"]["ErrorResponse"];
2590
+ };
2591
+ };
2592
+ };
2593
+ };
2594
+ put?: never;
2595
+ post?: never;
2596
+ delete?: never;
2597
+ options?: never;
2598
+ head?: never;
2599
+ patch?: never;
2600
+ trace?: never;
2601
+ };
2487
2602
  "/relationships": {
2488
2603
  parameters: {
2489
2604
  query?: never;
@@ -5838,9 +5953,23 @@ type paths = {
5838
5953
  * ## Query Syntax
5839
5954
  *
5840
5955
  * ```
5841
- * ENTRY_POINT [ENTRY_FILTER] [-[RELATION]{DEPTH}-> TARGET_FILTER]...
5956
+ * [SCOPE_PREFIX] ENTRY_POINT [ENTRY_FILTER] [-[RELATION]{DEPTH}-> TARGET_FILTER]...
5842
5957
  * ```
5843
5958
  *
5959
+ * ## Scope Prefixes
5960
+ *
5961
+ * Control where semantic search looks for entry points. Default is discovery mode.
5962
+ *
5963
+ * | Prefix | Description | Example |
5964
+ * |--------|-------------|---------|
5965
+ * | (none) | **Discovery mode** (default) - find relevant collections, then search within each | `"medical notes"` |
5966
+ * | `@:collections` | Search for collections themselves | `@:collections "columbia archives"` |
5967
+ * | `@:collection(id)` | Search within a specific collection | `@:collection(01JCOLL123) "meeting"` |
5968
+ * | `@:discover` | Explicit discovery mode | `@:discover "research papers"` |
5969
+ * | `@:public` | Search public domain only | `@:public "orphaned data"` |
5970
+ *
5971
+ * **Note:** Graph traversal (hops) is always cross-collection regardless of scope.
5972
+ *
5844
5973
  * ### Entry Points
5845
5974
  *
5846
5975
  * | Syntax | Description | Example |
@@ -5862,10 +5991,11 @@ type paths = {
5862
5991
  * ### Examples
5863
5992
  *
5864
5993
  * ```
5865
- * "george washington" # Simple semantic search
5866
- * "albert einstein" type:person # With type filter
5867
- * "medical college" -[*]{,4}-> type:file # Find files connected to concept
5868
- * @01KE4ZY... -[*]{,2}-> type:person # Find people near entity
5994
+ * "george washington" # Discovery mode (default)
5995
+ * @:collections "columbia university" # Find collections
5996
+ * @:collection(01JCOLL123) "faculty meeting" # Within specific collection
5997
+ * @:discover "alice" -[*]{,2}-> type:person # Discover, then traverse
5998
+ * @01KE4ZY... -[*]{,2}-> type:person # From exact entity
5869
5999
  * ```
5870
6000
  */
5871
6001
  post: {
@@ -7842,6 +7972,139 @@ type components = {
7842
7972
  /** @description Whether results were truncated due to limit */
7843
7973
  truncated: boolean;
7844
7974
  };
7975
+ /** @description Metadata about the "from" version (null for version 1) */
7976
+ VersionMeta: {
7977
+ /**
7978
+ * @description Content Identifier (CID) - content-addressed hash
7979
+ * @example bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy
7980
+ */
7981
+ cid: string;
7982
+ /**
7983
+ * @description Entity version number
7984
+ * @example 1
7985
+ */
7986
+ ver: number;
7987
+ /**
7988
+ * Format: date-time
7989
+ * @description ISO 8601 datetime
7990
+ * @example 2025-12-26T12:00:00.000Z
7991
+ */
7992
+ ts: string;
7993
+ } | null;
7994
+ PropertyChange: {
7995
+ /** @description Previous value */
7996
+ from?: unknown;
7997
+ /** @description New value */
7998
+ to?: unknown;
7999
+ };
8000
+ PropertiesChanges: {
8001
+ /**
8002
+ * @description Properties that were added
8003
+ * @example {
8004
+ * "email": "new@example.com"
8005
+ * }
8006
+ */
8007
+ added: {
8008
+ [key: string]: unknown;
8009
+ };
8010
+ /**
8011
+ * @description Properties that were removed (includes old values)
8012
+ * @example {
8013
+ * "deprecated_field": "old value"
8014
+ * }
8015
+ */
8016
+ removed: {
8017
+ [key: string]: unknown;
8018
+ };
8019
+ /**
8020
+ * @description Properties that changed
8021
+ * @example {
8022
+ * "name": {
8023
+ * "from": "Old Name",
8024
+ * "to": "New Name"
8025
+ * }
8026
+ * }
8027
+ */
8028
+ changed: {
8029
+ [key: string]: components["schemas"]["PropertyChange"];
8030
+ };
8031
+ };
8032
+ RelationshipChange: {
8033
+ predicate: string;
8034
+ peer: string;
8035
+ peer_type?: string;
8036
+ peer_label?: string;
8037
+ properties: components["schemas"]["PropertyChange"];
8038
+ };
8039
+ RelationshipsChanges: {
8040
+ /** @description Relationships that were added */
8041
+ added: {
8042
+ predicate: string;
8043
+ peer: string;
8044
+ peer_type?: string;
8045
+ peer_label?: string;
8046
+ properties?: {
8047
+ [key: string]: unknown;
8048
+ };
8049
+ }[];
8050
+ /** @description Relationships that were removed */
8051
+ removed: {
8052
+ predicate: string;
8053
+ peer: string;
8054
+ peer_type?: string;
8055
+ peer_label?: string;
8056
+ properties?: {
8057
+ [key: string]: unknown;
8058
+ };
8059
+ }[];
8060
+ /** @description Relationships with changed properties */
8061
+ changed: components["schemas"]["RelationshipChange"][];
8062
+ };
8063
+ SemanticChanges: {
8064
+ properties: components["schemas"]["PropertiesChanges"];
8065
+ relationships: components["schemas"]["RelationshipsChanges"];
8066
+ };
8067
+ SemanticDiffResponse: {
8068
+ /**
8069
+ * @description Entity ID (ULID format)
8070
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8071
+ */
8072
+ entity_id: string;
8073
+ from: components["schemas"]["VersionMeta"];
8074
+ to: components["schemas"]["VersionMeta"];
8075
+ /** @enum {string} */
8076
+ format: "semantic";
8077
+ changes: components["schemas"]["SemanticChanges"];
8078
+ };
8079
+ PatchOperation: {
8080
+ /** @enum {string} */
8081
+ op: "add";
8082
+ path: string;
8083
+ value?: unknown;
8084
+ } | {
8085
+ /** @enum {string} */
8086
+ op: "remove";
8087
+ path: string;
8088
+ } | {
8089
+ /** @enum {string} */
8090
+ op: "replace";
8091
+ path: string;
8092
+ value?: unknown;
8093
+ };
8094
+ PatchDiffResponse: {
8095
+ /**
8096
+ * @description Entity ID (ULID format)
8097
+ * @example 01KDETYWYWM0MJVKM8DK3AEXPY
8098
+ */
8099
+ entity_id: string;
8100
+ from: components["schemas"]["VersionMeta"];
8101
+ to: components["schemas"]["VersionMeta"];
8102
+ /** @enum {string} */
8103
+ format: "patch";
8104
+ /** @description RFC 6902 JSON Patch operations */
8105
+ patch: components["schemas"]["PatchOperation"][];
8106
+ };
8107
+ DiffResponse: components["schemas"]["SemanticDiffResponse"] | components["schemas"]["PatchDiffResponse"];
7845
8108
  AddRelationshipResponse: {
7846
8109
  source: components["schemas"]["EntityResponse"] & unknown;
7847
8110
  target?: components["schemas"]["EntityResponse"] & unknown;
package/openapi/spec.json CHANGED
@@ -2205,6 +2205,374 @@
2205
2205
  "truncated"
2206
2206
  ]
2207
2207
  },
2208
+ "VersionMeta": {
2209
+ "type": "object",
2210
+ "nullable": true,
2211
+ "properties": {
2212
+ "cid": {
2213
+ "type": "string",
2214
+ "minLength": 1,
2215
+ "description": "Content Identifier (CID) - content-addressed hash",
2216
+ "example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
2217
+ },
2218
+ "ver": {
2219
+ "type": "integer",
2220
+ "minimum": 0,
2221
+ "exclusiveMinimum": true,
2222
+ "description": "Entity version number",
2223
+ "example": 1
2224
+ },
2225
+ "ts": {
2226
+ "type": "string",
2227
+ "format": "date-time",
2228
+ "description": "ISO 8601 datetime",
2229
+ "example": "2025-12-26T12:00:00.000Z"
2230
+ }
2231
+ },
2232
+ "required": [
2233
+ "cid",
2234
+ "ver",
2235
+ "ts"
2236
+ ],
2237
+ "description": "Metadata about the \"from\" version (null for version 1)"
2238
+ },
2239
+ "PropertyChange": {
2240
+ "type": "object",
2241
+ "properties": {
2242
+ "from": {
2243
+ "nullable": true,
2244
+ "description": "Previous value"
2245
+ },
2246
+ "to": {
2247
+ "nullable": true,
2248
+ "description": "New value"
2249
+ }
2250
+ }
2251
+ },
2252
+ "PropertiesChanges": {
2253
+ "type": "object",
2254
+ "properties": {
2255
+ "added": {
2256
+ "type": "object",
2257
+ "additionalProperties": {
2258
+ "nullable": true
2259
+ },
2260
+ "description": "Properties that were added",
2261
+ "example": {
2262
+ "email": "new@example.com"
2263
+ }
2264
+ },
2265
+ "removed": {
2266
+ "type": "object",
2267
+ "additionalProperties": {
2268
+ "nullable": true
2269
+ },
2270
+ "description": "Properties that were removed (includes old values)",
2271
+ "example": {
2272
+ "deprecated_field": "old value"
2273
+ }
2274
+ },
2275
+ "changed": {
2276
+ "type": "object",
2277
+ "additionalProperties": {
2278
+ "$ref": "#/components/schemas/PropertyChange"
2279
+ },
2280
+ "description": "Properties that changed",
2281
+ "example": {
2282
+ "name": {
2283
+ "from": "Old Name",
2284
+ "to": "New Name"
2285
+ }
2286
+ }
2287
+ }
2288
+ },
2289
+ "required": [
2290
+ "added",
2291
+ "removed",
2292
+ "changed"
2293
+ ]
2294
+ },
2295
+ "RelationshipChange": {
2296
+ "type": "object",
2297
+ "properties": {
2298
+ "predicate": {
2299
+ "type": "string",
2300
+ "minLength": 1
2301
+ },
2302
+ "peer": {
2303
+ "type": "string",
2304
+ "minLength": 1
2305
+ },
2306
+ "peer_type": {
2307
+ "type": "string"
2308
+ },
2309
+ "peer_label": {
2310
+ "type": "string"
2311
+ },
2312
+ "properties": {
2313
+ "$ref": "#/components/schemas/PropertyChange"
2314
+ }
2315
+ },
2316
+ "required": [
2317
+ "predicate",
2318
+ "peer",
2319
+ "properties"
2320
+ ]
2321
+ },
2322
+ "RelationshipsChanges": {
2323
+ "type": "object",
2324
+ "properties": {
2325
+ "added": {
2326
+ "type": "array",
2327
+ "items": {
2328
+ "type": "object",
2329
+ "properties": {
2330
+ "predicate": {
2331
+ "type": "string",
2332
+ "minLength": 1
2333
+ },
2334
+ "peer": {
2335
+ "type": "string",
2336
+ "minLength": 1
2337
+ },
2338
+ "peer_type": {
2339
+ "type": "string"
2340
+ },
2341
+ "peer_label": {
2342
+ "type": "string"
2343
+ },
2344
+ "properties": {
2345
+ "type": "object",
2346
+ "additionalProperties": {
2347
+ "nullable": true
2348
+ }
2349
+ }
2350
+ },
2351
+ "required": [
2352
+ "predicate",
2353
+ "peer"
2354
+ ],
2355
+ "description": "Entity relationship",
2356
+ "example": {
2357
+ "predicate": "crew",
2358
+ "peer": "01KDETYWYWM0MJVKM8DK3AEXPY",
2359
+ "peer_type": "collection"
2360
+ }
2361
+ },
2362
+ "description": "Relationships that were added"
2363
+ },
2364
+ "removed": {
2365
+ "type": "array",
2366
+ "items": {
2367
+ "type": "object",
2368
+ "properties": {
2369
+ "predicate": {
2370
+ "type": "string",
2371
+ "minLength": 1
2372
+ },
2373
+ "peer": {
2374
+ "type": "string",
2375
+ "minLength": 1
2376
+ },
2377
+ "peer_type": {
2378
+ "type": "string"
2379
+ },
2380
+ "peer_label": {
2381
+ "type": "string"
2382
+ },
2383
+ "properties": {
2384
+ "type": "object",
2385
+ "additionalProperties": {
2386
+ "nullable": true
2387
+ }
2388
+ }
2389
+ },
2390
+ "required": [
2391
+ "predicate",
2392
+ "peer"
2393
+ ],
2394
+ "description": "Entity relationship",
2395
+ "example": {
2396
+ "predicate": "crew",
2397
+ "peer": "01KDETYWYWM0MJVKM8DK3AEXPY",
2398
+ "peer_type": "collection"
2399
+ }
2400
+ },
2401
+ "description": "Relationships that were removed"
2402
+ },
2403
+ "changed": {
2404
+ "type": "array",
2405
+ "items": {
2406
+ "$ref": "#/components/schemas/RelationshipChange"
2407
+ },
2408
+ "description": "Relationships with changed properties"
2409
+ }
2410
+ },
2411
+ "required": [
2412
+ "added",
2413
+ "removed",
2414
+ "changed"
2415
+ ]
2416
+ },
2417
+ "SemanticChanges": {
2418
+ "type": "object",
2419
+ "properties": {
2420
+ "properties": {
2421
+ "$ref": "#/components/schemas/PropertiesChanges"
2422
+ },
2423
+ "relationships": {
2424
+ "$ref": "#/components/schemas/RelationshipsChanges"
2425
+ }
2426
+ },
2427
+ "required": [
2428
+ "properties",
2429
+ "relationships"
2430
+ ]
2431
+ },
2432
+ "SemanticDiffResponse": {
2433
+ "type": "object",
2434
+ "properties": {
2435
+ "entity_id": {
2436
+ "type": "string",
2437
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
2438
+ "description": "Entity ID (ULID format)",
2439
+ "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
2440
+ },
2441
+ "from": {
2442
+ "$ref": "#/components/schemas/VersionMeta"
2443
+ },
2444
+ "to": {
2445
+ "$ref": "#/components/schemas/VersionMeta"
2446
+ },
2447
+ "format": {
2448
+ "type": "string",
2449
+ "enum": [
2450
+ "semantic"
2451
+ ]
2452
+ },
2453
+ "changes": {
2454
+ "$ref": "#/components/schemas/SemanticChanges"
2455
+ }
2456
+ },
2457
+ "required": [
2458
+ "entity_id",
2459
+ "from",
2460
+ "to",
2461
+ "format",
2462
+ "changes"
2463
+ ]
2464
+ },
2465
+ "PatchOperation": {
2466
+ "anyOf": [
2467
+ {
2468
+ "type": "object",
2469
+ "properties": {
2470
+ "op": {
2471
+ "type": "string",
2472
+ "enum": [
2473
+ "add"
2474
+ ]
2475
+ },
2476
+ "path": {
2477
+ "type": "string"
2478
+ },
2479
+ "value": {
2480
+ "nullable": true
2481
+ }
2482
+ },
2483
+ "required": [
2484
+ "op",
2485
+ "path"
2486
+ ]
2487
+ },
2488
+ {
2489
+ "type": "object",
2490
+ "properties": {
2491
+ "op": {
2492
+ "type": "string",
2493
+ "enum": [
2494
+ "remove"
2495
+ ]
2496
+ },
2497
+ "path": {
2498
+ "type": "string"
2499
+ }
2500
+ },
2501
+ "required": [
2502
+ "op",
2503
+ "path"
2504
+ ]
2505
+ },
2506
+ {
2507
+ "type": "object",
2508
+ "properties": {
2509
+ "op": {
2510
+ "type": "string",
2511
+ "enum": [
2512
+ "replace"
2513
+ ]
2514
+ },
2515
+ "path": {
2516
+ "type": "string"
2517
+ },
2518
+ "value": {
2519
+ "nullable": true
2520
+ }
2521
+ },
2522
+ "required": [
2523
+ "op",
2524
+ "path"
2525
+ ]
2526
+ }
2527
+ ]
2528
+ },
2529
+ "PatchDiffResponse": {
2530
+ "type": "object",
2531
+ "properties": {
2532
+ "entity_id": {
2533
+ "type": "string",
2534
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
2535
+ "description": "Entity ID (ULID format)",
2536
+ "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
2537
+ },
2538
+ "from": {
2539
+ "$ref": "#/components/schemas/VersionMeta"
2540
+ },
2541
+ "to": {
2542
+ "$ref": "#/components/schemas/VersionMeta"
2543
+ },
2544
+ "format": {
2545
+ "type": "string",
2546
+ "enum": [
2547
+ "patch"
2548
+ ]
2549
+ },
2550
+ "patch": {
2551
+ "type": "array",
2552
+ "items": {
2553
+ "$ref": "#/components/schemas/PatchOperation"
2554
+ },
2555
+ "description": "RFC 6902 JSON Patch operations"
2556
+ }
2557
+ },
2558
+ "required": [
2559
+ "entity_id",
2560
+ "from",
2561
+ "to",
2562
+ "format",
2563
+ "patch"
2564
+ ]
2565
+ },
2566
+ "DiffResponse": {
2567
+ "anyOf": [
2568
+ {
2569
+ "$ref": "#/components/schemas/SemanticDiffResponse"
2570
+ },
2571
+ {
2572
+ "$ref": "#/components/schemas/PatchDiffResponse"
2573
+ }
2574
+ ]
2575
+ },
2208
2576
  "AddRelationshipResponse": {
2209
2577
  "type": "object",
2210
2578
  "properties": {
@@ -8322,6 +8690,133 @@
8322
8690
  }
8323
8691
  }
8324
8692
  },
8693
+ "/entities/{id}/diff": {
8694
+ "get": {
8695
+ "tags": [
8696
+ "Entities",
8697
+ "Versions"
8698
+ ],
8699
+ "summary": "Get diff between entity versions",
8700
+ "description": "Computes the difference between two versions of an entity.\n\nQuery parameters:\n- `from`: CID of the \"from\" version (defaults to prev of \"to\" version)\n- `to`: CID of the \"to\" version (defaults to current tip)\n- `format`: Output format - \"semantic\" (default) or \"patch\" (RFC 6902)\n\nModes:\n- No params: Compare current tip with its previous version\n- `to` only: Compare that version with its prev\n- `from` only: Compare from that version to current tip\n- Both: Compare any two versions\n\nFor version 1 entities (no previous version), \"from\" is null and all content appears as added.",
8701
+ "x-arke-action": "entity:view",
8702
+ "x-arke-auth": "optional",
8703
+ "x-arke-tier": "standard",
8704
+ "parameters": [
8705
+ {
8706
+ "schema": {
8707
+ "type": "string",
8708
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
8709
+ "description": "Entity ID (ULID format)",
8710
+ "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
8711
+ },
8712
+ "required": true,
8713
+ "description": "Entity ID (ULID)",
8714
+ "name": "id",
8715
+ "in": "path"
8716
+ },
8717
+ {
8718
+ "schema": {
8719
+ "type": "string",
8720
+ "minLength": 1,
8721
+ "description": "Content Identifier (CID) - content-addressed hash",
8722
+ "example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
8723
+ },
8724
+ "required": false,
8725
+ "description": "CID of the \"from\" version. Defaults to prev of \"to\" version.",
8726
+ "name": "from",
8727
+ "in": "query"
8728
+ },
8729
+ {
8730
+ "schema": {
8731
+ "type": "string",
8732
+ "minLength": 1,
8733
+ "description": "Content Identifier (CID) - content-addressed hash",
8734
+ "example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
8735
+ },
8736
+ "required": false,
8737
+ "description": "CID of the \"to\" version. Defaults to current tip.",
8738
+ "name": "to",
8739
+ "in": "query"
8740
+ },
8741
+ {
8742
+ "schema": {
8743
+ "type": "string",
8744
+ "enum": [
8745
+ "semantic",
8746
+ "patch"
8747
+ ],
8748
+ "default": "semantic"
8749
+ },
8750
+ "required": false,
8751
+ "description": "Output format: \"semantic\" (default) or \"patch\" (RFC 6902)",
8752
+ "name": "format",
8753
+ "in": "query"
8754
+ }
8755
+ ],
8756
+ "responses": {
8757
+ "200": {
8758
+ "description": "Diff computed",
8759
+ "content": {
8760
+ "application/json": {
8761
+ "schema": {
8762
+ "$ref": "#/components/schemas/DiffResponse"
8763
+ }
8764
+ }
8765
+ }
8766
+ },
8767
+ "400": {
8768
+ "description": "Bad Request - Invalid input",
8769
+ "content": {
8770
+ "application/json": {
8771
+ "schema": {
8772
+ "$ref": "#/components/schemas/ValidationErrorResponse"
8773
+ },
8774
+ "example": {
8775
+ "error": "Validation failed",
8776
+ "details": {
8777
+ "issues": [
8778
+ {
8779
+ "path": [
8780
+ "properties",
8781
+ "label"
8782
+ ],
8783
+ "message": "Required"
8784
+ }
8785
+ ]
8786
+ }
8787
+ }
8788
+ }
8789
+ }
8790
+ },
8791
+ "403": {
8792
+ "description": "Forbidden - Insufficient permissions",
8793
+ "content": {
8794
+ "application/json": {
8795
+ "schema": {
8796
+ "$ref": "#/components/schemas/ErrorResponse"
8797
+ },
8798
+ "example": {
8799
+ "error": "Forbidden: You do not have permission to perform this action"
8800
+ }
8801
+ }
8802
+ }
8803
+ },
8804
+ "404": {
8805
+ "description": "Not Found - Resource does not exist",
8806
+ "content": {
8807
+ "application/json": {
8808
+ "schema": {
8809
+ "$ref": "#/components/schemas/ErrorResponse"
8810
+ },
8811
+ "example": {
8812
+ "error": "Entity not found"
8813
+ }
8814
+ }
8815
+ }
8816
+ }
8817
+ }
8818
+ }
8819
+ },
8325
8820
  "/relationships": {
8326
8821
  "post": {
8327
8822
  "tags": [
@@ -11535,7 +12030,7 @@
11535
12030
  "Query"
11536
12031
  ],
11537
12032
  "summary": "Execute Argo query",
11538
- "description": "Execute an Argo DSL query for path-based graph traversal.\n\n## Query Syntax\n\n```\nENTRY_POINT [ENTRY_FILTER] [-[RELATION]{DEPTH}-> TARGET_FILTER]...\n```\n\n### Entry Points\n\n| Syntax | Description | Example |\n|--------|-------------|---------|\n| `\"text\"` | Semantic search | `\"george washington\"` |\n| `@id` | Exact entity ID | `@01KE4ZY69F9R40E88PK9S0TQRQ` |\n| `type:X` | All entities of type | `type:person` |\n| `type:X ~ \"text\"` | Semantic search within type | `type:person ~ \"physician\"` |\n\n### Edges (Hops)\n\n| Syntax | Direction |\n|--------|-----------|\n| `-[*]->` | Outgoing |\n| `<-[*]-` | Incoming |\n| `<-[*]->` | Both |\n| `-[*]{,4}->` | Variable depth (1-4) |\n\n### Examples\n\n```\n\"george washington\" # Simple semantic search\n\"albert einstein\" type:person # With type filter\n\"medical college\" -[*]{,4}-> type:file # Find files connected to concept\n@01KE4ZY... -[*]{,2}-> type:person # Find people near entity\n```\n",
12033
+ "description": "Execute an Argo DSL query for path-based graph traversal.\n\n## Query Syntax\n\n```\n[SCOPE_PREFIX] ENTRY_POINT [ENTRY_FILTER] [-[RELATION]{DEPTH}-> TARGET_FILTER]...\n```\n\n## Scope Prefixes\n\nControl where semantic search looks for entry points. Default is discovery mode.\n\n| Prefix | Description | Example |\n|--------|-------------|---------|\n| (none) | **Discovery mode** (default) - find relevant collections, then search within each | `\"medical notes\"` |\n| `@:collections` | Search for collections themselves | `@:collections \"columbia archives\"` |\n| `@:collection(id)` | Search within a specific collection | `@:collection(01JCOLL123) \"meeting\"` |\n| `@:discover` | Explicit discovery mode | `@:discover \"research papers\"` |\n| `@:public` | Search public domain only | `@:public \"orphaned data\"` |\n\n**Note:** Graph traversal (hops) is always cross-collection regardless of scope.\n\n### Entry Points\n\n| Syntax | Description | Example |\n|--------|-------------|---------|\n| `\"text\"` | Semantic search | `\"george washington\"` |\n| `@id` | Exact entity ID | `@01KE4ZY69F9R40E88PK9S0TQRQ` |\n| `type:X` | All entities of type | `type:person` |\n| `type:X ~ \"text\"` | Semantic search within type | `type:person ~ \"physician\"` |\n\n### Edges (Hops)\n\n| Syntax | Direction |\n|--------|-----------|\n| `-[*]->` | Outgoing |\n| `<-[*]-` | Incoming |\n| `<-[*]->` | Both |\n| `-[*]{,4}->` | Variable depth (1-4) |\n\n### Examples\n\n```\n\"george washington\" # Discovery mode (default)\n@:collections \"columbia university\" # Find collections\n@:collection(01JCOLL123) \"faculty meeting\" # Within specific collection\n@:discover \"alice\" -[*]{,2}-> type:person # Discover, then traverse\n@01KE4ZY... -[*]{,2}-> type:person # From exact entity\n```\n",
11539
12034
  "x-arke-action": "query:execute",
11540
12035
  "x-arke-auth": "optional",
11541
12036
  "x-arke-tier": "external",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "specVersion": "1.0.0",
3
3
  "apiVersion": "1.0.0",
4
- "fetchedAt": "2026-01-13T18:00:17.369Z",
4
+ "fetchedAt": "2026-01-14T01:00:29.332Z",
5
5
  "sourceUrl": "https://arke-v1.arke.institute/openapi.json",
6
6
  "openApiVersion": "3.1.0"
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arke-institute/sdk",
3
- "version": "2.3.10",
3
+ "version": "2.3.11",
4
4
  "description": "TypeScript SDK for the Arke API - auto-generated from OpenAPI spec",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",