@hoststack.dev/sdk 0.10.0 → 0.11.0
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.cjs +20 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -1
- package/dist/index.d.ts +56 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -75,6 +75,41 @@ interface CreateServiceInput {
|
|
|
75
75
|
/** True when this service is a dev environment (agentic dev-env image, or manually flagged). */
|
|
76
76
|
isDevEnvironment?: boolean;
|
|
77
77
|
}
|
|
78
|
+
/** Companion managed services a standalone dev box can stand up alongside itself. */
|
|
79
|
+
type DevEnvCompanion = 'postgres' | 'redis' | 'meilisearch';
|
|
80
|
+
/** Where a standalone dev box's code comes from. */
|
|
81
|
+
type DevEnvSource = {
|
|
82
|
+
kind: 'github_repo';
|
|
83
|
+
githubRepoId: number;
|
|
84
|
+
branch?: string;
|
|
85
|
+
} | {
|
|
86
|
+
kind: 'url';
|
|
87
|
+
cloneUrl: string;
|
|
88
|
+
branch?: string;
|
|
89
|
+
} | {
|
|
90
|
+
kind: 'blank';
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Create a standalone dev environment — a cloud box (Claude Code / Codex /
|
|
94
|
+
* OpenCode on a persistent /workspace) created from a connected GitHub repo, an
|
|
95
|
+
* arbitrary clone URL, or blank, with optional companion Postgres / Redis /
|
|
96
|
+
* Meilisearch wired into its env. Lives in the team's hidden Development home.
|
|
97
|
+
*/
|
|
98
|
+
interface CreateDevEnvironmentInput {
|
|
99
|
+
name: string;
|
|
100
|
+
source: DevEnvSource;
|
|
101
|
+
/** Companion databases/search to attach (fresh + empty), like local `make db-up`. */
|
|
102
|
+
databases?: DevEnvCompanion[];
|
|
103
|
+
/** Compute size for the box. Defaults to `micro`. */
|
|
104
|
+
plan?: string;
|
|
105
|
+
}
|
|
106
|
+
/** A dev environment as listed for the Development section — a service plus the
|
|
107
|
+
* companion services attached to it. */
|
|
108
|
+
interface DevEnvironment extends Service {
|
|
109
|
+
devUrl?: string | null;
|
|
110
|
+
/** Companion engines attached to the box (e.g. `['postgres','redis']`). */
|
|
111
|
+
databases?: string[];
|
|
112
|
+
}
|
|
78
113
|
/**
|
|
79
114
|
* Fields that live on the `services` row — write via PATCH /services/:tid/:sid.
|
|
80
115
|
* Nullable fields accept `null` to clear; `undefined` leaves the value unchanged.
|
|
@@ -895,6 +930,26 @@ declare class ServicesResource {
|
|
|
895
930
|
}>;
|
|
896
931
|
/** Delete a service. */
|
|
897
932
|
delete(teamId: IdInput, serviceId: IdInput): Promise<void>;
|
|
933
|
+
/**
|
|
934
|
+
* List the team's dev environments (the Development section), each annotated
|
|
935
|
+
* with the companion services attached to it (`databases`).
|
|
936
|
+
*/
|
|
937
|
+
listDevEnvironments(teamId: IdInput): Promise<{
|
|
938
|
+
environments: DevEnvironment[];
|
|
939
|
+
}>;
|
|
940
|
+
/**
|
|
941
|
+
* Create a STANDALONE dev environment — a cloud box (Claude Code / Codex /
|
|
942
|
+
* OpenCode on a persistent /workspace) from a connected GitHub repo, an
|
|
943
|
+
* arbitrary clone URL, or blank, with optional companion Postgres / Redis /
|
|
944
|
+
* Meilisearch. Unlike `spinUpDevEnvironment`, there's no source service — the
|
|
945
|
+
* box lives in the team's hidden Development home. Returns the box, its dev
|
|
946
|
+
* URL, and the first deploy id. Tear it down with `tearDownDevEnvironment`.
|
|
947
|
+
*/
|
|
948
|
+
createDevEnvironment(teamId: IdInput, data: CreateDevEnvironmentInput): Promise<{
|
|
949
|
+
service: Service;
|
|
950
|
+
devUrl: string;
|
|
951
|
+
deployId: number | null;
|
|
952
|
+
}>;
|
|
898
953
|
/**
|
|
899
954
|
* Spin up an agentic dev environment FROM this service: a dev box that runs
|
|
900
955
|
* a clone of the app (repo auto-cloned into /workspace, env-vars copied, and
|
|
@@ -1218,4 +1273,4 @@ interface PaginatedResponse<T> {
|
|
|
1218
1273
|
*/
|
|
1219
1274
|
declare function buildPaginationQuery(params?: PaginationParams): string;
|
|
1220
1275
|
|
|
1221
|
-
export { type ActivityLogEntry, type AddDomainInput, AuthenticationError, type BulkSetEnvVarsInput, ConflictError, type CreateDatabaseInput, type CreateEnvVarInput, type CreateEnvironmentInput, type CreateProjectInput, type CreateServiceInput, type CreateVolumeInput, type CronExecution, type CronExecutionStatus, type CronExecutionTrigger, type Database, type DatabaseCredentials, type DatabaseEngine, type DatabasePlan, type DatabaseStatus, type Deploy, type DeployListResponse, type DeployLogEntry, type DeployStatus, type DeployTrigger, type Domain, type DomainStatus, type EnvVar, type EnvVarTarget, type Environment, ForbiddenError, HostStack, HostStackError, type HostStackOptions, type IdInput, type LogEntry$1 as LogEntry, type MeResponse, NotFoundError, type NotificationChannel, type NotificationChannelEvent, type NotificationChannelType, type PaginatedResponse, type PaginationParams, type Project, RateLimitError, type RegionId, type Service, type ServiceConfig, type ServiceMetricsPoint, type ServiceMetricsSnapshot, type ServicePlan, type ServiceStatus, type ServiceType, type StreamLogsOptions, type Team, type TeamRole, type TriggerDeployInput, type UpdateDatabaseInput, type UpdateDomainInput, type UpdateEnvVarInput, type UpdateEnvironmentInput, type UpdateProjectInput, type UpdateServiceConfigInput, type UpdateServiceInput, type UpdateVolumeInput, type User, type Volume, buildPaginationQuery };
|
|
1276
|
+
export { type ActivityLogEntry, type AddDomainInput, AuthenticationError, type BulkSetEnvVarsInput, ConflictError, type CreateDatabaseInput, type CreateDevEnvironmentInput, type CreateEnvVarInput, type CreateEnvironmentInput, type CreateProjectInput, type CreateServiceInput, type CreateVolumeInput, type CronExecution, type CronExecutionStatus, type CronExecutionTrigger, type Database, type DatabaseCredentials, type DatabaseEngine, type DatabasePlan, type DatabaseStatus, type Deploy, type DeployListResponse, type DeployLogEntry, type DeployStatus, type DeployTrigger, type DevEnvCompanion, type DevEnvSource, type DevEnvironment, type Domain, type DomainStatus, type EnvVar, type EnvVarTarget, type Environment, ForbiddenError, HostStack, HostStackError, type HostStackOptions, type IdInput, type LogEntry$1 as LogEntry, type MeResponse, NotFoundError, type NotificationChannel, type NotificationChannelEvent, type NotificationChannelType, type PaginatedResponse, type PaginationParams, type Project, RateLimitError, type RegionId, type Service, type ServiceConfig, type ServiceMetricsPoint, type ServiceMetricsSnapshot, type ServicePlan, type ServiceStatus, type ServiceType, type StreamLogsOptions, type Team, type TeamRole, type TriggerDeployInput, type UpdateDatabaseInput, type UpdateDomainInput, type UpdateEnvVarInput, type UpdateEnvironmentInput, type UpdateProjectInput, type UpdateServiceConfigInput, type UpdateServiceInput, type UpdateVolumeInput, type User, type Volume, buildPaginationQuery };
|
package/dist/index.d.ts
CHANGED
|
@@ -75,6 +75,41 @@ interface CreateServiceInput {
|
|
|
75
75
|
/** True when this service is a dev environment (agentic dev-env image, or manually flagged). */
|
|
76
76
|
isDevEnvironment?: boolean;
|
|
77
77
|
}
|
|
78
|
+
/** Companion managed services a standalone dev box can stand up alongside itself. */
|
|
79
|
+
type DevEnvCompanion = 'postgres' | 'redis' | 'meilisearch';
|
|
80
|
+
/** Where a standalone dev box's code comes from. */
|
|
81
|
+
type DevEnvSource = {
|
|
82
|
+
kind: 'github_repo';
|
|
83
|
+
githubRepoId: number;
|
|
84
|
+
branch?: string;
|
|
85
|
+
} | {
|
|
86
|
+
kind: 'url';
|
|
87
|
+
cloneUrl: string;
|
|
88
|
+
branch?: string;
|
|
89
|
+
} | {
|
|
90
|
+
kind: 'blank';
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Create a standalone dev environment — a cloud box (Claude Code / Codex /
|
|
94
|
+
* OpenCode on a persistent /workspace) created from a connected GitHub repo, an
|
|
95
|
+
* arbitrary clone URL, or blank, with optional companion Postgres / Redis /
|
|
96
|
+
* Meilisearch wired into its env. Lives in the team's hidden Development home.
|
|
97
|
+
*/
|
|
98
|
+
interface CreateDevEnvironmentInput {
|
|
99
|
+
name: string;
|
|
100
|
+
source: DevEnvSource;
|
|
101
|
+
/** Companion databases/search to attach (fresh + empty), like local `make db-up`. */
|
|
102
|
+
databases?: DevEnvCompanion[];
|
|
103
|
+
/** Compute size for the box. Defaults to `micro`. */
|
|
104
|
+
plan?: string;
|
|
105
|
+
}
|
|
106
|
+
/** A dev environment as listed for the Development section — a service plus the
|
|
107
|
+
* companion services attached to it. */
|
|
108
|
+
interface DevEnvironment extends Service {
|
|
109
|
+
devUrl?: string | null;
|
|
110
|
+
/** Companion engines attached to the box (e.g. `['postgres','redis']`). */
|
|
111
|
+
databases?: string[];
|
|
112
|
+
}
|
|
78
113
|
/**
|
|
79
114
|
* Fields that live on the `services` row — write via PATCH /services/:tid/:sid.
|
|
80
115
|
* Nullable fields accept `null` to clear; `undefined` leaves the value unchanged.
|
|
@@ -895,6 +930,26 @@ declare class ServicesResource {
|
|
|
895
930
|
}>;
|
|
896
931
|
/** Delete a service. */
|
|
897
932
|
delete(teamId: IdInput, serviceId: IdInput): Promise<void>;
|
|
933
|
+
/**
|
|
934
|
+
* List the team's dev environments (the Development section), each annotated
|
|
935
|
+
* with the companion services attached to it (`databases`).
|
|
936
|
+
*/
|
|
937
|
+
listDevEnvironments(teamId: IdInput): Promise<{
|
|
938
|
+
environments: DevEnvironment[];
|
|
939
|
+
}>;
|
|
940
|
+
/**
|
|
941
|
+
* Create a STANDALONE dev environment — a cloud box (Claude Code / Codex /
|
|
942
|
+
* OpenCode on a persistent /workspace) from a connected GitHub repo, an
|
|
943
|
+
* arbitrary clone URL, or blank, with optional companion Postgres / Redis /
|
|
944
|
+
* Meilisearch. Unlike `spinUpDevEnvironment`, there's no source service — the
|
|
945
|
+
* box lives in the team's hidden Development home. Returns the box, its dev
|
|
946
|
+
* URL, and the first deploy id. Tear it down with `tearDownDevEnvironment`.
|
|
947
|
+
*/
|
|
948
|
+
createDevEnvironment(teamId: IdInput, data: CreateDevEnvironmentInput): Promise<{
|
|
949
|
+
service: Service;
|
|
950
|
+
devUrl: string;
|
|
951
|
+
deployId: number | null;
|
|
952
|
+
}>;
|
|
898
953
|
/**
|
|
899
954
|
* Spin up an agentic dev environment FROM this service: a dev box that runs
|
|
900
955
|
* a clone of the app (repo auto-cloned into /workspace, env-vars copied, and
|
|
@@ -1218,4 +1273,4 @@ interface PaginatedResponse<T> {
|
|
|
1218
1273
|
*/
|
|
1219
1274
|
declare function buildPaginationQuery(params?: PaginationParams): string;
|
|
1220
1275
|
|
|
1221
|
-
export { type ActivityLogEntry, type AddDomainInput, AuthenticationError, type BulkSetEnvVarsInput, ConflictError, type CreateDatabaseInput, type CreateEnvVarInput, type CreateEnvironmentInput, type CreateProjectInput, type CreateServiceInput, type CreateVolumeInput, type CronExecution, type CronExecutionStatus, type CronExecutionTrigger, type Database, type DatabaseCredentials, type DatabaseEngine, type DatabasePlan, type DatabaseStatus, type Deploy, type DeployListResponse, type DeployLogEntry, type DeployStatus, type DeployTrigger, type Domain, type DomainStatus, type EnvVar, type EnvVarTarget, type Environment, ForbiddenError, HostStack, HostStackError, type HostStackOptions, type IdInput, type LogEntry$1 as LogEntry, type MeResponse, NotFoundError, type NotificationChannel, type NotificationChannelEvent, type NotificationChannelType, type PaginatedResponse, type PaginationParams, type Project, RateLimitError, type RegionId, type Service, type ServiceConfig, type ServiceMetricsPoint, type ServiceMetricsSnapshot, type ServicePlan, type ServiceStatus, type ServiceType, type StreamLogsOptions, type Team, type TeamRole, type TriggerDeployInput, type UpdateDatabaseInput, type UpdateDomainInput, type UpdateEnvVarInput, type UpdateEnvironmentInput, type UpdateProjectInput, type UpdateServiceConfigInput, type UpdateServiceInput, type UpdateVolumeInput, type User, type Volume, buildPaginationQuery };
|
|
1276
|
+
export { type ActivityLogEntry, type AddDomainInput, AuthenticationError, type BulkSetEnvVarsInput, ConflictError, type CreateDatabaseInput, type CreateDevEnvironmentInput, type CreateEnvVarInput, type CreateEnvironmentInput, type CreateProjectInput, type CreateServiceInput, type CreateVolumeInput, type CronExecution, type CronExecutionStatus, type CronExecutionTrigger, type Database, type DatabaseCredentials, type DatabaseEngine, type DatabasePlan, type DatabaseStatus, type Deploy, type DeployListResponse, type DeployLogEntry, type DeployStatus, type DeployTrigger, type DevEnvCompanion, type DevEnvSource, type DevEnvironment, type Domain, type DomainStatus, type EnvVar, type EnvVarTarget, type Environment, ForbiddenError, HostStack, HostStackError, type HostStackOptions, type IdInput, type LogEntry$1 as LogEntry, type MeResponse, NotFoundError, type NotificationChannel, type NotificationChannelEvent, type NotificationChannelType, type PaginatedResponse, type PaginationParams, type Project, RateLimitError, type RegionId, type Service, type ServiceConfig, type ServiceMetricsPoint, type ServiceMetricsSnapshot, type ServicePlan, type ServiceStatus, type ServiceType, type StreamLogsOptions, type Team, type TeamRole, type TriggerDeployInput, type UpdateDatabaseInput, type UpdateDomainInput, type UpdateEnvVarInput, type UpdateEnvironmentInput, type UpdateProjectInput, type UpdateServiceConfigInput, type UpdateServiceInput, type UpdateVolumeInput, type User, type Volume, buildPaginationQuery };
|
package/dist/index.js
CHANGED
|
@@ -641,6 +641,26 @@ var ServicesResource = class {
|
|
|
641
641
|
const sid = await this.client.resolveId(serviceId, { kind: "service", teamId: tid });
|
|
642
642
|
return this.client.request("DELETE", `/api/services/${tid}/${sid}`);
|
|
643
643
|
}
|
|
644
|
+
/**
|
|
645
|
+
* List the team's dev environments (the Development section), each annotated
|
|
646
|
+
* with the companion services attached to it (`databases`).
|
|
647
|
+
*/
|
|
648
|
+
async listDevEnvironments(teamId) {
|
|
649
|
+
const tid = await this.client.resolveId(teamId, { kind: "team" });
|
|
650
|
+
return this.client.request("GET", `/api/dev-environments/${tid}`);
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Create a STANDALONE dev environment — a cloud box (Claude Code / Codex /
|
|
654
|
+
* OpenCode on a persistent /workspace) from a connected GitHub repo, an
|
|
655
|
+
* arbitrary clone URL, or blank, with optional companion Postgres / Redis /
|
|
656
|
+
* Meilisearch. Unlike `spinUpDevEnvironment`, there's no source service — the
|
|
657
|
+
* box lives in the team's hidden Development home. Returns the box, its dev
|
|
658
|
+
* URL, and the first deploy id. Tear it down with `tearDownDevEnvironment`.
|
|
659
|
+
*/
|
|
660
|
+
async createDevEnvironment(teamId, data) {
|
|
661
|
+
const tid = await this.client.resolveId(teamId, { kind: "team" });
|
|
662
|
+
return this.client.request("POST", `/api/dev-environments/${tid}`, data);
|
|
663
|
+
}
|
|
644
664
|
/**
|
|
645
665
|
* Spin up an agentic dev environment FROM this service: a dev box that runs
|
|
646
666
|
* a clone of the app (repo auto-cloned into /workspace, env-vars copied, and
|