@tangle-network/agent-app 0.46.9 → 0.46.11
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.
- package/dist/chat-routes/index.js +1 -1
- package/dist/{chunk-MA2RIIIH.js → chunk-3HBH5GFN.js} +33 -18
- package/dist/chunk-3HBH5GFN.js.map +1 -0
- package/dist/sandbox/index.d.ts +69 -2
- package/dist/sandbox/index.js +7 -1
- package/dist/studio-react/index.js +25 -38
- package/dist/studio-react/index.js.map +1 -1
- package/dist/studio-react/studio-generation-screen.d.ts +1 -2
- package/dist/studio-react/studio.css +6 -0
- package/package.json +1 -1
- package/dist/chunk-MA2RIIIH.js.map +0 -1
package/dist/sandbox/index.d.ts
CHANGED
|
@@ -340,9 +340,76 @@ export declare function sandboxToolPath(options: SandboxToolPathOptions & {
|
|
|
340
340
|
}): string;
|
|
341
341
|
/** Build file mounts for sandbox tools based on provided options and tool configurations */
|
|
342
342
|
export declare function buildSandboxToolFileMounts(options: BuildSandboxToolFileMountsOptions): AgentProfileFileMount[];
|
|
343
|
-
/**
|
|
343
|
+
/**
|
|
344
|
+
* Build the `SANDBOX_TOOL_BIN_DIRS` entry that puts these apps' tool bin dirs on
|
|
345
|
+
* a sandbox PATH. Declare it in the same box env as the mounts from
|
|
346
|
+
* {@link buildSandboxToolFileMounts}: the mounts place the executables, this
|
|
347
|
+
* places the directory that makes a bare tool name resolve.
|
|
348
|
+
*
|
|
349
|
+
* Every sandbox PATH builder appends these directories at the TAIL, after the
|
|
350
|
+
* Nix, npm, and image entries, so a tool never shadows a platform or system
|
|
351
|
+
* binary of the same name. That placement is identical for a non-interactive
|
|
352
|
+
* exec, a sidecar-spawned CLI, and an SSH shell, which is why this variable and
|
|
353
|
+
* not a shell rc file is the mechanism: an exec reads no rc file, and the SSH
|
|
354
|
+
* shell environment assigns PATH absolutely.
|
|
355
|
+
*
|
|
356
|
+
* Entries come from {@link sandboxToolBinDir}, so the value can never name a
|
|
357
|
+
* directory the mounts did not use — a caller that hand-writes the literal
|
|
358
|
+
* instead drifts silently the moment a base dir changes. Order is preserved,
|
|
359
|
+
* and two apps that resolve to one directory collapse to the FIRST position it
|
|
360
|
+
* appeared in.
|
|
361
|
+
*
|
|
362
|
+
* A `:` in a resolved bin dir throws here. The character separates entries both
|
|
363
|
+
* in this variable and in PATH itself, so such a directory is unrepresentable
|
|
364
|
+
* rather than merely awkward: joining it would split one absolute path into a
|
|
365
|
+
* leading path and a relative remainder, and the runtime rejects a relative
|
|
366
|
+
* segment by failing the whole box. Throwing names the offending directory
|
|
367
|
+
* instead.
|
|
368
|
+
*
|
|
369
|
+
* The consuming half lives in agent-dev-container: `resolveSandboxToolBinDirs`
|
|
370
|
+
* parses this value and every PATH builder appends it at the tail — sidecar
|
|
371
|
+
* exec and PTY through `packages/shared/src/cache-env.ts`, an SSH session
|
|
372
|
+
* through `packages/shared/src/ssh-bootstrap.ts`, and a spawned CLI through
|
|
373
|
+
* `packages/sdk-cli-runner/src/cli-process.ts`, each with its own tests. This
|
|
374
|
+
* package has no sandbox runtime, so tail placement is pinned there, not here.
|
|
375
|
+
*/
|
|
376
|
+
export declare function buildSandboxToolBinDirsEnv(apps: readonly SandboxToolPathOptions[]): {
|
|
377
|
+
SANDBOX_TOOL_BIN_DIRS: string;
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* Build a shell script that creates the sandbox tool binary directory.
|
|
381
|
+
* {@link buildSandboxToolBinDirsEnv}, not this script, puts that directory on a
|
|
382
|
+
* sandbox PATH.
|
|
383
|
+
*
|
|
384
|
+
* The `mkdir -p` makes the directory exist before a tool mount lands in it.
|
|
385
|
+
*/
|
|
386
|
+
export declare function buildSandboxToolBinDirScript(options: SandboxToolPathOptions): string;
|
|
387
|
+
/** Build a shell script that creates the sandbox tool binary directory.
|
|
388
|
+
*
|
|
389
|
+
* @deprecated Renamed to {@link buildSandboxToolBinDirScript}, and the script
|
|
390
|
+
* no longer appends the bin dir to PATH in `~/.profile`, `~/.bashrc` and
|
|
391
|
+
* `~/.zshrc`. Those edits never reached the contexts that run a tool: an exec
|
|
392
|
+
* and a spawned CLI read no rc file, and the SSH shell assigns PATH
|
|
393
|
+
* absolutely, which discards an appended entry. Put the directory on PATH with
|
|
394
|
+
* {@link buildSandboxToolBinDirsEnv} instead. This name forwards to the new
|
|
395
|
+
* one so an existing import keeps resolving; removal is a major.
|
|
396
|
+
*/
|
|
344
397
|
export declare function buildSandboxToolPathSetupScript(options: SandboxToolPathOptions): string;
|
|
345
|
-
/**
|
|
398
|
+
/**
|
|
399
|
+
* Create the sandbox tool binary directory in a running box.
|
|
400
|
+
* {@link buildSandboxToolBinDirsEnv}, not this call, puts it on a sandbox PATH.
|
|
401
|
+
*/
|
|
402
|
+
export declare function ensureSandboxToolBinDir(box: SandboxInstance, options: SandboxToolPathOptions): Promise<Outcome<void>>;
|
|
403
|
+
/** Create the sandbox tool binary directory in a running box.
|
|
404
|
+
*
|
|
405
|
+
* @deprecated Renamed to {@link ensureSandboxToolBinDir}, and the call no
|
|
406
|
+
* longer appends the bin dir to PATH in `~/.profile`, `~/.bashrc` and
|
|
407
|
+
* `~/.zshrc`. Those edits never reached the contexts that run a tool: an exec
|
|
408
|
+
* and a spawned CLI read no rc file, and the SSH shell assigns PATH
|
|
409
|
+
* absolutely, which discards an appended entry. Put the directory on PATH with
|
|
410
|
+
* {@link buildSandboxToolBinDirsEnv} instead. This name forwards to the new
|
|
411
|
+
* one so an existing import keeps resolving; removal is a major.
|
|
412
|
+
*/
|
|
346
413
|
export declare function runSandboxToolPathSetup(box: SandboxInstance, options: SandboxToolPathOptions): Promise<Outcome<void>>;
|
|
347
414
|
/** Split profile files into inline deferred files and a lean profile without them */
|
|
348
415
|
export declare function splitDeferredProfileFiles(profile: AgentProfile): {
|
package/dist/sandbox/index.js
CHANGED
|
@@ -28,6 +28,8 @@ import {
|
|
|
28
28
|
attachReasoningEffort,
|
|
29
29
|
buildAppToolMcpServers,
|
|
30
30
|
buildProductEgressPolicy,
|
|
31
|
+
buildSandboxToolBinDirScript,
|
|
32
|
+
buildSandboxToolBinDirsEnv,
|
|
31
33
|
buildSandboxToolFileMounts,
|
|
32
34
|
buildSandboxToolPathSetupScript,
|
|
33
35
|
classifySeveredStream,
|
|
@@ -41,6 +43,7 @@ import {
|
|
|
41
43
|
deleteSecret,
|
|
42
44
|
detectInteractiveQuestion,
|
|
43
45
|
driveSandboxTurn,
|
|
46
|
+
ensureSandboxToolBinDir,
|
|
44
47
|
ensureWorkspaceSandbox,
|
|
45
48
|
flattenHistory,
|
|
46
49
|
formatSandboxProvisioningSupportDetails,
|
|
@@ -88,7 +91,7 @@ import {
|
|
|
88
91
|
workspaceSandboxRecoveryMessage,
|
|
89
92
|
workspaceSandboxRecoveryRecommendedActions,
|
|
90
93
|
writeProfileFilesToBox
|
|
91
|
-
} from "../chunk-
|
|
94
|
+
} from "../chunk-3HBH5GFN.js";
|
|
92
95
|
import "../chunk-TH7L265V.js";
|
|
93
96
|
import "../chunk-LWSJK546.js";
|
|
94
97
|
import "../chunk-P5PIAQVS.js";
|
|
@@ -127,6 +130,8 @@ export {
|
|
|
127
130
|
attachReasoningEffort,
|
|
128
131
|
buildAppToolMcpServers,
|
|
129
132
|
buildProductEgressPolicy,
|
|
133
|
+
buildSandboxToolBinDirScript,
|
|
134
|
+
buildSandboxToolBinDirsEnv,
|
|
130
135
|
buildSandboxToolFileMounts,
|
|
131
136
|
buildSandboxToolPathSetupScript,
|
|
132
137
|
classifySeveredStream,
|
|
@@ -140,6 +145,7 @@ export {
|
|
|
140
145
|
deleteSecret,
|
|
141
146
|
detectInteractiveQuestion,
|
|
142
147
|
driveSandboxTurn,
|
|
148
|
+
ensureSandboxToolBinDir,
|
|
143
149
|
ensureWorkspaceSandbox,
|
|
144
150
|
flattenHistory,
|
|
145
151
|
formatSandboxProvisioningSupportDetails,
|
|
@@ -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-
|
|
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-[
|
|
2522
|
-
/* @__PURE__ */ jsx10("h1", { className: "mb-
|
|
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-
|
|
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-
|
|
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 {
|
|
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 :
|
|
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__ */
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
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
|
|
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(
|
|
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: [
|