@dsmm/dsmm 0.3.25 → 0.3.27

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 (54) hide show
  1. package/README.md +21 -8
  2. package/docs/agent-presets.md +7 -7
  3. package/docs/agent-teams.md +27 -0
  4. package/docs/compatibility.md +7 -5
  5. package/docs/lsp.md +10 -12
  6. package/docs/maintenance.md +29 -0
  7. package/docs/roadmap.md +25 -9
  8. package/docs/runtime-recovery.md +3 -3
  9. package/docs/testing.md +2 -1
  10. package/docs/web-fetch-fakeip.md +1 -1
  11. package/dsh-plugin.json +1 -1
  12. package/lib/client/NativeToolView-data.d.ts +8 -0
  13. package/lib/client/NativeToolView-data.js +19 -0
  14. package/lib/client/NativeToolView.d.ts +19 -0
  15. package/lib/client/NativeToolView.js +46 -0
  16. package/lib/client/RoleToolView-data.js +1 -1
  17. package/lib/client/RoleToolView-locales.d.ts +7 -0
  18. package/lib/client/RoleToolView-locales.js +6 -0
  19. package/lib/client/RoleToolView.js +2 -0
  20. package/lib/client/children-locales.d.ts +5 -5
  21. package/lib/client/controller.js +20 -0
  22. package/lib/client.js +347 -186
  23. package/lib/core-permission-authority.js +19 -8
  24. package/lib/deployment-permission-rules.js +2 -1
  25. package/lib/dsh-types.d.ts +2 -2
  26. package/lib/mode.js +2 -2
  27. package/lib/native-admission.d.ts +8 -0
  28. package/lib/native-admission.js +285 -48
  29. package/lib/native-ownership.d.ts +20 -0
  30. package/lib/native-ownership.js +92 -0
  31. package/lib/native-subagents.d.ts +21 -0
  32. package/lib/native-subagents.js +31 -0
  33. package/lib/permission-rpc.js +3 -2
  34. package/lib/preset-registry.js +2 -1
  35. package/lib/profile-rpc.js +4 -3
  36. package/lib/profile-runtime.d.ts +1 -1
  37. package/lib/profile-runtime.js +2 -1
  38. package/lib/prompts.d.ts +2 -0
  39. package/lib/prompts.js +14 -8
  40. package/lib/role-control-remote.js +19 -8
  41. package/lib/role-control-rpc.js +11 -9
  42. package/lib/role-control-types.d.ts +18 -5
  43. package/lib/role-identity.js +3 -19
  44. package/lib/role-invocation.d.ts +1 -1
  45. package/lib/role-policy.d.ts +11 -3
  46. package/lib/role-policy.js +64 -23
  47. package/lib/role-subagents.js +26 -6
  48. package/lib/session-metadata.d.ts +27 -1
  49. package/lib/session-metadata.js +46 -0
  50. package/lib/session-scope.d.ts +1 -1
  51. package/lib/session-scope.js +2 -2
  52. package/package.json +116 -114
  53. package/prompts/source/deepwork/general.md +19 -0
  54. package/prompts/source/shared/native-teams.md +11 -0
