@alienplatform/sdk 3.2.0 → 3.3.0-dev.0d4f932037814a854d56a7e4e82a8a34cc2e35cb
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/dist.js +173 -61
- package/dist/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/native-bindings.d.ts +13 -0
- package/dist/native-bindings.d.ts.map +1 -0
- package/dist/native-bindings.js +18 -0
- package/dist/native.d.ts +19 -20
- package/dist/native.d.ts.map +1 -1
- package/dist/native.js +31 -1
- package/dist/worker-runtime/index.js +1 -1
- package/package.json +20 -15
- package/LICENSE.md +0 -105
package/dist/dist.js
CHANGED
|
@@ -4140,6 +4140,144 @@ const AgentStatusSchema = object({
|
|
|
4140
4140
|
* Generated by Kubb (https://kubb.dev/).
|
|
4141
4141
|
* Do not edit manually.
|
|
4142
4142
|
*/
|
|
4143
|
+
const HeartbeatCollectionIssueReasonSchema = _enum([
|
|
4144
|
+
"forbidden",
|
|
4145
|
+
"not-installed",
|
|
4146
|
+
"api-unavailable",
|
|
4147
|
+
"collection-failed",
|
|
4148
|
+
"timed-out"
|
|
4149
|
+
]);
|
|
4150
|
+
/**
|
|
4151
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
4152
|
+
* Do not edit manually.
|
|
4153
|
+
*/
|
|
4154
|
+
const HeartbeatIssueSeveritySchema = _enum([
|
|
4155
|
+
"info",
|
|
4156
|
+
"warning",
|
|
4157
|
+
"error"
|
|
4158
|
+
]);
|
|
4159
|
+
/**
|
|
4160
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
4161
|
+
* Do not edit manually.
|
|
4162
|
+
*/
|
|
4163
|
+
const HeartbeatCollectionIssueSchema = object({
|
|
4164
|
+
"message": string(),
|
|
4165
|
+
get "reason"() {
|
|
4166
|
+
return HeartbeatCollectionIssueReasonSchema;
|
|
4167
|
+
},
|
|
4168
|
+
get "severity"() {
|
|
4169
|
+
return HeartbeatIssueSeveritySchema;
|
|
4170
|
+
},
|
|
4171
|
+
"source": string()
|
|
4172
|
+
});
|
|
4173
|
+
/**
|
|
4174
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
4175
|
+
* Do not edit manually.
|
|
4176
|
+
*/
|
|
4177
|
+
const ObservedHealthSchema = _enum([
|
|
4178
|
+
"unknown",
|
|
4179
|
+
"healthy",
|
|
4180
|
+
"degraded",
|
|
4181
|
+
"unhealthy"
|
|
4182
|
+
]);
|
|
4183
|
+
/**
|
|
4184
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
4185
|
+
* Do not edit manually.
|
|
4186
|
+
*/
|
|
4187
|
+
const ProviderLifecycleStateSchema = _enum([
|
|
4188
|
+
"unknown",
|
|
4189
|
+
"creating",
|
|
4190
|
+
"updating",
|
|
4191
|
+
"running",
|
|
4192
|
+
"scaling",
|
|
4193
|
+
"stopping",
|
|
4194
|
+
"stopped",
|
|
4195
|
+
"deleting",
|
|
4196
|
+
"deleted",
|
|
4197
|
+
"failed"
|
|
4198
|
+
]);
|
|
4199
|
+
/**
|
|
4200
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
4201
|
+
* Do not edit manually.
|
|
4202
|
+
*/
|
|
4203
|
+
const AiHeartbeatStatusSchema = object({
|
|
4204
|
+
get "collectionIssues"() {
|
|
4205
|
+
return array(HeartbeatCollectionIssueSchema);
|
|
4206
|
+
},
|
|
4207
|
+
get "health"() {
|
|
4208
|
+
return ObservedHealthSchema;
|
|
4209
|
+
},
|
|
4210
|
+
get "lifecycle"() {
|
|
4211
|
+
return ProviderLifecycleStateSchema;
|
|
4212
|
+
},
|
|
4213
|
+
"message": string().nullish(),
|
|
4214
|
+
"partial": boolean(),
|
|
4215
|
+
"stale": boolean()
|
|
4216
|
+
});
|
|
4217
|
+
/**
|
|
4218
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
4219
|
+
* Do not edit manually.
|
|
4220
|
+
*/
|
|
4221
|
+
const AwsBedrockAiHeartbeatDataSchema = object({
|
|
4222
|
+
"region": string(),
|
|
4223
|
+
get "status"() {
|
|
4224
|
+
return AiHeartbeatStatusSchema;
|
|
4225
|
+
}
|
|
4226
|
+
});
|
|
4227
|
+
/**
|
|
4228
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
4229
|
+
* Do not edit manually.
|
|
4230
|
+
*/
|
|
4231
|
+
const AzureFoundryAiHeartbeatDataSchema = object({
|
|
4232
|
+
"accountName": string(),
|
|
4233
|
+
"endpoint": string().nullish(),
|
|
4234
|
+
"location": string().nullish(),
|
|
4235
|
+
"resourceGroup": string().nullish(),
|
|
4236
|
+
get "status"() {
|
|
4237
|
+
return AiHeartbeatStatusSchema;
|
|
4238
|
+
}
|
|
4239
|
+
});
|
|
4240
|
+
/**
|
|
4241
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
4242
|
+
* Do not edit manually.
|
|
4243
|
+
*/
|
|
4244
|
+
const ExternalAiHeartbeatDataSchema = object({
|
|
4245
|
+
"provider": string().describe("The BYO-key provider serving this binding (e.g. \"openai\"). Used on the Local\nplatform, where the app brings its own provider key instead of an ambient cloud."),
|
|
4246
|
+
get "status"() {
|
|
4247
|
+
return AiHeartbeatStatusSchema;
|
|
4248
|
+
}
|
|
4249
|
+
});
|
|
4250
|
+
/**
|
|
4251
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
4252
|
+
* Do not edit manually.
|
|
4253
|
+
*/
|
|
4254
|
+
const GcpVertexAiHeartbeatDataSchema = object({
|
|
4255
|
+
"location": string(),
|
|
4256
|
+
"project": string(),
|
|
4257
|
+
get "status"() {
|
|
4258
|
+
return AiHeartbeatStatusSchema;
|
|
4259
|
+
}
|
|
4260
|
+
});
|
|
4261
|
+
/**
|
|
4262
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
4263
|
+
* Do not edit manually.
|
|
4264
|
+
*/
|
|
4265
|
+
const AiHeartbeatDataSchema = union([
|
|
4266
|
+
lazy(() => AwsBedrockAiHeartbeatDataSchema).and(object({ "backend": _enum(["awsBedrock"]) })),
|
|
4267
|
+
lazy(() => GcpVertexAiHeartbeatDataSchema).and(object({ "backend": _enum(["gcpVertex"]) })),
|
|
4268
|
+
lazy(() => AzureFoundryAiHeartbeatDataSchema).and(object({ "backend": _enum(["azureFoundry"]) })),
|
|
4269
|
+
lazy(() => ExternalAiHeartbeatDataSchema).and(object({ "backend": _enum(["external"]) }))
|
|
4270
|
+
]);
|
|
4271
|
+
object({
|
|
4272
|
+
"account": string().describe("The provider account or project identifier, if applicable.").nullish(),
|
|
4273
|
+
"endpoint": string().describe("The provider endpoint URL, if applicable.").nullish(),
|
|
4274
|
+
"provider": string().describe("The AI provider name (e.g., \"bedrock\", \"vertex\", \"foundry\", \"external\").")
|
|
4275
|
+
}).describe("Outputs generated by a successfully provisioned AI Gateway resource.");
|
|
4276
|
+
object({ "id": string().describe("Identifier for the AI resource. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]).\nMaximum 64 characters.") }).describe("Represents an AI Gateway resource that provides a unified interface to\nmanaged AI inference services across cloud providers.\n\nBYO-key external providers (OpenAI/Anthropic) are NOT declared here. Like any\nother BYO infrastructure (e.g. external Redis for `kv`), an external AI\nprovider is supplied at deploy time as an `ExternalBinding::Ai` in the\nstack's external-bindings map; the executor then skips the cloud controller.");
|
|
4277
|
+
/**
|
|
4278
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
4279
|
+
* Do not edit manually.
|
|
4280
|
+
*/
|
|
4143
4281
|
/**
|
|
4144
4282
|
* @description Progress information for image push operations
|
|
4145
4283
|
*/
|
|
@@ -4448,66 +4586,6 @@ const ArchitectureSchema = _enum(["arm64", "x86_64"]).describe("CPU architecture
|
|
|
4448
4586
|
* Generated by Kubb (https://kubb.dev/).
|
|
4449
4587
|
* Do not edit manually.
|
|
4450
4588
|
*/
|
|
4451
|
-
const HeartbeatCollectionIssueReasonSchema = _enum([
|
|
4452
|
-
"forbidden",
|
|
4453
|
-
"not-installed",
|
|
4454
|
-
"api-unavailable",
|
|
4455
|
-
"collection-failed",
|
|
4456
|
-
"timed-out"
|
|
4457
|
-
]);
|
|
4458
|
-
/**
|
|
4459
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
4460
|
-
* Do not edit manually.
|
|
4461
|
-
*/
|
|
4462
|
-
const HeartbeatIssueSeveritySchema = _enum([
|
|
4463
|
-
"info",
|
|
4464
|
-
"warning",
|
|
4465
|
-
"error"
|
|
4466
|
-
]);
|
|
4467
|
-
/**
|
|
4468
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
4469
|
-
* Do not edit manually.
|
|
4470
|
-
*/
|
|
4471
|
-
const HeartbeatCollectionIssueSchema = object({
|
|
4472
|
-
"message": string(),
|
|
4473
|
-
get "reason"() {
|
|
4474
|
-
return HeartbeatCollectionIssueReasonSchema;
|
|
4475
|
-
},
|
|
4476
|
-
get "severity"() {
|
|
4477
|
-
return HeartbeatIssueSeveritySchema;
|
|
4478
|
-
},
|
|
4479
|
-
"source": string()
|
|
4480
|
-
});
|
|
4481
|
-
/**
|
|
4482
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
4483
|
-
* Do not edit manually.
|
|
4484
|
-
*/
|
|
4485
|
-
const ObservedHealthSchema = _enum([
|
|
4486
|
-
"unknown",
|
|
4487
|
-
"healthy",
|
|
4488
|
-
"degraded",
|
|
4489
|
-
"unhealthy"
|
|
4490
|
-
]);
|
|
4491
|
-
/**
|
|
4492
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
4493
|
-
* Do not edit manually.
|
|
4494
|
-
*/
|
|
4495
|
-
const ProviderLifecycleStateSchema = _enum([
|
|
4496
|
-
"unknown",
|
|
4497
|
-
"creating",
|
|
4498
|
-
"updating",
|
|
4499
|
-
"running",
|
|
4500
|
-
"scaling",
|
|
4501
|
-
"stopping",
|
|
4502
|
-
"stopped",
|
|
4503
|
-
"deleting",
|
|
4504
|
-
"deleted",
|
|
4505
|
-
"failed"
|
|
4506
|
-
]);
|
|
4507
|
-
/**
|
|
4508
|
-
* Generated by Kubb (https://kubb.dev/).
|
|
4509
|
-
* Do not edit manually.
|
|
4510
|
-
*/
|
|
4511
4589
|
const ArtifactRegistryHeartbeatStatusSchema = object({
|
|
4512
4590
|
get "collectionIssues"() {
|
|
4513
4591
|
return array(HeartbeatCollectionIssueSchema);
|
|
@@ -9209,6 +9287,12 @@ const ResourceHeartbeatDataSchema = union([
|
|
|
9209
9287
|
return AzureServiceBusNamespaceHeartbeatDataSchema;
|
|
9210
9288
|
},
|
|
9211
9289
|
"resourceType": _enum(["azure_service_bus_namespace"])
|
|
9290
|
+
}),
|
|
9291
|
+
object({
|
|
9292
|
+
get "data"() {
|
|
9293
|
+
return AiHeartbeatDataSchema;
|
|
9294
|
+
},
|
|
9295
|
+
"resourceType": _enum(["ai"])
|
|
9212
9296
|
})
|
|
9213
9297
|
]);
|
|
9214
9298
|
object({
|
|
@@ -10182,5 +10266,33 @@ defineError({
|
|
|
10182
10266
|
internal: false,
|
|
10183
10267
|
httpStatusCode: 400
|
|
10184
10268
|
});
|
|
10269
|
+
/**
|
|
10270
|
+
* Error thrown when a binding's projected configuration is invalid.
|
|
10271
|
+
*/
|
|
10272
|
+
const InvalidBindingConfigError = defineError({
|
|
10273
|
+
code: "INVALID_BINDING_CONFIG",
|
|
10274
|
+
context: object({
|
|
10275
|
+
message: string(),
|
|
10276
|
+
suggestion: string().optional()
|
|
10277
|
+
}),
|
|
10278
|
+
message: ({ message, suggestion }) => suggestion ? `${message}. ${suggestion}` : message,
|
|
10279
|
+
retryable: false,
|
|
10280
|
+
internal: false,
|
|
10281
|
+
httpStatusCode: 400
|
|
10282
|
+
});
|
|
10283
|
+
/**
|
|
10284
|
+
* Error thrown when a binding is not found.
|
|
10285
|
+
*/
|
|
10286
|
+
const BindingNotFoundError = defineError({
|
|
10287
|
+
code: "BINDING_NOT_FOUND",
|
|
10288
|
+
context: object({
|
|
10289
|
+
bindingName: string(),
|
|
10290
|
+
bindingType: string()
|
|
10291
|
+
}),
|
|
10292
|
+
message: ({ bindingName, bindingType }) => `${bindingType} binding '${bindingName}' not found`,
|
|
10293
|
+
retryable: false,
|
|
10294
|
+
internal: false,
|
|
10295
|
+
httpStatusCode: 404
|
|
10296
|
+
});
|
|
10185
10297
|
//#endregion
|
|
10186
|
-
export {
|
|
10298
|
+
export { logSystemWarn as _, object as a, getCommands as c, onQueueMessage as d, onStorageEvent as f, logSystemError as g, waitUntil as h, defineError as i, getEventHandlers as l, setOnTaskRegistered as m, BindingNotFoundError as n, string as o, runCommand as p, InvalidBindingConfigError as r, command as s, AlienError as t, onCronEvent as u };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* It provides the Worker handler APIs (`command`, `onStorageEvent`,
|
|
5
5
|
* `onCronEvent`, `onQueueMessage`, `waitUntil`) and re-exports the app-facing
|
|
6
|
-
* binding factories (`storage`, `kv`, `queue`, `vault`) from
|
|
6
|
+
* binding factories (`storage`, `kv`, `queue`, `vault`, `container`, `postgres`) from
|
|
7
7
|
* `@alienplatform/bindings`, so a Worker author installs one package.
|
|
8
8
|
*
|
|
9
9
|
* Worker protocol dependencies (nice-grpc, generated Worker protocol clients)
|
|
@@ -27,8 +27,11 @@
|
|
|
27
27
|
*/
|
|
28
28
|
export { command, onStorageEvent, onCronEvent, onQueueMessage, waitUntil, } from "./worker-runtime/registry.js";
|
|
29
29
|
export type { StorageEvent, StorageEventType, CronEvent, QueueMessage, QueueMessageEvent, ScheduledEvent, StandardSchema, StandardSchemaOutput, WorkerCommandContext, } from "./worker-runtime/registry.js";
|
|
30
|
-
export { storage, kv, queue, vault, container } from "@alienplatform/bindings";
|
|
31
|
-
export type { Storage, Kv, Queue, Vault, Container } from "@alienplatform/bindings";
|
|
30
|
+
export { storage, kv, queue, vault, container, postgres } from "@alienplatform/bindings";
|
|
31
|
+
export type { Storage, Kv, Queue, Vault, Container, Postgres, PostgresConnection, PostgresSslMode, } from "@alienplatform/bindings";
|
|
32
|
+
export { ai, getAiConnection, startAiGateway, Ai, isExternalAiBinding, parseAiBinding, } from "@alienplatform/ai-gateway";
|
|
33
|
+
export type { AiBinding, AmbientAiBinding, ExternalAiBinding, AiConnection, AiModel, ChatCompletionCreateParams, ResponseCreateParams, } from "@alienplatform/ai-gateway";
|
|
32
34
|
export { BindingNotConfiguredError } from "@alienplatform/bindings";
|
|
33
|
-
export {
|
|
35
|
+
export { AiTransportError, AiUpstreamError } from "@alienplatform/ai-gateway";
|
|
36
|
+
export { AlienError, BindingNotFoundError, InvalidBindingConfigError } from "@alienplatform/core";
|
|
34
37
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAOH,OAAO,EACL,OAAO,EACP,cAAc,EACd,WAAW,EACX,cAAc,EACd,SAAS,GACV,MAAM,8BAA8B,CAAA;AAErC,YAAY,EACV,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,8BAA8B,CAAA;AAMrC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAOH,OAAO,EACL,OAAO,EACP,cAAc,EACd,WAAW,EACX,cAAc,EACd,SAAS,GACV,MAAM,8BAA8B,CAAA;AAErC,YAAY,EACV,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,8BAA8B,CAAA;AAMrC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AACxF,YAAY,EACV,OAAO,EACP,EAAE,EACF,KAAK,EACL,KAAK,EACL,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,eAAe,GAChB,MAAM,yBAAyB,CAAA;AAMhC,OAAO,EACL,EAAE,EACF,eAAe,EACf,cAAc,EACd,EAAE,EACF,mBAAmB,EACnB,cAAc,GACf,MAAM,2BAA2B,CAAA;AAClC,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,OAAO,EACP,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,2BAA2B,CAAA;AAMlC,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BindingNotConfiguredError, container, kv, queue, storage, vault } from "@alienplatform/bindings";
|
|
3
|
-
|
|
1
|
+
import { d as onQueueMessage, f as onStorageEvent, h as waitUntil, n as BindingNotFoundError, r as InvalidBindingConfigError, s as command, t as AlienError, u as onCronEvent } from "./dist.js";
|
|
2
|
+
import { BindingNotConfiguredError, container, kv, postgres, queue, storage, vault } from "@alienplatform/bindings";
|
|
3
|
+
import { Ai, AiTransportError, AiUpstreamError, ai, getAiConnection, isExternalAiBinding, parseAiBinding, startAiGateway } from "@alienplatform/ai-gateway";
|
|
4
|
+
export { Ai, AiTransportError, AiUpstreamError, AlienError, BindingNotConfiguredError, BindingNotFoundError, InvalidBindingConfigError, ai, command, container, getAiConnection, isExternalAiBinding, kv, onCronEvent, onQueueMessage, onStorageEvent, parseAiBinding, postgres, queue, startAiGateway, storage, vault, waitUntil };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@alienplatform/sdk/native-bindings`: the embedded-bindings bridge for bundled
|
|
3
|
+
* Workers.
|
|
4
|
+
*
|
|
5
|
+
* Same one-hop trick as `./native` — a Worker can resolve the SDK but not the
|
|
6
|
+
* transitive `@alienplatform/bindings` — minus the gateway. A bundled Worker gets
|
|
7
|
+
* its launcher from the versioned base image at `./alien-ai-gateway`, so importing
|
|
8
|
+
* the gateway's `/native` here would both register a `.bin` asset path that no
|
|
9
|
+
* bundle packages and make the build fail wherever that asset was never staged.
|
|
10
|
+
*/
|
|
11
|
+
/** Register the bun-embedded bindings addon with its loader. */
|
|
12
|
+
export declare function installEmbeddedAddon(): void;
|
|
13
|
+
//# sourceMappingURL=native-bindings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-bindings.d.ts","sourceRoot":"","sources":["../src/native-bindings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,gEAAgE;AAChE,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { installEmbeddedAddon as installEmbeddedAddon$1 } from "@alienplatform/bindings/native";
|
|
2
|
+
//#region src/native-bindings.ts
|
|
3
|
+
/**
|
|
4
|
+
* `@alienplatform/sdk/native-bindings`: the embedded-bindings bridge for bundled
|
|
5
|
+
* Workers.
|
|
6
|
+
*
|
|
7
|
+
* Same one-hop trick as `./native` — a Worker can resolve the SDK but not the
|
|
8
|
+
* transitive `@alienplatform/bindings` — minus the gateway. A bundled Worker gets
|
|
9
|
+
* its launcher from the versioned base image at `./alien-ai-gateway`, so importing
|
|
10
|
+
* the gateway's `/native` here would both register a `.bin` asset path that no
|
|
11
|
+
* bundle packages and make the build fail wherever that asset was never staged.
|
|
12
|
+
*/
|
|
13
|
+
/** Register the bun-embedded bindings addon with its loader. */
|
|
14
|
+
function installEmbeddedAddon() {
|
|
15
|
+
installEmbeddedAddon$1();
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { installEmbeddedAddon };
|
package/dist/native.d.ts
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `@alienplatform/sdk/native
|
|
2
|
+
* `@alienplatform/sdk/native`: the embedded-native bridge for compiled Workers.
|
|
3
3
|
*
|
|
4
|
-
* A Worker depends only on `@alienplatform/sdk`; `@alienplatform/bindings`
|
|
5
|
-
* transitive
|
|
6
|
-
* `node_modules` cannot resolve
|
|
7
|
-
* it can resolve the SDK, and the SDK can resolve
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* package it can't see.
|
|
4
|
+
* A Worker depends only on `@alienplatform/sdk`; `@alienplatform/bindings` and
|
|
5
|
+
* `@alienplatform/ai-gateway` are transitive dependencies reached *through* the
|
|
6
|
+
* SDK, so a Worker's own `node_modules` cannot resolve their `/native` subpaths
|
|
7
|
+
* directly. But it can resolve the SDK, and the SDK can resolve both (each is a
|
|
8
|
+
* direct dependency). This subpath is that one hop: it installs both bun-embedded
|
|
9
|
+
* pieces so a compiled Worker bootstrap can register them without naming packages
|
|
10
|
+
* it can't see.
|
|
12
11
|
*
|
|
13
|
-
* `bun build --compile` follows
|
|
14
|
-
* (`@alienplatform/sdk/native` → `@alienplatform/bindings/native`
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
12
|
+
* `bun build --compile` follows the static re-export chains
|
|
13
|
+
* (`@alienplatform/sdk/native` → `@alienplatform/{bindings,ai-gateway}/native`)
|
|
14
|
+
* and embeds each package's native asset: the `alien-bindings.node` addon
|
|
15
|
+
* (bindings runs in-process) and the `alien-ai-gateway` executable (the gateway
|
|
16
|
+
* runs as a spawned process). The SDK keeps both packages external (see
|
|
17
|
+
* tsdown.config.ts), so the registrations here are visible to the SDK's
|
|
18
|
+
* re-exported `kv`/`storage`/`queue`/`vault` and `ai`/`getAiConnection` factories.
|
|
20
19
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* `@alienplatform/bindings/native` only runs where that addon has been staged.
|
|
20
|
+
* Imported only by a generated compiled entry (never in dev), so the transitive
|
|
21
|
+
* static asset imports inside each `/native` only run where the asset was staged.
|
|
24
22
|
*/
|
|
25
|
-
|
|
23
|
+
/** Register the bun-embedded bindings addon and ai-gateway binary with their loaders. */
|
|
24
|
+
export declare function installEmbeddedAddon(): void;
|
|
26
25
|
//# sourceMappingURL=native.d.ts.map
|
package/dist/native.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../src/native.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../src/native.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,yFAAyF;AACzF,wBAAgB,oBAAoB,IAAI,IAAI,CAG3C"}
|
package/dist/native.js
CHANGED
|
@@ -1,2 +1,32 @@
|
|
|
1
|
-
import { installEmbeddedAddon } from "@alienplatform/bindings/native";
|
|
1
|
+
import { installEmbeddedAddon as installEmbeddedAddon$1 } from "@alienplatform/bindings/native";
|
|
2
|
+
import { installEmbeddedGateway } from "@alienplatform/ai-gateway/native";
|
|
3
|
+
//#region src/native.ts
|
|
4
|
+
/**
|
|
5
|
+
* `@alienplatform/sdk/native`: the embedded-native bridge for compiled Workers.
|
|
6
|
+
*
|
|
7
|
+
* A Worker depends only on `@alienplatform/sdk`; `@alienplatform/bindings` and
|
|
8
|
+
* `@alienplatform/ai-gateway` are transitive dependencies reached *through* the
|
|
9
|
+
* SDK, so a Worker's own `node_modules` cannot resolve their `/native` subpaths
|
|
10
|
+
* directly. But it can resolve the SDK, and the SDK can resolve both (each is a
|
|
11
|
+
* direct dependency). This subpath is that one hop: it installs both bun-embedded
|
|
12
|
+
* pieces so a compiled Worker bootstrap can register them without naming packages
|
|
13
|
+
* it can't see.
|
|
14
|
+
*
|
|
15
|
+
* `bun build --compile` follows the static re-export chains
|
|
16
|
+
* (`@alienplatform/sdk/native` → `@alienplatform/{bindings,ai-gateway}/native`)
|
|
17
|
+
* and embeds each package's native asset: the `alien-bindings.node` addon
|
|
18
|
+
* (bindings runs in-process) and the `alien-ai-gateway` executable (the gateway
|
|
19
|
+
* runs as a spawned process). The SDK keeps both packages external (see
|
|
20
|
+
* tsdown.config.ts), so the registrations here are visible to the SDK's
|
|
21
|
+
* re-exported `kv`/`storage`/`queue`/`vault` and `ai`/`getAiConnection` factories.
|
|
22
|
+
*
|
|
23
|
+
* Imported only by a generated compiled entry (never in dev), so the transitive
|
|
24
|
+
* static asset imports inside each `/native` only run where the asset was staged.
|
|
25
|
+
*/
|
|
26
|
+
/** Register the bun-embedded bindings addon and ai-gateway binary with their loaders. */
|
|
27
|
+
function installEmbeddedAddon() {
|
|
28
|
+
installEmbeddedAddon$1();
|
|
29
|
+
installEmbeddedGateway();
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
2
32
|
export { installEmbeddedAddon };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as logSystemWarn, a as object, c as getCommands, g as logSystemError, i as defineError, l as getEventHandlers, m as setOnTaskRegistered, o as string, p as runCommand, t as AlienError } from "../dist.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { formatWithOptions } from "node:util";
|
|
4
4
|
//#region \0rolldown/runtime.js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alienplatform/sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0-dev.0d4f932037814a854d56a7e4e82a8a34cc2e35cb",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -17,8 +17,20 @@
|
|
|
17
17
|
"./native": {
|
|
18
18
|
"types": "./dist/native.d.ts",
|
|
19
19
|
"import": "./dist/native.js"
|
|
20
|
+
},
|
|
21
|
+
"./native-bindings": {
|
|
22
|
+
"types": "./dist/native-bindings.d.ts",
|
|
23
|
+
"import": "./dist/native-bindings.js"
|
|
20
24
|
}
|
|
21
25
|
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsdown && tsc --emitDeclarationOnly",
|
|
28
|
+
"test": "vitest run --passWithNoTests",
|
|
29
|
+
"test:ts": "tsc --noEmit",
|
|
30
|
+
"generate": "./scripts/generate-proto.sh",
|
|
31
|
+
"format-and-lint": "biome check .",
|
|
32
|
+
"format-and-lint:fix": "biome check . --write"
|
|
33
|
+
},
|
|
22
34
|
"sideEffects": false,
|
|
23
35
|
"keywords": [
|
|
24
36
|
"alien",
|
|
@@ -39,29 +51,22 @@
|
|
|
39
51
|
"access": "public"
|
|
40
52
|
},
|
|
41
53
|
"devDependencies": {
|
|
54
|
+
"@alienplatform/typescript-config": "workspace:^",
|
|
42
55
|
"@biomejs/biome": "^1.9.4",
|
|
43
56
|
"@types/node": "^24.0.15",
|
|
44
57
|
"ts-proto": "^2.7.0",
|
|
45
58
|
"tsdown": "^0.13.0",
|
|
46
59
|
"typescript": "^5.8.3",
|
|
47
|
-
"vitest": "^3.1.4"
|
|
48
|
-
"@alienplatform/typescript-config": "^1.0.0"
|
|
60
|
+
"vitest": "^3.1.4"
|
|
49
61
|
},
|
|
50
62
|
"dependencies": {
|
|
63
|
+
"@alienplatform/ai-gateway": "3.3.0-dev.0d4f932037814a854d56a7e4e82a8a34cc2e35cb",
|
|
64
|
+
"@alienplatform/bindings": "3.3.0-dev.0d4f932037814a854d56a7e4e82a8a34cc2e35cb",
|
|
65
|
+
"@alienplatform/core": "3.3.0-dev.0d4f932037814a854d56a7e4e82a8a34cc2e35cb",
|
|
51
66
|
"@bufbuild/protobuf": "^2.5.3",
|
|
52
67
|
"@grpc/grpc-js": "^1.14.4",
|
|
53
68
|
"nice-grpc": "^2.1.11",
|
|
54
69
|
"nice-grpc-common": "^2.0.2",
|
|
55
|
-
"zod": "4.3.2"
|
|
56
|
-
"@alienplatform/bindings": "^3.2.0",
|
|
57
|
-
"@alienplatform/core": "^3.2.0"
|
|
58
|
-
},
|
|
59
|
-
"scripts": {
|
|
60
|
-
"build": "tsdown && tsc --emitDeclarationOnly",
|
|
61
|
-
"test": "vitest run --passWithNoTests",
|
|
62
|
-
"test:ts": "tsc --noEmit",
|
|
63
|
-
"generate": "./scripts/generate-proto.sh",
|
|
64
|
-
"format-and-lint": "biome check .",
|
|
65
|
-
"format-and-lint:fix": "biome check . --write"
|
|
70
|
+
"zod": "4.3.2"
|
|
66
71
|
}
|
|
67
|
-
}
|
|
72
|
+
}
|
package/LICENSE.md
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# Functional Source License, Version 1.1, Apache 2.0 Future License
|
|
2
|
-
|
|
3
|
-
## Abbreviation
|
|
4
|
-
|
|
5
|
-
FSL-1.1-Apache-2.0
|
|
6
|
-
|
|
7
|
-
## Notice
|
|
8
|
-
|
|
9
|
-
Copyright 2026 Alien Software, Inc.
|
|
10
|
-
|
|
11
|
-
## Terms and Conditions
|
|
12
|
-
|
|
13
|
-
### Licensor ("We")
|
|
14
|
-
|
|
15
|
-
The party offering the Software under these Terms and Conditions.
|
|
16
|
-
|
|
17
|
-
### The Software
|
|
18
|
-
|
|
19
|
-
The "Software" is each version of the software that we make available under
|
|
20
|
-
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
-
Conditions with the Software.
|
|
22
|
-
|
|
23
|
-
### License Grant
|
|
24
|
-
|
|
25
|
-
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
-
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
-
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
-
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
-
|
|
30
|
-
### Permitted Purpose
|
|
31
|
-
|
|
32
|
-
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
-
means making the Software available to others in a commercial product or
|
|
34
|
-
service that:
|
|
35
|
-
|
|
36
|
-
1. substitutes for the Software;
|
|
37
|
-
|
|
38
|
-
2. substitutes for any other product or service we offer using the Software
|
|
39
|
-
that exists as of the date we make the Software available; or
|
|
40
|
-
|
|
41
|
-
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
-
|
|
43
|
-
Permitted Purposes specifically include using the Software:
|
|
44
|
-
|
|
45
|
-
1. for your internal use and access;
|
|
46
|
-
|
|
47
|
-
2. for non-commercial education;
|
|
48
|
-
|
|
49
|
-
3. for non-commercial research; and
|
|
50
|
-
|
|
51
|
-
4. in connection with professional services that you provide to a licensee
|
|
52
|
-
using the Software in accordance with these Terms and Conditions.
|
|
53
|
-
|
|
54
|
-
### Patents
|
|
55
|
-
|
|
56
|
-
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
-
patents, the license grant above includes a license under our patents. If you
|
|
58
|
-
make a claim against any party that the Software infringes or contributes to
|
|
59
|
-
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
-
immediately.
|
|
61
|
-
|
|
62
|
-
### Redistribution
|
|
63
|
-
|
|
64
|
-
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
-
the Software.
|
|
66
|
-
|
|
67
|
-
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
-
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
-
remove any copyright notices provided in or with the Software.
|
|
70
|
-
|
|
71
|
-
### Disclaimer
|
|
72
|
-
|
|
73
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
-
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
-
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
-
|
|
77
|
-
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
-
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
-
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
-
|
|
81
|
-
### Trademarks
|
|
82
|
-
|
|
83
|
-
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
-
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
-
trademarks, trade names, service marks or product names.
|
|
86
|
-
|
|
87
|
-
## Grant of Future License
|
|
88
|
-
|
|
89
|
-
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
-
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
-
the date we make the Software available. On or after that date, you may use the
|
|
92
|
-
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
-
will apply:
|
|
94
|
-
|
|
95
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
-
this file except in compliance with the License.
|
|
97
|
-
|
|
98
|
-
You may obtain a copy of the License at
|
|
99
|
-
|
|
100
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
-
|
|
102
|
-
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
-
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
-
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
-
specific language governing permissions and limitations under the License.
|