@blaxel/core 0.2.0-preview3 → 0.2.0-preview5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/sdk.gen.d.ts +32 -2
- package/dist/client/sdk.gen.js +112 -2
- package/dist/client/types.gen.d.ts +237 -17
- package/dist/common/env.js +3 -7
- package/dist/common/internal.d.ts +1 -1
- package/dist/common/internal.js +3 -6
- package/dist/common/settings.d.ts +2 -0
- package/dist/common/settings.js +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/jobs/index.d.ts +1 -0
- package/dist/jobs/index.js +17 -0
- package/dist/jobs/jobs.d.ts +10 -0
- package/dist/jobs/jobs.js +42 -0
- package/dist/mcp/client.js +0 -3
- package/dist/mcp/server/http.d.ts +8 -0
- package/dist/mcp/server/http.js +16 -0
- package/dist/mcp/server/index.d.ts +4 -0
- package/dist/mcp/server/index.js +21 -0
- package/dist/mcp/server/websocket.d.ts +24 -0
- package/dist/mcp/server/websocket.js +213 -0
- package/dist/sandbox/action.d.ts +4 -3
- package/dist/sandbox/action.js +16 -2
- package/dist/sandbox/client/sdk.gen.d.ts +9 -6
- package/dist/sandbox/client/sdk.gen.js +14 -3
- package/dist/sandbox/client/types.gen.d.ts +33 -17
- package/dist/sandbox/filesystem.d.ts +6 -0
- package/dist/sandbox/filesystem.js +77 -0
- package/dist/sandbox/process.d.ts +11 -0
- package/dist/sandbox/process.js +77 -0
- package/dist/sandbox/sandbox.d.ts +5 -1
- package/dist/sandbox/sandbox.js +6 -0
- package/dist/sandbox/session.d.ts +21 -0
- package/dist/sandbox/session.js +97 -0
- package/dist/sandbox/types.d.ts +15 -0
- package/dist/sandbox/types.js +2 -0
- package/dist/telemetry/telemetry.d.ts +1 -0
- package/dist/telemetry/telemetry.js +14 -0
- package/package.json +5 -1
package/dist/client/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
|
|
2
|
-
import type { ListAgentsData, CreateAgentData, DeleteAgentData, GetAgentData, UpdateAgentData, ListAgentRevisionsData, GetConfigurationData, ListFunctionsData, CreateFunctionData, DeleteFunctionData, GetFunctionData, UpdateFunctionData, ListFunctionRevisionsData, GetIntegrationData, ListIntegrationConnectionsData, CreateIntegrationConnectionData, DeleteIntegrationConnectionData, GetIntegrationConnectionData, UpdateIntegrationConnectionData, GetIntegrationConnectionModelEndpointConfigurationsData, ListIntegrationConnectionModelsData, GetIntegrationConnectionModelData, ListKnowledgebasesData, CreateKnowledgebaseData, DeleteKnowledgebaseData, GetKnowledgebaseData, UpdateKnowledgebaseData, ListKnowledgebaseRevisionsData, ListLocationsData, ListMcpHubDefinitionsData, ListModelsData, CreateModelData, DeleteModelData, GetModelData, UpdateModelData, ListModelRevisionsData, ListPoliciesData, CreatePolicyData, DeletePolicyData, GetPolicyData, UpdatePolicyData, ListPrivateClustersData, CreatePrivateClusterData, DeletePrivateClusterData, GetPrivateClusterData, UpdatePrivateClusterData, GetPrivateClusterHealthData, UpdatePrivateClusterHealthData, ListAllPendingInvitationsData, ListSandboxHubDefinitionsData, ListSandboxesData, CreateSandboxData, DeleteSandboxData, GetSandboxData, UpdateSandboxData, ListSandboxPreviewsData, CreateSandboxPreviewData, DeleteSandboxPreviewData, GetSandboxPreviewData, UpdateSandboxPreviewData, ListSandboxPreviewTokensData, CreateSandboxPreviewTokenData, DeleteSandboxPreviewTokenData, StartSandboxData, StopSandboxData, GetWorkspaceServiceAccountsData, CreateWorkspaceServiceAccountData, DeleteWorkspaceServiceAccountData, UpdateWorkspaceServiceAccountData, ListApiKeysForServiceAccountData, CreateApiKeyForServiceAccountData, DeleteApiKeyForServiceAccountData, ListTemplatesData, GetTemplateData, GetTemplateContentsData, GetTemplateFileContentsData, ListWorkspaceUsersData, InviteWorkspaceUserData, RemoveWorkspaceUserData, UpdateWorkspaceUserRoleData, ListWorkspacesData, CreateWorspaceData, DeleteWorkspaceData, GetWorkspaceData, UpdateWorkspaceData, DeclineWorkspaceInvitationData, AcceptWorkspaceInvitationData, LeaveWorkspaceData, CheckWorkspaceAvailabilityData } from './types.gen.js';
|
|
2
|
+
import type { ListAgentsData, CreateAgentData, DeleteAgentData, GetAgentData, UpdateAgentData, ListAgentRevisionsData, GetConfigurationData, ListFunctionsData, CreateFunctionData, DeleteFunctionData, GetFunctionData, UpdateFunctionData, ListFunctionRevisionsData, GetIntegrationData, ListIntegrationConnectionsData, CreateIntegrationConnectionData, DeleteIntegrationConnectionData, GetIntegrationConnectionData, UpdateIntegrationConnectionData, GetIntegrationConnectionModelEndpointConfigurationsData, ListIntegrationConnectionModelsData, GetIntegrationConnectionModelData, ListJobsData, CreateJobData, DeleteJobData, GetJobData, UpdateJobData, ListJobRevisionsData, ListKnowledgebasesData, CreateKnowledgebaseData, DeleteKnowledgebaseData, GetKnowledgebaseData, UpdateKnowledgebaseData, ListKnowledgebaseRevisionsData, ListLocationsData, ListMcpHubDefinitionsData, ListModelsData, CreateModelData, DeleteModelData, GetModelData, UpdateModelData, ListModelRevisionsData, ListPoliciesData, CreatePolicyData, DeletePolicyData, GetPolicyData, UpdatePolicyData, ListPrivateClustersData, CreatePrivateClusterData, DeletePrivateClusterData, GetPrivateClusterData, UpdatePrivateClusterData, GetPrivateClusterHealthData, UpdatePrivateClusterHealthData, ListAllPendingInvitationsData, ListSandboxHubDefinitionsData, ListSandboxesData, CreateSandboxData, DeleteSandboxData, GetSandboxData, UpdateSandboxData, ListSandboxPreviewsData, CreateSandboxPreviewData, DeleteSandboxPreviewData, GetSandboxPreviewData, UpdateSandboxPreviewData, ListSandboxPreviewTokensData, CreateSandboxPreviewTokenData, DeleteSandboxPreviewTokenData, StartSandboxData, StopSandboxData, GetWorkspaceServiceAccountsData, CreateWorkspaceServiceAccountData, DeleteWorkspaceServiceAccountData, UpdateWorkspaceServiceAccountData, ListApiKeysForServiceAccountData, CreateApiKeyForServiceAccountData, DeleteApiKeyForServiceAccountData, ListTemplatesData, GetTemplateData, GetTemplateContentsData, GetTemplateFileContentsData, ListWorkspaceUsersData, InviteWorkspaceUserData, RemoveWorkspaceUserData, UpdateWorkspaceUserRoleData, ListWorkspacesData, CreateWorspaceData, DeleteWorkspaceData, GetWorkspaceData, UpdateWorkspaceData, DeclineWorkspaceInvitationData, AcceptWorkspaceInvitationData, LeaveWorkspaceData, CheckWorkspaceAvailabilityData } from './types.gen.js';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -70,7 +70,7 @@ export declare const listFunctionRevisions: <ThrowOnError extends boolean = fals
|
|
|
70
70
|
* List integrations connections
|
|
71
71
|
* Returns integration information by name.
|
|
72
72
|
*/
|
|
73
|
-
export declare const getIntegration: <ThrowOnError extends boolean = false>(options: Options<GetIntegrationData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<
|
|
73
|
+
export declare const getIntegration: <ThrowOnError extends boolean = false>(options: Options<GetIntegrationData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Integration, unknown, ThrowOnError>;
|
|
74
74
|
/**
|
|
75
75
|
* List integrations connections
|
|
76
76
|
* Returns a list of all connections integrations in the workspace.
|
|
@@ -111,6 +111,36 @@ export declare const listIntegrationConnectionModels: <ThrowOnError extends bool
|
|
|
111
111
|
* Returns a model for an integration connection by ID.
|
|
112
112
|
*/
|
|
113
113
|
export declare const getIntegrationConnectionModel: <ThrowOnError extends boolean = false>(options: Options<GetIntegrationConnectionModelData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<unknown, unknown, ThrowOnError>;
|
|
114
|
+
/**
|
|
115
|
+
* List jobs
|
|
116
|
+
* Returns a list of all jobs in the workspace.
|
|
117
|
+
*/
|
|
118
|
+
export declare const listJobs: <ThrowOnError extends boolean = false>(options?: Options<ListJobsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Job[], unknown, ThrowOnError>;
|
|
119
|
+
/**
|
|
120
|
+
* Create job
|
|
121
|
+
* Creates a job.
|
|
122
|
+
*/
|
|
123
|
+
export declare const createJob: <ThrowOnError extends boolean = false>(options: Options<CreateJobData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Job, unknown, ThrowOnError>;
|
|
124
|
+
/**
|
|
125
|
+
* Delete job
|
|
126
|
+
* Deletes a job by name.
|
|
127
|
+
*/
|
|
128
|
+
export declare const deleteJob: <ThrowOnError extends boolean = false>(options: Options<DeleteJobData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Job, unknown, ThrowOnError>;
|
|
129
|
+
/**
|
|
130
|
+
* Get job
|
|
131
|
+
* Returns a job by name.
|
|
132
|
+
*/
|
|
133
|
+
export declare const getJob: <ThrowOnError extends boolean = false>(options: Options<GetJobData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Model, unknown, ThrowOnError>;
|
|
134
|
+
/**
|
|
135
|
+
* Create or update job
|
|
136
|
+
* Update a job by name.
|
|
137
|
+
*/
|
|
138
|
+
export declare const updateJob: <ThrowOnError extends boolean = false>(options: Options<UpdateJobData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").Job, unknown, ThrowOnError>;
|
|
139
|
+
/**
|
|
140
|
+
* List job revisions
|
|
141
|
+
* Returns revisions for a job by name.
|
|
142
|
+
*/
|
|
143
|
+
export declare const listJobRevisions: <ThrowOnError extends boolean = false>(options: Options<ListJobRevisionsData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen.js").RevisionMetadata[], unknown, ThrowOnError>;
|
|
114
144
|
/**
|
|
115
145
|
* List knowledgebases
|
|
116
146
|
* Returns a list of all knowledgebases in the workspace.
|
package/dist/client/sdk.gen.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.checkWorkspaceAvailability = exports.leaveWorkspace = exports.acceptWorkspaceInvitation = exports.declineWorkspaceInvitation = exports.updateWorkspace = exports.getWorkspace = exports.deleteWorkspace = exports.createWorspace = exports.listWorkspaces = exports.updateWorkspaceUserRole = exports.removeWorkspaceUser = exports.inviteWorkspaceUser = exports.listWorkspaceUsers = exports.getTemplateFileContents = exports.getTemplateContents = exports.getTemplate = exports.listTemplates = exports.deleteApiKeyForServiceAccount = exports.createApiKeyForServiceAccount = exports.listApiKeysForServiceAccount = exports.updateWorkspaceServiceAccount = exports.deleteWorkspaceServiceAccount = exports.createWorkspaceServiceAccount = exports.getWorkspaceServiceAccounts = exports.stopSandbox = exports.startSandbox = exports.deleteSandboxPreviewToken = exports.createSandboxPreviewToken = exports.listSandboxPreviewTokens = exports.updateSandboxPreview = exports.getSandboxPreview = exports.deleteSandboxPreview = exports.createSandboxPreview = exports.listSandboxPreviews = exports.updateSandbox = exports.getSandbox = exports.deleteSandbox = exports.createSandbox = exports.listSandboxes = void 0;
|
|
4
|
+
exports.deletePrivateCluster = exports.createPrivateCluster = exports.listPrivateClusters = exports.updatePolicy = exports.getPolicy = exports.deletePolicy = exports.createPolicy = exports.listPolicies = exports.listModelRevisions = exports.updateModel = exports.getModel = exports.deleteModel = exports.createModel = exports.listModels = exports.listMcpHubDefinitions = exports.listLocations = exports.listKnowledgebaseRevisions = exports.updateKnowledgebase = exports.getKnowledgebase = exports.deleteKnowledgebase = exports.createKnowledgebase = exports.listKnowledgebases = exports.listJobRevisions = exports.updateJob = exports.getJob = exports.deleteJob = exports.createJob = exports.listJobs = exports.getIntegrationConnectionModel = exports.listIntegrationConnectionModels = exports.getIntegrationConnectionModelEndpointConfigurations = exports.updateIntegrationConnection = exports.getIntegrationConnection = exports.deleteIntegrationConnection = exports.createIntegrationConnection = exports.listIntegrationConnections = exports.getIntegration = exports.listFunctionRevisions = exports.updateFunction = exports.getFunction = exports.deleteFunction = exports.createFunction = exports.listFunctions = exports.getConfiguration = exports.listAgentRevisions = exports.updateAgent = exports.getAgent = exports.deleteAgent = exports.createAgent = exports.listAgents = void 0;
|
|
5
|
+
exports.checkWorkspaceAvailability = exports.leaveWorkspace = exports.acceptWorkspaceInvitation = exports.declineWorkspaceInvitation = exports.updateWorkspace = exports.getWorkspace = exports.deleteWorkspace = exports.createWorspace = exports.listWorkspaces = exports.updateWorkspaceUserRole = exports.removeWorkspaceUser = exports.inviteWorkspaceUser = exports.listWorkspaceUsers = exports.getTemplateFileContents = exports.getTemplateContents = exports.getTemplate = exports.listTemplates = exports.deleteApiKeyForServiceAccount = exports.createApiKeyForServiceAccount = exports.listApiKeysForServiceAccount = exports.updateWorkspaceServiceAccount = exports.deleteWorkspaceServiceAccount = exports.createWorkspaceServiceAccount = exports.getWorkspaceServiceAccounts = exports.stopSandbox = exports.startSandbox = exports.deleteSandboxPreviewToken = exports.createSandboxPreviewToken = exports.listSandboxPreviewTokens = exports.updateSandboxPreview = exports.getSandboxPreview = exports.deleteSandboxPreview = exports.createSandboxPreview = exports.listSandboxPreviews = exports.updateSandbox = exports.getSandbox = exports.deleteSandbox = exports.createSandbox = exports.listSandboxes = exports.listSandboxHubDefinitions = exports.listAllPendingInvitations = exports.updatePrivateClusterHealth = exports.getPrivateClusterHealth = exports.updatePrivateCluster = exports.getPrivateCluster = void 0;
|
|
6
6
|
const client_gen_1 = require("./client.gen");
|
|
7
7
|
/**
|
|
8
8
|
* List all agents
|
|
@@ -390,6 +390,116 @@ const getIntegrationConnectionModel = (options) => {
|
|
|
390
390
|
});
|
|
391
391
|
};
|
|
392
392
|
exports.getIntegrationConnectionModel = getIntegrationConnectionModel;
|
|
393
|
+
/**
|
|
394
|
+
* List jobs
|
|
395
|
+
* Returns a list of all jobs in the workspace.
|
|
396
|
+
*/
|
|
397
|
+
const listJobs = (options) => {
|
|
398
|
+
return (options?.client ?? client_gen_1.client).get({
|
|
399
|
+
security: [
|
|
400
|
+
{
|
|
401
|
+
scheme: 'bearer',
|
|
402
|
+
type: 'http'
|
|
403
|
+
}
|
|
404
|
+
],
|
|
405
|
+
url: '/jobs',
|
|
406
|
+
...options
|
|
407
|
+
});
|
|
408
|
+
};
|
|
409
|
+
exports.listJobs = listJobs;
|
|
410
|
+
/**
|
|
411
|
+
* Create job
|
|
412
|
+
* Creates a job.
|
|
413
|
+
*/
|
|
414
|
+
const createJob = (options) => {
|
|
415
|
+
return (options.client ?? client_gen_1.client).post({
|
|
416
|
+
security: [
|
|
417
|
+
{
|
|
418
|
+
scheme: 'bearer',
|
|
419
|
+
type: 'http'
|
|
420
|
+
}
|
|
421
|
+
],
|
|
422
|
+
url: '/jobs',
|
|
423
|
+
...options,
|
|
424
|
+
headers: {
|
|
425
|
+
'Content-Type': 'application/json',
|
|
426
|
+
...options?.headers
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
};
|
|
430
|
+
exports.createJob = createJob;
|
|
431
|
+
/**
|
|
432
|
+
* Delete job
|
|
433
|
+
* Deletes a job by name.
|
|
434
|
+
*/
|
|
435
|
+
const deleteJob = (options) => {
|
|
436
|
+
return (options.client ?? client_gen_1.client).delete({
|
|
437
|
+
security: [
|
|
438
|
+
{
|
|
439
|
+
scheme: 'bearer',
|
|
440
|
+
type: 'http'
|
|
441
|
+
}
|
|
442
|
+
],
|
|
443
|
+
url: '/jobs/{jobId}',
|
|
444
|
+
...options
|
|
445
|
+
});
|
|
446
|
+
};
|
|
447
|
+
exports.deleteJob = deleteJob;
|
|
448
|
+
/**
|
|
449
|
+
* Get job
|
|
450
|
+
* Returns a job by name.
|
|
451
|
+
*/
|
|
452
|
+
const getJob = (options) => {
|
|
453
|
+
return (options.client ?? client_gen_1.client).get({
|
|
454
|
+
security: [
|
|
455
|
+
{
|
|
456
|
+
scheme: 'bearer',
|
|
457
|
+
type: 'http'
|
|
458
|
+
}
|
|
459
|
+
],
|
|
460
|
+
url: '/jobs/{jobId}',
|
|
461
|
+
...options
|
|
462
|
+
});
|
|
463
|
+
};
|
|
464
|
+
exports.getJob = getJob;
|
|
465
|
+
/**
|
|
466
|
+
* Create or update job
|
|
467
|
+
* Update a job by name.
|
|
468
|
+
*/
|
|
469
|
+
const updateJob = (options) => {
|
|
470
|
+
return (options.client ?? client_gen_1.client).put({
|
|
471
|
+
security: [
|
|
472
|
+
{
|
|
473
|
+
scheme: 'bearer',
|
|
474
|
+
type: 'http'
|
|
475
|
+
}
|
|
476
|
+
],
|
|
477
|
+
url: '/jobs/{jobId}',
|
|
478
|
+
...options,
|
|
479
|
+
headers: {
|
|
480
|
+
'Content-Type': 'application/json',
|
|
481
|
+
...options?.headers
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
};
|
|
485
|
+
exports.updateJob = updateJob;
|
|
486
|
+
/**
|
|
487
|
+
* List job revisions
|
|
488
|
+
* Returns revisions for a job by name.
|
|
489
|
+
*/
|
|
490
|
+
const listJobRevisions = (options) => {
|
|
491
|
+
return (options.client ?? client_gen_1.client).get({
|
|
492
|
+
security: [
|
|
493
|
+
{
|
|
494
|
+
scheme: 'bearer',
|
|
495
|
+
type: 'http'
|
|
496
|
+
}
|
|
497
|
+
],
|
|
498
|
+
url: '/jobs/{jobId}/revisions',
|
|
499
|
+
...options
|
|
500
|
+
});
|
|
501
|
+
};
|
|
502
|
+
exports.listJobRevisions = listJobRevisions;
|
|
393
503
|
/**
|
|
394
504
|
* List knowledgebases
|
|
395
505
|
* Returns a list of all knowledgebases in the workspace.
|
|
@@ -419,6 +419,32 @@ export type HistogramStats = {
|
|
|
419
419
|
*/
|
|
420
420
|
p99?: number;
|
|
421
421
|
};
|
|
422
|
+
/**
|
|
423
|
+
* Integration
|
|
424
|
+
*/
|
|
425
|
+
export type Integration = {
|
|
426
|
+
/**
|
|
427
|
+
* Integration additional infos
|
|
428
|
+
*/
|
|
429
|
+
additionalInfos?: {
|
|
430
|
+
[key: string]: string;
|
|
431
|
+
};
|
|
432
|
+
endpoints?: IntegrationEndpoints;
|
|
433
|
+
headers?: IntegrationHeaders;
|
|
434
|
+
/**
|
|
435
|
+
* Integration name
|
|
436
|
+
*/
|
|
437
|
+
name?: string;
|
|
438
|
+
/**
|
|
439
|
+
* Integration organizations
|
|
440
|
+
*/
|
|
441
|
+
organizations?: Array<IntegrationOrganization>;
|
|
442
|
+
params?: IntegrationQueryParams;
|
|
443
|
+
/**
|
|
444
|
+
* Integration repositories
|
|
445
|
+
*/
|
|
446
|
+
repositories?: Array<IntegrationRepository>;
|
|
447
|
+
};
|
|
422
448
|
/**
|
|
423
449
|
* Integration Connection
|
|
424
450
|
*/
|
|
@@ -452,6 +478,62 @@ export type IntegrationConnectionSpec = {
|
|
|
452
478
|
};
|
|
453
479
|
};
|
|
454
480
|
export type IntegrationConnectionsList = Array<string>;
|
|
481
|
+
/**
|
|
482
|
+
* Integration endpoint
|
|
483
|
+
*/
|
|
484
|
+
export type IntegrationEndpoint = {
|
|
485
|
+
/**
|
|
486
|
+
* Integration endpoint body
|
|
487
|
+
*/
|
|
488
|
+
body?: string;
|
|
489
|
+
/**
|
|
490
|
+
* Integration endpoint ignore models
|
|
491
|
+
*/
|
|
492
|
+
ignoreModels?: Array<unknown>;
|
|
493
|
+
/**
|
|
494
|
+
* Integration endpoint method
|
|
495
|
+
*/
|
|
496
|
+
method?: string;
|
|
497
|
+
/**
|
|
498
|
+
* Integration endpoint models
|
|
499
|
+
*/
|
|
500
|
+
models?: Array<unknown>;
|
|
501
|
+
/**
|
|
502
|
+
* Integration endpoint stream key
|
|
503
|
+
*/
|
|
504
|
+
streamKey?: string;
|
|
505
|
+
streamToken?: IntegrationEndpointToken;
|
|
506
|
+
token?: IntegrationEndpointToken;
|
|
507
|
+
};
|
|
508
|
+
/**
|
|
509
|
+
* Integration endpoint token
|
|
510
|
+
*/
|
|
511
|
+
export type IntegrationEndpointToken = {
|
|
512
|
+
/**
|
|
513
|
+
* Integration endpoint token received
|
|
514
|
+
*/
|
|
515
|
+
received?: string;
|
|
516
|
+
/**
|
|
517
|
+
* Integration endpoint token sent
|
|
518
|
+
*/
|
|
519
|
+
sent?: string;
|
|
520
|
+
/**
|
|
521
|
+
* Integration endpoint token total
|
|
522
|
+
*/
|
|
523
|
+
total?: string;
|
|
524
|
+
};
|
|
525
|
+
/**
|
|
526
|
+
* Integration endpoints
|
|
527
|
+
*/
|
|
528
|
+
export type IntegrationEndpoints = {
|
|
529
|
+
[key: string]: IntegrationEndpoint;
|
|
530
|
+
};
|
|
531
|
+
/**
|
|
532
|
+
* Integration headers
|
|
533
|
+
*/
|
|
534
|
+
export type IntegrationHeaders = {
|
|
535
|
+
[key: string]: string;
|
|
536
|
+
};
|
|
455
537
|
/**
|
|
456
538
|
* Model obtained from an external authentication provider, such as HuggingFace, OpenAI, etc...
|
|
457
539
|
*/
|
|
@@ -505,6 +587,33 @@ export type IntegrationModel = {
|
|
|
505
587
|
*/
|
|
506
588
|
trending_score?: number;
|
|
507
589
|
};
|
|
590
|
+
/**
|
|
591
|
+
* Integration organization
|
|
592
|
+
*/
|
|
593
|
+
export type IntegrationOrganization = {
|
|
594
|
+
/**
|
|
595
|
+
* Provider organization avatar URL
|
|
596
|
+
*/
|
|
597
|
+
avatar_url?: string;
|
|
598
|
+
/**
|
|
599
|
+
* Provider organization display name
|
|
600
|
+
*/
|
|
601
|
+
displayName?: string;
|
|
602
|
+
/**
|
|
603
|
+
* Provider organization ID
|
|
604
|
+
*/
|
|
605
|
+
id?: string;
|
|
606
|
+
/**
|
|
607
|
+
* Provider organization name
|
|
608
|
+
*/
|
|
609
|
+
name?: string;
|
|
610
|
+
};
|
|
611
|
+
/**
|
|
612
|
+
* Integration query params
|
|
613
|
+
*/
|
|
614
|
+
export type IntegrationQueryParams = {
|
|
615
|
+
[key: string]: string;
|
|
616
|
+
};
|
|
508
617
|
/**
|
|
509
618
|
* Integration repository
|
|
510
619
|
*/
|
|
@@ -530,6 +639,22 @@ export type IntegrationRepository = {
|
|
|
530
639
|
*/
|
|
531
640
|
url?: string;
|
|
532
641
|
};
|
|
642
|
+
/**
|
|
643
|
+
* Job
|
|
644
|
+
*/
|
|
645
|
+
export type Job = {
|
|
646
|
+
events?: CoreEvents;
|
|
647
|
+
metadata?: Metadata;
|
|
648
|
+
spec?: JobSpec;
|
|
649
|
+
/**
|
|
650
|
+
* Job status
|
|
651
|
+
*/
|
|
652
|
+
status?: string;
|
|
653
|
+
};
|
|
654
|
+
/**
|
|
655
|
+
* Job specification
|
|
656
|
+
*/
|
|
657
|
+
export type JobSpec = CoreSpec & unknown;
|
|
533
658
|
/**
|
|
534
659
|
* Knowledgebase
|
|
535
660
|
*/
|
|
@@ -1109,6 +1234,10 @@ export type PreviewSpec = {
|
|
|
1109
1234
|
* Port of the preview
|
|
1110
1235
|
*/
|
|
1111
1236
|
port?: number;
|
|
1237
|
+
/**
|
|
1238
|
+
* Prefix URL
|
|
1239
|
+
*/
|
|
1240
|
+
prefixUrl?: string;
|
|
1112
1241
|
/**
|
|
1113
1242
|
* Whether the preview is public
|
|
1114
1243
|
*/
|
|
@@ -1162,10 +1291,6 @@ export type PreviewTokenSpec = {
|
|
|
1162
1291
|
* Expiration time of the token
|
|
1163
1292
|
*/
|
|
1164
1293
|
expiresAt?: string;
|
|
1165
|
-
/**
|
|
1166
|
-
* Whether the token is public
|
|
1167
|
-
*/
|
|
1168
|
-
public?: boolean;
|
|
1169
1294
|
/**
|
|
1170
1295
|
* Token
|
|
1171
1296
|
*/
|
|
@@ -1515,6 +1640,10 @@ export type Runtime = {
|
|
|
1515
1640
|
* The Docker image for the deployment
|
|
1516
1641
|
*/
|
|
1517
1642
|
image?: string;
|
|
1643
|
+
/**
|
|
1644
|
+
* The maximum number of retries for the deployment
|
|
1645
|
+
*/
|
|
1646
|
+
maxRetries?: number;
|
|
1518
1647
|
/**
|
|
1519
1648
|
* The minimum number of replicas for the deployment. Can be 0 or 1 (in which case the deployment is always running in at least one location).
|
|
1520
1649
|
*/
|
|
@@ -1625,18 +1754,6 @@ export type SandboxSpec = CoreSpec & unknown;
|
|
|
1625
1754
|
* Name of a Sandbox definition
|
|
1626
1755
|
*/
|
|
1627
1756
|
export type SandboxStoreDefinitionName = unknown;
|
|
1628
|
-
/**
|
|
1629
|
-
* Micro VM for running agentic tasks
|
|
1630
|
-
*/
|
|
1631
|
-
export type Sandboxes = {
|
|
1632
|
-
events?: CoreEvents;
|
|
1633
|
-
metadata?: Metadata;
|
|
1634
|
-
spec?: SandboxSpec;
|
|
1635
|
-
/**
|
|
1636
|
-
* Sandbox status
|
|
1637
|
-
*/
|
|
1638
|
-
status?: string;
|
|
1639
|
-
};
|
|
1640
1757
|
/**
|
|
1641
1758
|
* Configuration for a serverless deployment
|
|
1642
1759
|
*/
|
|
@@ -1647,6 +1764,10 @@ export type ServerlessConfig = {
|
|
|
1647
1764
|
configuration?: {
|
|
1648
1765
|
[key: string]: unknown;
|
|
1649
1766
|
};
|
|
1767
|
+
/**
|
|
1768
|
+
* The maximum number of retries for the deployment
|
|
1769
|
+
*/
|
|
1770
|
+
maxRetries?: number;
|
|
1650
1771
|
/**
|
|
1651
1772
|
* The minimum number of replicas for the deployment. Can be 0 or 1 (in which case the deployment is always running in at least one location).
|
|
1652
1773
|
*/
|
|
@@ -2290,8 +2411,9 @@ export type GetIntegrationResponses = {
|
|
|
2290
2411
|
/**
|
|
2291
2412
|
* successful operation
|
|
2292
2413
|
*/
|
|
2293
|
-
200:
|
|
2414
|
+
200: Integration;
|
|
2294
2415
|
};
|
|
2416
|
+
export type GetIntegrationResponse = GetIntegrationResponses[keyof GetIntegrationResponses];
|
|
2295
2417
|
export type ListIntegrationConnectionsData = {
|
|
2296
2418
|
body?: never;
|
|
2297
2419
|
path?: never;
|
|
@@ -2427,6 +2549,104 @@ export type GetIntegrationConnectionModelResponses = {
|
|
|
2427
2549
|
*/
|
|
2428
2550
|
200: unknown;
|
|
2429
2551
|
};
|
|
2552
|
+
export type ListJobsData = {
|
|
2553
|
+
body?: never;
|
|
2554
|
+
path?: never;
|
|
2555
|
+
query?: never;
|
|
2556
|
+
url: '/jobs';
|
|
2557
|
+
};
|
|
2558
|
+
export type ListJobsResponses = {
|
|
2559
|
+
/**
|
|
2560
|
+
* successful operation
|
|
2561
|
+
*/
|
|
2562
|
+
200: Array<Job>;
|
|
2563
|
+
};
|
|
2564
|
+
export type ListJobsResponse = ListJobsResponses[keyof ListJobsResponses];
|
|
2565
|
+
export type CreateJobData = {
|
|
2566
|
+
body: Job;
|
|
2567
|
+
path?: never;
|
|
2568
|
+
query?: never;
|
|
2569
|
+
url: '/jobs';
|
|
2570
|
+
};
|
|
2571
|
+
export type CreateJobResponses = {
|
|
2572
|
+
/**
|
|
2573
|
+
* successful operation
|
|
2574
|
+
*/
|
|
2575
|
+
200: Job;
|
|
2576
|
+
};
|
|
2577
|
+
export type CreateJobResponse = CreateJobResponses[keyof CreateJobResponses];
|
|
2578
|
+
export type DeleteJobData = {
|
|
2579
|
+
body?: never;
|
|
2580
|
+
path: {
|
|
2581
|
+
/**
|
|
2582
|
+
* Name of the job
|
|
2583
|
+
*/
|
|
2584
|
+
jobId: string;
|
|
2585
|
+
};
|
|
2586
|
+
query?: never;
|
|
2587
|
+
url: '/jobs/{jobId}';
|
|
2588
|
+
};
|
|
2589
|
+
export type DeleteJobResponses = {
|
|
2590
|
+
/**
|
|
2591
|
+
* successful operation
|
|
2592
|
+
*/
|
|
2593
|
+
200: Job;
|
|
2594
|
+
};
|
|
2595
|
+
export type DeleteJobResponse = DeleteJobResponses[keyof DeleteJobResponses];
|
|
2596
|
+
export type GetJobData = {
|
|
2597
|
+
body?: never;
|
|
2598
|
+
path: {
|
|
2599
|
+
/**
|
|
2600
|
+
* Name of the job
|
|
2601
|
+
*/
|
|
2602
|
+
jobId: string;
|
|
2603
|
+
};
|
|
2604
|
+
query?: never;
|
|
2605
|
+
url: '/jobs/{jobId}';
|
|
2606
|
+
};
|
|
2607
|
+
export type GetJobResponses = {
|
|
2608
|
+
/**
|
|
2609
|
+
* successful operation
|
|
2610
|
+
*/
|
|
2611
|
+
200: Model;
|
|
2612
|
+
};
|
|
2613
|
+
export type GetJobResponse = GetJobResponses[keyof GetJobResponses];
|
|
2614
|
+
export type UpdateJobData = {
|
|
2615
|
+
body: Job;
|
|
2616
|
+
path: {
|
|
2617
|
+
/**
|
|
2618
|
+
* Name of the job
|
|
2619
|
+
*/
|
|
2620
|
+
jobId: string;
|
|
2621
|
+
};
|
|
2622
|
+
query?: never;
|
|
2623
|
+
url: '/jobs/{jobId}';
|
|
2624
|
+
};
|
|
2625
|
+
export type UpdateJobResponses = {
|
|
2626
|
+
/**
|
|
2627
|
+
* successful operation
|
|
2628
|
+
*/
|
|
2629
|
+
200: Job;
|
|
2630
|
+
};
|
|
2631
|
+
export type UpdateJobResponse = UpdateJobResponses[keyof UpdateJobResponses];
|
|
2632
|
+
export type ListJobRevisionsData = {
|
|
2633
|
+
body?: never;
|
|
2634
|
+
path: {
|
|
2635
|
+
/**
|
|
2636
|
+
* Name of the job
|
|
2637
|
+
*/
|
|
2638
|
+
jobId: string;
|
|
2639
|
+
};
|
|
2640
|
+
query?: never;
|
|
2641
|
+
url: '/jobs/{jobId}/revisions';
|
|
2642
|
+
};
|
|
2643
|
+
export type ListJobRevisionsResponses = {
|
|
2644
|
+
/**
|
|
2645
|
+
* successful operation
|
|
2646
|
+
*/
|
|
2647
|
+
200: Array<RevisionMetadata>;
|
|
2648
|
+
};
|
|
2649
|
+
export type ListJobRevisionsResponse = ListJobRevisionsResponses[keyof ListJobRevisionsResponses];
|
|
2430
2650
|
export type ListKnowledgebasesData = {
|
|
2431
2651
|
body?: never;
|
|
2432
2652
|
path?: never;
|
package/dist/common/env.js
CHANGED
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.env = void 0;
|
|
7
7
|
/* eslint-disable */
|
|
8
|
+
const dotenv_1 = __importDefault(require("dotenv"));
|
|
8
9
|
const toml_1 = __importDefault(require("toml"));
|
|
9
10
|
const node_js_1 = require("./node.js");
|
|
10
11
|
const secretEnv = {};
|
|
@@ -20,13 +21,8 @@ if (node_js_1.fs !== null) {
|
|
|
20
21
|
catch (error) { }
|
|
21
22
|
try {
|
|
22
23
|
const secretFile = node_js_1.fs.readFileSync(".env", "utf8");
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const [key, value] = line.split("=");
|
|
28
|
-
secretEnv[key] = value;
|
|
29
|
-
});
|
|
24
|
+
const parsed = dotenv_1.default.parse(secretFile);
|
|
25
|
+
Object.assign(secretEnv, parsed);
|
|
30
26
|
}
|
|
31
27
|
catch (error) { }
|
|
32
28
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function getAlphanumericLimitedHash(input: string, maxSize
|
|
1
|
+
export declare function getAlphanumericLimitedHash(input: string, maxSize?: number): string;
|
|
2
2
|
export declare function getGlobalUniqueHash(workspace: string, type: string, name: string): string;
|
package/dist/common/internal.js
CHANGED
|
@@ -6,12 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.getAlphanumericLimitedHash = getAlphanumericLimitedHash;
|
|
7
7
|
exports.getGlobalUniqueHash = getGlobalUniqueHash;
|
|
8
8
|
const crypto_1 = __importDefault(require("crypto"));
|
|
9
|
-
function getAlphanumericLimitedHash(input, maxSize) {
|
|
10
|
-
const hash = crypto_1.default.createHash(
|
|
11
|
-
|
|
12
|
-
return alphanumeric.length > maxSize
|
|
13
|
-
? alphanumeric.substring(0, maxSize)
|
|
14
|
-
: alphanumeric;
|
|
9
|
+
function getAlphanumericLimitedHash(input, maxSize = 48) {
|
|
10
|
+
const hash = crypto_1.default.createHash('md5').update(input).digest('hex');
|
|
11
|
+
return hash.length > maxSize ? hash.substring(0, maxSize) : hash;
|
|
15
12
|
}
|
|
16
13
|
function getGlobalUniqueHash(workspace, type, name) {
|
|
17
14
|
const globalUniqueName = `${workspace}-${type}-${name}`;
|
package/dist/common/settings.js
CHANGED
|
@@ -72,11 +72,20 @@ class Settings {
|
|
|
72
72
|
return env_js_1.env.BL_TYPE || "agents";
|
|
73
73
|
}
|
|
74
74
|
get runInternalHostname() {
|
|
75
|
+
if (!this.generation) {
|
|
76
|
+
return "";
|
|
77
|
+
}
|
|
75
78
|
return env_js_1.env.BL_RUN_INTERNAL_HOSTNAME || "";
|
|
76
79
|
}
|
|
77
80
|
get runInternalProtocol() {
|
|
78
81
|
return env_js_1.env.BL_RUN_INTERNAL_PROTOCOL || "https";
|
|
79
82
|
}
|
|
83
|
+
get blCloud() {
|
|
84
|
+
return env_js_1.env.BL_CLOUD === "true";
|
|
85
|
+
}
|
|
86
|
+
get generation() {
|
|
87
|
+
return env_js_1.env.BL_GENERATION || "";
|
|
88
|
+
}
|
|
80
89
|
get loggerType() {
|
|
81
90
|
return env_js_1.env.BL_LOGGER || "http";
|
|
82
91
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./common/errors.js";
|
|
|
7
7
|
export * from "./common/internal.js";
|
|
8
8
|
export * from "./common/logger.js";
|
|
9
9
|
export * from "./common/settings.js";
|
|
10
|
+
export * from "./jobs/index.js";
|
|
10
11
|
export * from "./mcp/index.js";
|
|
11
12
|
export * from "./models/index.js";
|
|
12
13
|
export * from "./sandbox/index.js";
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __exportStar(require("./common/errors.js"), exports);
|
|
|
23
23
|
__exportStar(require("./common/internal.js"), exports);
|
|
24
24
|
__exportStar(require("./common/logger.js"), exports);
|
|
25
25
|
__exportStar(require("./common/settings.js"), exports);
|
|
26
|
+
__exportStar(require("./jobs/index.js"), exports);
|
|
26
27
|
__exportStar(require("./mcp/index.js"), exports);
|
|
27
28
|
__exportStar(require("./models/index.js"), exports);
|
|
28
29
|
__exportStar(require("./sandbox/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./jobs.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./jobs.js"), exports);
|