@arke-institute/sdk 2.3.12 → 2.3.13

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.
package/openapi/spec.json CHANGED
@@ -48,6 +48,10 @@
48
48
  "name": "Agents",
49
49
  "description": "Agent management and invocation"
50
50
  },
51
+ {
52
+ "name": "Jobs",
53
+ "description": "Job collection status and monitoring"
54
+ },
51
55
  {
52
56
  "name": "Events",
53
57
  "description": "Entity change event stream"
@@ -63,6 +67,10 @@
63
67
  {
64
68
  "name": "Search",
65
69
  "description": "Cross-collection semantic search"
70
+ },
71
+ {
72
+ "name": "Documentation",
73
+ "description": "API documentation and introspection"
66
74
  }
67
75
  ],
68
76
  "components": {
@@ -269,6 +277,36 @@
269
277
  "description": "Unix timestamp in milliseconds",
270
278
  "example": 1735214400000
271
279
  },
280
+ "edited_by": {
281
+ "type": "object",
282
+ "properties": {
283
+ "user_id": {
284
+ "type": "string",
285
+ "minLength": 1
286
+ },
287
+ "method": {
288
+ "type": "string",
289
+ "enum": [
290
+ "manual",
291
+ "ai_generated",
292
+ "system",
293
+ "import"
294
+ ]
295
+ },
296
+ "on_behalf_of": {
297
+ "type": "string"
298
+ }
299
+ },
300
+ "required": [
301
+ "user_id",
302
+ "method"
303
+ ],
304
+ "description": "Audit trail for edits",
305
+ "example": {
306
+ "user_id": "01JCAPTAINAHAB000000000000",
307
+ "method": "manual"
308
+ }
309
+ },
272
310
  "prev_cid": {
273
311
  "type": "string",
274
312
  "minLength": 1,
@@ -284,7 +322,8 @@
284
322
  "relationships",
285
323
  "ver",
286
324
  "created_at",
287
- "ts"
325
+ "ts",
326
+ "edited_by"
288
327
  ]
289
328
  },
290
329
  "UserResponse": {
@@ -445,10 +484,18 @@
445
484
  "additionalProperties": {
446
485
  "nullable": true
447
486
  },
448
- "description": "Nested removal structure (recursive: values can be string[] or nested objects)"
487
+ "description": "Nested removal structure. Each key navigates into a nested object; leaf arrays specify keys to delete at that level.",
488
+ "example": {
489
+ "settings": {
490
+ "notifications": [
491
+ "email",
492
+ "slack"
493
+ ]
494
+ }
495
+ }
449
496
  }
450
497
  ],
451
- "description": "Properties to remove"
498
+ "description": "Properties to remove. Use string[] for top-level keys (e.g., [\"old_field\"]), or nested objects for deep removal (e.g., { config: { options: [\"debug\"] } }). Dot notation like \"config.options.debug\" is NOT supported."
452
499
  },
453
500
  "relationships_add": {
454
501
  "type": "array",
@@ -1072,10 +1119,18 @@
1072
1119
  "additionalProperties": {
1073
1120
  "nullable": true
1074
1121
  },
1075
- "description": "Nested removal structure (recursive: values can be string[] or nested objects)"
1122
+ "description": "Nested removal structure. Each key navigates into a nested object; leaf arrays specify keys to delete at that level.",
1123
+ "example": {
1124
+ "settings": {
1125
+ "notifications": [
1126
+ "email",
1127
+ "slack"
1128
+ ]
1129
+ }
1130
+ }
1076
1131
  }
1077
1132
  ],
1078
- "description": "Properties to remove"
1133
+ "description": "Properties to remove. Use string[] for top-level keys (e.g., [\"old_field\"]), or nested objects for deep removal (e.g., { config: { options: [\"debug\"] } }). Dot notation like \"config.options.debug\" is NOT supported."
1079
1134
  },
1080
1135
  "relationships_add": {
1081
1136
  "type": "array",
@@ -1777,6 +1832,36 @@
1777
1832
  "description": "Unix timestamp in milliseconds",
1778
1833
  "example": 1735214400000
1779
1834
  },
1835
+ "edited_by": {
1836
+ "type": "object",
1837
+ "properties": {
1838
+ "user_id": {
1839
+ "type": "string",
1840
+ "minLength": 1
1841
+ },
1842
+ "method": {
1843
+ "type": "string",
1844
+ "enum": [
1845
+ "manual",
1846
+ "ai_generated",
1847
+ "system",
1848
+ "import"
1849
+ ]
1850
+ },
1851
+ "on_behalf_of": {
1852
+ "type": "string"
1853
+ }
1854
+ },
1855
+ "required": [
1856
+ "user_id",
1857
+ "method"
1858
+ ],
1859
+ "description": "Audit trail for edits",
1860
+ "example": {
1861
+ "user_id": "01JCAPTAINAHAB000000000000",
1862
+ "method": "manual"
1863
+ }
1864
+ },
1780
1865
  "prev_cid": {
1781
1866
  "type": "string",
1782
1867
  "minLength": 1,
@@ -1792,7 +1877,8 @@
1792
1877
  "relationships",
1793
1878
  "ver",
1794
1879
  "created_at",
1795
- "ts"
1880
+ "ts",
1881
+ "edited_by"
1796
1882
  ]
1797
1883
  },
1798
1884
  "CreateEntityRequest": {
@@ -1821,7 +1907,7 @@
1821
1907
  "additionalProperties": {
1822
1908
  "nullable": true
1823
1909
  },
1824
- "description": "Entity properties (type-specific)",
1910
+ "description": "Entity properties (type-specific). Text properties may contain inline entity references using the arke: URI scheme (e.g., [Label](arke:01JENTITY123...)) for domain-agnostic linking.",
1825
1911
  "example": {
1826
1912
  "label": "Chapter 1: Loomings",
1827
1913
  "author": "Herman Melville"
@@ -1877,6 +1963,27 @@
1877
1963
  "type"
1878
1964
  ]
1879
1965
  },
1966
+ "TipResponse": {
1967
+ "type": "object",
1968
+ "properties": {
1969
+ "id": {
1970
+ "type": "string",
1971
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
1972
+ "description": "Entity ID (ULID format)",
1973
+ "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
1974
+ },
1975
+ "cid": {
1976
+ "type": "string",
1977
+ "minLength": 1,
1978
+ "description": "Content Identifier (CID) - content-addressed hash",
1979
+ "example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
1980
+ }
1981
+ },
1982
+ "required": [
1983
+ "id",
1984
+ "cid"
1985
+ ]
1986
+ },
1880
1987
  "EntityUpdatedResponse": {
1881
1988
  "allOf": [
1882
1989
  {
@@ -1937,10 +2044,18 @@
1937
2044
  "additionalProperties": {
1938
2045
  "nullable": true
1939
2046
  },
1940
- "description": "Nested removal structure (recursive: values can be string[] or nested objects)"
2047
+ "description": "Nested removal structure. Each key navigates into a nested object; leaf arrays specify keys to delete at that level.",
2048
+ "example": {
2049
+ "settings": {
2050
+ "notifications": [
2051
+ "email",
2052
+ "slack"
2053
+ ]
2054
+ }
2055
+ }
1941
2056
  }
1942
2057
  ],
1943
- "description": "Properties to remove"
2058
+ "description": "Properties to remove. Use string[] for top-level keys (e.g., [\"old_field\"]), or nested objects for deep removal (e.g., { config: { options: [\"debug\"] } }). Dot notation like \"config.options.debug\" is NOT supported."
1944
2059
  },
1945
2060
  "relationships_add": {
1946
2061
  "type": "array",
@@ -3057,6 +3172,36 @@
3057
3172
  "exclusiveMinimum": true,
3058
3173
  "description": "Unix timestamp in milliseconds",
3059
3174
  "example": 1735214400000
3175
+ },
3176
+ "edited_by": {
3177
+ "type": "object",
3178
+ "properties": {
3179
+ "user_id": {
3180
+ "type": "string",
3181
+ "minLength": 1
3182
+ },
3183
+ "method": {
3184
+ "type": "string",
3185
+ "enum": [
3186
+ "manual",
3187
+ "ai_generated",
3188
+ "system",
3189
+ "import"
3190
+ ]
3191
+ },
3192
+ "on_behalf_of": {
3193
+ "type": "string"
3194
+ }
3195
+ },
3196
+ "required": [
3197
+ "user_id",
3198
+ "method"
3199
+ ],
3200
+ "description": "Audit trail for edits",
3201
+ "example": {
3202
+ "user_id": "01JCAPTAINAHAB000000000000",
3203
+ "method": "manual"
3204
+ }
3060
3205
  }
3061
3206
  },
3062
3207
  "required": [
@@ -3067,7 +3212,8 @@
3067
3212
  "relationships",
3068
3213
  "ver",
3069
3214
  "created_at",
3070
- "ts"
3215
+ "ts",
3216
+ "edited_by"
3071
3217
  ]
3072
3218
  },
3073
3219
  "CreateFileRequest": {
@@ -3276,10 +3422,18 @@
3276
3422
  "additionalProperties": {
3277
3423
  "nullable": true
3278
3424
  },
3279
- "description": "Nested removal structure (recursive: values can be string[] or nested objects)"
3425
+ "description": "Nested removal structure. Each key navigates into a nested object; leaf arrays specify keys to delete at that level.",
3426
+ "example": {
3427
+ "settings": {
3428
+ "notifications": [
3429
+ "email",
3430
+ "slack"
3431
+ ]
3432
+ }
3433
+ }
3280
3434
  }
3281
3435
  ],
3282
- "description": "Properties to remove"
3436
+ "description": "Properties to remove. Use string[] for top-level keys (e.g., [\"old_field\"]), or nested objects for deep removal (e.g., { config: { options: [\"debug\"] } }). Dot notation like \"config.options.debug\" is NOT supported."
3283
3437
  },
3284
3438
  "relationships_add": {
3285
3439
  "type": "array",
@@ -3563,6 +3717,36 @@
3563
3717
  "exclusiveMinimum": true,
3564
3718
  "description": "Unix timestamp in milliseconds",
3565
3719
  "example": 1735214400000
3720
+ },
3721
+ "edited_by": {
3722
+ "type": "object",
3723
+ "properties": {
3724
+ "user_id": {
3725
+ "type": "string",
3726
+ "minLength": 1
3727
+ },
3728
+ "method": {
3729
+ "type": "string",
3730
+ "enum": [
3731
+ "manual",
3732
+ "ai_generated",
3733
+ "system",
3734
+ "import"
3735
+ ]
3736
+ },
3737
+ "on_behalf_of": {
3738
+ "type": "string"
3739
+ }
3740
+ },
3741
+ "required": [
3742
+ "user_id",
3743
+ "method"
3744
+ ],
3745
+ "description": "Audit trail for edits",
3746
+ "example": {
3747
+ "user_id": "01JCAPTAINAHAB000000000000",
3748
+ "method": "manual"
3749
+ }
3566
3750
  }
3567
3751
  },
3568
3752
  "required": [
@@ -3573,7 +3757,8 @@
3573
3757
  "relationships",
3574
3758
  "ver",
3575
3759
  "created_at",
3576
- "ts"
3760
+ "ts",
3761
+ "edited_by"
3577
3762
  ]
3578
3763
  },
3579
3764
  "CreateFolderRequest": {
@@ -3746,10 +3931,18 @@
3746
3931
  "additionalProperties": {
3747
3932
  "nullable": true
3748
3933
  },
3749
- "description": "Nested removal structure (recursive: values can be string[] or nested objects)"
3934
+ "description": "Nested removal structure. Each key navigates into a nested object; leaf arrays specify keys to delete at that level.",
3935
+ "example": {
3936
+ "settings": {
3937
+ "notifications": [
3938
+ "email",
3939
+ "slack"
3940
+ ]
3941
+ }
3942
+ }
3750
3943
  }
3751
3944
  ],
3752
- "description": "Properties to remove"
3945
+ "description": "Properties to remove. Use string[] for top-level keys (e.g., [\"old_field\"]), or nested objects for deep removal (e.g., { config: { options: [\"debug\"] } }). Dot notation like \"config.options.debug\" is NOT supported."
3753
3946
  },
3754
3947
  "relationships_add": {
3755
3948
  "type": "array",
@@ -4497,6 +4690,62 @@
4497
4690
  "manifest"
4498
4691
  ]
4499
4692
  },
4693
+ "TypeRestriction": {
4694
+ "type": "object",
4695
+ "properties": {
4696
+ "type": {
4697
+ "type": "string",
4698
+ "description": "The type with restricted implications",
4699
+ "example": "collection"
4700
+ },
4701
+ "allowed_verbs": {
4702
+ "type": "array",
4703
+ "items": {
4704
+ "type": "string"
4705
+ },
4706
+ "description": "Verbs for which the base type DOES imply this type",
4707
+ "example": [
4708
+ "view"
4709
+ ]
4710
+ },
4711
+ "description": {
4712
+ "type": "string",
4713
+ "description": "Explanation of the restriction"
4714
+ }
4715
+ },
4716
+ "required": [
4717
+ "type",
4718
+ "allowed_verbs",
4719
+ "description"
4720
+ ]
4721
+ },
4722
+ "TypeHierarchy": {
4723
+ "type": "object",
4724
+ "properties": {
4725
+ "base_type": {
4726
+ "type": "string",
4727
+ "description": "The base type that implies all other types",
4728
+ "example": "entity"
4729
+ },
4730
+ "description": {
4731
+ "type": "string",
4732
+ "description": "Explanation of type hierarchy behavior"
4733
+ },
4734
+ "restrictions": {
4735
+ "type": "array",
4736
+ "items": {
4737
+ "$ref": "#/components/schemas/TypeRestriction"
4738
+ },
4739
+ "description": "Types with restricted implication rules"
4740
+ }
4741
+ },
4742
+ "required": [
4743
+ "base_type",
4744
+ "description",
4745
+ "restrictions"
4746
+ ],
4747
+ "description": "Type hierarchy. The base type implies all other types, with restrictions for certain types."
4748
+ },
4500
4749
  "WildcardInfo": {
4501
4750
  "type": "object",
4502
4751
  "properties": {
@@ -4582,6 +4831,9 @@
4582
4831
  ]
4583
4832
  }
4584
4833
  },
4834
+ "type_hierarchy": {
4835
+ "$ref": "#/components/schemas/TypeHierarchy"
4836
+ },
4585
4837
  "wildcards": {
4586
4838
  "type": "object",
4587
4839
  "properties": {
@@ -4642,6 +4894,7 @@
4642
4894
  "verbs",
4643
4895
  "types",
4644
4896
  "implications",
4897
+ "type_hierarchy",
4645
4898
  "wildcards",
4646
4899
  "restrictions",
4647
4900
  "default_roles"
@@ -4660,79 +4913,79 @@
4660
4913
  "enum": [
4661
4914
  "agent"
4662
4915
  ]
4916
+ },
4917
+ "warnings": {
4918
+ "type": "array",
4919
+ "items": {
4920
+ "type": "object",
4921
+ "properties": {
4922
+ "sub_agent_id": {
4923
+ "type": "string",
4924
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
4925
+ "description": "The sub-agent ID that has an issue"
4926
+ },
4927
+ "reason": {
4928
+ "type": "string",
4929
+ "enum": [
4930
+ "not_found",
4931
+ "not_an_agent",
4932
+ "disabled"
4933
+ ],
4934
+ "description": "Why this is a warning: not_found (entity does not exist), not_an_agent (entity exists but is not an agent), or disabled (agent is disabled)"
4935
+ },
4936
+ "message": {
4937
+ "type": "string",
4938
+ "description": "Human-readable explanation"
4939
+ }
4940
+ },
4941
+ "required": [
4942
+ "sub_agent_id",
4943
+ "reason",
4944
+ "message"
4945
+ ],
4946
+ "description": "Warning about a sub-agent reference that could not be validated. The agent is still created/updated, but this sub-agent may cause issues at invocation time.",
4947
+ "title": "AgentSubAgentWarning"
4948
+ },
4949
+ "description": "Warnings about sub-agent references that could not be validated. Present only when uses_agents contains references to non-existent, non-agent, or disabled entities."
4663
4950
  }
4664
4951
  }
4665
4952
  }
4666
4953
  ]
4667
4954
  },