package/lib/client.js CHANGED
@@ -4410,6 +4410,23 @@ var ProfilesController = class {
4410
4410
  const document2 = structuredDocument(content2);
4411
4411
  let invalidFields = this.current.invalidFields;
4412
4412
  if (document2 !== null) {
4413
+ invalidFields = invalidFields.filter((field) => !/^settings\.roleRouting\..+\.(?:primary|fallbackRoutes\.\d+|levels\.(?:low|high|max))\.(?:provider|model)$/.test(field));
4414
+ for (const [role3, policy] of Object.entries(document2.roleRouting)) {
4415
+ const prefix = `settings.roleRouting.${role3}`;
4416
+ const routes = [];
4417
+ if (policy.primary !== void 0) routes.push([`${prefix}.primary`, policy.primary]);
4418
+ for (const [index, route3] of (policy.fallbackRoutes ?? []).entries()) {
4419
+ routes.push([`${prefix}.fallbackRoutes.${index}`, route3]);
4420
+ }
4421
+ for (const [level2, route3] of Object.entries(policy.levels ?? {})) {
4422
+ if (route3.provider !== void 0) routes.push([`${prefix}.levels.${level2}`, route3]);
4423
+ }
4424
+ for (const [path, route3] of routes) {
4425
+ for (const field of ["provider", "model"]) {
4426
+ if (route3[field].trim() === "") invalidFields.push(`${path}.${field}`);
4427
+ }
4428
+ }
4429
+ }
4413
4430
  for (const [key, draft2] of this.numberDrafts) {
4414
4431
  let value = document2;
4415
4432
  for (const segment of key.split(".")) {
@@ -9918,14 +9935,18 @@ function observedActualRoute(value) {
9918
9935
  return { status: "unknown", reason: row.reason };
9919
9936
  }
9920
9937
  function roleCall(value) {
9921
- const row = object2(value, ["parentSessionId", "parentAdmissionEpoch", "callId", "rootCallId", "childId", "role", "level", "routeSource", "initialRoute", "actualRoute", "phase", "delivery"], ["childAdmissionEpoch", "runId", "stopReason"]);
9922
- const role3 = parseDsmmRoleId(row.role);
9923
- if (role3 === "dsmm-orchestrator") fail4();
9938
+ const native = typeof value === "object" && value !== null && "kind" in value && value.kind === "native";
9939
+ const commonKeys = ["parentSessionId", "parentAdmissionEpoch", "callId", "rootCallId", "childId", "initialRoute", "actualRoute", "phase", "delivery"];
9940
+ const row = object2(
9941
+ value,
9942
+ [...commonKeys, ...native ? ["kind", "toolName"] : ["role", "level", "routeSource"]],
9943
+ ["childAdmissionEpoch", "runId", "stopReason", ...native ? ["provider", "nativeName"] : ["kind"]]
9944
+ );
9924
9945
  const childId = identity(row.childId), initialRoute = observedInitialRoute(row.initialRoute), actualRoute = observedActualRoute(row.actualRoute);
9925
9946
  const phase = choice(row.phase, ROLE_CALL_PHASES), delivery = choice(row.delivery, ROLE_CALL_DELIVERIES);
9926
9947
  const stopReason = Object.hasOwn(row, "stopReason") ? choice(row.stopReason, ROLE_CALL_STOP_REASONS) : void 0;
9927
9948
  if (stopReason !== void 0 && phase !== "settled") fail4();
9928
- return {
9949
+ const common = {
9929
9950
  parentSessionId: identity(row.parentSessionId),
9930
9951
  parentAdmissionEpoch: epoch2(row.parentAdmissionEpoch),
9931
9952
  ...Object.hasOwn(row, "childAdmissionEpoch") ? { childAdmissionEpoch: epoch2(row.childAdmissionEpoch) } : {},
@@ -9933,15 +9954,33 @@ function roleCall(value) {
9933
9954
  rootCallId: callIdentity(row.rootCallId),
9934
9955
  childId,
9935
9956
  ...Object.hasOwn(row, "runId") ? { runId: identity(row.runId) } : {},
9936
- role: role3,
9937
- level: choice(row.level, ["normal", "low", "high", "max"]),
9938
- routeSource: choice(row.routeSource, DSMM_ROUTE_SOURCES),
9939
- initialRoute,
9940
9957
  actualRoute,
9941
9958
  phase,
9942
9959
  delivery,
9943
9960
  ...stopReason === void 0 ? {} : { stopReason }
9944
9961
  };
9962
+ if (native) {
9963
+ if (initialRoute.status !== "unknown") fail4();
9964
+ return {
9965
+ ...common,
9966
+ kind: "native",
9967
+ toolName: callIdentity(row.toolName),
9968
+ initialRoute,
9969
+ ...Object.hasOwn(row, "provider") ? { provider: callIdentity(row.provider) } : {},
9970
+ ...Object.hasOwn(row, "nativeName") ? { nativeName: callIdentity(row.nativeName) } : {}
9971
+ };
9972
+ }
9973
+ if (Object.hasOwn(row, "kind") && row.kind !== "role") fail4();
9974
+ const role3 = parseDsmmRoleId(row.role);
9975
+ if (role3 === "dsmm-orchestrator") fail4();
9976
+ return {
9977
+ ...common,
9978
+ ...row.kind === "role" ? { kind: "role" } : {},
9979
+ role: role3,
9980
+ level: choice(row.level, ["normal", "low", "high", "max"]),
9981
+ routeSource: choice(row.routeSource, DSMM_ROUTE_SOURCES),
9982
+ initialRoute
9983
+ };
9945
9984
  }
9946
9985
  function observationFrame(value) {
9947
9986
  const row = object2(value, ["type", "sessionId", "admissionEpoch"], ["calls", "call", "callId"]), sessionId2 = identity(row.sessionId), admissionEpoch = epoch2(row.admissionEpoch);
@@ -10101,7 +10140,7 @@ function bindPermissionSession(source, sessions, permissions) {
10101
10140
 
10102
10141
  // src/client/RoleToolView.tsx
10103
10142
  var import_react11 = require("react");
10104
- var import_dsh_client_ui_primitives11 = require("@deepseek-ai/dsh-client-ui-primitives");
10143
+ var import_dsh_client_ui_primitives12 = require("@deepseek-ai/dsh-client-ui-primitives");
10105
10144
 
10106
10145
  // src/client/RoleToolView-data.ts
10107
10146
  var roleToolKeys = {
@@ -10157,7 +10196,7 @@ function actualRoleTool(toolName, meta, failed) {
10157
10196
  }
10158
10197
  }
10159
10198
  function observedRoleTool(toolName, observation) {
10160
- if (!(toolName === "dsmm_category" ? categories : roles).has(observation.role)) return void 0;
10199
+ if (observation.kind === "native" || !(toolName === "dsmm_category" ? categories : roles).has(observation.role)) return void 0;
10161
10200
  return {
10162
10201
  role: observation.role,
10163
10202
  label: roleToolDisplay(observation.role),
@@ -10239,6 +10278,13 @@ var roleToolEn = {
10239
10278
  error: "Failed",
10240
10279
  stopped: "Interrupted",
10241
10280
  technicalDetails: "Technical details",
10281
+ nativeAgent: "Native agent",
10282
+ nativeName: "Name",
10283
+ nativeId: "Child ID",
10284
+ nativeProvider: "Execution provider",
10285
+ accepted: "Accepted · completion not observed",
10286
+ completed: "Completed",
10287
+ nativeCorrelationUnavailable: "Live child correlation unavailable; native receipt only",
10242
10288
  observation: "Route observation",
10243
10289
  observationUnavailable: "Unavailable",
10244
10290
  observationConnecting: "Connecting",
@@ -10284,6 +10330,13 @@ var roleToolZh = {
10284
10330
  error: "失败",
10285
10331
  stopped: "已中断",
10286
10332
  technicalDetails: "技术详情",
10333
+ nativeAgent: "原生代理",
10334
+ nativeName: "名称",
10335
+ nativeId: "子代理 ID",
10336
+ nativeProvider: "执行提供方",
10337
+ accepted: "已接受 · 完成情况未观测",
10338
+ completed: "已完成",
10339
+ nativeCorrelationUnavailable: "实时子代理关联不可用;仅显示原生回执",
10287
10340
  observation: "路由观测",
10288
10341
  observationUnavailable: "不可用",
10289
10342
  observationConnecting: "连接中",
@@ -10313,8 +10366,115 @@ var roleToolZh = {
10313
10366
  value: "值"
10314
10367
  };
10315
10368
 
10316
- // src/client/RoleToolView.tsx
10369
+ // src/client/NativeToolView.tsx
10370
+ var import_dsh_client_ui_primitives11 = require("@deepseek-ai/dsh-client-ui-primitives");
10371
+
10372
+ // src/client/NativeToolView-data.ts
10373
+ function nativeActivationIdentity(meta) {
10374
+ if (meta === null || typeof meta !== "object" || Array.isArray(meta)) return void 0;
10375
+ const value = meta;
10376
+ if (value.kind !== "activation") return void 0;
10377
+ if (typeof value.name === "string" && value.name.trim() !== "") return { kind: "name", value: value.name };
10378
+ if (typeof value.subagentId === "string" && value.subagentId.trim() !== "") return { kind: "id", value: value.subagentId };
10379
+ return void 0;
10380
+ }
10381
+ function observedNativeTool(toolName, callId, identity2, observation) {
10382
+ if (identity2 === void 0 || observation?.kind !== "native" || observation.toolName !== toolName || observation.callId !== callId) return void 0;
10383
+ const observedIdentity = identity2.kind === "name" ? observation.nativeName : observation.childId;
10384
+ return observedIdentity === identity2.value ? observation : void 0;
10385
+ }
10386
+
10387
+ // src/client/NativeToolView.tsx
10317
10388
  var import_jsx_runtime13 = require("react/jsx-runtime");
10389
+ function NativeToolView(props) {
10390
+ const { nativeView: NativeView, nativeT, t } = props;
10391
+ const observation = props.useRoleCalls((state2) => state2.calls.get(props.callId));
10392
+ const status = props.useRoleCalls((state2) => state2.status);
10393
+ const { expanded, toggle } = props.useDisclosure();
10394
+ const result = props.phase === "result" ? props.block : void 0;
10395
+ const identity2 = result === void 0 || result.isError || result.error != null ? void 0 : nativeActivationIdentity(result.meta);
10396
+ const actual = observedNativeTool(props.toolName, props.callId, identity2, observation);
10397
+ const settled = actual?.phase === "settled";
10398
+ const live = status === "live";
10399
+ const state = settled ? actual.stopReason === void 0 ? "accepted" : actual.stopReason === "aborted" ? "stopped" : actual.stopReason === "completed" ? "completed" : "error" : actual !== void 0 && live ? "running" : "accepted";
10400
+ const route3 = settled || live ? actual?.actualRoute : void 0;
10401
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
10402
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(NativeView, { ...props, t: nativeT }),
10403
+ identity2 !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsmm-role-tool", "data-dsmm-native-tool": props.toolName, "data-state": state, "data-identity": "native", children: [
10404
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
10405
+ import_dsh_client_ui_primitives11.DisclosureRow,
10406
+ {
10407
+ title: `${t("nativeAgent")} · ${identity2.value}`,
10408
+ titleClassName: "dsmm-role-summary",
10409
+ rowClassName: "dsmm-role-heading",
10410
+ icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives11.IconAgentPresetOutlineRegular, { size: 14, className: "dsmm-role-icon" }),
10411
+ open: expanded,
10412
+ expandable: true,
10413
+ onToggle: toggle,
10414
+ expandOnRowClick: true,
10415
+ running: state === "running",
10416
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsmm-role-body", children: [
10417
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "dsmm-role-identity", children: [
10418
+ t(identity2.kind === "name" ? "nativeName" : "nativeId"),
10419
+ ": ",
10420
+ identity2.value
10421
+ ] }),
10422
+ actual !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "dsmm-role-identity", children: [
10423
+ t("nativeId"),
10424
+ ": ",
10425
+ actual.childId,
10426
+ actual.provider === void 0 ? "" : ` · ${t("nativeProvider")}: ${actual.provider}`
10427
+ ] }),
10428
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "dsmm-role-identity", children: [
10429
+ t("actualRoute"),
10430
+ ": ",
10431
+ route3?.status === "known" ? `${route3.route.provider}/${route3.route.model} · ${route3.route.reasoningEffort ?? t("effortUnreported")}` : t("routeUnknown")
10432
+ ] }),
10433
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "dsmm-role-identity", "data-observation-status": actual === void 0 ? "unavailable" : status, children: actual === void 0 ? t("nativeCorrelationUnavailable") : t({ unavailable: "observationUnavailable", connecting: "observationConnecting", live: "observationLive", stale: "observationStale" }[status]) })
10434
+ ] })
10435
+ }
10436
+ ),
10437
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsmm-role-actions", children: [
10438
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives11.StateDot, { state: state === "error" ? "error" : state === "stopped" ? "warning" : state === "completed" ? "done" : state === "running" ? "ongoing" : "idle" }),
10439
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "dsmm-role-status", role: "status", children: t(state) })
10440
+ ] })
10441
+ ] })
10442
+ ] });
10443
+ }
10444
+ function registerNativeToolViews(ctx, observations) {
10445
+ const mounted = /* @__PURE__ */ new Map();
10446
+ const reconcile = () => {
10447
+ const entries = ctx.slots.entries("tool.call.toolview");
10448
+ for (const key of ["subagent", "subagent_fork"]) {
10449
+ const candidates = entries.filter((entry) => entry.component !== NativeToolView && entry.options.key === key);
10450
+ const source = candidates.sort((a, b) => (a.options.priority ?? 0) - (b.options.priority ?? 0))[0];
10451
+ const previous = mounted.get(key);
10452
+ if (previous?.source === source) continue;
10453
+ previous?.dispose();
10454
+ mounted.delete(key);
10455
+ if (source === void 0 || typeof source.component !== "function" || source.locale !== "conversation" || source.inject !== void 0 || source.store !== void 0 || source.children !== void 0) continue;
10456
+ const nativeView = source.component;
10457
+ const dispose = ctx.slots.register({
10458
+ name: "tool.call.toolview",
10459
+ key,
10460
+ priority: (source.options.priority ?? 0) - 1,
10461
+ locale: ROLE_TOOL_NS,
10462
+ inject: (sessionId2) => ({ hooks: { roleCalls: observations.source(sessionId2) }, nativeView, nativeT: ctx.locale.bind("conversation") })
10463
+ }, NativeToolView);
10464
+ mounted.set(key, { source, dispose });
10465
+ }
10466
+ };
10467
+ const unsubscribe = ctx.slots.subscribe("tool.call.toolview", reconcile);
10468
+ reconcile();
10469
+ return () => {
10470
+ unsubscribe();
10471
+ for (const entry of mounted.values()) entry.dispose();
10472
+ mounted.clear();
10473
+ };
10474
+ }
10475
+
10476
+ // src/client/RoleToolView.tsx
10477
+ var import_jsx_runtime14 = require("react/jsx-runtime");
10318
10478
  var styles = `
10319
10479
  .dsmm-role-tool{min-width:0;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);font-size:14px;line-height:22px}
10320
10480
  .dsmm-role-tool .dsmm-role-heading{color:var(--dsw-alias-label-primary);height:auto;min-height:32px}
@@ -10374,7 +10534,7 @@ function RoleToolView(props) {
10374
10534
  const observedStop = actual?.phase === "settled" ? actual.stopReason : void 0;
10375
10535
  const state = result?.error?.code === "interrupted" || observedStop === "aborted" ? "stopped" : failed || observedStop !== void 0 && observedStop !== "completed" ? "error" : result === void 0 ? props.phase === "preparing" ? "preparing" : "running" : actual?.delivery === "parent" && actual.phase !== "settled" ? "background" : "result";
10376
10536
  const isOngoing = state === "running" || props.phase === "preparing";
10377
- const code = (value) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives11.CodeBlock, { code: value, copyLabel: t("copy"), copiedLabel: t("copied") });
10537
+ const code = (value) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.CodeBlock, { code: value, copyLabel: t("copy"), copiedLabel: t("copied") });
10378
10538
  const [viewMode, setViewMode] = (0, import_react11.useState)("table");
10379
10539
  const controlId = `dsmm-tech-${props.callId || "call"}`;
10380
10540
  const viewOptions = [
@@ -10389,12 +10549,12 @@ function RoleToolView(props) {
10389
10549
  const initialRoute = comparison?.initialRoute ?? (actual?.route === void 0 ? void 0 : { status: "known", source: "invocation-capture", route: actual.route });
10390
10550
  const actualRoute = comparison?.liveRoute;
10391
10551
  const routeLabel = (route3, missingEffort = false) => `${route3.provider}/${route3.model}${route3.reasoningEffort === void 0 ? missingEffort ? ` · ${t("effortUnreported")}` : "" : ` · ${route3.reasoningEffort}`}`;
10392
- const collapsedContent = singleLineDesc ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
10393
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "dsmm-role-sep", "aria-hidden": "true" }),
10394
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "dsmm-role-summary", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives11.TextShimmer, { active: isOngoing, children: singleLineDesc }) })
10552
+ const collapsedContent = singleLineDesc ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
10553
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "dsmm-role-sep", "aria-hidden": "true" }),
10554
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "dsmm-role-summary", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.TextShimmer, { active: isOngoing, children: singleLineDesc }) })
10395
10555
  ] }) : void 0;
10396
10556
  const stateDotState = state === "error" ? "error" : state === "stopped" ? "warning" : result === void 0 ? "ongoing" : state === "background" ? "idle" : "done";
10397
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
10557
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
10398
10558
  "div",
10399
10559
  {
10400
10560
  className: "dsmm-role-tool",
@@ -10405,14 +10565,14 @@ function RoleToolView(props) {
10405
10565
  "data-phase": actual?.phase,
10406
10566
  "data-expanded": expanded ? "true" : "false",
10407
10567
  children: [
10408
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
10409
- import_dsh_client_ui_primitives11.DisclosureRow,
10568
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
10569
+ import_dsh_client_ui_primitives12.DisclosureRow,
10410
10570
  {
10411
10571
  title,
10412
10572
  titleClassName: "dsmm-role-title",
10413
10573
  rowClassName: "dsmm-role-heading",
10414
10574
  contentClassName: "dsmm-role-text",
10415
- icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives11.IconAgentPresetOutlineRegular, { size: 14, className: "dsmm-role-icon" }),
10575
+ icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.IconAgentPresetOutlineRegular, { size: 14, className: "dsmm-role-icon" }),
10416
10576
  collapsedContent,
10417
10577
  keepContentWhenOpen: true,
10418
10578
  running: isOngoing,
@@ -10420,93 +10580,93 @@ function RoleToolView(props) {
10420
10580
  expandable: true,
10421
10581
  onToggle: toggle,
10422
10582
  expandOnRowClick: true,
10423
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsmm-role-body", children: [
10424
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "dsmm-role-identity", children: [
10425
- showRequestedVsActual ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
10426
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "dsmm-role-dim", children: [
10583
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-role-body", children: [
10584
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "dsmm-role-identity", children: [
10585
+ showRequestedVsActual ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
10586
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsmm-role-dim", children: [
10427
10587
  t("requested"),
10428
10588
  ": "
10429
10589
  ] }),
10430
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
10590
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
10431
10591
  requested.target === void 0 ? t("unknown") : roleToolDisplay(requested.target),
10432
10592
  requested.level ? ` (${requested.level})` : ""
10433
10593
  ] }),
10434
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "dsmm-role-dim", children: " → " }),
10435
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "dsmm-role-dim", children: [
10594
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "dsmm-role-dim", children: " → " }),
10595
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsmm-role-dim", children: [
10436
10596
  t("actual"),
10437
10597
  ": "
10438
10598
  ] }),
10439
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
10599
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
10440
10600
  roleToolDisplay(actual.role),
10441
10601
  " (",
10442
10602
  actual.level,
10443
10603
  ")"
10444
10604
  ] })
10445
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { children: [
10446
- actual === void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "dsmm-role-dim", children: [
10605
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
10606
+ actual === void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsmm-role-dim", children: [
10447
10607
  t("requested"),
10448
10608
  ": "
10449
10609
  ] }),
10450
10610
  actual !== void 0 ? roleToolDisplay(actual.role) : requested.target === void 0 ? t("unknownTarget") : roleToolDisplay(requested.target),
10451
10611
  (actual?.level ?? requested.level) !== void 0 && ` · ${actual?.level ?? requested.level}`,
10452
- props.phase !== "preparing" && actual === void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "dsmm-role-dim", children: [
10612
+ props.phase !== "preparing" && actual === void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsmm-role-dim", children: [
10453
10613
  " · ",
10454
10614
  t("actualUnknown")
10455
10615
  ] })
10456
10616
  ] }),
10457
- initialRoute !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "dsmm-role-model", children: [
10617
+ initialRoute !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsmm-role-model", children: [
10458
10618
  " · ",
10459
10619
  t("initialRoute"),
10460
10620
  ": ",
10461
10621
  initialRoute.status === "known" ? routeLabel(initialRoute.route) : t("routeUnknown")
10462
10622
  ] }),
10463
- actualRoute !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "dsmm-role-model", children: [
10623
+ actualRoute !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsmm-role-model", children: [
10464
10624
  " · ",
10465
10625
  t("actualRoute"),
10466
10626
  ": ",
10467
10627
  actualRoute.status === "known" ? routeLabel(actualRoute.route, true) : t("routeUnknown")
10468
- ] }) : props.phase !== "preparing" && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "dsmm-role-model", children: [
10628
+ ] }) : props.phase !== "preparing" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "dsmm-role-model", children: [
10469
10629
  " · ",
10470
10630
  t("actualRoute"),
10471
10631
  ": ",
10472
10632
  t("routeUnknown")
10473
10633
  ] })
10474
10634
  ] }),
10475
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("p", { className: "dsmm-role-identity", "data-observation-status": observationStatus, children: [
10635
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { className: "dsmm-role-identity", "data-observation-status": observationStatus, children: [
10476
10636
  t("observation"),
10477
10637
  ": ",
10478
10638
  t({ unavailable: "observationUnavailable", connecting: "observationConnecting", live: "observationLive", stale: "observationStale" }[observationStatus]),
10479
10639
  observationIssue2 !== void 0 && ` · ${observationIssue2.kind}/${observationIssue2.code}`
10480
10640
  ] }),
10481
- requested.description !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "dsmm-role-task", children: requested.description }),
10482
- result?.error != null && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsmm-role-failure", children: [
10483
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "dsmm-role-section-title", children: t("failure") }),
10641
+ requested.description !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-role-task", children: requested.description }),
10642
+ result?.error != null && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-role-failure", children: [
10643
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-role-section-title", children: t("failure") }),
10484
10644
  code(JSON.stringify(result.error, null, 2))
10485
10645
  ] }),
10486
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("details", { className: "dsmm-role-details", children: [
10487
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("summary", { children: t("technicalDetails") }),
10488
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsmm-role-details-body", children: [
10489
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "dsmm-role-details-header", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives11.SegmentedControl, { id: controlId, value: viewMode, options: viewOptions, onChange: setViewMode, label: t("viewMode"), className: "dsmm-role-view-switch" }) }),
10490
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { id: `${controlId}-table-panel`, role: "tabpanel", "aria-labelledby": `${controlId}-table`, hidden: viewMode !== "table", tabIndex: 0, children: viewMode === "table" && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("table", { className: "dsmm-role-table", children: [
10491
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("tr", { children: [
10492
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("th", { scope: "col", children: t("property") }),
10493
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("th", { scope: "col", children: t("value") })
10646
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("details", { className: "dsmm-role-details", children: [
10647
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("summary", { children: t("technicalDetails") }),
10648
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-role-details-body", children: [
10649
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "dsmm-role-details-header", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.SegmentedControl, { id: controlId, value: viewMode, options: viewOptions, onChange: setViewMode, label: t("viewMode"), className: "dsmm-role-view-switch" }) }),
10650
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { id: `${controlId}-table-panel`, role: "tabpanel", "aria-labelledby": `${controlId}-table`, hidden: viewMode !== "table", tabIndex: 0, children: viewMode === "table" && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("table", { className: "dsmm-role-table", children: [
10651
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("tr", { children: [
10652
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("th", { scope: "col", children: t("property") }),
10653
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("th", { scope: "col", children: t("value") })
10494
10654
  ] }) }),
10495
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("tbody", { children: tableRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("tr", { children: [
10496
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("td", { className: "dsmm-role-prop-cell", children: row.property }),
10497
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("td", { className: "dsmm-role-val-cell", children: row.isComplex ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("pre", { className: "dsmm-role-cell-code", children: JSON.stringify(row.value, null, 2) }) : typeof row.value === "string" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "dsmm-role-cell-text", children: row.value }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: row.value === null ? "null" : row.value === void 0 ? "undefined" : String(row.value) }) })
10655
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("tbody", { children: tableRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("tr", { children: [
10656
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "dsmm-role-prop-cell", children: row.property }),
10657
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "dsmm-role-val-cell", children: row.isComplex ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("pre", { className: "dsmm-role-cell-code", children: JSON.stringify(row.value, null, 2) }) : typeof row.value === "string" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "dsmm-role-cell-text", children: row.value }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: row.value === null ? "null" : row.value === void 0 ? "undefined" : String(row.value) }) })
10498
10658
  ] }, row.property)) })
10499
10659
  ] }) }),
10500
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { id: `${controlId}-json-panel`, role: "tabpanel", "aria-labelledby": `${controlId}-json`, hidden: viewMode !== "json", tabIndex: 0, children: viewMode === "json" && code(JSON.stringify(jsonData2, null, 2)) })
10660
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { id: `${controlId}-json-panel`, role: "tabpanel", "aria-labelledby": `${controlId}-json`, hidden: viewMode !== "json", tabIndex: 0, children: viewMode === "json" && code(JSON.stringify(jsonData2, null, 2)) })
10501
10661
  ] })
10502
10662
  ] })
10503
10663
  ] })
10504
10664
  }
10505
10665
  ),
10506
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "dsmm-role-actions", children: [
10507
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives11.StateDot, { state: stateDotState }),
10508
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "dsmm-role-status", role: "status", children: t(state) }),
10509
- props.inspect !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_dsh_client_ui_primitives11.Button, { variant: "ghost", size: "sm", onClick: props.inspect, children: t("inspect") })
10666
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-role-actions", children: [
10667
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.StateDot, { state: stateDotState }),
10668
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-role-status", role: "status", children: t(state) }),
10669
+ props.inspect !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.Button, { variant: "ghost", size: "sm", onClick: props.inspect, children: t("inspect") })
10510
10670
  ] })
10511
10671
  ]
10512
10672
  }
@@ -10528,6 +10688,7 @@ function registerRoleToolViews(ctx, observations) {
10528
10688
  locale: ROLE_TOOL_NS,
10529
10689
  inject: (sessionId2) => ({ hooks: { roleCalls: observations.source(sessionId2) } })
10530
10690
  }, RoleToolView));
10691
+ disposers.push(registerNativeToolViews(ctx, observations));
10531
10692
  return () => {
10532
10693
  for (const dispose of disposers.reverse()) dispose();
10533
10694
  };
@@ -11048,16 +11209,16 @@ var ChildrenController = class {
11048
11209
 
11049
11210
  // src/client/ChildrenPanel.tsx
11050
11211
  var import_react12 = require("react");
11051
- var import_dsh_client_ui_primitives12 = require("@deepseek-ai/dsh-client-ui-primitives");
11052
- var import_jsx_runtime14 = require("react/jsx-runtime");
11212
+ var import_dsh_client_ui_primitives13 = require("@deepseek-ai/dsh-client-ui-primitives");
11213
+ var import_jsx_runtime15 = require("react/jsx-runtime");
11053
11214
  function ControlAvailability({ value, label, t }) {
11054
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-availability", children: [
11055
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11215
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-availability", children: [
11216
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11056
11217
  t(label),
11057
11218
  ": ",
11058
11219
  t(value?.enabled === true ? "enabled" : "disabled")
11059
11220
  ] }),
11060
- value?.enabled !== true && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-hint", children: t(`reason:${value?.reason ?? "unavailable"}`) })
11221
+ value?.enabled !== true && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t(`reason:${value?.reason ?? "unavailable"}`) })
11061
11222
  ] });
11062
11223
  }
11063
11224
  function routeText(route3) {
@@ -11066,38 +11227,38 @@ function routeText(route3) {
11066
11227
  function RouteComparisonDetails({ value, t }) {
11067
11228
  const initial = value?.initialRoute, live = value?.liveRoute;
11068
11229
  const liveReasons = { "no-own-request-header": "routeNoOwnHeader", "invalid-own-request-header": "routeInvalidOwnHeader", "not-observed": "routeNotObserved" };
11069
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-availability", children: [
11070
- value === void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-hint", children: t("comparisonUnobserved") }),
11071
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("dl", { className: "dsmm-child-meta", children: [
11072
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t("initialRoute") }),
11073
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: initial?.status === "known" ? routeText(initial.route) : t("routeUnknown") }),
11074
- initial?.status === "known" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
11075
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t("initialRouteSource") }),
11076
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("dd", { children: [
11230
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-availability", children: [
11231
+ value === void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("comparisonUnobserved") }),
11232
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dl", { className: "dsmm-child-meta", children: [
11233
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("initialRoute") }),
11234
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: initial?.status === "known" ? routeText(initial.route) : t("routeUnknown") }),
11235
+ initial?.status === "known" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
11236
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("initialRouteSource") }),
11237
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dd", { children: [
11077
11238
  t("routeCaptureSource"),
11078
11239
  " · ",
11079
11240
  initial.source
11080
11241
  ] })
11081
- ] }) : initial !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
11082
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t("initialRouteReason") }),
11083
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("dd", { children: [
11242
+ ] }) : initial !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
11243
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("initialRouteReason") }),
11244
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dd", { children: [
11084
11245
  t("routeMissingCapture"),
11085
11246
  " · ",
11086
11247
  initial.reason
11087
11248
  ] })
11088
11249
  ] }),
11089
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t("liveRoute") }),
11090
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: live?.status === "known" ? routeText(live.route) : t("routeUnknown") }),
11091
- live?.status === "known" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
11092
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t("liveRouteSource") }),
11093
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("dd", { children: [
11250
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("liveRoute") }),
11251
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: live?.status === "known" ? routeText(live.route) : t("routeUnknown") }),
11252
+ live?.status === "known" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
11253
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("liveRouteSource") }),
11254
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dd", { children: [
11094
11255
  t("routeOwnHeaderSource"),
11095
11256
  " · ",
11096
11257
  live.source
11097
11258
  ] })
11098
- ] }) : live !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
11099
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t("liveRouteReason") }),
11100
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("dd", { children: [
11259
+ ] }) : live !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
11260
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("liveRouteReason") }),
11261
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dd", { children: [
11101
11262
  t(liveReasons[live.reason]),
11102
11263
  " · ",
11103
11264
  live.reason
@@ -11107,53 +11268,53 @@ function RouteComparisonDetails({ value, t }) {
11107
11268
  ] });
11108
11269
  }
11109
11270
  function InvocationDetails({ value, t, showComparison = true }) {
11110
- if (value === void 0) return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-hint", children: t("invocationUnavailable") });
11111
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
11112
- showComparison && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RouteComparisonDetails, { value: value.routeComparison, t }),
11113
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("dl", { className: "dsmm-child-meta", children: [
11114
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t("role") }),
11115
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("dd", { children: [
11271
+ if (value === void 0) return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("invocationUnavailable") });
11272
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
11273
+ showComparison && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(RouteComparisonDetails, { value: value.routeComparison, t }),
11274
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dl", { className: "dsmm-child-meta", children: [
11275
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("role") }),
11276
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("dd", { children: [
11116
11277
  value.label,
11117
11278
  " · ",
11118
11279
  value.role
11119
11280
  ] }),
11120
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t("level") }),
11121
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: value.level }),
11122
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t("mode") }),
11123
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: value.mode }),
11124
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t("reportedRoute") }),
11125
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: value.route === void 0 ? t("routeUnreported") : routeText(value.route) }),
11126
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t("routeSource") }),
11127
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: value.routeSource }),
11128
- value.runId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
11129
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t("runId") }),
11130
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: value.runId })
11281
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("level") }),
11282
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: value.level }),
11283
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("mode") }),
11284
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: value.mode }),
11285
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("reportedRoute") }),
11286
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: value.route === void 0 ? t("routeUnreported") : routeText(value.route) }),
11287
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("routeSource") }),
11288
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: value.routeSource }),
11289
+ value.runId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
11290
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("runId") }),
11291
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: value.runId })
11131
11292
  ] }),
11132
- value.childId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
11133
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t("childId") }),
11134
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: value.childId })
11293
+ value.childId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
11294
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("childId") }),
11295
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: value.childId })
11135
11296
  ] }),
11136
- value.jobId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
11137
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dt", { children: t("jobId") }),
11138
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("dd", { children: value.jobId })
11297
+ value.jobId !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
11298
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dt", { children: t("jobId") }),
11299
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("dd", { children: value.jobId })
11139
11300
  ] })
11140
11301
  ] })
11141
11302
  ] });
11142
11303
  }
11143
11304
  function Issue2({ value, t }) {
11144
11305
  if (!value) return null;
11145
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-issue", role: "alert", children: [
11146
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: t(value.unknown ? "unknownAction" : "error", { code: value.code }) }),
11147
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11306
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-issue", role: "alert", children: [
11307
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t(value.unknown ? "unknownAction" : "error", { code: value.code }) }),
11308
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11148
11309
  value.code,
11149
11310
  value.field === void 0 ? "" : ` · ${t("field")}: ${value.field}`
11150
11311
  ] }),
11151
- value.reason !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: t(`reason:${value.reason}`) })
11312
+ value.reason !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t(`reason:${value.reason}`) })
11152
11313
  ] });
11153
11314
  }
11154
11315
  function Outcome({ value, t }) {
11155
11316
  if (!value) return null;
11156
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "dsmm-availability", role: "status", "aria-live": "polite", children: value.kind === "prompt" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: t("promptAccepted", { id: value.receipt.messageId }) }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: t("interruptAccepted") }) });
11317
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "dsmm-availability", role: "status", "aria-live": "polite", children: value.kind === "prompt" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t("promptAccepted", { id: value.receipt.messageId }) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t("interruptAccepted") }) });
11157
11318
  }
11158
11319
  function ChildComposer({ child: child2, state, actions: actions3, t }) {
11159
11320
  const prefix = (0, import_react12.useId)(), picker = (0, import_react12.useRef)(null), generation = state.generation, key = childActionKey(child2.id);
@@ -11162,14 +11323,14 @@ function ChildComposer({ child: child2, state, actions: actions3, t }) {
11162
11323
  const canPrompt = available && enabled(state.snapshot?.capabilities.prompt) && enabled(child2.controls.prompt) && !child2.readonly && child2.mode === "continuable";
11163
11324
  const canImages = canPrompt && enabled(state.snapshot?.capabilities.images) && !draft2.imageBusy;
11164
11325
  const submit = canPrompt && !draft2.uncertain && !draft2.imageBusy && (draft2.text.trim() !== "" || draft2.images.length > 0) && (draft2.images.length === 0 || enabled(state.snapshot?.capabilities.images));
11165
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("form", { className: "dsmm-child-composer", "aria-label": t("prompt"), onSubmit: (event) => {
11326
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("form", { className: "dsmm-child-composer", "aria-label": t("prompt"), onSubmit: (event) => {
11166
11327
  event.preventDefault();
11167
11328
  if (submit) void actions3.prompt(generation, child2.id);
11168
11329
  }, children: [
11169
- !state.fresh && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-hint", children: t(state.reading ? "reading" : "stale") }),
11170
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-field", children: [
11171
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: `${prefix}-message`, children: t("text") }),
11172
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
11330
+ !state.fresh && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t(state.reading ? "reading" : "stale") }),
11331
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-field", children: [
11332
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: `${prefix}-message`, children: t("text") }),
11333
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
11173
11334
  "textarea",
11174
11335
  {
11175
11336
  id: `${prefix}-message`,
@@ -11182,48 +11343,48 @@ function ChildComposer({ child: child2, state, actions: actions3, t }) {
11182
11343
  }
11183
11344
  )
11184
11345
  ] }),
11185
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-field", children: [
11186
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: `${prefix}-delivery`, children: t("delivery") }),
11187
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("select", { id: `${prefix}-delivery`, value: draft2.delivery, disabled: !canPrompt, "aria-describedby": `${prefix}-delivery-hint`, onChange: (event) => {
11346
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-field", children: [
11347
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: `${prefix}-delivery`, children: t("delivery") }),
11348
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("select", { id: `${prefix}-delivery`, value: draft2.delivery, disabled: !canPrompt, "aria-describedby": `${prefix}-delivery-hint`, onChange: (event) => {
11188
11349
  const value = event.currentTarget.value;
11189
11350
  if (value === "queue" || value === "steer") actions3.setDelivery(generation, child2.id, value);
11190
11351
  }, children: [
11191
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "queue", children: t("queue") }),
11192
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "steer", children: t("steer") })
11352
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "queue", children: t("queue") }),
11353
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "steer", children: t("steer") })
11193
11354
  ] }),
11194
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { id: `${prefix}-delivery-hint`, className: "dsmm-hint", children: t("deliveryHint") })
11355
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: `${prefix}-delivery-hint`, className: "dsmm-hint", children: t("deliveryHint") })
11195
11356
  ] }),
11196
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-field", children: [
11197
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { id: `${prefix}-images-hint`, className: "dsmm-hint", children: t("imagesHint") }),
11198
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("input", { ref: picker, hidden: true, type: "file", accept: "image/png,image/jpeg,image/webp,image/gif", multiple: true, disabled: !canImages, "aria-label": t("images"), onChange: (event) => {
11357
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-field", children: [
11358
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: `${prefix}-images-hint`, className: "dsmm-hint", children: t("imagesHint") }),
11359
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", { ref: picker, hidden: true, type: "file", accept: "image/png,image/jpeg,image/webp,image/gif", multiple: true, disabled: !canImages, "aria-label": t("images"), onChange: (event) => {
11199
11360
  const files = Array.from(event.currentTarget.files ?? []);
11200
11361
  event.currentTarget.value = "";
11201
11362
  if (canImages) void actions3.addImages(generation, child2.id, files);
11202
11363
  } }),
11203
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.Button, { type: "button", variant: "outline", disabled: !canImages, "aria-describedby": `${prefix}-images-hint`, onClick: () => {
11364
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives13.Button, { type: "button", variant: "outline", disabled: !canImages, "aria-describedby": `${prefix}-images-hint`, onClick: () => {
11204
11365
  if (canImages) picker.current?.click();
11205
11366
  }, children: t("images") }),
11206
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ControlAvailability, { value: state.snapshot?.capabilities.images, label: "imageAvailability", t }),
11207
- draft2.images.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "dsmm-profile-list", children: draft2.images.map((image, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("li", { children: [
11208
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11367
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ControlAvailability, { value: state.snapshot?.capabilities.images, label: "imageAvailability", t }),
11368
+ draft2.images.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "dsmm-profile-list", children: draft2.images.map((image, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("li", { children: [
11369
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11209
11370
  image.name ?? image.mediaType,
11210
11371
  " · ",
11211
11372
  image.mediaType
11212
11373
  ] }),
11213
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.Button, { type: "button", variant: "outline", disabled: pending || draft2.imageBusy, onClick: () => actions3.removeImage(generation, child2.id, image), "aria-label": `${t("removeImage")}: ${image.name ?? image.mediaType}`, children: t("removeImage") })
11374
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives13.Button, { type: "button", variant: "outline", disabled: pending || draft2.imageBusy, onClick: () => actions3.removeImage(generation, child2.id, image), "aria-label": `${t("removeImage")}: ${image.name ?? image.mediaType}`, children: t("removeImage") })
11214
11375
  ] }, index)) })
11215
11376
  ] }),
11216
- draft2.uncertain && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-warning", children: [
11217
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { id: `${prefix}-unknown`, children: t("unknown") }),
11218
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.Button, { type: "button", variant: "outline", disabled: !state.fresh || state.reading || pending, onClick: () => actions3.acknowledgeUnknown(generation, child2.id), children: t("acknowledge") })
11377
+ draft2.uncertain && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-warning", children: [
11378
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: `${prefix}-unknown`, children: t("unknown") }),
11379
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives13.Button, { type: "button", variant: "outline", disabled: !state.fresh || state.reading || pending, onClick: () => actions3.acknowledgeUnknown(generation, child2.id), children: t("acknowledge") })
11219
11380
  ] }),
11220
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ControlAvailability, { value: !enabled(state.snapshot?.capabilities.prompt) ? state.snapshot?.capabilities.prompt : child2.controls.prompt, label: "promptAvailability", t }),
11221
- draft2.text.trim() === "" && draft2.images.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-hint", children: t("emptyMessage") }),
11222
- draft2.images.length > 0 && !enabled(state.snapshot?.capabilities.images) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-hint", children: t("deniedImages") }),
11223
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-actions", children: [
11224
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.Button, { type: "submit", variant: "primary", disabled: !submit, children: t("send") }),
11225
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
11226
- import_dsh_client_ui_primitives12.Button,
11381
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ControlAvailability, { value: !enabled(state.snapshot?.capabilities.prompt) ? state.snapshot?.capabilities.prompt : child2.controls.prompt, label: "promptAvailability", t }),
11382
+ draft2.text.trim() === "" && draft2.images.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("emptyMessage") }),
11383
+ draft2.images.length > 0 && !enabled(state.snapshot?.capabilities.images) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("deniedImages") }),
11384
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-actions", children: [
11385
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives13.Button, { type: "submit", variant: "primary", disabled: !submit, children: t("send") }),
11386
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
11387
+ import_dsh_client_ui_primitives13.Button,
11227
11388
  {
11228
11389
  type: "button",
11229
11390
  variant: "outline",
@@ -11233,124 +11394,124 @@ function ChildComposer({ child: child2, state, actions: actions3, t }) {
11233
11394
  }
11234
11395
  )
11235
11396
  ] }),
11236
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-status", role: "status", "aria-live": "polite", children: pending ? t("pending") : draft2.imageBusy ? t("imageReading") : "" })
11397
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-status", role: "status", "aria-live": "polite", children: pending ? t("pending") : draft2.imageBusy ? t("imageReading") : "" })
11237
11398
  ] });
11238
11399
  }
11239
11400
  function ChildDetails({ child: child2, state, actions: actions3, t, inspection = false }) {
11240
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("fieldset", { children: [
11241
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("legend", { children: child2.label?.trim() ? child2.label : child2.id }),
11242
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11401
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("fieldset", { children: [
11402
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("legend", { children: child2.label?.trim() ? child2.label : child2.id }),
11403
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11243
11404
  t("childId"),
11244
11405
  ": ",
11245
11406
  child2.id
11246
11407
  ] }),
11247
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11408
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11248
11409
  t("parentId"),
11249
11410
  ": ",
11250
11411
  child2.parentSessionId
11251
11412
  ] }),
11252
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11413
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11253
11414
  t("mode"),
11254
11415
  ": ",
11255
11416
  child2.mode
11256
11417
  ] }),
11257
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11418
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11258
11419
  t("activity"),
11259
11420
  ": ",
11260
11421
  child2.activity
11261
11422
  ] }),
11262
- (inspection || child2.readonly) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: t("readonly") }),
11263
- child2.mode === "one-shot" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-hint", children: t("oneShot") }),
11264
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RouteComparisonDetails, { value: child2.routeComparison, t }),
11265
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(InvocationDetails, { value: child2.invocation, t, showComparison: false }),
11266
- (!inspection || !child2.controls.prompt.enabled) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ControlAvailability, { value: child2.controls.prompt, label: "promptAvailability", t }),
11267
- (!inspection || !child2.controls.interrupt.enabled) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ControlAvailability, { value: child2.controls.interrupt, label: "interruptAvailability", t }),
11268
- !inspection && child2.mode === "continuable" && !child2.readonly && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChildComposer, { child: child2, state, actions: actions3, t }),
11269
- !inspection && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
11270
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Issue2, { value: state.issues.get(childActionKey(child2.id)), t }),
11271
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Outcome, { value: state.outcomes.get(childActionKey(child2.id)), t })
11423
+ (inspection || child2.readonly) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t("readonly") }),
11424
+ child2.mode === "one-shot" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("oneShot") }),
11425
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(RouteComparisonDetails, { value: child2.routeComparison, t }),
11426
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InvocationDetails, { value: child2.invocation, t, showComparison: false }),
11427
+ (!inspection || !child2.controls.prompt.enabled) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ControlAvailability, { value: child2.controls.prompt, label: "promptAvailability", t }),
11428
+ (!inspection || !child2.controls.interrupt.enabled) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ControlAvailability, { value: child2.controls.interrupt, label: "interruptAvailability", t }),
11429
+ !inspection && child2.mode === "continuable" && !child2.readonly && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChildComposer, { child: child2, state, actions: actions3, t }),
11430
+ !inspection && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
11431
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Issue2, { value: state.issues.get(childActionKey(child2.id)), t }),
11432
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Outcome, { value: state.outcomes.get(childActionKey(child2.id)), t })
11272
11433
  ] })
11273
11434
  ] });
11274
11435
  }
11275
11436
  function ChildrenPanel(props) {
11276
11437
  const state = props.useChildren((snapshot4) => snapshot4), { t } = props, generation = state.generation;
11277
- if (props.sessionId === void 0 || props.sessionId !== state.sessionId) return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "dsmm-profiles dsmm-children", children: [
11278
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h2", { children: t("title") }),
11279
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: t(state.sessionId === null ? "noSession" : "foreign") })
11438
+ if (props.sessionId === void 0 || props.sessionId !== state.sessionId) return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "dsmm-profiles dsmm-children", children: [
11439
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h2", { children: t("title") }),
11440
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t(state.sessionId === null ? "noSession" : "foreign") })
11280
11441
  ] });
11281
11442
  const data = state.snapshot;
11282
11443
  const refreshingDisabled = state.reading || state.pending.size > 0 || [...state.drafts.values()].some((draft2) => draft2.imageBusy);
11283
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "dsmm-profiles dsmm-children", "aria-label": t("title"), "aria-busy": state.reading, children: [
11284
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h2", { children: t("title") }),
11285
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-hint", children: t("description") }),
11286
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11444
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "dsmm-profiles dsmm-children", "aria-label": t("title"), "aria-busy": state.reading, children: [
11445
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h2", { children: t("title") }),
11446
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("description") }),
11447
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11287
11448
  t("session"),
11288
11449
  ": ",
11289
11450
  state.sessionId
11290
11451
  ] }),
11291
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "dsmm-actions", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_dsh_client_ui_primitives12.Button, { type: "button", variant: "outline", disabled: refreshingDisabled, onClick: () => void props.refresh(generation), children: t("refresh") }) }),
11292
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-status", role: "status", "aria-live": "polite", children: state.reading ? t("reading") : state.pending.size > 0 ? t("pending") : !state.fresh ? t(data === null ? "unavailable" : "stale") : "" }),
11293
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Issue2, { value: state.issue, t }),
11294
- data !== null && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
11295
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11452
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "dsmm-actions", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_dsh_client_ui_primitives13.Button, { type: "button", variant: "outline", disabled: refreshingDisabled, onClick: () => void props.refresh(generation), children: t("refresh") }) }),
11453
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-status", role: "status", "aria-live": "polite", children: state.reading ? t("reading") : state.pending.size > 0 ? t("pending") : !state.fresh ? t(data === null ? "unavailable" : "stale") : "" }),
11454
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Issue2, { value: state.issue, t }),
11455
+ data !== null && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
11456
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11296
11457
  t("epoch"),
11297
11458
  ": ",
11298
11459
  data.admissionEpoch
11299
11460
  ] }),
11300
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "dsmm-availability", children: [
11301
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11461
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "dsmm-availability", children: [
11462
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11302
11463
  t("runtime"),
11303
11464
  ": ",
11304
11465
  data.capabilities.runtime.binding
11305
11466
  ] }),
11306
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11467
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11307
11468
  t("fence"),
11308
11469
  ": ",
11309
11470
  t(data.capabilities.runtime.deliveryFenceReady ? "yes" : "no")
11310
11471
  ] }),
11311
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11472
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11312
11473
  t("restart"),
11313
11474
  ": ",
11314
11475
  t(data.capabilities.runtime.restartRequired ? "yes" : "no")
11315
11476
  ] }),
11316
- data.capabilities.runtime.reason !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: t("authority") }),
11317
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ControlAvailability, { value: data.capabilities.prompt, label: "promptAvailability", t }),
11318
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ControlAvailability, { value: data.capabilities.interrupt, label: "interruptAvailability", t })
11477
+ data.capabilities.runtime.reason !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t("authority") }),
11478
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ControlAvailability, { value: data.capabilities.prompt, label: "promptAvailability", t }),
11479
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ControlAvailability, { value: data.capabilities.interrupt, label: "interruptAvailability", t })
11319
11480
  ] }),
11320
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-hint", children: t("backgroundHint") }),
11321
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "dsmm-zone", "aria-label": t("children"), children: [
11322
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { children: t("children") }),
11323
- data.children.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-hint", children: t("emptyChildren") }) : data.children.map((child2) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChildDetails, { child: child2, state, actions: props, t }, child2.id))
11481
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("backgroundHint") }),
11482
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "dsmm-zone", "aria-label": t("children"), children: [
11483
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { children: t("children") }),
11484
+ data.children.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("emptyChildren") }) : data.children.map((child2) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChildDetails, { child: child2, state, actions: props, t }, child2.id))
11324
11485
  ] })
11325
11486
  ] }),
11326
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", { className: "dsmm-zone", "aria-label": t("descendants"), children: [
11327
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { children: t("descendants") }),
11328
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Issue2, { value: state.descendantIssue, t }),
11329
- state.descendants === null ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-hint", children: t("treeUnavailable") }) : state.descendants.descendants.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "dsmm-hint", children: t("emptyDescendants") }) : state.descendants.descendants.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-availability", children: [
11330
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11487
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "dsmm-zone", "aria-label": t("descendants"), children: [
11488
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { children: t("descendants") }),
11489
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Issue2, { value: state.descendantIssue, t }),
11490
+ state.descendants === null ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("treeUnavailable") }) : state.descendants.descendants.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "dsmm-hint", children: t("emptyDescendants") }) : state.descendants.descendants.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-availability", children: [
11491
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11331
11492
  t("depth"),
11332
11493
  ": ",
11333
11494
  entry.depth
11334
11495
  ] }),
11335
- entry.kind === "diagnostic" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "dsmm-issue", children: [
11336
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: t("diagnostic", { reason: entry.reason }) }),
11337
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11496
+ entry.kind === "diagnostic" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "dsmm-issue", children: [
11497
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { children: t("diagnostic", { reason: entry.reason }) }),
11498
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11338
11499
  t("childId"),
11339
11500
  ": ",
11340
11501
  entry.id
11341
11502
  ] }),
11342
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11503
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11343
11504
  t("parentId"),
11344
11505
  ": ",
11345
11506
  entry.parentSessionId
11346
11507
  ] })
11347
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
11348
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("p", { children: [
11508
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
11509
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("p", { children: [
11349
11510
  t("subtree"),
11350
11511
  ": ",
11351
11512
  t(entry.hasChildren ? "yes" : "no")
11352
11513
  ] }),
11353
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChildDetails, { child: entry.child, state, actions: props, t, inspection: true })
11514
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChildDetails, { child: entry.child, state, actions: props, t, inspection: true })
11354
11515
  ] })
11355
11516
  ] }, index))
11356
11517
  ] })