@arke-institute/sdk 2.5.0 → 2.6.1
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/dist/{crypto-Fh8b6rTi.d.ts → crypto-96bEBoO_.d.ts} +89 -1
- package/dist/{crypto-k-x66Nei.d.cts → crypto-wBQ1LBgz.d.cts} +89 -1
- package/dist/generated/index.d.cts +102 -61
- package/dist/generated/index.d.ts +102 -61
- package/dist/index.cjs +184 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +184 -1
- package/dist/index.js.map +1 -1
- package/dist/operations/index.d.cts +2 -2
- package/dist/operations/index.d.ts +2 -2
- package/openapi/spec.json +169 -91
- package/openapi/version.json +1 -1
- package/package.json +1 -1
package/openapi/spec.json
CHANGED
|
@@ -6153,95 +6153,77 @@
|
|
|
6153
6153
|
}
|
|
6154
6154
|
}
|
|
6155
6155
|
},
|
|
6156
|
-
"
|
|
6156
|
+
"JobProgress": {
|
|
6157
6157
|
"type": "object",
|
|
6158
6158
|
"properties": {
|
|
6159
|
-
"
|
|
6160
|
-
"type": "
|
|
6161
|
-
"
|
|
6162
|
-
"description": "
|
|
6163
|
-
"example":
|
|
6159
|
+
"total": {
|
|
6160
|
+
"type": "integer",
|
|
6161
|
+
"minimum": 0,
|
|
6162
|
+
"description": "Total items to process",
|
|
6163
|
+
"example": 10
|
|
6164
6164
|
},
|
|
6165
|
-
"
|
|
6166
|
-
"type": "
|
|
6165
|
+
"pending": {
|
|
6166
|
+
"type": "integer",
|
|
6167
|
+
"minimum": 0,
|
|
6168
|
+
"description": "Items not yet started",
|
|
6169
|
+
"example": 3
|
|
6167
6170
|
},
|
|
6168
|
-
"
|
|
6169
|
-
"type": "
|
|
6171
|
+
"dispatched": {
|
|
6172
|
+
"type": "integer",
|
|
6173
|
+
"minimum": 0,
|
|
6174
|
+
"description": "Items dispatched but not complete",
|
|
6175
|
+
"example": 2
|
|
6176
|
+
},
|
|
6177
|
+
"done": {
|
|
6178
|
+
"type": "integer",
|
|
6179
|
+
"minimum": 0,
|
|
6180
|
+
"description": "Successfully completed items",
|
|
6181
|
+
"example": 4
|
|
6182
|
+
},
|
|
6183
|
+
"error": {
|
|
6184
|
+
"type": "integer",
|
|
6185
|
+
"minimum": 0,
|
|
6186
|
+
"description": "Failed items",
|
|
6187
|
+
"example": 1
|
|
6170
6188
|
}
|
|
6171
6189
|
},
|
|
6172
6190
|
"required": [
|
|
6173
|
-
"
|
|
6191
|
+
"total",
|
|
6192
|
+
"pending",
|
|
6193
|
+
"done",
|
|
6194
|
+
"error"
|
|
6174
6195
|
]
|
|
6175
6196
|
},
|
|
6176
|
-
"
|
|
6197
|
+
"JobError": {
|
|
6177
6198
|
"type": "object",
|
|
6178
6199
|
"properties": {
|
|
6179
|
-
"
|
|
6180
|
-
"type": "string",
|
|
6181
|
-
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
6182
|
-
"description": "Entity ID (ULID format)",
|
|
6183
|
-
"example": "01KDETYWYWM0MJVKM8DK3AEXPY"
|
|
6184
|
-
},
|
|
6185
|
-
"cid": {
|
|
6186
|
-
"type": "string",
|
|
6187
|
-
"minLength": 1,
|
|
6188
|
-
"description": "Content Identifier (CID) - content-addressed hash",
|
|
6189
|
-
"example": "bafyreibug443cnd4endcwinwttw3c3dzmcl2ikht64xzn5qg56bix3usfy"
|
|
6190
|
-
},
|
|
6191
|
-
"status": {
|
|
6200
|
+
"code": {
|
|
6192
6201
|
"type": "string",
|
|
6193
|
-
"
|
|
6194
|
-
|
|
6195
|
-
"done",
|
|
6196
|
-
"error"
|
|
6197
|
-
],
|
|
6198
|
-
"description": "Job collection status",
|
|
6199
|
-
"example": "running"
|
|
6202
|
+
"description": "Error code",
|
|
6203
|
+
"example": "TIMEOUT"
|
|
6200
6204
|
},
|
|
6201
|
-
"
|
|
6205
|
+
"message": {
|
|
6202
6206
|
"type": "string",
|
|
6203
|
-
"
|
|
6204
|
-
"
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6207
|
+
"description": "Human-readable error message",
|
|
6208
|
+
"example": "Request timed out after 30 seconds"
|
|
6209
|
+
}
|
|
6210
|
+
},
|
|
6211
|
+
"required": [
|
|
6212
|
+
"code",
|
|
6213
|
+
"message"
|
|
6214
|
+
]
|
|
6215
|
+
},
|
|
6216
|
+
"AgentUnreachableError": {
|
|
6217
|
+
"type": "object",
|
|
6218
|
+
"properties": {
|
|
6219
|
+
"error": {
|
|
6208
6220
|
"type": "string",
|
|
6209
|
-
"
|
|
6210
|
-
"
|
|
6211
|
-
"description": "ISO 8601 datetime",
|
|
6212
|
-
"example": "2025-12-26T12:00:00.000Z"
|
|
6213
|
-
},
|
|
6214
|
-
"agent": {
|
|
6215
|
-
"$ref": "#/components/schemas/EntityRef"
|
|
6216
|
-
},
|
|
6217
|
-
"target": {
|
|
6218
|
-
"$ref": "#/components/schemas/EntityRef"
|
|
6219
|
-
},
|
|
6220
|
-
"main_agent": {
|
|
6221
|
-
"$ref": "#/components/schemas/EntityRef"
|
|
6222
|
-
},
|
|
6223
|
-
"files_count": {
|
|
6224
|
-
"type": "integer",
|
|
6225
|
-
"minimum": 0,
|
|
6226
|
-
"description": "Number of files contained in this job collection",
|
|
6227
|
-
"example": 5
|
|
6228
|
-
},
|
|
6229
|
-
"sub_jobs_count": {
|
|
6230
|
-
"type": "integer",
|
|
6231
|
-
"minimum": 0,
|
|
6232
|
-
"description": "Number of sub-job collections",
|
|
6233
|
-
"example": 2
|
|
6221
|
+
"description": "Error message",
|
|
6222
|
+
"example": "Failed to reach agent: Connection refused"
|
|
6234
6223
|
}
|
|
6235
6224
|
},
|
|
6236
6225
|
"required": [
|
|
6237
|
-
"
|
|
6238
|
-
"cid",
|
|
6239
|
-
"status",
|
|
6240
|
-
"started_at",
|
|
6241
|
-
"completed_at",
|
|
6242
|
-
"agent",
|
|
6243
|
-
"files_count",
|
|
6244
|
-
"sub_jobs_count"
|
|
6226
|
+
"error"
|
|
6245
6227
|
]
|
|
6246
6228
|
},
|
|
6247
6229
|
"Event": {
|
|
@@ -9569,7 +9551,7 @@
|
|
|
9569
9551
|
"Entities"
|
|
9570
9552
|
],
|
|
9571
9553
|
"summary": "Get entity by ID",
|
|
9572
|
-
"description": "Returns any entity by ID. Permission check uses parent collection if entity belongs to one.\n\n**Relationship Expansion:**\n\nUse the `expand=relationships[:mode]` query parameter to hydrate relationship peer data:\n\n- **No expansion (default)**: Returns relationships with stored `peer_label`/`peer_type` (may be stale)\n ```json\n { \"predicate\": \"contains\", \"peer\": \"01KDOC...\", \"peer_label\": \"Old Label\" }\n ```\n\n- **`?expand=relationships:preview`**: Adds `peer_preview` with fresh lightweight data (id, type, label, truncated description/text, timestamps)\n ```json\n {\n \"predicate\": \"contains\",\n \"peer\": \"01KDOC...\",\n \"peer_label\": \"Old Label\",\n \"peer_preview\": {\n \"id\": \"01KDOC...\",\n \"type\": \"document\",\n \"label\": \"Updated Label\",\n \"description_preview\": \"This is a document with...\",\n \"created_at\": \"2025-01-15T10:00:00Z\",\n \"updated_at\": \"2025-01-20T14:30:00Z\"\n }\n }\n ```\n\n- **`?expand=relationships:full`**: Adds `peer_entity` with complete entity manifest (all properties, relationships, version history)\n ```json\n {\n \"predicate\": \"contains\",\n \"peer\": \"01KDOC...\",\n \"peer_label\": \"Old Label\",\n \"peer_entity\": {\n \"id\": \"01KDOC...\",\n \"cid\": \"bafyrei...\",\n \"type\": \"document\",\n \"properties\": { \"label\": \"Updated Label\", \"text\": \"...\" },\n \"relationships\": [...],\n \"ver\": 3,\n \"created_at\": \"2025-01-15T10:00:00Z\",\n \"ts\": 1737380000000,\n \"edited_by\": { \"user_id\": \"01JUSER...\", \"method\": \"manual\" }\n }\n }\n ```\n\n**Performance:** Preview expansion is recommended for most use cases. Full expansion with many large entities can result in multi-MB payloads.\n\n---\n**Permission:** `entity:view` \n**Auth:** optional",
|
|
9554
|
+
"description": "Returns any entity by ID. Permission check uses parent collection if entity belongs to one.\n\n**Relationship Expansion:**\n\nUse the `expand=relationships[:mode]` query parameter to hydrate relationship peer data:\n\n- **No expansion (default)**: Returns relationships with stored `peer_label`/`peer_type` (may be stale)\n ```json\n { \"predicate\": \"contains\", \"peer\": \"01KDOC...\", \"peer_label\": \"Old Label\" }\n ```\n\n- **`?expand=relationships:preview`**: Adds `peer_preview` with fresh lightweight data (id, type, label, truncated description/text, timestamps)\n ```json\n {\n \"predicate\": \"contains\",\n \"peer\": \"01KDOC...\",\n \"peer_label\": \"Old Label\",\n \"peer_preview\": {\n \"id\": \"01KDOC...\",\n \"type\": \"document\",\n \"label\": \"Updated Label\",\n \"description_preview\": \"This is a document with...\",\n \"created_at\": \"2025-01-15T10:00:00Z\",\n \"updated_at\": \"2025-01-20T14:30:00Z\"\n }\n }\n ```\n\n- **`?expand=relationships:full`**: Adds `peer_entity` with complete entity manifest (all properties, relationships, version history)\n ```json\n {\n \"predicate\": \"contains\",\n \"peer\": \"01KDOC...\",\n \"peer_label\": \"Old Label\",\n \"peer_entity\": {\n \"id\": \"01KDOC...\",\n \"cid\": \"bafyrei...\",\n \"type\": \"document\",\n \"properties\": { \"label\": \"Updated Label\", \"text\": \"...\" },\n \"relationships\": [...],\n \"ver\": 3,\n \"created_at\": \"2025-01-15T10:00:00Z\",\n \"ts\": 1737380000000,\n \"edited_by\": { \"user_id\": \"01JUSER...\", \"method\": \"manual\" }\n }\n }\n ```\n\n**Performance:** Preview expansion is recommended for most use cases. Full expansion with many large entities can result in multi-MB payloads.\n\n**Expansion Limit:**\nUse `?expand_limit=N` to control maximum relationships expanded (1-500, default 100). When truncated, the response includes `_expansion_metadata` with counts.\n\n---\n**Permission:** `entity:view` \n**Auth:** optional",
|
|
9573
9555
|
"x-arke-action": "entity:view",
|
|
9574
9556
|
"x-arke-auth": "optional",
|
|
9575
9557
|
"x-arke-tier": "standard",
|
|
@@ -9595,6 +9577,18 @@
|
|
|
9595
9577
|
"description": "Comma-separated list of fields to expand. Supports: relationships[:preview|full]",
|
|
9596
9578
|
"name": "expand",
|
|
9597
9579
|
"in": "query"
|
|
9580
|
+
},
|
|
9581
|
+
{
|
|
9582
|
+
"schema": {
|
|
9583
|
+
"type": "integer",
|
|
9584
|
+
"minimum": 1,
|
|
9585
|
+
"maximum": 500,
|
|
9586
|
+
"example": 100
|
|
9587
|
+
},
|
|
9588
|
+
"required": false,
|
|
9589
|
+
"description": "Maximum number of relationships to expand (1-500, default 100). When exceeded, relationships beyond the limit are returned without peer data.",
|
|
9590
|
+
"name": "expand_limit",
|
|
9591
|
+
"in": "query"
|
|
9598
9592
|
}
|
|
9599
9593
|
],
|
|
9600
9594
|
"responses": {
|
|
@@ -13765,14 +13759,14 @@
|
|
|
13765
13759
|
}
|
|
13766
13760
|
}
|
|
13767
13761
|
},
|
|
13768
|
-
"/
|
|
13762
|
+
"/agents/{id}/jobs/{job_id}/status": {
|
|
13769
13763
|
"get": {
|
|
13770
13764
|
"tags": [
|
|
13771
|
-
"
|
|
13765
|
+
"Agents"
|
|
13772
13766
|
],
|
|
13773
|
-
"summary": "Get job status",
|
|
13774
|
-
"description": "
|
|
13775
|
-
"x-arke-action": "
|
|
13767
|
+
"summary": "Get job status from agent",
|
|
13768
|
+
"description": "Proxies to the agent's `/status/:job_id` endpoint and returns the response.\n\nUse this endpoint to poll job status after invoking an agent. The `agent_id` and `job_id`\nare both returned in the invoke response.\n\n**Query Parameters (passed through to agent):**\n- `detail=full` - Include detailed sub-job/dispatch information (orchestrators/workflows)\n- `errors=N` - Include last N errors (orchestrators only)\n\n**Response:** Returns the agent's status response directly. Schema varies by agent type\n(service, workflow, orchestrator) but always includes:\n- `job_id` - Job identifier\n- `status` - Current status (pending/running/done/error)\n- `progress` - Progress counters (total/pending/done/error)\n- `started_at` - When the job started\n- `completed_at` - When the job completed (if done/error)\n- `updated_at` - Last state modification\n\nAgent-specific fields (phase, stages, sub_jobs, folders, dispatches) are also included\nwhen applicable.\n\n---\n**Permission:** `agent:view` \n**Auth:** optional",
|
|
13769
|
+
"x-arke-action": "agent:view",
|
|
13776
13770
|
"x-arke-auth": "optional",
|
|
13777
13771
|
"x-arke-tier": "standard",
|
|
13778
13772
|
"parameters": [
|
|
@@ -13780,48 +13774,132 @@
|
|
|
13780
13774
|
"schema": {
|
|
13781
13775
|
"type": "string",
|
|
13782
13776
|
"pattern": "^(?:II[0-9A-HJKMNP-TV-Z]{24}|[FC][0-9A-HJKMNP-TV-Z]{25}|[0-9A-HJKMNP-TV-Z]{26})$",
|
|
13783
|
-
"description": "
|
|
13784
|
-
"example": "01KDETYWYWM0MJVKM8DK3AEXPY"
|
|
13777
|
+
"description": "Agent entity ID"
|
|
13785
13778
|
},
|
|
13786
13779
|
"required": true,
|
|
13787
|
-
"description": "Entity ID (ULID)",
|
|
13788
13780
|
"name": "id",
|
|
13789
13781
|
"in": "path"
|
|
13782
|
+
},
|
|
13783
|
+
{
|
|
13784
|
+
"schema": {
|
|
13785
|
+
"type": "string",
|
|
13786
|
+
"minLength": 1,
|
|
13787
|
+
"description": "Job ID returned from agent invocation (e.g., job_01KFX...)",
|
|
13788
|
+
"example": "job_01KFXPQ3ABCDEFGHIJKLMN"
|
|
13789
|
+
},
|
|
13790
|
+
"required": true,
|
|
13791
|
+
"name": "job_id",
|
|
13792
|
+
"in": "path"
|
|
13793
|
+
},
|
|
13794
|
+
{
|
|
13795
|
+
"schema": {
|
|
13796
|
+
"type": "string",
|
|
13797
|
+
"enum": [
|
|
13798
|
+
"full"
|
|
13799
|
+
],
|
|
13800
|
+
"description": "Include detailed sub-job information (orchestrators/workflows only)"
|
|
13801
|
+
},
|
|
13802
|
+
"required": false,
|
|
13803
|
+
"name": "detail",
|
|
13804
|
+
"in": "query"
|
|
13805
|
+
},
|
|
13806
|
+
{
|
|
13807
|
+
"schema": {
|
|
13808
|
+
"type": "integer",
|
|
13809
|
+
"nullable": true,
|
|
13810
|
+
"minimum": 0,
|
|
13811
|
+
"maximum": 100,
|
|
13812
|
+
"description": "Include last N errors in response (orchestrators only)"
|
|
13813
|
+
},
|
|
13814
|
+
"required": false,
|
|
13815
|
+
"name": "errors",
|
|
13816
|
+
"in": "query"
|
|
13790
13817
|
}
|
|
13791
13818
|
],
|
|
13792
13819
|
"responses": {
|
|
13793
13820
|
"200": {
|
|
13794
|
-
"description": "Job status",
|
|
13821
|
+
"description": "Job status from agent",
|
|
13795
13822
|
"content": {
|
|
13796
13823
|
"application/json": {
|
|
13797
13824
|
"schema": {
|
|
13798
|
-
"
|
|
13825
|
+
"type": "object",
|
|
13826
|
+
"properties": {
|
|
13827
|
+
"job_id": {
|
|
13828
|
+
"type": "string",
|
|
13829
|
+
"description": "Unique job identifier",
|
|
13830
|
+
"example": "job_01KFXPQ3ABCDEFGHIJKLMN"
|
|
13831
|
+
},
|
|
13832
|
+
"status": {
|
|
13833
|
+
"type": "string",
|
|
13834
|
+
"enum": [
|
|
13835
|
+
"pending",
|
|
13836
|
+
"running",
|
|
13837
|
+
"done",
|
|
13838
|
+
"error"
|
|
13839
|
+
],
|
|
13840
|
+
"description": "Current job status",
|
|
13841
|
+
"example": "running"
|
|
13842
|
+
},
|
|
13843
|
+
"progress": {
|
|
13844
|
+
"$ref": "#/components/schemas/JobProgress"
|
|
13845
|
+
},
|
|
13846
|
+
"started_at": {
|
|
13847
|
+
"type": "string",
|
|
13848
|
+
"description": "When this job started (ISO timestamp)",
|
|
13849
|
+
"example": "2026-01-26T17:48:15.000Z"
|
|
13850
|
+
},
|
|
13851
|
+
"completed_at": {
|
|
13852
|
+
"type": "string",
|
|
13853
|
+
"description": "When this job completed (ISO timestamp)",
|
|
13854
|
+
"example": "2026-01-26T17:49:30.000Z"
|
|
13855
|
+
},
|
|
13856
|
+
"updated_at": {
|
|
13857
|
+
"type": "string",
|
|
13858
|
+
"description": "Last state modification (ISO timestamp)",
|
|
13859
|
+
"example": "2026-01-26T17:49:27.000Z"
|
|
13860
|
+
},
|
|
13861
|
+
"result": {
|
|
13862
|
+
"type": "object",
|
|
13863
|
+
"additionalProperties": {
|
|
13864
|
+
"nullable": true
|
|
13865
|
+
},
|
|
13866
|
+
"description": "Final result data (only when status is done)"
|
|
13867
|
+
},
|
|
13868
|
+
"error": {
|
|
13869
|
+
"$ref": "#/components/schemas/JobError"
|
|
13870
|
+
}
|
|
13871
|
+
},
|
|
13872
|
+
"required": [
|
|
13873
|
+
"job_id",
|
|
13874
|
+
"status",
|
|
13875
|
+
"progress",
|
|
13876
|
+
"started_at"
|
|
13877
|
+
],
|
|
13878
|
+
"description": "Job status response from an agent's /status/:job_id endpoint.\n\nThis schema defines the base fields that all agents return. Agent-specific fields\n(phase, stages, sub_jobs, folders, dispatches, nested_progress, etc.) are also\nallowed and passed through.\n\n**Query parameters (passed through to agent):**\n- `?detail=full` - Include detailed sub-job/dispatch information (orchestrators/workflows)\n- `?errors=N` - Include last N errors (orchestrators only)\n\n**Agent types return different additional fields:**\n- **Services**: May include `nested_progress` for Lambda-backed services\n- **Workflows**: May include `phase`, `stages`, `sub_jobs`\n- **Orchestrators**: May include `phase`, `discovery`, `grouping`, `dispatch`, `folders`, `dispatches`, `recent_errors`",
|
|
13879
|
+
"title": "AgentJobStatusResponse"
|
|
13799
13880
|
}
|
|
13800
13881
|
}
|
|
13801
13882
|
}
|
|
13802
13883
|
},
|
|
13803
|
-
"
|
|
13804
|
-
"description": "
|
|
13884
|
+
"404": {
|
|
13885
|
+
"description": "Not Found - Resource does not exist",
|
|
13805
13886
|
"content": {
|
|
13806
13887
|
"application/json": {
|
|
13807
13888
|
"schema": {
|
|
13808
13889
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
13809
13890
|
},
|
|
13810
13891
|
"example": {
|
|
13811
|
-
"error": "
|
|
13892
|
+
"error": "Entity not found"
|
|
13812
13893
|
}
|
|
13813
13894
|
}
|
|
13814
13895
|
}
|
|
13815
13896
|
},
|
|
13816
|
-
"
|
|
13817
|
-
"description": "
|
|
13897
|
+
"502": {
|
|
13898
|
+
"description": "Agent unreachable or returned an error",
|
|
13818
13899
|
"content": {
|
|
13819
13900
|
"application/json": {
|
|
13820
13901
|
"schema": {
|
|
13821
|
-
"$ref": "#/components/schemas/
|
|
13822
|
-
},
|
|
13823
|
-
"example": {
|
|
13824
|
-
"error": "Entity not found"
|
|
13902
|
+
"$ref": "#/components/schemas/AgentUnreachableError"
|
|
13825
13903
|
}
|
|
13826
13904
|
}
|
|
13827
13905
|
}
|
package/openapi/version.json
CHANGED