@blaxel/core 0.2.1-dev9 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/sdk.gen.d.ts +1 -31
- package/dist/client/sdk.gen.js +2 -112
- package/dist/client/types.gen.d.ts +0 -122
- package/dist/common/internal.d.ts +1 -1
- package/dist/common/internal.js +6 -3
- package/dist/common/settings.d.ts +0 -2
- package/dist/common/settings.js +1 -10
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/sandbox/client/sdk.gen.d.ts +1 -1
- package/dist/sandbox/client/types.gen.d.ts +11 -14
- package/dist/telemetry/telemetry.d.ts +0 -1
- package/dist/telemetry/telemetry.js +0 -14
- package/package.json +1 -3
- package/dist/jobs/batches.d.ts +0 -32
- package/dist/jobs/batches.js +0 -40
- package/dist/jobs/index.d.ts +0 -1
- package/dist/jobs/index.js +0 -17
- package/dist/jobs/job.d.ts +0 -33
- package/dist/jobs/job.js +0 -51
- package/dist/jobs/jobs.d.ts +0 -10
- package/dist/jobs/jobs.js +0 -42
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,
|
|
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';
|
|
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
|
|
@@ -111,36 +111,6 @@ 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>;
|
|
144
114
|
/**
|
|
145
115
|
* List knowledgebases
|
|
146
116
|
* 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 =
|
|
4
|
+
exports.listSandboxHubDefinitions = exports.listAllPendingInvitations = exports.updatePrivateClusterHealth = exports.getPrivateClusterHealth = exports.updatePrivateCluster = exports.getPrivateCluster = 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.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 = void 0;
|
|
6
6
|
const client_gen_1 = require("./client.gen");
|
|
7
7
|
/**
|
|
8
8
|
* List all agents
|
|
@@ -390,116 +390,6 @@ 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;
|
|
503
393
|
/**
|
|
504
394
|
* List knowledgebases
|
|
505
395
|
* Returns a list of all knowledgebases in the workspace.
|
|
@@ -639,22 +639,6 @@ export type IntegrationRepository = {
|
|
|
639
639
|
*/
|
|
640
640
|
url?: string;
|
|
641
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;
|
|
658
642
|
/**
|
|
659
643
|
* Knowledgebase
|
|
660
644
|
*/
|
|
@@ -1640,10 +1624,6 @@ export type Runtime = {
|
|
|
1640
1624
|
* The Docker image for the deployment
|
|
1641
1625
|
*/
|
|
1642
1626
|
image?: string;
|
|
1643
|
-
/**
|
|
1644
|
-
* The maximum number of retries for the deployment
|
|
1645
|
-
*/
|
|
1646
|
-
maxRetries?: number;
|
|
1647
1627
|
/**
|
|
1648
1628
|
* 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).
|
|
1649
1629
|
*/
|
|
@@ -1764,10 +1744,6 @@ export type ServerlessConfig = {
|
|
|
1764
1744
|
configuration?: {
|
|
1765
1745
|
[key: string]: unknown;
|
|
1766
1746
|
};
|
|
1767
|
-
/**
|
|
1768
|
-
* The maximum number of retries for the deployment
|
|
1769
|
-
*/
|
|
1770
|
-
maxRetries?: number;
|
|
1771
1747
|
/**
|
|
1772
1748
|
* 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).
|
|
1773
1749
|
*/
|
|
@@ -2549,104 +2525,6 @@ export type GetIntegrationConnectionModelResponses = {
|
|
|
2549
2525
|
*/
|
|
2550
2526
|
200: unknown;
|
|
2551
2527
|
};
|
|
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];
|
|
2650
2528
|
export type ListKnowledgebasesData = {
|
|
2651
2529
|
body?: never;
|
|
2652
2530
|
path?: never;
|
|
@@ -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,9 +6,12 @@ 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
|
-
|
|
9
|
+
function getAlphanumericLimitedHash(input, maxSize) {
|
|
10
|
+
const hash = crypto_1.default.createHash("sha256").update(input).digest("base64");
|
|
11
|
+
const alphanumeric = hash.replace(/[^a-z0-9]+/g, "");
|
|
12
|
+
return alphanumeric.length > maxSize
|
|
13
|
+
? alphanumeric.substring(0, maxSize)
|
|
14
|
+
: alphanumeric;
|
|
12
15
|
}
|
|
13
16
|
function getGlobalUniqueHash(workspace, type, name) {
|
|
14
17
|
const globalUniqueName = `${workspace}-${type}-${name}`;
|
package/dist/common/settings.js
CHANGED
|
@@ -72,20 +72,11 @@ class Settings {
|
|
|
72
72
|
return env_js_1.env.BL_TYPE || "agents";
|
|
73
73
|
}
|
|
74
74
|
get runInternalHostname() {
|
|
75
|
-
|
|
76
|
-
return "";
|
|
77
|
-
}
|
|
78
|
-
return env_js_1.env.BL_RUN_INTERNAL_HOST || "";
|
|
75
|
+
return env_js_1.env.BL_RUN_INTERNAL_HOSTNAME || "";
|
|
79
76
|
}
|
|
80
77
|
get runInternalProtocol() {
|
|
81
78
|
return env_js_1.env.BL_RUN_INTERNAL_PROTOCOL || "https";
|
|
82
79
|
}
|
|
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
|
-
}
|
|
89
80
|
get loggerType() {
|
|
90
81
|
return env_js_1.env.BL_LOGGER || "http";
|
|
91
82
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ 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";
|
|
11
10
|
export * from "./mcp/index.js";
|
|
12
11
|
export * from "./models/index.js";
|
|
13
12
|
export * from "./sandbox/index.js";
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,6 @@ __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);
|
|
27
26
|
__exportStar(require("./mcp/index.js"), exports);
|
|
28
27
|
__exportStar(require("./models/index.js"), exports);
|
|
29
28
|
__exportStar(require("./sandbox/index.js"), exports);
|
|
@@ -22,7 +22,7 @@ export declare const deleteFilesystemByPath: <ThrowOnError extends boolean = fal
|
|
|
22
22
|
* Get file or directory information
|
|
23
23
|
* Get content of a file or listing of a directory
|
|
24
24
|
*/
|
|
25
|
-
export declare const getFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<GetFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").
|
|
25
|
+
export declare const getFilesystemByPath: <ThrowOnError extends boolean = false>(options: Options<GetFilesystemByPathData, ThrowOnError>) => import("@hey-api/client-fetch").RequestResult<import("./types.gen").Directory | import("./types.gen").FileWithContent, import("./types.gen").ErrorResponse, ThrowOnError>;
|
|
26
26
|
/**
|
|
27
27
|
* Create or update file or directory
|
|
28
28
|
* Create or update a file or directory
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
export type Directory = {
|
|
2
|
+
files?: Array<File>;
|
|
3
|
+
path?: string;
|
|
4
|
+
/**
|
|
5
|
+
* @name Subdirectories
|
|
6
|
+
*/
|
|
7
|
+
subdirectories?: Array<Subdirectory>;
|
|
8
|
+
};
|
|
1
9
|
export type ErrorResponse = {
|
|
2
10
|
error?: string;
|
|
3
11
|
};
|
|
@@ -6,9 +14,6 @@ export type File = {
|
|
|
6
14
|
lastModified?: string;
|
|
7
15
|
owner?: string;
|
|
8
16
|
path?: string;
|
|
9
|
-
/**
|
|
10
|
-
* swagger:strfmt string
|
|
11
|
-
*/
|
|
12
17
|
permissions?: string;
|
|
13
18
|
size?: number;
|
|
14
19
|
};
|
|
@@ -23,9 +28,6 @@ export type FileWithContent = {
|
|
|
23
28
|
lastModified?: string;
|
|
24
29
|
owner?: string;
|
|
25
30
|
path?: string;
|
|
26
|
-
/**
|
|
27
|
-
* swagger:strfmt string
|
|
28
|
-
*/
|
|
29
31
|
permissions?: string;
|
|
30
32
|
size?: number;
|
|
31
33
|
};
|
|
@@ -56,17 +58,12 @@ export type ProcessResponse = {
|
|
|
56
58
|
status?: string;
|
|
57
59
|
workingDir?: string;
|
|
58
60
|
};
|
|
59
|
-
export type
|
|
60
|
-
message?: string;
|
|
61
|
+
export type Subdirectory = {
|
|
61
62
|
path?: string;
|
|
62
63
|
};
|
|
63
|
-
export type
|
|
64
|
-
|
|
64
|
+
export type SuccessResponse = {
|
|
65
|
+
message?: string;
|
|
65
66
|
path?: string;
|
|
66
|
-
/**
|
|
67
|
-
* @name Subdirectories
|
|
68
|
-
*/
|
|
69
|
-
subdirectories?: Array<Directory>;
|
|
70
67
|
};
|
|
71
68
|
export type DeleteFilesystemByPathData = {
|
|
72
69
|
body?: never;
|
|
@@ -55,5 +55,4 @@ export declare const telemetryRegistry: TelemetryRegistry;
|
|
|
55
55
|
* Create a span with the registered provider
|
|
56
56
|
*/
|
|
57
57
|
export declare function startSpan(name: string, options?: BlaxelSpanOptions): BlaxelSpan;
|
|
58
|
-
export declare function withSpan<T>(name: string, fn: () => T, options?: BlaxelSpanOptions): T;
|
|
59
58
|
export {};
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.telemetryRegistry = void 0;
|
|
5
5
|
exports.startSpan = startSpan;
|
|
6
|
-
exports.withSpan = withSpan;
|
|
7
6
|
/**
|
|
8
7
|
* No-operation implementation of Span
|
|
9
8
|
*/
|
|
@@ -58,16 +57,3 @@ exports.telemetryRegistry = TelemetryRegistry.getInstance();
|
|
|
58
57
|
function startSpan(name, options) {
|
|
59
58
|
return exports.telemetryRegistry.getProvider().startSpan(name, options);
|
|
60
59
|
}
|
|
61
|
-
function withSpan(name, fn, options) {
|
|
62
|
-
const span = startSpan(name, options);
|
|
63
|
-
try {
|
|
64
|
-
const result = fn();
|
|
65
|
-
span.end();
|
|
66
|
-
return result;
|
|
67
|
-
}
|
|
68
|
-
catch (error) {
|
|
69
|
-
span.recordException(error);
|
|
70
|
-
span.end();
|
|
71
|
-
throw error;
|
|
72
|
-
}
|
|
73
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blaxel/core",
|
|
3
|
-
"version": "0.2.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Blaxel Core SDK for TypeScript",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Blaxel, INC (https://blaxel.ai)",
|
|
@@ -62,13 +62,11 @@
|
|
|
62
62
|
"uuid": "^11.1.0",
|
|
63
63
|
"ws": "^8.18.2",
|
|
64
64
|
"yaml": "^2.7.1",
|
|
65
|
-
"yargs": "^17.7.2",
|
|
66
65
|
"zod": "^3.24.3"
|
|
67
66
|
},
|
|
68
67
|
"devDependencies": {
|
|
69
68
|
"@eslint/js": "^9.26.0",
|
|
70
69
|
"@types/ws": "^8.18.1",
|
|
71
|
-
"@types/yargs": "^17.0.33",
|
|
72
70
|
"typescript": "^5.0.0",
|
|
73
71
|
"typescript-eslint": "^8.31.1"
|
|
74
72
|
},
|
package/dist/jobs/batches.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
declare class BlBatch {
|
|
2
|
-
/**
|
|
3
|
-
* Lists all remote batch jobs for a given name
|
|
4
|
-
* @param name - The name of the job to list
|
|
5
|
-
*/
|
|
6
|
-
list(name: string): void;
|
|
7
|
-
/**
|
|
8
|
-
* Creates a new remote batch job configuration.
|
|
9
|
-
* This is used for remote execution management, not for local execution.
|
|
10
|
-
* @param name - The name of the job
|
|
11
|
-
* @param args - Array of argument arrays for each job in the batch
|
|
12
|
-
* @returns The batch configuration object
|
|
13
|
-
*/
|
|
14
|
-
create(name: string, args: any[][]): {
|
|
15
|
-
name: string;
|
|
16
|
-
args: any[][];
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Kills a remote batch job
|
|
20
|
-
* @param name - The name of the job
|
|
21
|
-
* @param batchId - The ID of the batch to kill
|
|
22
|
-
*/
|
|
23
|
-
kill(name: string, batchId: string): void;
|
|
24
|
-
/**
|
|
25
|
-
* Retrieves information about a remote batch job
|
|
26
|
-
* @param name - The name of the job
|
|
27
|
-
* @param batchId - The ID of the batch to get information for
|
|
28
|
-
*/
|
|
29
|
-
get(name: string, batchId: string): void;
|
|
30
|
-
}
|
|
31
|
-
export declare const blBatch: BlBatch;
|
|
32
|
-
export {};
|
package/dist/jobs/batches.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.blBatch = void 0;
|
|
4
|
-
class BlBatch {
|
|
5
|
-
/**
|
|
6
|
-
* Lists all remote batch jobs for a given name
|
|
7
|
-
* @param name - The name of the job to list
|
|
8
|
-
*/
|
|
9
|
-
list(name) {
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Creates a new remote batch job configuration.
|
|
13
|
-
* This is used for remote execution management, not for local execution.
|
|
14
|
-
* @param name - The name of the job
|
|
15
|
-
* @param args - Array of argument arrays for each job in the batch
|
|
16
|
-
* @returns The batch configuration object
|
|
17
|
-
*/
|
|
18
|
-
create(name, args) {
|
|
19
|
-
const batch = {
|
|
20
|
-
name,
|
|
21
|
-
args,
|
|
22
|
-
};
|
|
23
|
-
return batch;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Kills a remote batch job
|
|
27
|
-
* @param name - The name of the job
|
|
28
|
-
* @param batchId - The ID of the batch to kill
|
|
29
|
-
*/
|
|
30
|
-
kill(name, batchId) {
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Retrieves information about a remote batch job
|
|
34
|
-
* @param name - The name of the job
|
|
35
|
-
* @param batchId - The ID of the batch to get information for
|
|
36
|
-
*/
|
|
37
|
-
get(name, batchId) {
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.blBatch = new BlBatch();
|
package/dist/jobs/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./jobs.js";
|
package/dist/jobs/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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);
|
package/dist/jobs/job.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
declare class BlJob {
|
|
2
|
-
start(func: (...args: any[]) => Promise<void>): void;
|
|
3
|
-
/**
|
|
4
|
-
* Lists all remote batch jobs for a given name
|
|
5
|
-
* @param name - The name of the job to list
|
|
6
|
-
*/
|
|
7
|
-
list(name: string): void;
|
|
8
|
-
/**
|
|
9
|
-
* Creates a new remote batch job configuration.
|
|
10
|
-
* This is used for remote execution management, not for local execution.
|
|
11
|
-
* @param name - The name of the job
|
|
12
|
-
* @param args - Array of argument arrays for each job in the batch
|
|
13
|
-
* @returns The batch configuration object
|
|
14
|
-
*/
|
|
15
|
-
create(name: string, args: any[][]): {
|
|
16
|
-
name: string;
|
|
17
|
-
args: any[][];
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Kills a remote batch job
|
|
21
|
-
* @param name - The name of the job
|
|
22
|
-
* @param batchId - The ID of the batch to kill
|
|
23
|
-
*/
|
|
24
|
-
kill(name: string, batchId: string): void;
|
|
25
|
-
/**
|
|
26
|
-
* Retrieves information about a remote batch job
|
|
27
|
-
* @param name - The name of the job
|
|
28
|
-
* @param batchId - The ID of the batch to get information for
|
|
29
|
-
*/
|
|
30
|
-
get(name: string, batchId: string): void;
|
|
31
|
-
}
|
|
32
|
-
export declare const blJob: BlJob;
|
|
33
|
-
export {};
|
package/dist/jobs/job.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.blJob = void 0;
|
|
4
|
-
function retrieveArguments() {
|
|
5
|
-
const args = process.argv.slice(2);
|
|
6
|
-
return args;
|
|
7
|
-
}
|
|
8
|
-
class BlJob {
|
|
9
|
-
/*
|
|
10
|
-
Run a job defined in a function, it's run in the current process
|
|
11
|
-
*/
|
|
12
|
-
start(func) {
|
|
13
|
-
const args = retrieveArguments();
|
|
14
|
-
func(...args);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Lists all remote batch jobs for a given name
|
|
18
|
-
* @param name - The name of the job to list
|
|
19
|
-
*/
|
|
20
|
-
list(name) {
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Creates a new remote batch job configuration.
|
|
24
|
-
* This is used for remote execution management, not for local execution.
|
|
25
|
-
* @param name - The name of the job
|
|
26
|
-
* @param args - Array of argument arrays for each job in the batch
|
|
27
|
-
* @returns The batch configuration object
|
|
28
|
-
*/
|
|
29
|
-
create(name, args) {
|
|
30
|
-
const batch = {
|
|
31
|
-
name,
|
|
32
|
-
args,
|
|
33
|
-
};
|
|
34
|
-
return batch;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Kills a remote batch job
|
|
38
|
-
* @param name - The name of the job
|
|
39
|
-
* @param batchId - The ID of the batch to kill
|
|
40
|
-
*/
|
|
41
|
-
kill(name, batchId) {
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Retrieves information about a remote batch job
|
|
45
|
-
* @param name - The name of the job
|
|
46
|
-
* @param batchId - The ID of the batch to get information for
|
|
47
|
-
*/
|
|
48
|
-
get(name, batchId) {
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.blJob = new BlJob();
|
package/dist/jobs/jobs.d.ts
DELETED
package/dist/jobs/jobs.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.blJob = void 0;
|
|
7
|
-
const yargs_1 = __importDefault(require("yargs"));
|
|
8
|
-
const helpers_1 = require("yargs/helpers");
|
|
9
|
-
const env_js_1 = require("../common/env.js");
|
|
10
|
-
class BlJob {
|
|
11
|
-
async getArguments() {
|
|
12
|
-
if (!env_js_1.env.BL_EXECUTION_DATA_URL) {
|
|
13
|
-
const argv = await (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
|
|
14
|
-
.parseAsync();
|
|
15
|
-
return argv;
|
|
16
|
-
}
|
|
17
|
-
const response = await fetch(env_js_1.env.BL_EXECUTION_DATA_URL);
|
|
18
|
-
const data = await response.json();
|
|
19
|
-
return data.tasks[this.index] ?? {};
|
|
20
|
-
}
|
|
21
|
-
get indexKey() {
|
|
22
|
-
return env_js_1.env.BL_EXECUTION_INDEX_KEY ?? "TASK_INDEX";
|
|
23
|
-
}
|
|
24
|
-
get index() {
|
|
25
|
-
return env_js_1.env[this.indexKey] ? Number(env_js_1.env[this.indexKey]) ?? 0 : 0;
|
|
26
|
-
}
|
|
27
|
-
/*
|
|
28
|
-
Run a job defined in a function, it's run in the current process
|
|
29
|
-
*/
|
|
30
|
-
async start(func) {
|
|
31
|
-
try {
|
|
32
|
-
const parsedArgs = await this.getArguments();
|
|
33
|
-
await func(parsedArgs);
|
|
34
|
-
process.exit(0);
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
console.error('Job execution failed:', error);
|
|
38
|
-
process.exit(1);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.blJob = new BlJob();
|