@alienplatform/sdk 3.3.39 → 3.3.40

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 CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/worker-runtime/system-log.ts
1
+ // src/worker-runtime/system-log.ts
2
2
  /**
3
3
  * Private wire marker understood by alien-worker-runtime.
4
4
  *
@@ -12,8 +12,7 @@ function logSystemError(message, ...args) {
12
12
  function logSystemWarn(message, ...args) {
13
13
  console.warn(`${SYSTEM_LOG_PREFIX}${message}`, ...args);
14
14
  }
15
- //#endregion
16
- //#region src/worker-runtime/registry.ts
15
+ // src/worker-runtime/registry.ts
17
16
  const REGISTRY_KEY = Symbol.for("@alienplatform/sdk#worker-runtime-registry");
18
17
  function registry$1() {
19
18
  const holder = globalThis;
@@ -185,8 +184,7 @@ function waitUntil(promise) {
185
184
  function setOnTaskRegistered(hook) {
186
185
  registry$1().onTaskRegistered = hook;
187
186
  }
188
- //#endregion
189
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/util.js
187
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/util.js
190
188
  function getEnumValues(entries) {
191
189
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
192
190
  return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
@@ -679,8 +677,7 @@ function constantCatch(value) {
679
677
  fn[CONSTANT_CATCH] = true;
680
678
  return fn;
681
679
  }
682
- //#endregion
683
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/core.js
680
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/core.js
684
681
  var _a$1;
685
682
  const _zodDesc$1 = {
686
683
  value: void 0,
@@ -707,6 +704,7 @@ function newError$1(Definition) {
707
704
  }
708
705
  return new Definition();
709
706
  }
707
+ /* @__NO_SIDE_EFFECTS__ */
710
708
  function $constructor(name, initializer, proto, params) {
711
709
  const zodProto = {};
712
710
  function Internals(def) {
@@ -786,8 +784,7 @@ function config(newConfig) {
786
784
  if (newConfig) Object.assign(globalConfig, newConfig);
787
785
  return globalConfig;
788
786
  }
789
- //#endregion
790
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/errors.js
787
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/errors.js
791
788
  function _getMessage() {
792
789
  const internals = this._zod;
793
790
  internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
@@ -845,8 +842,8 @@ const initializer$1 = (inst, def) => {
845
842
  });
846
843
  }
847
844
  };
848
- const $ZodError = $constructor("$ZodError", initializer$1);
849
- const $ZodRealError = $constructor("$ZodError", initializer$1, void 0, { Parent: Error });
845
+ const $ZodError = /* @__PURE__ */ $constructor("$ZodError", initializer$1);
846
+ const $ZodRealError = /* @__PURE__ */ $constructor("$ZodError", initializer$1, void 0, { Parent: Error });
850
847
  /** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member
851
848
  * ("toString", "constructor") would otherwise read through to the prototype, and assigning
852
849
  * "__proto__" would hit the setter instead of creating a key. */
@@ -909,8 +906,7 @@ function formatError(error, mapper = (issue) => issue.message) {
909
906
  processError(error);
910
907
  return fieldErrors;
911
908
  }
