@isomorph.ai/app-sdk 1.29.0 → 1.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/runtime.js +7 -1
  2. package/package.json +1 -1
package/dist/runtime.js CHANGED
@@ -398,7 +398,7 @@ export class Runtime {
398
398
  if (!job?.trigger || job.trigger.connection !== delivery.input.sourceId)
399
399
  throw new Error('mail trigger is not declared by this deployed app');
400
400
  await this.refreshToken(JOB_SESSION_MIN_VALIDITY_MS);
401
- if (!this.options.gatewayUrl || !this.options.queueUrl || this.options.jobRuns === false || !(await this.awaitDataPath()))
401
+ if (!this.options.gatewayUrl || this.options.mode === 'gate' || this.options.jobRuns === false || !(await this.awaitDataPath()))
402
402
  throw new Error('mail arrival requires durable job runs');
403
403
  const queued = await this.runs.enqueueMail(delivery);
404
404
  await this.signalQueuedRun(queued.id);
@@ -642,6 +642,12 @@ export class Runtime {
642
642
  if (this.options.gatewayIdentity && sendsBearer)
643
643
  await this.refreshToken().catch((error) => this.log(`gateway session: ${error instanceof Error ? error.message : String(error)}`));
644
644
  try {
645
+ if (name === 'isomorph-mail-arrival') {
646
+ if (header(request, 'X-Harbour-Verified-Mail-Arrival') !== 'true')
647
+ return refuse(response, 403, 'FORBIDDEN', 'governed mail delivery is required', requestId);
648
+ await this.acceptMailArrival(input);
649
+ return answer(response, 200, { data: { accepted: true } }, requestId);
650
+ }
645
651
  if (name.startsWith(RESERVED_PREFIX))
646
652
  return answer(response, 200, { data: await this.reserved(name, input, context) }, requestId);
647
653
  if (!this.inventory.actions.includes(name))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isomorph.ai/app-sdk",
3
- "version": "1.29.0",
3
+ "version": "1.30.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",