@nettee/beacon 0.1.6 → 0.1.7

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.
@@ -41,9 +41,9 @@ export async function triggerScheduleOnce(options) {
41
41
  if (!record?.run) {
42
42
  throw new Error(`Schedule Trigger produced no Run record: trigger_id=${claim.record.triggerId}`);
43
43
  }
44
- if (record.run.state !== "succeeded" ||
45
- record.delivery?.state !== "delivered") {
46
- const failure = record.run.failure?.code ?? record.delivery?.failure?.code ?? "unknown";
44
+ if (record.run.state !== "succeeded" || !record.finalOutcome) {
45
+ const failure = record.run.failure?.code ??
46
+ (!record.finalOutcome ? "outcome_missing" : "unknown");
47
47
  throw new Error(`Schedule Trigger failed (run_id=${record.run.runId}): ${failure}`);
48
48
  }
49
49
  return record;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nettee/beacon",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "A single-host bridge from messaging and schedules to isolated agent runs",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {