@stackbone/sdk 0.1.0-alpha.0 → 0.1.0-alpha.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/CHANGELOG.md +21 -0
- package/index.cjs +19 -11
- package/index.cjs.map +1 -1
- package/index.d.cts +9 -8
- package/index.d.ts +9 -8
- package/index.js +19 -11
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/stackbone-sdk-0.1.0-alpha.1.tgz +0 -0
- package/stackbone-sdk-0.1.0-alpha.0.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.0-alpha.1] - 2026-05-15
|
|
11
|
+
|
|
12
|
+
### BREAKING
|
|
13
|
+
|
|
14
|
+
- Runtime env contract collapsed under `STACKBONE_*`. The SDK no longer
|
|
15
|
+
reads `AWS_ACCESS_KEY_ID` / `S3_ACCESS_KEY` / `S3_ENDPOINT` /
|
|
16
|
+
`S3_BUCKET` / `S3_REGION` / `DATABASE_URL`. Creators must export
|
|
17
|
+
`STACKBONE_S3_ACCESS_KEY`, `STACKBONE_S3_SECRET_KEY`,
|
|
18
|
+
`STACKBONE_S3_ENDPOINT`, `STACKBONE_S3_BUCKET`, `STACKBONE_S3_REGION`,
|
|
19
|
+
`STACKBONE_POSTGRES_URL`. `client.storage` derives its multi-tenant
|
|
20
|
+
key prefix from `STACKBONE_AGENT_ID` (injected by `stackbone dev` and
|
|
21
|
+
the cloud runner) so the run-steps exporter and Studio Storage share
|
|
22
|
+
the same prefix.
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- New validator schemas re-exported from the bundled `@stackbone/validators`
|
|
27
|
+
surface for the Studio Playground contract: `schemaResponseSchema`
|
|
28
|
+
(`{ input: JsonSchema | null, output: JsonSchema | null }`) and
|
|
29
|
+
`fixtureIdParamSchema`.
|
|
30
|
+
|
|
10
31
|
## [0.1.0-alpha.0] - 2026-05-14
|
|
11
32
|
|
|
12
33
|
### Added
|
package/index.cjs
CHANGED
|
@@ -15560,6 +15560,13 @@ external_exports.object({
|
|
|
15560
15560
|
nextCursor: external_exports.string().nullable(),
|
|
15561
15561
|
prevCursor: external_exports.string().nullable()
|
|
15562
15562
|
});
|
|
15563
|
+
external_exports.object({
|
|
15564
|
+
fxtId: external_exports.uuid()
|
|
15565
|
+
});
|
|
15566
|
+
external_exports.object({
|
|
15567
|
+
input: jsonObject().nullable(),
|
|
15568
|
+
output: jsonObject().nullable()
|
|
15569
|
+
});
|
|
15563
15570
|
|
|
15564
15571
|
// ../validators/src/lib/auth/session.ts
|
|
15565
15572
|
var sessionUserSchema = external_exports.object({
|
|
@@ -18120,7 +18127,7 @@ var RunStepsSpanProcessor = class {
|
|
|
18120
18127
|
this.intervalMs = options.flushIntervalMs ?? DEFAULT_INTERVAL_MS2;
|
|
18121
18128
|
this.resolveStepType = options.resolveStepType ?? defaultStepTypeResolver;
|
|
18122
18129
|
this.newId = options.newId ?? crypto$1.randomUUID;
|
|
18123
|
-
this.connectionString = options.connectionString ?? process.env["
|
|
18130
|
+
this.connectionString = options.connectionString ?? process.env["STACKBONE_POSTGRES_URL"];
|
|
18124
18131
|
if (options.sql) {
|
|
18125
18132
|
this.sql = options.sql;
|
|
18126
18133
|
this.ownsSql = false;
|
|
@@ -18304,7 +18311,7 @@ var ObservabilityModule = class {
|
|
|
18304
18311
|
if (!this._processor) {
|
|
18305
18312
|
const merged = {
|
|
18306
18313
|
...options,
|
|
18307
|
-
connectionString: options.connectionString ?? this._resolved.config.databaseUrl ?? this._resolved.env["
|
|
18314
|
+
connectionString: options.connectionString ?? this._resolved.config.databaseUrl ?? this._resolved.env["STACKBONE_POSTGRES_URL"]
|
|
18308
18315
|
};
|
|
18309
18316
|
this._processor = new RunStepsSpanProcessor(merged);
|
|
18310
18317
|
}
|
|
@@ -18363,7 +18370,7 @@ var ObservabilityModule = class {
|
|
|
18363
18370
|
if (!sql) {
|
|
18364
18371
|
return err({
|
|
18365
18372
|
code: "database_url_missing",
|
|
18366
|
-
message: "Cannot reach the agent Postgres \u2014 set `
|
|
18373
|
+
message: "Cannot reach the agent Postgres \u2014 set `STACKBONE_POSTGRES_URL` in the container or pass `databaseUrl` to `createClient({...})`."
|
|
18367
18374
|
});
|
|
18368
18375
|
}
|
|
18369
18376
|
try {
|
|
@@ -18384,7 +18391,7 @@ var ObservabilityModule = class {
|
|
|
18384
18391
|
// don't pay the dep cost.
|
|
18385
18392
|
async resolveSql() {
|
|
18386
18393
|
if (this._sqlResolved) return this._sql;
|
|
18387
|
-
const connectionString = this._resolved.config.databaseUrl ?? this._resolved.env["
|
|
18394
|
+
const connectionString = this._resolved.config.databaseUrl ?? this._resolved.env["STACKBONE_POSTGRES_URL"];
|
|
18388
18395
|
if (!connectionString) {
|
|
18389
18396
|
this._sqlResolved = true;
|
|
18390
18397
|
return null;
|
|
@@ -19580,11 +19587,12 @@ var StorageModule = class {
|
|
|
19580
19587
|
return new StorageBucket(bucket, () => this.settings(), this._gate);
|
|
19581
19588
|
}
|
|
19582
19589
|
settings() {
|
|
19583
|
-
const accessKeyId = this._resolved.config.s3?.accessKeyId ?? this._resolved.env["
|
|
19584
|
-
const secretAccessKey = this._resolved.config.s3?.secretAccessKey ?? this._resolved.env["
|
|
19585
|
-
const endpoint = this._resolved.config.s3?.endpoint ?? this._resolved.env["
|
|
19586
|
-
const bucket = this._resolved.config.s3?.bucket ?? this._resolved.env["
|
|
19590
|
+
const accessKeyId = this._resolved.config.s3?.accessKeyId ?? this._resolved.env["STACKBONE_S3_ACCESS_KEY"];
|
|
19591
|
+
const secretAccessKey = this._resolved.config.s3?.secretAccessKey ?? this._resolved.env["STACKBONE_S3_SECRET_KEY"];
|
|
19592
|
+
const endpoint = this._resolved.config.s3?.endpoint ?? this._resolved.env["STACKBONE_S3_ENDPOINT"];
|
|
19593
|
+
const bucket = this._resolved.config.s3?.bucket ?? this._resolved.env["STACKBONE_S3_BUCKET"];
|
|
19587
19594
|
const agentId = this._resolved.config.agentId ?? this._resolved.env["STACKBONE_AGENT_ID"];
|
|
19595
|
+
const region = this._resolved.config.s3?.region ?? this._resolved.env["STACKBONE_S3_REGION"] ?? "auto";
|
|
19588
19596
|
if (!accessKeyId || !secretAccessKey || !endpoint) {
|
|
19589
19597
|
return err({
|
|
19590
19598
|
code: "s3_credentials_missing",
|
|
@@ -19605,7 +19613,7 @@ var StorageModule = class {
|
|
|
19605
19613
|
}
|
|
19606
19614
|
this._s3 ??= new clientS3.S3Client({
|
|
19607
19615
|
endpoint,
|
|
19608
|
-
region
|
|
19616
|
+
region,
|
|
19609
19617
|
forcePathStyle: true,
|
|
19610
19618
|
credentials: {
|
|
19611
19619
|
accessKeyId,
|
|
@@ -19831,8 +19839,8 @@ var StorageBucket = class {
|
|
|
19831
19839
|
});
|
|
19832
19840
|
}
|
|
19833
19841
|
};
|
|
19834
|
-
var S3_CREDENTIALS_MISSING_MESSAGE = "Cannot reach object storage \u2014 set `
|
|
19835
|
-
var S3_BUCKET_MISSING_MESSAGE = "No storage bucket configured \u2014 set `
|
|
19842
|
+
var S3_CREDENTIALS_MISSING_MESSAGE = "Cannot reach object storage \u2014 set `STACKBONE_S3_ACCESS_KEY`, `STACKBONE_S3_SECRET_KEY`, and `STACKBONE_S3_ENDPOINT` in the container or pass `s3` to `createClient({...})`.";
|
|
19843
|
+
var S3_BUCKET_MISSING_MESSAGE = "No storage bucket configured \u2014 set `STACKBONE_S3_BUCKET` in the container or pass `s3.bucket` to `createClient({...})`.";
|
|
19836
19844
|
var AGENT_ID_MISSING_MESSAGE = "No agent identity configured \u2014 set `STACKBONE_AGENT_ID` in the container or pass `agentId` to `createClient({...})`.";
|
|
19837
19845
|
function stripEtag(etag) {
|
|
19838
19846
|
return etag?.replace(/^"|"$/g, "");
|