lemma-sdk 0.2.42 → 0.2.44
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 +2 -5
- package/dist/assistant-events.d.ts +1 -0
- package/dist/assistant-events.js +25 -3
- package/dist/browser/lemma-client.js +1082 -296
- package/dist/client.d.ts +8 -0
- package/dist/client.js +13 -1
- package/dist/index.d.ts +4 -0
- package/dist/namespaces/agent-runtime.d.ts +28 -0
- package/dist/namespaces/agent-runtime.js +34 -0
- package/dist/namespaces/agents.d.ts +8 -3
- package/dist/namespaces/agents.js +4 -0
- package/dist/namespaces/conversations.d.ts +35 -7
- package/dist/namespaces/conversations.js +103 -22
- package/dist/namespaces/desks.d.ts +3 -3
- package/dist/namespaces/files.d.ts +12 -5
- package/dist/namespaces/files.js +12 -3
- package/dist/namespaces/functions.d.ts +8 -3
- package/dist/namespaces/functions.js +4 -0
- package/dist/namespaces/integrations.d.ts +54 -12
- package/dist/namespaces/integrations.js +52 -16
- package/dist/namespaces/pod-members.d.ts +1 -0
- package/dist/namespaces/pod-members.js +4 -1
- package/dist/namespaces/pod-permissions.d.ts +14 -0
- package/dist/namespaces/pod-permissions.js +18 -0
- package/dist/namespaces/pod-roles.d.ts +16 -0
- package/dist/namespaces/pod-roles.js +25 -0
- package/dist/namespaces/resource-access.d.ts +11 -0
- package/dist/namespaces/resource-access.js +18 -0
- package/dist/namespaces/schedules.d.ts +3 -3
- package/dist/namespaces/tables.d.ts +4 -4
- package/dist/namespaces/workflows.d.ts +4 -4
- package/dist/openapi_client/index.d.ts +76 -30
- package/dist/openapi_client/index.js +20 -7
- package/dist/openapi_client/models/AccountCreateSchema.d.ts +18 -0
- package/dist/openapi_client/models/AccountResponseSchema.d.ts +3 -0
- package/dist/openapi_client/models/AgentActionResponse.d.ts +20 -0
- package/dist/openapi_client/models/AgentDetailResponse.d.ts +22 -0
- package/dist/openapi_client/models/AgentHarnessInfo.d.ts +9 -0
- package/dist/openapi_client/models/AgentHarnessListResponse.d.ts +4 -0
- package/dist/openapi_client/models/AgentListResponse.d.ts +2 -2
- package/dist/openapi_client/models/AgentPermissionsReplaceRequest.d.ts +4 -0
- package/dist/openapi_client/models/AgentPermissionsResponse.d.ts +6 -0
- package/dist/openapi_client/models/AgentResourcePermissionRequest.d.ts +6 -0
- package/dist/openapi_client/models/AgentResourcePermissionResponse.d.ts +6 -0
- package/dist/openapi_client/models/AgentRunApprovalDecision.d.ts +8 -0
- package/dist/openapi_client/models/AgentRunApprovalDecision.js +13 -0
- package/dist/openapi_client/models/AgentRuntimeConfig.d.ts +7 -0
- package/dist/openapi_client/models/AgentRuntimeProfileListResponse.d.ts +6 -0
- package/dist/openapi_client/models/AgentRuntimeProfileResponse.d.ts +22 -0
- package/dist/openapi_client/models/AgentSurfaceResponse.d.ts +11 -4
- package/dist/openapi_client/models/ApplicationDetailResponseSchema.d.ts +3 -3
- package/dist/openapi_client/models/ApplicationResponseSchema.d.ts +3 -3
- package/dist/openapi_client/models/AuthConfigCreateSchema.d.ts +7 -0
- package/dist/openapi_client/models/AuthConfigListResponseSchema.d.ts +6 -0
- package/dist/openapi_client/models/AuthConfigResponseSchema.d.ts +13 -0
- package/dist/openapi_client/models/AuthScheme.d.ts +5 -0
- package/dist/openapi_client/models/AuthScheme.js +10 -0
- package/dist/openapi_client/models/BillingInterval.d.ts +2 -2
- package/dist/openapi_client/models/BillingInterval.js +2 -2
- package/dist/openapi_client/models/BillingInvoiceResponse.d.ts +0 -2
- package/dist/openapi_client/models/ComposioProviderCapabilityResponseSchema.d.ts +9 -0
- package/dist/openapi_client/models/ConnectRequestInitiateSchema.d.ts +5 -1
- package/dist/openapi_client/models/ConnectRequestResponseSchema.d.ts +2 -0
- package/dist/openapi_client/models/ConversationResponse.d.ts +2 -2
- package/dist/openapi_client/models/ConvertedArtifactResponse.d.ts +1 -0
- package/dist/openapi_client/models/ConvertedFileResponse.d.ts +4 -0
- package/dist/openapi_client/models/ConvertedPageResponse.d.ts +8 -0
- package/dist/openapi_client/models/CreateAgentRequest.d.ts +4 -12
- package/dist/openapi_client/models/CreateAnthropicCompatibleRuntimeProfileRequest.d.ts +11 -0
- package/dist/openapi_client/models/CreateConversationRequest.d.ts +2 -2
- package/dist/openapi_client/models/CreateDeskRequest.d.ts +1 -1
- package/dist/openapi_client/models/CreateFolderRequest.d.ts +1 -1
- package/dist/openapi_client/models/CreateFunctionRequest.d.ts +2 -6
- package/dist/openapi_client/models/CreateOpenAICompatibleRuntimeProfileRequest.d.ts +11 -0
- package/dist/openapi_client/models/CreateScheduleRequest.d.ts +13 -1
- package/dist/openapi_client/models/CreateSurfaceRequest.d.ts +12 -14
- package/dist/openapi_client/models/CreateTableRequest.d.ts +1 -1
- package/dist/openapi_client/models/CreateUserDaemonRuntimeProfileRequest.d.ts +9 -0
- package/dist/openapi_client/models/DatastoreFileUploadRequest.d.ts +1 -1
- package/dist/openapi_client/models/DeskBundleUploadResponse.d.ts +2 -2
- package/dist/openapi_client/models/{DeskResponse.d.ts → DeskDetailResponse.d.ts} +2 -2
- package/dist/openapi_client/models/DeskListResponse.d.ts +2 -2
- package/dist/openapi_client/models/DeskServingConfigResponse.d.ts +11 -0
- package/dist/openapi_client/models/DeskServingConfigResponse.js +8 -0
- package/dist/openapi_client/models/EventFlowStartInput.d.ts +0 -8
- package/dist/openapi_client/models/EventFlowStartOutput.d.ts +0 -8
- package/dist/openapi_client/models/{FileResponse.d.ts → FileDetailResponse.d.ts} +2 -2
- package/dist/openapi_client/models/FileListResponse.d.ts +2 -2
- package/dist/openapi_client/models/{FlowResponse.d.ts → FlowDetailResponse.d.ts} +2 -2
- package/dist/openapi_client/models/{FunctionResponse.d.ts → FunctionActionResponse.d.ts} +3 -10
- package/dist/openapi_client/models/FunctionActionResponse.js +1 -0
- package/dist/openapi_client/models/FunctionDetailResponse.d.ts +34 -0
- package/dist/openapi_client/models/FunctionDetailResponse.js +1 -0
- package/dist/openapi_client/models/FunctionListResponse.d.ts +2 -2
- package/dist/openapi_client/models/FunctionPermissionsReplaceRequest.d.ts +4 -0
- package/dist/openapi_client/models/FunctionPermissionsReplaceRequest.js +1 -0
- package/dist/openapi_client/models/FunctionPermissionsResponse.d.ts +6 -0
- package/dist/openapi_client/models/FunctionPermissionsResponse.js +1 -0
- package/dist/openapi_client/models/FunctionResourcePermissionRequest.d.ts +6 -0
- package/dist/openapi_client/models/FunctionResourcePermissionRequest.js +1 -0
- package/dist/openapi_client/models/FunctionResourcePermissionResponse.d.ts +6 -0
- package/dist/openapi_client/models/FunctionResourcePermissionResponse.js +1 -0
- package/dist/openapi_client/models/FunctionRunListResponse.d.ts +2 -2
- package/dist/openapi_client/models/FunctionRunSummaryResponse.d.ts +13 -0
- package/dist/openapi_client/models/FunctionRunSummaryResponse.js +1 -0
- package/dist/openapi_client/models/GmailSurfaceConfig.d.ts +1 -1
- package/dist/openapi_client/models/HarnessKind.d.ts +4 -2
- package/dist/openapi_client/models/HarnessKind.js +4 -2
- package/dist/openapi_client/models/LemmaProviderCapabilityResponseSchema.d.ts +12 -0
- package/dist/openapi_client/models/LemmaProviderCapabilityResponseSchema.js +1 -0
- package/dist/openapi_client/models/OAuth2DefaultsResponseSchema.d.ts +10 -0
- package/dist/openapi_client/models/OAuth2DefaultsResponseSchema.js +1 -0
- package/dist/openapi_client/models/OperationSummary.d.ts +4 -0
- package/dist/openapi_client/models/OutlookSurfaceConfig.d.ts +1 -1
- package/dist/openapi_client/models/PlanResponse.d.ts +3 -2
- package/dist/openapi_client/models/PlanType.d.ts +7 -0
- package/dist/openapi_client/models/PlanType.js +12 -0
- package/dist/openapi_client/models/PodConfig.d.ts +6 -0
- package/dist/openapi_client/models/PodConfig.js +1 -0
- package/dist/openapi_client/models/PodCreateRequest.d.ts +2 -0
- package/dist/openapi_client/models/PodEffectivePermissionsResponse.d.ts +4 -0
- package/dist/openapi_client/models/PodEffectivePermissionsResponse.js +1 -0
- package/dist/openapi_client/models/PodPermissionCatalogResponse.d.ts +4 -0
- package/dist/openapi_client/models/PodPermissionCatalogResponse.js +1 -0
- package/dist/openapi_client/models/PodPermissionResponse.d.ts +7 -0
- package/dist/openapi_client/models/PodPermissionResponse.js +1 -0
- package/dist/openapi_client/models/PodResponse.d.ts +2 -0
- package/dist/openapi_client/models/PodRoleCreateRequest.d.ts +2 -0
- package/dist/openapi_client/models/PodRolePermissionsReplaceRequest.d.ts +4 -0
- package/dist/openapi_client/models/PodRolePermissionsReplaceRequest.js +1 -0
- package/dist/openapi_client/models/PodRolePermissionsResponse.d.ts +6 -0
- package/dist/openapi_client/models/PodRolePermissionsResponse.js +1 -0
- package/dist/openapi_client/models/PodRoleResourcePermissionRequest.d.ts +6 -0
- package/dist/openapi_client/models/PodRoleResourcePermissionRequest.js +1 -0
- package/dist/openapi_client/models/PodRoleResourcePermissionResponse.d.ts +6 -0
- package/dist/openapi_client/models/PodRoleResourcePermissionResponse.js +1 -0
- package/dist/openapi_client/models/PodRoleResponse.d.ts +3 -0
- package/dist/openapi_client/models/PodUpdateRequest.d.ts +2 -0
- package/dist/openapi_client/models/ResolveUserApprovalRequest.d.ts +5 -0
- package/dist/openapi_client/models/ResolveUserApprovalRequest.js +1 -0
- package/dist/openapi_client/models/ResourceAccessGrantRequest.d.ts +3 -0
- package/dist/openapi_client/models/ResourceAccessGrantRequest.js +1 -0
- package/dist/openapi_client/models/ResourceAccessGrantResponse.d.ts +12 -0
- package/dist/openapi_client/models/ResourceAccessGrantResponse.js +1 -0
- package/dist/openapi_client/models/ResourceAccessResponse.d.ts +7 -0
- package/dist/openapi_client/models/ResourceAccessResponse.js +1 -0
- package/dist/openapi_client/models/ResourceType.d.ts +19 -0
- package/dist/openapi_client/models/ResourceType.js +24 -0
- package/dist/openapi_client/models/ResourceVisibility.d.ts +6 -0
- package/dist/openapi_client/models/ResourceVisibility.js +11 -0
- package/dist/openapi_client/models/RuntimeModelCapability.d.ts +8 -0
- package/dist/openapi_client/models/RuntimeModelCapability.js +13 -0
- package/dist/openapi_client/models/RuntimeModelCatalogEntry.d.ts +9 -0
- package/dist/openapi_client/models/RuntimeModelCatalogEntry.js +1 -0
- package/dist/openapi_client/models/RuntimeProfileKind.d.ts +4 -0
- package/dist/openapi_client/models/RuntimeProfileKind.js +9 -0
- package/dist/openapi_client/models/RuntimeProfileProtocol.d.ts +9 -0
- package/dist/openapi_client/models/RuntimeProfileProtocol.js +14 -0
- package/dist/openapi_client/models/RuntimeProfileScope.d.ts +4 -0
- package/dist/openapi_client/models/RuntimeProfileScope.js +9 -0
- package/dist/openapi_client/models/RuntimeProfileStatus.d.ts +5 -0
- package/dist/openapi_client/models/RuntimeProfileStatus.js +10 -0
- package/dist/openapi_client/models/{ScheduleResponse.d.ts → ScheduleDetailResponse.d.ts} +3 -3
- package/dist/openapi_client/models/ScheduleDetailResponse.js +1 -0
- package/dist/openapi_client/models/ScheduleListResponse.d.ts +2 -2
- package/dist/openapi_client/models/SlackSurfaceConfig.d.ts +1 -4
- package/dist/openapi_client/models/SubscriptionResponse.d.ts +2 -2
- package/dist/openapi_client/models/SubscriptionWithPlanResponse.d.ts +2 -2
- package/dist/openapi_client/models/SurfaceBehaviorConfigInput.d.ts +3 -0
- package/dist/openapi_client/models/SurfaceBehaviorConfigInput.js +1 -0
- package/dist/openapi_client/models/SurfaceEventMode.d.ts +6 -0
- package/dist/openapi_client/models/SurfaceEventMode.js +11 -0
- package/dist/openapi_client/models/SurfaceMode.d.ts +5 -0
- package/dist/openapi_client/models/SurfaceMode.js +10 -0
- package/dist/openapi_client/models/SurfaceSetupMode.d.ts +2 -3
- package/dist/openapi_client/models/SurfaceSetupMode.js +1 -2
- package/dist/openapi_client/models/{TableResponse.d.ts → TableDetailResponse.d.ts} +3 -3
- package/dist/openapi_client/models/TableDetailResponse.js +1 -0
- package/dist/openapi_client/models/TableListResponse.d.ts +2 -2
- package/dist/openapi_client/models/TeamsSurfaceConfig.d.ts +1 -3
- package/dist/openapi_client/models/TelegramSurfaceConfig.d.ts +1 -0
- package/dist/openapi_client/models/UpdateAgentRequest.d.ts +4 -12
- package/dist/openapi_client/models/UpdateConversationRequest.d.ts +2 -2
- package/dist/openapi_client/models/UpdateDeskRequest.d.ts +0 -1
- package/dist/openapi_client/models/UpdateFunctionRequest.d.ts +2 -6
- package/dist/openapi_client/models/UpdateScheduleRequest.d.ts +1 -1
- package/dist/openapi_client/models/UpdateSurfaceRequest.d.ts +11 -14
- package/dist/openapi_client/models/UpdateTableRequest.d.ts +1 -1
- package/dist/openapi_client/models/UsageLimitScopeResponse.d.ts +2 -3
- package/dist/openapi_client/models/UsageLimitsResponse.d.ts +1 -4
- package/dist/openapi_client/models/UsageListResponse.d.ts +0 -3
- package/dist/openapi_client/models/UsageRecordResponse.d.ts +10 -14
- package/dist/openapi_client/models/UsageStatsBucketResponse.d.ts +1 -4
- package/dist/openapi_client/models/UsageStatsResponse.d.ts +0 -3
- package/dist/openapi_client/models/UsageSummaryResponse.d.ts +4 -6
- package/dist/openapi_client/models/UserApprovalListResponse.d.ts +4 -0
- package/dist/openapi_client/models/UserApprovalListResponse.js +1 -0
- package/dist/openapi_client/models/VerifyTokenResponse.d.ts +5 -0
- package/dist/openapi_client/models/WhatsAppSurfaceConfig.d.ts +1 -0
- package/dist/openapi_client/models/WorkflowCreateRequest.d.ts +2 -1
- package/dist/openapi_client/models/WorkflowListResponse.d.ts +2 -2
- package/dist/openapi_client/models/WorkflowRunListResponse.d.ts +2 -2
- package/dist/openapi_client/models/WorkflowRunSummaryResponse.d.ts +18 -0
- package/dist/openapi_client/models/WorkflowRunSummaryResponse.js +1 -0
- package/dist/openapi_client/models/WorkflowUpdateRequest.d.ts +2 -1
- package/dist/openapi_client/models/WorkspaceAppAccessRequest.d.ts +6 -0
- package/dist/openapi_client/models/WorkspaceAppAccessRequest.js +1 -0
- package/dist/openapi_client/models/WorkspaceAppAccessResponse.d.ts +5 -0
- package/dist/openapi_client/models/WorkspaceAppAccessResponse.js +1 -0
- package/dist/openapi_client/models/WorkspaceMeApp.d.ts +5 -0
- package/dist/openapi_client/models/WorkspaceMeApp.js +1 -0
- package/dist/openapi_client/models/WorkspaceMeResponse.d.ts +9 -0
- package/dist/openapi_client/models/WorkspaceMeResponse.js +1 -0
- package/dist/openapi_client/models/WorkspaceMeSandbox.d.ts +10 -0
- package/dist/openapi_client/models/WorkspaceMeSandbox.js +1 -0
- package/dist/openapi_client/models/WorkspaceMeSession.d.ts +6 -0
- package/dist/openapi_client/models/WorkspaceMeSession.js +1 -0
- package/dist/openapi_client/models/update.d.ts +1 -1
- package/dist/openapi_client/services/AgentConversationsService.d.ts +28 -3
- package/dist/openapi_client/services/AgentConversationsService.js +54 -3
- package/dist/openapi_client/services/AgentRuntimeService.d.ts +30 -0
- package/dist/openapi_client/services/AgentRuntimeService.js +54 -0
- package/dist/openapi_client/services/AgentSurfacesIngressService.d.ts +15 -20
- package/dist/openapi_client/services/AgentSurfacesIngressService.js +23 -28
- package/dist/openapi_client/services/AgentSurfacesService.d.ts +8 -8
- package/dist/openapi_client/services/AgentSurfacesService.js +20 -20
- package/dist/openapi_client/services/AgentToolsService.d.ts +0 -10
- package/dist/openapi_client/services/AgentToolsService.js +0 -18
- package/dist/openapi_client/services/AgentsService.d.ts +31 -9
- package/dist/openapi_client/services/AgentsService.js +50 -5
- package/dist/openapi_client/services/ApplicationsService.d.ts +12 -8
- package/dist/openapi_client/services/ApplicationsService.js +24 -16
- package/dist/openapi_client/services/BillingSubscriptionsService.d.ts +3 -2
- package/dist/openapi_client/services/BillingSubscriptionsService.js +3 -3
- package/dist/openapi_client/services/DesksService.d.ts +7 -7
- package/dist/openapi_client/services/DesksService.js +3 -3
- package/dist/openapi_client/services/FilesService.d.ts +18 -9
- package/dist/openapi_client/services/FilesService.js +28 -4
- package/dist/openapi_client/services/FunctionsService.d.ts +29 -7
- package/dist/openapi_client/services/FunctionsService.js +48 -3
- package/dist/openapi_client/services/IntegrationsService.d.ts +65 -14
- package/dist/openapi_client/services/IntegrationsService.js +144 -23
- package/dist/openapi_client/services/OrganizationsService.d.ts +8 -0
- package/dist/openapi_client/services/OrganizationsService.js +19 -0
- package/dist/openapi_client/services/PodMembersService.d.ts +0 -10
- package/dist/openapi_client/services/PodMembersService.js +0 -24
- package/dist/openapi_client/services/PodPermissionsService.d.ts +19 -0
- package/dist/openapi_client/services/PodPermissionsService.js +40 -0
- package/dist/openapi_client/services/PodResourceAccessService.d.ts +38 -0
- package/dist/openapi_client/services/PodResourceAccessService.js +81 -0
- package/dist/openapi_client/services/PodRolesService.d.ts +28 -0
- package/dist/openapi_client/services/PodRolesService.js +66 -0
- package/dist/openapi_client/services/PublicDesksService.d.ts +10 -0
- package/dist/openapi_client/services/PublicDesksService.js +15 -0
- package/dist/openapi_client/services/SchedulesService.d.ts +7 -7
- package/dist/openapi_client/services/SchedulesService.js +3 -3
- package/dist/openapi_client/services/TablesService.d.ts +9 -9
- package/dist/openapi_client/services/TablesService.js +4 -4
- package/dist/openapi_client/services/UsageService.d.ts +96 -0
- package/dist/openapi_client/services/UsageService.js +210 -0
- package/dist/openapi_client/services/WorkflowsService.d.ts +9 -9
- package/dist/openapi_client/services/WorkflowsService.js +4 -4
- package/dist/openapi_client/services/WorkspaceAppsService.d.ts +12 -0
- package/dist/openapi_client/services/WorkspaceAppsService.js +21 -0
- package/dist/openapi_client/services/WorkspaceService.d.ts +10 -0
- package/dist/openapi_client/services/WorkspaceService.js +15 -0
- package/dist/react/AuthGuard.d.ts +15 -0
- package/dist/react/AuthGuard.js +167 -128
- package/dist/react/index.d.ts +1 -1
- package/dist/react/useAssistantController.d.ts +26 -3
- package/dist/react/useAssistantController.js +187 -69
- package/dist/react/useAssistantSession.d.ts +10 -7
- package/dist/react/useAssistantSession.js +106 -5
- package/dist/react/useConversations.d.ts +1 -7
- package/dist/react/useConversations.js +4 -10
- package/dist/react/useFlowRunHistory.d.ts +4 -4
- package/dist/react/useFlowRunHistory.js +9 -4
- package/dist/react/useFlowSession.d.ts +2 -2
- package/dist/react/useFunctionRun.d.ts +2 -2
- package/dist/react/useFunctionRuns.d.ts +5 -5
- package/dist/react/useFunctionSession.d.ts +2 -2
- package/dist/react/useWorkflowRun.d.ts +2 -2
- package/dist/react/useWorkflowRuns.d.ts +5 -5
- package/dist/react/useWorkflowStart.d.ts +2 -2
- package/dist/types.d.ts +45 -8
- package/package.json +2 -2
- package/dist/openapi_client/models/AgentModelName.d.ts +0 -13
- package/dist/openapi_client/models/AgentModelName.js +0 -18
- package/dist/openapi_client/models/AgentResponse.d.ts +0 -29
- package/dist/openapi_client/models/ApplicationAccessConfig.d.ts +0 -18
- package/dist/openapi_client/models/ApplicationMode.d.ts +0 -7
- package/dist/openapi_client/models/ApplicationMode.js +0 -12
- package/dist/openapi_client/models/BillingScope.d.ts +0 -7
- package/dist/openapi_client/models/BillingScope.js +0 -12
- package/dist/openapi_client/models/FunctionTableAccessEntry.d.ts +0 -5
- package/dist/openapi_client/models/GmailSurfaceConfigInput.d.ts +0 -4
- package/dist/openapi_client/models/OutlookSurfaceConfigInput.d.ts +0 -4
- package/dist/openapi_client/models/RecentUsageResponse.d.ts +0 -9
- package/dist/openapi_client/models/SlackCredentialsInput.d.ts +0 -5
- package/dist/openapi_client/models/SlackSurfaceConfigInput.d.ts +0 -6
- package/dist/openapi_client/models/SurfaceCredentialMode.d.ts +0 -4
- package/dist/openapi_client/models/SurfaceCredentialMode.js +0 -9
- package/dist/openapi_client/models/SurfaceWebhookMode.d.ts +0 -4
- package/dist/openapi_client/models/SurfaceWebhookMode.js +0 -9
- package/dist/openapi_client/models/TableAccessEntry.d.ts +0 -8
- package/dist/openapi_client/models/TableAccessMode.d.ts +0 -7
- package/dist/openapi_client/models/TableAccessMode.js +0 -12
- package/dist/openapi_client/models/TeamsCredentialsInput.d.ts +0 -6
- package/dist/openapi_client/models/TeamsSurfaceConfigInput.d.ts +0 -6
- package/dist/openapi_client/models/TelegramCredentialsInput.d.ts +0 -5
- package/dist/openapi_client/models/TelegramSurfaceConfigInput.d.ts +0 -6
- package/dist/openapi_client/models/WebSearchAgentRequest.d.ts +0 -9
- package/dist/openapi_client/models/WebSearchAgentResponse.d.ts +0 -25
- package/dist/openapi_client/models/WhatsAppCredentialsInput.d.ts +0 -8
- package/dist/openapi_client/models/WhatsAppSurfaceConfigInput.d.ts +0 -6
- package/dist/openapi_client/services/BillingUsageService.d.ts +0 -138
- package/dist/openapi_client/services/BillingUsageService.js +0 -302
- /package/dist/openapi_client/models/{AgentResponse.js → AccountCreateSchema.js} +0 -0
- /package/dist/openapi_client/models/{ApplicationAccessConfig.js → AgentActionResponse.js} +0 -0
- /package/dist/openapi_client/models/{DeskResponse.js → AgentDetailResponse.js} +0 -0
- /package/dist/openapi_client/models/{FileResponse.js → AgentHarnessInfo.js} +0 -0
- /package/dist/openapi_client/models/{FlowResponse.js → AgentHarnessListResponse.js} +0 -0
- /package/dist/openapi_client/models/{FunctionResponse.js → AgentPermissionsReplaceRequest.js} +0 -0
- /package/dist/openapi_client/models/{FunctionTableAccessEntry.js → AgentPermissionsResponse.js} +0 -0
- /package/dist/openapi_client/models/{GmailSurfaceConfigInput.js → AgentResourcePermissionRequest.js} +0 -0
- /package/dist/openapi_client/models/{OutlookSurfaceConfigInput.js → AgentResourcePermissionResponse.js} +0 -0
- /package/dist/openapi_client/models/{RecentUsageResponse.js → AgentRuntimeConfig.js} +0 -0
- /package/dist/openapi_client/models/{ScheduleResponse.js → AgentRuntimeProfileListResponse.js} +0 -0
- /package/dist/openapi_client/models/{SlackCredentialsInput.js → AgentRuntimeProfileResponse.js} +0 -0
- /package/dist/openapi_client/models/{SlackSurfaceConfigInput.js → AuthConfigCreateSchema.js} +0 -0
- /package/dist/openapi_client/models/{TableAccessEntry.js → AuthConfigListResponseSchema.js} +0 -0
- /package/dist/openapi_client/models/{TableResponse.js → AuthConfigResponseSchema.js} +0 -0
- /package/dist/openapi_client/models/{TeamsCredentialsInput.js → ComposioProviderCapabilityResponseSchema.js} +0 -0
- /package/dist/openapi_client/models/{TeamsSurfaceConfigInput.js → ConvertedPageResponse.js} +0 -0
- /package/dist/openapi_client/models/{TelegramCredentialsInput.js → CreateAnthropicCompatibleRuntimeProfileRequest.js} +0 -0
- /package/dist/openapi_client/models/{TelegramSurfaceConfigInput.js → CreateOpenAICompatibleRuntimeProfileRequest.js} +0 -0
- /package/dist/openapi_client/models/{WebSearchAgentRequest.js → CreateUserDaemonRuntimeProfileRequest.js} +0 -0
- /package/dist/openapi_client/models/{WebSearchAgentResponse.js → DeskDetailResponse.js} +0 -0
- /package/dist/openapi_client/models/{WhatsAppCredentialsInput.js → FileDetailResponse.js} +0 -0
- /package/dist/openapi_client/models/{WhatsAppSurfaceConfigInput.js → FlowDetailResponse.js} +0 -0
|
@@ -44,6 +44,77 @@ function isConversationRunningStatus(status) {
|
|
|
44
44
|
return false;
|
|
45
45
|
return normalized === "RUNNING" || normalized === "IN_PROGRESS" || normalized === "PROCESSING";
|
|
46
46
|
}
|
|
47
|
+
function isRecord(value) {
|
|
48
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
49
|
+
}
|
|
50
|
+
function parseMaybeJsonValue(value) {
|
|
51
|
+
if (typeof value !== "string")
|
|
52
|
+
return value;
|
|
53
|
+
const trimmed = value.trim();
|
|
54
|
+
if (!trimmed)
|
|
55
|
+
return value;
|
|
56
|
+
try {
|
|
57
|
+
return JSON.parse(trimmed);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function parseMaybeJsonObject(value) {
|
|
64
|
+
const parsed = parseMaybeJsonValue(value);
|
|
65
|
+
return isRecord(parsed) ? parsed : {};
|
|
66
|
+
}
|
|
67
|
+
function normalizeToolResult(value) {
|
|
68
|
+
const parsed = parseMaybeJsonValue(value);
|
|
69
|
+
if (isRecord(parsed))
|
|
70
|
+
return parsed;
|
|
71
|
+
if (Array.isArray(parsed))
|
|
72
|
+
return { output: parsed };
|
|
73
|
+
if (typeof parsed === "undefined" || parsed === null)
|
|
74
|
+
return {};
|
|
75
|
+
return { output: parsed };
|
|
76
|
+
}
|
|
77
|
+
function parseStreamingToolToken(token) {
|
|
78
|
+
const parsed = parseMaybeJsonValue(token);
|
|
79
|
+
if (!isRecord(parsed))
|
|
80
|
+
return null;
|
|
81
|
+
const toolName = [parsed.tool_name, parsed.toolName, parsed.name]
|
|
82
|
+
.find((value) => typeof value === "string" && value.trim().length > 0);
|
|
83
|
+
if (typeof toolName !== "string")
|
|
84
|
+
return null;
|
|
85
|
+
const rawToolCallId = [parsed.tool_call_id, parsed.toolCallId, parsed.call_id, parsed.id]
|
|
86
|
+
.find((value) => typeof value === "string" && value.trim().length > 0);
|
|
87
|
+
const rawArgs = parsed.tool_input ?? parsed.args ?? parsed.arguments ?? parsed.input;
|
|
88
|
+
const rawResult = parsed.tool_output ?? parsed.result ?? parsed.output;
|
|
89
|
+
const hasResult = typeof rawResult !== "undefined";
|
|
90
|
+
return {
|
|
91
|
+
...(typeof rawToolCallId === "string" ? { toolCallId: rawToolCallId } : {}),
|
|
92
|
+
toolName,
|
|
93
|
+
args: parseMaybeJsonObject(rawArgs),
|
|
94
|
+
state: hasResult ? "result" : "call",
|
|
95
|
+
...(hasResult ? { result: normalizeToolResult(rawResult) } : {}),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function parsePartialStreamingToolToken(token) {
|
|
99
|
+
const toolNameMatch = /"(?:tool_name|toolName|name)"\s*:\s*"((?:\\.|[^"\\])*)"/.exec(token);
|
|
100
|
+
if (!toolNameMatch?.[1])
|
|
101
|
+
return null;
|
|
102
|
+
const idMatch = /"(?:tool_call_id|toolCallId|call_id|id)"\s*:\s*"((?:\\.|[^"\\])*)"/.exec(token);
|
|
103
|
+
const unescapeJsonString = (value) => {
|
|
104
|
+
try {
|
|
105
|
+
return JSON.parse(`"${value}"`);
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
return value;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
return {
|
|
112
|
+
...(idMatch?.[1] ? { toolCallId: unescapeJsonString(idMatch[1]) } : {}),
|
|
113
|
+
toolName: unescapeJsonString(toolNameMatch[1]),
|
|
114
|
+
args: {},
|
|
115
|
+
state: "call",
|
|
116
|
+
};
|
|
117
|
+
}
|
|
47
118
|
function resolveResumeInput(input) {
|
|
48
119
|
if (typeof input === "string" || input === null) {
|
|
49
120
|
return { conversationId: input };
|
|
@@ -57,12 +128,14 @@ export function useAssistantSession(options) {
|
|
|
57
128
|
const [status, setStatus] = useState(undefined);
|
|
58
129
|
const [messages, setMessages] = useState([]);
|
|
59
130
|
const [streamingText, setStreamingText] = useState("");
|
|
131
|
+
const [streamingTool, setStreamingTool] = useState(null);
|
|
60
132
|
const [isStreaming, setIsStreaming] = useState(false);
|
|
61
133
|
const [error, setError] = useState(null);
|
|
62
134
|
const abortRef = useRef(null);
|
|
63
135
|
const conversationIdRef = useRef(externalConversationId);
|
|
64
136
|
const statusRef = useRef(undefined);
|
|
65
137
|
const streamingTextRef = useRef("");
|
|
138
|
+
const streamingToolTokenRef = useRef("");
|
|
66
139
|
const autoResumedKeyRef = useRef(null);
|
|
67
140
|
const autoLoadInFlightKeyRef = useRef(null);
|
|
68
141
|
const lastAutoLoadedKeyRef = useRef(null);
|
|
@@ -82,6 +155,7 @@ export function useAssistantSession(options) {
|
|
|
82
155
|
lastAutoLoadedKeyRef.current = null;
|
|
83
156
|
streamingTextRef.current = "";
|
|
84
157
|
setStreamingText("");
|
|
158
|
+
setStreamingTool(null);
|
|
85
159
|
setConversation(null);
|
|
86
160
|
setStatus(undefined);
|
|
87
161
|
statusRef.current = undefined;
|
|
@@ -129,6 +203,10 @@ export function useAssistantSession(options) {
|
|
|
129
203
|
streamingTextRef.current = "";
|
|
130
204
|
setStreamingText("");
|
|
131
205
|
}, []);
|
|
206
|
+
const clearStreamingTool = useCallback(() => {
|
|
207
|
+
streamingToolTokenRef.current = "";
|
|
208
|
+
setStreamingTool(null);
|
|
209
|
+
}, []);
|
|
132
210
|
const appendStreamingToken = useCallback((token) => {
|
|
133
211
|
if (!token)
|
|
134
212
|
return;
|
|
@@ -166,8 +244,6 @@ export function useAssistantSession(options) {
|
|
|
166
244
|
const response = await scopedClient.conversations.list({
|
|
167
245
|
pod_id: scope.podId ?? undefined,
|
|
168
246
|
agent_name: scope.agentName ?? undefined,
|
|
169
|
-
status: input.status ?? undefined,
|
|
170
|
-
type: input.type,
|
|
171
247
|
limit: input.limit,
|
|
172
248
|
page_token: input.pageToken,
|
|
173
249
|
});
|
|
@@ -198,8 +274,6 @@ export function useAssistantSession(options) {
|
|
|
198
274
|
instructions: typeof input.instructions === "undefined"
|
|
199
275
|
? defaultInstructions ?? undefined
|
|
200
276
|
: input.instructions,
|
|
201
|
-
metadata: input.metadata ?? undefined,
|
|
202
|
-
type: input.type,
|
|
203
277
|
pod_id: input.podId ?? defaultPodId ?? scopedClient.podId ?? undefined,
|
|
204
278
|
agent_name: input.agentName
|
|
205
279
|
?? input.assistantName
|
|
@@ -211,6 +285,9 @@ export function useAssistantSession(options) {
|
|
|
211
285
|
model: typeof input.model === "undefined"
|
|
212
286
|
? undefined
|
|
213
287
|
: input.model,
|
|
288
|
+
agent_runtime: typeof input.agentRuntime === "undefined"
|
|
289
|
+
? undefined
|
|
290
|
+
: input.agentRuntime,
|
|
214
291
|
};
|
|
215
292
|
const created = await scopedClient.conversations.create(payload);
|
|
216
293
|
if (input.setActive !== false) {
|
|
@@ -315,7 +392,26 @@ export function useAssistantSession(options) {
|
|
|
315
392
|
onEventRef.current?.(event, payload);
|
|
316
393
|
const parsed = parseAssistantStreamEvent(payload);
|
|
317
394
|
if (parsed.token) {
|
|
318
|
-
|
|
395
|
+
if (parsed.tokenKind === "tool") {
|
|
396
|
+
streamingToolTokenRef.current += parsed.token;
|
|
397
|
+
const tool = parseStreamingToolToken(streamingToolTokenRef.current)
|
|
398
|
+
|| parsePartialStreamingToolToken(streamingToolTokenRef.current);
|
|
399
|
+
if (tool?.state === "call") {
|
|
400
|
+
setStreamingTool(tool);
|
|
401
|
+
if (parseStreamingToolToken(streamingToolTokenRef.current)) {
|
|
402
|
+
streamingToolTokenRef.current = "";
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
else if (tool?.state === "result") {
|
|
406
|
+
setStreamingTool((current) => (current?.toolCallId && current.toolCallId === tool.toolCallId
|
|
407
|
+
? { ...current, ...tool }
|
|
408
|
+
: current));
|
|
409
|
+
streamingToolTokenRef.current = "";
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
else if (!parsed.tokenKind || parsed.tokenKind === "text") {
|
|
413
|
+
appendStreamingToken(parsed.token);
|
|
414
|
+
}
|
|
319
415
|
}
|
|
320
416
|
if (parsed.message) {
|
|
321
417
|
setMessages((previous) => upsertConversationMessage(previous, parsed.message));
|
|
@@ -325,6 +421,7 @@ export function useAssistantSession(options) {
|
|
|
325
421
|
: "";
|
|
326
422
|
if (role === "assistant" || role === "tool") {
|
|
327
423
|
clearStreamingText();
|
|
424
|
+
clearStreamingTool();
|
|
328
425
|
}
|
|
329
426
|
}
|
|
330
427
|
if (parsed.status) {
|
|
@@ -332,6 +429,7 @@ export function useAssistantSession(options) {
|
|
|
332
429
|
if (!isConversationRunningStatus(parsed.status)) {
|
|
333
430
|
sawTerminalStatus = true;
|
|
334
431
|
clearStreamingText();
|
|
432
|
+
clearStreamingTool();
|
|
335
433
|
}
|
|
336
434
|
}
|
|
337
435
|
}
|
|
@@ -340,6 +438,7 @@ export function useAssistantSession(options) {
|
|
|
340
438
|
setConversationStatus("WAITING");
|
|
341
439
|
}
|
|
342
440
|
clearStreamingText();
|
|
441
|
+
clearStreamingTool();
|
|
343
442
|
const shouldSync = syncAfterStream ?? syncOnTurnEnd;
|
|
344
443
|
const syncConversationId = streamConversationId ?? conversationId;
|
|
345
444
|
if (shouldSync && syncConversationId) {
|
|
@@ -363,6 +462,7 @@ export function useAssistantSession(options) {
|
|
|
363
462
|
}
|
|
364
463
|
}, [
|
|
365
464
|
appendStreamingToken,
|
|
465
|
+
clearStreamingTool,
|
|
366
466
|
clearStreamingText,
|
|
367
467
|
conversationId,
|
|
368
468
|
loadMessages,
|
|
@@ -576,6 +676,7 @@ export function useAssistantSession(options) {
|
|
|
576
676
|
finalOutput,
|
|
577
677
|
finalOutputText,
|
|
578
678
|
streamingText,
|
|
679
|
+
streamingTool,
|
|
579
680
|
isStreaming,
|
|
580
681
|
error,
|
|
581
682
|
setConversationId,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { LemmaClient } from "../client.js";
|
|
2
|
-
import type { ConversationStatus } from "../openapi_client/models/ConversationStatus.js";
|
|
3
|
-
import type { ConversationType } from "../openapi_client/models/ConversationType.js";
|
|
4
2
|
import type { Conversation } from "../types.js";
|
|
5
3
|
import { type CreateConversationInput } from "./useAssistantSession.js";
|
|
6
4
|
export interface UseConversationsOptions {
|
|
@@ -21,8 +19,6 @@ export interface UseConversationsOptions {
|
|
|
21
19
|
autoSelectFirst?: boolean;
|
|
22
20
|
limit?: number;
|
|
23
21
|
pageToken?: string;
|
|
24
|
-
status?: ConversationStatus | `${ConversationStatus}` | null;
|
|
25
|
-
type?: ConversationType | `${ConversationType}` | null;
|
|
26
22
|
initialConversationId?: string | null;
|
|
27
23
|
}
|
|
28
24
|
export interface UseConversationsResult {
|
|
@@ -49,8 +45,6 @@ export interface UseConversationsResult {
|
|
|
49
45
|
refresh: (overrides?: {
|
|
50
46
|
limit?: number;
|
|
51
47
|
pageToken?: string;
|
|
52
|
-
status?: ConversationStatus | `${ConversationStatus}` | null;
|
|
53
|
-
type?: ConversationType | `${ConversationType}` | null;
|
|
54
48
|
}) => Promise<Conversation[]>;
|
|
55
49
|
loadMore: (overrides?: {
|
|
56
50
|
limit?: number;
|
|
@@ -59,4 +53,4 @@ export interface UseConversationsResult {
|
|
|
59
53
|
createAndSelectConversation: (input?: Omit<CreateConversationInput, "setActive">) => Promise<Conversation>;
|
|
60
54
|
ensureConversation: (input?: Omit<CreateConversationInput, "setActive">) => Promise<Conversation>;
|
|
61
55
|
}
|
|
62
|
-
export declare function useConversations({ client, podId, agentName, assistantName, assistantId, organizationId, enabled, autoLoad, autoSelectFirst, limit, pageToken,
|
|
56
|
+
export declare function useConversations({ client, podId, agentName, assistantName, assistantId, organizationId, enabled, autoLoad, autoSelectFirst, limit, pageToken, initialConversationId, }: UseConversationsOptions): UseConversationsResult;
|
|
@@ -8,7 +8,7 @@ function sortConversationsByUpdatedAt(conversations) {
|
|
|
8
8
|
return bTime - aTime;
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
-
export function useConversations({ client, podId, agentName, assistantName, assistantId, organizationId, enabled = true, autoLoad = true, autoSelectFirst = true, limit = 20, pageToken,
|
|
11
|
+
export function useConversations({ client, podId, agentName, assistantName, assistantId, organizationId, enabled = true, autoLoad = true, autoSelectFirst = true, limit = 20, pageToken, initialConversationId = null, }) {
|
|
12
12
|
const [conversations, setConversations] = useState([]);
|
|
13
13
|
const [total, setTotal] = useState(0);
|
|
14
14
|
const [nextPageToken, setNextPageToken] = useState(null);
|
|
@@ -21,9 +21,7 @@ export function useConversations({ client, podId, agentName, assistantName, assi
|
|
|
21
21
|
assistantName: assistantName ?? null,
|
|
22
22
|
assistantId: assistantId ?? null,
|
|
23
23
|
organizationId: organizationId ?? null,
|
|
24
|
-
|
|
25
|
-
type: type ?? null,
|
|
26
|
-
}), [agentName, assistantId, assistantName, organizationId, podId, status, type]);
|
|
24
|
+
}), [agentName, assistantId, assistantName, organizationId, podId]);
|
|
27
25
|
const { error, listConversations, createConversation: sessionCreateConversation, } = useAssistantSession({
|
|
28
26
|
client,
|
|
29
27
|
podId,
|
|
@@ -46,8 +44,6 @@ export function useConversations({ client, podId, agentName, assistantName, assi
|
|
|
46
44
|
const response = await listConversations({
|
|
47
45
|
limit: overrides.limit ?? limit,
|
|
48
46
|
pageToken: overrides.pageToken ?? pageToken,
|
|
49
|
-
status: overrides.status ?? status,
|
|
50
|
-
type: overrides.type ?? type,
|
|
51
47
|
});
|
|
52
48
|
const nextConversations = sortConversationsByUpdatedAt(response.items ?? []);
|
|
53
49
|
setConversations(nextConversations);
|
|
@@ -67,7 +63,7 @@ export function useConversations({ client, podId, agentName, assistantName, assi
|
|
|
67
63
|
finally {
|
|
68
64
|
setIsLoading(false);
|
|
69
65
|
}
|
|
70
|
-
}, [autoSelectFirst, enabled, initialConversationId, limit, listConversations, pageToken
|
|
66
|
+
}, [autoSelectFirst, enabled, initialConversationId, limit, listConversations, pageToken]);
|
|
71
67
|
const loadMore = useCallback(async (overrides = {}) => {
|
|
72
68
|
if (!enabled || !nextPageToken || isLoading || isLoadingMore) {
|
|
73
69
|
return [];
|
|
@@ -77,8 +73,6 @@ export function useConversations({ client, podId, agentName, assistantName, assi
|
|
|
77
73
|
const response = await listConversations({
|
|
78
74
|
limit: overrides.limit ?? limit,
|
|
79
75
|
pageToken: nextPageToken,
|
|
80
|
-
status,
|
|
81
|
-
type,
|
|
82
76
|
});
|
|
83
77
|
const moreConversations = sortConversationsByUpdatedAt(response.items ?? []);
|
|
84
78
|
setConversations((previous) => [...previous, ...moreConversations]);
|
|
@@ -93,7 +87,7 @@ export function useConversations({ client, podId, agentName, assistantName, assi
|
|
|
93
87
|
finally {
|
|
94
88
|
setIsLoadingMore(false);
|
|
95
89
|
}
|
|
96
|
-
}, [conversations.length, enabled, isLoading, isLoadingMore, limit, listConversations, nextPageToken
|
|
90
|
+
}, [conversations.length, enabled, isLoading, isLoadingMore, limit, listConversations, nextPageToken]);
|
|
97
91
|
const createConversation = useCallback(async (input = {}) => {
|
|
98
92
|
const createdConversation = await sessionCreateConversation({
|
|
99
93
|
...input,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { WorkflowRunSummary } from "../types.js";
|
|
2
2
|
import type { UseFlowSessionResult } from "./useFlowSession.js";
|
|
3
3
|
export interface UseFlowRunHistoryOptions {
|
|
4
4
|
session: Pick<UseFlowSessionResult, "run" | "runId" | "setRunId" | "listHistory">;
|
|
@@ -7,13 +7,13 @@ export interface UseFlowRunHistoryOptions {
|
|
|
7
7
|
autoRefresh?: boolean;
|
|
8
8
|
}
|
|
9
9
|
export interface UseFlowRunHistoryResult {
|
|
10
|
-
runs:
|
|
10
|
+
runs: WorkflowRunSummary[];
|
|
11
11
|
selectedRunId: string | null;
|
|
12
12
|
effectiveSelectedRunId: string | null;
|
|
13
|
-
selectedRun:
|
|
13
|
+
selectedRun: WorkflowRunSummary | null;
|
|
14
14
|
isLoading: boolean;
|
|
15
15
|
error: Error | null;
|
|
16
16
|
setSelectedRunId: (runId: string | null) => void;
|
|
17
|
-
refresh: () => Promise<
|
|
17
|
+
refresh: () => Promise<WorkflowRunSummary[]>;
|
|
18
18
|
}
|
|
19
19
|
export declare function useFlowRunHistory({ session, flowName, limit, autoRefresh, }: UseFlowRunHistoryOptions): UseFlowRunHistoryResult;
|
|
@@ -43,21 +43,26 @@ export function useFlowRunHistory({ session, flowName, limit = 100, autoRefresh
|
|
|
43
43
|
useEffect(() => {
|
|
44
44
|
if (!liveRun?.id)
|
|
45
45
|
return;
|
|
46
|
+
const liveRunSummary = {
|
|
47
|
+
...liveRun,
|
|
48
|
+
id: liveRun.id,
|
|
49
|
+
};
|
|
46
50
|
setRuns((previous) => {
|
|
47
51
|
const index = previous.findIndex((run) => run.id === liveRun.id);
|
|
48
52
|
if (index === -1) {
|
|
49
|
-
return [
|
|
53
|
+
return [liveRunSummary, ...previous];
|
|
50
54
|
}
|
|
51
55
|
const next = [...previous];
|
|
52
|
-
next[index] = { ...next[index], ...
|
|
56
|
+
next[index] = { ...next[index], ...liveRunSummary };
|
|
53
57
|
return next;
|
|
54
58
|
});
|
|
55
59
|
}, [liveRun]);
|
|
56
60
|
const selectedRun = useMemo(() => {
|
|
57
61
|
if (!effectiveSelectedRunId)
|
|
58
62
|
return null;
|
|
59
|
-
if (liveRun?.id === effectiveSelectedRunId)
|
|
60
|
-
return liveRun;
|
|
63
|
+
if (liveRun?.id === effectiveSelectedRunId) {
|
|
64
|
+
return { ...liveRun, id: liveRun.id };
|
|
65
|
+
}
|
|
61
66
|
return runs.find((run) => run.id === effectiveSelectedRunId) ?? null;
|
|
62
67
|
}, [effectiveSelectedRunId, liveRun, runs]);
|
|
63
68
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LemmaClient } from "../client.js";
|
|
2
|
-
import type { FlowRun, WorkflowRunInputs } from "../types.js";
|
|
2
|
+
import type { FlowRun, WorkflowRunInputs, WorkflowRunSummary } from "../types.js";
|
|
3
3
|
export interface UseFlowSessionOptions {
|
|
4
4
|
client: LemmaClient;
|
|
5
5
|
podId?: string;
|
|
@@ -32,7 +32,7 @@ export interface UseFlowSessionResult {
|
|
|
32
32
|
flowName?: string;
|
|
33
33
|
limit?: number;
|
|
34
34
|
pageToken?: string;
|
|
35
|
-
}) => Promise<
|
|
35
|
+
}) => Promise<WorkflowRunSummary[]>;
|
|
36
36
|
cancel: (runId?: string | null) => Promise<void>;
|
|
37
37
|
retry: (runId?: string | null) => Promise<void>;
|
|
38
38
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FunctionRun } from "../types.js";
|
|
1
|
+
import type { FunctionRun, FunctionRunSummary } from "../types.js";
|
|
2
2
|
import { type UseFunctionSessionOptions, type UseFunctionSessionResult } from "./useFunctionSession.js";
|
|
3
3
|
/**
|
|
4
4
|
* React hook for running a pod function and tracking its output.
|
|
@@ -31,6 +31,6 @@ export interface UseFunctionRunResult extends Omit<UseFunctionSessionResult, "st
|
|
|
31
31
|
functionName?: string;
|
|
32
32
|
limit?: number;
|
|
33
33
|
pageToken?: string;
|
|
34
|
-
}) => Promise<
|
|
34
|
+
}) => Promise<FunctionRunSummary[]>;
|
|
35
35
|
}
|
|
36
36
|
export declare function useFunctionRun(options: UseFunctionRunOptions): UseFunctionRunResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LemmaClient } from "../client.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { FunctionRunSummary } from "../types.js";
|
|
3
3
|
export interface UseFunctionRunsOptions {
|
|
4
4
|
client: LemmaClient;
|
|
5
5
|
podId?: string;
|
|
@@ -11,12 +11,12 @@ export interface UseFunctionRunsOptions {
|
|
|
11
11
|
initialRunId?: string | null;
|
|
12
12
|
}
|
|
13
13
|
export interface UseFunctionRunsResult {
|
|
14
|
-
runs:
|
|
14
|
+
runs: FunctionRunSummary[];
|
|
15
15
|
total: number;
|
|
16
16
|
nextPageToken: string | null;
|
|
17
17
|
selectedRunId: string | null;
|
|
18
18
|
effectiveSelectedRunId: string | null;
|
|
19
|
-
selectedRun:
|
|
19
|
+
selectedRun: FunctionRunSummary | null;
|
|
20
20
|
isLoading: boolean;
|
|
21
21
|
isLoadingMore: boolean;
|
|
22
22
|
error: Error | null;
|
|
@@ -25,9 +25,9 @@ export interface UseFunctionRunsResult {
|
|
|
25
25
|
refresh: (overrides?: {
|
|
26
26
|
limit?: number;
|
|
27
27
|
pageToken?: string;
|
|
28
|
-
}) => Promise<
|
|
28
|
+
}) => Promise<FunctionRunSummary[]>;
|
|
29
29
|
loadMore: (overrides?: {
|
|
30
30
|
limit?: number;
|
|
31
|
-
}) => Promise<
|
|
31
|
+
}) => Promise<FunctionRunSummary[]>;
|
|
32
32
|
}
|
|
33
33
|
export declare function useFunctionRuns({ client, podId, functionName, enabled, autoLoad, limit, pageToken, initialRunId, }: UseFunctionRunsOptions): UseFunctionRunsResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LemmaClient } from "../client.js";
|
|
2
|
-
import type { FunctionRun } from "../types.js";
|
|
2
|
+
import type { FunctionRun, FunctionRunSummary } from "../types.js";
|
|
3
3
|
export interface UseFunctionSessionOptions {
|
|
4
4
|
client: LemmaClient;
|
|
5
5
|
podId?: string;
|
|
@@ -27,6 +27,6 @@ export interface UseFunctionSessionResult {
|
|
|
27
27
|
functionName?: string;
|
|
28
28
|
limit?: number;
|
|
29
29
|
pageToken?: string;
|
|
30
|
-
}) => Promise<
|
|
30
|
+
}) => Promise<FunctionRunSummary[]>;
|
|
31
31
|
}
|
|
32
32
|
export declare function useFunctionSession({ client, podId, functionName, runId: externalRunId, autoPoll, pollIntervalMs, onRun, onError, }: UseFunctionSessionOptions): UseFunctionSessionResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FlowRun, WorkflowRunInputs } from "../types.js";
|
|
1
|
+
import type { FlowRun, WorkflowRunInputs, WorkflowRunSummary } from "../types.js";
|
|
2
2
|
import { type UseFlowSessionOptions, type UseFlowSessionResult } from "./useFlowSession.js";
|
|
3
3
|
export interface UseWorkflowRunOptions extends Omit<UseFlowSessionOptions, "flowName"> {
|
|
4
4
|
workflowName?: string;
|
|
@@ -16,6 +16,6 @@ export interface UseWorkflowRunResult extends Omit<UseFlowSessionResult, "start"
|
|
|
16
16
|
workflowName?: string;
|
|
17
17
|
limit?: number;
|
|
18
18
|
pageToken?: string;
|
|
19
|
-
}) => Promise<
|
|
19
|
+
}) => Promise<WorkflowRunSummary[]>;
|
|
20
20
|
}
|
|
21
21
|
export declare function useWorkflowRun({ workflowName, ...options }: UseWorkflowRunOptions): UseWorkflowRunResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LemmaClient } from "../client.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { WorkflowRunSummary } from "../types.js";
|
|
3
3
|
export interface UseWorkflowRunsOptions {
|
|
4
4
|
client: LemmaClient;
|
|
5
5
|
podId?: string;
|
|
@@ -11,12 +11,12 @@ export interface UseWorkflowRunsOptions {
|
|
|
11
11
|
initialRunId?: string | null;
|
|
12
12
|
}
|
|
13
13
|
export interface UseWorkflowRunsResult {
|
|
14
|
-
runs:
|
|
14
|
+
runs: WorkflowRunSummary[];
|
|
15
15
|
total: number;
|
|
16
16
|
nextPageToken: string | null;
|
|
17
17
|
selectedRunId: string | null;
|
|
18
18
|
effectiveSelectedRunId: string | null;
|
|
19
|
-
selectedRun:
|
|
19
|
+
selectedRun: WorkflowRunSummary | null;
|
|
20
20
|
isLoading: boolean;
|
|
21
21
|
isLoadingMore: boolean;
|
|
22
22
|
error: Error | null;
|
|
@@ -25,9 +25,9 @@ export interface UseWorkflowRunsResult {
|
|
|
25
25
|
refresh: (overrides?: {
|
|
26
26
|
limit?: number;
|
|
27
27
|
pageToken?: string;
|
|
28
|
-
}) => Promise<
|
|
28
|
+
}) => Promise<WorkflowRunSummary[]>;
|
|
29
29
|
loadMore: (overrides?: {
|
|
30
30
|
limit?: number;
|
|
31
|
-
}) => Promise<
|
|
31
|
+
}) => Promise<WorkflowRunSummary[]>;
|
|
32
32
|
}
|
|
33
33
|
export declare function useWorkflowRuns({ client, podId, workflowName, enabled, autoLoad, limit, pageToken, initialRunId, }: UseWorkflowRunsOptions): UseWorkflowRunsResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LemmaClient } from "../client.js";
|
|
2
|
-
import type { FlowRun, Workflow, WorkflowStartType, WorkflowRunInputs } from "../types.js";
|
|
2
|
+
import type { FlowRun, Workflow, WorkflowStartType, WorkflowRunInputs, WorkflowRunSummary } from "../types.js";
|
|
3
3
|
import { type UseFlowSessionResult } from "./useFlowSession.js";
|
|
4
4
|
export interface UseWorkflowStartOptions {
|
|
5
5
|
client: LemmaClient;
|
|
@@ -25,7 +25,7 @@ export interface UseWorkflowStartResult extends Omit<UseFlowSessionResult, "star
|
|
|
25
25
|
listHistory: (options?: {
|
|
26
26
|
limit?: number;
|
|
27
27
|
pageToken?: string;
|
|
28
|
-
}) => Promise<
|
|
28
|
+
}) => Promise<WorkflowRunSummary[]>;
|
|
29
29
|
start: (inputs?: WorkflowRunInputs, options?: {
|
|
30
30
|
forceResume?: boolean;
|
|
31
31
|
}) => Promise<FlowRun>;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AgentRuntimeConfig, AgentHarnessInfo, AgentHarnessListResponse, AgentDetailResponse, AgentRuntimeProfileListResponse, AgentRuntimeProfileResponse, ColumnSchema, ConversationResponse as GeneratedConversationResponse, CreateAgentRequest, DatastoreQueryResponse, DirectoryTreeNode, DirectoryTreeResponse, FileDetailResponse, FileSearchResponse, FileSearchResultSchema, FlowDetailResponse, FlowRunEntity, FunctionDetailResponse, FunctionRunResponse, FunctionRunSummaryResponse, HarnessKind, IconUploadResponse, OrganizationInvitationResponse, OrganizationMemberResponse, OrganizationResponse, PodConfigResponse, PodJoinRequestCreateResponse, PodMemberResponse, PodRoleResponse, PodResponse, ResourceAccessGrantResponse, ResourceAccessResponse, ResourceType as GeneratedResourceType, ScheduleDetailResponse, TableDetailResponse, UpdateAgentRequest, UsageRecordResponse as GeneratedUsageRecordResponse, UsageListResponse as GeneratedUsageListResponse, UsageStatsBucketResponse as GeneratedUsageStatsBucketResponse, UsageStatsResponse as GeneratedUsageStatsResponse, UsageSummaryResponse as GeneratedUsageSummaryResponse, UserResponse, WorkflowRunWaitAssignment, WorkflowRunSummaryResponse } from "./openapi_client/index.js";
|
|
2
2
|
/** Public ergonomic types. */
|
|
3
3
|
export interface AvailableModelInfo {
|
|
4
4
|
id: ConversationModel;
|
|
5
5
|
name: string;
|
|
6
|
+
runtime?: AgentRuntimeConfig;
|
|
7
|
+
agentRuntime?: AgentRuntimeResponse;
|
|
8
|
+
agentRuntimeId?: string;
|
|
9
|
+
profile?: AgentRuntimeProfileResponse;
|
|
10
|
+
profile_id?: string;
|
|
11
|
+
harness_kind?: HarnessKind;
|
|
6
12
|
description?: string | null;
|
|
7
13
|
}
|
|
8
|
-
export type AvailableModels =
|
|
14
|
+
export type AvailableModels = ConversationModel;
|
|
15
|
+
export type AgentRuntime = AgentRuntimeConfig;
|
|
16
|
+
export type AgentRuntimeAvailability = AgentHarnessInfo;
|
|
17
|
+
export type AgentRuntimeAvailabilityList = AgentHarnessListResponse;
|
|
18
|
+
export type AgentRuntimeListResponse = AgentRuntimeProfileListResponse;
|
|
19
|
+
export type AgentRuntimeResponse = AgentRuntimeProfileResponse;
|
|
9
20
|
export interface PageResult<T> {
|
|
10
21
|
items: T[];
|
|
11
22
|
nextPageToken?: string;
|
|
@@ -42,10 +53,10 @@ export interface StreamOptions {
|
|
|
42
53
|
signal?: AbortSignal;
|
|
43
54
|
}
|
|
44
55
|
/** Ergonomic entity aliases (instead of *Response/*Request names). */
|
|
45
|
-
export type Agent =
|
|
56
|
+
export type Agent = AgentDetailResponse;
|
|
46
57
|
export type CreateAgentInput = CreateAgentRequest;
|
|
47
58
|
export type UpdateAgentInput = UpdateAgentRequest;
|
|
48
|
-
export type ConversationModel =
|
|
59
|
+
export type ConversationModel = string & {};
|
|
49
60
|
export type Conversation = GeneratedConversationResponse & {
|
|
50
61
|
model?: ConversationModel | null;
|
|
51
62
|
status?: string | null;
|
|
@@ -57,22 +68,31 @@ export interface ConversationMessageResponse {
|
|
|
57
68
|
created_at: string;
|
|
58
69
|
conversation_id?: string;
|
|
59
70
|
sequence?: number;
|
|
71
|
+
agent_run_id?: string | null;
|
|
60
72
|
metadata?: Record<string, unknown> | null;
|
|
61
73
|
tool_call_id?: string | null;
|
|
62
74
|
tool_name?: string | null;
|
|
63
75
|
}
|
|
64
76
|
export type ConversationMessage = ConversationMessageResponse;
|
|
65
77
|
export type FunctionRun = FunctionRunResponse;
|
|
78
|
+
export type FunctionRunSummary = FunctionRunSummaryResponse;
|
|
66
79
|
export type FlowRun = FlowRunEntity;
|
|
67
|
-
export type
|
|
80
|
+
export type WorkflowRunSummary = WorkflowRunSummaryResponse;
|
|
81
|
+
/** @deprecated Use Workflow or FlowDetailResponse. */
|
|
82
|
+
export type FlowResponse = FlowDetailResponse;
|
|
83
|
+
export type Workflow = FlowDetailResponse;
|
|
68
84
|
export type WorkflowStart = Workflow["start"];
|
|
69
85
|
export type WorkflowStartType = NonNullable<WorkflowStart>["type"];
|
|
70
|
-
export type Schedule =
|
|
86
|
+
export type Schedule = ScheduleDetailResponse;
|
|
71
87
|
export type WorkflowRunWait = WorkflowRunWaitAssignment;
|
|
72
|
-
|
|
88
|
+
/** @deprecated Use Table or TableDetailResponse. */
|
|
89
|
+
export type TableResponse = TableDetailResponse;
|
|
90
|
+
export type Table = TableDetailResponse;
|
|
73
91
|
export type TableColumn = ColumnSchema;
|
|
74
92
|
export type DatastoreQueryResult = DatastoreQueryResponse;
|
|
75
|
-
|
|
93
|
+
/** @deprecated Use DatastoreFile or FileDetailResponse. */
|
|
94
|
+
export type FileResponse = FileDetailResponse;
|
|
95
|
+
export type DatastoreFile = FileDetailResponse;
|
|
76
96
|
export type DatastoreFileSearchResponse = FileSearchResponse;
|
|
77
97
|
export type DatastoreFileSearchResult = FileSearchResultSchema;
|
|
78
98
|
export type DatastoreDirectoryTree = DirectoryTreeResponse;
|
|
@@ -82,11 +102,28 @@ export type Pod = PodResponse;
|
|
|
82
102
|
export type PodConfig = PodConfigResponse;
|
|
83
103
|
export type PodMember = PodMemberResponse;
|
|
84
104
|
export type PodJoinRequest = PodJoinRequestCreateResponse;
|
|
105
|
+
export type PodRoleInfo = PodRoleResponse;
|
|
106
|
+
export type ResourceAccess = ResourceAccessResponse;
|
|
107
|
+
export type ResourceAccessGrant = ResourceAccessGrantResponse;
|
|
108
|
+
export type ResourceAccessType = GeneratedResourceType;
|
|
85
109
|
export type Organization = OrganizationResponse;
|
|
86
110
|
export type OrganizationMember = OrganizationMemberResponse;
|
|
87
111
|
export type OrganizationInvitation = OrganizationInvitationResponse;
|
|
88
112
|
export type User = UserResponse;
|
|
89
113
|
export type UploadedIcon = IconUploadResponse;
|
|
114
|
+
/** @deprecated Use FunctionDetailResponse. */
|
|
115
|
+
export type FunctionResponse = FunctionDetailResponse;
|
|
116
|
+
/** @deprecated Use UsageListResponse for recent usage events. */
|
|
117
|
+
export type RecentUsageResponse = Omit<GeneratedUsageListResponse, "items"> & {
|
|
118
|
+
items: UsageRecordResponse[];
|
|
119
|
+
};
|
|
120
|
+
export type UsageSummaryResponse = GeneratedUsageSummaryResponse;
|
|
121
|
+
export type UsageStatsBucketResponse = GeneratedUsageStatsBucketResponse;
|
|
122
|
+
export type UsageStatsResponse = Omit<GeneratedUsageStatsResponse, "items"> & {
|
|
123
|
+
items: UsageStatsBucketResponse[];
|
|
124
|
+
};
|
|
125
|
+
export type UsageRecordResponse = GeneratedUsageRecordResponse;
|
|
126
|
+
export type { AuthConfigCreateSchema, AuthConfigListResponseSchema, AuthConfigResponseSchema, } from "./namespaces/integrations.js";
|
|
90
127
|
/** Generic cursor-style page shape used by many list endpoints. */
|
|
91
128
|
export interface CursorPage<T> {
|
|
92
129
|
items: T[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lemma-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.44",
|
|
4
4
|
"description": "Official TypeScript SDK for Lemma pod-scoped APIs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"supertokens-web-js": "^0.16.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@types/react": "^
|
|
64
|
+
"@types/react": "^19.2.14",
|
|
65
65
|
"openapi-typescript-codegen": "^0.29.0",
|
|
66
66
|
"shadcn": "^4.2.0",
|
|
67
67
|
"typescript": "^5.6.3"
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Models that can be selected for an agent conversation.
|
|
3
|
-
*/
|
|
4
|
-
export declare enum AgentModelName {
|
|
5
|
-
GEMINI_PRO = "GEMINI_PRO",
|
|
6
|
-
GEMINI_FLASH = "GEMINI_FLASH",
|
|
7
|
-
GEMINI_FLASH_LITE = "GEMINI_FLASH_LITE",
|
|
8
|
-
KIMI_K2 = "KIMI_K2",
|
|
9
|
-
GPT_OSS = "GPT_OSS",
|
|
10
|
-
DEEPSEEK_V32 = "DEEPSEEK_V32",
|
|
11
|
-
GLM_5 = "GLM_5",
|
|
12
|
-
QWEN3_6 = "QWEN3_6"
|
|
13
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
-
/* istanbul ignore file */
|
|
3
|
-
/* tslint:disable */
|
|
4
|
-
/* eslint-disable */
|
|
5
|
-
/**
|
|
6
|
-
* Models that can be selected for an agent conversation.
|
|
7
|
-
*/
|
|
8
|
-
export var AgentModelName;
|
|
9
|
-
(function (AgentModelName) {
|
|
10
|
-
AgentModelName["GEMINI_PRO"] = "GEMINI_PRO";
|
|
11
|
-
AgentModelName["GEMINI_FLASH"] = "GEMINI_FLASH";
|
|
12
|
-
AgentModelName["GEMINI_FLASH_LITE"] = "GEMINI_FLASH_LITE";
|
|
13
|
-
AgentModelName["KIMI_K2"] = "KIMI_K2";
|
|
14
|
-
AgentModelName["GPT_OSS"] = "GPT_OSS";
|
|
15
|
-
AgentModelName["DEEPSEEK_V32"] = "DEEPSEEK_V32";
|
|
16
|
-
AgentModelName["GLM_5"] = "GLM_5";
|
|
17
|
-
AgentModelName["QWEN3_6"] = "QWEN3_6";
|
|
18
|
-
})(AgentModelName || (AgentModelName = {}));
|