@smthrs/control 1.0.0-rc.3 → 1.0.0-rc.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ControlLive.d.ts","sourceRoot":"","sources":["../../src/ControlLive.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,OAAO,EAAgB,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE3C,OAAO,EAAiC,KAAK,EAAqC,MAAM,QAAQ,CAAA;AAEhG,OAAO,EAEL,OAAO,EAOR,MAAM,cAAc,CAAA;AAoBrB,OAAO,EAAE,cAAc,EAAoE,MAAM,qBAAqB,CAAA;AAyRtH;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAC7B,OAAO,EACP,KAAK,EACL,cAAc,GAAG,OAAO,CAAC,OAAO,GAAG,iBAAiB,CAAC,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CA8uD3F,CAAA"}
1
+ {"version":3,"file":"ControlLive.d.ts","sourceRoot":"","sources":["../../src/ControlLive.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,OAAO,EAAgB,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE3C,OAAO,EAAiC,KAAK,EAAqC,MAAM,QAAQ,CAAA;AAEhG,OAAO,EAEL,OAAO,EAOR,MAAM,cAAc,CAAA;AAoBrB,OAAO,EAAE,cAAc,EAAoE,MAAM,qBAAqB,CAAA;AA6RtH;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAC7B,OAAO,EACP,KAAK,EACL,cAAc,GAAG,OAAO,CAAC,OAAO,GAAG,iBAAiB,CAAC,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAwvD3F,CAAA"}
@@ -99,7 +99,11 @@ const AttributedResumeInput = import_effect.Schema.Struct({
99
99
  principal: import_effect.Schema.optional(import_ControlSchema.Principal)
100
100
  });
101
101
  const AttributedRunInput = import_effect.Schema.Union([
102
- import_effect.Schema.Struct({ ...import_ControlSchema.RunInputSchema.members[0].fields, principal: import_effect.Schema.optional(import_ControlSchema.Principal), reservedRunId: import_effect.Schema.optional(import_effect.Schema.NonEmptyString) }),
102
+ import_effect.Schema.Struct({
103
+ ...import_ControlSchema.RunInputSchema.members[0].fields,
104
+ principal: import_effect.Schema.optional(import_ControlSchema.Principal),
105
+ reservedRunId: import_effect.Schema.optional(import_effect.Schema.NonEmptyString)
106
+ }),
103
107
  import_effect.Schema.Struct({ ...import_ControlSchema.RunInputSchema.members[1].fields, principal: import_effect.Schema.optional(import_ControlSchema.Principal) })
104
108
  ]);
105
109
  const AttributedSignalInput = import_effect.Schema.Struct({
@@ -512,12 +516,15 @@ const layer = import_effect.Layer.effect(
512
516
  // A detached live host keeps its fence. Delegate the admitted event
513
517
  // wake to it, just as a node decision does, instead of leaving an idle
514
518
  // retained module with input it will never get a boundary to drain.
515
- import_effect.Effect.catchTag("/control/ClaimLost", (refusal) => refusal.parkedBy === void 0 ? import_effect.Effect.void : import_effect.Effect.gen(function* () {
516
- const delegated = yield* runtime.requestResume(run.runId).pipe(
517
- import_effect.Effect.catchTag("/control/InvalidInput", () => import_effect.Effect.succeed(void 0))
518
- );
519
- if (delegated !== void 0) yield* emit(run.runId, "control.run.resumed", { runId: run.runId });
520
- })),
519
+ import_effect.Effect.catchTag(
520
+ "/control/ClaimLost",
521
+ (refusal) => refusal.parkedBy === void 0 ? import_effect.Effect.void : import_effect.Effect.gen(function* () {
522
+ const delegated = yield* runtime.requestResume(run.runId).pipe(
523
+ import_effect.Effect.catchTag("/control/InvalidInput", () => import_effect.Effect.succeed(void 0))
524
+ );
525
+ if (delegated !== void 0) yield* emit(run.runId, "control.run.resumed", { runId: run.runId });
526
+ })
527
+ ),
521
528
  import_effect.Effect.catchTag("/control/RunNotFound", () => import_effect.Effect.void),
522
529
  import_effect.Effect.catchTag(
523
530
  "/control/CodeDrift",
@@ -1012,7 +1019,13 @@ const layer = import_effect.Layer.effect(
1012
1019
  principal,
1013
1020
  fingerprint("run", principal, input),
1014
1021
  import_effect.Effect.gen(function* () {
1015
- const launched = yield* runtime.launch(input.planId, input.digest, input.envelope, principal, input.reservedRunId);
1022
+ const launched = yield* runtime.launch(
1023
+ input.planId,
1024
+ input.digest,
1025
+ input.envelope,
1026
+ principal,
1027
+ input.reservedRunId
1028
+ );
1016
1029
  if (launched._tag === "Parked") {
1017
1030
  return { ...launched.receipt, receiptId: input.idempotencyKey };
1018
1031
  }