@miosa/sdk 1.2.7 → 1.2.9
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/index.d.ts +22 -1
- package/dist/index.js +45 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -171,6 +171,8 @@ interface AgentRuntimeProfile {
|
|
|
171
171
|
tenantId?: string;
|
|
172
172
|
workspace_id?: string | null;
|
|
173
173
|
workspaceId?: string | null;
|
|
174
|
+
project_id?: string | null;
|
|
175
|
+
projectId?: string | null;
|
|
174
176
|
name: string;
|
|
175
177
|
runtime: AgentRuntime | string;
|
|
176
178
|
description?: string | null;
|
|
@@ -191,6 +193,8 @@ interface AgentRuntimeProfile {
|
|
|
191
193
|
interface AgentRuntimeProfileParams {
|
|
192
194
|
workspaceId?: string;
|
|
193
195
|
workspace_id?: string;
|
|
196
|
+
projectId?: string;
|
|
197
|
+
project_id?: string;
|
|
194
198
|
name: string;
|
|
195
199
|
runtime: AgentRuntime | string;
|
|
196
200
|
description?: string;
|
|
@@ -211,6 +215,8 @@ declare class AgentRuntimeProfiles {
|
|
|
211
215
|
list(params?: {
|
|
212
216
|
workspaceId?: string;
|
|
213
217
|
workspace_id?: string;
|
|
218
|
+
projectId?: string;
|
|
219
|
+
project_id?: string;
|
|
214
220
|
}): Promise<AgentRuntimeProfile[]>;
|
|
215
221
|
get(id: string): Promise<AgentRuntimeProfile>;
|
|
216
222
|
create(params: AgentRuntimeProfileParams): Promise<AgentRuntimeProfile>;
|
|
@@ -250,12 +256,26 @@ interface AgentRunCreateParams {
|
|
|
250
256
|
runtimeCommand?: string;
|
|
251
257
|
cwd?: string;
|
|
252
258
|
timeout?: number;
|
|
259
|
+
env?: Record<string, string>;
|
|
260
|
+
agentRuntimeProfileId?: string;
|
|
261
|
+
agentProfileId?: string;
|
|
262
|
+
skipAgentRuntimeProfile?: boolean;
|
|
253
263
|
metadata?: Record<string, unknown>;
|
|
254
264
|
}
|
|
265
|
+
interface AgentRunListParams {
|
|
266
|
+
targetKind?: AgentRunTargetKind;
|
|
267
|
+
targetId?: string;
|
|
268
|
+
sandboxId?: string;
|
|
269
|
+
computerId?: string;
|
|
270
|
+
status?: AgentRunStatus | string;
|
|
271
|
+
}
|
|
255
272
|
declare class AgentRuns {
|
|
256
273
|
private readonly http;
|
|
257
274
|
constructor(http: HttpClient);
|
|
275
|
+
list(params?: AgentRunListParams): Promise<AgentRun[]>;
|
|
276
|
+
get(id: string): Promise<AgentRun>;
|
|
258
277
|
run(params: AgentRunCreateParams): Promise<AgentRun>;
|
|
278
|
+
cancel(id: string): Promise<AgentRun>;
|
|
259
279
|
}
|
|
260
280
|
|
|
261
281
|
/**
|
|
@@ -4719,6 +4739,7 @@ interface SandboxData {
|
|
|
4719
4739
|
disk_mb?: number | null;
|
|
4720
4740
|
disk_size_mb?: number | null;
|
|
4721
4741
|
timeout_sec?: number | null;
|
|
4742
|
+
persistent?: boolean;
|
|
4722
4743
|
boot_path?: string | null;
|
|
4723
4744
|
boot_ms?: number | null;
|
|
4724
4745
|
ready_at?: string | null;
|
|
@@ -6221,4 +6242,4 @@ declare class NetworkError extends MiosaError {
|
|
|
6221
6242
|
constructor(message: string, cause: Error);
|
|
6222
6243
|
}
|
|
6223
6244
|
|
|
6224
|
-
export { type AcceptOrgInviteResponse, type AcceptWorkspaceInviteResponse, type AddDomainParams, type AddWorkspaceMemberParams, Admin, type AgentDispatchParams, type AgentEvent$1 as AgentEvent, type AgentEventType, type AgentRun, type AgentRunCreateParams, type AgentRunStatus, type AgentRunTargetKind, AgentRuns, AgentRuntimeProfiles, type AgentSessionCreateParams, type AgentSessionData, type AgentSessionListResponse$1 as AgentSessionListResponse, type AgentSessionStatus$1 as AgentSessionStatus, type AllowParams, Analytics, type AnalyticsFilters, type ApiKeyCreateParams, type ApiKeyCreateResult, type ApiKeyData, type ApiKeyId, type ApiKeyListParams, ApiKeys, AppAuth, type AppAuthConfig, type AppAuthResourceType, type AppAuthSession, type AppAuthTokenPayload, type AppCatalogEntry, type AppInstallData, type AppInstallEvent, type AuditListParams, AuditLog, type AuditLogEvent, type AuditLogListParams, type AuditTailParams, AuthError, type AuthToken, type BenchmarkCompareParams, type BenchmarkCreateParams, Benchmarks, type BindingCreateParams, type BindingListParams, type BrandingData, type BrandingUpdateParams, type BucketCreateParams, type BucketData, type BucketId, type BuilderSessionListParams, BuilderSessions, type BulkUserActionParams, type ChannelCreateParams, type ChannelData, type ChannelListParams, type ChannelUpdateParams, Channels, type ChatCompletionCreateParams, type ChatCompletionCreateStreamParams, Checkpoints, type ClickParams, type ClusterCreateParams, type ClusterData, type ClusterEvent, type ClusterId, type ClusterListResponse, type ClusterStatus, CommandCenter, Community, type CompletionCreateParams, type CompletionCreateStreamParams, Completions, Computer, ComputerAudit, ComputerAutoStop, type ComputerCreateParams, type ComputerData, ComputerEnv, type ComputerId, ComputerInbox, type ComputerListParams, type ComputerListResponse, ComputerLogs, type ComputerLogsGetParams, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, type ComputerSize, type ComputerStatus, type ComputerTemplateType, ComputerTerminal, type ComputerUpdateParams, type ComputerVisibility, ComputerVolumes, Computers, type CopyParams, type CreateAdminApiKeyParams, type CreateOrgInviteParams, type CreateWorkspaceInviteParams, type CreateWorkspaceInviteResponse, type CreditBalance, type CreditTransaction, type CreditTransactionListResponse, type CreditUsage, Credits, type CronJobCreateParams, type CronJobData, type CronJobExecutionData, type CronJobExecutionId, type CronJobId, type CronJobListParams, type CronJobUpdateParams, CronJobs, type CursorInfo, type CustomDomainCreateParams, type CustomDomainData, type CustomDomainId, type CustomDomainListParams, Dashboard, type DashboardSummary, type DatabaseCreateParams, type DatabaseCredentials, type DatabaseData, type DatabaseId, type DatabaseListParams, type DatabaseLogsParams, type DatabaseLogsResult, Databases, type DeploymentBuildData, type DeploymentCreateParams, type DeploymentData, DeploymentDomains, type DeploymentId, type DeploymentListParams, type DeploymentProduct, type DeploymentReleaseData, type DeploymentReleaseId, DeploymentReleases, DeploymentRuntimeInstances, type DeploymentServiceData, type DeploymentServiceId, type DeploymentServiceType, type DeploymentSourceType, type DeploymentState, type DeploymentUpdateParams, type DeploymentVersionData, type DeploymentVersionId, type DeploymentVersionKind, type DeploymentVersionState, DeploymentVersions, Deployments, Desktop$1 as Desktop, type DesktopActionResult, type DirEntry, type DirListResult, type DiscordSendTestParams, DockerDeploy, type DockerDeployApplianceStatus, type DockerDeployCreateParams, type DockerDeployDoctorCheck, type DockerDeployDoctorParams, type DockerDeployDoctorProbe, type DockerDeployDoctorResult, type DockerDeployHostData, type DockerDeployHostEnsureParams, type DockerDeployHostId, type DockerDeployHostListParams, type DockerDeployHostListResponse, type DockerDeployHostResponse, type DockerDeployHostStatus, type DoubleClickParams, type DragParams, type EgressAllowlistRule, EgressAudit, type EgressAuditEvent, type EgressBindingData, EgressNetwork, type EgressPolicyData, type EgressPolicyMode, type EgressRuleEffect, type EgressSecretData, type EgressSecretScope, type EgressSecretType, EgressSecrets, type EgressSuggestion, Email, EmailCampaigns, EmailInbox, EmailTemplates, type EmbeddingCreateParams, Embeddings, Exec, type ExecParams, type ExecPythonParams, type ExecResult, type ExternalAttribution, type ExternalKeyCreateParams, type ExternalKeyData, ExternalKeys, type FileDeleteParams, type FileDownloadParams, type FileEntry, type FileExportParams, type FileExportResult, type FileListParams, type FileListResult, type FileStat, Files, FlatCustomDomains, type FsEntry, type FsListResponse, type FsStat, type FunctionCreateParams, type FunctionData, type FunctionId, type FunctionInvokeParams, type FunctionListParams, type FunctionUpdateParams, Functions, type GithubRepo, type GithubSshKey, type HealthCheckCreateParams, type HealthCheckData, type HealthCheckId, type HealthCheckListParams, type HealthCheckUpdateParams, HealthChecks, type HostCreateParams, type HostData, type HostEvent, type HostId, type HostListResponse, type HostStatus, type HostUpdateParams, InsufficientCreditsError, type IntegrationCatalogEntry, type IntegrationData, Integrations, type JobData, type JobEvent, type JobEventType, type JobId, type JobListResponse, type JobRunParams, type JobStatus, type KeyParams, type LaunchParams, type LinearCreateIssueParams, type ListAdminApiKeysParams, type ListAdminComputersParams, type ListAdminTenantsParams, type ListAdminUsersParams, Mcp, type McpDispatchParams, Miosa, type MiosaClientConfig, MiosaError, type MkdirParams, type ModeParams, Models, type MouseButton, NetworkError, NetworkPolicy, type NetworkPolicyData, type NetworkPolicyEffect, type NetworkPolicyProtocol, type NetworkPolicyRule, type NetworkPolicySetParams, NotFoundError, type NotificationPrefsUpdateParams, OAuthFlow, type OauthConnectParams, type OauthProvider, type OauthStartResult, type OauthStatusResult, type ObjectListParams, type AgentEvent as OcAgentEvent, type OcAgentSessionData, type AgentSessionListResponse as OcAgentSessionListResponse, type OcWorkspaceCreateParams, type OcWorkspaceData, type OcWorkspaceEvent, type OcWorkspaceListResponse, type OcWorkspaceStatus, type OcWorkspaceUpdateParams, OpenComputers, type OrgInvite, type OrgInviteCreated, type OrgInviteCreatedResponse, type OrgInviteListResponse, type OrgInvitePreview, type OrgInviteRevokeResponse, OrgInvites, type OrgRole, type OverviewData, type PolicyCreateParams, type PolicyListParams, type PolicyUpdateParams, type PresignParams, type PresignResult, type PreviewDomainData, ProjectAuth, type ProjectAuthEnableParams, type ProjectAuthStatus, type ProjectAuthUpdateParams, type ProjectIntegrationCatalogEntry, type ProjectIntegrationCreateParams, type ProjectIntegrationData, type ProjectIntegrationListParams, type ProjectIntegrationUpdateParams, ProjectIntegrations, ProviderDefaults, type ProviderKeyUpsertParams, type PublishFromSandboxParams, type PublishParams, type PublishResult, RateLimitError, type RegionData, Regions, type RollbackParams, type RulesListParams, type RuntimeInstanceData, type RuntimeInstanceId, type RuntimeInstanceState, type RuntimeLogsResult, SANDBOX_TEMPLATE, Sandbox, SandboxArtifacts, SandboxAudit, type SandboxBuildSpec, type SandboxBuildSpecError, type SandboxBuildSpecValidation, SandboxCommands, type SandboxCreateParams, type SandboxData, SandboxEnv, SandboxEvents, type SandboxExecOptions, type SandboxExecResult, SandboxFiles, type SandboxGetOrCreateParams, type SandboxId, type SandboxListParams, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, type SandboxState, SandboxTags, type SandboxTemplate, type SandboxTemplateBuild, type SandboxTemplateBuildCreateParams, type SandboxTemplateBuildResourceData, type SandboxTemplateBuildResourceId, type SandboxTemplateCreateParams, type SandboxTemplateList, type SandboxTemplateListParams, type SandboxTemplateResourceData, type SandboxTemplateResourceId, SandboxTemplates, SandboxTerminal, Sandboxes, ScopedFs, type ScrollDirection, type ScrollParams, type SecretCreateParams, type SecretData, type SecretId, type SecretListParams, type SecretRotateParams, type SecretSetParams, type SecretUpdateParams, type SessionId, Settings, type SettingsUpdateParams, type SizeData, type SlackSendTestParams, type SnapshotCreateParams, type SnapshotData, type SnapshotListResponse, type SnapshotProgressEvent, type SnapshotRestoreResult, type SnapshotStatus, SnapshotsStandalone, Storage, type StorageObjectData, type SuggestionsParams, type TemplateBuildCreateParams, type TemplateCreateParams, type TemplateData, Tenant, type TenantBrandingUpdateParams, type TenantId, type TenantPlan, type TenantSummary, type TerminalCreateParams, TimeoutError, type TimeseriesParams, type TunnelAuthMode, type TunnelCreateParams, type TunnelData, type TunnelId, type TunnelListResponse, type TunnelUpdateParams, type TypeParams, type UpdateWorkspaceMemberRoleParams, Usage, type UsageReportParams, type UsageSession, type UsageSessionsParams, type UsageSummary, type UserId, ValidationError, type VersionListParams, type VolumeCreateParams, type VolumeData, type VolumeId, type VolumeListParams, Volumes, type WaitParams, type WebhookCreateParams, type WebhookData, type WebhookDeliveryData, type WebhookDeliveryId, type WebhookId, type WebhookListParams, type WebhookUpdateParams, Webhooks, type WindowFocusParams, type WindowInfo, type WorkspaceId, type WorkspaceInvite, type WorkspaceInviteCreatedResponse, type WorkspaceInviteListResponse, type WorkspaceInvitePreview, type WorkspaceInviteRevokeResponse, WorkspaceInvites, type WorkspaceMember, type WorkspaceMemberAddedResponse, type WorkspaceMemberDeleteResponse, type WorkspaceMemberListResponse, type WorkspaceMemberRecord, type WorkspaceMemberRecordResponse, WorkspaceMembers, type WorkspaceRole, type WsTicket, verifySignature };
|
|
6245
|
+
export { type AcceptOrgInviteResponse, type AcceptWorkspaceInviteResponse, type AddDomainParams, type AddWorkspaceMemberParams, Admin, type AgentDispatchParams, type AgentEvent$1 as AgentEvent, type AgentEventType, type AgentRun, type AgentRunCreateParams, type AgentRunListParams, type AgentRunStatus, type AgentRunTargetKind, AgentRuns, AgentRuntimeProfiles, type AgentSessionCreateParams, type AgentSessionData, type AgentSessionListResponse$1 as AgentSessionListResponse, type AgentSessionStatus$1 as AgentSessionStatus, type AllowParams, Analytics, type AnalyticsFilters, type ApiKeyCreateParams, type ApiKeyCreateResult, type ApiKeyData, type ApiKeyId, type ApiKeyListParams, ApiKeys, AppAuth, type AppAuthConfig, type AppAuthResourceType, type AppAuthSession, type AppAuthTokenPayload, type AppCatalogEntry, type AppInstallData, type AppInstallEvent, type AuditListParams, AuditLog, type AuditLogEvent, type AuditLogListParams, type AuditTailParams, AuthError, type AuthToken, type BenchmarkCompareParams, type BenchmarkCreateParams, Benchmarks, type BindingCreateParams, type BindingListParams, type BrandingData, type BrandingUpdateParams, type BucketCreateParams, type BucketData, type BucketId, type BuilderSessionListParams, BuilderSessions, type BulkUserActionParams, type ChannelCreateParams, type ChannelData, type ChannelListParams, type ChannelUpdateParams, Channels, type ChatCompletionCreateParams, type ChatCompletionCreateStreamParams, Checkpoints, type ClickParams, type ClusterCreateParams, type ClusterData, type ClusterEvent, type ClusterId, type ClusterListResponse, type ClusterStatus, CommandCenter, Community, type CompletionCreateParams, type CompletionCreateStreamParams, Completions, Computer, ComputerAudit, ComputerAutoStop, type ComputerCreateParams, type ComputerData, ComputerEnv, type ComputerId, ComputerInbox, type ComputerListParams, type ComputerListResponse, ComputerLogs, type ComputerLogsGetParams, ComputerNetwork, ComputerOsa, ComputerPorts, ComputerSecrets, type ComputerSize, type ComputerStatus, type ComputerTemplateType, ComputerTerminal, type ComputerUpdateParams, type ComputerVisibility, ComputerVolumes, Computers, type CopyParams, type CreateAdminApiKeyParams, type CreateOrgInviteParams, type CreateWorkspaceInviteParams, type CreateWorkspaceInviteResponse, type CreditBalance, type CreditTransaction, type CreditTransactionListResponse, type CreditUsage, Credits, type CronJobCreateParams, type CronJobData, type CronJobExecutionData, type CronJobExecutionId, type CronJobId, type CronJobListParams, type CronJobUpdateParams, CronJobs, type CursorInfo, type CustomDomainCreateParams, type CustomDomainData, type CustomDomainId, type CustomDomainListParams, Dashboard, type DashboardSummary, type DatabaseCreateParams, type DatabaseCredentials, type DatabaseData, type DatabaseId, type DatabaseListParams, type DatabaseLogsParams, type DatabaseLogsResult, Databases, type DeploymentBuildData, type DeploymentCreateParams, type DeploymentData, DeploymentDomains, type DeploymentId, type DeploymentListParams, type DeploymentProduct, type DeploymentReleaseData, type DeploymentReleaseId, DeploymentReleases, DeploymentRuntimeInstances, type DeploymentServiceData, type DeploymentServiceId, type DeploymentServiceType, type DeploymentSourceType, type DeploymentState, type DeploymentUpdateParams, type DeploymentVersionData, type DeploymentVersionId, type DeploymentVersionKind, type DeploymentVersionState, DeploymentVersions, Deployments, Desktop$1 as Desktop, type DesktopActionResult, type DirEntry, type DirListResult, type DiscordSendTestParams, DockerDeploy, type DockerDeployApplianceStatus, type DockerDeployCreateParams, type DockerDeployDoctorCheck, type DockerDeployDoctorParams, type DockerDeployDoctorProbe, type DockerDeployDoctorResult, type DockerDeployHostData, type DockerDeployHostEnsureParams, type DockerDeployHostId, type DockerDeployHostListParams, type DockerDeployHostListResponse, type DockerDeployHostResponse, type DockerDeployHostStatus, type DoubleClickParams, type DragParams, type EgressAllowlistRule, EgressAudit, type EgressAuditEvent, type EgressBindingData, EgressNetwork, type EgressPolicyData, type EgressPolicyMode, type EgressRuleEffect, type EgressSecretData, type EgressSecretScope, type EgressSecretType, EgressSecrets, type EgressSuggestion, Email, EmailCampaigns, EmailInbox, EmailTemplates, type EmbeddingCreateParams, Embeddings, Exec, type ExecParams, type ExecPythonParams, type ExecResult, type ExternalAttribution, type ExternalKeyCreateParams, type ExternalKeyData, ExternalKeys, type FileDeleteParams, type FileDownloadParams, type FileEntry, type FileExportParams, type FileExportResult, type FileListParams, type FileListResult, type FileStat, Files, FlatCustomDomains, type FsEntry, type FsListResponse, type FsStat, type FunctionCreateParams, type FunctionData, type FunctionId, type FunctionInvokeParams, type FunctionListParams, type FunctionUpdateParams, Functions, type GithubRepo, type GithubSshKey, type HealthCheckCreateParams, type HealthCheckData, type HealthCheckId, type HealthCheckListParams, type HealthCheckUpdateParams, HealthChecks, type HostCreateParams, type HostData, type HostEvent, type HostId, type HostListResponse, type HostStatus, type HostUpdateParams, InsufficientCreditsError, type IntegrationCatalogEntry, type IntegrationData, Integrations, type JobData, type JobEvent, type JobEventType, type JobId, type JobListResponse, type JobRunParams, type JobStatus, type KeyParams, type LaunchParams, type LinearCreateIssueParams, type ListAdminApiKeysParams, type ListAdminComputersParams, type ListAdminTenantsParams, type ListAdminUsersParams, Mcp, type McpDispatchParams, Miosa, type MiosaClientConfig, MiosaError, type MkdirParams, type ModeParams, Models, type MouseButton, NetworkError, NetworkPolicy, type NetworkPolicyData, type NetworkPolicyEffect, type NetworkPolicyProtocol, type NetworkPolicyRule, type NetworkPolicySetParams, NotFoundError, type NotificationPrefsUpdateParams, OAuthFlow, type OauthConnectParams, type OauthProvider, type OauthStartResult, type OauthStatusResult, type ObjectListParams, type AgentEvent as OcAgentEvent, type OcAgentSessionData, type AgentSessionListResponse as OcAgentSessionListResponse, type OcWorkspaceCreateParams, type OcWorkspaceData, type OcWorkspaceEvent, type OcWorkspaceListResponse, type OcWorkspaceStatus, type OcWorkspaceUpdateParams, OpenComputers, type OrgInvite, type OrgInviteCreated, type OrgInviteCreatedResponse, type OrgInviteListResponse, type OrgInvitePreview, type OrgInviteRevokeResponse, OrgInvites, type OrgRole, type OverviewData, type PolicyCreateParams, type PolicyListParams, type PolicyUpdateParams, type PresignParams, type PresignResult, type PreviewDomainData, ProjectAuth, type ProjectAuthEnableParams, type ProjectAuthStatus, type ProjectAuthUpdateParams, type ProjectIntegrationCatalogEntry, type ProjectIntegrationCreateParams, type ProjectIntegrationData, type ProjectIntegrationListParams, type ProjectIntegrationUpdateParams, ProjectIntegrations, ProviderDefaults, type ProviderKeyUpsertParams, type PublishFromSandboxParams, type PublishParams, type PublishResult, RateLimitError, type RegionData, Regions, type RollbackParams, type RulesListParams, type RuntimeInstanceData, type RuntimeInstanceId, type RuntimeInstanceState, type RuntimeLogsResult, SANDBOX_TEMPLATE, Sandbox, SandboxArtifacts, SandboxAudit, type SandboxBuildSpec, type SandboxBuildSpecError, type SandboxBuildSpecValidation, SandboxCommands, type SandboxCreateParams, type SandboxData, SandboxEnv, SandboxEvents, type SandboxExecOptions, type SandboxExecResult, SandboxFiles, type SandboxGetOrCreateParams, type SandboxId, type SandboxListParams, SandboxNetwork, SandboxPreview, SandboxPreviews, SandboxSecrets, type SandboxState, SandboxTags, type SandboxTemplate, type SandboxTemplateBuild, type SandboxTemplateBuildCreateParams, type SandboxTemplateBuildResourceData, type SandboxTemplateBuildResourceId, type SandboxTemplateCreateParams, type SandboxTemplateList, type SandboxTemplateListParams, type SandboxTemplateResourceData, type SandboxTemplateResourceId, SandboxTemplates, SandboxTerminal, Sandboxes, ScopedFs, type ScrollDirection, type ScrollParams, type SecretCreateParams, type SecretData, type SecretId, type SecretListParams, type SecretRotateParams, type SecretSetParams, type SecretUpdateParams, type SessionId, Settings, type SettingsUpdateParams, type SizeData, type SlackSendTestParams, type SnapshotCreateParams, type SnapshotData, type SnapshotListResponse, type SnapshotProgressEvent, type SnapshotRestoreResult, type SnapshotStatus, SnapshotsStandalone, Storage, type StorageObjectData, type SuggestionsParams, type TemplateBuildCreateParams, type TemplateCreateParams, type TemplateData, Tenant, type TenantBrandingUpdateParams, type TenantId, type TenantPlan, type TenantSummary, type TerminalCreateParams, TimeoutError, type TimeseriesParams, type TunnelAuthMode, type TunnelCreateParams, type TunnelData, type TunnelId, type TunnelListResponse, type TunnelUpdateParams, type TypeParams, type UpdateWorkspaceMemberRoleParams, Usage, type UsageReportParams, type UsageSession, type UsageSessionsParams, type UsageSummary, type UserId, ValidationError, type VersionListParams, type VolumeCreateParams, type VolumeData, type VolumeId, type VolumeListParams, Volumes, type WaitParams, type WebhookCreateParams, type WebhookData, type WebhookDeliveryData, type WebhookDeliveryId, type WebhookId, type WebhookListParams, type WebhookUpdateParams, Webhooks, type WindowFocusParams, type WindowInfo, type WorkspaceId, type WorkspaceInvite, type WorkspaceInviteCreatedResponse, type WorkspaceInviteListResponse, type WorkspaceInvitePreview, type WorkspaceInviteRevokeResponse, WorkspaceInvites, type WorkspaceMember, type WorkspaceMemberAddedResponse, type WorkspaceMemberDeleteResponse, type WorkspaceMemberListResponse, type WorkspaceMemberRecord, type WorkspaceMemberRecordResponse, WorkspaceMembers, type WorkspaceRole, type WsTicket, verifySignature };
|
package/dist/index.js
CHANGED
|
@@ -612,6 +612,7 @@ function body(params) {
|
|
|
612
612
|
return Object.fromEntries(
|
|
613
613
|
Object.entries({
|
|
614
614
|
workspace_id: params.workspaceId ?? params.workspace_id,
|
|
615
|
+
project_id: params.projectId ?? params.project_id,
|
|
615
616
|
name: params.name,
|
|
616
617
|
runtime: params.runtime,
|
|
617
618
|
description: params.description,
|
|
@@ -631,12 +632,14 @@ function normalize(profile) {
|
|
|
631
632
|
};
|
|
632
633
|
const tenantId = profile.tenantId ?? profile.tenant_id;
|
|
633
634
|
const workspaceId2 = profile.workspaceId ?? profile.workspace_id;
|
|
635
|
+
const projectId = profile.projectId ?? profile.project_id;
|
|
634
636
|
const appliesTo = profile.appliesTo ?? profile.applies_to;
|
|
635
637
|
const isDefault = profile.isDefault ?? profile.is_default;
|
|
636
638
|
const createdAt = profile.createdAt ?? profile.created_at;
|
|
637
639
|
const updatedAt = profile.updatedAt ?? profile.updated_at;
|
|
638
640
|
if (tenantId !== void 0) normalized.tenantId = tenantId;
|
|
639
641
|
if (workspaceId2 !== void 0) normalized.workspaceId = workspaceId2;
|
|
642
|
+
if (projectId !== void 0) normalized.projectId = projectId;
|
|
640
643
|
if (appliesTo !== void 0) normalized.appliesTo = appliesTo;
|
|
641
644
|
if (isDefault !== void 0) normalized.isDefault = isDefault;
|
|
642
645
|
if (createdAt !== void 0) normalized.createdAt = createdAt;
|
|
@@ -651,7 +654,10 @@ var AgentRuntimeProfiles = class {
|
|
|
651
654
|
async list(params = {}) {
|
|
652
655
|
const response = await this.http.get(
|
|
653
656
|
"/agent-runtime-profiles",
|
|
654
|
-
{
|
|
657
|
+
{
|
|
658
|
+
workspace_id: params.workspaceId ?? params.workspace_id,
|
|
659
|
+
project_id: params.projectId ?? params.project_id
|
|
660
|
+
}
|
|
655
661
|
);
|
|
656
662
|
return unwrap(response).map(normalize);
|
|
657
663
|
}
|
|
@@ -708,6 +714,28 @@ var AgentRuns = class {
|
|
|
708
714
|
this.http = http;
|
|
709
715
|
}
|
|
710
716
|
http;
|
|
717
|
+
async list(params = {}) {
|
|
718
|
+
const response = await this.http.get(
|
|
719
|
+
"/agent-runs",
|
|
720
|
+
stripUndefined({
|
|
721
|
+
target_kind: params.targetKind,
|
|
722
|
+
target_id: params.targetId,
|
|
723
|
+
sandbox_id: params.sandboxId,
|
|
724
|
+
computer_id: params.computerId,
|
|
725
|
+
status: params.status
|
|
726
|
+
})
|
|
727
|
+
);
|
|
728
|
+
const data = unwrap2(
|
|
729
|
+
response
|
|
730
|
+
);
|
|
731
|
+
if (Array.isArray(data)) return data;
|
|
732
|
+
return data.runs ?? data.items ?? [];
|
|
733
|
+
}
|
|
734
|
+
async get(id) {
|
|
735
|
+
return unwrap2(
|
|
736
|
+
await this.http.get(`/agent-runs/${encodeURIComponent(id)}`)
|
|
737
|
+
);
|
|
738
|
+
}
|
|
711
739
|
async run(params) {
|
|
712
740
|
const body2 = stripUndefined({
|
|
713
741
|
prompt: params.prompt,
|
|
@@ -721,10 +749,22 @@ var AgentRuns = class {
|
|
|
721
749
|
runtime_command: params.runtimeCommand,
|
|
722
750
|
cwd: params.cwd,
|
|
723
751
|
timeout: params.timeout,
|
|
752
|
+
env: params.env,
|
|
753
|
+
agent_runtime_profile_id: params.agentRuntimeProfileId,
|
|
754
|
+
agent_profile_id: params.agentProfileId,
|
|
755
|
+
skip_agent_runtime_profile: params.skipAgentRuntimeProfile,
|
|
724
756
|
metadata: params.metadata
|
|
725
757
|
});
|
|
726
758
|
return unwrap2(await this.http.post("/agent-runs", body2));
|
|
727
759
|
}
|
|
760
|
+
async cancel(id) {
|
|
761
|
+
return unwrap2(
|
|
762
|
+
await this.http.post(
|
|
763
|
+
`/agent-runs/${encodeURIComponent(id)}/cancel`,
|
|
764
|
+
{}
|
|
765
|
+
)
|
|
766
|
+
);
|
|
767
|
+
}
|
|
728
768
|
};
|
|
729
769
|
|
|
730
770
|
// src/resources/analytics.ts
|
|
@@ -6703,9 +6743,12 @@ var Sandbox = class _Sandbox {
|
|
|
6703
6743
|
"SANDBOX_DESTROYED"
|
|
6704
6744
|
);
|
|
6705
6745
|
}
|
|
6746
|
+
if (this.data.state === "paused" && this.data.persistent === true) {
|
|
6747
|
+
return;
|
|
6748
|
+
}
|
|
6706
6749
|
if (this.data.state !== "running") {
|
|
6707
6750
|
throw new MiosaError(
|
|
6708
|
-
`Cannot ${operation} on sandbox ${this.id}: state is ${this.data.state}, expected running`,
|
|
6751
|
+
`Cannot ${operation} on sandbox ${this.id}: state is ${this.data.state}, expected running or paused persistent`,
|
|
6709
6752
|
409,
|
|
6710
6753
|
"SANDBOX_NOT_RUNNING"
|
|
6711
6754
|
);
|