@vertesia/client 1.2.0 → 1.4.0-dev.20260614.160504Z
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/lib/{types/AccountApi.d.ts → AccountApi.d.ts} +5 -10
- package/lib/AccountApi.d.ts.map +1 -0
- package/lib/{esm/AccountApi.js → AccountApi.js} +5 -13
- package/lib/AccountApi.js.map +1 -0
- package/lib/{types/AccountsApi.d.ts → AccountsApi.d.ts} +3 -2
- package/lib/AccountsApi.d.ts.map +1 -0
- package/lib/{esm/AccountsApi.js → AccountsApi.js} +2 -2
- package/lib/AccountsApi.js.map +1 -0
- package/lib/{types/AnalyticsApi.d.ts → AnalyticsApi.d.ts} +3 -2
- package/lib/AnalyticsApi.d.ts.map +1 -0
- package/lib/{esm/AnalyticsApi.js → AnalyticsApi.js} +5 -5
- package/lib/AnalyticsApi.js.map +1 -0
- package/lib/{types/ApiKeysApi.d.ts → ApiKeysApi.d.ts} +3 -2
- package/lib/ApiKeysApi.d.ts.map +1 -0
- package/lib/ApiKeysApi.js.map +1 -0
- package/lib/{types/AppsApi.d.ts → AppsApi.d.ts} +40 -2
- package/lib/AppsApi.d.ts.map +1 -0
- package/lib/{esm/AppsApi.js → AppsApi.js} +87 -14
- package/lib/AppsApi.js.map +1 -0
- package/lib/{types/AuditTrailApi.d.ts → AuditTrailApi.d.ts} +2 -1
- package/lib/AuditTrailApi.d.ts.map +1 -0
- package/lib/{esm/AuditTrailApi.js → AuditTrailApi.js} +1 -1
- package/lib/AuditTrailApi.js.map +1 -0
- package/lib/{types/CommandsApi.d.ts → CommandsApi.d.ts} +3 -2
- package/lib/CommandsApi.d.ts.map +1 -0
- package/lib/{esm/CommandsApi.js → CommandsApi.js} +3 -3
- package/lib/CommandsApi.js.map +1 -0
- package/lib/{types/EnvironmentsApi.d.ts → EnvironmentsApi.d.ts} +5 -4
- package/lib/EnvironmentsApi.d.ts.map +1 -0
- package/lib/{esm/EnvironmentsApi.js → EnvironmentsApi.js} +13 -13
- package/lib/EnvironmentsApi.js.map +1 -0
- package/lib/{types/GroupsApi.d.ts → GroupsApi.d.ts} +3 -2
- package/lib/GroupsApi.d.ts.map +1 -0
- package/lib/{esm/GroupsApi.js → GroupsApi.js} +8 -8
- package/lib/GroupsApi.js.map +1 -0
- package/lib/IamApi.d.ts +51 -0
- package/lib/IamApi.d.ts.map +1 -0
- package/lib/IamApi.js +67 -0
- package/lib/IamApi.js.map +1 -0
- package/lib/{types/InteractionBase.d.ts → InteractionBase.d.ts} +6 -5
- package/lib/InteractionBase.d.ts.map +1 -0
- package/lib/{esm/InteractionBase.js → InteractionBase.js} +4 -4
- package/lib/InteractionBase.js.map +1 -0
- package/lib/{types/InteractionCatalogApi.d.ts → InteractionCatalogApi.d.ts} +3 -2
- package/lib/InteractionCatalogApi.d.ts.map +1 -0
- package/lib/{esm/InteractionCatalogApi.js → InteractionCatalogApi.js} +12 -12
- package/lib/InteractionCatalogApi.js.map +1 -0
- package/lib/{types/InteractionOutput.d.ts → InteractionOutput.d.ts} +13 -12
- package/lib/InteractionOutput.d.ts.map +1 -0
- package/lib/{esm/InteractionOutput.js → InteractionOutput.js} +22 -25
- package/lib/InteractionOutput.js.map +1 -0
- package/lib/{types/InteractionResult.example.d.ts → InteractionResult.example.d.ts} +1 -0
- package/lib/InteractionResult.example.d.ts.map +1 -0
- package/lib/{esm/InteractionResult.example.js → InteractionResult.example.js} +4 -4
- package/lib/InteractionResult.example.js.map +1 -0
- package/lib/{types/InteractionsApi.d.ts → InteractionsApi.d.ts} +17 -6
- package/lib/InteractionsApi.d.ts.map +1 -0
- package/lib/{esm/InteractionsApi.js → InteractionsApi.js} +45 -28
- package/lib/InteractionsApi.js.map +1 -0
- package/lib/{types/OAuthClientsApi.d.ts → OAuthClientsApi.d.ts} +4 -2
- package/lib/OAuthClientsApi.d.ts.map +1 -0
- package/lib/{esm/OAuthClientsApi.js → OAuthClientsApi.js} +3 -0
- package/lib/OAuthClientsApi.js.map +1 -0
- package/lib/{types/OAuthGrantsApi.d.ts → OAuthGrantsApi.d.ts} +2 -1
- package/lib/OAuthGrantsApi.d.ts.map +1 -0
- package/lib/OAuthGrantsApi.js.map +1 -0
- package/lib/{types/OAuthProvidersApi.d.ts → OAuthProvidersApi.d.ts} +3 -2
- package/lib/OAuthProvidersApi.d.ts.map +1 -0
- package/lib/OAuthProvidersApi.js.map +1 -0
- package/lib/OAuthServerApi.d.ts +19 -0
- package/lib/OAuthServerApi.d.ts.map +1 -0
- package/lib/OAuthServerApi.js +48 -0
- package/lib/OAuthServerApi.js.map +1 -0
- package/lib/{types/ProjectsApi.d.ts → ProjectsApi.d.ts} +8 -5
- package/lib/ProjectsApi.d.ts.map +1 -0
- package/lib/{esm/ProjectsApi.js → ProjectsApi.js} +21 -12
- package/lib/ProjectsApi.js.map +1 -0
- package/lib/{types/PromptsApi.d.ts → PromptsApi.d.ts} +17 -9
- package/lib/PromptsApi.d.ts.map +1 -0
- package/lib/{esm/PromptsApi.js → PromptsApi.js} +16 -18
- package/lib/PromptsApi.js.map +1 -0
- package/lib/RefsApi.d.ts +7 -0
- package/lib/RefsApi.d.ts.map +1 -0
- package/lib/{esm/RefsApi.js → RefsApi.js} +2 -2
- package/lib/RefsApi.js.map +1 -0
- package/lib/{types/RemoteMcpConnectionsApi.d.ts → RemoteMcpConnectionsApi.d.ts} +3 -2
- package/lib/RemoteMcpConnectionsApi.d.ts.map +1 -0
- package/lib/{esm/RemoteMcpConnectionsApi.js → RemoteMcpConnectionsApi.js} +3 -3
- package/lib/RemoteMcpConnectionsApi.js.map +1 -0
- package/lib/{types/RunsApi.d.ts → RunsApi.d.ts} +8 -7
- package/lib/RunsApi.d.ts.map +1 -0
- package/lib/{esm/RunsApi.js → RunsApi.js} +11 -11
- package/lib/RunsApi.js.map +1 -0
- package/lib/SecretsApi.d.ts +18 -0
- package/lib/SecretsApi.d.ts.map +1 -0
- package/lib/SecretsApi.js +30 -0
- package/lib/SecretsApi.js.map +1 -0
- package/lib/{types/SkillsApi.d.ts → SkillsApi.d.ts} +3 -2
- package/lib/SkillsApi.d.ts.map +1 -0
- package/lib/{esm/SkillsApi.js → SkillsApi.js} +3 -3
- package/lib/SkillsApi.js.map +1 -0
- package/lib/{types/StreamSource.d.ts → StreamSource.d.ts} +1 -0
- package/lib/StreamSource.d.ts.map +1 -0
- package/lib/StreamSource.js.map +1 -0
- package/lib/ToolsApi.d.ts +36 -0
- package/lib/ToolsApi.d.ts.map +1 -0
- package/lib/ToolsApi.js +46 -0
- package/lib/ToolsApi.js.map +1 -0
- package/lib/{types/TrainingApi.d.ts → TrainingApi.d.ts} +7 -6
- package/lib/TrainingApi.d.ts.map +1 -0
- package/lib/TrainingApi.js +51 -0
- package/lib/TrainingApi.js.map +1 -0
- package/lib/{types/UsersApi.d.ts → UsersApi.d.ts} +3 -2
- package/lib/UsersApi.d.ts.map +1 -0
- package/lib/{esm/UsersApi.js → UsersApi.js} +3 -3
- package/lib/UsersApi.js.map +1 -0
- package/lib/{types/client.d.ts → client.d.ts} +42 -27
- package/lib/client.d.ts.map +1 -0
- package/lib/{esm/client.js → client.js} +90 -61
- package/lib/client.js.map +1 -0
- package/lib/{types/execute.d.ts → execute.d.ts} +5 -4
- package/lib/execute.d.ts.map +1 -0
- package/lib/{esm/execute.js → execute.js} +13 -11
- package/lib/execute.js.map +1 -0
- package/lib/{types/index.d.ts → index.d.ts} +9 -8
- package/lib/index.d.ts.map +1 -0
- package/lib/{esm/index.js → index.js} +4 -2
- package/lib/index.js.map +1 -0
- package/lib/{types/nodejs → nodejs}/NodeStreamSource.d.ts +3 -2
- package/lib/nodejs/NodeStreamSource.d.ts.map +1 -0
- package/lib/{esm/nodejs → nodejs}/NodeStreamSource.js +3 -3
- package/lib/nodejs/NodeStreamSource.js.map +1 -0
- package/lib/nodejs/index.d.ts +2 -0
- package/lib/nodejs/index.d.ts.map +1 -0
- package/lib/nodejs/index.js +2 -0
- package/lib/nodejs/index.js.map +1 -0
- package/lib/{types/store → store}/AgentsApi.d.ts +55 -8
- package/lib/store/AgentsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/AgentsApi.js +155 -47
- package/lib/store/AgentsApi.js.map +1 -0
- package/lib/{types/store → store}/AnalyzeDocApi.d.ts +3 -2
- package/lib/store/AnalyzeDocApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/AnalyzeDocApi.js +10 -10
- package/lib/store/AnalyzeDocApi.js.map +1 -0
- package/lib/{types/store → store}/CollectionsApi.d.ts +6 -5
- package/lib/store/CollectionsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/CollectionsApi.js +22 -22
- package/lib/store/CollectionsApi.js.map +1 -0
- package/lib/{types/store → store}/CostApi.d.ts +3 -2
- package/lib/store/CostApi.d.ts.map +1 -0
- package/lib/store/CostApi.js.map +1 -0
- package/lib/{types/store → store}/DashboardApi.d.ts +3 -2
- package/lib/store/DashboardApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/DashboardApi.js +7 -4
- package/lib/store/DashboardApi.js.map +1 -0
- package/lib/{types/store → store}/DataApi.d.ts +4 -3
- package/lib/store/DataApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/DataApi.js +6 -6
- package/lib/store/DataApi.js.map +1 -0
- package/lib/{types/store → store}/EmailApi.d.ts +3 -2
- package/lib/store/EmailApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/EmailApi.js +5 -5
- package/lib/store/EmailApi.js.map +1 -0
- package/lib/store/EmbeddingsApi.d.ts +13 -0
- package/lib/store/EmbeddingsApi.d.ts.map +1 -0
- package/lib/store/EmbeddingsApi.js +25 -0
- package/lib/store/EmbeddingsApi.js.map +1 -0
- package/lib/{types/store → store}/FilesApi.d.ts +22 -7
- package/lib/store/FilesApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/FilesApi.js +56 -51
- package/lib/store/FilesApi.js.map +1 -0
- package/lib/{types/store → store}/HiveMemoryApi.d.ts +3 -2
- package/lib/store/HiveMemoryApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/HiveMemoryApi.js +11 -11
- package/lib/{esm/store → store}/HiveMemoryApi.js.map +1 -1
- package/lib/{types/store → store}/IndexingApi.d.ts +16 -10
- package/lib/store/IndexingApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/IndexingApi.js +57 -45
- package/lib/store/IndexingApi.js.map +1 -0
- package/lib/{types/store → store}/ObjectsApi.d.ts +16 -11
- package/lib/store/ObjectsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/ObjectsApi.js +46 -63
- package/lib/store/ObjectsApi.js.map +1 -0
- package/lib/{types/store → store}/PendingAsksApi.d.ts +5 -2
- package/lib/store/PendingAsksApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/PendingAsksApi.js +4 -4
- package/lib/store/PendingAsksApi.js.map +1 -0
- package/lib/store/ProcessApi.d.ts +25 -0
- package/lib/store/ProcessApi.d.ts.map +1 -0
- package/lib/store/ProcessApi.js +42 -0
- package/lib/store/ProcessApi.js.map +1 -0
- package/lib/{types/store → store}/QueryApi.d.ts +2 -1
- package/lib/store/QueryApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/QueryApi.js +3 -3
- package/lib/store/QueryApi.js.map +1 -0
- package/lib/{types/store → store}/RenderingApi.d.ts +3 -2
- package/lib/store/RenderingApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/RenderingApi.js +8 -8
- package/lib/store/RenderingApi.js.map +1 -0
- package/lib/{types/store → store}/SchedulesApi.d.ts +3 -2
- package/lib/store/SchedulesApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/SchedulesApi.js +4 -4
- package/lib/store/SchedulesApi.js.map +1 -0
- package/lib/store/TaskApi.d.ts +16 -0
- package/lib/store/TaskApi.d.ts.map +1 -0
- package/lib/store/TaskApi.js +42 -0
- package/lib/store/TaskApi.js.map +1 -0
- package/lib/{types/store → store}/ToolsApi.d.ts +3 -2
- package/lib/store/ToolsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/ToolsApi.js +2 -2
- package/lib/store/ToolsApi.js.map +1 -0
- package/lib/{types/store → store}/TypeCatalogApi.d.ts +4 -3
- package/lib/store/TypeCatalogApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/TypeCatalogApi.js +5 -5
- package/lib/store/TypeCatalogApi.js.map +1 -0
- package/lib/{types/store → store}/TypesApi.d.ts +5 -4
- package/lib/store/TypesApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/TypesApi.js +12 -12
- package/lib/store/TypesApi.js.map +1 -0
- package/lib/{types/store → store}/WorkflowsApi.d.ts +11 -9
- package/lib/store/WorkflowsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/WorkflowsApi.js +44 -46
- package/lib/store/WorkflowsApi.js.map +1 -0
- package/lib/store/client.d.ts +59 -0
- package/lib/store/client.d.ts.map +1 -0
- package/lib/{esm/store → store}/client.js +32 -29
- package/lib/store/client.js.map +1 -0
- package/lib/{types/store → store}/errors.d.ts +2 -1
- package/lib/store/errors.d.ts.map +1 -0
- package/lib/store/errors.js +7 -0
- package/lib/store/errors.js.map +1 -0
- package/lib/store/index.d.ts +20 -0
- package/lib/store/index.d.ts.map +1 -0
- package/lib/store/index.js +20 -0
- package/lib/store/index.js.map +1 -0
- package/lib/store/signed-url.d.ts +39 -0
- package/lib/store/signed-url.d.ts.map +1 -0
- package/lib/store/signed-url.js +153 -0
- package/lib/store/signed-url.js.map +1 -0
- package/lib/store/stream-termination.d.ts +4 -0
- package/lib/store/stream-termination.d.ts.map +1 -0
- package/lib/store/stream-termination.js +31 -0
- package/lib/store/stream-termination.js.map +1 -0
- package/lib/{types/store → store}/version.d.ts +1 -0
- package/lib/store/version.d.ts.map +1 -0
- package/lib/store/version.js.map +1 -0
- package/lib/vertesia-client.js +1 -1
- package/lib/vertesia-client.js.map +1 -1
- package/package.json +25 -38
- package/src/AccountApi.ts +10 -22
- package/src/AccountsApi.ts +3 -9
- package/src/AnalyticsApi.ts +6 -8
- package/src/ApiKeysApi.ts +10 -2
- package/src/AppsApi.ts +131 -27
- package/src/AuditTrailApi.ts +4 -4
- package/src/CommandsApi.ts +7 -8
- package/src/EnvironmentsApi.ts +27 -23
- package/src/GroupsApi.ts +15 -10
- package/src/IamApi.ts +46 -23
- package/src/InteractionBase.ts +18 -9
- package/src/InteractionCatalogApi.ts +15 -20
- package/src/InteractionOutput.test.ts +40 -57
- package/src/InteractionOutput.ts +55 -47
- package/src/InteractionResult.example.ts +30 -18
- package/src/InteractionsApi.ts +113 -59
- package/src/OAuthClientsApi.ts +6 -1
- package/src/OAuthGrantsApi.ts +1 -1
- package/src/OAuthProvidersApi.ts +3 -4
- package/src/OAuthServerApi.ts +53 -6
- package/src/ProjectsApi.ts +70 -31
- package/src/PromptsApi.ts +44 -29
- package/src/RefsApi.ts +4 -10
- package/src/RemoteMcpConnectionsApi.ts +6 -7
- package/src/RunsApi.ts +22 -20
- package/src/SecretsApi.ts +56 -0
- package/src/SkillsApi.ts +5 -12
- package/src/StreamSource.ts +6 -1
- package/src/ToolsApi.ts +52 -0
- package/src/TrainingApi.ts +27 -25
- package/src/UsersApi.ts +6 -8
- package/src/client.test.ts +68 -2
- package/src/client.ts +130 -103
- package/src/execute.ts +41 -20
- package/src/index.ts +8 -8
- package/src/nodejs/NodeStreamSource.ts +4 -5
- package/src/nodejs/index.ts +1 -1
- package/src/store/AgentsApi.ts +285 -143
- package/src/store/AnalyzeDocApi.ts +39 -21
- package/src/store/CollectionsApi.ts +40 -38
- package/src/store/CostApi.ts +14 -19
- package/src/store/DashboardApi.ts +24 -27
- package/src/store/DataApi.ts +29 -32
- package/src/store/EmailApi.ts +6 -6
- package/src/store/EmbeddingsApi.ts +15 -15
- package/src/store/FilesApi.ts +80 -85
- package/src/store/HiveMemoryApi.ts +17 -28
- package/src/store/IndexingApi.ts +113 -76
- package/src/store/ObjectsApi.ts +100 -131
- package/src/store/PendingAsksApi.ts +7 -5
- package/src/store/ProcessApi.ts +61 -0
- package/src/store/QueryApi.ts +3 -4
- package/src/store/RenderingApi.ts +14 -17
- package/src/store/SchedulesApi.ts +6 -6
- package/src/store/TaskApi.ts +45 -0
- package/src/store/ToolsApi.ts +3 -3
- package/src/store/TypeCatalogApi.ts +56 -53
- package/src/store/TypesApi.ts +26 -18
- package/src/store/WorkflowsApi.ts +140 -146
- package/src/store/client.ts +44 -39
- package/src/store/errors.ts +3 -3
- package/src/store/index.ts +19 -18
- package/src/store/signed-url.test.ts +182 -0
- package/src/store/signed-url.ts +184 -0
- package/src/store/stream-termination.test.ts +58 -0
- package/src/store/stream-termination.ts +40 -0
- package/src/store/version.ts +1 -1
- package/lib/cjs/AccountApi.js +0 -85
- package/lib/cjs/AccountApi.js.map +0 -1
- package/lib/cjs/AccountsApi.js +0 -16
- package/lib/cjs/AccountsApi.js.map +0 -1
- package/lib/cjs/AnalyticsApi.js +0 -43
- package/lib/cjs/AnalyticsApi.js.map +0 -1
- package/lib/cjs/ApiKeysApi.js +0 -61
- package/lib/cjs/ApiKeysApi.js.map +0 -1
- package/lib/cjs/AppsApi.js +0 -137
- package/lib/cjs/AppsApi.js.map +0 -1
- package/lib/cjs/AuditTrailApi.js +0 -39
- package/lib/cjs/AuditTrailApi.js.map +0 -1
- package/lib/cjs/CommandsApi.js +0 -19
- package/lib/cjs/CommandsApi.js.map +0 -1
- package/lib/cjs/EnvironmentsApi.js +0 -72
- package/lib/cjs/EnvironmentsApi.js.map +0 -1
- package/lib/cjs/GroupsApi.js +0 -86
- package/lib/cjs/GroupsApi.js.map +0 -1
- package/lib/cjs/IamApi.js +0 -53
- package/lib/cjs/IamApi.js.map +0 -1
- package/lib/cjs/InteractionBase.js +0 -44
- package/lib/cjs/InteractionBase.js.map +0 -1
- package/lib/cjs/InteractionCatalogApi.js +0 -64
- package/lib/cjs/InteractionCatalogApi.js.map +0 -1
- package/lib/cjs/InteractionOutput.js +0 -300
- package/lib/cjs/InteractionOutput.js.map +0 -1
- package/lib/cjs/InteractionResult.example.js +0 -57
- package/lib/cjs/InteractionResult.example.js.map +0 -1
- package/lib/cjs/InteractionsApi.js +0 -260
- package/lib/cjs/InteractionsApi.js.map +0 -1
- package/lib/cjs/OAuthClientsApi.js +0 -25
- package/lib/cjs/OAuthClientsApi.js.map +0 -1
- package/lib/cjs/OAuthGrantsApi.js +0 -30
- package/lib/cjs/OAuthGrantsApi.js.map +0 -1
- package/lib/cjs/OAuthProvidersApi.js +0 -43
- package/lib/cjs/OAuthProvidersApi.js.map +0 -1
- package/lib/cjs/OAuthServerApi.js +0 -22
- package/lib/cjs/OAuthServerApi.js.map +0 -1
- package/lib/cjs/ProjectsApi.js +0 -105
- package/lib/cjs/ProjectsApi.js.map +0 -1
- package/lib/cjs/PromptsApi.js +0 -135
- package/lib/cjs/PromptsApi.js.map +0 -1
- package/lib/cjs/RefsApi.js +0 -14
- package/lib/cjs/RefsApi.js.map +0 -1
- package/lib/cjs/RemoteMcpConnectionsApi.js +0 -38
- package/lib/cjs/RemoteMcpConnectionsApi.js.map +0 -1
- package/lib/cjs/RunsApi.js +0 -115
- package/lib/cjs/RunsApi.js.map +0 -1
- package/lib/cjs/SkillsApi.js +0 -39
- package/lib/cjs/SkillsApi.js.map +0 -1
- package/lib/cjs/StreamSource.js +0 -17
- package/lib/cjs/StreamSource.js.map +0 -1
- package/lib/cjs/TrainingApi.js +0 -54
- package/lib/cjs/TrainingApi.js.map +0 -1
- package/lib/cjs/UsersApi.js +0 -19
- package/lib/cjs/UsersApi.js.map +0 -1
- package/lib/cjs/client.js +0 -375
- package/lib/cjs/client.js.map +0 -1
- package/lib/cjs/execute.js +0 -160
- package/lib/cjs/execute.js.map +0 -1
- package/lib/cjs/index.js +0 -36
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/nodejs/NodeStreamSource.js +0 -45
- package/lib/cjs/nodejs/NodeStreamSource.js.map +0 -1
- package/lib/cjs/nodejs/index.js +0 -18
- package/lib/cjs/nodejs/index.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/store/AgentsApi.js +0 -663
- package/lib/cjs/store/AgentsApi.js.map +0 -1
- package/lib/cjs/store/AnalyzeDocApi.js +0 -56
- package/lib/cjs/store/AnalyzeDocApi.js.map +0 -1
- package/lib/cjs/store/CollectionsApi.js +0 -131
- package/lib/cjs/store/CollectionsApi.js.map +0 -1
- package/lib/cjs/store/CommandsApi.js +0 -17
- package/lib/cjs/store/CommandsApi.js.map +0 -1
- package/lib/cjs/store/CostApi.js +0 -62
- package/lib/cjs/store/CostApi.js.map +0 -1
- package/lib/cjs/store/DashboardApi.js +0 -182
- package/lib/cjs/store/DashboardApi.js.map +0 -1
- package/lib/cjs/store/DataApi.js +0 -436
- package/lib/cjs/store/DataApi.js.map +0 -1
- package/lib/cjs/store/EmailApi.js +0 -103
- package/lib/cjs/store/EmailApi.js.map +0 -1
- package/lib/cjs/store/EmbeddingsApi.js +0 -29
- package/lib/cjs/store/EmbeddingsApi.js.map +0 -1
- package/lib/cjs/store/FilesApi.js +0 -286
- package/lib/cjs/store/FilesApi.js.map +0 -1
- package/lib/cjs/store/HiveMemoryApi.js +0 -174
- package/lib/cjs/store/HiveMemoryApi.js.map +0 -1
- package/lib/cjs/store/IndexingApi.js +0 -308
- package/lib/cjs/store/IndexingApi.js.map +0 -1
- package/lib/cjs/store/ObjectsApi.js +0 -340
- package/lib/cjs/store/ObjectsApi.js.map +0 -1
- package/lib/cjs/store/PendingAsksApi.js +0 -43
- package/lib/cjs/store/PendingAsksApi.js.map +0 -1
- package/lib/cjs/store/QueryApi.js +0 -67
- package/lib/cjs/store/QueryApi.js.map +0 -1
- package/lib/cjs/store/RenderingApi.js +0 -84
- package/lib/cjs/store/RenderingApi.js.map +0 -1
- package/lib/cjs/store/SchedulesApi.js +0 -103
- package/lib/cjs/store/SchedulesApi.js.map +0 -1
- package/lib/cjs/store/ToolsApi.js +0 -21
- package/lib/cjs/store/ToolsApi.js.map +0 -1
- package/lib/cjs/store/TypeCatalogApi.js +0 -50
- package/lib/cjs/store/TypeCatalogApi.js.map +0 -1
- package/lib/cjs/store/TypesApi.js +0 -60
- package/lib/cjs/store/TypesApi.js.map +0 -1
- package/lib/cjs/store/WorkersApi.js +0 -16
- package/lib/cjs/store/WorkersApi.js.map +0 -1
- package/lib/cjs/store/WorkflowsApi.js +0 -621
- package/lib/cjs/store/WorkflowsApi.js.map +0 -1
- package/lib/cjs/store/client.js +0 -93
- package/lib/cjs/store/client.js.map +0 -1
- package/lib/cjs/store/errors.js +0 -11
- package/lib/cjs/store/errors.js.map +0 -1
- package/lib/cjs/store/index.js +0 -34
- package/lib/cjs/store/index.js.map +0 -1
- package/lib/cjs/store/version.js +0 -6
- package/lib/cjs/store/version.js.map +0 -1
- package/lib/esm/AccountApi.js.map +0 -1
- package/lib/esm/AccountsApi.js.map +0 -1
- package/lib/esm/AnalyticsApi.js.map +0 -1
- package/lib/esm/ApiKeysApi.js.map +0 -1
- package/lib/esm/AppsApi.js.map +0 -1
- package/lib/esm/AuditTrailApi.js.map +0 -1
- package/lib/esm/CommandsApi.js.map +0 -1
- package/lib/esm/EnvironmentsApi.js.map +0 -1
- package/lib/esm/GroupsApi.js.map +0 -1
- package/lib/esm/IamApi.js +0 -47
- package/lib/esm/IamApi.js.map +0 -1
- package/lib/esm/InteractionBase.js.map +0 -1
- package/lib/esm/InteractionCatalogApi.js.map +0 -1
- package/lib/esm/InteractionOutput.js.map +0 -1
- package/lib/esm/InteractionResult.example.js.map +0 -1
- package/lib/esm/InteractionsApi.js.map +0 -1
- package/lib/esm/OAuthClientsApi.js.map +0 -1
- package/lib/esm/OAuthGrantsApi.js.map +0 -1
- package/lib/esm/OAuthProvidersApi.js.map +0 -1
- package/lib/esm/OAuthServerApi.js +0 -19
- package/lib/esm/OAuthServerApi.js.map +0 -1
- package/lib/esm/ProjectsApi.js.map +0 -1
- package/lib/esm/PromptsApi.js.map +0 -1
- package/lib/esm/RefsApi.js.map +0 -1
- package/lib/esm/RemoteMcpConnectionsApi.js.map +0 -1
- package/lib/esm/RunsApi.js.map +0 -1
- package/lib/esm/SkillsApi.js.map +0 -1
- package/lib/esm/StreamSource.js.map +0 -1
- package/lib/esm/TrainingApi.js +0 -51
- package/lib/esm/TrainingApi.js.map +0 -1
- package/lib/esm/UsersApi.js.map +0 -1
- package/lib/esm/client.js.map +0 -1
- package/lib/esm/execute.js.map +0 -1
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/nodejs/NodeStreamSource.js.map +0 -1
- package/lib/esm/nodejs/index.js +0 -2
- package/lib/esm/nodejs/index.js.map +0 -1
- package/lib/esm/store/AgentsApi.js.map +0 -1
- package/lib/esm/store/AnalyzeDocApi.js.map +0 -1
- package/lib/esm/store/CollectionsApi.js.map +0 -1
- package/lib/esm/store/CommandsApi.js +0 -13
- package/lib/esm/store/CommandsApi.js.map +0 -1
- package/lib/esm/store/CostApi.js.map +0 -1
- package/lib/esm/store/DashboardApi.js.map +0 -1
- package/lib/esm/store/DataApi.js.map +0 -1
- package/lib/esm/store/EmailApi.js.map +0 -1
- package/lib/esm/store/EmbeddingsApi.js +0 -25
- package/lib/esm/store/EmbeddingsApi.js.map +0 -1
- package/lib/esm/store/FilesApi.js.map +0 -1
- package/lib/esm/store/IndexingApi.js.map +0 -1
- package/lib/esm/store/ObjectsApi.js.map +0 -1
- package/lib/esm/store/PendingAsksApi.js.map +0 -1
- package/lib/esm/store/QueryApi.js.map +0 -1
- package/lib/esm/store/RenderingApi.js.map +0 -1
- package/lib/esm/store/SchedulesApi.js.map +0 -1
- package/lib/esm/store/ToolsApi.js.map +0 -1
- package/lib/esm/store/TypeCatalogApi.js.map +0 -1
- package/lib/esm/store/TypesApi.js.map +0 -1
- package/lib/esm/store/WorkersApi.js +0 -12
- package/lib/esm/store/WorkersApi.js.map +0 -1
- package/lib/esm/store/WorkflowsApi.js.map +0 -1
- package/lib/esm/store/client.js.map +0 -1
- package/lib/esm/store/errors.js +0 -7
- package/lib/esm/store/errors.js.map +0 -1
- package/lib/esm/store/index.js +0 -18
- package/lib/esm/store/index.js.map +0 -1
- package/lib/esm/store/version.js.map +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/types/AccountApi.d.ts.map +0 -1
- package/lib/types/AccountsApi.d.ts.map +0 -1
- package/lib/types/AnalyticsApi.d.ts.map +0 -1
- package/lib/types/ApiKeysApi.d.ts.map +0 -1
- package/lib/types/AppsApi.d.ts.map +0 -1
- package/lib/types/AuditTrailApi.d.ts.map +0 -1
- package/lib/types/CommandsApi.d.ts.map +0 -1
- package/lib/types/EnvironmentsApi.d.ts.map +0 -1
- package/lib/types/GroupsApi.d.ts.map +0 -1
- package/lib/types/IamApi.d.ts +0 -36
- package/lib/types/IamApi.d.ts.map +0 -1
- package/lib/types/InteractionBase.d.ts.map +0 -1
- package/lib/types/InteractionCatalogApi.d.ts.map +0 -1
- package/lib/types/InteractionOutput.d.ts.map +0 -1
- package/lib/types/InteractionResult.example.d.ts.map +0 -1
- package/lib/types/InteractionsApi.d.ts.map +0 -1
- package/lib/types/OAuthClientsApi.d.ts.map +0 -1
- package/lib/types/OAuthGrantsApi.d.ts.map +0 -1
- package/lib/types/OAuthProvidersApi.d.ts.map +0 -1
- package/lib/types/OAuthServerApi.d.ts +0 -10
- package/lib/types/OAuthServerApi.d.ts.map +0 -1
- package/lib/types/ProjectsApi.d.ts.map +0 -1
- package/lib/types/PromptsApi.d.ts.map +0 -1
- package/lib/types/RefsApi.d.ts +0 -6
- package/lib/types/RefsApi.d.ts.map +0 -1
- package/lib/types/RemoteMcpConnectionsApi.d.ts.map +0 -1
- package/lib/types/RunsApi.d.ts.map +0 -1
- package/lib/types/SkillsApi.d.ts.map +0 -1
- package/lib/types/StreamSource.d.ts.map +0 -1
- package/lib/types/TrainingApi.d.ts.map +0 -1
- package/lib/types/UsersApi.d.ts.map +0 -1
- package/lib/types/client.d.ts.map +0 -1
- package/lib/types/execute.d.ts.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/nodejs/NodeStreamSource.d.ts.map +0 -1
- package/lib/types/nodejs/index.d.ts +0 -1
- package/lib/types/nodejs/index.d.ts.map +0 -1
- package/lib/types/store/AgentsApi.d.ts.map +0 -1
- package/lib/types/store/AnalyzeDocApi.d.ts.map +0 -1
- package/lib/types/store/CollectionsApi.d.ts.map +0 -1
- package/lib/types/store/CommandsApi.d.ts +0 -10
- package/lib/types/store/CommandsApi.d.ts.map +0 -1
- package/lib/types/store/CostApi.d.ts.map +0 -1
- package/lib/types/store/DashboardApi.d.ts.map +0 -1
- package/lib/types/store/DataApi.d.ts.map +0 -1
- package/lib/types/store/EmailApi.d.ts.map +0 -1
- package/lib/types/store/EmbeddingsApi.d.ts +0 -12
- package/lib/types/store/EmbeddingsApi.d.ts.map +0 -1
- package/lib/types/store/FilesApi.d.ts.map +0 -1
- package/lib/types/store/HiveMemoryApi.d.ts.map +0 -1
- package/lib/types/store/IndexingApi.d.ts.map +0 -1
- package/lib/types/store/ObjectsApi.d.ts.map +0 -1
- package/lib/types/store/PendingAsksApi.d.ts.map +0 -1
- package/lib/types/store/QueryApi.d.ts.map +0 -1
- package/lib/types/store/RenderingApi.d.ts.map +0 -1
- package/lib/types/store/SchedulesApi.d.ts.map +0 -1
- package/lib/types/store/ToolsApi.d.ts.map +0 -1
- package/lib/types/store/TypeCatalogApi.d.ts.map +0 -1
- package/lib/types/store/TypesApi.d.ts.map +0 -1
- package/lib/types/store/WorkersApi.d.ts +0 -6
- package/lib/types/store/WorkersApi.d.ts.map +0 -1
- package/lib/types/store/WorkflowsApi.d.ts.map +0 -1
- package/lib/types/store/client.d.ts +0 -57
- package/lib/types/store/client.d.ts.map +0 -1
- package/lib/types/store/errors.d.ts.map +0 -1
- package/lib/types/store/index.d.ts +0 -17
- package/lib/types/store/index.d.ts.map +0 -1
- package/lib/types/store/version.d.ts.map +0 -1
- package/src/store/CommandsApi.ts +0 -15
- package/src/store/WorkersApi.ts +0 -17
- /package/lib/{esm/ApiKeysApi.js → ApiKeysApi.js} +0 -0
- /package/lib/{esm/OAuthGrantsApi.js → OAuthGrantsApi.js} +0 -0
- /package/lib/{esm/OAuthProvidersApi.js → OAuthProvidersApi.js} +0 -0
- /package/lib/{esm/StreamSource.js → StreamSource.js} +0 -0
- /package/lib/{esm/store → store}/CostApi.js +0 -0
- /package/lib/{esm/store → store}/version.js +0 -0
package/src/store/client.ts
CHANGED
|
@@ -1,26 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AbstractFetchClient,
|
|
3
|
+
type FETCH_FN,
|
|
4
|
+
type IRequestRetryPolicy,
|
|
5
|
+
type RequestError,
|
|
6
|
+
} from '@vertesia/api-fetch-client';
|
|
7
|
+
import type { BulkOperationPayload, BulkOperationResponse } from '@vertesia/common';
|
|
8
|
+
import { AgentsApi } from './AgentsApi.js';
|
|
9
|
+
import { CollectionsApi } from './CollectionsApi.js';
|
|
10
|
+
import { CostApi } from './CostApi.js';
|
|
11
|
+
import { DataApi } from './DataApi.js';
|
|
12
|
+
import { EmailApi } from './EmailApi.js';
|
|
13
|
+
import { EmbeddingsApi } from './EmbeddingsApi.js';
|
|
14
|
+
import { ZenoClientNotFoundError } from './errors.js';
|
|
15
|
+
import { FilesApi } from './FilesApi.js';
|
|
16
|
+
import { HiveMemoryApi } from './HiveMemoryApi.js';
|
|
17
|
+
import { IndexingApi } from './IndexingApi.js';
|
|
18
|
+
import { ObjectsApi } from './ObjectsApi.js';
|
|
19
|
+
import { PendingAsksApi } from './PendingAsksApi.js';
|
|
20
|
+
import { ProcessApi } from './ProcessApi.js';
|
|
21
|
+
import { QueryApi } from './QueryApi.js';
|
|
22
|
+
import { RenderingApi } from './RenderingApi.js';
|
|
23
|
+
import { SchedulesApi } from './SchedulesApi.js';
|
|
24
|
+
import { TaskApi } from './TaskApi.js';
|
|
25
|
+
import { ToolsApi } from './ToolsApi.js';
|
|
26
|
+
import { TypesApi } from './TypesApi.js';
|
|
27
|
+
import { VERSION, VERSION_HEADER } from './version.js';
|
|
28
|
+
import { WorkflowsApi } from './WorkflowsApi.js';
|
|
24
29
|
|
|
25
30
|
export interface ZenoClientProps {
|
|
26
31
|
serverUrl?: string;
|
|
@@ -28,24 +33,26 @@ export interface ZenoClientProps {
|
|
|
28
33
|
apikey?: string;
|
|
29
34
|
onRequest?: (request: Request) => void;
|
|
30
35
|
onResponse?: (response: Response) => void;
|
|
36
|
+
retryPolicy?: IRequestRetryPolicy;
|
|
37
|
+
fetch?: FETCH_FN | Promise<FETCH_FN>;
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
function ensureDefined(serverUrl: string | undefined) {
|
|
34
41
|
if (!serverUrl) {
|
|
35
|
-
throw new Error(
|
|
42
|
+
throw new Error('zeno client serverUrl is required');
|
|
36
43
|
}
|
|
37
44
|
return serverUrl;
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
export class ZenoClient extends AbstractFetchClient<ZenoClient> {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
opts: ZenoClientProps = {}
|
|
44
|
-
) {
|
|
45
|
-
super(ensureDefined(opts.serverUrl));
|
|
48
|
+
constructor(opts: ZenoClientProps = {}) {
|
|
49
|
+
super(ensureDefined(opts.serverUrl), opts.fetch);
|
|
46
50
|
if (opts.apikey) {
|
|
47
51
|
this.withApiKey(opts.apikey);
|
|
48
52
|
}
|
|
53
|
+
if (opts.retryPolicy) {
|
|
54
|
+
this.withRetryPolicy(opts.retryPolicy);
|
|
55
|
+
}
|
|
49
56
|
this.onRequest = opts.onRequest;
|
|
50
57
|
this.onResponse = opts.onResponse;
|
|
51
58
|
this.errorFactory = (err: RequestError) => {
|
|
@@ -54,7 +61,7 @@ export class ZenoClient extends AbstractFetchClient<ZenoClient> {
|
|
|
54
61
|
} else {
|
|
55
62
|
return err;
|
|
56
63
|
}
|
|
57
|
-
}
|
|
64
|
+
};
|
|
58
65
|
}
|
|
59
66
|
|
|
60
67
|
withApiVersion(version: string | number | null) {
|
|
@@ -67,22 +74,20 @@ export class ZenoClient extends AbstractFetchClient<ZenoClient> {
|
|
|
67
74
|
}
|
|
68
75
|
|
|
69
76
|
withApiKey(apiKey: string | null) {
|
|
70
|
-
return this.withAuthCallback(
|
|
71
|
-
apiKey ? () => Promise.resolve(`Bearer ${apiKey}`) : undefined
|
|
72
|
-
);
|
|
77
|
+
return this.withAuthCallback(apiKey ? () => Promise.resolve(`Bearer ${apiKey}`) : undefined);
|
|
73
78
|
}
|
|
74
79
|
|
|
75
80
|
runOperation(payload: BulkOperationPayload): Promise<BulkOperationResponse> {
|
|
76
|
-
return this.post(
|
|
77
|
-
payload
|
|
81
|
+
return this.post('/api/v1/operations', {
|
|
82
|
+
payload,
|
|
78
83
|
});
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
get initialHeaders() {
|
|
82
87
|
return {
|
|
83
88
|
...super.initialHeaders,
|
|
84
|
-
[VERSION_HEADER]: VERSION
|
|
85
|
-
}
|
|
89
|
+
[VERSION_HEADER]: VERSION,
|
|
90
|
+
};
|
|
86
91
|
}
|
|
87
92
|
|
|
88
93
|
agents = new AgentsApi(this);
|
|
@@ -91,9 +96,9 @@ export class ZenoClient extends AbstractFetchClient<ZenoClient> {
|
|
|
91
96
|
types = new TypesApi(this);
|
|
92
97
|
workflows = new WorkflowsApi(this);
|
|
93
98
|
schedules = new SchedulesApi(this);
|
|
99
|
+
processes = new ProcessApi(this);
|
|
100
|
+
tasks = new TaskApi(this);
|
|
94
101
|
files = new FilesApi(this);
|
|
95
|
-
commands = new CommandsApi(this);
|
|
96
|
-
workers = new WorkersApi(this);
|
|
97
102
|
collections = new CollectionsApi(this);
|
|
98
103
|
embeddings = new EmbeddingsApi(this);
|
|
99
104
|
email = new EmailApi(this);
|
package/src/store/errors.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RequestError } from
|
|
1
|
+
import { RequestError } from '@vertesia/api-fetch-client';
|
|
2
2
|
|
|
3
3
|
export class ZenoClientNotFoundError extends RequestError {
|
|
4
4
|
constructor(req: Request, error: RequestError) {
|
|
5
|
-
super(
|
|
5
|
+
super(`Resource not found: ${error.message}`, req, 404, error.payload);
|
|
6
6
|
}
|
|
7
|
-
}
|
|
7
|
+
}
|
package/src/store/index.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
|
|
1
|
+
export * from './AgentsApi.js';
|
|
2
|
+
export * from './client.js';
|
|
3
|
+
export * from './DataApi.js';
|
|
4
|
+
export * from './EmailApi.js';
|
|
5
|
+
export * from './errors.js';
|
|
6
|
+
export * from './FilesApi.js';
|
|
7
|
+
export * from './HiveMemoryApi.js';
|
|
8
|
+
export * from './IndexingApi.js';
|
|
9
|
+
export * from './ObjectsApi.js';
|
|
10
|
+
export * from './PendingAsksApi.js';
|
|
11
|
+
export * from './ProcessApi.js';
|
|
12
|
+
export * from './QueryApi.js';
|
|
13
|
+
export * from './RenderingApi.js';
|
|
14
|
+
export * from './SchedulesApi.js';
|
|
15
|
+
export * from './signed-url.js';
|
|
16
|
+
export * from './TaskApi.js';
|
|
17
|
+
export * from './TypeCatalogApi.js';
|
|
18
|
+
export * from './TypesApi.js';
|
|
19
|
+
export * from './WorkflowsApi.js';
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
+
import { fetchSignedUrl } from './signed-url.js';
|
|
3
|
+
|
|
4
|
+
function streamOf(chunk: Uint8Array): ReadableStream {
|
|
5
|
+
return new ReadableStream({
|
|
6
|
+
start(controller) {
|
|
7
|
+
controller.enqueue(chunk);
|
|
8
|
+
controller.close();
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function response(status: number, body = '', headers?: Record<string, string>): Response {
|
|
14
|
+
return new Response(status === 204 ? null : body, { status, headers });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
describe('fetchSignedUrl', () => {
|
|
18
|
+
let fetchMock: ReturnType<typeof vi.fn>;
|
|
19
|
+
|
|
20
|
+
beforeEach(() => {
|
|
21
|
+
fetchMock = vi.fn();
|
|
22
|
+
vi.stubGlobal('fetch', fetchMock);
|
|
23
|
+
// Make backoff instantaneous so the tests don't actually wait.
|
|
24
|
+
vi.useFakeTimers();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
afterEach(() => {
|
|
28
|
+
vi.useRealTimers();
|
|
29
|
+
vi.unstubAllGlobals();
|
|
30
|
+
vi.restoreAllMocks();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
async function runAllTimers<T>(promise: Promise<T>): Promise<T> {
|
|
34
|
+
await vi.runAllTimersAsync();
|
|
35
|
+
return promise;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
it('returns immediately on a successful response', async () => {
|
|
39
|
+
fetchMock.mockResolvedValueOnce(response(200, 'ok'));
|
|
40
|
+
const res = await runAllTimers(fetchSignedUrl('https://storage/x'));
|
|
41
|
+
expect(res.status).toBe(200);
|
|
42
|
+
expect(fetchMock).toHaveBeenCalledTimes(1);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('retries on a 503 and succeeds', async () => {
|
|
46
|
+
fetchMock
|
|
47
|
+
.mockResolvedValueOnce(response(503, 'try later'))
|
|
48
|
+
.mockResolvedValueOnce(response(503, 'try later'))
|
|
49
|
+
.mockResolvedValueOnce(response(200, 'ok'));
|
|
50
|
+
const res = await runAllTimers(fetchSignedUrl('https://storage/x', { method: 'PUT', body: 'data' }));
|
|
51
|
+
expect(res.status).toBe(200);
|
|
52
|
+
expect(fetchMock).toHaveBeenCalledTimes(3);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('retries on connection errors and succeeds', async () => {
|
|
56
|
+
fetchMock.mockRejectedValueOnce(new TypeError('network error')).mockResolvedValueOnce(response(200, 'ok'));
|
|
57
|
+
const res = await runAllTimers(fetchSignedUrl('https://storage/x'));
|
|
58
|
+
expect(res.status).toBe(200);
|
|
59
|
+
expect(fetchMock).toHaveBeenCalledTimes(2);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('does not retry non-retryable statuses (404)', async () => {
|
|
63
|
+
fetchMock.mockResolvedValueOnce(response(404, 'missing'));
|
|
64
|
+
const res = await runAllTimers(fetchSignedUrl('https://storage/x'));
|
|
65
|
+
expect(res.status).toBe(404);
|
|
66
|
+
expect(fetchMock).toHaveBeenCalledTimes(1);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('returns the last retryable response after exhausting attempts', async () => {
|
|
70
|
+
fetchMock.mockResolvedValue(response(503, 'down'));
|
|
71
|
+
const res = await runAllTimers(fetchSignedUrl('https://storage/x', { attempts: 3 }));
|
|
72
|
+
expect(res.status).toBe(503);
|
|
73
|
+
expect(fetchMock).toHaveBeenCalledTimes(3);
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it('throws the connection error after exhausting attempts', async () => {
|
|
77
|
+
const err = new TypeError('network down');
|
|
78
|
+
fetchMock.mockRejectedValue(err);
|
|
79
|
+
// Attach the rejection expectation before advancing timers to avoid an
|
|
80
|
+
// unhandled rejection while the backoff timer is pending.
|
|
81
|
+
const assertion = expect(fetchSignedUrl('https://storage/x', { attempts: 2 })).rejects.toThrow('network down');
|
|
82
|
+
await vi.runAllTimersAsync();
|
|
83
|
+
await assertion;
|
|
84
|
+
expect(fetchMock).toHaveBeenCalledTimes(2);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it('buffers a ReadableStream body so it can be replayed across retries', async () => {
|
|
88
|
+
const bodies: unknown[] = [];
|
|
89
|
+
fetchMock.mockImplementation((_url: string, init: RequestInit) => {
|
|
90
|
+
bodies.push(init.body);
|
|
91
|
+
return Promise.resolve(bodies.length < 2 ? response(503, 'retry') : response(200, 'ok'));
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const stream = streamOf(new TextEncoder().encode('hello'));
|
|
95
|
+
const res = await runAllTimers(
|
|
96
|
+
fetchSignedUrl('https://storage/x', { method: 'PUT', body: stream as unknown as BodyInit }),
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
expect(res.status).toBe(200);
|
|
100
|
+
expect(fetchMock).toHaveBeenCalledTimes(2);
|
|
101
|
+
// The stream was buffered into a replayable Blob, and the same instance was reused on retry.
|
|
102
|
+
expect(bodies[0]).toBeInstanceOf(Blob);
|
|
103
|
+
expect(bodies[0]).toBe(bodies[1]);
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it('buffers a string-chunk ReadableStream body without throwing (regression: non-Uint8Array chunk)', async () => {
|
|
107
|
+
const bodies: unknown[] = [];
|
|
108
|
+
fetchMock.mockImplementation((_url: string, init: RequestInit) => {
|
|
109
|
+
bodies.push(init.body);
|
|
110
|
+
return Promise.resolve(response(200, 'ok'));
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
// A web stream that yields *string* chunks — what `Readable.toWeb(Readable.from(text))`
|
|
114
|
+
// produces (NodeStreamSource wraps text bodies this way). `new Response(stream).blob()`
|
|
115
|
+
// rejects these under undici with "Received non-Uint8Array chunk"; the helper must
|
|
116
|
+
// encode them to bytes instead.
|
|
117
|
+
const stream = new ReadableStream<string>({
|
|
118
|
+
start(controller) {
|
|
119
|
+
controller.enqueue('hello ');
|
|
120
|
+
controller.enqueue('world');
|
|
121
|
+
controller.close();
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
const res = await runAllTimers(
|
|
126
|
+
fetchSignedUrl('https://storage/x', { method: 'PUT', body: stream as unknown as BodyInit }),
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
expect(res.status).toBe(200);
|
|
130
|
+
expect(bodies[0]).toBeInstanceOf(Blob);
|
|
131
|
+
expect(await (bodies[0] as Blob).text()).toBe('hello world');
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
it('buffers a mixed-chunk ReadableStream body, encoding strings and keeping bytes', async () => {
|
|
135
|
+
const bodies: unknown[] = [];
|
|
136
|
+
fetchMock.mockImplementation((_url: string, init: RequestInit) => {
|
|
137
|
+
bodies.push(init.body);
|
|
138
|
+
return Promise.resolve(response(200, 'ok'));
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
const stream = new ReadableStream<string | Uint8Array>({
|
|
142
|
+
start(controller) {
|
|
143
|
+
controller.enqueue('a');
|
|
144
|
+
controller.enqueue(new TextEncoder().encode('b'));
|
|
145
|
+
controller.close();
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
const res = await runAllTimers(
|
|
150
|
+
fetchSignedUrl('https://storage/x', { method: 'PUT', body: stream as unknown as BodyInit }),
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
expect(res.status).toBe(200);
|
|
154
|
+
expect(bodies[0]).toBeInstanceOf(Blob);
|
|
155
|
+
expect(await (bodies[0] as Blob).text()).toBe('ab');
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
it('throws on an object-mode stream chunk instead of silently corrupting the upload', async () => {
|
|
159
|
+
const stream = new ReadableStream<unknown>({
|
|
160
|
+
start(controller) {
|
|
161
|
+
controller.enqueue({ not: 'bytes' });
|
|
162
|
+
controller.close();
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
await expect(
|
|
167
|
+
fetchSignedUrl('https://storage/x', { method: 'PUT', body: stream as unknown as BodyInit }),
|
|
168
|
+
).rejects.toThrow(TypeError);
|
|
169
|
+
// The bad body is rejected before any network call is attempted.
|
|
170
|
+
expect(fetchMock).not.toHaveBeenCalled();
|
|
171
|
+
expect(stream.locked).toBe(false);
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
it('honors a numeric Retry-After header when scheduling the retry', async () => {
|
|
175
|
+
fetchMock
|
|
176
|
+
.mockResolvedValueOnce(response(503, 'slow down', { 'retry-after': '2' }))
|
|
177
|
+
.mockResolvedValueOnce(response(200, 'ok'));
|
|
178
|
+
const res = await runAllTimers(fetchSignedUrl('https://storage/x'));
|
|
179
|
+
expect(res.status).toBe(200);
|
|
180
|
+
expect(fetchMock).toHaveBeenCalledTimes(2);
|
|
181
|
+
});
|
|
182
|
+
});
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for transferring file content to/from cloud-storage signed URLs
|
|
3
|
+
* (GCS, S3, Azure Blob) with retry + backoff on transient failures.
|
|
4
|
+
*
|
|
5
|
+
* Signed-URL transfers go straight to the storage backend and therefore bypass
|
|
6
|
+
* the Vertesia API client (`AbstractFetchClient`), which means they normally get
|
|
7
|
+
* none of its retry policy. A single transient `503 Service Unavailable` from the
|
|
8
|
+
* storage backend would otherwise fail the whole upload/download. This helper
|
|
9
|
+
* restores retry behaviour for those storage hops.
|
|
10
|
+
*
|
|
11
|
+
* Note on streamed bodies: a `ReadableStream` body cannot be replayed once it has
|
|
12
|
+
* been consumed, so it is buffered into memory before the first attempt to make
|
|
13
|
+
* retries safe. Callers transferring very large streams should be aware of this
|
|
14
|
+
* memory cost.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/** HTTP statuses that storage backends return for transient, retryable conditions. */
|
|
18
|
+
const DEFAULT_RETRYABLE_STATUSES: ReadonlySet<number> = new Set([429, 500, 502, 503, 504]);
|
|
19
|
+
|
|
20
|
+
const DEFAULT_ATTEMPTS = 4;
|
|
21
|
+
const DEFAULT_BASE_DELAY_MS = 500;
|
|
22
|
+
const DEFAULT_MAX_DELAY_MS = 8_000;
|
|
23
|
+
|
|
24
|
+
export interface SignedUrlFetchOptions {
|
|
25
|
+
method?: string;
|
|
26
|
+
headers?: Record<string, string>;
|
|
27
|
+
body?: BodyInit | null;
|
|
28
|
+
/** Total number of attempts, including the first. Defaults to 4. */
|
|
29
|
+
attempts?: number;
|
|
30
|
+
/** Base delay for exponential backoff, in milliseconds. Defaults to 500. */
|
|
31
|
+
baseDelayMs?: number;
|
|
32
|
+
/** Upper bound for a single backoff delay, in milliseconds. Defaults to 8000. */
|
|
33
|
+
maxDelayMs?: number;
|
|
34
|
+
/** HTTP statuses to retry on. Defaults to 429, 500, 502, 503, 504. */
|
|
35
|
+
retryableStatuses?: ReadonlySet<number>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function sleep(ms: number): Promise<void> {
|
|
39
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function retryAfterMs(res: Response): number | undefined {
|
|
43
|
+
const header = res.headers.get('retry-after');
|
|
44
|
+
if (!header) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
const seconds = Number(header);
|
|
48
|
+
if (Number.isFinite(seconds) && seconds >= 0) {
|
|
49
|
+
return seconds * 1000;
|
|
50
|
+
}
|
|
51
|
+
const date = Date.parse(header);
|
|
52
|
+
if (!Number.isNaN(date)) {
|
|
53
|
+
return Math.max(0, date - Date.now());
|
|
54
|
+
}
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function backoffMs(attempt: number, baseDelayMs: number, maxDelayMs: number, res?: Response): number {
|
|
59
|
+
const retryAfter = res ? retryAfterMs(res) : undefined;
|
|
60
|
+
if (retryAfter !== undefined) {
|
|
61
|
+
return Math.min(maxDelayMs, retryAfter);
|
|
62
|
+
}
|
|
63
|
+
// Exponential backoff with full jitter.
|
|
64
|
+
const capped = Math.min(maxDelayMs, baseDelayMs * 2 ** attempt);
|
|
65
|
+
return Math.floor(Math.random() * capped);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const textEncoder = new TextEncoder();
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Normalize one `ReadableStream` chunk to a byte-backed `BlobPart`.
|
|
72
|
+
*
|
|
73
|
+
* A web stream produced from a Node `Readable.from(<string>)` (e.g. via
|
|
74
|
+
* `Readable.toWeb`, which `NodeStreamSource` uses) yields *string* chunks. Buffering
|
|
75
|
+
* such a stream with `new Response(stream).blob()` throws under undici with
|
|
76
|
+
* "TypeError: Received non-Uint8Array chunk", which breaks every signed-URL upload of
|
|
77
|
+
* a text/JSON body (extracted text previews, agent artifacts, tool storage). Encoding
|
|
78
|
+
* chunks ourselves keeps both string and binary bodies uploadable.
|
|
79
|
+
*/
|
|
80
|
+
function chunkToBlobPart(chunk: unknown): BlobPart {
|
|
81
|
+
if (typeof chunk === 'string') {
|
|
82
|
+
return textEncoder.encode(chunk);
|
|
83
|
+
}
|
|
84
|
+
if (chunk instanceof Blob) {
|
|
85
|
+
return chunk;
|
|
86
|
+
}
|
|
87
|
+
if (chunk instanceof ArrayBuffer) {
|
|
88
|
+
return new Uint8Array(chunk);
|
|
89
|
+
}
|
|
90
|
+
// Covers Uint8Array and every other typed-array / DataView view.
|
|
91
|
+
if (ArrayBuffer.isView(chunk)) {
|
|
92
|
+
return new Uint8Array(chunk.buffer as ArrayBuffer, chunk.byteOffset, chunk.byteLength);
|
|
93
|
+
}
|
|
94
|
+
// Fail loud rather than uploading e.g. "[object Object]" from an accidental
|
|
95
|
+
// object-mode stream — silently corrupting the stored content is worse than a clear error.
|
|
96
|
+
throw new TypeError(
|
|
97
|
+
`Unsupported signed-URL upload chunk of type "${typeof chunk}"; ` +
|
|
98
|
+
`body streams must yield string or binary (Uint8Array/ArrayBuffer/DataView/Blob) chunks.`,
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Buffer a `ReadableStream` body into a `Blob` so the request can be safely
|
|
104
|
+
* replayed across retries. Other body types (`Blob`/`File`, `ArrayBuffer`,
|
|
105
|
+
* typed arrays, strings, `URLSearchParams`) are already replayable and pass
|
|
106
|
+
* through unchanged.
|
|
107
|
+
*
|
|
108
|
+
* The stream is drained manually (rather than `new Response(stream).blob()`) so that
|
|
109
|
+
* string chunks are encoded to bytes — see {@link chunkToBlobPart}.
|
|
110
|
+
*/
|
|
111
|
+
async function toReplayableBody(body: BodyInit | null | undefined): Promise<BodyInit | undefined> {
|
|
112
|
+
if (body == null) {
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) {
|
|
116
|
+
const reader = (body as ReadableStream<unknown>).getReader();
|
|
117
|
+
const parts: BlobPart[] = [];
|
|
118
|
+
try {
|
|
119
|
+
for (;;) {
|
|
120
|
+
const { done, value } = await reader.read();
|
|
121
|
+
if (done) {
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
// Normalize every chunk (a stray null/undefined is rejected by
|
|
125
|
+
// chunkToBlobPart) so a malformed stream fails loudly instead of
|
|
126
|
+
// silently uploading a truncated body.
|
|
127
|
+
parts.push(chunkToBlobPart(value));
|
|
128
|
+
}
|
|
129
|
+
} catch (err) {
|
|
130
|
+
// Signal the producer to stop and release its resources before propagating.
|
|
131
|
+
await reader.cancel(err).catch(() => undefined);
|
|
132
|
+
throw err;
|
|
133
|
+
} finally {
|
|
134
|
+
reader.releaseLock();
|
|
135
|
+
}
|
|
136
|
+
return new Blob(parts);
|
|
137
|
+
}
|
|
138
|
+
return body;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* `fetch()` a cloud-storage signed URL, retrying transient failures (connection
|
|
143
|
+
* errors and retryable HTTP statuses) with exponential backoff. Honors a
|
|
144
|
+
* `Retry-After` response header when present.
|
|
145
|
+
*
|
|
146
|
+
* The returned `Response` is only guaranteed to be retried while it carries a
|
|
147
|
+
* retryable status; a non-retryable error response (e.g. 403, 404) is returned
|
|
148
|
+
* as-is for the caller to handle.
|
|
149
|
+
*/
|
|
150
|
+
export async function fetchSignedUrl(url: string, options: SignedUrlFetchOptions = {}): Promise<Response> {
|
|
151
|
+
const {
|
|
152
|
+
method = 'GET',
|
|
153
|
+
headers,
|
|
154
|
+
attempts = DEFAULT_ATTEMPTS,
|
|
155
|
+
baseDelayMs = DEFAULT_BASE_DELAY_MS,
|
|
156
|
+
maxDelayMs = DEFAULT_MAX_DELAY_MS,
|
|
157
|
+
retryableStatuses = DEFAULT_RETRYABLE_STATUSES,
|
|
158
|
+
} = options;
|
|
159
|
+
|
|
160
|
+
const body = await toReplayableBody(options.body);
|
|
161
|
+
|
|
162
|
+
let lastError: unknown;
|
|
163
|
+
for (let attempt = 0; attempt < attempts; attempt++) {
|
|
164
|
+
const isLastAttempt = attempt === attempts - 1;
|
|
165
|
+
try {
|
|
166
|
+
const res = await fetch(url, { method, headers, body });
|
|
167
|
+
if (res.ok || !retryableStatuses.has(res.status) || isLastAttempt) {
|
|
168
|
+
return res;
|
|
169
|
+
}
|
|
170
|
+
// Retryable status: drain the body so the connection can be reused, then back off.
|
|
171
|
+
await res.body?.cancel().catch(() => undefined);
|
|
172
|
+
await sleep(backoffMs(attempt, baseDelayMs, maxDelayMs, res));
|
|
173
|
+
} catch (err) {
|
|
174
|
+
lastError = err;
|
|
175
|
+
if (isLastAttempt) {
|
|
176
|
+
throw err;
|
|
177
|
+
}
|
|
178
|
+
await sleep(backoffMs(attempt, baseDelayMs, maxDelayMs));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// Unreachable: the loop always returns a Response or throws on the last attempt.
|
|
183
|
+
throw lastError instanceof Error ? lastError : new Error(`Failed to fetch signed URL: ${url}`);
|
|
184
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type AgentMessage, AgentMessageType, type CompactMessage } from '@vertesia/common';
|
|
2
|
+
import { describe, expect, it } from 'vitest';
|
|
3
|
+
import { shouldCloseAgentRunStream, shouldCloseCompactRunStream } from './stream-termination.js';
|
|
4
|
+
|
|
5
|
+
describe('stream termination', () => {
|
|
6
|
+
const rootRunId = 'root-run';
|
|
7
|
+
|
|
8
|
+
it('closes agent streams on the root run completion', () => {
|
|
9
|
+
const message: AgentMessage = {
|
|
10
|
+
type: AgentMessageType.COMPLETE,
|
|
11
|
+
timestamp: Date.now(),
|
|
12
|
+
workflow_run_id: rootRunId,
|
|
13
|
+
message: 'root complete',
|
|
14
|
+
workstream_id: 'main',
|
|
15
|
+
details: {
|
|
16
|
+
process_run_id: rootRunId,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
expect(shouldCloseAgentRunStream(message, rootRunId)).toBe(true);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('keeps agent streams open for child process completion on main', () => {
|
|
24
|
+
const message: AgentMessage = {
|
|
25
|
+
type: AgentMessageType.COMPLETE,
|
|
26
|
+
timestamp: Date.now(),
|
|
27
|
+
workflow_run_id: rootRunId,
|
|
28
|
+
message: 'child complete',
|
|
29
|
+
workstream_id: 'main',
|
|
30
|
+
details: {
|
|
31
|
+
process_run_id: 'child-run',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
expect(shouldCloseAgentRunStream(message, rootRunId)).toBe(false);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('keeps compact streams open for child process completion on main', () => {
|
|
39
|
+
const message: CompactMessage = {
|
|
40
|
+
t: AgentMessageType.COMPLETE,
|
|
41
|
+
m: 'child complete',
|
|
42
|
+
d: {
|
|
43
|
+
process_run_id: 'child-run',
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
expect(shouldCloseCompactRunStream(message, rootRunId)).toBe(false);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('still closes streams for main completion without process metadata', () => {
|
|
51
|
+
const message: CompactMessage = {
|
|
52
|
+
t: AgentMessageType.COMPLETE,
|
|
53
|
+
m: 'conversation complete',
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
expect(shouldCloseCompactRunStream(message, rootRunId)).toBe(true);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type AgentMessage, AgentMessageType, type CompactMessage } from '@vertesia/common';
|
|
2
|
+
|
|
3
|
+
type MessageDetails = AgentMessage['details'] | CompactMessage['d'];
|
|
4
|
+
|
|
5
|
+
function readProcessRunId(details: MessageDetails): string | undefined {
|
|
6
|
+
if (!details || typeof details !== 'object') {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
const value = (details as { process_run_id?: unknown }).process_run_id;
|
|
10
|
+
return typeof value === 'string' ? value : undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function isRootProcessMessage(details: MessageDetails, rootRunId: string): boolean {
|
|
14
|
+
const processRunId = readProcessRunId(details);
|
|
15
|
+
return !processRunId || processRunId === rootRunId;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function shouldCloseAgentRunStream(message: AgentMessage, rootRunId: string): boolean {
|
|
19
|
+
if (message.type === AgentMessageType.TERMINATED) {
|
|
20
|
+
return isRootProcessMessage(message.details, rootRunId);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (message.type === AgentMessageType.COMPLETE && (message.workstream_id ?? 'main') === 'main') {
|
|
24
|
+
return isRootProcessMessage(message.details, rootRunId);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function shouldCloseCompactRunStream(message: CompactMessage, rootRunId: string): boolean {
|
|
31
|
+
if (message.t === AgentMessageType.TERMINATED) {
|
|
32
|
+
return isRootProcessMessage(message.d, rootRunId);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (message.t === AgentMessageType.COMPLETE && (message.w ?? 'main') === 'main') {
|
|
36
|
+
return isRootProcessMessage(message.d, rootRunId);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return false;
|
|
40
|
+
}
|
package/src/store/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '20260319' // YYYYMMDD, client versioning for API endpoints. Increment manually for breaking changes
|
|
1
|
+
export const VERSION = '20260319'; // YYYYMMDD, client versioning for API endpoints. Increment manually for breaking changes
|
|
2
2
|
export const VERSION_HEADER = 'x-api-version';
|