912
- //#endregion
913
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/parse.js
909
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/parse.js
914
910
  function finalizeParams(callee, params) {
915
911
  return {
916
912
  callee: params?.callee ?? callee,
@@ -1051,8 +1047,7 @@ const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
1051
1047
  const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
1052
1048
  return _safeParseAsync(_Err)(schema, value, _ctx);
1053
1049
  };
1054
- //#endregion
1055
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/regexes.js
1050
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/regexes.js
1056
1051
  /**
1057
1052
  * @deprecated CUID v1 is deprecated by its authors due to information leakage
1058
1053
  * (timestamps embedded in the id). Use {@link cuid2} instead.
@@ -1127,8 +1122,7 @@ const boolean$1 = /^(?:true|false)$/i;
1127
1122
  const _null$2 = /^null$/i;
1128
1123
  const lowercase = /^[^A-Z]*$/;
1129
1124
  const uppercase = /^[^a-z]*$/;
1130
- //#endregion
1131
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/checks.js
1125
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/checks.js
1132
1126
  const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
1133
1127
  var _a;
1134
1128
  inst._zod ?? (inst._zod = {});
@@ -1488,8 +1482,7 @@ const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (ins
1488
1482
  payload.value = def.tx(payload.value);
1489
1483
  };
1490
1484
  });
1491
- //#endregion
1492
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/doc.js
1485
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/doc.js
1493
1486
  var Doc = class {
1494
1487
  constructor(args = [], closed = {}) {
1495
1488
  this.content = [];
@@ -1519,15 +1512,13 @@ var Doc = class {
1519
1512
  return new F(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${content.join("\n")}\n};`)(...Object.values(this.closed));
1520
1513
  }
1521
1514
  };
1522
- //#endregion
1523
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/versions.js
1515
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/versions.js
1524
1516
  const version = {
1525
1517
  major: 4,
1526
1518
  minor: 5,
1527
1519
  patch: 2
1528
1520
  };
1529
- //#endregion
1530
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/schemas.js
1521
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/schemas.js
1531
1522
  const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
1532
1523
  var _a;
1533
1524
  inst ?? (inst = {});
@@ -2865,8 +2856,7 @@ function handleRefineResult(result, payload, input, inst) {
2865
2856
  payload.issues.push(issue(_iss));
2866
2857
  }
2867
2858
  }
2868
- //#endregion
2869
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/memoizer.js
2859
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/memoizer.js
2870
2860
  var $ZodCyclicError = class extends Error {
2871
2861
  constructor() {
2872
2862
  super(`Cannot parse a reference cycle that closes through a transform`);
@@ -3017,8 +3007,7 @@ function isBackEdge(ctx, value) {
3017
3007
  const backEdges = ctx[STATE]?.backEdges;
3018
3008
  return backEdges !== void 0 && value !== null && typeof value === "object" && backEdges.has(value);
3019
3009
  }
3020
- //#endregion
3021
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/locales/en.js
3010
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/locales/en.js
3022
3011
  const error = () => {
3023
3012
  const Sizable = {
3024
3013
  string: {
@@ -3123,8 +3112,7 @@ const error = () => {
3123
3112
  function en_default() {
3124
3113
  return { localeError: error() };
3125
3114
  }
3126
- //#endregion
3127
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/registries.js
3115
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/registries.js
3128
3116
  var _a;
3129
3117
  var $ZodRegistry = class {
3130
3118
  constructor() {
@@ -3170,8 +3158,7 @@ function registry() {
3170
3158
  }
3171
3159
  (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
3172
3160
  const globalRegistry = globalThis.__zod_globalRegistry;
3173
- //#endregion
3174
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/api.js
3161
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/api.js
3175
3162
  // @__NO_SIDE_EFFECTS__
3176
3163
  function _string(Class, params) {
3177
3164
  return new Class({
@@ -3686,8 +3673,7 @@ function _check(fn, params) {
3686
3673
  ch._zod.check = fn;
3687
3674
  return ch;
3688
3675
  }
3689
- //#endregion
3690
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/to-json-schema.js
3676
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/to-json-schema.js
3691
3677
  function assignProps(target, ...sources) {
3692
3678
  for (const source of sources) for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProp(target, key, source[key]);
3693
3679
  return target;
@@ -4131,8 +4117,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
4131
4117
  extractDefs(ctx, schema);
4132
4118
  return finalize(ctx, schema);
4133
4119
  };
4134
- //#endregion
4135
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/json-schema-processors.js
4120
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/json-schema-processors.js
4136
4121
  const formatMap = {
4137
4122
  guid: "uuid",
4138
4123
  url: "uri",
@@ -4423,8 +4408,7 @@ const lazyProcessor = (schema, ctx, _json, params) => {
4423
4408
  const seen = ctx.seen.get(schema);
4424
4409
  seen.ref = innerType;
4425
4410
  };
4426
- //#endregion
4427
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/errors.js
4411
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/errors.js
4428
4412
  const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
4429
4413
  function _lazyMethod(proto, key, make) {
4430
4414
  Object.defineProperty(proto, key, {
@@ -4473,8 +4457,7 @@ const initializer = (inst, issues) => {
4473
4457
  });
4474
4458
  };
4475
4459
  const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
4476
- //#endregion
4477
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/parse.js
4460
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/parse.js
4478
4461
  const parse = /* @__PURE__ */ _parse(ZodRealError);
4479
4462
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
4480
4463
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -4487,8 +4470,7 @@ const safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
4487
4470
  const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
4488
4471
  const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
4489
4472
  const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
4490
- //#endregion
4491
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/schemas.js
4473
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/schemas.js
4492
4474
  function _ensureDefaultLocale() {
4493
4475
  if (!globalConfig.localeError) config(en_default());
4494
4476
  }
@@ -5381,13 +5363,11 @@ function json(params) {
5381
5363
  });
5382
5364
  return jsonSchema;
5383
5365
  }
5384
- //#endregion
5385
- //#region ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/iso.js
5366
+ // ../../node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/iso.js
5386
5367
  function datetime(params) {
5387
5368
  return /* @__PURE__ */ _isoDateTime(ZodISODateTime, params);
5388
5369
  }
