@nice-code/action 0.6.0 → 0.6.2

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 (22) hide show
  1. package/build/devtools/browser/index.js +267 -164
  2. package/build/devtools/server/index.js +132 -114
  3. package/build/index.js +1116 -46
  4. package/build/types/ActionRuntime/Handler/ExternalClient/Transport/Transport.types.d.ts +7 -1
  5. package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/TransportWebSocket.types.d.ts +31 -3
  6. package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/WebSocketConnection.d.ts +18 -1
  7. package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/WebSocketTransport.d.ts +12 -1
  8. package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/actionFrameCrypto.d.ts +31 -0
  9. package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/actionWireCodec.d.ts +41 -0
  10. package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/actionWsHandshake.d.ts +187 -0
  11. package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/createBinaryWsAdapter.d.ts +20 -0
  12. package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/createBinaryWsSessionFactory.d.ts +31 -0
  13. package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/ws_util.d.ts +9 -0
  14. package/build/types/ActionRuntime/Handler/Server/ActionServerHandler.d.ts +191 -0
  15. package/build/types/devtools/browser/components/OriginChip.d.ts +15 -0
  16. package/build/types/devtools/browser/components/SectionLabel.d.ts +1 -1
  17. package/build/types/devtools/browser/components/utils.d.ts +11 -0
  18. package/build/types/devtools/core/devtools_colors.d.ts +1 -0
  19. package/build/types/devtools/server/index.d.ts +2 -2
  20. package/build/types/index.d.ts +7 -0
  21. package/build/types/utils/decodeActionFrame.d.ts +17 -0
  22. package/package.json +6 -5
@@ -1899,11 +1899,13 @@ class ActionDevtoolsCore {
1899
1899
  }));
1900
1900
  } else if (type === "finished" /* finished */) {
1901
1901
  this._updateEntry(runningAction.cuid, (e) => {
1902
- const finishedRoutingContext = update.response?.context ?? runningAction.context;
1902
+ const responseRouting = extractRouting(update.response?.context);
1903
+ const localRouting = extractRouting(runningAction.context);
1904
+ const routing = responseRouting.length >= localRouting.length ? responseRouting : localRouting;
1903
1905
  const base = {
1904
1906
  ...e,
1905
1907
  endTime: time,
1906
- meta: { ...e.meta, routing: extractRouting(finishedRoutingContext) }
1908
+ meta: { ...e.meta, routing }
1907
1909
  };
1908
1910
  const finishType = update.finishType;
1909
1911
  if (finishType === "success" /* success */) {
@@ -1925,11 +1927,21 @@ class ActionDevtoolsCore {
1925
1927
  if (finishType === "failed" /* failed */) {
1926
1928
  const rawError = update.error;
1927
1929
  const errorStack2 = rawError instanceof Error ? rawError.stack : undefined;
1928
- return { ...base, status: "failed", error: serializeErrorForDisplay(rawError), errorStack: errorStack2 };
1930
+ return {
1931
+ ...base,
1932
+ status: "failed",
1933
+ error: serializeErrorForDisplay(rawError),
1934
+ errorStack: errorStack2
1935
+ };
1929
1936
  }
1930
1937
  const abortReason = update.reason;
1931
1938
  const errorStack = abortReason instanceof Error ? abortReason.stack : undefined;
1932
- return { ...base, status: "aborted", abortReason: serializeErrorForDisplay(abortReason), errorStack };
1939
+ return {
1940
+ ...base,
1941
+ status: "aborted",
1942
+ abortReason: serializeErrorForDisplay(abortReason),
1943
+ errorStack
1944
+ };
1933
1945
  });
1934
1946
  }
1935
1947
  });
@@ -2048,6 +2060,11 @@ var SEMANTIC_COLORS = {
2048
2060
  borderColor: DEVTOOL_COLOR_HANDLER_EXTERNAL_BORDER,
2049
2061
  subtle: { color: "#cfa12a9f", borderColor: "transparent" }
2050
2062
  },
