@vertesia/client 1.2.0 → 1.3.0-dev.20260620.091720Z
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/README.md +29 -0
- 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 +58 -0
- package/lib/IamApi.d.ts.map +1 -0
- package/lib/IamApi.js +76 -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} +11 -7
- package/lib/RunsApi.d.ts.map +1 -0
- package/lib/{esm/RunsApi.js → RunsApi.js} +14 -12
- 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} +55 -27
- package/lib/client.d.ts.map +1 -0
- package/lib/{esm/client.js → client.js} +113 -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} +29 -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 +60 -9
- package/lib/store/AgentsApi.d.ts.map +1 -0
- package/lib/{esm/store → store}/AgentsApi.js +174 -53
- 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 +62 -52
- package/lib/store/WorkflowsApi.js.map +1 -0
- package/lib/store/client.d.ts +62 -0
- package/lib/store/client.d.ts.map +1 -0
- package/lib/store/client.js +106 -0
- 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 +21 -0
- package/lib/store/index.d.ts.map +1 -0
- package/lib/store/index.js +21 -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 +2 -0
- package/lib/store/version.d.ts.map +1 -0
- package/lib/{esm/store → store}/version.js +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 +26 -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 +56 -22
- 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 +25 -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 +160 -103
- package/src/execute.ts +60 -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 +308 -148
- 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 +158 -152
- package/src/store/client.ts +58 -39
- package/src/store/errors.ts +3 -3
- package/src/store/index.ts +20 -18
- package/src/store/signed-url.test.ts +182 -0
- package/src/store/signed-url.ts +184 -0
- package/src/store/stream-gap.test.ts +230 -0
- package/src/store/stream-termination.test.ts +58 -0
- package/src/store/stream-termination.ts +40 -0
- package/src/store/version.ts +2 -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 +0 -89
- 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/src/client.ts
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import { AbstractFetchClient } from
|
|
2
|
-
import { AuthTokenPayload, AuthTokenResponse } from
|
|
3
|
-
import AccountApi from
|
|
4
|
-
import AccountsApi from
|
|
5
|
-
import AnalyticsApi from
|
|
6
|
-
import { ApiKeysApi } from
|
|
7
|
-
import AppsApi from
|
|
8
|
-
import AuditTrailApi from
|
|
9
|
-
import CommandsApi from
|
|
10
|
-
import EnvironmentsApi from
|
|
11
|
-
import { IamApi } from
|
|
12
|
-
import InteractionsApi from
|
|
13
|
-
import OAuthClientsApi from
|
|
14
|
-
import OAuthGrantsApi from
|
|
15
|
-
import OAuthProvidersApi from
|
|
16
|
-
import OAuthServerApi from
|
|
17
|
-
import ProjectsApi from
|
|
18
|
-
import PromptsApi from
|
|
19
|
-
import { RefsApi } from
|
|
20
|
-
import RemoteMcpConnectionsApi from
|
|
21
|
-
import { RunsApi } from
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
|
|
1
|
+
import { AbstractFetchClient, type FETCH_FN, type IRequestRetryPolicy } from '@vertesia/api-fetch-client';
|
|
2
|
+
import { APP_VERSION_HEADER, type AuthTokenPayload, type AuthTokenResponse } from '@vertesia/common';
|
|
3
|
+
import AccountApi from './AccountApi.js';
|
|
4
|
+
import AccountsApi from './AccountsApi.js';
|
|
5
|
+
import AnalyticsApi from './AnalyticsApi.js';
|
|
6
|
+
import { ApiKeysApi } from './ApiKeysApi.js';
|
|
7
|
+
import AppsApi from './AppsApi.js';
|
|
8
|
+
import AuditTrailApi from './AuditTrailApi.js';
|
|
9
|
+
import CommandsApi from './CommandsApi.js';
|
|
10
|
+
import EnvironmentsApi from './EnvironmentsApi.js';
|
|
11
|
+
import { IamApi } from './IamApi.js';
|
|
12
|
+
import InteractionsApi from './InteractionsApi.js';
|
|
13
|
+
import OAuthClientsApi from './OAuthClientsApi.js';
|
|
14
|
+
import OAuthGrantsApi from './OAuthGrantsApi.js';
|
|
15
|
+
import OAuthProvidersApi from './OAuthProvidersApi.js';
|
|
16
|
+
import OAuthServerApi from './OAuthServerApi.js';
|
|
17
|
+
import ProjectsApi from './ProjectsApi.js';
|
|
18
|
+
import PromptsApi from './PromptsApi.js';
|
|
19
|
+
import { RefsApi } from './RefsApi.js';
|
|
20
|
+
import RemoteMcpConnectionsApi from './RemoteMcpConnectionsApi.js';
|
|
21
|
+
import { RunsApi } from './RunsApi.js';
|
|
22
|
+
import SecretsApi from './SecretsApi.js';
|
|
23
|
+
import SkillsApi from './SkillsApi.js';
|
|
24
|
+
import { ZenoClient } from './store/client.js';
|
|
25
|
+
import { VERSION, VERSION_HEADER } from './store/version.js';
|
|
26
|
+
import ToolsApi from './ToolsApi.js';
|
|
27
|
+
import TrainingApi from './TrainingApi.js';
|
|
28
|
+
import UsersApi from './UsersApi.js';
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* 1 min threshold constant in ms
|
|
@@ -45,15 +46,16 @@ export type VertesiaClientProps = {
|
|
|
45
46
|
* @since 0.52.0
|
|
46
47
|
*/
|
|
47
48
|
site?:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
| 'api.vertesia.io'
|
|
50
|
+
| 'api-preview.vertesia.io'
|
|
51
|
+
| 'api.us1.vertesia.io'
|
|
52
|
+
| 'api-preview.us1.vertesia.io'
|
|
53
|
+
| 'api.eu1.vertesia.io'
|
|
54
|
+
| 'api-preview.eu1.vertesia.io'
|
|
55
|
+
| 'api.jp1.vertesia.io'
|
|
56
|
+
| 'api-preview.jp1.vertesia.io'
|
|
57
|
+
| 'api.dev1.vertesia.io'
|
|
58
|
+
| 'api-preview.dev1.vertesia.io';
|
|
57
59
|
serverUrl?: string;
|
|
58
60
|
storeUrl?: string;
|
|
59
61
|
tokenServerUrl?: string;
|
|
@@ -62,6 +64,14 @@ export type VertesiaClientProps = {
|
|
|
62
64
|
sessionTags?: string | string[];
|
|
63
65
|
onRequest?: (request: Request) => void;
|
|
64
66
|
onResponse?: (response: Response) => void;
|
|
67
|
+
retryPolicy?: IRequestRetryPolicy;
|
|
68
|
+
/**
|
|
69
|
+
* Default request timeout in ms applied to every request (studio + store) unless overridden
|
|
70
|
+
* per-request via `timeoutMs`. `false`/`null`/`0` disables it. Aborts the whole request
|
|
71
|
+
* (connection + headers + body) via AbortSignal — browser + Node safe.
|
|
72
|
+
*/
|
|
73
|
+
timeout?: number | false | null;
|
|
74
|
+
fetch?: FETCH_FN | Promise<FETCH_FN>;
|
|
65
75
|
};
|
|
66
76
|
|
|
67
77
|
export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
@@ -90,6 +100,7 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
90
100
|
oauthServer: OAuthServerApi;
|
|
91
101
|
oauthProviders: OAuthProvidersApi;
|
|
92
102
|
remoteMcpConnections: RemoteMcpConnectionsApi;
|
|
103
|
+
secrets: SecretsApi;
|
|
93
104
|
|
|
94
105
|
/**
|
|
95
106
|
* Create a client from the given token.
|
|
@@ -102,7 +113,7 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
102
113
|
static async fromAuthToken(
|
|
103
114
|
token: string,
|
|
104
115
|
payload?: AuthTokenPayload,
|
|
105
|
-
endpoints?: { studio: string; store: string; token?: string }
|
|
116
|
+
endpoints?: { studio: string; store: string; token?: string; git?: string },
|
|
106
117
|
) {
|
|
107
118
|
if (!payload) {
|
|
108
119
|
payload = decodeJWT(token);
|
|
@@ -116,11 +127,11 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
116
127
|
}).withApiKey(token);
|
|
117
128
|
}
|
|
118
129
|
|
|
119
|
-
static decodeEndpoints() {
|
|
130
|
+
static decodeEndpoints() {}
|
|
120
131
|
|
|
121
132
|
constructor(
|
|
122
133
|
opts: VertesiaClientProps = {
|
|
123
|
-
site:
|
|
134
|
+
site: 'api.vertesia.io',
|
|
124
135
|
},
|
|
125
136
|
) {
|
|
126
137
|
let studioServerUrl: string;
|
|
@@ -131,9 +142,7 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
131
142
|
} else if (opts.site) {
|
|
132
143
|
studioServerUrl = `https://${opts.site}`;
|
|
133
144
|
} else {
|
|
134
|
-
throw new Error(
|
|
135
|
-
"Parameter 'site' or 'serverUrl' is required for VertesiaClient",
|
|
136
|
-
);
|
|
145
|
+
throw new Error("Parameter 'site' or 'serverUrl' is required for VertesiaClient");
|
|
137
146
|
}
|
|
138
147
|
|
|
139
148
|
if (opts.storeUrl) {
|
|
@@ -141,12 +150,10 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
141
150
|
} else if (opts.site) {
|
|
142
151
|
zenoServerUrl = `https://${opts.site}`;
|
|
143
152
|
} else {
|
|
144
|
-
throw new Error(
|
|
145
|
-
"Parameter 'site' or 'storeUrl' is required for VertesiaClient",
|
|
146
|
-
);
|
|
153
|
+
throw new Error("Parameter 'site' or 'storeUrl' is required for VertesiaClient");
|
|
147
154
|
}
|
|
148
155
|
|
|
149
|
-
super(studioServerUrl);
|
|
156
|
+
super(studioServerUrl, opts.fetch);
|
|
150
157
|
|
|
151
158
|
if (opts.tokenServerUrl) {
|
|
152
159
|
this.tokenServerUrl = opts.tokenServerUrl;
|
|
@@ -162,10 +169,10 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
162
169
|
this.tokenServerUrl = `https://${stsHost}`;
|
|
163
170
|
} else if (opts.serverUrl || opts.storeUrl) {
|
|
164
171
|
// Determine STS URL based on environment in serverUrl or storeUrl
|
|
165
|
-
const urlToCheck = opts.serverUrl || opts.storeUrl ||
|
|
172
|
+
const urlToCheck = opts.serverUrl || opts.storeUrl || '';
|
|
166
173
|
try {
|
|
167
174
|
const url = new URL(urlToCheck);
|
|
168
|
-
if (url.hostname.startsWith(
|
|
175
|
+
if (url.hostname.startsWith('api')) {
|
|
169
176
|
// Strip -preview and replace api with sts.
|
|
170
177
|
// api.us1.vertesia.io -> sts.us1.vertesia.io
|
|
171
178
|
// api-preview.us1.vertesia.io -> sts.us1.vertesia.io
|
|
@@ -173,13 +180,13 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
173
180
|
const stsHost = url.hostname.replace('api-preview.', 'api.').replace(/^api/, 'sts');
|
|
174
181
|
this.tokenServerUrl = `https://${stsHost}`;
|
|
175
182
|
} else {
|
|
176
|
-
this.tokenServerUrl =
|
|
183
|
+
this.tokenServerUrl = 'https://sts.dev1.vertesia.io';
|
|
177
184
|
}
|
|
178
|
-
} catch
|
|
179
|
-
this.tokenServerUrl =
|
|
185
|
+
} catch {
|
|
186
|
+
this.tokenServerUrl = 'https://sts.dev1.vertesia.io';
|
|
180
187
|
}
|
|
181
188
|
} else {
|
|
182
|
-
this.tokenServerUrl =
|
|
189
|
+
this.tokenServerUrl = 'https://sts.dev1.vertesia.io';
|
|
183
190
|
}
|
|
184
191
|
|
|
185
192
|
this.store = new ZenoClient({
|
|
@@ -188,10 +195,21 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
188
195
|
apikey: opts.apikey,
|
|
189
196
|
onRequest: opts.onRequest,
|
|
190
197
|
onResponse: opts.onResponse,
|
|
198
|
+
retryPolicy: opts.retryPolicy,
|
|
199
|
+
timeout: opts.timeout,
|
|
200
|
+
fetch: opts.fetch,
|
|
191
201
|
});
|
|
192
202
|
|
|
203
|
+
if (opts.retryPolicy) {
|
|
204
|
+
this.withRetryPolicy(opts.retryPolicy);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (opts.timeout !== undefined) {
|
|
208
|
+
this.withTimeout(opts.timeout);
|
|
209
|
+
}
|
|
210
|
+
|
|
193
211
|
if (opts.apikey) {
|
|
194
|
-
this.withApiKey(opts.apikey);
|
|
212
|
+
void this.withApiKey(opts.apikey);
|
|
195
213
|
}
|
|
196
214
|
|
|
197
215
|
this.onRequest = opts.onRequest;
|
|
@@ -199,9 +217,10 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
199
217
|
this.sessionTags = opts.sessionTags;
|
|
200
218
|
this.oauthClients = new OAuthClientsApi(this);
|
|
201
219
|
this.oauthGrants = new OAuthGrantsApi(this);
|
|
202
|
-
this.oauthServer = new OAuthServerApi(this);
|
|
220
|
+
this.oauthServer = new OAuthServerApi(this, this.tokenServerUrl);
|
|
203
221
|
this.oauthProviders = new OAuthProvidersApi(this);
|
|
204
222
|
this.remoteMcpConnections = new RemoteMcpConnectionsApi(this);
|
|
223
|
+
this.secrets = new SecretsApi(this);
|
|
205
224
|
}
|
|
206
225
|
|
|
207
226
|
withApiVersion(version: string | number | null) {
|
|
@@ -213,6 +232,20 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
213
232
|
return this;
|
|
214
233
|
}
|
|
215
234
|
|
|
235
|
+
/**
|
|
236
|
+
* Pin the app version this client's requests resolve against. A generated app's UI sets this from
|
|
237
|
+
* its build-time `VITE_APP_VERSION` so studio/zeno resolve its `app:<app>:…` refs against that
|
|
238
|
+
* published version (candidate testing) instead of current. Pass null/empty to clear (→ current).
|
|
239
|
+
*/
|
|
240
|
+
withAppVersion(version: string | null | undefined) {
|
|
241
|
+
if (!version) {
|
|
242
|
+
delete this.headers[APP_VERSION_HEADER];
|
|
243
|
+
} else {
|
|
244
|
+
this.headers[APP_VERSION_HEADER] = String(version);
|
|
245
|
+
}
|
|
246
|
+
return this;
|
|
247
|
+
}
|
|
248
|
+
|
|
216
249
|
/**
|
|
217
250
|
* Overwrite to keep store and composable clients synchronized on the auth callback
|
|
218
251
|
* @param authCb
|
|
@@ -223,20 +256,30 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
223
256
|
return super.withAuthCallback(authCb);
|
|
224
257
|
}
|
|
225
258
|
|
|
259
|
+
withRetryPolicy(policy?: IRequestRetryPolicy | null) {
|
|
260
|
+
this.store.withRetryPolicy(policy);
|
|
261
|
+
return super.withRetryPolicy(policy);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
withTimeout(timeoutMs?: number | false | null) {
|
|
265
|
+
this.store.withTimeout(timeoutMs);
|
|
266
|
+
return super.withTimeout(timeoutMs);
|
|
267
|
+
}
|
|
268
|
+
|
|
226
269
|
async withApiKey(apiKey: string | null) {
|
|
227
270
|
return this.withAuthCallback(
|
|
228
271
|
apiKey
|
|
229
272
|
? async () => {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
273
|
+
if (!isApiKey(apiKey)) {
|
|
274
|
+
return `Bearer ${apiKey}`;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (isTokenExpired(this._jwt)) {
|
|
278
|
+
const jwt = await this.getAuthToken(apiKey);
|
|
279
|
+
this._jwt = jwt.token;
|
|
280
|
+
}
|
|
281
|
+
return `Bearer ${this._jwt}`;
|
|
282
|
+
}
|
|
240
283
|
: undefined,
|
|
241
284
|
);
|
|
242
285
|
}
|
|
@@ -246,7 +289,7 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
246
289
|
const auth = await this._auth();
|
|
247
290
|
if (!this._jwt) {
|
|
248
291
|
// the _jwt may be set by the auth callback
|
|
249
|
-
this._jwt = auth.trim().split(
|
|
292
|
+
this._jwt = auth.trim().split(' ')[1]; // remove Bearer prefix
|
|
250
293
|
}
|
|
251
294
|
}
|
|
252
295
|
return this._jwt || null;
|
|
@@ -292,6 +335,14 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
292
335
|
return this.store.files;
|
|
293
336
|
}
|
|
294
337
|
|
|
338
|
+
get processes() {
|
|
339
|
+
return this.store.processes;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
get tasks() {
|
|
343
|
+
return this.store.tasks;
|
|
344
|
+
}
|
|
345
|
+
|
|
295
346
|
/**
|
|
296
347
|
* Alias for store.types
|
|
297
348
|
*/
|
|
@@ -317,29 +368,30 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
317
368
|
* @returns AuthTokenResponse
|
|
318
369
|
*/
|
|
319
370
|
async getAuthToken(token?: string): Promise<AuthTokenResponse> {
|
|
320
|
-
|
|
321
|
-
|
|
371
|
+
// Route through the base client (absolute URL) so the call benefits from the
|
|
372
|
+
// retry policy. The default retry methods exclude POST as non-idempotent, but
|
|
373
|
+
// /token/issue is safe to retry, so we opt POST in explicitly for this request.
|
|
374
|
+
return this.post<AuthTokenResponse>(`${this.tokenServerUrl}/token/issue`, {
|
|
322
375
|
headers: {
|
|
323
|
-
|
|
324
|
-
|
|
376
|
+
'content-type': 'application/json',
|
|
377
|
+
authorization: `Bearer ${token}`,
|
|
325
378
|
},
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
});
|
|
379
|
+
retryPolicy: {
|
|
380
|
+
attempts: 4,
|
|
381
|
+
methods: ['POST'],
|
|
382
|
+
statuses: [429, 500, 502, 503, 504],
|
|
383
|
+
},
|
|
384
|
+
}).catch((error) => {
|
|
385
|
+
console.error(`Error fetching token from ${this.tokenServerUrl}:`, { error });
|
|
386
|
+
throw error;
|
|
387
|
+
});
|
|
336
388
|
}
|
|
337
389
|
|
|
338
390
|
get initialHeaders() {
|
|
339
391
|
return {
|
|
340
392
|
...super.initialHeaders,
|
|
341
|
-
[VERSION_HEADER]: VERSION
|
|
342
|
-
}
|
|
393
|
+
[VERSION_HEADER]: VERSION,
|
|
394
|
+
};
|
|
343
395
|
}
|
|
344
396
|
|
|
345
397
|
projects = new ProjectsApi(this);
|
|
@@ -359,13 +411,18 @@ export class VertesiaClient extends AbstractFetchClient<VertesiaClient> {
|
|
|
359
411
|
refs = new RefsApi(this);
|
|
360
412
|
commands = new CommandsApi(this);
|
|
361
413
|
apps = new AppsApi(this);
|
|
414
|
+
tools = new ToolsApi(this);
|
|
362
415
|
}
|
|
363
416
|
|
|
364
417
|
function isApiKey(apiKey: string) {
|
|
365
|
-
return apiKey.startsWith(
|
|
418
|
+
return apiKey.startsWith('pk-') || apiKey.startsWith('sk-');
|
|
366
419
|
}
|
|
367
420
|
|
|
368
|
-
|
|
421
|
+
/**
|
|
422
|
+
* Returns true when the token should be refreshed: either missing, or within
|
|
423
|
+
* EXPIRATION_THRESHOLD of its `exp` claim, or already expired. Exported for tests.
|
|
424
|
+
*/
|
|
425
|
+
export function isTokenExpired(token: string | null) {
|
|
369
426
|
if (!token) {
|
|
370
427
|
return true;
|
|
371
428
|
}
|
|
@@ -373,11 +430,11 @@ function isTokenExpired(token: string | null) {
|
|
|
373
430
|
const decoded = decodeJWT(token);
|
|
374
431
|
const exp = decoded.exp;
|
|
375
432
|
const currentTime = Date.now();
|
|
376
|
-
return currentTime
|
|
433
|
+
return currentTime >= exp * 1000 - EXPIRATION_THRESHOLD;
|
|
377
434
|
}
|
|
378
435
|
|
|
379
436
|
export function decodeJWT(jwt: string): AuthTokenPayload {
|
|
380
|
-
const payloadBase64 = jwt.split(
|
|
437
|
+
const payloadBase64 = jwt.split('.')[1];
|
|
381
438
|
const decodedJson = base64UrlDecode(payloadBase64);
|
|
382
439
|
return JSON.parse(decodedJson);
|
|
383
440
|
}
|
|
@@ -387,7 +444,10 @@ type RuntimeProcess = {
|
|
|
387
444
|
};
|
|
388
445
|
|
|
389
446
|
type RuntimeBuffer = {
|
|
390
|
-
from(
|
|
447
|
+
from(
|
|
448
|
+
input: string,
|
|
449
|
+
encoding: string,
|
|
450
|
+
): {
|
|
391
451
|
toString(encoding: string): string;
|
|
392
452
|
};
|
|
393
453
|
};
|
|
@@ -404,36 +464,31 @@ function getRuntimeStsUrl() {
|
|
|
404
464
|
function base64UrlDecode(input: string): string {
|
|
405
465
|
// Convert base64url to base64
|
|
406
466
|
const base64 = input
|
|
407
|
-
.replace(/-/g,
|
|
408
|
-
.replace(/_/g,
|
|
467
|
+
.replace(/-/g, '+')
|
|
468
|
+
.replace(/_/g, '/')
|
|
409
469
|
// Pad with '=' to make length a multiple of 4
|
|
410
|
-
.padEnd(Math.ceil(input.length / 4) * 4,
|
|
470
|
+
.padEnd(Math.ceil(input.length / 4) * 4, '=');
|
|
411
471
|
|
|
412
472
|
const runtimeBuffer = getRuntimeBuffer();
|
|
413
473
|
if (runtimeBuffer) {
|
|
414
474
|
// Node.js
|
|
415
|
-
return runtimeBuffer.from(base64,
|
|
416
|
-
} else if (
|
|
417
|
-
typeof atob !== "undefined" &&
|
|
418
|
-
typeof TextDecoder !== "undefined"
|
|
419
|
-
) {
|
|
475
|
+
return runtimeBuffer.from(base64, 'base64').toString('utf-8');
|
|
476
|
+
} else if (typeof atob !== 'undefined' && typeof TextDecoder !== 'undefined') {
|
|
420
477
|
// Browser
|
|
421
478
|
const binary = atob(base64);
|
|
422
479
|
const bytes = Uint8Array.from(binary, (c) => c.charCodeAt(0));
|
|
423
480
|
// decode to utf8
|
|
424
481
|
return new TextDecoder().decode(bytes);
|
|
425
482
|
} else {
|
|
426
|
-
throw new Error(
|
|
483
|
+
throw new Error('No base64 decoder available');
|
|
427
484
|
}
|
|
428
485
|
}
|
|
429
486
|
|
|
430
|
-
export function decodeEndpoints(
|
|
431
|
-
endpoints: string | Record<string, string> | undefined,
|
|
432
|
-
): Record<string, string> {
|
|
487
|
+
export function decodeEndpoints(endpoints: string | Record<string, string> | undefined): Record<string, string> {
|
|
433
488
|
if (!endpoints) {
|
|
434
|
-
return getEndpointsFromDomain(
|
|
489
|
+
return getEndpointsFromDomain('api.vertesia.io');
|
|
435
490
|
}
|
|
436
|
-
if (typeof endpoints ===
|
|
491
|
+
if (typeof endpoints === 'string') {
|
|
437
492
|
return getEndpointsFromDomain(endpoints);
|
|
438
493
|
} else {
|
|
439
494
|
return endpoints;
|
|
@@ -441,11 +496,12 @@ export function decodeEndpoints(
|
|
|
441
496
|
}
|
|
442
497
|
|
|
443
498
|
function getEndpointsFromDomain(domain: string) {
|
|
444
|
-
if (domain ===
|
|
499
|
+
if (domain === 'local') {
|
|
445
500
|
return {
|
|
446
501
|
studio: `http://localhost:8091`,
|
|
447
502
|
store: `http://localhost:8092`,
|
|
448
|
-
token: getRuntimeStsUrl() ??
|
|
503
|
+
token: getRuntimeStsUrl() ?? 'https://sts.dev1.vertesia.io',
|
|
504
|
+
git: 'https://git.dev1.vertesia.io',
|
|
449
505
|
};
|
|
450
506
|
} else {
|
|
451
507
|
const url = `https://${domain}`;
|
|
@@ -454,7 +510,8 @@ function getEndpointsFromDomain(domain: string) {
|
|
|
454
510
|
return {
|
|
455
511
|
studio: url,
|
|
456
512
|
store: url,
|
|
457
|
-
token: url.replace(
|
|
513
|
+
token: url.replace('api', 'sts'),
|
|
514
|
+
git: url.replace('api', 'git'),
|
|
458
515
|
};
|
|
459
516
|
}
|
|
460
517
|
}
|
package/src/execute.ts
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
type AsyncExecutionPayload,
|
|
3
|
+
type AsyncExecutionResult,
|
|
4
|
+
ExecutionRunStatus,
|
|
5
|
+
type InteractionExecutionPayload,
|
|
6
|
+
type InteractionExecutionResult,
|
|
7
|
+
type NamedInteractionExecutionPayload,
|
|
8
|
+
type RateLimitRequestPayload,
|
|
9
|
+
type RateLimitRequestResponse,
|
|
10
|
+
} from '@vertesia/common';
|
|
11
|
+
import type { VertesiaClient } from './client.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Client-side timeout for a synchronous (non-streaming) interaction execution. The request blocks on
|
|
15
|
+
* studio-server until the model finishes — and the LLM (e.g. image generation) can legitimately take
|
|
16
|
+
* minutes — so the per-request timeout here is long, overriding any short client default. Override
|
|
17
|
+
* via the VERTESIA_INTERACTION_TIMEOUT_MS env var.
|
|
18
|
+
*/
|
|
19
|
+
const INTERACTION_EXECUTION_TIMEOUT_MS = (() => {
|
|
20
|
+
const raw = typeof process !== 'undefined' ? process.env?.VERTESIA_INTERACTION_TIMEOUT_MS : undefined;
|
|
21
|
+
const parsed = raw ? Number.parseInt(raw, 10) : NaN;
|
|
22
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : 30 * 60 * 1000; // 30 minutes
|
|
23
|
+
})();
|
|
3
24
|
|
|
4
25
|
export async function EventSourceProvider(): Promise<typeof EventSource> {
|
|
5
26
|
if (typeof globalThis.EventSource === 'function') {
|
|
@@ -19,14 +40,23 @@ export async function EventSourceProvider(): Promise<typeof EventSource> {
|
|
|
19
40
|
* @param payload InteractionExecutionPayload
|
|
20
41
|
* @param onChunk callback to be called when the next chunk of the response is available
|
|
21
42
|
*/
|
|
22
|
-
export async function executeInteraction<P =
|
|
43
|
+
export async function executeInteraction<P = unknown>(
|
|
44
|
+
client: VertesiaClient,
|
|
23
45
|
interactionId: string,
|
|
24
46
|
payload: InteractionExecutionPayload = {},
|
|
25
|
-
onChunk?: (chunk: string) => void
|
|
47
|
+
onChunk?: (chunk: string) => void,
|
|
48
|
+
): Promise<InteractionExecutionResult<P>> {
|
|
26
49
|
const stream = !!onChunk;
|
|
27
|
-
const response = await client.runs.create(
|
|
28
|
-
|
|
29
|
-
|
|
50
|
+
const response = (await client.runs.create(
|
|
51
|
+
{
|
|
52
|
+
...payload,
|
|
53
|
+
interaction: interactionId,
|
|
54
|
+
stream,
|
|
55
|
+
},
|
|
56
|
+
// Synchronous interaction execution blocks on the model; keep a long client timeout.
|
|
57
|
+
// (Streaming returns the run immediately, then streams over a separate channel — see below.)
|
|
58
|
+
{ timeoutMs: stream ? undefined : INTERACTION_EXECUTION_TIMEOUT_MS },
|
|
59
|
+
)) as unknown as InteractionExecutionResult<P>;
|
|
30
60
|
if (stream) {
|
|
31
61
|
if (response.status === ExecutionRunStatus.failed) {
|
|
32
62
|
return response;
|
|
@@ -52,17 +82,21 @@ export async function executeInteraction<P = any>(client: VertesiaClient,
|
|
|
52
82
|
* @param onChunk
|
|
53
83
|
* @returns
|
|
54
84
|
*/
|
|
55
|
-
export async function executeInteractionByName<P =
|
|
85
|
+
export async function executeInteractionByName<P = unknown>(
|
|
86
|
+
client: VertesiaClient,
|
|
56
87
|
interaction: string,
|
|
57
88
|
payload: InteractionExecutionPayload = {},
|
|
58
|
-
onChunk?: (chunk: string) => void
|
|
89
|
+
onChunk?: (chunk: string) => void,
|
|
90
|
+
): Promise<InteractionExecutionResult<P>> {
|
|
59
91
|
const stream = !!onChunk;
|
|
60
|
-
const response = await client.post('/api/v1/execute', {
|
|
92
|
+
const response = await client.post<InteractionExecutionResult<P>>('/api/v1/execute', {
|
|
61
93
|
payload: {
|
|
62
94
|
...payload,
|
|
63
95
|
interaction,
|
|
64
|
-
stream
|
|
96
|
+
stream,
|
|
65
97
|
} as NamedInteractionExecutionPayload,
|
|
98
|
+
// Synchronous interaction execution blocks on the model; keep a long client timeout.
|
|
99
|
+
timeoutMs: stream ? undefined : INTERACTION_EXECUTION_TIMEOUT_MS,
|
|
66
100
|
});
|
|
67
101
|
if (stream) {
|
|
68
102
|
if (response.status === ExecutionRunStatus.failed) {
|
|
@@ -75,10 +109,10 @@ export async function executeInteractionByName<P = any>(client: VertesiaClient,
|
|
|
75
109
|
|
|
76
110
|
function handleStreaming(client: VertesiaClient, runId: string, onChunk: (chunk: string) => void) {
|
|
77
111
|
return new Promise((resolve, reject) => {
|
|
78
|
-
(async () => {
|
|
112
|
+
void (async () => {
|
|
79
113
|
try {
|
|
80
114
|
const EventSourceImpl = await EventSourceProvider();
|
|
81
|
-
const streamUrl = new URL(client.runs.baseUrl
|
|
115
|
+
const streamUrl = new URL(`${client.runs.baseUrl}/${runId}/stream`);
|
|
82
116
|
const bearerToken = client._auth ? await client._auth() : undefined;
|
|
83
117
|
|
|
84
118
|
if (bearerToken) {
|
|
@@ -89,20 +123,20 @@ function handleStreaming(client: VertesiaClient, runId: string, onChunk: (chunk:
|
|
|
89
123
|
}
|
|
90
124
|
|
|
91
125
|
const sse = new EventSourceImpl(streamUrl.href);
|
|
92
|
-
sse.addEventListener(
|
|
126
|
+
sse.addEventListener('message', (ev) => {
|
|
93
127
|
try {
|
|
94
128
|
const data = JSON.parse(ev.data);
|
|
95
129
|
if (data) {
|
|
96
|
-
onChunk
|
|
130
|
+
onChunk?.(data);
|
|
97
131
|
}
|
|
98
132
|
} catch (err) {
|
|
99
133
|
reject(err);
|
|
100
134
|
}
|
|
101
135
|
});
|
|
102
|
-
sse.addEventListener(
|
|
136
|
+
sse.addEventListener('close', (ev) => {
|
|
103
137
|
try {
|
|
104
138
|
sse.close();
|
|
105
|
-
const msg = JSON.parse(ev.data)
|
|
139
|
+
const msg = JSON.parse(ev.data);
|
|
106
140
|
resolve(msg);
|
|
107
141
|
} catch (err) {
|
|
108
142
|
reject(err);
|
|
@@ -115,14 +149,20 @@ function handleStreaming(client: VertesiaClient, runId: string, onChunk: (chunk:
|
|
|
115
149
|
});
|
|
116
150
|
}
|
|
117
151
|
|
|
118
|
-
export async function executeInteractionAsync(
|
|
152
|
+
export async function executeInteractionAsync(
|
|
153
|
+
client: VertesiaClient,
|
|
154
|
+
payload: AsyncExecutionPayload,
|
|
155
|
+
): Promise<AsyncExecutionResult> {
|
|
119
156
|
return await client.post('/api/v1/execute/async', {
|
|
120
157
|
payload,
|
|
121
158
|
});
|
|
122
159
|
}
|
|
123
160
|
|
|
124
|
-
export async function checkRateLimit(
|
|
161
|
+
export async function checkRateLimit(
|
|
162
|
+
client: VertesiaClient,
|
|
163
|
+
payload: RateLimitRequestPayload,
|
|
164
|
+
): Promise<RateLimitRequestResponse> {
|
|
125
165
|
return await client.post('/api/v1/execute/rate-limit/request', {
|
|
126
|
-
payload
|
|
166
|
+
payload,
|
|
127
167
|
});
|
|
128
168
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { AsyncExecutionResult
|
|
1
|
+
import type { AsyncExecutionResult } from '@vertesia/common';
|
|
2
2
|
|
|
3
|
-
export type { OrphanedAppInstallation } from
|
|
3
|
+
export type { OrphanedAppInstallation } from '@vertesia/common';
|
|
4
|
+
export { getOAuthPermissionScopes, Permission } from '@vertesia/common';
|
|
4
5
|
export * from './client.js';
|
|
5
6
|
export type { GroupsQueryOptions } from './GroupsApi.js';
|
|
6
7
|
export * from './InteractionBase.js';
|
|
@@ -9,11 +10,10 @@ export { default as OAuthClientsApi } from './OAuthClientsApi.js';
|
|
|
9
10
|
export { default as OAuthGrantsApi } from './OAuthGrantsApi.js';
|
|
10
11
|
export { default as OAuthProvidersApi } from './OAuthProvidersApi.js';
|
|
11
12
|
export { default as OAuthServerApi } from './OAuthServerApi.js';
|
|
12
|
-
export { default as RemoteMcpConnectionsApi } from './RemoteMcpConnectionsApi.js';
|
|
13
|
-
export type { AsyncExecutionResult };
|
|
14
|
-
/** @deprecated Use `ComputedFacetResponse` from `@vertesia/common`. */
|
|
15
|
-
export type ComputeInteractionFacetsResponse = ComputedFacetResponse;
|
|
16
13
|
export type { ComputePromptFacetsResponse, ListInteractionsResponse } from './PromptsApi.js';
|
|
14
|
+
export { default as RemoteMcpConnectionsApi } from './RemoteMcpConnectionsApi.js';
|
|
17
15
|
export type { ComputeRunFacetsResponse, FilterOption } from './RunsApi.js';
|
|
18
|
-
export
|
|
19
|
-
export * from
|
|
16
|
+
export { default as SecretsApi } from './SecretsApi.js';
|
|
17
|
+
export * from './StreamSource.js';
|
|
18
|
+
export * from './store/index.js';
|
|
19
|
+
export type { AsyncExecutionResult };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { Readable } from
|
|
2
|
-
import { ReadableStream as NodeReadableStream } from
|
|
3
|
-
import { StreamSource } from
|
|
4
|
-
|
|
1
|
+
import type { Readable } from 'node:stream';
|
|
2
|
+
import { ReadableStream as NodeReadableStream } from 'node:stream/web';
|
|
3
|
+
import { StreamSource } from '../StreamSource.js';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* A stream source that wraps a Node.js Readable stream.
|
|
@@ -38,6 +37,6 @@ function readableToWebStream_BUN<T = string | Buffer>(stream: Readable): Readabl
|
|
|
38
37
|
},
|
|
39
38
|
cancel() {
|
|
40
39
|
it.return?.();
|
|
41
|
-
}
|
|
40
|
+
},
|
|
42
41
|
});
|
|
43
42
|
}
|
package/src/nodejs/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './NodeStreamSource.js';
|