@tangle-network/agent-app 0.46.10 → 0.46.12

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.
@@ -516,12 +516,18 @@ export declare function assertProvisionPayloadWithinCap(payload: ProvisionPayloa
516
516
  * every exec inside it dies on the oversized entry.
517
517
  */
518
518
  export declare function assertEnvWithinLimits(env: Record<string, string>): void;
519
- /** What a peek can find. `not-running` carries the platform's own state string
520
- * (`stopped`, `starting`, `failed`, …) — narrowing it to a union here would
521
- * drop states the platform adds later, and every caller wants it for a log. */
519
+ /** What a peek can find. `warming` means the control plane is running while
520
+ * the filesystem incarnation is still transitioning. `not-running` carries
521
+ * the platform's own state string (`stopped`, `starting`, `failed`, …) —
522
+ * narrowing it to a union here would drop states the platform adds later,
523
+ * and every caller wants it for a log. */
522
524
  export type PeekWorkspaceSandboxOutcome = {
523
525
  status: 'running';
524
526
  box: SandboxInstance;
527
+ } | {
528
+ status: 'warming';
529
+ readiness: 'transitioning';
530
+ box: SandboxInstance;
525
531
  } | {
526
532
  status: 'not-running';
527
533
  state: string;
@@ -531,8 +537,8 @@ export type PeekWorkspaceSandboxOutcome = {
531
537
  };
532
538
  /**
533
539
  * Read-only twin of {@link ensureWorkspaceSandbox}: report whether a
534
- * workspace's box exists and is running, WITHOUT provisioning, resuming, or
535
- * bootstrapping anything.
540
+ * workspace's box exists and is fully ready, WITHOUT provisioning, resuming,
541
+ * or bootstrapping anything.
536
542
  *
537
543
  * This is what a read-mostly path needs — a file-index route's `authorize`
538
544
  * seam, a stale-lock reconciliation, a status badge. Calling `ensure` from one
@@ -91,7 +91,7 @@ import {
91
91
  workspaceSandboxRecoveryMessage,
92
92
  workspaceSandboxRecoveryRecommendedActions,
93
93
  writeProfileFilesToBox
94
- } from "../chunk-3HBH5GFN.js";
94
+ } from "../chunk-CCIQXW6N.js";
95
95
  import "../chunk-TH7L265V.js";
96
96
  import "../chunk-LWSJK546.js";
97
97
  import "../chunk-P5PIAQVS.js";
@@ -913,14 +913,14 @@ function StudioComposer({
913
913
  });
914
914
  persistedOptionsRef.current = optionsByModel;
915
915
  }, [catalog, hydratedWorkspaceId, modelId, optionValues, options, selectedModels, type, workspaceId]);
916
+ const laneDown = Boolean(catalog) && !catalogLoading && !catalogError && laneUnavailable(curatedModels);
916
917
  const values = optionValues[type];
917
- const params = visibleParams(type, options);
918
+ const params = laneDown ? [] : visibleParams(type, options);
918
919
  const audioMeta = type === "video" ? options?.audio : void 0;
919
- const audioSupported = Boolean(audioMeta) && audioMeta?.supported !== false;
920
+ const audioSupported = !laneDown && Boolean(audioMeta) && audioMeta?.supported !== false;
920
921
  const unlistedSibling = !modelOption && Boolean(textToVideoSibling(modelId));
921
- const referenceSupported = type === "video" && Boolean(imageToVideoSibling(modelId) ?? textToVideoSibling(modelId));
922
+ const referenceSupported = !laneDown && type === "video" && Boolean(imageToVideoSibling(modelId) ?? textToVideoSibling(modelId));
922
923
  const modelReady = (Boolean(modelOption) || unlistedSibling) && modelOption?.status !== "unavailable" && !catalogLoading && !catalogError;
923
- const laneDown = Boolean(catalog) && !catalogLoading && !catalogError && laneUnavailable(curatedModels);
924
924
  const canSubmit = Boolean(workspaceId) && modelReady && Boolean(prompt.trim()) && !isSubmitting;
925
925
  function selectModel(id) {
926
926
  setSelectedModels((current) => ({ ...current, [type]: id }));
@@ -1028,7 +1028,7 @@ function StudioComposer({
1028
1028
  "section",
1029
1029
  {
1030
1030
  "data-variant": variant,
1031
- className: `rounded-[14px] border border-border bg-card px-2.5 pb-[9px] pt-2 shadow-sm transition focus-within:border-primary focus-within:ring-[3px] focus-within:ring-ring/30 ${className ?? ""}`,
1031
+ className: `studio-composer-card rounded-2xl border border-border bg-surface-container-high p-2.5 shadow-sm transition focus-within:border-primary/60 ${className ?? ""}`,
1032
1032
  children: [
1033
1033
  laneDown ? /* @__PURE__ */ jsxs2("p", { className: "flex min-h-0 items-center gap-2 px-1.5 pb-3 pt-1.5 text-[13px] font-medium text-warning", children: [
1034
1034
  /* @__PURE__ */ jsx2(TriangleAlert2, { "aria-hidden": true, className: "h-4 w-4 shrink-0", strokeWidth: 2 }),
@@ -1056,10 +1056,10 @@ function StudioComposer({
1056
1056
  ModelPill,
1057
1057
  {
1058
1058
  models: curatedModels,
1059
- value: modelId,
1060
- displayName: modelOption?.name || modelId || "Select a model",
1061
- provider: modelOption?.provider,
1062
- unavailable: modelOption?.status === "unavailable",
1059
+ value: laneDown ? "" : modelId,
1060
+ displayName: laneDown ? "Unavailable" : modelOption?.name || modelId || "Select a model",
1061
+ provider: laneDown ? void 0 : modelOption?.provider,
1062
+ unavailable: laneDown || modelOption?.status === "unavailable",
1063
1063
  onSelect: chooseModel,
1064
1064
  bandRef
1065
1065
  }
@@ -2518,8 +2518,8 @@ function StudioHomeScreen({
2518
2518
  deferredDelete.request(targets);
2519
2519
  }
2520
2520
  return /* @__PURE__ */ jsxs9("main", { className, children: [
2521
- /* @__PURE__ */ jsxs9("div", { className: "studio-home-top mx-auto w-full max-w-[820px] px-6 pt-[clamp(24px,12vh,124px)] max-[900px]:px-4", children: [
2522
- /* @__PURE__ */ jsx10("h1", { className: "mb-5 text-center text-[30px] font-semibold leading-[1.2] tracking-[-0.02em] [text-wrap:balance] max-[640px]:text-[25px]", children: "What do you want to create?" }),
2521
+ /* @__PURE__ */ jsxs9("div", { className: "studio-home-top mx-auto w-full max-w-[868px] px-6 pt-[clamp(24px,22vh,220px)] max-[900px]:px-4", children: [
2522
+ /* @__PURE__ */ jsx10("h1", { className: "mb-11 text-center text-[1.75rem] font-medium tracking-tight text-foreground [text-wrap:balance] max-[640px]:text-[1.5rem]", children: "What do you want to create?" }),
2523
2523
  /* @__PURE__ */ jsx10(
2524
2524
  StudioComposer,
2525
2525
  {
@@ -2532,13 +2532,13 @@ function StudioHomeScreen({
2532
2532
  ] }),
2533
2533
  /* @__PURE__ */ jsxs9("section", { className: "studio-home-recent pb-[72px]", children: [
2534
2534
  /* @__PURE__ */ jsxs9("div", { className: "mb-3 mt-[34px] flex items-center justify-between gap-3 px-6 max-[900px]:px-4", children: [
2535
- /* @__PURE__ */ jsx10("h2", { className: "text-[13px] font-medium tracking-[0.02em] text-muted-foreground", children: "Recent media" }),
2535
+ /* @__PURE__ */ jsx10("h2", { className: "text-[13px] font-normal tracking-[0.02em] text-muted-foreground", children: "Recent media" }),
2536
2536
  /* @__PURE__ */ jsx10(
2537
2537
  "button",
2538
2538
  {
2539
2539
  type: "button",
2540
2540
  onClick: onOpenHistory,
2541
- className: "h-[30px] whitespace-nowrap rounded-full border border-border bg-card px-3 text-[13px] shadow-sm hover:bg-accent",
2541
+ className: "h-[30px] whitespace-nowrap rounded-md px-1 text-[13px] font-medium text-primary transition hover:text-primary/80",
2542
2542
  children: "View history"
2543
2543
  }
2544
2544
  )
@@ -2582,7 +2582,7 @@ function StudioHomeScreen({
2582
2582
  }
2583
2583
 
2584
2584
  // src/studio-react/studio-generation-screen.tsx
2585
- import { ArrowLeft, CircleAlert } from "lucide-react";
2585
+ import { CircleAlert } from "lucide-react";
2586
2586
  import {
2587
2587
  useCallback as useCallback9,
2588
2588
  useEffect as useEffect12,
@@ -2603,7 +2603,6 @@ function StudioGenerationScreen({
2603
2603
  batchKey,
2604
2604
  onGenerated,
2605
2605
  onOpenGeneration,
2606
- onBack,
2607
2606
  workspaceId,
2608
2607
  pickReferenceImage,
2609
2608
  actions,
@@ -2631,7 +2630,7 @@ function StudioGenerationScreen({
2631
2630
  const settledOrder = /* @__PURE__ */ new Map();
2632
2631
  for (const row of rows) if (!isRunning(row)) settledOrder.set(row.id, settledOrder.size);
2633
2632
  const columns = rows.length === 4 ? 2 : Math.min(rows.length, 4) || 1;
2634
- const maxWidth = rows.length > 1 || first?.type === "speech" ? 820 : ratio < 1 ? 380 : 640;
2633
+ const maxWidth = rows.length > 1 || first?.type === "speech" ? 820 : first?.type !== "image" ? 640 : ratio < 1 ? 380 : 408;
2635
2634
  const viewerGeneration = viewerId ? rows.find((row) => row.id === viewerId) ?? null : null;
2636
2635
  const onSaved = useCallback9((results) => {
2637
2636
  const saved = results[0];
@@ -2670,26 +2669,14 @@ function StudioGenerationScreen({
2670
2669
  setDeleteTarget(null);
2671
2670
  }
2672
2671
  return /* @__PURE__ */ jsxs10("div", { ref: rootRef, className: `flex min-h-full flex-col ${className ?? ""}`, children: [
2673
- /* @__PURE__ */ jsxs10("header", { className: "studio-gen-head mx-auto flex w-full max-w-[868px] items-center gap-2.5 px-6 pb-4 pt-1 max-[900px]:px-4", children: [
2674
- /* @__PURE__ */ jsx11(
2675
- "button",
2676
- {
2677
- type: "button",
2678
- "aria-label": "Back to Studio",
2679
- onClick: onBack,
2680
- className: "grid h-8 w-8 flex-none place-items-center rounded-full border border-border bg-card shadow-sm hover:bg-accent",
2681
- children: /* @__PURE__ */ jsx11(ArrowLeft, { size: 16, strokeWidth: 1.5 })
2682
- }
2683
- ),
2684
- /* @__PURE__ */ jsx11(
2685
- "p",
2686
- {
2687
- title: prompt,
2688
- className: "min-w-0 max-w-full truncate rounded-full border border-border bg-card px-4 py-2 text-[14px] shadow-sm",
2689
- children: prompt
2690
- }
2691
- )
2692
- ] }),
2672
+ /* @__PURE__ */ jsx11("header", { className: "studio-gen-head mx-auto flex w-full max-w-[868px] justify-end px-6 pb-4 pt-1 max-[900px]:px-4", children: /* @__PURE__ */ jsx11(
2673
+ "p",
2674
+ {
2675
+ title: prompt,
2676
+ className: "min-w-0 max-w-full truncate rounded-full border border-border bg-card px-4 py-2 text-[14px] shadow-sm",
2677
+ children: prompt
2678
+ }
2679
+ ) }),
2693
2680
  /* @__PURE__ */ jsx11(
2694
2681
  "div",
2695
2682
  {
@@ -2808,7 +2795,7 @@ import {
2808
2795
  useState as useState13
2809
2796
  } from "react";
2810
2797
  import {
2811
- ArrowLeft as ArrowLeft2,
2798
+ ArrowLeft,
2812
2799
  AudioLines as AudioLines2,
2813
2800
  Download as Download3,
2814
2801
  FolderPlus as FolderPlus3,
@@ -3192,7 +3179,7 @@ function StudioHistoryScreen({
3192
3179
  "aria-label": "Back to Studio",
3193
3180
  onClick: onBack,
3194
3181
  className: "grid h-8 w-8 flex-none place-items-center rounded-full border border-border bg-card shadow-sm hover:bg-accent",
3195
- children: /* @__PURE__ */ jsx12(ArrowLeft2, { size: 16, strokeWidth: 1.5 })
3182
+ children: /* @__PURE__ */ jsx12(ArrowLeft, { size: 16, strokeWidth: 1.5 })
3196
3183
  }
3197
3184
  ),
3198
3185
  /* @__PURE__ */ jsxs11("div", { className: "ml-auto flex flex-wrap items-center gap-2 max-[640px]:w-full", children: [