2063
+ origin: {
2064
+ color: DEVTOOL_COLOR_SEMANTIC_SYSTEM,
2065
+ borderColor: `${DEVTOOL_COLOR_SEMANTIC_SYSTEM}55`,
2066
+ subtle: { color: `${DEVTOOL_COLOR_SEMANTIC_SYSTEM}9f`, borderColor: "transparent" }
2067
+ },
2051
2068
  age: {
2052
2069
  color: DEVTOOL_COLOR_SEMANTIC_METADATA,
2053
2070
  borderColor: DEVTOOL_SECTION_BACKGROUND,
@@ -2091,7 +2108,10 @@ import { useState } from "react";
2091
2108
 
2092
2109
  // src/devtools/browser/components/SectionLabel.tsx
2093
2110
  import { jsx } from "react/jsx-runtime";
2094
- function SectionLabel({ label, color = DEVTOOL_COLOR_SEMANTIC_SYSTEM }) {
2111
+ function SectionLabel({
2112
+ label,
2113
+ color = DEVTOOL_COLOR_SEMANTIC_SYSTEM
2114
+ }) {
2095
2115
  return /* @__PURE__ */ jsx("div", {
2096
2116
  style: {
2097
2117
  color,
@@ -2136,6 +2156,16 @@ var STATUS_ICON = {
2136
2156
  failed: CircleX,
2137
2157
  aborted: Circle
2138
2158
  };
2159
+ function getInboundOrigin(entry) {
2160
+ const origin = entry.meta.originClient;
2161
+ if (origin == null || origin.envId === "unknown" || origin.envId === "_unset_")
2162
+ return null;
2163
+ const local = entry.meta.routing[0]?.runtime;
2164
+ if (local == null)
2165
+ return null;
2166
+ const sameRuntime = origin.envId === local.envId && (origin.perId ?? null) === (local.perId ?? null) && (origin.insId ?? null) === (local.insId ?? null);
2167
+ return sameRuntime ? null : origin;
2168
+ }
2139
2169
  function safeStringify(value, indent = 2) {
2140
2170
  if (value === undefined)
2141
2171
  return "undefined";
@@ -2518,7 +2548,13 @@ async function resolveSourceMapPositions(frames) {
2518
2548
  const resolved = await resolveCompiledPosition(frame.file, frame.line, frame.col ?? 0);
2519
2549
  if (resolved == null)
2520
2550
  return frame;
2521
- return { ...frame, originalFile: frame.file, file: resolved.file, line: resolved.line, col: resolved.col };
2551
+ return {
2552
+ ...frame,
2553
+ originalFile: frame.file,
2554
+ file: resolved.file,
2555
+ line: resolved.line,
2556
+ col: resolved.col
2557
+ };
2522
2558
  }));
2523
2559
  }
2524
2560
  function formatFrameFile(file) {
@@ -3859,7 +3895,12 @@ function MetaSection({ entry }) {
3859
3895
  },
3860
3896
  children: [
3861
3897
  /* @__PURE__ */ jsx14("span", {
3862
- style: { textAlign: "left", color: DEVTOOL_COLOR_TEXT_MUTED, fontSize: "10px", paddingTop: "1px" },
3898
+ style: {
3899
+ textAlign: "left",
3900
+ color: DEVTOOL_COLOR_TEXT_MUTED,
3901
+ fontSize: "10px",
3902
+ paddingTop: "1px"
3903
+ },
3863
3904
  children: label
3864
3905
  }),
3865
3906
  /* @__PURE__ */ jsx14("span", {
@@ -3909,8 +3950,49 @@ function MetaSection({ entry }) {
3909
3950
  });
3910
3951
  }
3911
3952
 
3912
- // src/devtools/browser/components/RoutingSection.tsx
3953
+ // src/devtools/browser/components/OriginChip.tsx
3913
3954
  import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
3955
+ function OriginChip({
3956
+ origin,
3957
+ size = "md" /* md */,
3958
+ subtle
3959
+ }) {
3960
+ return /* @__PURE__ */ jsx15(Chip, {
3961
+ color: "origin" /* origin */,
3962
+ size,
3963
+ subtle,
3964
+ tooltip: {
3965
+ title: "Received from",
3966
+ content: /* @__PURE__ */ jsxs13("div", {
3967
+ style: { display: "flex", flexDirection: "column", gap: "2px", fontSize: "11px" },
3968
+ children: [
3969
+ /* @__PURE__ */ jsxs13("span", {
3970
+ children: [
3971
+ "env ",
3972
+ origin.envId
3973
+ ]
3974
+ }),
3975
+ origin.perId != null && /* @__PURE__ */ jsxs13("span", {
3976
+ children: [
3977
+ "perId ",
3978
+ origin.perId
3979
+ ]
3980
+ }),
3981
+ origin.insId != null && /* @__PURE__ */ jsxs13("span", {
3982
+ children: [
3983
+ "insId ",
3984
+ origin.insId
3985
+ ]
3986
+ })
3987
+ ]
3988
+ })
3989
+ },
3990
+ children: `⇠ ${origin.envId}`
3991
+ });
3992
+ }
3993
+
3994
+ // src/devtools/browser/components/RoutingSection.tsx
3995
+ import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
3914
3996
  function RoutingSection({
3915
3997
  entry,
3916
3998
  minHopCount = 0
@@ -3920,12 +4002,12 @@ function RoutingSection({
3920
4002
  const phantomCount = Math.max(0, minHopCount - hopCount);
3921
4003
  if (hopCount === 0 && phantomCount === 0)
3922
4004
  return null;
3923
- return /* @__PURE__ */ jsxs13("div", {
4005
+ return /* @__PURE__ */ jsxs14("div", {
3924
4006
  children: [
3925
- /* @__PURE__ */ jsx15(SectionLabel, {
4007
+ /* @__PURE__ */ jsx16(SectionLabel, {
3926
4008
  label: hopCount > 0 ? `Routing · ${hopCount} hop${hopCount !== 1 ? "s" : ""}` : "Routing"
3927
4009
  }),
3928
- /* @__PURE__ */ jsxs13("div", {
4010
+ /* @__PURE__ */ jsxs14("div", {
3929
4011
  style: { display: "flex", flexDirection: "column", gap: "2px" },
3930
4012
  children: [
3931
4013
  meta.routing.map((hop, i) => {
@@ -3935,7 +4017,7 @@ function RoutingSection({
3935
4017
  const badgeText = isLocal ? "● exec" : `→ ${hop.transportSummary ?? hop.transport ?? "ext"}`;
3936
4018
  const transportTooltip = isLocal ? undefined : getTransportTooltip(hop);
3937
4019
  const runtimeTitle = [hop.runtime.perId, hop.runtime.insId].filter(Boolean).join(" · ") || undefined;
3938
- return /* @__PURE__ */ jsxs13("div", {
4020
+ return /* @__PURE__ */ jsxs14("div", {
3939
4021
  style: {
3940
4022
  background: DEVTOOL_SECTION_BACKGROUND,
3941
4023
  borderRadius: "4px",
@@ -3948,14 +4030,19 @@ function RoutingSection({
3948
4030
  padding: "4px 8px"
3949
4031
  },
3950
4032
  children: [
3951
- /* @__PURE__ */ jsxs13("span", {
4033
+ /* @__PURE__ */ jsxs14("span", {
3952
4034
  style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "10px" },
3953
4035
  children: [
3954
- /* @__PURE__ */ jsx15("span", {
3955
- style: { color: DEVTOOL_COLOR_TEXT_FAINT, fontSize: "10px", width: "16px", textAlign: "right" },
4036
+ /* @__PURE__ */ jsx16("span", {
4037
+ style: {
4038
+ color: DEVTOOL_COLOR_TEXT_FAINT,
4039
+ fontSize: "10px",
4040
+ width: "16px",
4041
+ textAlign: "right"
4042
+ },
3956
4043
  children: i + 1
3957
4044
  }),
3958
- /* @__PURE__ */ jsx15("span", {
4045
+ /* @__PURE__ */ jsx16("span", {
3959
4046
  title: runtimeTitle,
3960
4047
  style: {
3961
4048
  color: DEVTOOL_COLOR_TEXT_SECONDARY,
@@ -3969,10 +4056,10 @@ function RoutingSection({
3969
4056
  })
3970
4057
  ]
3971
4058
  }),
3972
- /* @__PURE__ */ jsx15(HoverTooltip, {
4059
+ /* @__PURE__ */ jsx16(HoverTooltip, {
3973
4060
  config: transportTooltip,
3974
4061
  style: { display: "block", minWidth: 0, overflow: "hidden" },
3975
- children: /* @__PURE__ */ jsx15("span", {
4062
+ children: /* @__PURE__ */ jsx16("span", {
3976
4063
  style: {
3977
4064
  color: badgeColor,
3978
4065
  fontSize: "10px",
@@ -3984,7 +4071,7 @@ function RoutingSection({
3984
4071
  children: badgeText
3985
4072
  })
3986
4073
  }),
3987
- /* @__PURE__ */ jsxs13("span", {
4074
+ /* @__PURE__ */ jsxs14("span", {
3988
4075
  style: {
3989
4076
  display: "flex",
3990
4077
  alignItems: "center",
@@ -3993,7 +4080,7 @@ function RoutingSection({
3993
4080
  overflow: "hidden"
3994
4081
  },
3995
4082
  children: [
3996
- /* @__PURE__ */ jsx15("span", {
4083
+ /* @__PURE__ */ jsx16("span", {
3997
4084
  style: {
3998
4085
  color: DEVTOOL_COLOR_TEXT_MUTED,
3999
4086
  fontSize: "10px",
@@ -4003,8 +4090,13 @@ function RoutingSection({
4003
4090
  },
4004
4091
  children: hop.handlerClient != null ? `↳ ${hop.handlerClient.envId}` : ""
4005
4092
  }),
4006
- /* @__PURE__ */ jsxs13("span", {
4007
- style: { color: DEVTOOL_COLOR_TEXT_FAINT, fontSize: "10px", flexShrink: 0, marginLeft: "auto" },
4093
+ /* @__PURE__ */ jsxs14("span", {
4094
+ style: {
4095
+ color: DEVTOOL_COLOR_TEXT_FAINT,
4096
+ fontSize: "10px",
4097
+ flexShrink: 0,
4098
+ marginLeft: "auto"
4099
+ },
4008
4100
  children: [
4009
4101
  "+",
4010
4102
  hop.time - startTime,
@@ -4016,7 +4108,7 @@ function RoutingSection({
4016
4108
  ]
4017
4109
  }, `${hop.time}-${hop.runtime.envId}`);
4018
4110
  }),
4019
- Array.from({ length: phantomCount }, (_, i) => `routing-phantom-${hopCount + i}`).map((key) => /* @__PURE__ */ jsxs13("div", {
4111
+ Array.from({ length: phantomCount }, (_, i) => `routing-phantom-${hopCount + i}`).map((key) => /* @__PURE__ */ jsxs14("div", {
4020
4112
  "aria-hidden": "true",
4021
4113
  style: {
4022
4114
  visibility: "hidden",
@@ -4029,24 +4121,24 @@ function RoutingSection({
4029
4121
  padding: "4px 8px"
4030
4122
  },
4031
4123
  children: [
4032
- /* @__PURE__ */ jsxs13("span", {
4124
+ /* @__PURE__ */ jsxs14("span", {
4033
4125
  style: { display: "flex", flexDirection: "row", alignItems: "center", gap: "10px" },
4034
4126
  children: [
4035
- /* @__PURE__ */ jsx15("span", {
4127
+ /* @__PURE__ */ jsx16("span", {
4036
4128
  style: { fontSize: "10px", width: "16px" },
4037
4129
  children: "0"
4038
4130
  }),
4039
- /* @__PURE__ */ jsx15("span", {
4131
+ /* @__PURE__ */ jsx16("span", {
4040
4132
  style: { fontSize: "11px" },
4041
4133
  children: "placeholder"
4042
4134
  })
4043
4135
  ]
4044
4136
  }),
4045
- /* @__PURE__ */ jsx15("span", {
4137
+ /* @__PURE__ */ jsx16("span", {
4046
4138
  style: { fontSize: "10px" },
4047
4139
  children: "placeholder"
4048
4140
  }),
4049
- /* @__PURE__ */ jsx15("span", {})
4141
+ /* @__PURE__ */ jsx16("span", {})
4050
4142
  ]
4051
4143
  }, key))
4052
4144
  ]
@@ -4056,7 +4148,7 @@ function RoutingSection({
4056
4148
  }
4057
4149
 
4058
4150
  // src/devtools/browser/components/action_detail/ActionDetailPanel.tsx
4059
- import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
4151
+ import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
4060
4152
  var STATUS_BADGE_LABEL = {
4061
4153
  running: "RUNNING",
4062
4154
  success: "SUCCESS",
@@ -4087,7 +4179,8 @@ function DetailHeader({
4087
4179
  const color = STATUS_COLOR[entry.status];
4088
4180
  const StatusIconComponent = STATUS_ICON[entry.status];
4089
4181
  const timestamp = formatTimestamp(entry.startTime);
4090
- return /* @__PURE__ */ jsx16("div", {
4182
+ const inboundOrigin = getInboundOrigin(entry);
4183
+ return /* @__PURE__ */ jsx17("div", {
4091
4184
  onClick: !isActive ? onClick : undefined,
4092
4185
  style: {
4093
4186
  padding: "0.5em 1em",
@@ -4101,13 +4194,13 @@ function DetailHeader({
4101
4194
  gap: "1em",
4102
4195
  cursor: isActive ? "default" : "pointer"
4103
4196
  },
4104
- children: /* @__PURE__ */ jsxs14("div", {
4197
+ children: /* @__PURE__ */ jsxs15("div", {
4105
4198
  style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: "0.5em" },
4106
4199
  children: [
4107
- /* @__PURE__ */ jsxs14("div", {
4200
+ /* @__PURE__ */ jsxs15("div", {
4108
4201
  style: { display: "flex", alignItems: "center", minWidth: 0, gap: "0.5em" },
4109
4202
  children: [
4110
- /* @__PURE__ */ jsx16("span", {
4203
+ /* @__PURE__ */ jsx17("span", {
4111
4204
  style: {
4112
4205
  color,
4113
4206
  flexShrink: 0,
@@ -4115,12 +4208,12 @@ function DetailHeader({
4115
4208
  alignItems: "center",
4116
4209
  animation: entry.status === "running" ? "__nice-action-pulse 1.2s ease-in-out infinite" : undefined
4117
4210
  },
4118
- children: /* @__PURE__ */ jsx16(StatusIconComponent, {
4211
+ children: /* @__PURE__ */ jsx17(StatusIconComponent, {
4119
4212
  size: 20,
4120
4213
  strokeWidth: 1.75
4121
4214
  })
4122
4215
  }),
4123
- /* @__PURE__ */ jsx16("span", {
4216
+ /* @__PURE__ */ jsx17("span", {
4124
4217
  style: {
4125
4218
  color: DEVTOOL_COLOR_TEXT_EMPHASIS,
4126
4219
  fontSize: "1.2em",
@@ -4134,7 +4227,7 @@ function DetailHeader({
4134
4227
  },
4135
4228
  children: entry.actionId
4136
4229
  }),
4137
- /* @__PURE__ */ jsx16("span", {
4230
+ /* @__PURE__ */ jsx17("span", {
4138
4231
  style: {
4139
4232
  flexShrink: 0,
4140
4233
  padding: "2px 9px",
@@ -4149,14 +4242,14 @@ function DetailHeader({
4149
4242
  },
4150
4243
  children: STATUS_BADGE_LABEL[entry.status]
4151
4244
  }),
4152
- /* @__PURE__ */ jsx16(DomainChip, {
4245
+ /* @__PURE__ */ jsx17(DomainChip, {
4153
4246
  domain: entry.domain,
4154
4247
  allDomains: entry.allDomains,
4155
4248
  size: "md" /* md */
4156
4249
  })
4157
4250
  ]
4158
4251
  }),
4159
- /* @__PURE__ */ jsxs14("div", {
4252
+ /* @__PURE__ */ jsxs15("div", {
4160
4253
  style: {
4161
4254
  display: "flex",
4162
4255
  alignItems: "center",
@@ -4164,7 +4257,7 @@ function DetailHeader({
4164
4257
  gap: "8px"
4165
4258
  },
4166
4259
  children: [
4167
- /* @__PURE__ */ jsxs14("div", {
4260
+ /* @__PURE__ */ jsxs15("div", {
4168
4261
  style: {
4169
4262
  display: "flex",
4170
4263
  alignItems: "center",
@@ -4173,20 +4266,24 @@ function DetailHeader({
4173
4266
  overflow: "hidden"
4174
4267
  },
4175
4268
  children: [
4176
- /* @__PURE__ */ jsx16(HandlerChips, {
4269
+ inboundOrigin != null && /* @__PURE__ */ jsx17(OriginChip, {
4270
+ origin: inboundOrigin,
4271
+ size: "md" /* md */
4272
+ }),
4273
+ /* @__PURE__ */ jsx17(HandlerChips, {
4177
4274
  entry,
4178
4275
  size: "md" /* md */
4179
4276
  }),
4180
- /* @__PURE__ */ jsx16(ChildDispatchChips, {
4277
+ /* @__PURE__ */ jsx17(ChildDispatchChips, {
4181
4278
  childRouteItems: childExternalRouteItems,
4182
4279
  size: "md" /* md */
4183
4280
  })
4184
4281
  ]
4185
4282
  }),
4186
- /* @__PURE__ */ jsxs14("div", {
4283
+ /* @__PURE__ */ jsxs15("div", {
4187
4284
  style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 },
4188
4285
  children: [
4189
- /* @__PURE__ */ jsx16("span", {
4286
+ /* @__PURE__ */ jsx17("span", {
4190
4287
  style: {
4191
4288
  color: DEVTOOL_COLOR_SEMANTIC_METADATA,
4192
4289
  fontSize: "10px",
@@ -4195,9 +4292,9 @@ function DetailHeader({
4195
4292
  },
4196
4293
  children: timestamp
4197
4294
  }),
4198
- /* @__PURE__ */ jsx16("span", {
4295
+ /* @__PURE__ */ jsx17("span", {
4199
4296
  style: { color, fontSize: "12px", fontWeight: "500" },
4200
- children: /* @__PURE__ */ jsx16(DurationDisplay, {
4297
+ children: /* @__PURE__ */ jsx17(DurationDisplay, {
4201
4298
  entry
4202
4299
  })
4203
4300
  })
@@ -4237,7 +4334,7 @@ function ActionDetailPanel({
4237
4334
  const handleFocusChild = (cuid) => {
4238
4335
  setFocusedChildCuid((prev) => prev === cuid ? null : cuid);
4239
4336
  };
4240
- return /* @__PURE__ */ jsxs14("div", {
4337
+ return /* @__PURE__ */ jsxs15("div", {
4241
4338
  style: {
4242
4339
  flex: 1,
4243
4340
  display: "flex",
@@ -4247,20 +4344,20 @@ function ActionDetailPanel({
4247
4344
  background: DEVTOOL_DETAIL_BASE_BACKGROUND
4248
4345
  },
4249
4346
  children: [
4250
- /* @__PURE__ */ jsx16(DetailHeader, {
4347
+ /* @__PURE__ */ jsx17(DetailHeader, {
4251
4348
  entry,
4252
4349
  isActive: focusedChildCuid === null,
4253
4350
  onClick: () => setFocusedChildCuid(null),
4254
4351
  childExternalRouteItems
4255
4352
  }),
4256
- /* @__PURE__ */ jsx16(CallStackSection, {
4353
+ /* @__PURE__ */ jsx17(CallStackSection, {
4257
4354
  parent,
4258
4355
  childEntries,
4259
4356
  focusedChildCuid,
4260
4357
  onFocusChild: handleFocusChild,
4261
4358
  onSelectParent: onSelectEntry
4262
4359
  }),
4263
- /* @__PURE__ */ jsxs14("div", {
4360
+ /* @__PURE__ */ jsxs15("div", {
4264
4361
  style: {
4265
4362
  flex: 1,
4266
4363
  overflowY: "auto",
@@ -4271,37 +4368,37 @@ function ActionDetailPanel({
4271
4368
  gap: "8px"
4272
4369
  },
4273
4370
  children: [
4274
- focusedEntry.input !== undefined ? /* @__PURE__ */ jsx16(DetailSection, {
4371
+ focusedEntry.input !== undefined ? /* @__PURE__ */ jsx17(DetailSection, {
4275
4372
  label: "Input",
4276
4373
  value: focusedEntry.input
4277
- }) : /* @__PURE__ */ jsx16(DetailSection, {
4374
+ }) : /* @__PURE__ */ jsx17(DetailSection, {
4278
4375
  label: "Input",
4279
4376
  value: "No input required or given"
4280
4377
  }),
4281
- focusedEntry.status === "success" && /* @__PURE__ */ jsx16(DetailSection, {
4378
+ focusedEntry.status === "success" && /* @__PURE__ */ jsx17(DetailSection, {
4282
4379
  label: "Output",
4283
4380
  value: focusedEntry.output,
4284
4381
  color: DEVTOOL_COLOR_SEMANTIC_SUCCESS
4285
4382
  }),
4286
- (focusedEntry.status === "action-error" || focusedEntry.status === "failed" || focusedEntry.status === "aborted") && /* @__PURE__ */ jsx16(ActionErrorDisplay, {
4383
+ (focusedEntry.status === "action-error" || focusedEntry.status === "failed" || focusedEntry.status === "aborted") && /* @__PURE__ */ jsx17(ActionErrorDisplay, {
4287
4384
  entry: focusedEntry
4288
4385
  }),
4289
- focusedEntry.progressUpdates.length > 0 && /* @__PURE__ */ jsx16(DetailSection, {
4386
+ focusedEntry.progressUpdates.length > 0 && /* @__PURE__ */ jsx17(DetailSection, {
4290
4387
  label: `Progress (${focusedEntry.progressUpdates.length})`,
4291
4388
  value: focusedEntry.progressUpdates
4292
4389
  }),
4293
- /* @__PURE__ */ jsx16(StackTraceSection, {
4390
+ /* @__PURE__ */ jsx17(StackTraceSection, {
4294
4391
  runtime: entry.meta.originClient,
4295
4392
  label: "Dispatch Site",
4296
4393
  stack: focusedEntry.callSite,
4297
4394
  color: DEVTOOL_COLOR_TEXT_SECONDARY,
4298
4395
  minFrameCount: maxCallSiteFrames
4299
4396
  }),
4300
- /* @__PURE__ */ jsx16(RoutingSection, {
4397
+ /* @__PURE__ */ jsx17(RoutingSection, {
4301
4398
  entry: focusedEntry,
4302
4399
  minHopCount: maxRoutingHops
4303
4400
  }),
4304
- /* @__PURE__ */ jsx16(MetaSection, {
4401
+ /* @__PURE__ */ jsx17(MetaSection, {
4305
4402
  entry: focusedEntry
4306
4403
  })
4307
4404
  ]
@@ -4322,7 +4419,7 @@ import { CircleX as CircleX2, PackageCheck, Sparkle, Variable } from "lucide-rea
4322
4419
  import { useState as useState9 } from "react";
4323
4420
 
4324
4421
  // src/devtools/browser/components/action_list/IoTooltipContent.tsx
4325
- import { jsx as jsx17, Fragment as Fragment8 } from "react/jsx-runtime";
4422
+ import { jsx as jsx18, Fragment as Fragment8 } from "react/jsx-runtime";
4326
4423
  var JSON_TOKEN_RE2 = /("(?:\\.|[^"\\])*")(\s*:)?|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)|(\btrue\b|\bfalse\b|\bnull\b|\bundefined\b)|([{}[\],])/g;
4327
4424
  function renderColoredJson2(text) {
4328
4425
  const nodes = [];
@@ -4335,32 +4432,32 @@ function renderColoredJson2(text) {
4335
4432
  const [, str, colon, num, kw, punct] = m;
4336
4433
  if (str != null) {
4337
4434
  if (colon != null) {
4338
- nodes.push(/* @__PURE__ */ jsx17("span", {
4435
+ nodes.push(/* @__PURE__ */ jsx18("span", {
4339
4436
  style: { color: DEVTOOL_JSON_KEY },
4340
4437
  children: str
4341
4438
  }, i++));
4342
- nodes.push(/* @__PURE__ */ jsx17("span", {
4439
+ nodes.push(/* @__PURE__ */ jsx18("span", {
4343
4440
  style: { color: DEVTOOL_JSON_PUNCTUATION },
4344
4441
  children: colon
4345
4442
  }, i++));
4346
4443
  } else {
4347
- nodes.push(/* @__PURE__ */ jsx17("span", {
4444
+ nodes.push(/* @__PURE__ */ jsx18("span", {
4348
4445
  style: { color: DEVTOOL_JSON_STRING },
4349
4446
  children: str
4350
4447
  }, i++));
4351
4448
  }
4352
4449
  } else if (num != null) {
4353
- nodes.push(/* @__PURE__ */ jsx17("span", {
4450
+ nodes.push(/* @__PURE__ */ jsx18("span", {
4354
4451
  style: { color: DEVTOOL_JSON_NUMBER },
4355
4452
  children: num
4356
4453
  }, i++));
4357
4454
  } else if (kw != null) {
4358
- nodes.push(/* @__PURE__ */ jsx17("span", {
4455
+ nodes.push(/* @__PURE__ */ jsx18("span", {
4359
4456
  style: { color: DEVTOOL_JSON_KEYWORD },
4360
4457
  children: kw
4361
4458
  }, i++));
4362
4459
  } else if (punct != null) {
4363
- nodes.push(/* @__PURE__ */ jsx17("span", {
4460
+ nodes.push(/* @__PURE__ */ jsx18("span", {
4364
4461
  style: { color: DEVTOOL_JSON_PUNCTUATION },
4365
4462
  children: punct
4366
4463
  }, i++));
@@ -4382,7 +4479,7 @@ function stripOuterBraces(json) {
4382
4479
  }
4383
4480
  function IoTooltipContent({ value }) {
4384
4481
  const text = stripOuterBraces(safeStringify(value, 2));
4385
- return /* @__PURE__ */ jsx17("div", {
4482
+ return /* @__PURE__ */ jsx18("div", {
4386
4483
  style: {
4387
4484
  fontFamily: "ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace",
4388
4485
  fontSize: "10px",
@@ -4396,7 +4493,7 @@ function IoTooltipContent({ value }) {
4396
4493
  }
4397
4494
 
4398
4495
  // src/devtools/browser/components/action_list/ActionInputAndOutputChip.tsx
4399
- import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
4496
+ import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
4400
4497
  var ActionInputAndOutputChip = ({
4401
4498
  entry,
4402
4499
  breakReasons,
@@ -4417,35 +4514,35 @@ var ActionInputAndOutputChip = ({
4417
4514
  const sizeNum = getSizeValue(size);
4418
4515
  const newIconSizeEm = `${sizeNum * 0.9}em`;
4419
4516
  const label = `${(isLocal ? localEnvId : externalLabel) ?? "unknown"}`;
4420
- const newSparkleComp = /* @__PURE__ */ jsx18("div", {
4517
+ const newSparkleComp = /* @__PURE__ */ jsx19("div", {
4421
4518
  style: {
4422
4519
  opacity: 0.9,
4423
4520
  alignSelf: "start",
4424
4521
  marginLeft: "-0.6em"
4425
4522
  },
4426
- children: /* @__PURE__ */ jsx18(Sparkle, {
4523
+ children: /* @__PURE__ */ jsx19(Sparkle, {
4427
4524
  strokeWidth: "0.2em",
4428
4525
  color: "rgba(243, 250, 140, 1)",
4429
4526
  width: newIconSizeEm,
4430
4527
  height: newIconSizeEm
4431
4528
  })
4432
4529
  });
4433
- return /* @__PURE__ */ jsx18(Chip, {
4530
+ return /* @__PURE__ */ jsx19(Chip, {
4434
4531
  color,
4435
4532
  size,
4436
4533
  subtle,
4437
- children: /* @__PURE__ */ jsxs15("div", {
4534
+ children: /* @__PURE__ */ jsxs16("div", {
4438
4535
  style: { display: "flex", alignItems: "center", gap: "0.4em" },
4439
4536
  children: [
4440
- /* @__PURE__ */ jsx18(Icon, {
4537
+ /* @__PURE__ */ jsx19(Icon, {
4441
4538
  noBackground: true,
4442
4539
  icon: Variable,
4443
4540
  color,
4444
4541
  subtle: subtle || entry.input === undefined,
4445
4542
  tooltip: {
4446
- content: entry.input !== undefined ? /* @__PURE__ */ jsx18(IoTooltipContent, {
4543
+ content: entry.input !== undefined ? /* @__PURE__ */ jsx19(IoTooltipContent, {
4447
4544
  value: entry.input
4448
- }) : /* @__PURE__ */ jsx18("span", {
4545
+ }) : /* @__PURE__ */ jsx19("span", {
4449
4546
  style: { color: DEVTOOL_COLOR_TEXT_MUTED, fontSize: "10px" },
4450
4547
  children: "No input required or given"
4451
4548
  }),
@@ -4453,43 +4550,43 @@ var ActionInputAndOutputChip = ({
4453
4550
  }
4454
4551
  }),
4455
4552
  isNewInput && newSparkleComp,
4456
- /* @__PURE__ */ jsx18("span", {
4553
+ /* @__PURE__ */ jsx19("span", {
4457
4554
  style: { opacity: 0.6 },
4458
4555
  color,
4459
4556
  children: "→"
4460
4557
  }),
4461
- /* @__PURE__ */ jsx18("span", {
4558
+ /* @__PURE__ */ jsx19("span", {
4462
4559
  style: { opacity: 0.8, cursor: transportTooltip != null ? "default" : undefined },
4463
4560
  onMouseEnter: transportTooltip != null ? (e) => setLabelAnchor(e.currentTarget.getBoundingClientRect()) : undefined,
4464
4561
  onMouseLeave: transportTooltip != null ? () => setLabelAnchor(null) : undefined,
4465
4562
  children: label
4466
4563
  }),
4467
- labelAnchor != null && transportTooltip != null && /* @__PURE__ */ jsx18(Tooltip, {
4564
+ labelAnchor != null && transportTooltip != null && /* @__PURE__ */ jsx19(Tooltip, {
4468
4565
  anchor: labelAnchor,
4469
4566
  config: transportTooltip
4470
4567
  }),
4471
- /* @__PURE__ */ jsx18("span", {
4568
+ /* @__PURE__ */ jsx19("span", {
4472
4569
  style: { opacity: 0.6 },
4473
4570
  color,
4474
4571
  children: "→"
4475
4572
  }),
4476
- entry.status === "success" && entry.output !== undefined && /* @__PURE__ */ jsx18(Icon, {
4573
+ entry.status === "success" && entry.output !== undefined && /* @__PURE__ */ jsx19(Icon, {
4477
4574
  noBackground: true,
4478
4575
  icon: PackageCheck,
4479
4576
  color: !hasError ? color : "default" /* default */,
4480
4577
  tooltip: {
4481
- content: /* @__PURE__ */ jsx18(IoTooltipContent, {
4578
+ content: /* @__PURE__ */ jsx19(IoTooltipContent, {
4482
4579
  value: entry.output
4483
4580
  }),
4484
4581
  title: isNewOutput ? "New Output" : "Output"
4485
4582
  }
4486
4583
  }),
4487
- (entry.error != null || entry.abortReason != null) && /* @__PURE__ */ jsx18(Icon, {
4584
+ (entry.error != null || entry.abortReason != null) && /* @__PURE__ */ jsx19(Icon, {
4488
4585
  noBackground: true,
4489
4586
  icon: CircleX2,
4490
4587
  color: entry.status === "aborted" ? "aborted" /* aborted */ : "error" /* error */,
4491
4588
  tooltip: {
4492
- content: /* @__PURE__ */ jsx18(ActionErrorDisplay, {
4589
+ content: /* @__PURE__ */ jsx19(ActionErrorDisplay, {
4493
4590
  entry,
4494
4591
  compact: true
4495
4592
  }),
@@ -4504,7 +4601,7 @@ var ActionInputAndOutputChip = ({
4504
4601
  };
4505
4602
 
4506
4603
  // src/devtools/browser/components/action_list/ActionEntryRow.tsx
4507
- import { jsx as jsx19, jsxs as jsxs16, Fragment as Fragment10 } from "react/jsx-runtime";
4604
+ import { jsx as jsx20, jsxs as jsxs17, Fragment as Fragment10 } from "react/jsx-runtime";
4508
4605
  var MAX_GROUP_DOTS = 5;
4509
4606
  function getLatestChipColor(status) {
4510
4607
  if (status === "failed")
@@ -4527,14 +4624,14 @@ function GroupDotTooltip({
4527
4624
  const deltaMs = refTime - entry.startTime;
4528
4625
  const relStr = index === 0 ? "latest run" : `−${formatRelativeAge(deltaMs)} from latest`;
4529
4626
  const durationStr = entry.endTime != null ? `${entry.endTime - entry.startTime}ms` : "running…";
4530
- return /* @__PURE__ */ jsx19(Tooltip, {
4627
+ return /* @__PURE__ */ jsx20(Tooltip, {
4531
4628
  anchor,
4532
4629
  config: {
4533
4630
  align: "center",
4534
4631
  maxWidth: 240,
4535
- content: /* @__PURE__ */ jsxs16(Fragment10, {
4632
+ content: /* @__PURE__ */ jsxs17(Fragment10, {
4536
4633
  children: [
4537
- /* @__PURE__ */ jsxs16("div", {
4634
+ /* @__PURE__ */ jsxs17("div", {
4538
4635
  style: { color: dotColor, marginBottom: "1px" },
4539
4636
  children: [
4540
4637
  symbol,
@@ -4544,15 +4641,15 @@ function GroupDotTooltip({
4544
4641
  total
4545
4642
  ]
4546
4643
  }),
4547
- /* @__PURE__ */ jsx19("div", {
4644
+ /* @__PURE__ */ jsx20("div", {
4548
4645
  style: { color: DEVTOOL_COLOR_TEXT_SECONDARY },
4549
4646
  children: formatTimestamp(entry.startTime)
4550
4647
  }),
4551
- /* @__PURE__ */ jsx19("div", {
4648
+ /* @__PURE__ */ jsx20("div", {
4552
4649
  style: { color: DEVTOOL_COLOR_TEXT_MUTED },
4553
4650
  children: durationStr
4554
4651
  }),
4555
- index > 0 && /* @__PURE__ */ jsx19("div", {
4652
+ index > 0 && /* @__PURE__ */ jsx20("div", {
4556
4653
  style: {
4557
4654
  color: DEVTOOL_COLOR_TEXT_MUTED,
4558
4655
  marginTop: "3px",
@@ -4577,9 +4674,9 @@ function GroupDot({
4577
4674
  const [anchor, setAnchor] = useState10(null);
4578
4675
  const dotColor = STATUS_COLOR[entry.status];
4579
4676
  const hovered = anchor != null;
4580
- return /* @__PURE__ */ jsxs16(Fragment10, {
4677
+ return /* @__PURE__ */ jsxs17(Fragment10, {
4581
4678
  children: [
4582
- /* @__PURE__ */ jsx19("button", {
4679
+ /* @__PURE__ */ jsx20("button", {
4583
4680
  "data-cuid": entry.cuid,
4584
4681
  onClick: (e) => {
4585
4682
  e.stopPropagation();
@@ -4601,7 +4698,7 @@ function GroupDot({
4601
4698
  transition: "transform 0.1s ease, opacity 0.1s ease, border-color 0.1s ease"
4602
4699
  }
4603
4700
  }),
4604
- hovered && anchor != null && /* @__PURE__ */ jsx19(GroupDotTooltip, {
4701
+ hovered && anchor != null && /* @__PURE__ */ jsx20(GroupDotTooltip, {
4605
4702
  entry,
4606
4703
  index,
4607
4704
  total,
@@ -4626,11 +4723,12 @@ function ActionEntryRow({
4626
4723
  }) {
4627
4724
  const timestamp = formatTimestamp(entry.startTime);
4628
4725
  const hasGroup = groupEntries != null && groupEntries.length > 1;
4726
+ const inboundOrigin = getInboundOrigin(entry);
4629
4727
  const externalChildEntries = childEntries?.filter((child) => child.meta.routing[0]?.handlerType === "external") ?? [];
4630
4728
  const nonIoBreakReasons = breakReasons?.filter((r) => r !== "new_input" /* new_input */ && r !== "new_output" /* new_output */) ?? [];
4631
4729
  const hasBottomError = entry.error != null || entry.abortReason != null;
4632
4730
  const hasBottomContent = externalChildEntries.length > 0 || nonIoBreakReasons.length > 0;
4633
- return /* @__PURE__ */ jsxs16("div", {
4731
+ return /* @__PURE__ */ jsxs17("div", {
4634
4732
  "data-cuid": entry.cuid,
4635
4733
  onClick,
4636
4734
  style: {
@@ -4647,7 +4745,7 @@ function ActionEntryRow({
4647
4745
  margin: "2px 4px"
4648
4746
  },
4649
4747
  children: [
4650
- /* @__PURE__ */ jsx19("div", {
4748
+ /* @__PURE__ */ jsx20("div", {
4651
4749
  style: {
4652
4750
  position: "absolute",
4653
4751
  left: "2em",
@@ -4659,10 +4757,10 @@ function ActionEntryRow({
4659
4757
  zIndex: 0
4660
4758
  }
4661
4759
  }),
4662
- /* @__PURE__ */ jsxs16("div", {
4760
+ /* @__PURE__ */ jsxs17("div", {
4663
4761
  style: { display: "flex", alignItems: "center", gap: "8px" },
4664
4762
  children: [
4665
- /* @__PURE__ */ jsx19("div", {
4763
+ /* @__PURE__ */ jsx20("div", {
4666
4764
  style: {
4667
4765
  position: "relative",
4668
4766
  zIndex: 1,
@@ -4672,11 +4770,11 @@ function ActionEntryRow({
4672
4770
  alignItems: "center",
4673
4771
  justifyContent: "flex-start"
4674
4772
  },
4675
- children: isLatest ? /* @__PURE__ */ jsx19(Chip, {
4773
+ children: isLatest ? /* @__PURE__ */ jsx20(Chip, {
4676
4774
  size: "sm" /* sm */,
4677
4775
  color: getLatestChipColor(entry.status),
4678
4776
  children: "latest"
4679
- }) : /* @__PURE__ */ jsxs16(Chip, {
4777
+ }) : /* @__PURE__ */ jsxs17(Chip, {
4680
4778
  size: "sm" /* sm */,
4681
4779
  color: getLatestChipColor(entry.status),
4682
4780
  children: [
@@ -4685,10 +4783,10 @@ function ActionEntryRow({
4685
4783
  ]
4686
4784
  })
4687
4785
  }),
4688
- /* @__PURE__ */ jsxs16("div", {
4786
+ /* @__PURE__ */ jsxs17("div", {
4689
4787
  style: { flex: 1, minWidth: 0, display: "flex", alignItems: "center", gap: "0.5em" },
4690
4788
  children: [
4691
- /* @__PURE__ */ jsx19("span", {
4789
+ /* @__PURE__ */ jsx20("span", {
4692
4790
  style: {
4693
4791
  color: DEVTOOL_COLOR_TEXT_SECONDARY,
4694
4792
  fontSize: "1em",
@@ -4702,14 +4800,19 @@ function ActionEntryRow({
4702
4800
  },
4703
4801
  children: entry.actionId
4704
4802
  }),
4705
- /* @__PURE__ */ jsx19(ActionInputAndOutputChip, {
4803
+ inboundOrigin != null && /* @__PURE__ */ jsx20(OriginChip, {
4804
+ origin: inboundOrigin,
4805
+ size: "sm" /* sm */,
4806
+ subtle: true
4807
+ }),
4808
+ /* @__PURE__ */ jsx20(ActionInputAndOutputChip, {
4706
4809
  breakReasons,
4707
4810
  entry
4708
4811
  }),
4709
- /* @__PURE__ */ jsx19("div", {
4812
+ /* @__PURE__ */ jsx20("div", {
4710
4813
  style: { flex: 1 }
4711
4814
  }),
4712
- /* @__PURE__ */ jsxs16("div", {
4815
+ /* @__PURE__ */ jsxs17("div", {
4713
4816
  style: {
4714
4817
  display: "flex",
4715
4818
  flexDirection: "column",
@@ -4719,7 +4822,7 @@ function ActionEntryRow({
4719
4822
  marginRight: "-0.2em"
4720
4823
  },
4721
4824
  children: [
4722
- /* @__PURE__ */ jsx19("span", {
4825
+ /* @__PURE__ */ jsx20("span", {
4723
4826
  style: {
4724
4827
  display: "flex",
4725
4828
  color: DEVTOOL_COLOR_SEMANTIC_METADATA,
@@ -4732,7 +4835,7 @@ function ActionEntryRow({
4732
4835
  },
4733
4836
  children: timestamp
4734
4837
  }),
4735
- /* @__PURE__ */ jsx19("span", {
4838
+ /* @__PURE__ */ jsx20("span", {
4736
4839
  style: {
4737
4840
  display: "flex",
4738
4841
  color: DEVTOOL_COLOR_SEMANTIC_WARNING,
@@ -4741,7 +4844,7 @@ function ActionEntryRow({
4741
4844
  opacity: 0.9,
4742
4845
  flexShrink: 0
4743
4846
  },
4744
- children: /* @__PURE__ */ jsx19(DurationDisplay, {
4847
+ children: /* @__PURE__ */ jsx20(DurationDisplay, {
4745
4848
  entry
4746
4849
  })
4747
4850
  })
@@ -4751,7 +4854,7 @@ function ActionEntryRow({
4751
4854
  })
4752
4855
  ]
4753
4856
  }),
4754
- hasBottomContent && /* @__PURE__ */ jsxs16("div", {
4857
+ hasBottomContent && /* @__PURE__ */ jsxs17("div", {
4755
4858
  style: {
4756
4859
  display: "flex",
4757
4860
  flexWrap: "wrap",
@@ -4760,35 +4863,35 @@ function ActionEntryRow({
4760
4863
  paddingLeft: "4.5em"
4761
4864
  },
4762
4865
  children: [
4763
- externalChildEntries.map((child) => /* @__PURE__ */ jsxs16(Fragment9, {
4866
+ externalChildEntries.map((child) => /* @__PURE__ */ jsxs17(Fragment9, {
4764
4867
  children: [
4765
- /* @__PURE__ */ jsx19(Icon, {
4868
+ /* @__PURE__ */ jsx20(Icon, {
4766
4869
  size: "sm" /* sm */,
4767
4870
  icon: Variable2,
4768
4871
  color: "io_input" /* io_input */,
4769
4872
  subtle: true,
4770
4873
  tooltip: {
4771
- content: child.input !== undefined ? /* @__PURE__ */ jsx19(IoTooltipContent, {
4874
+ content: child.input !== undefined ? /* @__PURE__ */ jsx20(IoTooltipContent, {
4772
4875
  value: child.input
4773
- }) : /* @__PURE__ */ jsx19("span", {
4876
+ }) : /* @__PURE__ */ jsx20("span", {
4774
4877
  style: { color: DEVTOOL_COLOR_TEXT_MUTED, fontSize: "10px" },
4775
4878
  children: "No input required or given"
4776
4879
  }),
4777
4880
  title: `Input · ${child.actionId}`
4778
4881
  }
4779
4882
  }),
4780
- /* @__PURE__ */ jsx19(HandlerChips, {
4883
+ /* @__PURE__ */ jsx20(HandlerChips, {
4781
4884
  entry: child,
4782
4885
  size: "sm" /* sm */,
4783
4886
  subtle: true
4784
4887
  }),
4785
- child.status === "success" && child.output !== undefined && /* @__PURE__ */ jsx19(Icon, {
4888
+ child.status === "success" && child.output !== undefined && /* @__PURE__ */ jsx20(Icon, {
4786
4889
  size: "sm" /* sm */,
4787
4890
  icon: PackageCheck2,
4788
4891
  color: "io_output" /* io_output */,
4789
4892
  subtle: true,
4790
4893
  tooltip: {
4791
- content: /* @__PURE__ */ jsx19(IoTooltipContent, {
4894
+ content: /* @__PURE__ */ jsx20(IoTooltipContent, {
4792
4895
  value: child.output
4793
4896
  }),
4794
4897
  title: `Output · ${child.actionId}`
@@ -4796,18 +4899,18 @@ function ActionEntryRow({
4796
4899
  })
4797
4900
  ]
4798
4901
  }, child.actionId)),
4799
- nonIoBreakReasons.map((reason) => /* @__PURE__ */ jsx19(Chip, {
4902
+ nonIoBreakReasons.map((reason) => /* @__PURE__ */ jsx20(Chip, {
4800
4903
  color: "default" /* default */,
4801
4904
  subtle: true,
4802
4905
  children: reason
4803
4906
  }, reason)),
4804
- externalChildEntries.length > 0 && hasBottomError && /* @__PURE__ */ jsx19(Icon, {
4907
+ externalChildEntries.length > 0 && hasBottomError && /* @__PURE__ */ jsx20(Icon, {
4805
4908
  size: "sm" /* sm */,
4806
4909
  icon: CircleX3,
4807
4910
  color: entry.status === "aborted" ? "aborted" /* aborted */ : "error" /* error */,
4808
4911
  subtle: true,
4809
4912
  tooltip: {
4810
- content: /* @__PURE__ */ jsx19(ActionErrorDisplay, {
4913
+ content: /* @__PURE__ */ jsx20(ActionErrorDisplay, {
4811
4914
  entry,
4812
4915
  compact: true
4813
4916
  }),
@@ -4817,7 +4920,7 @@ function ActionEntryRow({
4817
4920
  })
4818
4921
  ]
4819
4922
  }),
4820
- hasGroup && /* @__PURE__ */ jsxs16("div", {
4923
+ hasGroup && /* @__PURE__ */ jsxs17("div", {
4821
4924
  style: {
4822
4925
  display: "flex",
4823
4926
  flexWrap: "wrap",
@@ -4827,7 +4930,7 @@ function ActionEntryRow({
4827
4930
  paddingBottom: "2px"
4828
4931
  },
4829
4932
  children: [
4830
- groupEntries.slice(0, MAX_GROUP_DOTS).map((e, i) => /* @__PURE__ */ jsx19(GroupDot, {
4933
+ groupEntries.slice(0, MAX_GROUP_DOTS).map((e, i) => /* @__PURE__ */ jsx20(GroupDot, {
4831
4934
  entry: e,
4832
4935
  index: i,
4833
4936
  total: groupEntries.length,
@@ -4835,7 +4938,7 @@ function ActionEntryRow({
4835
4938
  isActive: selectedGroupCuid === e.cuid,
4836
4939
  onSelect: () => onSelectGroupEntry?.(e.cuid)
4837
4940
  }, e.cuid)),
4838
- groupEntries.length > MAX_GROUP_DOTS && /* @__PURE__ */ jsxs16("span", {
4941
+ groupEntries.length > MAX_GROUP_DOTS && /* @__PURE__ */ jsxs17("span", {
4839
4942
  style: {
4840
4943
  fontSize: "0.7em",
4841
4944
  opacity: 0.5,
@@ -4854,7 +4957,7 @@ function ActionEntryRow({
4854
4957
  }
4855
4958
 
4856
4959
  // src/devtools/browser/components/action_list/ActionList.tsx
4857
- import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
4960
+ import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
4858
4961
  function getBreakReasons(current, previous) {
4859
4962
  const reasons = [];
4860
4963
  const inputChanged = current.inputHash != null && previous.inputHash != null ? current.inputHash !== previous.inputHash : safeStringify(current.input, 0) !== safeStringify(previous.input, 0);
@@ -4921,29 +5024,29 @@ function ActionList({
4921
5024
  containerRef.current?.querySelector(`[data-cuid="${repCuid}"]`)?.scrollIntoView({ block: "nearest" });
4922
5025
  }, [selectedCuid, flatItems]);
4923
5026
  if (groups.length === 0) {
4924
- return /* @__PURE__ */ jsx20("div", {
5027
+ return /* @__PURE__ */ jsx21("div", {
4925
5028
  style,
4926
- children: /* @__PURE__ */ jsx20("div", {
5029
+ children: /* @__PURE__ */ jsx21("div", {
4927
5030
  style: { padding: "24px", textAlign: "center", color: DEVTOOL_COLOR_TEXT_MUTED },
4928
5031
  children: "No actions recorded yet"
4929
5032
  })
4930
5033
  });
4931
5034
  }
4932
- return /* @__PURE__ */ jsxs17("div", {
5035
+ return /* @__PURE__ */ jsxs18("div", {
4933
5036
  ref: containerRef,
4934
5037
  style,
4935
5038
  children: [
4936
5039
  flatItems.map((item) => {
4937
5040
  const key = getFlatItemKey(item);
4938
5041
  const { group } = item;
4939
- return /* @__PURE__ */ jsxs17("div", {
5042
+ return /* @__PURE__ */ jsxs18("div", {
4940
5043
  style: {
4941
5044
  borderBottom: `1px solid ${DEVTOOL_LIST_GROUP_DIVIDER}`,
4942
5045
  position: "relative",
4943
5046
  overflow: "hidden"
4944
5047
  },
4945
5048
  children: [
4946
- /* @__PURE__ */ jsx20("div", {
5049
+ /* @__PURE__ */ jsx21("div", {
4947
5050
  style: {
4948
5051
  position: "absolute",
4949
5052
  inset: 0,
@@ -4952,7 +5055,7 @@ function ActionList({
4952
5055
  animation: "__nice-action-shine 0.65s ease-out forwards"
4953
5056
  }
4954
5057
  }, group.representative.cuid),
4955
- /* @__PURE__ */ jsx20(ActionEntryRow, {
5058
+ /* @__PURE__ */ jsx21(ActionEntryRow, {
4956
5059
  entry: group.representative,
4957
5060
  isSelected: selectedCuid === group.representative.cuid || group.rest.some((e) => e.cuid === selectedCuid),
4958
5061
  isLatest: item.groupIndex === 0,
@@ -4967,7 +5070,7 @@ function ActionList({
4967
5070
  ]
4968
5071
  }, key);
4969
5072
  }),
4970
- /* @__PURE__ */ jsx20("div", {
5073
+ /* @__PURE__ */ jsx21("div", {
4971
5074
  style: { padding: "24px", textAlign: "center", color: DEVTOOL_COLOR_TEXT_MUTED },
4972
5075
  children: "Start of action history"
4973
5076
  })
@@ -4977,7 +5080,7 @@ function ActionList({
4977
5080
 
4978
5081
  // src/devtools/browser/components/PanelChrome.tsx
4979
5082
  import { useState as useState11 } from "react";
4980
- import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
5083
+ import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
4981
5084
  var MONO_FONT = "ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace";
4982
5085
  var SANS_FONT = "ui-sans-serif, system-ui, sans-serif";
4983
5086
  var DOCKED_SIZE_MIN = 140;
@@ -5011,7 +5114,7 @@ function PanelHeader({
5011
5114
  onClear,
5012
5115
  openOthers
5013
5116
  }) {
5014
- return /* @__PURE__ */ jsxs18("div", {
5117
+ return /* @__PURE__ */ jsxs19("div", {
5015
5118
  style: {
5016
5119
  display: "flex",
5017
5120
  alignItems: "center",
@@ -5023,10 +5126,10 @@ function PanelHeader({
5023
5126
  flexShrink: 0
5024
5127
  },
5025
5128
  children: [
5026
- /* @__PURE__ */ jsxs18("div", {
5129
+ /* @__PURE__ */ jsxs19("div", {
5027
5130
  style: { display: "flex", alignItems: "center", gap: "8px", minWidth: 0 },
5028
5131
  children: [
5029
- /* @__PURE__ */ jsx21("span", {
5132
+ /* @__PURE__ */ jsx22("span", {
5030
5133
  style: {
5031
5134
  color: DEVTOOL_COLOR_SEMANTIC_SYSTEM,
5032
5135
  fontWeight: "bold",
@@ -5035,7 +5138,7 @@ function PanelHeader({
5035
5138
  },
5036
5139
  children: "⚡ action"
5037
5140
  }),
5038
- openOthers?.map((item) => /* @__PURE__ */ jsxs18("button", {
5141
+ openOthers?.map((item) => /* @__PURE__ */ jsxs19("button", {
5039
5142
  onClick: item.onOpen,
5040
5143
  title: `Open ${item.label} devtools`,
5041
5144
  style: {
@@ -5053,13 +5156,13 @@ function PanelHeader({
5053
5156
  whiteSpace: "nowrap"
5054
5157
  },
5055
5158
  children: [
5056
- /* @__PURE__ */ jsx21("span", {
5159
+ /* @__PURE__ */ jsx22("span", {
5057
5160
  children: item.icon
5058
5161
  }),
5059
- /* @__PURE__ */ jsx21("span", {
5162
+ /* @__PURE__ */ jsx22("span", {
5060
5163
  children: item.label
5061
5164
  }),
5062
- item.badge != null && /* @__PURE__ */ jsx21("span", {
5165
+ item.badge != null && /* @__PURE__ */ jsx22("span", {
5063
5166
  style: { color: DEVTOOL_COLOR_SEMANTIC_SYSTEM },
5064
5167
  children: item.badge
5065
5168
  })
@@ -5067,14 +5170,14 @@ function PanelHeader({
5067
5170
  }, item.id))
5068
5171
  ]
5069
5172
  }),
5070
- /* @__PURE__ */ jsxs18("div", {
5173
+ /* @__PURE__ */ jsxs19("div", {
5071
5174
  style: { display: "flex", gap: "10px", alignItems: "center" },
5072
5175
  children: [
5073
- /* @__PURE__ */ jsx21(PositionPicker, {
5176
+ /* @__PURE__ */ jsx22(PositionPicker, {
5074
5177
  position,
5075
5178
  onChange: onPositionChange
5076
5179
  }),
5077
- onClear != null && /* @__PURE__ */ jsx21("button", {
5180
+ onClear != null && /* @__PURE__ */ jsx22("button", {
5078
5181
  onClick: onClear,
5079
5182
  style: {
5080
5183
  background: "none",
@@ -5086,7 +5189,7 @@ function PanelHeader({
5086
5189
  },
5087
5190
  children: "clear"
5088
5191
  }),
5089
- /* @__PURE__ */ jsx21("button", {
5192
+ /* @__PURE__ */ jsx22("button", {
5090
5193
  onClick: onClose,
5091
5194
  style: {
5092
5195
  background: "none",
@@ -5108,17 +5211,17 @@ function PositionPicker({
5108
5211
  position,
5109
5212
  onChange
5110
5213
  }) {
5111
- return /* @__PURE__ */ jsx21("div", {
5214
+ return /* @__PURE__ */ jsx22("div", {
5112
5215
  title: "Move / dock panel",
5113
5216
  style: { display: "grid", gridTemplateColumns: "repeat(3, 9px)", gap: "2px", padding: "2px" },
5114
5217
  children: POSITION_GRID.map(({ key, pos }) => {
5115
5218
  if (pos == null)
5116
- return /* @__PURE__ */ jsx21("div", {
5219
+ return /* @__PURE__ */ jsx22("div", {
5117
5220
  style: { width: "9px", height: "9px" }
5118
5221
  }, key);
5119
5222
  const isTopBottom = pos === "dock-top" || pos === "dock-bottom";
5120
5223
  const isActive = pos === position;
5121
- return /* @__PURE__ */ jsx21("div", {
5224
+ return /* @__PURE__ */ jsx22("div", {
5122
5225
  title: pos,
5123
5226
  onClick: () => onChange(pos),
5124
5227
  style: {
@@ -5129,7 +5232,7 @@ function PositionPicker({
5129
5232
  justifyContent: "center",
5130
5233
  cursor: "pointer"
5131
5234
  },
5132
- children: /* @__PURE__ */ jsx21("div", {
5235
+ children: /* @__PURE__ */ jsx22("div", {
5133
5236
  style: {
5134
5237
  width: isTopBottom ? "9px" : "3px",
5135
5238
  height: isTopBottom ? "3px" : "9px",
@@ -5165,7 +5268,7 @@ function ResizeHandle({
5165
5268
  window.addEventListener("mouseup", onUp);
5166
5269
  };
5167
5270
  const edgeStyle = dockSide === "bottom" ? { top: 0, left: 0, right: 0, height: "5px", cursor: "ns-resize" } : dockSide === "top" ? { bottom: 0, left: 0, right: 0, height: "5px", cursor: "ns-resize" } : dockSide === "right" ? { top: 0, bottom: 0, left: 0, width: "5px", cursor: "ew-resize" } : { top: 0, bottom: 0, right: 0, width: "5px", cursor: "ew-resize" };
5168
- return /* @__PURE__ */ jsx21("div", {
5271
+ return /* @__PURE__ */ jsx22("div", {
5169
5272
  onMouseDown,
5170
5273
  style: {
5171
5274
  position: "absolute",
@@ -5199,7 +5302,7 @@ function SplitHandle({
5199
5302
  window.addEventListener("mousemove", onMove);
5200
5303
  window.addEventListener("mouseup", onUp);
5201
5304
  };
5202
- return /* @__PURE__ */ jsx21("div", {
5305
+ return /* @__PURE__ */ jsx22("div", {
5203
5306
  onMouseDown,
5204
5307
  onMouseEnter: () => setHovered(true),
5205
5308
  onMouseLeave: () => setHovered(false),
@@ -5214,7 +5317,7 @@ function SplitHandle({
5214
5317
  });
5215
5318
  }
5216
5319
  function DevtoolsLauncher({ items }) {
5217
- return /* @__PURE__ */ jsx21("div", {
5320
+ return /* @__PURE__ */ jsx22("div", {
5218
5321
  style: {
5219
5322
  position: "fixed",
5220
5323
  bottom: "16px",
@@ -5224,7 +5327,7 @@ function DevtoolsLauncher({ items }) {
5224
5327
  fontFamily: MONO_FONT,
5225
5328
  fontSize: "12px"
5226
5329
  },
5227
- children: /* @__PURE__ */ jsx21("div", {
5330
+ children: /* @__PURE__ */ jsx22("div", {
5228
5331
  style: {
5229
5332
  display: "flex",
5230
5333
  background: DEVTOOL_SECTION_BACKGROUND,
@@ -5233,7 +5336,7 @@ function DevtoolsLauncher({ items }) {
5233
5336
  overflow: "hidden",
5234
5337
  boxShadow: "0 8px 24px rgba(0,0,0,0.35)"
5235
5338
  },
5236
- children: items.map((item, i) => /* @__PURE__ */ jsxs18("button", {
5339
+ children: items.map((item, i) => /* @__PURE__ */ jsxs19("button", {
5237
5340
  onClick: item.onOpen,
5238
5341
  style: {
5239
5342
  display: "flex",
@@ -5250,13 +5353,13 @@ function DevtoolsLauncher({ items }) {
5250
5353
  lineHeight: "1.5"
5251
5354
  },
5252
5355
  children: [
5253
- /* @__PURE__ */ jsx21("span", {
5356
+ /* @__PURE__ */ jsx22("span", {
5254
5357
  children: item.icon
5255
5358
  }),
5256
- /* @__PURE__ */ jsx21("span", {
5359
+ /* @__PURE__ */ jsx22("span", {
5257
5360
  children: item.label
5258
5361
  }),
5259
- item.badge != null && /* @__PURE__ */ jsx21("span", {
5362
+ item.badge != null && /* @__PURE__ */ jsx22("span", {
5260
5363
  style: { color: DEVTOOL_COLOR_SEMANTIC_SYSTEM },
5261
5364
  children: item.badge
5262
5365
  })
@@ -5374,7 +5477,7 @@ function getDevtoolsDockCoordinator() {
5374
5477
  }
5375
5478
 
5376
5479
  // src/devtools/browser/NiceActionDevtools.tsx
5377
- import { jsx as jsx22, jsxs as jsxs19, Fragment as Fragment11 } from "react/jsx-runtime";
5480
+ import { jsx as jsx23, jsxs as jsxs20, Fragment as Fragment11 } from "react/jsx-runtime";
5378
5481
  if (typeof document !== "undefined" && !document.getElementById("__nice-action-devtools-styles")) {
5379
5482
  const style = document.createElement("style");
5380
5483
  style.id = "__nice-action-devtools-styles";
@@ -5478,7 +5581,7 @@ function NiceActionDevtools({ forceEnable, ...props }) {
5478
5581
  if (!forceEnable && process["env"]["NODE_ENV"] !== "development") {
5479
5582
  return null;
5480
5583
  }
5481
- return /* @__PURE__ */ jsx22(NiceActionDevtools_Panel, {
5584
+ return /* @__PURE__ */ jsx23(NiceActionDevtools_Panel, {
5482
5585
  ...props
5483
5586
  });
5484
5587
  }
@@ -5565,7 +5668,7 @@ function NiceActionDevtools_Panel({
5565
5668
  };
5566
5669
  if (!isOpen) {
5567
5670
  if (view.isPrimary && !view.anyOpen) {
5568
- return /* @__PURE__ */ jsx22(DevtoolsLauncher, {
5671
+ return /* @__PURE__ */ jsx23(DevtoolsLauncher, {
5569
5672
  items: view.devtools
5570
5673
  });
5571
5674
  }
@@ -5617,16 +5720,16 @@ function NiceActionDevtools_Panel({
5617
5720
  },
5618
5721
  childEntriesMap
5619
5722
  };
5620
- return /* @__PURE__ */ jsxs19("div", {
5723
+ return /* @__PURE__ */ jsxs20("div", {
5621
5724
  id: "__nice-action-devtools-panel",
5622
5725
  style: panelStyle,
5623
5726
  children: [
5624
- /* @__PURE__ */ jsx22(ResizeHandle, {
5727
+ /* @__PURE__ */ jsx23(ResizeHandle, {
5625
5728
  dockSide,
5626
5729
  dockedSize,
5627
5730
  onChange: (size) => setPrefs(isHorizDock ? { dockedHeight: size } : { dockedWidth: size })
5628
5731
  }),
5629
- /* @__PURE__ */ jsx22(PanelHeader, {
5732
+ /* @__PURE__ */ jsx23(PanelHeader, {
5630
5733
  position,
5631
5734
  onPositionChange: (p) => setPrefs({ position: p }),
5632
5735
  onClose: () => setPrefs({ isOpen: false }),
@@ -5636,7 +5739,7 @@ function NiceActionDevtools_Panel({
5636
5739
  } : undefined,
5637
5740
  openOthers: view.otherClosed
5638
5741
  }),
5639
- /* @__PURE__ */ jsxs19("div", {
5742
+ /* @__PURE__ */ jsxs20("div", {
5640
5743
  style: {
5641
5744
  flex: 1,
5642
5745
  display: "flex",
@@ -5645,7 +5748,7 @@ function NiceActionDevtools_Panel({
5645
5748
  minHeight: 0
5646
5749
  },
5647
5750
  children: [
5648
- /* @__PURE__ */ jsx22("div", {
5751
+ /* @__PURE__ */ jsx23("div", {
5649
5752
  style: {
5650
5753
  flexGrow: selectedEntry != null ? 1 - detailRatio : 1,
5651
5754
  flexShrink: 1,
@@ -5653,18 +5756,18 @@ function NiceActionDevtools_Panel({
5653
5756
  minWidth: 0,
5654
5757
  minHeight: 0
5655
5758
  },
5656
- children: /* @__PURE__ */ jsx22(ActionList, {
5759
+ children: /* @__PURE__ */ jsx23(ActionList, {
5657
5760
  ...virtualListProps,
5658
5761
  style: { width: "100%", height: "100%", overflowY: "auto" }
5659
5762
  })
5660
5763
  }),
5661
- selectedEntry != null && /* @__PURE__ */ jsxs19(Fragment11, {
5764
+ selectedEntry != null && /* @__PURE__ */ jsxs20(Fragment11, {
5662
5765
  children: [
5663
- /* @__PURE__ */ jsx22(SplitHandle, {
5766
+ /* @__PURE__ */ jsx23(SplitHandle, {
5664
5767
  horizontal: isHorizDock,
5665
5768
  onRatioChange: (ratio) => setPrefs({ detailRatio: ratio })
5666
5769
  }),
5667
- /* @__PURE__ */ jsx22("div", {
5770
+ /* @__PURE__ */ jsx23("div", {
5668
5771
  style: {
5669
5772
  flexGrow: detailRatio,
5670
5773
  flexShrink: 1,
@@ -5682,7 +5785,7 @@ function NiceActionDevtools_Panel({
5682
5785
  boxShadow: "inset 0 18px 36px -14px rgba(0,0,0,0.8)"
5683
5786
  }
5684
5787
  },
5685
- children: /* @__PURE__ */ jsx22(ActionDetailPanel, {
5788
+ children: /* @__PURE__ */ jsx23(ActionDetailPanel, {
5686
5789
  entry: selectedEntry,
5687
5790
  parent: selectedEntryParent,
5688
5791
  childEntries: selectedEntryChildren,