5389
- //#endregion
5390
- //#region ../../node_modules/.pnpm/serialize-error@12.0.0/node_modules/serialize-error/error-constructors.js
5370
+ // ../../node_modules/.pnpm/serialize-error@12.0.0/node_modules/serialize-error/error-constructors.js
5391
5371
  const list = [
5392
5372
  Error,
5393
5373
  EvalError,
@@ -5402,8 +5382,7 @@ const list = [
5402
5382
  globalThis.SystemError
5403
5383
  ].filter(Boolean).map((constructor) => [constructor.name, constructor]);
5404
5384
  const errorConstructors = new Map(list);
5405
- //#endregion
5406
- //#region ../../node_modules/.pnpm/serialize-error@12.0.0/node_modules/serialize-error/index.js
5385
+ // ../../node_modules/.pnpm/serialize-error@12.0.0/node_modules/serialize-error/index.js
5407
5386
  const errorProperties = [
5408
5387
  {
5409
5388
  property: "name",
@@ -5509,8 +5488,7 @@ function serializeError(value, options = {}) {
5509
5488
  function isErrorLike(value) {
5510
5489
  return Boolean(value) && typeof value === "object" && typeof value.name === "string" && typeof value.message === "string" && typeof value.stack === "string";
5511
5490
  }
5512
- //#endregion
5513
- //#region ../core/dist/index.js
5491
+ // ../core/dist/index.js
5514
5492
  /**
5515
5493
  * Generated by Kubb (https://kubb.dev/).
5516
5494
  * Do not edit manually.
@@ -7867,6 +7845,7 @@ const AzureSandboxNetworkSchema = object({
7867
7845
  object({
7868
7846
  "applicationGatewaySubnetId": string().describe("Dedicated subnet for classic Azure Application Gateway ingress.").nullish(),
7869
7847
  "applicationGatewaySubnetName": string().describe("Dedicated subnet name for classic Azure Application Gateway ingress.").nullish(),
7848
+ "containerAppsSubnetName": string().describe("Subnet delegated to `Microsoft.App/environments` for the Container Apps environment.\nAbsent for a BYO-VNet, whose private subnet serves the environment.").nullish(),
7870
7849
  "egressPublicIps": optional(array(string()).describe("NAT public addresses owned by setup; empty for an unknown external egress path.")),
7871
7850
  "isByoVnet": boolean().describe("True when the VNet is owned outside this stack."),
7872
7851
  "natGatewayId": string().describe("NAT gateway resource id when one was created.").nullish(),
@@ -8578,6 +8557,14 @@ const CapacityGroupScalePolicySchema = union([object({
8578
8557
  * Do not edit manually.
8579
8558
  */
8580
8559
  /**
8560
+ * @description An additional block device a machine must provide with no partitions,\nno filesystem signature, and no mounts, so the workload can format it.
8561
+ */
8562
+ const DataDiskRequirementSchema = object({ "sizeBytes": int().min(0).describe("Minimum device size in bytes.") }).describe("An additional block device a machine must provide with no partitions,\nno filesystem signature, and no mounts, so the workload can format it.");
8563
+ /**
8564
+ * Generated by Kubb (https://kubb.dev/).
8565
+ * Do not edit manually.
8566
+ */
8567
+ /**
8581
8568
  * @description GPU specification for a capacity group.
8582
8569
  */
8583
8570
  const GpuSpecSchema = object({
@@ -8596,6 +8583,9 @@ const MachineProfileSchema = object({
8596
8583
  return union([ArchitectureSchema, _null()]).optional();
8597
8584
  },
8598
8585
  "cpu": string().describe("CPU cores per machine (hardware total) - stored as string to preserve precision\n(e.g., \"8.0\", \"4.5\")"),
8586
+ get "dataDisk"() {
8587
+ return union([DataDiskRequirementSchema, _null()]).optional();
8588
+ },
8599
8589
  "ephemeralStorageBytes": int().min(0).describe("Ephemeral storage in bytes (hardware total)"),
8600
8590
  get "gpu"() {
8601
8591
  return union([GpuSpecSchema, _null()]).optional();
@@ -8912,7 +8902,7 @@ object({
8912
8902
  return array(PlatformSchema.describe("Represents the target cloud platform.")).describe("Cloud platforms on which the explicit node grants apply; absent applies everywhere.").nullish();
8913
8903
  },
8914
8904
  "selectedFailureDomains": optional(object({}).catchall(array(string())).describe("Concrete provider failure domains selected during setup, keyed by capacity group.\nEmpty preserves the existing aggregate layout when no spread policy is configured."))
8915
- }).describe("ComputeCluster resource for running long-running container workloads.\n\nA ComputeCluster provides the setup-owned machine boundary for containers.\nAlien may manage the worker fleet inside that boundary when setup grants\n`compute-cluster/management`.\n\n## Architecture\n\n- **Setup** creates cloud resources: ASGs/MIGs/VMSSs, IAM roles, security groups\n- **Alien** manages allowed fleet operations: machine count, runtime\n machine image rollout and, on AWS, the machine type within one CPU architecture\n- A node agent runs on each machine from the selected runtime image channel\n\n## Example\n\n```rust\nuse alien_core::{CapacityGroup, ComputeCluster, MachineProfile};\n\nlet cluster = ComputeCluster::new(\"compute\".to_string())\n .capacity_group(CapacityGroup {\n group_id: \"general\".to_string(),\n instance_type: None,\n profile: Some(MachineProfile {\n cpu: \"4.0\".to_string(),\n memory_bytes: 16 * 1024 * 1024 * 1024,\n ephemeral_storage_bytes: 20 * 1024 * 1024 * 1024,\n architecture: None,\n gpu: None,\n }),\n min_size: 1,\n max_size: 5,\n scale_policy: None,\n nested_virtualization: None,\n })\n .build();\n```");
8905
+ }).describe("ComputeCluster resource for running long-running container workloads.\n\nA ComputeCluster provides the setup-owned machine boundary for containers.\nAlien may manage the worker fleet inside that boundary when setup grants\n`compute-cluster/management`.\n\n## Architecture\n\n- **Setup** creates cloud resources: ASGs/MIGs/VMSSs, IAM roles, security groups\n- **Alien** manages allowed fleet operations: machine count, runtime\n machine image rollout and, on AWS, the machine type within one CPU architecture\n- A node agent runs on each machine from the selected runtime image channel\n\n## Example\n\n```rust\nuse alien_core::{CapacityGroup, ComputeCluster, MachineProfile};\n\nlet cluster = ComputeCluster::new(\"compute\".to_string())\n .capacity_group(CapacityGroup {\n group_id: \"general\".to_string(),\n instance_type: None,\n profile: Some(MachineProfile {\n cpu: \"4.0\".to_string(),\n memory_bytes: 16 * 1024 * 1024 * 1024,\n ephemeral_storage_bytes: 20 * 1024 * 1024 * 1024,\n architecture: None,\n gpu: None,\n data_disk: None,\n }),\n min_size: 1,\n max_size: 5,\n scale_policy: None,\n nested_virtualization: None,\n })\n .build();\n```");
8916
8906
  /**
8917
8907
  * Generated by Kubb (https://kubb.dev/).
8918
8908
  * Do not edit manually.
@@ -13658,5 +13648,4 @@ defineError({
13658
13648
  internal: false,
13659
13649
  httpStatusCode: 400
13660
13650
  });
13661
- //#endregion
13662
13651
  export { logSystemError as _, object as a, getCommands as c, onQueueBatch as d, onQueueMessage as f, waitUntil as g, setOnTaskRegistered as h, defineError as i, getEventHandlers as l, runCommand as m, BindingNotFoundError as n, string as o, onStorageEvent as p, InvalidBindingConfigError as r, command as s, AlienError as t, onCronEvent as u, logSystemWarn as v };
@@ -1,5 +1,5 @@
1
1
  import { installEmbeddedAddon as installEmbeddedAddon$1 } from "@alienplatform/bindings/native";
2
- //#region src/native-bindings.ts
2
+ // src/native-bindings.ts
3
3
  /**
4
4
  * `@alienplatform/sdk/native-bindings`: the embedded-bindings bridge for bundled
5
5
  * Workers.
@@ -14,5 +14,4 @@ import { installEmbeddedAddon as installEmbeddedAddon$1 } from "@alienplatform/b
14
14
  function installEmbeddedAddon() {
15
15
  installEmbeddedAddon$1();
16
16
  }
17
- //#endregion
18
17
  export { installEmbeddedAddon };
package/dist/native.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { installEmbeddedAddon as installEmbeddedAddon$1 } from "@alienplatform/bindings/native";
2
2
  import { installEmbeddedGateway } from "@alienplatform/ai-gateway/native";
3
- //#region src/native.ts
3
+ // src/native.ts
4
4
  /**
5
5
  * `@alienplatform/sdk/native`: the embedded-native bridge for compiled Workers.
6
6
  *
@@ -28,5 +28,4 @@ function installEmbeddedAddon() {
28
28
  installEmbeddedAddon$1();
29
29
  installEmbeddedGateway();
30
30
  }
31
- //#endregion
32
31
  export { installEmbeddedAddon };