4668
- "SubAgentRef": {
4955
+ "CreateAgentRequest": {
4669
4956
  "type": "object",
4670
4957
  "properties": {
4671
- "pi": {
4958
+ "note": {
4672
4959
  "type": "string",
4673
- "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$"
4960
+ "description": "Optional note describing this change",
4961
+ "example": "Added Chapter 42: The Whiteness of the Whale"
4962
+ },
4963
+ "id": {
4964
+ "type": "string",
4965
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
4966
+ "description": "Custom entity ID (generated if not provided)"
4674
4967
  },
4675
4968
  "label": {
4676
4969
  "type": "string",
4970
+ "minLength": 1,
4677
4971
  "maxLength": 200,
4678
- "description": "Display label for the sub-agent"
4972
+ "description": "Agent display name",
4973
+ "example": "OCR Processor"
4679
4974
  },
4680
- "description": {
4975
+ "endpoint": {
4681
4976
  "type": "string",
4682
- "maxLength": 2000,
4683
- "description": "Description of the sub-agent role"
4977
+ "format": "uri",
4978
+ "description": "Agent service base URL",
4979
+ "example": "https://ocr.example.com/v1"
4684
4980
  },
4685
4981
  "actions_required": {
4686
4982
  "type": "array",
4687
4983
  "items": {
4688
- "type": "string"
4984
+ "type": "string",
4985
+ "pattern": "^[a-z_]+:[a-z_]+$"
4689
4986
  },
4690
- "description": "Actions this sub-agent requires",
4691
- "example": [
4692
- "entity:view",
4693
- "entity:update"
4694
- ]
4695
- }
4696
- },
4697
- "required": [
4698
- "pi",
4699
- "actions_required"
4700
- ]
4701
- },
4702
- "CreateAgentRequest": {
4703
- "type": "object",
4704
- "properties": {
4705
- "note": {
4706
- "type": "string",
4707
- "description": "Optional note describing this change",
4708
- "example": "Added Chapter 42: The Whiteness of the Whale"
4709
- },
4710
- "id": {
4711
- "type": "string",
4712
- "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
4713
- "description": "Custom entity ID (generated if not provided)"
4714
- },
4715
- "label": {
4716
- "type": "string",
4717
- "minLength": 1,
4718
- "maxLength": 200,
4719
- "description": "Agent display name",
4720
- "example": "OCR Processor"
4721
- },
4722
- "endpoint": {
4723
- "type": "string",
4724
- "format": "uri",
4725
- "description": "Agent service base URL",
4726
- "example": "https://ocr.example.com/v1"
4727
- },
4728
- "actions_required": {
4729
- "type": "array",
4730
- "items": {
4731
- "type": "string",
4732
- "pattern": "^[a-z_]+:[a-z_]+$"
4733
- },
4734
- "minItems": 1,
4735
- "description": "Actions this agent requires on target collections",
4987
+ "minItems": 1,
4988
+ "description": "Actions this agent requires on target collections",
4736
4989
  "example": [
4737
4990
  "entity:view",
4738
4991
  "entity:update",
@@ -4753,9 +5006,31 @@
4753
5006
  "uses_agents": {
4754
5007
  "type": "array",
4755
5008
  "items": {
4756
- "$ref": "#/components/schemas/SubAgentRef"
5009
+ "type": "object",
5010
+ "properties": {
5011
+ "pi": {
5012
+ "type": "string",
5013
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
5014
+ "description": "Sub-agent entity ID. The sub-agent's actions_required will be fetched dynamically at invocation time."
5015
+ },
5016
+ "label": {
5017
+ "type": "string",
5018
+ "maxLength": 200,
5019
+ "description": "Optional display label override (defaults to sub-agent's own label)"
5020
+ },
5021
+ "description": {
5022
+ "type": "string",
5023
+ "maxLength": 2000,
5024
+ "description": "Optional description of the sub-agent's role in this orchestrator's workflow"
5025
+ }
5026
+ },
5027
+ "required": [
5028
+ "pi"
5029
+ ],
5030
+ "description": "Reference to a sub-agent. Permissions are NOT declared here - they are fetched dynamically from the sub-agent's own manifest at invocation time. This means sub-agent permission changes propagate automatically without updating the orchestrator.",
5031
+ "title": "SubAgentRef"
4757
5032
  },
4758
- "description": "Sub-agents used by this orchestrator"
5033
+ "description": "Sub-agents this orchestrator delegates work to. Only provide the sub-agent ID (pi) - their permissions are fetched dynamically at invocation time. Warnings are returned if any referenced sub-agents do not exist or are disabled."
4759
5034
  },
4760
5035
  "input_schema": {
4761
5036
  "type": "object",
@@ -4885,10 +5160,18 @@
4885
5160
  "additionalProperties": {
4886
5161
  "nullable": true
4887
5162
  },
4888
- "description": "Nested removal structure (recursive: values can be string[] or nested objects)"
5163
+ "description": "Nested removal structure. Each key navigates into a nested object; leaf arrays specify keys to delete at that level.",
5164
+ "example": {
5165
+ "settings": {
5166
+ "notifications": [
5167
+ "email",
5168
+ "slack"
5169
+ ]
5170
+ }
5171
+ }
4889
5172
  }
4890
5173
  ],
4891
- "description": "Properties to remove"
5174
+ "description": "Properties to remove. Use string[] for top-level keys (e.g., [\"old_field\"]), or nested objects for deep removal (e.g., { config: { options: [\"debug\"] } }). Dot notation like \"config.options.debug\" is NOT supported."
4892
5175
  },
4893
5176
  "relationships_add": {
4894
5177
  "type": "array",
@@ -5020,9 +5303,31 @@
5020
5303
  "uses_agents": {
5021
5304
  "type": "array",
5022
5305
  "items": {
5023
- "$ref": "#/components/schemas/SubAgentRef"
5306
+ "type": "object",
5307
+ "properties": {
5308
+ "pi": {
5309
+ "type": "string",
5310
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
5311
+ "description": "Sub-agent entity ID. The sub-agent's actions_required will be fetched dynamically at invocation time."
5312
+ },
5313
+ "label": {
5314
+ "type": "string",
5315
+ "maxLength": 200,
5316
+ "description": "Optional display label override (defaults to sub-agent's own label)"
5317
+ },
5318
+ "description": {
5319
+ "type": "string",
5320
+ "maxLength": 2000,
5321
+ "description": "Optional description of the sub-agent's role in this orchestrator's workflow"
5322
+ }
5323
+ },
5324
+ "required": [
5325
+ "pi"
5326
+ ],
5327
+ "description": "Reference to a sub-agent. Permissions are NOT declared here - they are fetched dynamically from the sub-agent's own manifest at invocation time. This means sub-agent permission changes propagate automatically without updating the orchestrator.",
5328
+ "title": "SubAgentRef"
5024
5329
  },
5025
- "description": "Updated sub-agents"
5330
+ "description": "Updated sub-agent references. Only provide sub-agent IDs (pi) - their permissions are fetched dynamically at invocation time."
5026
5331
  },
5027
5332
  "input_schema": {
5028
5333
  "type": "object",
@@ -5137,6 +5442,45 @@
5137
5442
  "grants_needed": {
5138
5443
  "type": "boolean",
5139
5444
  "description": "True if some agents need permission grants"
5445
+ },
5446
+ "warnings": {
5447
+ "type": "array",
5448
+ "items": {
5449
+ "type": "object",
5450
+ "properties": {
5451
+ "sub_agent_id": {
5452
+ "type": "string",
5453
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
5454
+ "description": "The sub-agent ID that could not be resolved"
5455
+ },
5456
+ "parent_agent_id": {
5457
+ "type": "string",
5458
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
5459
+ "description": "The orchestrator or parent agent that declared this sub-agent reference"
5460
+ },
5461
+ "reason": {
5462
+ "type": "string",
5463
+ "enum": [
5464
+ "not_found",
5465
+ "disabled"
5466
+ ],
5467
+ "description": "Why the sub-agent was skipped: not_found (entity does not exist) or disabled (agent status is disabled)"
5468
+ },
5469
+ "message": {
5470
+ "type": "string",
5471
+ "description": "Human-readable explanation of the warning"
5472
+ }
5473
+ },
5474
+ "required": [
5475
+ "sub_agent_id",
5476
+ "parent_agent_id",
5477
+ "reason",
5478
+ "message"
5479
+ ],
5480
+ "description": "Warning generated when a sub-agent reference cannot be resolved during dynamic permission lookup. The agent creation/invocation proceeds, but the sub-agent is skipped.",
5481
+ "title": "SubAgentWarning"
5482
+ },
5483
+ "description": "Warnings about sub-agents that were skipped"
5140
5484
  }
5141
5485
  },
5142
5486
  "required": [
@@ -5277,7 +5621,7 @@
5277
5621
  "target": {
5278
5622
  "type": "string",
5279
5623
  "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
5280
- "description": "Target collection ID to operate on"
5624
+ "description": "Collection ID to grant the agent access to. All agent permissions are collection-scoped."
5281
5625
  },
5282
5626
  "job_collection": {
5283
5627
  "type": "string",
@@ -5419,6 +5763,195 @@
5419
5763
  "keys"
5420
5764
  ]
5421
5765
  },
5766
+ "VerifyAgentTokenResponse": {
5767
+ "type": "object",
5768
+ "properties": {
5769
+ "verification_token": {
5770
+ "type": "string",
5771
+ "description": "Token to deploy at your endpoint",
5772
+ "example": "vt_abc123def456..."
5773
+ },
5774
+ "agent_id": {
5775
+ "type": "string",
5776
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
5777
+ "description": "Agent ID to include in verification response"
5778
+ },
5779
+ "endpoint": {
5780
+ "type": "string",
5781
+ "format": "uri",
5782
+ "description": "Your agent endpoint URL"
5783
+ },
5784
+ "instructions": {
5785
+ "type": "string",
5786
+ "description": "How to complete verification"
5787
+ },
5788
+ "expires_at": {
5789
+ "type": "string",
5790
+ "format": "date-time",
5791
+ "description": "Token expiration time"
5792
+ }
5793
+ },
5794
+ "required": [
5795
+ "verification_token",
5796
+ "agent_id",
5797
+ "endpoint",
5798
+ "instructions",
5799
+ "expires_at"
5800
+ ]
5801
+ },
5802
+ "VerifyAgentSuccessResponse": {
5803
+ "type": "object",
5804
+ "properties": {
5805
+ "verified": {
5806
+ "type": "boolean",
5807
+ "enum": [
5808
+ true
5809
+ ]
5810
+ },
5811
+ "verified_at": {
5812
+ "type": "string",
5813
+ "format": "date-time",
5814
+ "description": "When the endpoint was verified"
5815
+ }
5816
+ },
5817
+ "required": [
5818
+ "verified",
5819
+ "verified_at"
5820
+ ]
5821
+ },
5822
+ "VerifyAgentFailureResponse": {
5823
+ "type": "object",
5824
+ "properties": {
5825
+ "verified": {
5826
+ "type": "boolean",
5827
+ "enum": [
5828
+ false
5829
+ ]
5830
+ },
5831
+ "error": {
5832
+ "type": "string",
5833
+ "enum": [
5834
+ "no_token",
5835
+ "token_expired",
5836
+ "fetch_failed",
5837
+ "invalid_response",
5838
+ "token_mismatch",
5839
+ "agent_id_mismatch"
5840
+ ],
5841
+ "description": "Verification error code"
5842
+ },
5843
+ "message": {
5844
+ "type": "string",
5845
+ "description": "Human-readable error description"
5846
+ }
5847
+ },
5848
+ "required": [
5849
+ "verified",
5850
+ "error",
5851
+ "message"
5852
+ ]
5853
+ },
5854
+ "VerifyAgentRequest": {
5855
+ "type": "object",
5856
+ "properties": {
5857
+ "confirm": {
5858
+ "type": "boolean",
5859
+ "description": "Set to true to perform verification. Omit or false to generate/get verification token.",
5860
+ "example": true
5861
+ }
5862
+ }
5863
+ },
5864
+ "EntityRef": {
5865
+ "type": "object",
5866
+ "properties": {
5867
+ "pi": {
5868
+ "type": "string",
5869
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
5870
+ "description": "Entity ID (ULID format)",
5871
+ "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
5872
+ },
5873
+ "type": {
5874
+ "type": "string"
5875
+ },
5876
+ "label": {
5877
+ "type": "string"
5878
+ }
5879
+ },
5880
+ "required": [
5881
+ "pi"
5882
+ ]
5883
+ },
5884
+ "JobStatusResponse": {
5885
+ "type": "object",
5886
+ "properties": {
5887
+ "id": {
5888
+ "type": "string",
5889
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
5890
+ "description": "Entity ID (ULID format)",
5891
+ "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
5892
+ },
5893
+ "cid": {
5894
+ "type": "string",
5895
+ "minLength": 1,
5896
+ "description": "Content Identifier (CID) - content-addressed hash",
5897
+ "example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
5898
+ },
5899
+ "status": {
5900
+ "type": "string",
5901
+ "enum": [
5902
+ "running",
5903
+ "done",
5904
+ "error"
5905
+ ],
5906
+ "description": "Job collection status",
5907
+ "example": "running"
5908
+ },
5909
+ "started_at": {
5910
+ "type": "string",
5911
+ "format": "date-time",
5912
+ "description": "ISO 8601 datetime",
5913
+ "example": "2025-12-26T12:00:00.000Z"
5914
+ },
5915
+ "completed_at": {
5916
+ "type": "string",
5917
+ "nullable": true,
5918
+ "format": "date-time",
5919
+ "description": "ISO 8601 datetime",
5920
+ "example": "2025-12-26T12:00:00.000Z"
5921
+ },
5922
+ "agent": {
5923
+ "$ref": "#/components/schemas/EntityRef"
5924
+ },
5925
+ "target": {
5926
+ "$ref": "#/components/schemas/EntityRef"
5927
+ },
5928
+ "main_agent": {
5929
+ "$ref": "#/components/schemas/EntityRef"
5930
+ },
5931
+ "files_count": {
5932
+ "type": "integer",
5933
+ "minimum": 0,
5934
+ "description": "Number of files contained in this job collection",
5935
+ "example": 5
5936
+ },
5937
+ "sub_jobs_count": {
5938
+ "type": "integer",
5939
+ "minimum": 0,
5940
+ "description": "Number of sub-job collections",
5941
+ "example": 2
5942
+ }
5943
+ },
5944
+ "required": [
5945
+ "id",
5946
+ "cid",
5947
+ "status",
5948
+ "started_at",
5949
+ "completed_at",
5950
+ "agent",
5951
+ "files_count",
5952
+ "sub_jobs_count"
5953
+ ]
5954
+ },
5422
5955
  "Event": {
5423
5956
  "type": "object",
5424
5957
  "properties": {
@@ -6023,16 +6556,16 @@
6023
6556
  "type": "integer",
6024
6557
  "minimum": 1,
6025
6558
  "maximum": 100,
6026
- "default": 10,
6559
+ "default": 25,
6027
6560
  "description": "Maximum number of results to return",
6028
- "example": 10
6561
+ "example": 25
6029
6562
  },
6030
6563
  "k_explore": {
6031
6564
  "type": "integer",
6032
6565
  "minimum": 1,
6033
6566
  "maximum": 300,
6034
6567
  "description": "Beam width for exploration (default: k * 3)",
6035
- "example": 30
6568
+ "example": 75
6036
6569
  },
6037
6570
  "collection": {
6038
6571
  "type": "string",
@@ -6044,27 +6577,258 @@
6044
6577
  "path"
6045
6578
  ]
6046
6579
  },
6047
- "AttestationResponse": {
6580
+ "TextPart": {
6048
6581
  "type": "object",
6049
6582
  "properties": {
6050
- "pi": {
6583
+ "type": {
6051
6584
  "type": "string",
6052
- "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
6053
- "description": "Entity ID (ULID format)",
6054
- "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
6585
+ "enum": [
6586
+ "text"
6587
+ ]
6055
6588
  },
6056
- "ver": {
6057
- "type": "integer",
6058
- "minimum": 0,
6059
- "exclusiveMinimum": true,
6060
- "description": "Entity version number",
6061
- "example": 1
6589
+ "text": {
6590
+ "type": "string"
6591
+ }
6592
+ },
6593
+ "required": [
6594
+ "type",
6595
+ "text"
6596
+ ]
6597
+ },
6598
+ "ToolPart": {
6599
+ "type": "object",
6600
+ "properties": {
6601
+ "type": {
6602
+ "type": "string"
6062
6603
  },
6063
- "cid": {
6064
- "type": "string",
6065
- "minLength": 1,
6066
- "description": "Content Identifier (CID) - content-addressed hash",
6067
- "example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
6604
+ "toolCallId": {
6605
+ "type": "string"
6606
+ },
6607
+ "toolName": {
6608
+ "type": "string"
6609
+ },
6610
+ "args": {
6611
+ "type": "object",
6612
+ "additionalProperties": {
6613
+ "nullable": true
6614
+ }
6615
+ },
6616
+ "output": {
6617
+ "nullable": true
6618
+ },
6619
+ "state": {
6620
+ "type": "string",
6621
+ "enum": [
6622
+ "partial-call",
6623
+ "call",
6624
+ "output-available"
6625
+ ]
6626
+ }
6627
+ },
6628
+ "required": [
6629
+ "type"
6630
+ ]
6631
+ },
6632
+ "MessagePart": {
6633
+ "anyOf": [
6634
+ {
6635
+ "$ref": "#/components/schemas/TextPart"
6636
+ },
6637
+ {
6638
+ "$ref": "#/components/schemas/ToolPart"
6639
+ },
6640
+ {
6641
+ "type": "object",
6642
+ "properties": {
6643
+ "type": {
6644
+ "type": "string"
6645
+ }
6646
+ },
6647
+ "required": [
6648
+ "type"
6649
+ ]
6650
+ }
6651
+ ]
6652
+ },
6653
+ "ChatMessage": {
6654
+ "type": "object",
6655
+ "properties": {
6656
+ "id": {
6657
+ "type": "string"
6658
+ },
6659
+ "role": {
6660
+ "type": "string",
6661
+ "enum": [
6662
+ "user",
6663
+ "assistant",
6664
+ "system",
6665
+ "tool"
6666
+ ]
6667
+ },
6668
+ "parts": {
6669
+ "type": "array",
6670
+ "items": {
6671
+ "$ref": "#/components/schemas/MessagePart"
6672
+ }
6673
+ },
6674
+ "content": {
6675
+ "type": "string"
6676
+ }
6677
+ },
6678
+ "required": [
6679
+ "id",
6680
+ "role"
6681
+ ]
6682
+ },
6683
+ "SendChatRequest": {
6684
+ "type": "object",
6685
+ "properties": {
6686
+ "messages": {
6687
+ "type": "array",
6688
+ "items": {
6689
+ "$ref": "#/components/schemas/ChatMessage"
6690
+ },
6691
+ "description": "Array of chat messages in AI SDK v5 UIMessage format"
6692
+ }
6693
+ },
6694
+ "required": [
6695
+ "messages"
6696
+ ]
6697
+ },
6698
+ "ChatSession": {
6699
+ "type": "object",
6700
+ "properties": {
6701
+ "id": {
6702
+ "type": "string",
6703
+ "description": "Chat session ID",
6704
+ "example": "chat_abc123"
6705
+ },
6706
+ "createdAt": {
6707
+ "type": "string",
6708
+ "description": "ISO 8601 creation timestamp",
6709
+ "example": "2025-01-14T12:00:00.000Z"
6710
+ },
6711
+ "updatedAt": {
6712
+ "type": "string",
6713
+ "description": "ISO 8601 last update timestamp",
6714
+ "example": "2025-01-14T12:30:00.000Z"
6715
+ },
6716
+ "ownerId": {
6717
+ "type": "string",
6718
+ "nullable": true,
6719
+ "description": "Owner user ID (Arke PI or Supabase ID)"
6720
+ },
6721
+ "title": {
6722
+ "type": "string",
6723
+ "nullable": true,
6724
+ "description": "Auto-generated chat title from first message",
6725
+ "example": "Help me understand the codebase..."
6726
+ },
6727
+ "messages": {
6728
+ "type": "array",
6729
+ "items": {
6730
+ "type": "object",
6731
+ "properties": {
6732
+ "id": {
6733
+ "type": "string"
6734
+ },
6735
+ "role": {
6736
+ "type": "string",
6737
+ "enum": [
6738
+ "user",
6739
+ "assistant",
6740
+ "system",
6741
+ "tool"
6742
+ ]
6743
+ },
6744
+ "content": {
6745
+ "type": "string"
6746
+ },
6747
+ "createdAt": {
6748
+ "type": "string"
6749
+ },
6750
+ "toolInvocations": {
6751
+ "type": "array",
6752
+ "items": {
6753
+ "type": "object",
6754
+ "properties": {
6755
+ "toolCallId": {
6756
+ "type": "string"
6757
+ },
6758
+ "toolName": {
6759
+ "type": "string"
6760
+ },
6761
+ "args": {
6762
+ "type": "object",
6763
+ "additionalProperties": {
6764
+ "nullable": true
6765
+ }
6766
+ },
6767
+ "result": {
6768
+ "nullable": true
6769
+ },
6770
+ "state": {
6771
+ "type": "string"
6772
+ }
6773
+ },
6774
+ "required": [
6775
+ "toolCallId",
6776
+ "toolName",
6777
+ "state"
6778
+ ]
6779
+ }
6780
+ }
6781
+ },
6782
+ "required": [
6783
+ "id",
6784
+ "role",
6785
+ "content",
6786
+ "createdAt"
6787
+ ]
6788
+ },
6789
+ "description": "Full message history (only included in session detail)"
6790
+ }
6791
+ },
6792
+ "required": [
6793
+ "id",
6794
+ "createdAt",
6795
+ "updatedAt",
6796
+ "ownerId",
6797
+ "title"
6798
+ ]
6799
+ },
6800
+ "ChatSessionDeleteResponse": {
6801
+ "type": "object",
6802
+ "properties": {
6803
+ "success": {
6804
+ "type": "boolean"
6805
+ }
6806
+ },
6807
+ "required": [
6808
+ "success"
6809
+ ]
6810
+ },
6811
+ "AttestationResponse": {
6812
+ "type": "object",
6813
+ "properties": {
6814
+ "pi": {
6815
+ "type": "string",
6816
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
6817
+ "description": "Entity ID (ULID format)",
6818
+ "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
6819
+ },
6820
+ "ver": {
6821
+ "type": "integer",
6822
+ "minimum": 0,
6823
+ "exclusiveMinimum": true,
6824
+ "description": "Entity version number",
6825
+ "example": 1
6826
+ },
6827
+ "cid": {
6828
+ "type": "string",
6829
+ "minLength": 1,
6830
+ "description": "Content Identifier (CID) - content-addressed hash",
6831
+ "example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
6068
6832
  },
6069
6833
  "arweave_tx": {
6070
6834
  "type": "string",
@@ -6135,6 +6899,32 @@
6135
6899
  "message"
6136
6900
  ]
6137
6901
  },
6902
+ "ChainHeadResponse": {
6903
+ "type": "object",
6904
+ "properties": {
6905
+ "seq": {
6906
+ "type": "integer",
6907
+ "description": "Sequence number of the latest attestation",
6908
+ "example": 784
6909
+ },
6910
+ "tx": {
6911
+ "type": "string",
6912
+ "description": "Arweave transaction ID",
6913
+ "example": "Rxv_BpobNBUr0x5DstsAEUVxCO12hKxv7cnHnGLYp2c"
6914
+ },
6915
+ "arweave_url": {
6916
+ "type": "string",
6917
+ "format": "uri",
6918
+ "description": "Arweave gateway URL for direct access",
6919
+ "example": "https://arweave.net/Rxv_BpobNBUr0x5DstsAEUVxCO12hKxv7cnHnGLYp2c"
6920
+ }
6921
+ },
6922
+ "required": [
6923
+ "seq",
6924
+ "tx",
6925
+ "arweave_url"
6926
+ ]
6927
+ },
6138
6928
  "VerifyAttestationResponse": {
6139
6929
  "type": "object",
6140
6930
  "properties": {
@@ -6231,13 +7021,35 @@
6231
7021
  },
6232
7022
  "x-arke-version": "1.0.0",
6233
7023
  "paths": {
7024
+ "/ops-reference": {
7025
+ "get": {
7026
+ "tags": [
7027
+ "Documentation"
7028
+ ],
7029
+ "summary": "Get LLM-friendly API reference",
7030
+ "description": "Returns a condensed, plain-text API operations reference optimized for LLM consumption.\n\nThis endpoint provides the same information as the OpenAPI spec but in a format that:\n- Uses ~80% fewer tokens than the full OpenAPI JSON\n- Preserves full endpoint descriptions\n- Organizes operations by category\n- Marks required fields with `*` suffix\n- Includes auth requirements inline\n\n**Format example:**\n```\n## Collections\nPOST /collections [required] - Create a new collection\n body: {label*:string, description:string}\n\n Creates a collection with the authenticated user as owner.\n```\n\nUse this for injecting API knowledge into LLM system prompts.",
7031
+ "responses": {
7032
+ "200": {
7033
+ "description": "Condensed API operations reference",
7034
+ "content": {
7035
+ "text/plain": {
7036
+ "schema": {
7037
+ "type": "string",
7038
+ "example": "# Arke API Operations Reference\n\n## Auth & Users\nPOST /auth/register [jwt-only] - Register new user\n..."
7039
+ }
7040
+ }
7041
+ }
7042
+ }
7043
+ }
7044
+ }
7045
+ },
6234
7046
  "/auth/register": {
6235
7047
  "post": {
6236
7048
  "tags": [
6237
7049
  "Auth"
6238
7050
  ],
6239
7051
  "summary": "Register new user",
6240
- "description": "Creates a user entity from JWT claims. Idempotent - returns existing user if already registered.",
7052
+ "description": "Creates a user entity from JWT claims. Idempotent - returns existing user if already registered.\n\n---\n**Permission:** `user:create` \n**Auth:** jwt-only",
6241
7053
  "x-arke-action": "user:create",
6242
7054
  "x-arke-auth": "jwt-only",
6243
7055
  "x-arke-tier": "standard",
@@ -6302,16 +7114,13 @@
6302
7114
  "Users"
6303
7115
  ],
6304
7116
  "summary": "Get current user",
6305
- "description": "Returns the authenticated user's entity.",
7117
+ "description": "Returns the authenticated user's entity.\n\n---\n**Permission:** `user:view` \n**Auth:** required",
6306
7118
  "x-arke-action": "user:view",
6307
7119
  "x-arke-auth": "required",
6308
7120
  "x-arke-tier": "standard",
6309
7121
  "security": [
6310
7122
  {
6311
7123
  "bearerAuth": []
6312
- },
6313
- {
6314
- "apiKeyAuth": []
6315
7124
  }
6316
7125
  ],
6317
7126
  "responses": {
@@ -6350,7 +7159,7 @@
6350
7159
  "Users"
6351
7160
  ],
6352
7161
  "summary": "Get user by ID",
6353
- "description": "Returns a user entity by ID. May require authentication depending on permissions.",
7162
+ "description": "Returns a user entity by ID. May require authentication depending on permissions.\n\n---\n**Permission:** `user:view` \n**Auth:** optional",
6354
7163
  "x-arke-action": "user:view",
6355
7164
  "x-arke-auth": "optional",
6356
7165
  "x-arke-tier": "standard",
@@ -6412,16 +7221,13 @@
6412
7221
  "Users"
6413
7222
  ],
6414
7223
  "summary": "Update user profile",
6415
- "description": "Updates a user's profile. Requires user:update permission (typically self-ownership).",
7224
+ "description": "Updates a user's profile. Requires user:update permission (typically self-ownership).\n\n---\n**Permission:** `user:update` \n**Auth:** required",
6416
7225
  "x-arke-action": "user:update",
6417
7226
  "x-arke-auth": "required",
6418
7227
  "x-arke-tier": "standard",
6419
7228
  "security": [
6420
7229
  {
6421
7230
  "bearerAuth": []
6422
- },
6423
- {
6424
- "apiKeyAuth": []
6425
7231
  }
6426
7232
  ],
6427
7233
  "parameters": [
@@ -6548,16 +7354,13 @@
6548
7354
  "API Keys"
6549
7355
  ],
6550
7356
  "summary": "Create API key",
6551
- "description": "Creates a new API key for the authenticated user. The full key is only returned once - store it securely.",
7357
+ "description": "Creates a new API key for the authenticated user. The full key is only returned once - store it securely.\n\n---\n**Permission:** `user:credentials` \n**Auth:** required",
6552
7358
  "x-arke-action": "user:credentials",
6553
7359
  "x-arke-auth": "required",
6554
7360
  "x-arke-tier": "standard",
6555
7361
  "security": [
6556
7362
  {
6557
7363
  "bearerAuth": []
6558
- },
6559
- {
6560
- "apiKeyAuth": []
6561
7364
  }
6562
7365
  ],
6563
7366
  "requestBody": {
@@ -6601,16 +7404,13 @@
6601
7404
  "API Keys"
6602
7405
  ],
6603
7406
  "summary": "List API keys",
6604
- "description": "Lists all active API keys for the authenticated user. Returns prefixes only, not full keys.",
7407
+ "description": "Lists all active API keys for the authenticated user. Returns prefixes only, not full keys.\n\n---\n**Permission:** `user:credentials` \n**Auth:** required",
6605
7408
  "x-arke-action": "user:credentials",
6606
7409
  "x-arke-auth": "required",
6607
7410
  "x-arke-tier": "standard",
6608
7411
  "security": [
6609
7412
  {
6610
7413
  "bearerAuth": []
6611
- },
6612
- {
6613
- "apiKeyAuth": []
6614
7414
  }
6615
7415
  ],
6616
7416
  "responses": {
@@ -6647,16 +7447,13 @@
6647
7447
  "API Keys"
6648
7448
  ],
6649
7449
  "summary": "Revoke API key",
6650
- "description": "Revokes an API key by prefix. The key will be immediately invalid.",
7450
+ "description": "Revokes an API key by prefix. The key will be immediately invalid.\n\n---\n**Permission:** `user:credentials` \n**Auth:** required",
6651
7451
  "x-arke-action": "user:credentials",
6652
7452
  "x-arke-auth": "required",
6653
7453
  "x-arke-tier": "standard",
6654
7454
  "security": [
6655
7455
  {
6656
7456
  "bearerAuth": []
6657
- },
6658
- {
6659
- "apiKeyAuth": []
6660
7457
  }
6661
7458
  ],
6662
7459
  "parameters": [
@@ -6712,7 +7509,7 @@
6712
7509
  "Users"
6713
7510
  ],
6714
7511
  "summary": "List collections user has access to",
6715
- "description": "Returns all collections where the user has a role relationship (owner, editor, viewer, etc.).\n\nQueries GraphDB for collections with relationships pointing to this user where peer_type is 'user'.\nResults include the role predicate so clients know what access the user has to each collection.\n\nSupports filtering by predicate (role name) and pagination.",
7512
+ "description": "Returns all collections where the user has a role relationship (owner, editor, viewer, etc.).\n\nQueries GraphDB for collections with relationships pointing to this user where peer_type is 'user'.\nResults include the role predicate so clients know what access the user has to each collection.\n\nSupports filtering by predicate (role name) and pagination.\n\n---\n**Permission:** `user:view` \n**Auth:** optional",
6716
7513
  "x-arke-action": "user:view",
6717
7514
  "x-arke-auth": "optional",
6718
7515
  "x-arke-tier": "external",
@@ -6823,16 +7620,13 @@
6823
7620
  "Search"
6824
7621
  ],
6825
7622
  "summary": "Search across user collections",
6826
- "description": "Performs semantic search across all collections the authenticated user has access to.\n\n## Features\n- Searches all user's collections in parallel (up to 25)\n- Optionally includes public-domain entities\n- Filter by entity type or collection role\n- Results ranked by semantic relevance\n\n## Performance\n- Collections are queried in parallel for speed\n- If user has more than 25 collections, queries first 25 (by created_at). Use role filter to narrow down.\n- Response includes metadata showing collections_queried vs collections_total\n\n## Scoring\n- Results use cosine similarity scores (0-1)\n- Scores are comparable across collections\n",
7623
+ "description": "Performs semantic search across all collections the authenticated user has access to.\n\n## Features\n- Searches all user's collections in parallel (up to 25)\n- Optionally includes public-domain entities\n- Filter by entity type or collection role\n- Results ranked by semantic relevance\n\n## Performance\n- Collections are queried in parallel for speed\n- If user has more than 25 collections, queries first 25 (by created_at). Use role filter to narrow down.\n- Response includes metadata showing collections_queried vs collections_total\n\n## Scoring\n- Results use cosine similarity scores (0-1)\n- Scores are comparable across collections\n\n\n---\n**Permission:** `search:execute` \n**Auth:** required",
6827
7624
  "x-arke-action": "search:execute",
6828
7625
  "x-arke-auth": "required",
6829
7626
  "x-arke-tier": "external",
6830
7627
  "security": [
6831
7628
  {
6832
7629
  "bearerAuth": []
6833
- },
6834
- {
6835
- "apiKeyAuth": []
6836
7630
  }
6837
7631
  ],
6838
7632
  "requestBody": {
@@ -6904,16 +7698,13 @@
6904
7698
  "Collections"
6905
7699
  ],
6906
7700
  "summary": "Create a new collection",
6907
- "description": "Creates a collection with the authenticated user as owner.",
7701
+ "description": "Creates a collection with the authenticated user as owner.\n\n---\n**Permission:** `collection:create` \n**Auth:** required",
6908
7702
  "x-arke-action": "collection:create",
6909
7703
  "x-arke-auth": "required",
6910
7704
  "x-arke-tier": "standard",
6911
7705
  "security": [
6912
7706
  {
6913
7707
  "bearerAuth": []
6914
- },
6915
- {
6916
- "apiKeyAuth": []
6917
7708
  }
6918
7709
  ],
6919
7710
  "requestBody": {
@@ -6995,7 +7786,7 @@
6995
7786
  "Collections"
6996
7787
  ],
6997
7788
  "summary": "Get collection by ID",
6998
- "description": "Returns a collection entity by ID.",
7789
+ "description": "Returns a collection entity by ID.\n\n---\n**Permission:** `collection:view` \n**Auth:** optional",
6999
7790
  "x-arke-action": "collection:view",
7000
7791
  "x-arke-auth": "optional",
7001
7792
  "x-arke-tier": "standard",
@@ -7057,16 +7848,13 @@
7057
7848
  "Collections"
7058
7849
  ],
7059
7850
  "summary": "Update collection properties",
7060
- "description": "Updates collection properties. Requires collection:update permission.",
7851
+ "description": "Updates collection properties. Requires collection:update permission.\n\n---\n**Permission:** `collection:update` \n**Auth:** required",
7061
7852
  "x-arke-action": "collection:update",
7062
7853
  "x-arke-auth": "required",
7063
7854
  "x-arke-tier": "standard",
7064
7855
  "security": [
7065
7856
  {
7066
7857
  "bearerAuth": []
7067
- },
7068
- {
7069
- "apiKeyAuth": []
7070
7858
  }
7071
7859
  ],
7072
7860
  "parameters": [
@@ -7192,16 +7980,13 @@
7192
7980
  "Collections"
7193
7981
  ],
7194
7982
  "summary": "Add a new role",
7195
- "description": "Adds a new role to the collection. Requires collection:manage permission.",
7983
+ "description": "Adds a new role to the collection. Requires collection:manage permission.\n\n---\n**Permission:** `collection:manage` \n**Auth:** required",
7196
7984
  "x-arke-action": "collection:manage",
7197
7985
  "x-arke-auth": "required",
7198
7986
  "x-arke-tier": "standard",
7199
7987
  "security": [
7200
7988
  {
7201
7989
  "bearerAuth": []
7202
- },
7203
- {
7204
- "apiKeyAuth": []
7205
7990
  }
7206
7991
  ],
7207
7992
  "parameters": [
@@ -7310,16 +8095,13 @@
7310
8095
  "Collections"
7311
8096
  ],
7312
8097
  "summary": "Update role actions",
7313
- "description": "Updates the actions for an existing role. Requires collection:manage permission.",
8098
+ "description": "Updates the actions for an existing role. Requires collection:manage permission.\n\n---\n**Permission:** `collection:manage` \n**Auth:** required",
7314
8099
  "x-arke-action": "collection:manage",
7315
8100
  "x-arke-auth": "required",
7316
8101
  "x-arke-tier": "standard",
7317
8102
  "security": [
7318
8103
  {
7319
8104
  "bearerAuth": []
7320
- },
7321
- {
7322
- "apiKeyAuth": []
7323
8105
  }
7324
8106
  ],
7325
8107
  "parameters": [
@@ -7438,16 +8220,13 @@
7438
8220
  "Collections"
7439
8221
  ],
7440
8222
  "summary": "Delete a role",
7441
- "description": "Deletes a role from the collection. Requires collection:manage permission.",
8223
+ "description": "Deletes a role from the collection. Requires collection:manage permission.\n\n---\n**Permission:** `collection:manage` \n**Auth:** required",
7442
8224
  "x-arke-action": "collection:manage",
7443
8225
  "x-arke-auth": "required",
7444
8226
  "x-arke-tier": "standard",
7445
8227
  "security": [
7446
8228
  {
7447
8229
  "bearerAuth": []
7448
- },
7449
- {
7450
- "apiKeyAuth": []
7451
8230
  }
7452
8231
  ],
7453
8232
  "parameters": [
@@ -7535,7 +8314,7 @@
7535
8314
  "Collections"
7536
8315
  ],
7537
8316
  "summary": "List collection members",
7538
- "description": "Returns all members of the collection grouped by type. By default, expired memberships are excluded.",
8317
+ "description": "Returns all members of the collection grouped by type. By default, expired memberships are excluded.\n\n---\n**Permission:** `collection:view` \n**Auth:** optional",
7539
8318
  "x-arke-action": "collection:view",
7540
8319
  "x-arke-auth": "optional",
7541
8320
  "x-arke-tier": "standard",
@@ -7611,16 +8390,13 @@
7611
8390
  "Collections"
7612
8391
  ],
7613
8392
  "summary": "Assign user to role",
7614
- "description": "Assigns a user to a role in the collection. Requires collection:manage permission.",
8393
+ "description": "Assigns a user to a role in the collection. Requires collection:manage permission.\n\n---\n**Permission:** `collection:manage` \n**Auth:** required",
7615
8394
  "x-arke-action": "collection:manage",
7616
8395
  "x-arke-auth": "required",
7617
8396
  "x-arke-tier": "standard",
7618
8397
  "security": [
7619
8398
  {
7620
8399
  "bearerAuth": []
7621
- },
7622
- {
7623
- "apiKeyAuth": []
7624
8400
  }
7625
8401
  ],
7626
8402
  "parameters": [
@@ -7729,16 +8505,13 @@
7729
8505
  "Collections"
7730
8506
  ],
7731
8507
  "summary": "Remove user from role",
7732
- "description": "Removes a user from a role in the collection. Requires collection:manage permission.",
8508
+ "description": "Removes a user from a role in the collection. Requires collection:manage permission.\n\n---\n**Permission:** `collection:manage` \n**Auth:** required",
7733
8509
  "x-arke-action": "collection:manage",
7734
8510
  "x-arke-auth": "required",
7735
8511
  "x-arke-tier": "standard",
7736
8512
  "security": [
7737
8513
  {
7738
8514
  "bearerAuth": []
7739
- },
7740
- {
7741
- "apiKeyAuth": []
7742
8515
  }
7743
8516
  ],
7744
8517
  "parameters": [
@@ -7861,16 +8634,13 @@
7861
8634
  "Collections"
7862
8635
  ],
7863
8636
  "summary": "Set root entity",
7864
- "description": "Links an entity as the root of this collection.\n\n**Prerequisites:** The entity must already have a 'collection' relationship\npointing to this collection (typically set during entity creation via the\n`collection` field).\n\n**Recommended flow:**\n1. Create entity with `collection` field set → entity is immediately protected\n2. Call this endpoint to establish the root link from collection to entity\n\nThis adds only the reverse relationship:\n- Collection → Entity (predicate: 'root')\n\nRequires collection:update permission on the collection.",
8637
+ "description": "Links an entity as the root of this collection.\n\n**Prerequisites:** The entity must already have a 'collection' relationship\npointing to this collection (typically set during entity creation via the\n`collection` field).\n\n**Recommended flow:**\n1. Create entity with `collection` field set → entity is immediately protected\n2. Call this endpoint to establish the root link from collection to entity\n\nThis adds only the reverse relationship:\n- Collection → Entity (predicate: 'root')\n\nRequires collection:update permission on the collection.\n\n---\n**Permission:** `collection:update` \n**Auth:** required",
7865
8638
  "x-arke-action": "collection:update",
7866
8639
  "x-arke-auth": "required",
7867
8640
  "x-arke-tier": "standard",
7868
8641
  "security": [
7869
8642
  {
7870
8643
  "bearerAuth": []
7871
- },
7872
- {
7873
- "apiKeyAuth": []
7874
8644
  }
7875
8645
  ],
7876
8646
  "parameters": [
@@ -7996,7 +8766,7 @@
7996
8766
  "Collections"
7997
8767
  ],
7998
8768
  "summary": "List entities in a collection",
7999
- "description": "Returns entities belonging to this collection from the graph database.\n\nSupports pagination and optional type filtering. Results are ordered by creation date (newest first).",
8769
+ "description": "Returns entities belonging to this collection from the graph database.\n\nSupports pagination and optional type filtering. Results are ordered by creation date (newest first).\n\n---\n**Permission:** `collection:view` \n**Auth:** optional",
8000
8770
  "x-arke-action": "collection:view",
8001
8771
  "x-arke-auth": "optional",
8002
8772
  "x-arke-tier": "external",
@@ -8099,16 +8869,13 @@
8099
8869
  "Entities"
8100
8870
  ],
8101
8871
  "summary": "Create a new entity",
8102
- "description": "Creates a generic entity of any type. For type-specific validation, use type-specific endpoints.",
8872
+ "description": "Creates a generic entity of any type. For type-specific validation, use type-specific endpoints.\n\n---\n**Permission:** `entity:create` \n**Auth:** required",
8103
8873
  "x-arke-action": "entity:create",
8104
8874
  "x-arke-auth": "required",
8105
8875
  "x-arke-tier": "standard",
8106
8876
  "security": [
8107
8877
  {
8108
8878
  "bearerAuth": []
8109
- },
8110
- {
8111
- "apiKeyAuth": []
8112
8879
  }
8113
8880
  ],
8114
8881
  "requestBody": {
@@ -8207,7 +8974,7 @@
8207
8974
  "Entities"
8208
8975
  ],
8209
8976
  "summary": "Get entity by ID",
8210
- "description": "Returns any entity by ID. Permission check uses parent collection if entity belongs to one.",
8977
+ "description": "Returns any entity by ID. Permission check uses parent collection if entity belongs to one.\n\n---\n**Permission:** `entity:view` \n**Auth:** optional",
8211
8978
  "x-arke-action": "entity:view",
8212
8979
  "x-arke-auth": "optional",
8213
8980
  "x-arke-tier": "standard",
@@ -8269,16 +9036,13 @@
8269
9036
  "Entities"
8270
9037
  ],
8271
9038
  "summary": "Update entity",
8272
- "description": "Updates any entity with merge semantics. Properties are deep merged, relationships use upsert semantics. Use properties_remove and relationships_remove for deletions. Note: entity:update on a collection requires collection:update permission.",
9039
+ "description": "Updates an entity with merge semantics. **This is the recommended way to manage relationships.**\n\n- `relationships_add`: Upsert relationships (properties are merged if relationship exists)\n- `relationships_remove`: Remove by predicate/peer\n- `properties`: Deep merged with existing\n- `properties_remove`: Remove nested properties using nested object structure\n\n**properties_remove syntax:**\n- Top-level keys: `[\"field1\", \"field2\"]`\n- Nested keys: `{ parent: { child: [\"key_to_remove\"] } }`\n- **Dot notation is NOT supported** - `[\"parent.child.key\"]` will NOT work\n\nExample to remove `config.options.debug`:\n```json\n{ \"properties_remove\": { \"config\": { \"options\": [\"debug\"] } } }\n```\n\nUse `/relationships` only for bidirectional links updating two entities atomically.\n\nNote: entity:update on a collection requires collection:update permission.\n\n---\n**Permission:** `entity:update` \n**Auth:** required",
8273
9040
  "x-arke-action": "entity:update",
8274
9041
  "x-arke-auth": "required",
8275
9042
  "x-arke-tier": "standard",
8276
9043
  "security": [
8277
9044
  {
8278
9045
  "bearerAuth": []
8279
- },
8280
- {
8281
- "apiKeyAuth": []
8282
9046
  }
8283
9047
  ],
8284
9048
  "parameters": [
@@ -8402,16 +9166,13 @@
8402
9166
  "Entities"
8403
9167
  ],
8404
9168
  "summary": "Delete entity",
8405
- "description": "Soft-deletes an entity by creating a tombstone version. The entity can be restored later via POST /entities/:id/restore. Note: entity:delete on a collection requires collection:delete permission.",
9169
+ "description": "Soft-deletes an entity by creating a tombstone version. The entity can be restored later via POST /entities/:id/restore. Note: entity:delete on a collection requires collection:delete permission.\n\n---\n**Permission:** `entity:delete` \n**Auth:** required",
8406
9170
  "x-arke-action": "entity:delete",
8407
9171
  "x-arke-auth": "required",
8408
9172
  "x-arke-tier": "standard",
8409
9173
  "security": [
8410
9174
  {
8411
9175
  "bearerAuth": []
8412
- },
8413
- {
8414
- "apiKeyAuth": []
8415
9176
  }
8416
9177
  ],
8417
9178
  "parameters": [
@@ -8531,24 +9292,16 @@
8531
9292
  }
8532
9293
  }
8533
9294
  },
8534
- "/entities/{id}/restore": {
8535
- "post": {
9295
+ "/entities/{id}/tip": {
9296
+ "get": {
8536
9297
  "tags": [
8537
9298
  "Entities"
8538
9299
  ],
8539
- "summary": "Restore deleted entity",
8540
- "description": "Restores a deleted entity by finding the last non-deleted version and creating a new version from it. Note: entity:restore on a collection requires collection:restore permission.",
8541
- "x-arke-action": "entity:restore",
8542
- "x-arke-auth": "required",
9300
+ "summary": "Get entity tip CID",
9301
+ "description": "Returns only the current manifest CID (tip) for an entity. Lightweight endpoint for CAS operations - single Durable Object lookup, no manifest fetch, no permission check.\n\n---\n**Permission:** `entity:tip` \n**Auth:** none",
9302
+ "x-arke-action": "entity:tip",
9303
+ "x-arke-auth": "none",
8543
9304
  "x-arke-tier": "standard",
8544
- "security": [
8545
- {
8546
- "bearerAuth": []
8547
- },
8548
- {
8549
- "apiKeyAuth": []
8550
- }
8551
- ],
8552
9305
  "parameters": [
8553
9306
  {
8554
9307
  "schema": {
@@ -8563,37 +9316,93 @@
8563
9316
  "in": "path"
8564
9317
  }
8565
9318
  ],
8566
- "requestBody": {
8567
- "content": {
8568
- "application/json": {
8569
- "schema": {
8570
- "$ref": "#/components/schemas/RestoreEntityRequest"
8571
- }
8572
- }
8573
- }
8574
- },
8575
9319
  "responses": {
8576
9320
  "200": {
8577
- "description": "Entity restored",
9321
+ "description": "Tip found",
8578
9322
  "content": {
8579
9323
  "application/json": {
8580
9324
  "schema": {
8581
- "$ref": "#/components/schemas/EntityRestoredResponse"
9325
+ "$ref": "#/components/schemas/TipResponse"
8582
9326
  }
8583
9327
  }
8584
9328
  }
8585
9329
  },
8586
- "400": {
8587
- "description": "Bad Request - Invalid input",
9330
+ "404": {
9331
+ "description": "Not Found - Resource does not exist",
8588
9332
  "content": {
8589
9333
  "application/json": {
8590
9334
  "schema": {
8591
- "$ref": "#/components/schemas/ValidationErrorResponse"
9335
+ "$ref": "#/components/schemas/ErrorResponse"
8592
9336
  },
8593
9337
  "example": {
8594
- "error": "Validation failed",
8595
- "details": {
8596
- "issues": [
9338
+ "error": "Entity not found"
9339
+ }
9340
+ }
9341
+ }
9342
+ }
9343
+ }
9344
+ }
9345
+ },
9346
+ "/entities/{id}/restore": {
9347
+ "post": {
9348
+ "tags": [
9349
+ "Entities"
9350
+ ],
9351
+ "summary": "Restore deleted entity",
9352
+ "description": "Restores a deleted entity by finding the last non-deleted version and creating a new version from it. Note: entity:restore on a collection requires collection:restore permission.\n\n---\n**Permission:** `entity:restore` \n**Auth:** required",
9353
+ "x-arke-action": "entity:restore",
9354
+ "x-arke-auth": "required",
9355
+ "x-arke-tier": "standard",
9356
+ "security": [
9357
+ {
9358
+ "bearerAuth": []
9359
+ }
9360
+ ],
9361
+ "parameters": [
9362
+ {
9363
+ "schema": {
9364
+ "type": "string",
9365
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
9366
+ "description": "Entity ID (ULID format)",
9367
+ "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
9368
+ },
9369
+ "required": true,
9370
+ "description": "Entity ID (ULID)",
9371
+ "name": "id",
9372
+ "in": "path"
9373
+ }
9374
+ ],
9375
+ "requestBody": {
9376
+ "content": {
9377
+ "application/json": {
9378
+ "schema": {
9379
+ "$ref": "#/components/schemas/RestoreEntityRequest"
9380
+ }
9381
+ }
9382
+ }
9383
+ },
9384
+ "responses": {
9385
+ "200": {
9386
+ "description": "Entity restored",
9387
+ "content": {
9388
+ "application/json": {
9389
+ "schema": {
9390
+ "$ref": "#/components/schemas/EntityRestoredResponse"
9391
+ }
9392
+ }
9393
+ }
9394
+ },
9395
+ "400": {
9396
+ "description": "Bad Request - Invalid input",
9397
+ "content": {
9398
+ "application/json": {
9399
+ "schema": {
9400
+ "$ref": "#/components/schemas/ValidationErrorResponse"
9401
+ },
9402
+ "example": {
9403
+ "error": "Validation failed",
9404
+ "details": {
9405
+ "issues": [
8597
9406
  {
8598
9407
  "path": [
8599
9408
  "properties",
@@ -8672,7 +9481,7 @@
8672
9481
  "Entities"
8673
9482
  ],
8674
9483
  "summary": "Get entity collection",
8675
- "description": "Returns the collection ID that this entity belongs to. Returns null if the entity is not in any collection. If the entity IS a collection, returns its own ID.",
9484
+ "description": "Returns the collection ID that this entity belongs to. Returns null if the entity is not in any collection. If the entity IS a collection, returns its own ID.\n\n---\n**Permission:** `entity:view` \n**Auth:** optional",
8676
9485
  "x-arke-action": "entity:view",
8677
9486
  "x-arke-auth": "optional",
8678
9487
  "x-arke-tier": "standard",
@@ -8736,7 +9545,7 @@
8736
9545
  "Entities"
8737
9546
  ],
8738
9547
  "summary": "Get entity tree",
8739
- "description": "Returns a hierarchical tree of entities reachable from the source entity.\n\nUse this to browse collections and folders without making multiple API calls.\nThe tree follows relationship edges (optionally filtered by predicate) and\nreturns a nested structure suitable for tree UI rendering.\n\nQuery parameters:\n- `depth`: Max tree depth (1-4, default 2)\n- `collection`: Constrain to entities in this collection\n- `predicates`: Comma-separated predicates to follow (e.g., \"contains\")\n- `limit`: Max nodes to return (default 100)",
9548
+ "description": "Returns a hierarchical tree of entities reachable from the source entity.\n\nUse this to browse collections and folders without making multiple API calls.\nThe tree follows relationship edges (optionally filtered by predicate) and\nreturns a nested structure suitable for tree UI rendering.\n\nQuery parameters:\n- `depth`: Max tree depth (1-4, default 2)\n- `collection`: Constrain to entities in this collection\n- `predicates`: Comma-separated predicates to follow (e.g., \"contains\")\n- `limit`: Max nodes to return (default 100)\n\n---\n**Permission:** `entity:view` \n**Auth:** optional",
8740
9549
  "x-arke-action": "entity:view",
8741
9550
  "x-arke-auth": "optional",
8742
9551
  "x-arke-tier": "standard",
@@ -8848,7 +9657,7 @@
8848
9657
  "Versions"
8849
9658
  ],
8850
9659
  "summary": "Get diff between entity versions",
8851
- "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.",
9660
+ "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.\n\n---\n**Permission:** `entity:view` \n**Auth:** optional",
8852
9661
  "x-arke-action": "entity:view",
8853
9662
  "x-arke-auth": "optional",
8854
9663
  "x-arke-tier": "standard",
@@ -8975,16 +9784,13 @@
8975
9784
  "Permissions"
8976
9785
  ],
8977
9786
  "summary": "Get your permissions for an entity",
8978
- "description": "Returns the list of actions you can perform on this entity.\n\nThe response includes:\n- `allowed_actions`: Concrete actions you can perform (no wildcards)\n- `resolution`: How permissions were determined\n\nResolution methods:\n- `collection`: Permissions from your role in the parent collection\n- `self`: You are checking your own user entity (self-ownership)\n- `open_season`: Entity is not in any collection (publicly accessible)\n\nActions are filtered to only those relevant to the entity type:\n- For files: entity:* and file:* actions\n- For collections: entity:* and collection:* actions\n- etc.",
9787
+ "description": "Returns the list of actions you can perform on this entity.\n\nThe response includes:\n- `allowed_actions`: Concrete actions you can perform (no wildcards)\n- `resolution`: How permissions were determined\n\nResolution methods:\n- `collection`: Permissions from your role in the parent collection\n- `self`: You are checking your own user entity (self-ownership)\n- `open_season`: Entity is not in any collection (publicly accessible)\n\nActions are filtered to only those relevant to the entity type:\n- For files: entity:* and file:* actions\n- For collections: entity:* and collection:* actions\n- etc.\n\n---\n**Permission:** `entity:view` \n**Auth:** required",
8979
9788
  "x-arke-action": "entity:view",
8980
9789
  "x-arke-auth": "required",
8981
9790
  "x-arke-tier": "standard",
8982
9791
  "security": [
8983
9792
  {
8984
9793
  "bearerAuth": []
8985
- },
8986
- {
8987
- "apiKeyAuth": []
8988
9794
  }
8989
9795
  ],
8990
9796
  "parameters": [
@@ -9060,16 +9866,13 @@
9060
9866
  "Relationships"
9061
9867
  ],
9062
9868
  "summary": "Add relationship between entities",
9063
- "description": "Creates a relationship from source to target entity.\n\nIf `target_predicate` is provided, creates a **bidirectional** relationship:\n- Adds `source_predicate` relationship on source pointing to target\n- Adds `target_predicate` relationship on target pointing to source\n- Requires `entity:update` permission on both entities\n\nIf `target_predicate` is omitted, creates a **unidirectional** relationship:\n- Adds `source_predicate` relationship on source pointing to target\n- Requires `entity:update` permission on source only",
9869
+ "description": "Creates a relationship from source to target entity.\n\n**⚠️ For single-entity updates, prefer `PUT /entities/:id` with `relationships_add` - simpler API, one CAS guard, can update properties too.**\n\nUse this endpoint only for **bidirectional** relationships requiring atomic updates to TWO entities.\n\nIf `target_predicate` is provided (bidirectional):\n- Updates both source and target entities\n- Requires `entity:update` on both, plus two CAS guards\n\nIf `target_predicate` is omitted (unidirectional):\n- Use `PUT /entities/:id` instead\n\n---\n**Permission:** `entity:update` \n**Auth:** required",
9064
9870
  "x-arke-action": "entity:update",
9065
9871
  "x-arke-auth": "required",
9066
9872
  "x-arke-tier": "standard",
9067
9873
  "security": [
9068
9874
  {
9069
9875
  "bearerAuth": []
9070
- },
9071
- {
9072
- "apiKeyAuth": []
9073
9876
  }
9074
9877
  ],
9075
9878
  "requestBody": {
@@ -9179,16 +9982,13 @@
9179
9982
  "Relationships"
9180
9983
  ],
9181
9984
  "summary": "Remove relationship between entities",
9182
- "description": "Removes a relationship from source to target entity.\n\nIf `target_predicate` is provided, removes a **bidirectional** relationship:\n- Removes `source_predicate` relationship from source\n- Removes `target_predicate` relationship from target\n- Requires `entity:update` permission on both entities\n\nIf `target_predicate` is omitted, removes a **unidirectional** relationship:\n- Removes `source_predicate` relationship from source\n- Requires `entity:update` permission on source only",
9985
+ "description": "Removes a relationship from source to target entity.\n\n**⚠️ For single-entity updates, prefer `PUT /entities/:id` with `relationships_remove` - simpler API, one CAS guard, can update properties too.**\n\nUse this endpoint only for **bidirectional** relationships requiring atomic updates to TWO entities.\n\nIf `target_predicate` is provided (bidirectional):\n- Updates both source and target entities\n- Requires `entity:update` on both, plus two CAS guards\n\nIf `target_predicate` is omitted (unidirectional):\n- Use `PUT /entities/:id` instead\n\n---\n**Permission:** `entity:update` \n**Auth:** required",
9183
9986
  "x-arke-action": "entity:update",
9184
9987
  "x-arke-auth": "required",
9185
9988
  "x-arke-tier": "standard",
9186
9989
  "security": [
9187
9990
  {
9188
9991
  "bearerAuth": []
9189
- },
9190
- {
9191
- "apiKeyAuth": []
9192
9992
  }
9193
9993
  ],
9194
9994
  "requestBody": {
@@ -9300,16 +10100,13 @@
9300
10100
  "Connect"
9301
10101
  ],
9302
10102
  "summary": "Connect two entities",
9303
- "description": "Creates a unidirectional relationship from source to target entity.\n\nThis is a shorthand for adding a relationship with sensible defaults:\n- Default predicate: `connects_to` (customizable)\n- Optional label and description stored in relationship properties\n- Only requires `entity:update` permission on source entity\n\nUse this for simple entity linking. For bidirectional relationships or\nadvanced options, use the `/relationships` endpoint.",
10103
+ "description": "Creates a unidirectional relationship from source to target entity.\n\nThis is a shorthand for adding a relationship with sensible defaults:\n- Default predicate: `connects_to` (customizable)\n- Optional label and description stored in relationship properties\n- Only requires `entity:update` permission on source entity\n\nUse this for simple entity linking. For bidirectional relationships or\nadvanced options, use the `/relationships` endpoint.\n\n---\n**Permission:** `entity:update` \n**Auth:** required",
9304
10104
  "x-arke-action": "entity:update",
9305
10105
  "x-arke-auth": "required",
9306
10106
  "x-arke-tier": "standard",
9307
10107
  "security": [
9308
10108
  {
9309
10109
  "bearerAuth": []
9310
- },
9311
- {
9312
- "apiKeyAuth": []
9313
10110
  }
9314
10111
  ],
9315
10112
  "requestBody": {
@@ -9421,16 +10218,13 @@
9421
10218
  "Connect"
9422
10219
  ],
9423
10220
  "summary": "Disconnect two entities",
9424
- "description": "Removes a unidirectional relationship from source to target entity.\n\nThis is a shorthand for removing a relationship:\n- Default predicate: `connects_to` (customizable)\n- Only requires `entity:update` permission on source entity\n\nFor bidirectional removal, use the `/relationships` endpoint.",
10221
+ "description": "Removes a unidirectional relationship from source to target entity.\n\nThis is a shorthand for removing a relationship:\n- Default predicate: `connects_to` (customizable)\n- Only requires `entity:update` permission on source entity\n\nFor bidirectional removal, use the `/relationships` endpoint.\n\n---\n**Permission:** `entity:update` \n**Auth:** required",
9425
10222
  "x-arke-action": "entity:update",
9426
10223
  "x-arke-auth": "required",
9427
10224
  "x-arke-tier": "standard",
9428
10225
  "security": [
9429
10226
  {
9430
10227
  "bearerAuth": []
9431
- },
9432
- {
9433
- "apiKeyAuth": []
9434
10228
  }
9435
10229
  ],
9436
10230
  "requestBody": {
@@ -9542,16 +10336,13 @@
9542
10336
  "Files"
9543
10337
  ],
9544
10338
  "summary": "Create file entity",
9545
- "description": "Creates a new file entity.\n\n## Flow\n1. Call this endpoint with file metadata (key, filename, content_type, size)\n2. Receive entity data (uploaded: false)\n3. POST the file content to /{id}/content\n4. Entity will be updated with uploaded: true and verified CID\n\n## Key Best Practice\nUse a unique identifier as the key (e.g., version number, timestamp).\nThe actual CID is computed during upload.",
10339
+ "description": "Creates a new file entity.\n\n## Flow\n1. Call this endpoint with file metadata (key, filename, content_type, size)\n2. Receive entity data (uploaded: false)\n3. POST the file content to /{id}/content\n4. Entity will be updated with uploaded: true and verified CID\n\n## Key Best Practice\nUse a unique identifier as the key (e.g., version number, timestamp).\nThe actual CID is computed during upload.\n\n---\n**Permission:** `file:create` \n**Auth:** required",
9546
10340
  "x-arke-action": "file:create",
9547
10341
  "x-arke-auth": "required",
9548
10342
  "x-arke-tier": "standard",
9549
10343
  "security": [
9550
10344
  {
9551
10345
  "bearerAuth": []
9552
- },
9553
- {
9554
- "apiKeyAuth": []
9555
10346
  }
9556
10347
  ],
9557
10348
  "requestBody": {
@@ -9650,7 +10441,7 @@
9650
10441
  "Files"
9651
10442
  ],
9652
10443
  "summary": "Get file metadata",
9653
- "description": "Returns file entity metadata. Use /{id}/content to download the file content.",
10444
+ "description": "Returns file entity metadata. Use /{id}/content to download the file content.\n\n---\n**Permission:** `file:view` \n**Auth:** optional",
9654
10445
  "x-arke-action": "file:view",
9655
10446
  "x-arke-auth": "optional",
9656
10447
  "x-arke-tier": "standard",
@@ -9712,16 +10503,13 @@
9712
10503
  "Files"
9713
10504
  ],
9714
10505
  "summary": "Update file metadata",
9715
- "description": "Updates file metadata without changing the file content.\n\n## Key Changes\nThe key can be changed, but ONLY to a key that already exists in R2.\nThis allows \"regressing\" to a previous file version.\n\nTo upload a new file, use POST /{id}/reupload instead.",
10506
+ "description": "Updates file metadata without changing the file content.\n\n## Key Changes\nThe key can be changed, but ONLY to a key that already exists in R2.\nThis allows \"regressing\" to a previous file version.\n\nTo upload a new file, use POST /{id}/reupload instead.\n\n---\n**Permission:** `file:update` \n**Auth:** required",
9716
10507
  "x-arke-action": "file:update",
9717
10508
  "x-arke-auth": "required",
9718
10509
  "x-arke-tier": "standard",
9719
10510
  "security": [
9720
10511
  {
9721
10512
  "bearerAuth": []
9722
- },
9723
- {
9724
- "apiKeyAuth": []
9725
10513
  }
9726
10514
  ],
9727
10515
  "parameters": [
@@ -9847,16 +10635,13 @@
9847
10635
  "Files"
9848
10636
  ],
9849
10637
  "summary": "Upload file content",
9850
- "description": "Uploads the binary content for a file entity.\n\n## Request\n- Content-Type: The MIME type of the file (must match entity's content_type)\n- Body: Binary file content (streaming supported)\n\n## Limits\n- Maximum file size: 500 MB\n\n## Behavior\n- Streams content directly to R2\n- Computes CID from file bytes\n- Updates entity with uploaded: true, verified size, and computed CID\n- Atomic operation - either fully succeeds or fails\n\n## Idempotency\nRe-uploading content for an already-uploaded file will fail with 409 Conflict.\nUse POST /{id}/reupload first to create a new version.",
10638
+ "description": "Uploads the binary content for a file entity.\n\n## Request\n- Content-Type: The MIME type of the file (must match entity's content_type)\n- Body: Binary file content (streaming supported)\n\n## Limits\n- Maximum file size: 500 MB\n\n## Behavior\n- Streams content directly to R2\n- Computes CID from file bytes\n- Updates entity with uploaded: true, verified size, and computed CID\n- Atomic operation - either fully succeeds or fails\n\n## Idempotency\nRe-uploading content for an already-uploaded file will fail with 409 Conflict.\nUse POST /{id}/reupload first to create a new version.\n\n---\n**Permission:** `file:upload` \n**Auth:** required",
9851
10639
  "x-arke-action": "file:upload",
9852
10640
  "x-arke-auth": "required",
9853
10641
  "x-arke-tier": "standard",
9854
10642
  "security": [
9855
10643
  {
9856
10644
  "bearerAuth": []
9857
- },
9858
- {
9859
- "apiKeyAuth": []
9860
10645
  }
9861
10646
  ],
9862
10647
  "parameters": [
@@ -9994,7 +10779,7 @@
9994
10779
  "Files"
9995
10780
  ],
9996
10781
  "summary": "Download file content",
9997
- "description": "Downloads the binary content of a file entity.\n\n## Response Headers\n- Content-Type: The MIME type of the file\n- Content-Length: File size in bytes\n- Content-Disposition: attachment; filename=\"original_filename\"\n\n## Streaming\nResponse is streamed directly from R2 storage.",
10782
+ "description": "Downloads the binary content of a file entity.\n\n## Response Headers\n- Content-Type: The MIME type of the file\n- Content-Length: File size in bytes\n- Content-Disposition: attachment; filename=\"original_filename\"\n\n## Streaming\nResponse is streamed directly from R2 storage.\n\n---\n**Permission:** `file:download` \n**Auth:** optional",
9998
10783
  "x-arke-action": "file:download",
9999
10784
  "x-arke-auth": "optional",
10000
10785
  "x-arke-tier": "standard",
@@ -10059,16 +10844,13 @@
10059
10844
  "Files"
10060
10845
  ],
10061
10846
  "summary": "Prepare for new file version",
10062
- "description": "Prepares the entity for uploading a new file version.\n\n## Flow\n1. Call this endpoint with new key and file metadata\n2. Receive updated entity (uploaded: false)\n3. POST the new file content to /{id}/content\n4. Entity will be updated with uploaded: true and verified CID\n\n## Key Requirement\nThe new key must NOT already exist in R2 (no overwrites).\nPrevious file versions remain accessible via manifest history.",
10847
+ "description": "Prepares the entity for uploading a new file version.\n\n## Flow\n1. Call this endpoint with new key and file metadata\n2. Receive updated entity (uploaded: false)\n3. POST the new file content to /{id}/content\n4. Entity will be updated with uploaded: true and verified CID\n\n## Key Requirement\nThe new key must NOT already exist in R2 (no overwrites).\nPrevious file versions remain accessible via manifest history.\n\n---\n**Permission:** `file:reupload` \n**Auth:** required",
10063
10848
  "x-arke-action": "file:reupload",
10064
10849
  "x-arke-auth": "required",
10065
10850
  "x-arke-tier": "standard",
10066
10851
  "security": [
10067
10852
  {
10068
10853
  "bearerAuth": []
10069
- },
10070
- {
10071
- "apiKeyAuth": []
10072
10854
  }
10073
10855
  ],
10074
10856
  "parameters": [
@@ -10194,16 +10976,13 @@
10194
10976
  "Folders"
10195
10977
  ],
10196
10978
  "summary": "Create folder",
10197
- "description": "Creates a new folder entity. Optionally sets parent for immediate hierarchy.\n\nIf a parent folder is specified, a bidirectional relationship is created:\n- Parent folder contains this folder\n- This folder is in parent folder",
10979
+ "description": "Creates a new folder entity. Optionally sets parent for immediate hierarchy.\n\nIf a parent folder is specified, a bidirectional relationship is created:\n- Parent folder contains this folder\n- This folder is in parent folder\n\n---\n**Permission:** `folder:create` \n**Auth:** required",
10198
10980
  "x-arke-action": "folder:create",
10199
10981
  "x-arke-auth": "required",
10200
10982
  "x-arke-tier": "standard",
10201
10983
  "security": [
10202
10984
  {
10203
10985
  "bearerAuth": []
10204
- },
10205
- {
10206
- "apiKeyAuth": []
10207
10986
  }
10208
10987
  ],
10209
10988
  "requestBody": {
@@ -10285,7 +11064,7 @@
10285
11064
  "Folders"
10286
11065
  ],
10287
11066
  "summary": "Get folder",
10288
- "description": "Returns folder metadata including children and parent relationships.",
11067
+ "description": "Returns folder metadata including children and parent relationships.\n\n---\n**Permission:** `folder:view` \n**Auth:** optional",
10289
11068
  "x-arke-action": "folder:view",
10290
11069
  "x-arke-auth": "optional",
10291
11070
  "x-arke-tier": "standard",
@@ -10347,16 +11126,13 @@
10347
11126
  "Folders"
10348
11127
  ],
10349
11128
  "summary": "Update folder",
10350
- "description": "Updates folder properties (label, description, metadata). Properties are merged.",
11129
+ "description": "Updates folder properties (label, description, metadata). Properties are merged.\n\n---\n**Permission:** `folder:update` \n**Auth:** required",
10351
11130
  "x-arke-action": "folder:update",
10352
11131
  "x-arke-auth": "required",
10353
11132
  "x-arke-tier": "standard",
10354
11133
  "security": [
10355
11134
  {
10356
11135
  "bearerAuth": []
10357
- },
10358
- {
10359
- "apiKeyAuth": []
10360
11136
  }
10361
11137
  ],
10362
11138
  "parameters": [
@@ -10482,16 +11258,13 @@
10482
11258
  "Folders"
10483
11259
  ],
10484
11260
  "summary": "Add child to folder",
10485
- "description": "Adds a child entity (file or folder) to this folder.\n\nCreates bidirectional relationship:\n- Folder contains child\n- Child is in folder\n\n**Idempotent**: if relationship already exists, returns current state without error.",
11261
+ "description": "Adds a child entity (file or folder) to this folder.\n\nCreates bidirectional relationship:\n- Folder contains child\n- Child is in folder\n\n**Idempotent**: if relationship already exists, returns current state without error.\n\n---\n**Permission:** `folder:update` \n**Auth:** required",
10486
11262
  "x-arke-action": "folder:update",
10487
11263
  "x-arke-auth": "required",
10488
11264
  "x-arke-tier": "standard",
10489
11265
  "security": [
10490
11266
  {
10491
11267
  "bearerAuth": []
10492
- },
10493
- {
10494
- "apiKeyAuth": []
10495
11268
  }
10496
11269
  ],
10497
11270
  "parameters": [
@@ -10617,16 +11390,13 @@
10617
11390
  "Folders"
10618
11391
  ],
10619
11392
  "summary": "Remove child from folder",
10620
- "description": "Removes a child entity from this folder (bidirectional).",
11393
+ "description": "Removes a child entity from this folder (bidirectional).\n\n---\n**Permission:** `folder:update` \n**Auth:** required",
10621
11394
  "x-arke-action": "folder:update",
10622
11395
  "x-arke-auth": "required",
10623
11396
  "x-arke-tier": "standard",
10624
11397
  "security": [
10625
11398
  {
10626
11399
  "bearerAuth": []
10627
- },
10628
- {
10629
- "apiKeyAuth": []
10630
11400
  }
10631
11401
  ],
10632
11402
  "parameters": [
@@ -10764,16 +11534,13 @@
10764
11534
  "Folders"
10765
11535
  ],
10766
11536
  "summary": "Bulk add children to folder",
10767
- "description": "Efficiently adds multiple children to a folder.\n\n**Limit**: Maximum 50 children per request. For larger batches, make multiple\nrequests, refetching the folder's CID between each to satisfy the CAS guard.\n\n**Strategy**:\n1. Updates folder once with all 'contains' relationships\n2. Updates each child in parallel with 'in' back-link\n\n**Idempotent**: skips children that already have the relationship.\nReturns both added and skipped children in the response.",
11537
+ "description": "Efficiently adds multiple children to a folder.\n\n**Limit**: Maximum 50 children per request. For larger batches, make multiple\nrequests, refetching the folder's CID between each to satisfy the CAS guard.\n\n**Strategy**:\n1. Updates folder once with all 'contains' relationships\n2. Updates each child in parallel with 'in' back-link\n\n**Idempotent**: skips children that already have the relationship.\nReturns both added and skipped children in the response.\n\n---\n**Permission:** `folder:update` \n**Auth:** required",
10768
11538
  "x-arke-action": "folder:update",
10769
11539
  "x-arke-auth": "required",
10770
11540
  "x-arke-tier": "standard",
10771
11541
  "security": [
10772
11542
  {
10773
11543
  "bearerAuth": []
10774
- },
10775
- {
10776
- "apiKeyAuth": []
10777
11544
  }
10778
11545
  ],
10779
11546
  "parameters": [
@@ -10899,16 +11666,13 @@
10899
11666
  "Folders"
10900
11667
  ],
10901
11668
  "summary": "Add parent to folder",
10902
- "description": "Adds this folder to a parent folder.\n\nCreates bidirectional relationship:\n- Parent contains this folder\n- This folder is in parent\n\n**Idempotent**: if relationship already exists, returns current state without error.",
11669
+ "description": "Adds this folder to a parent folder.\n\nCreates bidirectional relationship:\n- Parent contains this folder\n- This folder is in parent\n\n**Idempotent**: if relationship already exists, returns current state without error.\n\n---\n**Permission:** `folder:update` \n**Auth:** required",
10903
11670
  "x-arke-action": "folder:update",
10904
11671
  "x-arke-auth": "required",
10905
11672
  "x-arke-tier": "standard",
10906
11673
  "security": [
10907
11674
  {
10908
11675
  "bearerAuth": []
10909
- },
10910
- {
10911
- "apiKeyAuth": []
10912
11676
  }
10913
11677
  ],
10914
11678
  "parameters": [
@@ -11034,16 +11798,13 @@
11034
11798
  "Folders"
11035
11799
  ],
11036
11800
  "summary": "Remove parent from folder",
11037
- "description": "Removes this folder from a parent folder (bidirectional).",
11801
+ "description": "Removes this folder from a parent folder (bidirectional).\n\n---\n**Permission:** `folder:update` \n**Auth:** required",
11038
11802
  "x-arke-action": "folder:update",
11039
11803
  "x-arke-auth": "required",
11040
11804
  "x-arke-tier": "standard",
11041
11805
  "security": [
11042
11806
  {
11043
11807
  "bearerAuth": []
11044
- },
11045
- {
11046
- "apiKeyAuth": []
11047
11808
  }
11048
11809
  ],
11049
11810
  "parameters": [
@@ -11181,7 +11942,7 @@
11181
11942
  "Versions"
11182
11943
  ],
11183
11944
  "summary": "List version history",
11184
- "description": "Returns version metadata for an entity (newest first). Use pagination for entities with many versions.",
11945
+ "description": "Returns version metadata for an entity (newest first). Use pagination for entities with many versions.\n\n---\n**Permission:** `entity:view` \n**Auth:** optional",
11185
11946
  "x-arke-action": "entity:view",
11186
11947
  "x-arke-auth": "optional",
11187
11948
  "x-arke-tier": "standard",
@@ -11294,7 +12055,7 @@
11294
12055
  "Versions"
11295
12056
  ],
11296
12057
  "summary": "Get manifest by CID",
11297
- "description": "Returns the full manifest for any version by its CID. Permission is checked against the entity ID in the manifest.",
12058
+ "description": "Returns the full manifest for any version by its CID. Permission is checked against the entity ID in the manifest.\n\n---\n**Permission:** `entity:view` \n**Auth:** optional",
11298
12059
  "x-arke-action": "entity:view",
11299
12060
  "x-arke-auth": "optional",
11300
12061
  "x-arke-tier": "standard",
@@ -11358,7 +12119,7 @@
11358
12119
  "Permissions"
11359
12120
  ],
11360
12121
  "summary": "Get permission system metadata",
11361
- "description": "Returns all registered actions, verbs, types, verb implications, wildcard patterns, and default roles.\n\nThis endpoint is useful for:\n- Building dynamic role editors\n- Understanding available permissions\n- Validating actions client-side\n\nAll data is auto-generated from the actual permission system, so it's always in sync with the code.",
12122
+ "description": "Returns all registered actions, verbs, types, verb implications, wildcard patterns, and default roles.\n\nThis endpoint is useful for:\n- Building dynamic role editors\n- Understanding available permissions\n- Validating actions client-side\n\nAll data is auto-generated from the actual permission system, so it's always in sync with the code.\n\n---\n**Permission:** `permissions:read` \n**Auth:** none",
11362
12123
  "x-arke-action": "permissions:read",
11363
12124
  "x-arke-auth": "none",
11364
12125
  "x-arke-tier": "standard",
@@ -11382,16 +12143,13 @@
11382
12143
  "Agents"
11383
12144
  ],
11384
12145
  "summary": "Create an agent",
11385
- "description": "Creates a new agent entity. Requires agent:create permission in the target collection.",
12146
+ "description": "Creates a new agent entity. Requires agent:create permission in the target collection.\n\n---\n**Permission:** `agent:create` \n**Auth:** required",
11386
12147
  "x-arke-action": "agent:create",
11387
12148
  "x-arke-auth": "required",
11388
12149
  "x-arke-tier": "standard",
11389
12150
  "security": [
11390
12151
  {
11391
12152
  "bearerAuth": []
11392
- },
11393
- {
11394
- "apiKeyAuth": []
11395
12153
  }
11396
12154
  ],
11397
12155
  "requestBody": {
@@ -11486,7 +12244,7 @@
11486
12244
  "Agents"
11487
12245
  ],
11488
12246
  "summary": "Get agent by ID",
11489
- "description": "Returns an agent entity by ID.",
12247
+ "description": "Returns an agent entity by ID.\n\n---\n**Permission:** `agent:view` \n**Auth:** optional",
11490
12248
  "x-arke-action": "agent:view",
11491
12249
  "x-arke-auth": "optional",
11492
12250
  "x-arke-tier": "standard",
@@ -11548,16 +12306,13 @@
11548
12306
  "Agents"
11549
12307
  ],
11550
12308
  "summary": "Update agent",
11551
- "description": "Updates an agent. Requires agent:update permission.",
12309
+ "description": "Updates an agent. Requires agent:update permission.\n\n**Field placement:** Agent-specific fields (`label`, `endpoint`, `actions_required`, `input_schema`, etc.) must be at the root level, NOT inside `properties`. The `properties` bag is for additional custom data only.\n\n**properties_remove syntax:** Use nested objects, not dot notation.\n- Correct: `{ \"input_schema\": { \"properties\": [\"field_to_remove\"] } }`\n- Wrong: `[\"input_schema.properties.field_to_remove\"]`\n\n---\n**Permission:** `agent:update` \n**Auth:** required",
11552
12310
  "x-arke-action": "agent:update",
11553
12311
  "x-arke-auth": "required",
11554
12312
  "x-arke-tier": "standard",
11555
12313
  "security": [
11556
12314
  {
11557
12315
  "bearerAuth": []
11558
- },
11559
- {
11560
- "apiKeyAuth": []
11561
12316
  }
11562
12317
  ],
11563
12318
  "parameters": [
@@ -11683,16 +12438,13 @@
11683
12438
  "Agents"
11684
12439
  ],
11685
12440
  "summary": "Invoke an agent",
11686
- "description": "Invoke an agent to perform work on a target collection.\n\n**Two-phase interaction:**\n1. First call with `confirm: false` (default) returns a preview of permissions that will be granted\n2. After user reviews and confirms, call again with `confirm: true` to execute\n\nThe agent receives temporal (time-limited) permissions on the target collection.",
12441
+ "description": "Invoke an agent to perform work on a target collection.\n\n**Note:** The `target` parameter must be a collection ID. Agents receive permissions scoped to collections, not individual entities. To process a specific entity, pass the collection it belongs to.\n\n**Two-phase interaction:**\n1. `confirm: false` (default) - preview permissions that will be granted\n2. `confirm: true` - execute the agent\n\nThe agent receives temporal (time-limited) permissions on the target collection.\n\n---\n**Permission:** `agent:invoke` \n**Auth:** required",
11687
12442
  "x-arke-action": "agent:invoke",
11688
12443
  "x-arke-auth": "required",
11689
12444
  "x-arke-tier": "standard",
11690
12445
  "security": [
11691
12446
  {
11692
12447
  "bearerAuth": []
11693
- },
11694
- {
11695
- "apiKeyAuth": []
11696
12448
  }
11697
12449
  ],
11698
12450
  "parameters": [
@@ -11811,16 +12563,13 @@
11811
12563
  "Agents"
11812
12564
  ],
11813
12565
  "summary": "Create API key for agent",
11814
- "description": "Creates an API key for the agent. The full key is only returned once.",
12566
+ "description": "Creates an API key for the agent. The full key is only returned once.\n\n---\n**Permission:** `agent:manage` \n**Auth:** required",
11815
12567
  "x-arke-action": "agent:manage",
11816
12568
  "x-arke-auth": "required",
11817
12569
  "x-arke-tier": "standard",
11818
12570
  "security": [
11819
12571
  {
11820
12572
  "bearerAuth": []
11821
- },
11822
- {
11823
- "apiKeyAuth": []
11824
12573
  }
11825
12574
  ],
11826
12575
  "parameters": [
@@ -11927,16 +12676,13 @@
11927
12676
  "Agents"
11928
12677
  ],
11929
12678
  "summary": "List API keys for agent",
11930
- "description": "Lists all active API keys for the agent (without the actual key values).",
12679
+ "description": "Lists all active API keys for the agent (without the actual key values).\n\n---\n**Permission:** `agent:manage` \n**Auth:** required",
11931
12680
  "x-arke-action": "agent:manage",
11932
12681
  "x-arke-auth": "required",
11933
12682
  "x-arke-tier": "standard",
11934
12683
  "security": [
11935
12684
  {
11936
12685
  "bearerAuth": []
11937
- },
11938
- {
11939
- "apiKeyAuth": []
11940
12686
  }
11941
12687
  ],
11942
12688
  "parameters": [
@@ -12012,16 +12758,13 @@
12012
12758
  "Agents"
12013
12759
  ],
12014
12760
  "summary": "Revoke API key",
12015
- "description": "Revokes an API key for the agent.",
12761
+ "description": "Revokes an API key for the agent.\n\n---\n**Permission:** `agent:manage` \n**Auth:** required",
12016
12762
  "x-arke-action": "agent:manage",
12017
12763
  "x-arke-auth": "required",
12018
12764
  "x-arke-tier": "standard",
12019
12765
  "security": [
12020
12766
  {
12021
12767
  "bearerAuth": []
12022
- },
12023
- {
12024
- "apiKeyAuth": []
12025
12768
  }
12026
12769
  ],
12027
12770
  "parameters": [
@@ -12096,95 +12839,61 @@
12096
12839
  }
12097
12840
  }
12098
12841
  },
12099
- "/events": {
12100
- "get": {
12842
+ "/agents/{id}/verify": {
12843
+ "post": {
12101
12844
  "tags": [
12102
- "Events"
12845
+ "Agents"
12103
12846
  ],
12104
- "summary": "List entity change events",
12105
- "description": "Returns a cursor-based list of entity change events for client synchronization.\n\n**Usage:**\n- Call without cursor to get newest events\n- Use returned `cursor` as `?cursor=` to get older events\n- Poll without cursor periodically to check for new events\n\n**Sync flow:**\n1. Initial: `GET /events` get newest, save highest `id` as high-water mark\n2. Paginate: `GET /events?cursor=X` get older events until `has_more=false`\n3. Poll: `GET /events` → if newest `id` > high-water mark, process new events\n\n**Event data:**\n- `id`: Auto-increment ID\n- `pi`: Entity ID that changed\n- `cid`: New manifest CID\n- `ts`: ISO timestamp\n\nEvents are ephemeral (30-day rolling window) - for full sync, use snapshots.",
12106
- "x-arke-action": "events:list",
12107
- "x-arke-auth": "none",
12847
+ "summary": "Verify agent endpoint ownership",
12848
+ "description": "Verify that you control the agent's endpoint URL. This is required before activating an agent.\n\n**Two-phase flow:**\n1. Call without `confirm` to get a verification token\n2. Deploy `/.well-known/arke-verification` endpoint returning the token\n3. Call with `confirm: true` to complete verification\n\n**Verification endpoint format:**\nYour endpoint must return JSON:\n```json\n{\n \"verification_token\": \"vt_xxx...\",\n \"agent_id\": \"IIxxx...\"\n}\n```\n\n---\n**Permission:** `agent:manage` \n**Auth:** required",
12849
+ "x-arke-action": "agent:manage",
12850
+ "x-arke-auth": "required",
12108
12851
  "x-arke-tier": "standard",
12109
- "parameters": [
12110
- {
12111
- "schema": {
12112
- "type": "integer",
12113
- "minimum": 1,
12114
- "example": 12345
12115
- },
12116
- "required": false,
12117
- "description": "Return events older than this id (from previous response cursor)",
12118
- "name": "cursor",
12119
- "in": "query"
12120
- },
12852
+ "security": [
12121
12853
  {
12122
- "schema": {
12123
- "type": "integer",
12124
- "minimum": 1,
12125
- "maximum": 1000,
12126
- "example": 100
12127
- },
12128
- "required": false,
12129
- "description": "Maximum number of events to return (default: 100, max: 1000)",
12130
- "name": "limit",
12131
- "in": "query"
12132
- },
12854
+ "bearerAuth": []
12855
+ }
12856
+ ],
12857
+ "parameters": [
12133
12858
  {
12134
12859
  "schema": {
12135
12860
  "type": "string",
12136
- "enum": [
12137
- "main",
12138
- "test"
12139
- ],
12140
- "example": "main"
12861
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
12862
+ "description": "Entity ID (ULID format)",
12863
+ "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
12141
12864
  },
12142
- "required": false,
12143
- "description": "Network to query (default: main)",
12144
- "name": "network",
12145
- "in": "query"
12146
- }
12147
- ],
12148
- "responses": {
12149
- "200": {
12150
- "description": "Events list",
12151
- "content": {
12152
- "application/json": {
12153
- "schema": {
12154
- "$ref": "#/components/schemas/EventsListResponse"
12155
- }
12156
- }
12157
- }
12865
+ "required": true,
12866
+ "description": "Entity ID (ULID)",
12867
+ "name": "id",
12868
+ "in": "path"
12158
12869
  }
12159
- }
12160
- }
12161
- },
12162
- "/graph/paths": {
12163
- "post": {
12164
- "tags": [
12165
- "Graph"
12166
12870
  ],
12167
- "summary": "Find paths between entities",
12168
- "description": "Find shortest paths between source and target entity sets using graph traversal.",
12169
- "x-arke-action": "graph:query",
12170
- "x-arke-auth": "optional",
12171
- "x-arke-tier": "external",
12172
12871
  "requestBody": {
12173
12872
  "content": {
12174
12873
  "application/json": {
12175
12874
  "schema": {
12176
- "$ref": "#/components/schemas/PathsBetweenRequest"
12875
+ "$ref": "#/components/schemas/VerifyAgentRequest"
12177
12876
  }
12178
12877
  }
12179
12878
  }
12180
12879
  },
12181
12880
  "responses": {
12182
12881
  "200": {
12183
- "description": "Paths found",
12882
+ "description": "Verification token (when confirm is false) or verification result (when confirm is true)",
12184
12883
  "content": {
12185
12884
  "application/json": {
12186
12885
  "schema": {
12187
- "$ref": "#/components/schemas/PathsBetweenResponse"
12886
+ "anyOf": [
12887
+ {
12888
+ "$ref": "#/components/schemas/VerifyAgentTokenResponse"
12889
+ },
12890
+ {
12891
+ "$ref": "#/components/schemas/VerifyAgentSuccessResponse"
12892
+ },
12893
+ {
12894
+ "$ref": "#/components/schemas/VerifyAgentFailureResponse"
12895
+ }
12896
+ ]
12188
12897
  }
12189
12898
  }
12190
12899
  }
@@ -12212,77 +12921,315 @@
12212
12921
  }
12213
12922
  }
12214
12923
  }
12215
- }
12216
- }
12217
- }
12218
- },
12219
- "/graph/reachable": {
12220
- "post": {
12221
- "tags": [
12222
- "Graph"
12223
- ],
12224
- "summary": "Find reachable entities",
12225
- "description": "Find all entities of a specific type reachable from source entities within N hops.",
12226
- "x-arke-action": "graph:query",
12227
- "x-arke-auth": "optional",
12228
- "x-arke-tier": "external",
12229
- "requestBody": {
12230
- "content": {
12231
- "application/json": {
12232
- "schema": {
12233
- "$ref": "#/components/schemas/PathsReachableRequest"
12234
- }
12235
- }
12236
- }
12237
- },
12238
- "responses": {
12239
- "200": {
12240
- "description": "Reachable entities found",
12924
+ },
12925
+ "401": {
12926
+ "description": "Unauthorized - Missing or invalid authentication",
12241
12927
  "content": {
12242
12928
  "application/json": {
12243
12929
  "schema": {
12244
- "$ref": "#/components/schemas/PathsReachableResponse"
12930
+ "$ref": "#/components/schemas/ErrorResponse"
12931
+ },
12932
+ "example": {
12933
+ "error": "Unauthorized: Missing or invalid authentication token"
12245
12934
  }
12246
12935
  }
12247
12936
  }
12248
12937
  },
12249
- "400": {
12250
- "description": "Bad Request - Invalid input",
12938
+ "403": {
12939
+ "description": "Forbidden - Insufficient permissions",
12251
12940
  "content": {
12252
12941
  "application/json": {
12253
12942
  "schema": {
12254
- "$ref": "#/components/schemas/ValidationErrorResponse"
12943
+ "$ref": "#/components/schemas/ErrorResponse"
12255
12944
  },
12256
12945
  "example": {
12257
- "error": "Validation failed",
12258
- "details": {
12259
- "issues": [
12260
- {
12261
- "path": [
12262
- "properties",
12263
- "label"
12264
- ],
12265
- "message": "Required"
12266
- }
12267
- ]
12268
- }
12946
+ "error": "Forbidden: You do not have permission to perform this action"
12269
12947
  }
12270
12948
  }
12271
12949
  }
12272
- }
12273
- }
12274
- }
12275
- },
12276
- "/graph/entity/{id}": {
12277
- "get": {
12950
+ },
12951
+ "404": {
12952
+ "description": "Not Found - Resource does not exist",
12953
+ "content": {
12954
+ "application/json": {
12955
+ "schema": {
12956
+ "$ref": "#/components/schemas/ErrorResponse"
12957
+ },
12958
+ "example": {
12959
+ "error": "Entity not found"
12960
+ }
12961
+ }
12962
+ }
12963
+ }
12964
+ }
12965
+ }
12966
+ },
12967
+ "/jobs/{id}": {
12968
+ "get": {
12969
+ "tags": [
12970
+ "Jobs"
12971
+ ],
12972
+ "summary": "Get job status",
12973
+ "description": "Returns focused job status and summary. Use this endpoint for quick status polling.\n\nReturns 404 if the entity is not a job collection.\n\n**Response includes:**\n- Current status (running/done/error)\n- Timestamps (started_at, completed_at)\n- Agent references (agent, main_agent, target)\n- Counts (files_count, sub_jobs_count)\n\n---\n**Permission:** `collection:view` \n**Auth:** optional",
12974
+ "x-arke-action": "collection:view",
12975
+ "x-arke-auth": "optional",
12976
+ "x-arke-tier": "standard",
12977
+ "parameters": [
12978
+ {
12979
+ "schema": {
12980
+ "type": "string",
12981
+ "pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
12982
+ "description": "Entity ID (ULID format)",
12983
+ "example": "01KDETYWYWM0MJVKM8DK3AEXPY"
12984
+ },
12985
+ "required": true,
12986
+ "description": "Entity ID (ULID)",
12987
+ "name": "id",
12988
+ "in": "path"
12989
+ }
12990
+ ],
12991
+ "responses": {
12992
+ "200": {
12993
+ "description": "Job status",
12994
+ "content": {
12995
+ "application/json": {
12996
+ "schema": {
12997
+ "$ref": "#/components/schemas/JobStatusResponse"
12998
+ }
12999
+ }
13000
+ }
13001
+ },
13002
+ "403": {
13003
+ "description": "Forbidden - Insufficient permissions",
13004
+ "content": {
13005
+ "application/json": {
13006
+ "schema": {
13007
+ "$ref": "#/components/schemas/ErrorResponse"
13008
+ },
13009
+ "example": {
13010
+ "error": "Forbidden: You do not have permission to perform this action"
13011
+ }
13012
+ }
13013
+ }
13014
+ },
13015
+ "404": {
13016
+ "description": "Not Found - Resource does not exist",
13017
+ "content": {
13018
+ "application/json": {
13019
+ "schema": {
13020
+ "$ref": "#/components/schemas/ErrorResponse"
13021
+ },
13022
+ "example": {
13023
+ "error": "Entity not found"
13024
+ }
13025
+ }
13026
+ }
13027
+ }
13028
+ }
13029
+ }
13030
+ },
13031
+ "/events": {
13032
+ "get": {
13033
+ "tags": [
13034
+ "Events"
13035
+ ],
13036
+ "summary": "List entity change events",
13037
+ "description": "Returns a cursor-based list of entity change events for client synchronization.\n\n**Usage:**\n- Call without cursor to get newest events\n- Use returned `cursor` as `?cursor=` to get older events\n- Poll without cursor periodically to check for new events\n\n**Sync flow:**\n1. Initial: `GET /events` → get newest, save highest `id` as high-water mark\n2. Paginate: `GET /events?cursor=X` → get older events until `has_more=false`\n3. Poll: `GET /events` → if newest `id` > high-water mark, process new events\n\n**Event data:**\n- `id`: Auto-increment ID\n- `pi`: Entity ID that changed\n- `cid`: New manifest CID\n- `ts`: ISO timestamp\n\nEvents are ephemeral (30-day rolling window) - for full sync, use snapshots.\n\n---\n**Permission:** `events:list` \n**Auth:** none",
13038
+ "x-arke-action": "events:list",
13039
+ "x-arke-auth": "none",
13040
+ "x-arke-tier": "standard",
13041
+ "parameters": [
13042
+ {
13043
+ "schema": {
13044
+ "type": "integer",
13045
+ "minimum": 1,
13046
+ "example": 12345
13047
+ },
13048
+ "required": false,
13049
+ "description": "Return events older than this id (from previous response cursor)",
13050
+ "name": "cursor",
13051
+ "in": "query"
13052
+ },
13053
+ {
13054
+ "schema": {
13055
+ "type": "integer",
13056
+ "minimum": 1,
13057
+ "maximum": 1000,
13058
+ "example": 100
13059
+ },
13060
+ "required": false,
13061
+ "description": "Maximum number of events to return (default: 100, max: 1000)",
13062
+ "name": "limit",
13063
+ "in": "query"
13064
+ },
13065
+ {
13066
+ "schema": {
13067
+ "type": "string",
13068
+ "enum": [
13069
+ "main",
13070
+ "test"
13071
+ ],
13072
+ "example": "main"
13073
+ },
13074
+ "required": false,
13075
+ "description": "Network to query (default: main)",
13076
+ "name": "network",
13077
+ "in": "query"
13078
+ }
13079
+ ],
13080
+ "responses": {
13081
+ "200": {
13082
+ "description": "Events list",
13083
+ "content": {
13084
+ "application/json": {
13085
+ "schema": {
13086
+ "$ref": "#/components/schemas/EventsListResponse"
13087
+ }
13088
+ }
13089
+ }
13090
+ }
13091
+ }
13092
+ }
13093
+ },
13094
+ "/graph/paths": {
13095
+ "post": {
13096
+ "tags": [
13097
+ "Graph"
13098
+ ],
13099
+ "summary": "Find paths between entities",
13100
+ "description": "Find shortest paths between source and target entity sets. Returns all paths up to the limit (default 100).\n\nUse 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.\n\n---\n**Permission:** `graph:query` \n**Auth:** required",
13101
+ "x-arke-action": "graph:query",
13102
+ "x-arke-auth": "required",
13103
+ "x-arke-tier": "external",
13104
+ "security": [
13105
+ {
13106
+ "bearerAuth": []
13107
+ }
13108
+ ],
13109
+ "requestBody": {
13110
+ "content": {
13111
+ "application/json": {
13112
+ "schema": {
13113
+ "$ref": "#/components/schemas/PathsBetweenRequest"
13114
+ }
13115
+ }
13116
+ }
13117
+ },
13118
+ "responses": {
13119
+ "200": {
13120
+ "description": "Paths found",
13121
+ "content": {
13122
+ "application/json": {
13123
+ "schema": {
13124
+ "$ref": "#/components/schemas/PathsBetweenResponse"
13125
+ }
13126
+ }
13127
+ }
13128
+ },
13129
+ "400": {
13130
+ "description": "Bad Request - Invalid input",
13131
+ "content": {
13132
+ "application/json": {
13133
+ "schema": {
13134
+ "$ref": "#/components/schemas/ValidationErrorResponse"
13135
+ },
13136
+ "example": {
13137
+ "error": "Validation failed",
13138
+ "details": {
13139
+ "issues": [
13140
+ {
13141
+ "path": [
13142
+ "properties",
13143
+ "label"
13144
+ ],
13145
+ "message": "Required"
13146
+ }
13147
+ ]
13148
+ }
13149
+ }
13150
+ }
13151
+ }
13152
+ }
13153
+ }
13154
+ }
13155
+ },
13156
+ "/graph/reachable": {
13157
+ "post": {
13158
+ "tags": [
13159
+ "Graph"
13160
+ ],
13161
+ "summary": "Find reachable entities (exhaustive)",
13162
+ "description": "Find all entities of a specific type reachable from source entities within N hops. Returns up to 100 results by default.\n\n**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.\n\n---\n**Permission:** `graph:query` \n**Auth:** required",
13163
+ "x-arke-action": "graph:query",
13164
+ "x-arke-auth": "required",
13165
+ "x-arke-tier": "external",
13166
+ "security": [
13167
+ {
13168
+ "bearerAuth": []
13169
+ }
13170
+ ],
13171
+ "requestBody": {
13172
+ "content": {
13173
+ "application/json": {
13174
+ "schema": {
13175
+ "$ref": "#/components/schemas/PathsReachableRequest"
13176
+ }
13177
+ }
13178
+ }
13179
+ },
13180
+ "responses": {
13181
+ "200": {
13182
+ "description": "Reachable entities found",
13183
+ "content": {
13184
+ "application/json": {
13185
+ "schema": {
13186
+ "$ref": "#/components/schemas/PathsReachableResponse"
13187
+ }
13188
+ }
13189
+ }
13190
+ },
13191
+ "400": {
13192
+ "description": "Bad Request - Invalid input",
13193
+ "content": {
13194
+ "application/json": {
13195
+ "schema": {
13196
+ "$ref": "#/components/schemas/ValidationErrorResponse"
13197
+ },
13198
+ "example": {
13199
+ "error": "Validation failed",
13200
+ "details": {
13201
+ "issues": [
13202
+ {
13203
+ "path": [
13204
+ "properties",
13205
+ "label"
13206
+ ],
13207
+ "message": "Required"
13208
+ }
13209
+ ]
13210
+ }
13211
+ }
13212
+ }
13213
+ }
13214
+ }
13215
+ }
13216
+ }
13217
+ },
13218
+ "/graph/entity/{id}": {
13219
+ "get": {
12278
13220
  "tags": [
12279
13221
  "Graph"
12280
13222
  ],
12281
13223
  "summary": "Get entity from graph",
12282
- "description": "Get entity details with all relationships from the graph database.",
13224
+ "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.\n\n---\n**Permission:** `graph:query` \n**Auth:** required",
12283
13225
  "x-arke-action": "graph:query",
12284
- "x-arke-auth": "optional",
13226
+ "x-arke-auth": "required",
12285
13227
  "x-arke-tier": "external",
13228
+ "security": [
13229
+ {
13230
+ "bearerAuth": []
13231
+ }
13232
+ ],
12286
13233
  "parameters": [
12287
13234
  {
12288
13235
  "schema": {
@@ -12330,10 +13277,15 @@
12330
13277
  "Query"
12331
13278
  ],
12332
13279
  "summary": "Execute Argo query",
12333
- "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",
13280
+ "description": "Execute an Argo DSL query for path-based graph traversal with relevance ranking.\n\n## When to Use This Endpoint\n\n| Endpoint | Use Case |\n|----------|----------|\n| `POST /query` | Semantic search + graph traversal with **relevance-ranked** results (default k=25) |\n| `POST /graph/reachable` | **Exhaustive** graph exploration from known entities (default limit=100) |\n| `POST /graph/paths` | Find all shortest paths between two entity sets |\n\nThis endpoint combines semantic similarity scores with path length to rank results. For exhaustive graph traversal without ranking, use the `/graph/*` endpoints directly.\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\n\n---\n**Permission:** `query:execute` \n**Auth:** required",
12334
13281
  "x-arke-action": "query:execute",
12335
- "x-arke-auth": "optional",
13282
+ "x-arke-auth": "required",
12336
13283
  "x-arke-tier": "external",
13284
+ "security": [
13285
+ {
13286
+ "bearerAuth": []
13287
+ }
13288
+ ],
12337
13289
  "requestBody": {
12338
13290
  "content": {
12339
13291
  "application/json": {
@@ -12387,10 +13339,15 @@
12387
13339
  "Search"
12388
13340
  ],
12389
13341
  "summary": "Find similar collections",
12390
- "description": "Find collections that are semantically similar to a given collection.\n\nUses the collection's weighted centroid vector (combination of description and entity embeddings) to find related collections.",
13342
+ "description": "Find collections that are semantically similar to a given collection.\n\nUses the collection's weighted centroid vector (combination of description and entity embeddings) to find related collections.\n\n---\n**Permission:** `search:similar` \n**Auth:** required",
12391
13343
  "x-arke-action": "search:similar",
12392
- "x-arke-auth": "optional",
13344
+ "x-arke-auth": "required",
12393
13345
  "x-arke-tier": "external",
13346
+ "security": [
13347
+ {
13348
+ "bearerAuth": []
13349
+ }
13350
+ ],
12394
13351
  "requestBody": {
12395
13352
  "content": {
12396
13353
  "application/json": {
@@ -12549,10 +13506,15 @@
12549
13506
  "Search"
12550
13507
  ],
12551
13508
  "summary": "Find similar items across collections",
12552
- "description": "Find entities that are semantically similar to a given entity, searching across multiple collections.\n\nThis performs a two-tier search:\n1. First finds collections similar to the entity's collection\n2. Then searches within each collection for similar items\n3. Aggregates and ranks results with diversity weighting",
13509
+ "description": "Find entities that are semantically similar to a given entity, searching across multiple collections.\n\nThis performs a two-tier search:\n1. First finds collections similar to the entity's collection\n2. Then searches within each collection for similar items\n3. Aggregates and ranks results with diversity weighting\n\n---\n**Permission:** `search:similar` \n**Auth:** required",
12553
13510
  "x-arke-action": "search:similar",
12554
- "x-arke-auth": "optional",
13511
+ "x-arke-auth": "required",
12555
13512
  "x-arke-tier": "external",
13513
+ "security": [
13514
+ {
13515
+ "bearerAuth": []
13516
+ }
13517
+ ],
12556
13518
  "requestBody": {
12557
13519
  "content": {
12558
13520
  "application/json": {
@@ -12629,9 +13591,189 @@
12629
13591
  "label": {
12630
13592
  "type": "string"
12631
13593
  },
12632
- "collection_pi": {
12633
- "type": "string",
12634
- "nullable": true
13594
+ "collection_pi": {
13595
+ "type": "string",
13596
+ "nullable": true
13597
+ },
13598
+ "score": {
13599
+ "type": "number"
13600
+ },
13601
+ "created_at": {
13602
+ "type": "string"
13603
+ },
13604
+ "updated_at": {
13605
+ "type": "string"
13606
+ }
13607
+ },
13608
+ "required": [
13609
+ "pi",
13610
+ "type",
13611
+ "label",
13612
+ "collection_pi",
13613
+ "score"
13614
+ ]
13615
+ }
13616
+ },
13617
+ "metadata": {
13618
+ "type": "object",
13619
+ "properties": {
13620
+ "source_pi": {
13621
+ "type": "string"
13622
+ },
13623
+ "collections_searched": {
13624
+ "type": "number"
13625
+ },
13626
+ "result_count": {
13627
+ "type": "number"
13628
+ },
13629
+ "cached": {
13630
+ "type": "boolean"
13631
+ },
13632
+ "cached_at": {
13633
+ "type": "string"
13634
+ }
13635
+ },
13636
+ "required": [
13637
+ "source_pi",
13638
+ "collections_searched",
13639
+ "result_count"
13640
+ ]
13641
+ }
13642
+ },
13643
+ "required": [
13644
+ "results",
13645
+ "metadata"
13646
+ ]
13647
+ }
13648
+ }
13649
+ }
13650
+ },
13651
+ "400": {
13652
+ "description": "Bad Request - Invalid input",
13653
+ "content": {
13654
+ "application/json": {
13655
+ "schema": {
13656
+ "$ref": "#/components/schemas/ValidationErrorResponse"
13657
+ },
13658
+ "example": {
13659
+ "error": "Validation failed",
13660
+ "details": {
13661
+ "issues": [
13662
+ {
13663
+ "path": [
13664
+ "properties",
13665
+ "label"
13666
+ ],
13667
+ "message": "Required"
13668
+ }
13669
+ ]
13670
+ }
13671
+ }
13672
+ }
13673
+ }
13674
+ },
13675
+ "404": {
13676
+ "description": "Not Found - Resource does not exist",
13677
+ "content": {
13678
+ "application/json": {
13679
+ "schema": {
13680
+ "$ref": "#/components/schemas/ErrorResponse"
13681
+ },
13682
+ "example": {
13683
+ "error": "Entity not found"
13684
+ }
13685
+ }
13686
+ }
13687
+ },
13688
+ "503": {
13689
+ "description": "Service Unavailable - External service not available",
13690
+ "content": {
13691
+ "application/json": {
13692
+ "schema": {
13693
+ "$ref": "#/components/schemas/ErrorResponse"
13694
+ },
13695
+ "example": {
13696
+ "error": "Service unavailable",
13697
+ "details": {
13698
+ "service": "pinecone"
13699
+ }
13700
+ }
13701
+ }
13702
+ }
13703
+ }
13704
+ }
13705
+ }
13706
+ },
13707
+ "/search/collections": {
13708
+ "post": {
13709
+ "tags": [
13710
+ "Search"
13711
+ ],
13712
+ "summary": "Search collections by text",
13713
+ "description": "Search for collections using semantic text search.\n\nUse this endpoint to discover collections about a topic. Results are ranked by semantic similarity to your query.\n\n---\n**Permission:** `search:query` \n**Auth:** required",
13714
+ "x-arke-action": "search:query",
13715
+ "x-arke-auth": "required",
13716
+ "x-arke-tier": "external",
13717
+ "security": [
13718
+ {
13719
+ "bearerAuth": []
13720
+ }
13721
+ ],
13722
+ "requestBody": {
13723
+ "content": {
13724
+ "application/json": {
13725
+ "schema": {
13726
+ "type": "object",
13727
+ "properties": {
13728
+ "query": {
13729
+ "type": "string",
13730
+ "minLength": 1,
13731
+ "maxLength": 500,
13732
+ "description": "Search query text"
13733
+ },
13734
+ "limit": {
13735
+ "type": "number",
13736
+ "minimum": 1,
13737
+ "maximum": 100,
13738
+ "default": 10,
13739
+ "description": "Maximum results to return"
13740
+ },
13741
+ "types": {
13742
+ "type": "array",
13743
+ "items": {
13744
+ "type": "string"
13745
+ },
13746
+ "description": "Filter by collection types"
13747
+ }
13748
+ },
13749
+ "required": [
13750
+ "query"
13751
+ ]
13752
+ }
13753
+ }
13754
+ }
13755
+ },
13756
+ "responses": {
13757
+ "200": {
13758
+ "description": "Search results",
13759
+ "content": {
13760
+ "application/json": {
13761
+ "schema": {
13762
+ "type": "object",
13763
+ "properties": {
13764
+ "results": {
13765
+ "type": "array",
13766
+ "items": {
13767
+ "type": "object",
13768
+ "properties": {
13769
+ "pi": {
13770
+ "type": "string"
13771
+ },
13772
+ "label": {
13773
+ "type": "string"
13774
+ },
13775
+ "type": {
13776
+ "type": "string"
12635
13777
  },
12636
13778
  "score": {
12637
13779
  "type": "number"
@@ -12645,9 +13787,8 @@
12645
13787
  },
12646
13788
  "required": [
12647
13789
  "pi",
12648
- "type",
12649
13790
  "label",
12650
- "collection_pi",
13791
+ "type",
12651
13792
  "score"
12652
13793
  ]
12653
13794
  }
@@ -12655,25 +13796,15 @@
12655
13796
  "metadata": {
12656
13797
  "type": "object",
12657
13798
  "properties": {
12658
- "source_pi": {
13799
+ "query": {
12659
13800
  "type": "string"
12660
13801
  },
12661
- "collections_searched": {
12662
- "type": "number"
12663
- },
12664
13802
  "result_count": {
12665
13803
  "type": "number"
12666
- },
12667
- "cached": {
12668
- "type": "boolean"
12669
- },
12670
- "cached_at": {
12671
- "type": "string"
12672
13804
  }
12673
13805
  },
12674
13806
  "required": [
12675
- "source_pi",
12676
- "collections_searched",
13807
+ "query",
12677
13808
  "result_count"
12678
13809
  ]
12679
13810
  }
@@ -12710,19 +13841,6 @@
12710
13841
  }
12711
13842
  }
12712
13843
  },
12713
- "404": {
12714
- "description": "Not Found - Resource does not exist",
12715
- "content": {
12716
- "application/json": {
12717
- "schema": {
12718
- "$ref": "#/components/schemas/ErrorResponse"
12719
- },
12720
- "example": {
12721
- "error": "Entity not found"
12722
- }
12723
- }
12724
- }
12725
- },
12726
13844
  "503": {
12727
13845
  "description": "Service Unavailable - External service not available",
12728
13846
  "content": {
@@ -12742,16 +13860,21 @@
12742
13860
  }
12743
13861
  }
12744
13862
  },
12745
- "/search/collections": {
13863
+ "/search/agents": {
12746
13864
  "post": {
12747
13865
  "tags": [
12748
13866
  "Search"
12749
13867
  ],
12750
- "summary": "Search collections by text",
12751
- "description": "Search for collections using semantic text search.\n\nUse this endpoint to discover collections about a topic. Results are ranked by semantic similarity to your query.",
13868
+ "summary": "Search agents by text",
13869
+ "description": "Search for agents using semantic text search.\n\nUse 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.\n\n---\n**Permission:** `search:query` \n**Auth:** required",
12752
13870
  "x-arke-action": "search:query",
12753
- "x-arke-auth": "optional",
13871
+ "x-arke-auth": "required",
12754
13872
  "x-arke-tier": "external",
13873
+ "security": [
13874
+ {
13875
+ "bearerAuth": []
13876
+ }
13877
+ ],
12755
13878
  "requestBody": {
12756
13879
  "content": {
12757
13880
  "application/json": {
@@ -12770,13 +13893,6 @@
12770
13893
  "maximum": 100,
12771
13894
  "default": 10,
12772
13895
  "description": "Maximum results to return"
12773
- },
12774
- "types": {
12775
- "type": "array",
12776
- "items": {
12777
- "type": "string"
12778
- },
12779
- "description": "Filter by collection types"
12780
13896
  }
12781
13897
  },
12782
13898
  "required": [
@@ -12805,12 +13921,16 @@
12805
13921
  "label": {
12806
13922
  "type": "string"
12807
13923
  },
12808
- "type": {
12809
- "type": "string"
12810
- },
12811
13924
  "score": {
12812
13925
  "type": "number"
12813
13926
  },
13927
+ "collection_pi": {
13928
+ "type": "string",
13929
+ "nullable": true
13930
+ },
13931
+ "status": {
13932
+ "type": "string"
13933
+ },
12814
13934
  "created_at": {
12815
13935
  "type": "string"
12816
13936
  },
@@ -12821,8 +13941,8 @@
12821
13941
  "required": [
12822
13942
  "pi",
12823
13943
  "label",
12824
- "type",
12825
- "score"
13944
+ "score",
13945
+ "collection_pi"
12826
13946
  ]
12827
13947
  }
12828
13948
  },
@@ -12899,10 +14019,15 @@
12899
14019
  "Search"
12900
14020
  ],
12901
14021
  "summary": "Search entities within collection(s)",
12902
- "description": "Search for entities within one or more collections using semantic text search.\n\nProvide either `collection_pi` for a single collection or `collection_pis` for multiple collections (searched in parallel).\n\nUse `per_collection_limit` to ensure result diversity when searching multiple collections.",
14022
+ "description": "Search for entities within one or more collections using semantic text search.\n\nProvide either `collection_pi` for a single collection or `collection_pis` for multiple collections (searched in parallel).\n\nUse `per_collection_limit` to ensure result diversity when searching multiple collections.\n\n---\n**Permission:** `search:query` \n**Auth:** required",
12903
14023
  "x-arke-action": "search:query",
12904
- "x-arke-auth": "optional",
14024
+ "x-arke-auth": "required",
12905
14025
  "x-arke-tier": "external",
14026
+ "security": [
14027
+ {
14028
+ "bearerAuth": []
14029
+ }
14030
+ ],
12906
14031
  "requestBody": {
12907
14032
  "content": {
12908
14033
  "application/json": {
@@ -13083,10 +14208,15 @@
13083
14208
  "Search"
13084
14209
  ],
13085
14210
  "summary": "Discover entities across all collections",
13086
- "description": "Two-step discovery search: first finds relevant collections, then searches within them.\n\nUse this endpoint when you don't know which collections to search. The system will:\n1. Find collections semantically related to your query\n2. Search within each collection in parallel\n3. Aggregate and rank results across all collections\n\nGreat for exploration and AI agents navigating the network.",
14211
+ "description": "Two-step discovery search: first finds relevant collections, then searches within them.\n\nUse this endpoint when you don't know which collections to search. The system will:\n1. Find collections semantically related to your query\n2. Search within each collection in parallel\n3. Aggregate and rank results across all collections\n\nGreat for exploration and AI agents navigating the network.\n\n---\n**Permission:** `search:query` \n**Auth:** required",
13087
14212
  "x-arke-action": "search:query",
13088
- "x-arke-auth": "optional",
14213
+ "x-arke-auth": "required",
13089
14214
  "x-arke-tier": "external",
14215
+ "security": [
14216
+ {
14217
+ "bearerAuth": []
14218
+ }
14219
+ ],
13090
14220
  "requestBody": {
13091
14221
  "content": {
13092
14222
  "application/json": {
@@ -13250,13 +14380,181 @@
13250
14380
  }
13251
14381
  }
13252
14382
  },
14383
+ "/chat": {
14384
+ "post": {
14385
+ "tags": [
14386
+ "Chat"
14387
+ ],
14388
+ "summary": "Send chat message",
14389
+ "description": "Send a message to the Arke chat agent and receive a streaming response.\n\nThe agent can execute Arke API operations on your behalf using the authenticated user's permissions.\n\n## Headers\n\n- `X-Chat-ID`: Optional. Specify to continue an existing chat session. If omitted, a new session is created.\n\n## Response Format\n\nThe response is a Server-Sent Events (SSE) stream in AI SDK v5 UIMessage format.\nStream chunks include text deltas, tool calls, and usage information.\n\n## Token Usage Tracking\n\nUsage information is included at the end of the stream in the format:\n```json\n{\"type\":\"message_delta\",\"delta\":{\"usage\":{\"input_tokens\":123,\"output_tokens\":456}}}\n```\n\n\n---\n**Permission:** `chat:send` \n**Auth:** required",
14390
+ "x-arke-action": "chat:send",
14391
+ "x-arke-auth": "required",
14392
+ "x-arke-tier": "external",
14393
+ "security": [
14394
+ {
14395
+ "bearerAuth": []
14396
+ }
14397
+ ],
14398
+ "requestBody": {
14399
+ "content": {
14400
+ "application/json": {
14401
+ "schema": {
14402
+ "$ref": "#/components/schemas/SendChatRequest"
14403
+ }
14404
+ }
14405
+ }
14406
+ },
14407
+ "responses": {
14408
+ "200": {
14409
+ "description": "Streaming SSE response",
14410
+ "content": {
14411
+ "text/event-stream": {
14412
+ "schema": {
14413
+ "type": "string",
14414
+ "description": "Server-Sent Events stream in AI SDK v5 format"
14415
+ }
14416
+ }
14417
+ }
14418
+ },
14419
+ "401": {
14420
+ "description": "Unauthorized - Missing or invalid authentication",
14421
+ "content": {
14422
+ "application/json": {
14423
+ "schema": {
14424
+ "$ref": "#/components/schemas/ErrorResponse"
14425
+ },
14426
+ "example": {
14427
+ "error": "Unauthorized: Missing or invalid authentication token"
14428
+ }
14429
+ }
14430
+ }
14431
+ },
14432
+ "403": {
14433
+ "description": "Forbidden - Insufficient permissions",
14434
+ "content": {
14435
+ "application/json": {
14436
+ "schema": {
14437
+ "$ref": "#/components/schemas/ErrorResponse"
14438
+ },
14439
+ "example": {
14440
+ "error": "Forbidden: You do not have permission to perform this action"
14441
+ }
14442
+ }
14443
+ }
14444
+ }
14445
+ }
14446
+ }
14447
+ },
14448
+ "/chat/sessions/{id}": {
14449
+ "get": {
14450
+ "tags": [
14451
+ "Chat"
14452
+ ],
14453
+ "summary": "Get chat session",
14454
+ "description": "Get information about a chat session including message history.\n\nSessions are publicly viewable for sharing purposes. Only the owner can send messages or delete the session.\n\n---\n**Permission:** `chat:view` \n**Auth:** optional",
14455
+ "x-arke-action": "chat:view",
14456
+ "x-arke-auth": "optional",
14457
+ "x-arke-tier": "standard",
14458
+ "responses": {
14459
+ "200": {
14460
+ "description": "Chat session info",
14461
+ "content": {
14462
+ "application/json": {
14463
+ "schema": {
14464
+ "$ref": "#/components/schemas/ChatSession"
14465
+ }
14466
+ }
14467
+ }
14468
+ },
14469
+ "404": {
14470
+ "description": "Not Found - Resource does not exist",
14471
+ "content": {
14472
+ "application/json": {
14473
+ "schema": {
14474
+ "$ref": "#/components/schemas/ErrorResponse"
14475
+ },
14476
+ "example": {
14477
+ "error": "Entity not found"
14478
+ }
14479
+ }
14480
+ }
14481
+ }
14482
+ }
14483
+ },
14484
+ "delete": {
14485
+ "tags": [
14486
+ "Chat"
14487
+ ],
14488
+ "summary": "Delete chat session",
14489
+ "description": "Delete a chat session. Only the session owner can delete it.\n\n---\n**Permission:** `chat:delete` \n**Auth:** required",
14490
+ "x-arke-action": "chat:delete",
14491
+ "x-arke-auth": "required",
14492
+ "x-arke-tier": "standard",
14493
+ "security": [
14494
+ {
14495
+ "bearerAuth": []
14496
+ }
14497
+ ],
14498
+ "responses": {
14499
+ "200": {
14500
+ "description": "Session deleted",
14501
+ "content": {
14502
+ "application/json": {
14503
+ "schema": {
14504
+ "$ref": "#/components/schemas/ChatSessionDeleteResponse"
14505
+ }
14506
+ }
14507
+ }
14508
+ },
14509
+ "401": {
14510
+ "description": "Unauthorized - Missing or invalid authentication",
14511
+ "content": {
14512
+ "application/json": {
14513
+ "schema": {
14514
+ "$ref": "#/components/schemas/ErrorResponse"
14515
+ },
14516
+ "example": {
14517
+ "error": "Unauthorized: Missing or invalid authentication token"
14518
+ }
14519
+ }
14520
+ }
14521
+ },
14522
+ "403": {
14523
+ "description": "Forbidden - Insufficient permissions",
14524
+ "content": {
14525
+ "application/json": {
14526
+ "schema": {
14527
+ "$ref": "#/components/schemas/ErrorResponse"
14528
+ },
14529
+ "example": {
14530
+ "error": "Forbidden: You do not have permission to perform this action"
14531
+ }
14532
+ }
14533
+ }
14534
+ },
14535
+ "404": {
14536
+ "description": "Not Found - Resource does not exist",
14537
+ "content": {
14538
+ "application/json": {
14539
+ "schema": {
14540
+ "$ref": "#/components/schemas/ErrorResponse"
14541
+ },
14542
+ "example": {
14543
+ "error": "Entity not found"
14544
+ }
14545
+ }
14546
+ }
14547
+ }
14548
+ }
14549
+ }
14550
+ },
13253
14551
  "/entities/{id}/attestation": {
13254
14552
  "get": {
13255
14553
  "tags": [
13256
14554
  "Attestations"
13257
14555
  ],
13258
14556
  "summary": "Get latest attestation",
13259
- "description": "Returns the Arweave attestation for the current (latest) version of an entity.\n\nReturns 202 Accepted if the attestation upload is still pending.",
14557
+ "description": "Returns the Arweave attestation for the current (latest) version of an entity.\n\nReturns 202 Accepted if the attestation upload is still pending.\n\n---\n**Permission:** `entity:view` \n**Auth:** optional",
13260
14558
  "x-arke-action": "entity:view",
13261
14559
  "x-arke-auth": "optional",
13262
14560
  "x-arke-tier": "standard",
@@ -13330,7 +14628,7 @@
13330
14628
  "Attestations"
13331
14629
  ],
13332
14630
  "summary": "Get version attestation",
13333
- "description": "Returns the Arweave attestation for a specific version of an entity.",
14631
+ "description": "Returns the Arweave attestation for a specific version of an entity.\n\n---\n**Permission:** `entity:view` \n**Auth:** optional",
13334
14632
  "x-arke-action": "entity:view",
13335
14633
  "x-arke-auth": "optional",
13336
14634
  "x-arke-tier": "standard",
@@ -13399,13 +14697,50 @@
13399
14697
  }
13400
14698
  }
13401
14699
  },
14700
+ "/attestations/head": {
14701
+ "get": {
14702
+ "tags": [
14703
+ "Attestations"
14704
+ ],
14705
+ "summary": "Get chain head",
14706
+ "description": "Returns the latest Arweave attestation transaction ID (network head).\n\n---\n**Permission:** `attestation:view` \n**Auth:** none",
14707
+ "x-arke-action": "attestation:view",
14708
+ "x-arke-auth": "none",
14709
+ "x-arke-tier": "standard",
14710
+ "responses": {
14711
+ "200": {
14712
+ "description": "Chain head",
14713
+ "content": {
14714
+ "application/json": {
14715
+ "schema": {
14716
+ "$ref": "#/components/schemas/ChainHeadResponse"
14717
+ }
14718
+ }
14719
+ }
14720
+ },
14721
+ "404": {
14722
+ "description": "Not Found - Resource does not exist",
14723
+ "content": {
14724
+ "application/json": {
14725
+ "schema": {
14726
+ "$ref": "#/components/schemas/ErrorResponse"
14727
+ },
14728
+ "example": {
14729
+ "error": "Entity not found"
14730
+ }
14731
+ }
14732
+ }
14733
+ }
14734
+ }
14735
+ }
14736
+ },
13402
14737
  "/attestations/verify/{tx}": {
13403
14738
  "get": {
13404
14739
  "tags": [
13405
14740
  "Attestations"
13406
14741
  ],
13407
14742
  "summary": "Verify attestation",
13408
- "description": "Fetches an attestation from Arweave and verifies the CID matches the manifest content.\n\nThis is a public endpoint - anyone can verify attestations.",
14743
+ "description": "Fetches an attestation from Arweave and verifies the CID matches the manifest content.\n\nThis is a public endpoint - anyone can verify attestations.\n\n---\n**Permission:** `attestation:verify` \n**Auth:** none",
13409
14744
  "x-arke-action": "attestation:verify",
13410
14745
  "x-arke-auth": "none",
13411
14746
  "x-arke-tier": "standard",