@alienplatform/sdk 3.3.36 → 3.3.38

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
@@ -127,6 +127,22 @@ function onQueueMessage(queueName, handler) {
127
127
  state.eventHandlers.delete(id);
128
128
  };
129
129
  }
130
+ /** Register an opt-in batch handler. Batches may contain fewer than the configured maximum. */
131
+ function onQueueBatch(queueName, handler) {
132
+ const state = registry$1();
133
+ const id = `queue-batch-${++state.counters.handler}`;
134
+ state.eventHandlers.set(id, {
135
+ registration: {
136
+ id,
137
+ type: "queueBatch",
138
+ source: queueName
139
+ },
140
+ handler
141
+ });
142
+ return () => {
143
+ state.eventHandlers.delete(id);
144
+ };
145
+ }
130
146
  /** Get all registered event handlers. @internal */
131
147
  function getEventHandlers() {
132
148
  return registry$1().eventHandlers;
@@ -6179,6 +6195,8 @@ const ArchitectureSchema = _enum(["arm64", "x86_64"]).describe("CPU architecture
6179
6195
  * @description AWS ECR (Elastic Container Registry) binding configuration
6180
6196
  */
6181
6197
  const EcrArtifactRegistryBindingSchema = object({
6198
+ "legacyRepositoryPrefixes": optional(array(string()).describe("Repository prefixes this registry used before `repositoryPrefix`. Images already released\nunder them stay readable and keep their cross-account grants; nothing new is written there.")),
6199
+ "legacySandboxRepositoryPrefixes": optional(array(string()).describe("Sandbox namespaces this registry used before `sandboxRepositoryPrefix`, read the same way.")),
6182
6200
  get "pullRoleArn"() {
6183
6201
  return union([BindingValueStringSchema, _null()]).optional();
6184
6202
  },
@@ -6780,6 +6798,7 @@ const ManagedRuntimeUnitStatusSchema = object({
6780
6798
  get "cpu"() {
6781
6799
  return union([MetricSampleSchema, _null()]).optional();
6782
6800
  },
6801
+ "image": string().describe("Image this replica runs.").nullish(),
6783
6802
  "ip": string().nullish(),
6784
6803
  "machineId": string().nullish(),
6785
6804
  get "memory"() {
@@ -7829,14 +7848,34 @@ const AzureManagementConfigSchema = object({
7829
7848
  "oidcIssuer": string().describe("OIDC issuer URL trusted by the target-side managed identity."),
7830
7849
  "oidcSubject": string().describe("OIDC subject claim trusted by the target-side managed identity.")
7831
7850
  }).describe("Azure management configuration extracted from stack settings");
7851
+ /**
7852
+ * Generated by Kubb (https://kubb.dev/).
7853
+ * Do not edit manually.
7854
+ */
7855
+ /**
7856
+ * @description Setup-owned subnet coordinates consumed by an internal sandbox gateway load balancer.
7857
+ */
7858
+ const AzureSandboxNetworkSchema = object({
7859
+ "gatewayCidrs": array(string()).describe("Gateway ranges allowed by the sandbox subnet NSGs on TCP3128 and TCP3129."),
7860
+ "gatewaySubnetIds": array(string()).describe("Undelegated subnet reserved for the gateway load balancer's frontend."),
7861
+ "sandboxCidrs": array(string()).describe("Sandbox source ranges allowed on the proxy listener."),
7862
+ "sandboxCidrsByResource": optional(object({}).catchall(array(string())).describe("Dedicated source ranges keyed by Sandbox resource id for exact linked-resource access.")),
7863
+ "sandboxSubnetIds": array(string()).describe("Dedicated delegated subnets whose sandboxes use the gateway."),
7864
+ "vpcCidrs": array(string()).describe("Every VNet range excluded from gateway destinations."),
7865
+ "workloadCidrs": array(string()).describe("Workload source ranges allowed on the authenticated admin listener.")
7866
+ }).describe("Setup-owned subnet coordinates consumed by an internal sandbox gateway load balancer.");
7832
7867
  object({
7833
7868
  "applicationGatewaySubnetId": string().describe("Dedicated subnet for classic Azure Application Gateway ingress.").nullish(),
7834
7869
  "applicationGatewaySubnetName": string().describe("Dedicated subnet name for classic Azure Application Gateway ingress.").nullish(),
7870
+ "egressPublicIps": optional(array(string()).describe("NAT public addresses owned by setup; empty for an unknown external egress path.")),
7835
7871
  "isByoVnet": boolean().describe("True when the VNet is owned outside this stack."),
7836
7872
  "natGatewayId": string().describe("NAT gateway resource id when one was created.").nullish(),
7837
7873
  "networkSecurityGroupId": string().describe("Network Security Group resource id attached to workload subnets.").nullish(),
7838
7874
  "privateEndpointSubnetName": string().describe("Dedicated subnet name for Private Endpoints (e.g. Postgres Flexible Server). Distinct from\nthe Container Apps infrastructure (\"private\") subnet, which a Private Endpoint cannot share.").nullish(),
7839
7875
  "resourceGroup": string().describe("Resource group containing the VNet."),
7876
+ get "sandboxNetwork"() {
7877
+ return union([AzureSandboxNetworkSchema, _null()]).optional();
7878
+ },
7840
7879
  "subnetIds": array(string()).describe("Subnet resource ids in this VNet used by workloads."),
7841
7880
  "subscriptionId": string().describe("Subscription ID containing the VNet."),
7842
7881
  "vnetId": string().describe("VNet resource id (full ARM path). Absent when the controller\nwill look up the default VNet at runtime.").nullish(),
@@ -10570,6 +10609,19 @@ const PostgresBindingSchema = union([
10570
10609
  * Do not edit manually.
10571
10610
  */
10572
10611
  /**
10612
+ * @description Connection to one manager-owned local queue. Old SDKs reject its distinct service tag.
10613
+ */
10614
+ const LocalHttpQueueBindingSchema = object({
10615
+ get "endpoint"() {
10616
+ return BindingValueStringSchema.describe("Represents a value that can be either a concrete value, a template expression,\nor a reference to a Kubernetes Secret");
10617
+ },
10618
+ "token": string().describe("Queue-scoped credential, injected at process start rather than persisted in stack state.").nullish()
10619
+ }).describe("Connection to one manager-owned local queue. Old SDKs reject its distinct service tag.");
10620
+ /**
10621
+ * Generated by Kubb (https://kubb.dev/).
10622
+ * Do not edit manually.
10623
+ */
10624
+ /**
10573
10625
  * @description Local queue parameters
10574
10626
  */
10575
10627
  const LocalQueueBindingSchema = object({ get "queuePath"() {
@@ -10626,7 +10678,8 @@ const QueueBindingSchema = union([
10626
10678
  lazy(() => SqsQueueBindingSchema).and(object({ "service": _enum(["sqs"]) })).describe("AWS SQS queue parameters"),
10627
10679
  lazy(() => PubSubQueueBindingSchema).and(object({ "service": _enum(["pubsub"]) })).describe("GCP Pub/Sub parameters"),
10628
10680
  lazy(() => ServiceBusQueueBindingSchema).and(object({ "service": _enum(["servicebus"]) })).describe("Azure Service Bus parameters"),
10629
- lazy(() => LocalQueueBindingSchema).and(object({ "service": _enum(["local-queue"]) })).describe("Local queue parameters")
10681
+ lazy(() => LocalQueueBindingSchema).and(object({ "service": _enum(["local-queue"]) })).describe("Local queue parameters"),
10682
+ lazy(() => LocalHttpQueueBindingSchema).and(object({ "service": _enum(["local-queue-http"]) })).describe("Connection to one manager-owned local queue. Old SDKs reject its distinct service tag.")
10630
10683
  ]).describe("Binding parameters for Queue at runtime or in templates.");
10631
10684
  /**
10632
10685
  * Generated by Kubb (https://kubb.dev/).
@@ -10900,6 +10953,34 @@ object({
10900
10953
  * Generated by Kubb (https://kubb.dev/).
10901
10954
  * Do not edit manually.
10902
10955
  */
10956
+ /**
10957
+ * @description The exact manager identity trusted by a deployment-owned identity pool.
10958
+ */
10959
+ const GcpFederationTrustSchema = object({
10960
+ "issuer": string().describe("OIDC issuer; Google or the manager's Kubernetes issuer."),
10961
+ "subject": string().describe("Exact immutable Google account ID or Kubernetes service-account subject.")
10962
+ }).describe("The exact manager identity trusted by a deployment-owned identity pool.");
10963
+ /**
10964
+ * Generated by Kubb (https://kubb.dev/).
10965
+ * Do not edit manually.
10966
+ */
10967
+ /**
10968
+ * @description Setup-owned federation access. Contains no assertions, keys or access tokens.
10969
+ */
10970
+ const GcpFederationAccessSchema = object({
10971
+ "assertionAudience": string().describe("Installation- and purpose-specific assertion audience, independently\nchecked by the manager against its authorized deployment record."),
10972
+ "poolId": string(),
10973
+ "projectNumber": string(),
10974
+ "providerId": string(),
10975
+ "serviceAccountEmail": string(),
10976
+ get "trust"() {
10977
+ return GcpFederationTrustSchema.describe("The exact manager identity trusted by a deployment-owned identity pool.");
10978
+ }
10979
+ }).describe("Setup-owned federation access. Contains no assertions, keys or access tokens.");
10980
+ /**
10981
+ * Generated by Kubb (https://kubb.dev/).
10982
+ * Do not edit manually.
10983
+ */
10903
10984
  const GcpFirestoreKvHeartbeatDataSchema = object({
10904
10985
  "appEngineIntegrationMode": string().nullish(),
10905
10986
  "cmekEnabled": boolean(),
@@ -10938,7 +11019,12 @@ object({
10938
11019
  /**
10939
11020
  * @description GCP management configuration extracted from stack settings
10940
11021
  */
10941
- const GcpManagementConfigSchema = object({ "serviceAccountEmail": string().describe("Service account email for management roles") }).describe("GCP management configuration extracted from stack settings");
11022
+ const GcpManagementConfigSchema = object({
11023
+ get "federationTrust"() {
11024
+ return union([GcpFederationTrustSchema, _null()]).optional();
11025
+ },
11026
+ "serviceAccountEmail": string().describe("Linked source account metadata; never a direct target trust grant.")
11027
+ }).describe("GCP management configuration extracted from stack settings");
10942
11028
  object({
10943
11029
  "cidrBlock": string().describe("Primary subnetwork CIDR block used for internal firewall rules.").nullish(),
10944
11030
  "isByoVpc": boolean().describe("True when the VPC is owned outside this stack."),
@@ -11010,6 +11096,9 @@ object({
11010
11096
  "topicName": string().describe("Pub/Sub topic full resource name (`projects/<id>/topics/<name>`).")
11011
11097
  }).describe("GCP Queue ImportData — a Pub/Sub topic plus subscription created in\nthe customer's project.");
11012
11098
  object({
11099
+ get "federation"() {
11100
+ return GcpFederationAccessSchema.describe("Setup-owned federation access. Contains no assertions, keys or access tokens.");
11101
+ },
11013
11102
  "projectId": string(),
11014
11103
  "serviceAccountEmail": string(),
11015
11104
  "serviceAccountUniqueId": string()
@@ -11028,12 +11117,15 @@ const GcpRemoteStackManagementHeartbeatDataSchema = object({
11028
11117
  }
11029
11118
  });
11030
11119
  object({
11120
+ get "federation"() {
11121
+ return GcpFederationAccessSchema.describe("Setup-owned federation access. Contains no assertions, keys or access tokens.");
11122
+ },
11031
11123
  "managementPermissionsApplied": boolean().describe("Whether the management role binding was attached by the\ngenerated stack."),
11032
11124
  "projectId": string().describe("Project ID containing the management service account."),
11033
11125
  "projectNumber": string().describe("Numeric project number containing the management service account.").nullish(),
11034
11126
  "serviceAccountEmail": string().describe("Service account email the manager impersonates."),
11035
11127
  "serviceAccountUniqueId": string().describe("Stable unique id Google assigns to the service account.")
11036
- }).describe("GCP RemoteStackManagement ImportData — cross-project service account\nthe manager impersonates.");
11128
+ }).describe("Setup-owned GCP management account and customer-owned federation trust.");
11037
11129
  object({ "region": string().describe("Region the setup stack applied in; selects the regional Agent Platform endpoint.") }).describe("GCP Agent Platform sandbox ImportData.\n\nThe sandbox is the environment template, which is release-owned under either lifecycle: setup\ncreates no template, so this carries only the region the stack applied in. The engine registers\nits own id, and the template controller reads it from that dependency.");
11038
11130
  /**
11039
11131
  * Generated by Kubb (https://kubb.dev/).
@@ -12076,6 +12168,17 @@ object({
12076
12168
  * Generated by Kubb (https://kubb.dev/).
12077
12169
  * Do not edit manually.
12078
12170
  */
12171
+ /**
12172
+ * @description Opt-in queue batching. Counts and windows are upper bounds, not guarantees.\nProviders may deliver smaller batches. Delivery remains at least once and unordered.
12173
+ */
12174
+ const QueueBatchConfigSchema = object({
12175
+ "maxMessages": int().min(1).max(100).describe("Maximum deliveries per batch (1–100)."),
12176
+ "maxWindowSeconds": int().min(0).max(300).describe("Maximum collection window in seconds (0–300).\nAWS may wait up to 20 seconds with sparse traffic even with a shorter window.")
12177
+ }).describe("Opt-in queue batching. Counts and windows are upper bounds, not guarantees.\nProviders may deliver smaller batches. Delivery remains at least once and unordered.");
12178
+ /**
12179
+ * Generated by Kubb (https://kubb.dev/).
12180
+ * Do not edit manually.
12181
+ */
12079
12182
  const QueueHeartbeatDataSchema = union([
12080
12183
  lazy(() => AwsSqsQueueHeartbeatDataSchema).and(object({ "backend": _enum(["awsSqs"]) })),
12081
12184
  lazy(() => GcpPubSubQueueHeartbeatDataSchema).and(object({ "backend": _enum(["gcpPubSub"]) })),
@@ -12919,6 +13022,9 @@ const WorkerPublicEndpointSchema = object({
12919
13022
  */
12920
13023
  const WorkerTriggerSchema = union([
12921
13024
  object({
13025
+ get "batch"() {
13026
+ return union([QueueBatchConfigSchema, _null()]).optional();
13027
+ },
12922
13028
  get "queue"() {
12923
13029
  return ResourceRefSchema.describe("Reference to a resource by its stable id and resource type.");
12924
13030
  },
@@ -13553,4 +13659,4 @@ defineError({
13553
13659
  httpStatusCode: 400
13554
13660
  });
13555
13661
  //#endregion
13556
- 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 };
13662
+ 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 };
package/dist/index.d.ts CHANGED
@@ -26,8 +26,8 @@
26
26
  *
27
27
  * @packageDocumentation
28
28
  */
29
- export type { CronEvent, QueueMessage, QueueMessageEvent, ScheduledEvent, StandardSchema, StandardSchemaOutput, StorageEvent, StorageEventType, WorkerCommandContext, } from "./worker-runtime/registry.js";
30
- export { command, onCronEvent, onQueueMessage, onStorageEvent, waitUntil, } from "./worker-runtime/registry.js";
29
+ export type { CronEvent, QueueBatchEvent, QueueDelivery, QueueDeliveryOutcome, QueueMessage, QueueMessageEvent, ScheduledEvent, StandardSchema, StandardSchemaOutput, StorageEvent, StorageEventType, WorkerCommandContext, } from "./worker-runtime/registry.js";
30
+ export { command, onCronEvent, onQueueBatch, onQueueMessage, onStorageEvent, waitUntil, } from "./worker-runtime/registry.js";
31
31
  export type { CommandFrame, Container, CreateSandboxOptions, JobError, JobExit, JobPoll, Kv, Postgres, PostgresConnection, PostgresSslMode, Queue, ResolvedSandbox, RunCommandOptions, Sandbox, SandboxInstance, Storage, Vault, } from "@alienplatform/bindings";
32
32
  export { container, kv, postgres, queue, sandbox, storage, vault } from "@alienplatform/bindings";
33
33
  export type { AiBinding, AiConnection, AiModel, AmbientAiBinding, ChatCompletionCreateParams, ExternalAiBinding, ResponseCreateParams, } from "@alienplatform/ai-gateway";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;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AiB,EACjB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,OAAO,EACP,WAAW,EACX,YAAY,EACZ,cAAc,EACd,cAAc,EACd,SAAS,GACV,MAAM,8BAA8B,CAAA;AAMrC,YAAY,EACV,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,QAAQ,EACR,OAAO,EACP,OAAO,EACP,EAAE,EACF,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,KAAK,EACL,eAAe,EACf,iBAAiB,EACjB,OAAO,EACP,eAAe,EACf,OAAO,EACP,KAAK,GACN,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAMjG,YAAY,EACV,SAAS,EACT,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,0BAA0B,EAC1B,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,EAAE,EACF,EAAE,EACF,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,cAAc,GACf,MAAM,2BAA2B,CAAA;AAMlC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAA"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
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";
1
+ import { d as onQueueBatch, f as onQueueMessage, g as waitUntil, n as BindingNotFoundError, p as onStorageEvent, r as InvalidBindingConfigError, s as command, t as AlienError, u as onCronEvent } from "./dist.js";
2
2
  import { BindingNotConfiguredError, container, kv, postgres, queue, sandbox, storage, vault } from "@alienplatform/bindings";
3
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, sandbox, startAiGateway, storage, vault, waitUntil };
4
+ export { Ai, AiTransportError, AiUpstreamError, AlienError, BindingNotConfiguredError, BindingNotFoundError, InvalidBindingConfigError, ai, command, container, getAiConnection, isExternalAiBinding, kv, onCronEvent, onQueueBatch, onQueueMessage, onStorageEvent, parseAiBinding, postgres, queue, sandbox, startAiGateway, storage, vault, waitUntil };
@@ -30,6 +30,8 @@ export declare class EventLoop {
30
30
  private readonly endpoint;
31
31
  private readonly service;
32
32
  private running;
33
+ private readonly shutdown;
34
+ private sendChannel;
33
35
  constructor(channel: Channel, applicationId: string, endpoint: string, service: ReturnType<typeof getControlServiceDefinition>);
34
36
  /**
35
37
  * Get or create a separate gRPC client for sending task results.
@@ -45,6 +47,8 @@ export declare class EventLoop {
45
47
  * Start the event loop.
46
48
  */
47
49
  start(): Promise<void>;
50
+ /** Stop receiving tasks; an active handler finishes before start resolves. */
51
+ stop(): void;
48
52
  private processTasks;
49
53
  private handleTask;
50
54
  private handleCommand;
@@ -1 +1 @@
1
- {"version":3,"file":"event-loop.d.ts","sourceRoot":"","sources":["../../src/worker-runtime/event-loop.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,KAAK,OAAO,EAAgB,MAAM,WAAW,CAAA;AAkBtD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAA;AAK3E,mCAAmC;AACnC,wBAAgB,oBAAo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;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAe5D;AAED,mCAAmC;AACnC,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEpE;AAED;;;;GAIG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,UAAU,CAA6B;IAC/C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAQ;IACtC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgD;IACxE,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwB;IACjD,OAAO,CAAC,WAAW,CAAqB;gBAGtC,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,UAAU,CAAC,OAAO,2BAA2B,CAAC;IAQzD;;;;OAIG;YACW,aAAa;IAQ3B;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BvC;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAoB5B,8EAA8E;IAC9E,IAAI,IAAI,IAAI;YAKE,YAAY;YAgBZ,UAAU;YAuGV,aAAa;YAyBb,cAAc;IAqB5B,OAAO,CAAC,qBAAqB;IA4B7B,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,qBAAqB;CA4B9B"}
@@ -29,6 +29,7 @@ export interface Task {
29
29
  cronEvent?: CronEvent | undefined;
30
30
  queueMessage?: QueueMessage | undefined;
31
31
  arcCommand?: ArcCommand | undefined;
32
+ queueBatch?: QueueBatch | undefined;
32
33
  }
33
34
  export interface StorageEvent {
34
35
  /** The object key that triggered the event */
@@ -111,6 +112,7 @@ export interface SendTaskResultRequest {
111
112
  taskId: string;
112
113
  success?: TaskSuccess | undefined;
113
114
  error?: TaskError | undefined;
115
+ queueBatch?: QueueBatchResult | undefined;
114
116
  }
115
117
  export interface TaskSuccess {
116
118
  /** Response data (JSON bytes, for ARC commands) */
@@ -125,6 +127,31 @@ export interface TaskError {
125
127
  export interface SendTaskResultResponse {
126
128
  acknowledged: boolean;
127
129
  }
130
+ /** A delivery identity belongs to this attempt, independently of provider message IDs. */
131
+ export interface QueueDelivery {
132
+ deliveryId: string;
133
+ message: QueueMessage | undefined;
134
+ }
135
+ export interface QueueBatch {
136
+ source: string;
137
+ deliveries: QueueDelivery[];
138
+ }
139
+ /** The application must return exactly one outcome for every delivery. */
140
+ export interface QueueDeliveryOutcome {
141
+ deliveryId: string;
142
+ disposition: QueueDeliveryOutcome_Disposition;
143
+ }
144
+ export declare enum QueueDeliveryOutcome_Disposition {
145
+ UNSPECIFIED = 0,
146
+ SUCCESS = 1,
147
+ RETRY = 2,
148
+ UNRECOGNIZED = -1
149
+ }
150
+ export declare function queueDeliveryOutcome_DispositionFromJSON(object: any): QueueDeliveryOutcome_Disposition;
151
+ export declare function queueDeliveryOutcome_DispositionToJSON(object: QueueDeliveryOutcome_Disposition): string;
152
+ export interface QueueBatchResult {
153
+ outcomes: QueueDeliveryOutcome[];
154
+ }
128
155
  export declare const RegisterHttpServerRequest: MessageFns<RegisterHttpServerRequest>;
129
156
  export declare const RegisterHttpServerResponse: MessageFns<RegisterHttpServerResponse>;
130
157
  export declare const RegisterEventHandlerRequest: MessageFns<RegisterEventHandlerRequest>;
@@ -141,6 +168,10 @@ export declare const SendTaskResultRequest: MessageFns<SendTaskResultRequest>;
141
168
  export declare const TaskSuccess: MessageFns<TaskSuccess>;
142
169
  export declare const TaskError: MessageFns<TaskError>;
143
170
  export declare const SendTaskResultResponse: MessageFns<SendTaskResultResponse>;
171
+ export declare const QueueDelivery: MessageFns<QueueDelivery>;
172
+ export declare const QueueBatch: MessageFns<QueueBatch>;
173
+ export declare const QueueDeliveryOutcome: MessageFns<QueueDeliveryOutcome>;
174
+ export declare const QueueBatchResult: MessageFns<QueueBatchResult>;
144
175
  /**
145
176
  * Service for Worker runtime-to-application control communication.
146
177
  * The Worker runtime hosts this service, and Worker applications connect to it.
@@ -1 +1 @@
1
- {"version":3,"file":"control.d.ts","sourceRoot":"","sources":["../../../src/worker-runtime/generated/control.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGjE,eAAO,MAAM,eAAe,yBAAyB,CAAC;AAEtD,MAAM,WAAW,yBAAyB;IACxC,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,2BAA2B;IAC1C,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,qDAAqD;IACrD,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,wCAAwC;AACxC,MAAM,WAAW,IAAI;IACnB,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CACrC;AAED,MAAM,WAAW,YAAY;IAC3B,8CAA8C;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,MA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E,YAAY,GAAG,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC;IAC7D,QAAQ,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;IACzB,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;IAC5B,MAAM,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACjC,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACxC"}
@@ -1,4 +1,4 @@
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";
1
+ import { _ as logSystemError, a as object, c as getCommands, h as setOnTaskRegistered, i as defineError, l as getEventHandlers, m as runCommand, o as string, t as AlienError, v as logSystemWarn } from "../dist.js";
2
2
  import { createRequire } from "node:module";
3
3
  import { formatWithOptions } from "node:util";
4
4
  //#region \0rolldown/runtime.js
@@ -28077,6 +28077,8 @@ var EventLoop = class {
28077
28077
  endpoint;
28078
28078
  service;
28079
28079
  running = false;
28080
+ shutdown = new AbortController();
28081
+ sendChannel;
28080
28082
  constructor(channel, applicationId, endpoint, service) {
28081
28083
  this.client = (0, import_lib.createClient)(service, channel);
28082
28084
  this.applicationId = applicationId;
@@ -28090,8 +28092,8 @@ var EventLoop = class {
28090
28092
  */
28091
28093
  async getSendClient() {
28092
28094
  if (!this.sendClient) {
28093
- const sendChannel = await createGrpcChannel(this.endpoint);
28094
- this.sendClient = (0, import_lib.createClient)(this.service, sendChannel);
28095
+ this.sendChannel = await createGrpcChannel(this.endpoint);
28096
+ this.sendClient = (0, import_lib.createClient)(this.service, this.sendChannel);
28095
28097
  }
28096
28098
  return this.sendClient;
28097
28099
  }
@@ -28119,15 +28121,26 @@ var EventLoop = class {
28119
28121
  */
28120
28122
  async start() {
28121
28123
  this.running = true;
28122
- while (this.running) try {
28123
- await this.processTasks();
28124
- } catch (error) {
28125
- logSystemError(`[alien:event-loop] processTasks threw: error=${formatEventLoopError(error)}`);
28126
- await new Promise((resolve) => setTimeout(resolve, 1e3));
28124
+ try {
28125
+ while (this.running) try {
28126
+ await this.processTasks();
28127
+ } catch (error) {
28128
+ if (!this.running) break;
28129
+ logSystemError(`[alien:event-loop] processTasks threw: error=${formatEventLoopError(error)}`);
28130
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
28131
+ }
28132
+ } finally {
28133
+ this.running = false;
28134
+ this.sendChannel?.close();
28127
28135
  }
28128
28136
  }
28137
+ /** Stop receiving tasks; an active handler finishes before start resolves. */
28138
+ stop() {
28139
+ this.running = false;
28140
+ this.shutdown.abort();
28141
+ }
28129
28142
  async processTasks() {
28130
- const stream = this.client.waitForTasks({ applicationId: this.applicationId });
28143
+ const stream = this.client.waitForTasks({ applicationId: this.applicationId }, { signal: this.shutdown.signal });
28131
28144
  for await (const task of stream) try {
28132
28145
  await this.handleTask(task);
28133
28146
  } catch (error) {
@@ -28157,6 +28170,12 @@ var EventLoop = class {
28157
28170
  matchedEntry = entry;
28158
28171
  break;
28159
28172
  }
28173
+ } else if (task.queueBatch && entry.registration.type === "queueBatch") {
28174
+ if (src === task.queueBatch.source) {
28175
+ matchedEntry = entry;
28176
+ break;
28177
+ }
28178
+ if (src === "*") matchedEntry = entry;
28160
28179
  } else if (task.queueMessage && entry.registration.type === "queue") {
28161
28180
  if (sourceMatches(src, task.queueMessage.source)) {
28162
28181
  matchedEntry = entry;
@@ -28172,6 +28191,26 @@ var EventLoop = class {
28172
28191
  });
28173
28192
  return;
28174
28193
  }
28194
+ if (task.queueBatch) {
28195
+ const outcomes = await matchedEntry.handler({
28196
+ source: task.queueBatch.source,
28197
+ deliveries: task.queueBatch.deliveries.map((delivery) => ({
28198
+ deliveryId: delivery.deliveryId,
28199
+ message: delivery.message ? this.fromProtoQueueMessage(delivery.message) : void 0
28200
+ }))
28201
+ });
28202
+ const client = await this.getSendClient();
28203
+ await wrapGrpcCall("ControlService", "SendTaskResult", async () => {
28204
+ await client.sendTaskResult({
28205
+ taskId: task.taskId,
28206
+ queueBatch: { outcomes: (outcomes ?? []).map((outcome) => ({
28207
+ deliveryId: outcome.deliveryId,
28208
+ disposition: outcome.disposition === "success" ? 1 : outcome.disposition === "retry" ? 2 : 0
28209
+ })) }
28210
+ }, { signal: AbortSignal.timeout(3e4) });
28211
+ });
28212
+ return;
28213
+ }
28175
28214
  if (task.storageEvent) await matchedEntry.handler(this.fromProtoStorageEvent(task.storageEvent));
28176
28215
  else if (task.cronEvent) await matchedEntry.handler(this.fromProtoCronEvent(task.cronEvent));
28177
28216
  else if (task.queueMessage) await matchedEntry.handler(this.fromProtoQueueMessage(task.queueMessage));
@@ -29288,6 +29327,25 @@ function isSet$3(value) {
29288
29327
  }
29289
29328
  //#endregion
29290
29329
  //#region src/worker-runtime/generated/control.ts
29330
+ function queueDeliveryOutcome_DispositionFromJSON(object) {
29331
+ switch (object) {
29332
+ case 0:
29333
+ case "UNSPECIFIED": return 0;
29334
+ case 1:
29335
+ case "SUCCESS": return 1;
29336
+ case 2:
29337
+ case "RETRY": return 2;
29338
+ default: return -1;
29339
+ }
29340
+ }
29341
+ function queueDeliveryOutcome_DispositionToJSON(object) {
29342
+ switch (object) {
29343
+ case 0: return "UNSPECIFIED";
29344
+ case 1: return "SUCCESS";
29345
+ case 2: return "RETRY";
29346
+ default: return "UNRECOGNIZED";
29347
+ }
29348
+ }
29291
29349
  function createBaseRegisterHttpServerRequest() {
29292
29350
  return { port: 0 };
29293
29351
  }
@@ -29552,7 +29610,8 @@ function createBaseTask() {
29552
29610
  storageEvent: void 0,
29553
29611
  cronEvent: void 0,
29554
29612
  queueMessage: void 0,
29555
- arcCommand: void 0
29613
+ arcCommand: void 0,
29614
+ queueBatch: void 0
29556
29615
  };
29557
29616
  }
29558
29617
  const Task = {
@@ -29562,6 +29621,7 @@ const Task = {
29562
29621
  if (message.cronEvent !== void 0) CronEvent.encode(message.cronEvent, writer.uint32(26).fork()).join();
29563
29622
  if (message.queueMessage !== void 0) QueueMessage.encode(message.queueMessage, writer.uint32(34).fork()).join();
29564
29623
  if (message.arcCommand !== void 0) ArcCommand.encode(message.arcCommand, writer.uint32(42).fork()).join();
29624
+ if (message.queueBatch !== void 0) QueueBatch.encode(message.queueBatch, writer.uint32(50).fork()).join();
29565
29625
  return writer;
29566
29626
  },
29567
29627
  decode(input, length) {
@@ -29595,6 +29655,10 @@ const Task = {
29595
29655
  if (tag !== 42) break;
29596
29656
  message.arcCommand = ArcCommand.decode(reader, reader.uint32());
29597
29657
  continue;
29658
+ case 6:
29659
+ if (tag !== 50) break;
29660
+ message.queueBatch = QueueBatch.decode(reader, reader.uint32());
29661
+ continue;
29598
29662
  }
29599
29663
  if ((tag & 7) === 4 || tag === 0) break;
29600
29664
  reader.skip(tag & 7);
@@ -29610,7 +29674,8 @@ const Task = {
29610
29674
  storageEvent: isSet$2(object.storageEvent) ? StorageEvent.fromJSON(object.storageEvent) : isSet$2(object.storage_event) ? StorageEvent.fromJSON(object.storage_event) : void 0,
29611
29675
  cronEvent: isSet$2(object.cronEvent) ? CronEvent.fromJSON(object.cronEvent) : isSet$2(object.cron_event) ? CronEvent.fromJSON(object.cron_event) : void 0,
29612
29676
  queueMessage: isSet$2(object.queueMessage) ? QueueMessage.fromJSON(object.queueMessage) : isSet$2(object.queue_message) ? QueueMessage.fromJSON(object.queue_message) : void 0,
29613
- arcCommand: isSet$2(object.arcCommand) ? ArcCommand.fromJSON(object.arcCommand) : isSet$2(object.arc_command) ? ArcCommand.fromJSON(object.arc_command) : void 0
29677
+ arcCommand: isSet$2(object.arcCommand) ? ArcCommand.fromJSON(object.arcCommand) : isSet$2(object.arc_command) ? ArcCommand.fromJSON(object.arc_command) : void 0,
29678
+ queueBatch: isSet$2(object.queueBatch) ? QueueBatch.fromJSON(object.queueBatch) : isSet$2(object.queue_batch) ? QueueBatch.fromJSON(object.queue_batch) : void 0
29614
29679
  };
29615
29680
  },
29616
29681
  toJSON(message) {
@@ -29620,6 +29685,7 @@ const Task = {
29620
29685
  if (message.cronEvent !== void 0) obj.cronEvent = CronEvent.toJSON(message.cronEvent);
29621
29686
  if (message.queueMessage !== void 0) obj.queueMessage = QueueMessage.toJSON(message.queueMessage);
29622
29687
  if (message.arcCommand !== void 0) obj.arcCommand = ArcCommand.toJSON(message.arcCommand);
29688
+ if (message.queueBatch !== void 0) obj.queueBatch = QueueBatch.toJSON(message.queueBatch);
29623
29689
  return obj;
29624
29690
  },
29625
29691
  create(base) {
@@ -29632,6 +29698,7 @@ const Task = {
29632
29698
  message.cronEvent = object.cronEvent !== void 0 && object.cronEvent !== null ? CronEvent.fromPartial(object.cronEvent) : void 0;
29633
29699
  message.queueMessage = object.queueMessage !== void 0 && object.queueMessage !== null ? QueueMessage.fromPartial(object.queueMessage) : void 0;
29634
29700
  message.arcCommand = object.arcCommand !== void 0 && object.arcCommand !== null ? ArcCommand.fromPartial(object.arcCommand) : void 0;
29701
+ message.queueBatch = object.queueBatch !== void 0 && object.queueBatch !== null ? QueueBatch.fromPartial(object.queueBatch) : void 0;
29635
29702
  return message;
29636
29703
  }
29637
29704
  };
@@ -30243,7 +30310,8 @@ function createBaseSendTaskResultRequest() {
30243
30310
  return {
30244
30311
  taskId: "",
30245
30312
  success: void 0,
30246
- error: void 0
30313
+ error: void 0,
30314
+ queueBatch: void 0
30247
30315
  };
30248
30316
  }
30249
30317
  const SendTaskResultRequest = {
@@ -30251,6 +30319,7 @@ const SendTaskResultRequest = {
30251
30319
  if (message.taskId !== "") writer.uint32(10).string(message.taskId);
30252
30320
  if (message.success !== void 0) TaskSuccess.encode(message.success, writer.uint32(18).fork()).join();
30253
30321
  if (message.error !== void 0) TaskError.encode(message.error, writer.uint32(26).fork()).join();
30322
+ if (message.queueBatch !== void 0) QueueBatchResult.encode(message.queueBatch, writer.uint32(34).fork()).join();
30254
30323
  return writer;
30255
30324
  },
30256
30325
  decode(input, length) {
@@ -30276,6 +30345,10 @@ const SendTaskResultRequest = {
30276
30345
  if (tag !== 26) break;
30277
30346
  message.error = TaskError.decode(reader, reader.uint32());
30278
30347
  continue;
30348
+ case 4:
30349
+ if (tag !== 34) break;
30350
+ message.queueBatch = QueueBatchResult.decode(reader, reader.uint32());
30351
+ continue;
30279
30352
  }
30280
30353
  if ((tag & 7) === 4 || tag === 0) break;
30281
30354
  reader.skip(tag & 7);
@@ -30289,7 +30362,8 @@ const SendTaskResultRequest = {
30289
30362
  return {
30290
30363
  taskId: isSet$2(object.taskId) ? globalThis.String(object.taskId) : isSet$2(object.task_id) ? globalThis.String(object.task_id) : "",
30291
30364
  success: isSet$2(object.success) ? TaskSuccess.fromJSON(object.success) : void 0,
30292
- error: isSet$2(object.error) ? TaskError.fromJSON(object.error) : void 0
30365
+ error: isSet$2(object.error) ? TaskError.fromJSON(object.error) : void 0,
30366
+ queueBatch: isSet$2(object.queueBatch) ? QueueBatchResult.fromJSON(object.queueBatch) : isSet$2(object.queue_batch) ? QueueBatchResult.fromJSON(object.queue_batch) : void 0
30293
30367
  };
30294
30368
  },
30295
30369
  toJSON(message) {
@@ -30297,6 +30371,7 @@ const SendTaskResultRequest = {
30297
30371
  if (message.taskId !== "") obj.taskId = message.taskId;
30298
30372
  if (message.success !== void 0) obj.success = TaskSuccess.toJSON(message.success);
30299
30373
  if (message.error !== void 0) obj.error = TaskError.toJSON(message.error);
30374
+ if (message.queueBatch !== void 0) obj.queueBatch = QueueBatchResult.toJSON(message.queueBatch);
30300
30375
  return obj;
30301
30376
  },
30302
30377
  create(base) {
@@ -30307,6 +30382,7 @@ const SendTaskResultRequest = {
30307
30382
  message.taskId = object.taskId ?? "";
30308
30383
  message.success = object.success !== void 0 && object.success !== null ? TaskSuccess.fromPartial(object.success) : void 0;
30309
30384
  message.error = object.error !== void 0 && object.error !== null ? TaskError.fromPartial(object.error) : void 0;
30385
+ message.queueBatch = object.queueBatch !== void 0 && object.queueBatch !== null ? QueueBatchResult.fromPartial(object.queueBatch) : void 0;
30310
30386
  return message;
30311
30387
  }
30312
30388
  };
@@ -30470,6 +30546,241 @@ const SendTaskResultResponse = {
30470
30546
  return message;
30471
30547
  }
30472
30548
  };
30549
+ function createBaseQueueDelivery() {
30550
+ return {
30551
+ deliveryId: "",
30552
+ message: void 0
30553
+ };
30554
+ }
30555
+ const QueueDelivery = {
30556
+ encode(message, writer = new BinaryWriter()) {
30557
+ if (message.deliveryId !== "") writer.uint32(10).string(message.deliveryId);
30558
+ if (message.message !== void 0) QueueMessage.encode(message.message, writer.uint32(18).fork()).join();
30559
+ return writer;
30560
+ },
30561
+ decode(input, length) {
30562
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
30563
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
30564
+ if (previousRecursionDepth >= 100) throw new globalThis.Error("protobuf decode recursion limit exceeded");
30565
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
30566
+ try {
30567
+ const end = length === void 0 ? reader.len : reader.pos + length;
30568
+ const message = createBaseQueueDelivery();
30569
+ while (reader.pos < end) {
30570
+ const tag = reader.uint32();
30571
+ switch (tag >>> 3) {
30572
+ case 1:
30573
+ if (tag !== 10) break;
30574
+ message.deliveryId = reader.string();
30575
+ continue;
30576
+ case 2:
30577
+ if (tag !== 18) break;
30578
+ message.message = QueueMessage.decode(reader, reader.uint32());
30579
+ continue;
30580
+ }
30581
+ if ((tag & 7) === 4 || tag === 0) break;
30582
+ reader.skip(tag & 7);
30583
+ }
30584
+ return message;
30585
+ } finally {
30586
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
30587
+ }
30588
+ },
30589
+ fromJSON(object) {
30590
+ return {
30591
+ deliveryId: isSet$2(object.deliveryId) ? globalThis.String(object.deliveryId) : isSet$2(object.delivery_id) ? globalThis.String(object.delivery_id) : "",
30592
+ message: isSet$2(object.message) ? QueueMessage.fromJSON(object.message) : void 0
30593
+ };
30594
+ },
30595
+ toJSON(message) {
30596
+ const obj = {};
30597
+ if (message.deliveryId !== "") obj.deliveryId = message.deliveryId;
30598
+ if (message.message !== void 0) obj.message = QueueMessage.toJSON(message.message);
30599
+ return obj;
30600
+ },
30601
+ create(base) {
30602
+ return QueueDelivery.fromPartial(base ?? {});
30603
+ },
30604
+ fromPartial(object) {
30605
+ const message = createBaseQueueDelivery();
30606
+ message.deliveryId = object.deliveryId ?? "";
30607
+ message.message = object.message !== void 0 && object.message !== null ? QueueMessage.fromPartial(object.message) : void 0;
30608
+ return message;
30609
+ }
30610
+ };
30611
+ function createBaseQueueBatch() {
30612
+ return {
30613
+ source: "",
30614
+ deliveries: []
30615
+ };
30616
+ }
30617
+ const QueueBatch = {
30618
+ encode(message, writer = new BinaryWriter()) {
30619
+ if (message.source !== "") writer.uint32(10).string(message.source);
30620
+ for (const v of message.deliveries) QueueDelivery.encode(v, writer.uint32(18).fork()).join();
30621
+ return writer;
30622
+ },
30623
+ decode(input, length) {
30624
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
30625
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
30626
+ if (previousRecursionDepth >= 100) throw new globalThis.Error("protobuf decode recursion limit exceeded");
30627
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
30628
+ try {
30629
+ const end = length === void 0 ? reader.len : reader.pos + length;
30630
+ const message = createBaseQueueBatch();
30631
+ while (reader.pos < end) {
30632
+ const tag = reader.uint32();
30633
+ switch (tag >>> 3) {
30634
+ case 1:
30635
+ if (tag !== 10) break;
30636
+ message.source = reader.string();
30637
+ continue;
30638
+ case 2:
30639
+ if (tag !== 18) break;
30640
+ message.deliveries.push(QueueDelivery.decode(reader, reader.uint32()));
30641
+ continue;
30642
+ }
30643
+ if ((tag & 7) === 4 || tag === 0) break;
30644
+ reader.skip(tag & 7);
30645
+ }
30646
+ return message;
30647
+ } finally {
30648
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
30649
+ }
30650
+ },
30651
+ fromJSON(object) {
30652
+ return {
30653
+ source: isSet$2(object.source) ? globalThis.String(object.source) : "",
30654
+ deliveries: globalThis.Array.isArray(object?.deliveries) ? object.deliveries.map((e) => QueueDelivery.fromJSON(e)) : []
30655
+ };
30656
+ },
30657
+ toJSON(message) {
30658
+ const obj = {};
30659
+ if (message.source !== "") obj.source = message.source;
30660
+ if (message.deliveries?.length) obj.deliveries = message.deliveries.map((e) => QueueDelivery.toJSON(e));
30661
+ return obj;
30662
+ },
30663
+ create(base) {
30664
+ return QueueBatch.fromPartial(base ?? {});
30665
+ },
30666
+ fromPartial(object) {
30667
+ const message = createBaseQueueBatch();
30668
+ message.source = object.source ?? "";
30669
+ message.deliveries = object.deliveries?.map((e) => QueueDelivery.fromPartial(e)) || [];
30670
+ return message;
30671
+ }
30672
+ };
30673
+ function createBaseQueueDeliveryOutcome() {
30674
+ return {
30675
+ deliveryId: "",
30676
+ disposition: 0
30677
+ };
30678
+ }
30679
+ const QueueDeliveryOutcome = {
30680
+ encode(message, writer = new BinaryWriter()) {
30681
+ if (message.deliveryId !== "") writer.uint32(10).string(message.deliveryId);
30682
+ if (message.disposition !== 0) writer.uint32(16).int32(message.disposition);
30683
+ return writer;
30684
+ },
30685
+ decode(input, length) {
30686
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
30687
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
30688
+ if (previousRecursionDepth >= 100) throw new globalThis.Error("protobuf decode recursion limit exceeded");
30689
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
30690
+ try {
30691
+ const end = length === void 0 ? reader.len : reader.pos + length;
30692
+ const message = createBaseQueueDeliveryOutcome();
30693
+ while (reader.pos < end) {
30694
+ const tag = reader.uint32();
30695
+ switch (tag >>> 3) {
30696
+ case 1:
30697
+ if (tag !== 10) break;
30698
+ message.deliveryId = reader.string();
30699
+ continue;
30700
+ case 2:
30701
+ if (tag !== 16) break;
30702
+ message.disposition = reader.int32();
30703
+ continue;
30704
+ }
30705
+ if ((tag & 7) === 4 || tag === 0) break;
30706
+ reader.skip(tag & 7);
30707
+ }
30708
+ return message;
30709
+ } finally {
30710
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
30711
+ }
30712
+ },
30713
+ fromJSON(object) {
30714
+ return {
30715
+ deliveryId: isSet$2(object.deliveryId) ? globalThis.String(object.deliveryId) : isSet$2(object.delivery_id) ? globalThis.String(object.delivery_id) : "",
30716
+ disposition: isSet$2(object.disposition) ? queueDeliveryOutcome_DispositionFromJSON(object.disposition) : 0
30717
+ };
30718
+ },
30719
+ toJSON(message) {
30720
+ const obj = {};
30721
+ if (message.deliveryId !== "") obj.deliveryId = message.deliveryId;
30722
+ if (message.disposition !== 0) obj.disposition = queueDeliveryOutcome_DispositionToJSON(message.disposition);
30723
+ return obj;
30724
+ },
30725
+ create(base) {
30726
+ return QueueDeliveryOutcome.fromPartial(base ?? {});
30727
+ },
30728
+ fromPartial(object) {
30729
+ const message = createBaseQueueDeliveryOutcome();
30730
+ message.deliveryId = object.deliveryId ?? "";
30731
+ message.disposition = object.disposition ?? 0;
30732
+ return message;
30733
+ }
30734
+ };
30735
+ function createBaseQueueBatchResult() {
30736
+ return { outcomes: [] };
30737
+ }
30738
+ const QueueBatchResult = {
30739
+ encode(message, writer = new BinaryWriter()) {
30740
+ for (const v of message.outcomes) QueueDeliveryOutcome.encode(v, writer.uint32(10).fork()).join();
30741
+ return writer;
30742
+ },
30743
+ decode(input, length) {
30744
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
30745
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
30746
+ if (previousRecursionDepth >= 100) throw new globalThis.Error("protobuf decode recursion limit exceeded");
30747
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
30748
+ try {
30749
+ const end = length === void 0 ? reader.len : reader.pos + length;
30750
+ const message = createBaseQueueBatchResult();
30751
+ while (reader.pos < end) {
30752
+ const tag = reader.uint32();
30753
+ switch (tag >>> 3) {
30754
+ case 1:
30755
+ if (tag !== 10) break;
30756
+ message.outcomes.push(QueueDeliveryOutcome.decode(reader, reader.uint32()));
30757
+ continue;
30758
+ }
30759
+ if ((tag & 7) === 4 || tag === 0) break;
30760
+ reader.skip(tag & 7);
30761
+ }
30762
+ return message;
30763
+ } finally {
30764
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
30765
+ }
30766
+ },
30767
+ fromJSON(object) {
30768
+ return { outcomes: globalThis.Array.isArray(object?.outcomes) ? object.outcomes.map((e) => QueueDeliveryOutcome.fromJSON(e)) : [] };
30769
+ },
30770
+ toJSON(message) {
30771
+ const obj = {};
30772
+ if (message.outcomes?.length) obj.outcomes = message.outcomes.map((e) => QueueDeliveryOutcome.toJSON(e));
30773
+ return obj;
30774
+ },
30775
+ create(base) {
30776
+ return QueueBatchResult.fromPartial(base ?? {});
30777
+ },
30778
+ fromPartial(object) {
30779
+ const message = createBaseQueueBatchResult();
30780
+ message.outcomes = object.outcomes?.map((e) => QueueDeliveryOutcome.fromPartial(e)) || [];
30781
+ return message;
30782
+ }
30783
+ };
30473
30784
  const ControlServiceDefinition = {
30474
30785
  name: "ControlService",
30475
30786
  fullName: "alien_worker.control.ControlService",
@@ -102,7 +102,7 @@ export interface EventRegistration {
102
102
  /** Handler ID */
103
103
  id: string;
104
104
  /** Event type */
105
- type: "storage" | "cron" | "queue";
105
+ type: "storage" | "cron" | "queue" | "queueBatch";
106
106
  /** Source filter (bucket name, queue name, etc.) */
107
107
  source: string;
108
108
  /** Optional prefix filter (for storage events) */
@@ -111,7 +111,7 @@ export interface EventRegistration {
111
111
  /** A single registered event handler. */
112
112
  export interface EventHandlerEntry {
113
113
  registration: EventRegistration;
114
- handler: (event: unknown) => Promise<void>;
114
+ handler: (event: unknown) => Promise<void> | Promise<QueueDeliveryOutcome[]>;
115
115
  }
116
116
  /**
117
117
  * A tracked `waitUntil` background task.
@@ -180,6 +180,22 @@ export declare function onCronEvent(scheduleName: string, handler: (event: CronE
180
180
  * @returns Unsubscribe function
181
181
  */
182
182
  export declare function onQueueMessage<T = unknown>(queueName: string, handler: (message: QueueMessageEvent<T>) => Promise<void>): () => void;
183
+ /** A delivery attempt identity, distinct from the provider message ID. */
184
+ export interface QueueDelivery<T = unknown> {
185
+ deliveryId: string;
186
+ message: QueueMessageEvent<T>;
187
+ }
188
+ /** Return one outcome for each delivery; retries do not roll back other deliveries. */
189
+ export interface QueueDeliveryOutcome {
190
+ deliveryId: string;
191
+ disposition: "success" | "retry";
192
+ }
193
+ export interface QueueBatchEvent<T = unknown> {
194
+ source: string;
195
+ deliveries: QueueDelivery<T>[];
196
+ }
197
+ /** Register an opt-in batch handler. Batches may contain fewer than the configured maximum. */
198
+ export declare function onQueueBatch<T = unknown>(queueName: string, handler: (batch: QueueBatchEvent<T>) => Promise<QueueDeliveryOutcome[]>): () => void;
183
199
  /** Get all registered event handlers. @internal */
184
200
  export declare function getEventHandlers(): Map<string, EventHandlerEntry>;
185
201
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/worker-runtime/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAI5B,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAA;AAE5E;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,cAAc;IAC/C,oBAAoB;IACpB,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,OAAO;IAC5C,iBAAiB;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,wBAAwB;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAA;IACrB,sBAAsB;IACtB,OAAO,EAAE,CAAC,CAAA;IACV,6BA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IACd,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAA;CAC/B;AAED,+FAA+F;AAC/F,wBAAgB,YAAY,CAAC,CAAC,GAAG,OAAO,EACtC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,oBAAoB,EAAE,CAAC,GACtE,MAAM,IAAI,CAUZ;AAED,mDAAmD;AACnD,wBAAgB,gBAAgB,IAAI,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAEjE;AAMD;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CA8BzD;AAED,4DAA4D;AAC5D,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,CAE5F"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alienplatform/sdk",
3
- "version": "3.3.36",
3
+ "version": "3.3.38",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -57,9 +57,9 @@
57
57
  "nice-grpc": "^2.1.11",
58
58
  "nice-grpc-common": "^2.0.2",
59
59
  "zod": "^4.5.2",
60
- "@alienplatform/ai-gateway": "^3.3.36",
61
- "@alienplatform/bindings": "^3.3.36",
62
- "@alienplatform/core": "^3.3.36"
60
+ "@alienplatform/ai-gateway": "^3.3.38",
61
+ "@alienplatform/bindings": "^3.3.38",
62
+ "@alienplatform/core": "^3.3.38"
63
63
  },
64
64
  "scripts": {
65
65
  "build": "tsdown && tsc --emitDeclarationOnly",