@tangle-network/agent-app 0.63.27 → 0.63.29
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/{DesignCanvas-CFNV5JGQ.js → DesignCanvas-3DGZQOD7.js} +2 -2
- package/dist/{DesignCanvasEditor-KH4BDUE3.js → DesignCanvasEditor-OG4QY5WJ.js} +2 -2
- package/dist/{TimelineEditor-VB2UJ34D.js → TimelineEditor-MUY35ULL.js} +3 -3
- package/dist/app-auth/index.js +4 -4
- package/dist/assistant/index.js +9 -9
- package/dist/chat-react/index.js +3 -3
- package/dist/chat-routes/index.js +2 -2
- package/dist/chunk-53ZX7XZY.js +371 -0
- package/dist/chunk-53ZX7XZY.js.map +1 -0
- package/dist/{chunk-IVBREL7A.js → chunk-5HBIN366.js} +10 -10
- package/dist/{chunk-BQGJ5IDP.js → chunk-6UMIOEDR.js} +1046 -885
- package/dist/chunk-6UMIOEDR.js.map +1 -0
- package/dist/{chunk-ZNE4NYU7.js → chunk-DPTNKH22.js} +121 -2
- package/dist/chunk-DPTNKH22.js.map +1 -0
- package/dist/{chunk-Y3GO6SG3.js → chunk-F6J5J4H6.js} +22 -3
- package/dist/chunk-F6J5J4H6.js.map +1 -0
- package/dist/chunk-N425HGJW.js +261 -0
- package/dist/chunk-N425HGJW.js.map +1 -0
- package/dist/{chunk-ZZTPTCMY.js → chunk-XJXAULNI.js} +7 -7
- package/dist/{chunk-WTNW4NFS.js → chunk-ZD2AUFIT.js} +3 -3
- package/dist/conformance/cli.d.ts +2 -0
- package/dist/conformance/cli.js +67 -0
- package/dist/conformance/cli.js.map +1 -0
- package/dist/conformance/index.d.ts +3 -0
- package/dist/conformance/index.js +9 -0
- package/dist/conformance/index.js.map +1 -0
- package/dist/conformance/revision.d.ts +13 -0
- package/dist/conformance/run.d.ts +48 -0
- package/dist/conformance/session.d.ts +24 -0
- package/dist/conformance/turns.d.ts +37 -0
- package/dist/design-canvas/index.js +7 -7
- package/dist/design-canvas-react/engine.js +1 -1
- package/dist/design-canvas-react/index.js +5 -5
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/operator/index.js +24 -252
- package/dist/operator/index.js.map +1 -1
- package/dist/platform/index.js +9 -9
- package/dist/public-consultation/index.d.ts +2 -2
- package/dist/public-consultation/index.js +2 -2
- package/dist/sequences/index.js +1 -1
- package/dist/sequences-react/index.js +3 -3
- package/dist/settings-react/index.js +1 -1
- package/dist/teams/invitations-api.js +1 -1
- package/dist/teams/members-api.d.ts +16 -1
- package/dist/teams/members-api.js +1 -1
- package/dist/teams-react/components/InviteTokenPage.d.ts +24 -0
- package/dist/teams-react/components/index.d.ts +1 -0
- package/dist/teams-react/index.js +40 -0
- package/dist/teams-react/index.js.map +1 -1
- package/dist/web/chat-stream-error.d.ts +63 -0
- package/dist/web/index.d.ts +1 -0
- package/dist/web/index.js +11 -1
- package/dist/web-react/durable-plan-flow-card.d.ts +25 -0
- package/dist/web-react/index.d.ts +3 -0
- package/dist/web-react/index.js +34 -28
- package/dist/web-react/sandbox-terminal-panel.d.ts +27 -0
- package/dist/web-react/terminal.d.ts +1 -0
- package/dist/web-react/terminal.js +109 -0
- package/dist/web-react/terminal.js.map +1 -1
- package/dist/web-react/use-models.d.ts +24 -0
- package/dist/web-react/use-plan-mode-selection.d.ts +17 -0
- package/dist/workspace-react/index.js +5 -5
- package/package.json +8 -2
- package/dist/chunk-BQGJ5IDP.js.map +0 -1
- package/dist/chunk-Y3GO6SG3.js.map +0 -1
- package/dist/chunk-ZNE4NYU7.js.map +0 -1
- /package/dist/{DesignCanvas-CFNV5JGQ.js.map → DesignCanvas-3DGZQOD7.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-KH4BDUE3.js.map → DesignCanvasEditor-OG4QY5WJ.js.map} +0 -0
- /package/dist/{TimelineEditor-VB2UJ34D.js.map → TimelineEditor-MUY35ULL.js.map} +0 -0
- /package/dist/{chunk-IVBREL7A.js.map → chunk-5HBIN366.js.map} +0 -0
- /package/dist/{chunk-ZZTPTCMY.js.map → chunk-XJXAULNI.js.map} +0 -0
- /package/dist/{chunk-WTNW4NFS.js.map → chunk-ZD2AUFIT.js.map} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** Props for the shared sandbox terminal panel. */
|
|
3
|
+
export interface SandboxTerminalPanelProps {
|
|
4
|
+
/** Workspace whose sandbox the shell attaches to. */
|
|
5
|
+
workspaceId: string;
|
|
6
|
+
/** True while the panel is visible; the terminal refits and focuses on becoming visible. */
|
|
7
|
+
isActive?: boolean;
|
|
8
|
+
/** Per-tab connection id key prefix; the stored key is `${connectionKey}:${workspaceId}`.
|
|
9
|
+
* Give a second terminal on the same page its own key. */
|
|
10
|
+
connectionKey?: string;
|
|
11
|
+
autoConnect?: boolean;
|
|
12
|
+
/** Title the terminal view shows for the session, e.g. "GTM Workspace". */
|
|
13
|
+
sessionTitle: string;
|
|
14
|
+
/** One line under the heading before the terminal connects. */
|
|
15
|
+
description?: ReactNode;
|
|
16
|
+
/** Heading element for the panel name; `h1` when the panel is the page. */
|
|
17
|
+
heading?: 'h1' | 'h2';
|
|
18
|
+
/** Render on the shared WorkspaceSurface under this title, with status and
|
|
19
|
+
* Reconnect in its header row, instead of the panel's own toolbar. */
|
|
20
|
+
surfaceTitle?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Sandbox terminal panel. Mount it once and keep it alive across tab switches
|
|
24
|
+
* (shown/hidden, never unmounted) so the WebSocket, the shell session and the
|
|
25
|
+
* scrollback survive the switch.
|
|
26
|
+
*/
|
|
27
|
+
export declare function SandboxTerminalPanel({ workspaceId, isActive, connectionKey, autoConnect, sessionTitle, description, heading: Heading, surfaceTitle, }: SandboxTerminalPanelProps): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
|
|
@@ -2,7 +2,116 @@ import {
|
|
|
2
2
|
tabTerminalConnectionId,
|
|
3
3
|
useSandboxTerminalConnection
|
|
4
4
|
} from "../chunk-E4AY62T2.js";
|
|
5
|
+
|
|
6
|
+
// src/web-react/sandbox-terminal-panel.tsx
|
|
7
|
+
import { lazy, Suspense, useMemo } from "react";
|
|
8
|
+
import { Button, StatusPill } from "@tangle-network/sandbox-ui/primitives";
|
|
9
|
+
import { WorkspaceSurface } from "@tangle-network/sandbox-ui/workspace";
|
|
10
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
var TerminalView = lazy(
|
|
12
|
+
() => import("@tangle-network/sandbox-ui/terminal").then((mod) => ({ default: mod.TerminalView }))
|
|
13
|
+
);
|
|
14
|
+
var TERMINAL_STATUS_TONE = {
|
|
15
|
+
running: "success",
|
|
16
|
+
provisioning: "running",
|
|
17
|
+
idle: "neutral",
|
|
18
|
+
error: "danger"
|
|
19
|
+
};
|
|
20
|
+
function TerminalGlyph({ className }) {
|
|
21
|
+
return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m4 17 6-6-6-6M12 19h8" }) });
|
|
22
|
+
}
|
|
23
|
+
function RefreshGlyph({ className }) {
|
|
24
|
+
return /* @__PURE__ */ jsxs("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
25
|
+
/* @__PURE__ */ jsx("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
|
|
26
|
+
/* @__PURE__ */ jsx("path", { d: "M21 3v5h-5M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
|
|
27
|
+
/* @__PURE__ */ jsx("path", { d: "M8 16H3v5" })
|
|
28
|
+
] });
|
|
29
|
+
}
|
|
30
|
+
function SandboxTerminalPanel({
|
|
31
|
+
workspaceId,
|
|
32
|
+
isActive = true,
|
|
33
|
+
connectionKey = "terminal-conn",
|
|
34
|
+
autoConnect = true,
|
|
35
|
+
sessionTitle,
|
|
36
|
+
description = "Run shell commands inside your workspace sandbox \u2014 the same filesystem the agent sees.",
|
|
37
|
+
heading: Heading = "h2",
|
|
38
|
+
surfaceTitle
|
|
39
|
+
}) {
|
|
40
|
+
const connectionId = useMemo(
|
|
41
|
+
() => tabTerminalConnectionId(`${connectionKey}:${workspaceId}`),
|
|
42
|
+
[connectionKey, workspaceId]
|
|
43
|
+
);
|
|
44
|
+
const conn = useSandboxTerminalConnection({ workspaceId, connectionId, autoConnect });
|
|
45
|
+
const { connect } = conn;
|
|
46
|
+
const onSurface = (body, actions) => surfaceTitle === void 0 ? body : /* @__PURE__ */ jsx(WorkspaceSurface, { title: surfaceTitle, actions, contentClassName: "flex flex-col overflow-hidden", children: body });
|
|
47
|
+
if (!conn.sidecarUrl || !conn.token) {
|
|
48
|
+
return onSurface(
|
|
49
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-h-0 min-w-0 flex-1 items-center justify-center px-6", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md space-y-4 text-center", children: [
|
|
50
|
+
/* @__PURE__ */ jsx(TerminalGlyph, { className: "mx-auto h-12 w-12 text-muted-foreground" }),
|
|
51
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
52
|
+
/* @__PURE__ */ jsx(Heading, { className: "text-2xl font-semibold text-foreground", children: "Sandbox Terminal" }),
|
|
53
|
+
/* @__PURE__ */ jsx("p", { className: "mt-2 text-sm text-muted-foreground", children: description })
|
|
54
|
+
] }),
|
|
55
|
+
conn.loading ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: conn.status === "provisioning" ? "Provisioning sandbox\u2026 (up to a minute on first start)" : "Connecting\u2026" }) : conn.error ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
56
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: conn.error }),
|
|
57
|
+
/* @__PURE__ */ jsxs(Button, { onClick: connect, variant: "outline", className: "gap-2", children: [
|
|
58
|
+
/* @__PURE__ */ jsx(RefreshGlyph, { className: "h-4 w-4" }),
|
|
59
|
+
" Retry"
|
|
60
|
+
] })
|
|
61
|
+
] }) : /* @__PURE__ */ jsxs(Button, { onClick: connect, className: "gap-2", children: [
|
|
62
|
+
/* @__PURE__ */ jsx(TerminalGlyph, { className: "h-4 w-4" }),
|
|
63
|
+
" Connect"
|
|
64
|
+
] })
|
|
65
|
+
] }) })
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
const sidecarHost = (() => {
|
|
69
|
+
try {
|
|
70
|
+
return new URL(conn.sidecarUrl).host;
|
|
71
|
+
} catch {
|
|
72
|
+
return conn.sidecarUrl;
|
|
73
|
+
}
|
|
74
|
+
})();
|
|
75
|
+
const status = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
76
|
+
/* @__PURE__ */ jsx(StatusPill, { tone: TERMINAL_STATUS_TONE[conn.status] ?? "neutral", className: "shrink-0", children: conn.status }),
|
|
77
|
+
/* @__PURE__ */ jsx("span", { className: "hidden truncate font-mono text-xs text-muted-foreground sm:inline", children: sidecarHost }),
|
|
78
|
+
/* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "sm", onClick: connect, className: "shrink-0 gap-1", children: [
|
|
79
|
+
/* @__PURE__ */ jsx(RefreshGlyph, { className: "h-3 w-3" }),
|
|
80
|
+
" Reconnect"
|
|
81
|
+
] })
|
|
82
|
+
] });
|
|
83
|
+
return onSurface(
|
|
84
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", children: [
|
|
85
|
+
surfaceTitle === void 0 ? /* @__PURE__ */ jsxs("div", { role: "toolbar", "aria-label": "Terminal controls", className: "flex shrink-0 items-center justify-between gap-2 border-b border-border bg-card px-4 py-2", children: [
|
|
86
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
87
|
+
/* @__PURE__ */ jsx(TerminalGlyph, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
88
|
+
/* @__PURE__ */ jsx(Heading, { className: "shrink-0 text-xs font-medium text-foreground", children: "Sandbox Terminal" })
|
|
89
|
+
] }),
|
|
90
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center gap-2", children: status })
|
|
91
|
+
] }) : null,
|
|
92
|
+
/* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsx(
|
|
93
|
+
Suspense,
|
|
94
|
+
{
|
|
95
|
+
fallback: /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-center justify-center bg-card", children: /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Loading terminal..." }) }),
|
|
96
|
+
children: /* @__PURE__ */ jsx(
|
|
97
|
+
TerminalView,
|
|
98
|
+
{
|
|
99
|
+
apiUrl: conn.sidecarUrl,
|
|
100
|
+
token: conn.token,
|
|
101
|
+
title: sessionTitle,
|
|
102
|
+
subtitle: sidecarHost,
|
|
103
|
+
isActive,
|
|
104
|
+
connectionId: conn.connectionId
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
) })
|
|
109
|
+
] }),
|
|
110
|
+
status
|
|
111
|
+
);
|
|
112
|
+
}
|
|
5
113
|
export {
|
|
114
|
+
SandboxTerminalPanel,
|
|
6
115
|
tabTerminalConnectionId,
|
|
7
116
|
useSandboxTerminalConnection
|
|
8
117
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/web-react/sandbox-terminal-panel.tsx"],"sourcesContent":["import { lazy, Suspense, useMemo, type ReactNode } from 'react'\nimport { Button, StatusPill, type StatusTone } from '@tangle-network/sandbox-ui/primitives'\nimport { WorkspaceSurface } from '@tangle-network/sandbox-ui/workspace'\nimport { tabTerminalConnectionId, useSandboxTerminalConnection } from './sandbox-terminal'\n\nconst TerminalView = lazy(() =>\n import('@tangle-network/sandbox-ui/terminal').then((mod) => ({ default: mod.TerminalView })),\n)\n\n// A running terminal is a ready connection, not work in progress; the\n// in-progress state is provisioning.\nconst TERMINAL_STATUS_TONE: Record<string, StatusTone> = {\n running: 'success',\n provisioning: 'running',\n idle: 'neutral',\n error: 'danger',\n}\n\nfunction TerminalGlyph({ className }: { className?: string }) {\n return (\n <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"m4 17 6-6-6-6M12 19h8\" />\n </svg>\n )\n}\n\nfunction RefreshGlyph({ className }: { className?: string }) {\n return (\n <svg className={className} viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\" />\n <path d=\"M21 3v5h-5M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\" />\n <path d=\"M8 16H3v5\" />\n </svg>\n )\n}\n\n/** Props for the shared sandbox terminal panel. */\nexport interface SandboxTerminalPanelProps {\n /** Workspace whose sandbox the shell attaches to. */\n workspaceId: string\n /** True while the panel is visible; the terminal refits and focuses on becoming visible. */\n isActive?: boolean\n /** Per-tab connection id key prefix; the stored key is `${connectionKey}:${workspaceId}`.\n * Give a second terminal on the same page its own key. */\n connectionKey?: string\n autoConnect?: boolean\n /** Title the terminal view shows for the session, e.g. \"GTM Workspace\". */\n sessionTitle: string\n /** One line under the heading before the terminal connects. */\n description?: ReactNode\n /** Heading element for the panel name; `h1` when the panel is the page. */\n heading?: 'h1' | 'h2'\n /** Render on the shared WorkspaceSurface under this title, with status and\n * Reconnect in its header row, instead of the panel's own toolbar. */\n surfaceTitle?: ReactNode\n}\n\n/**\n * Sandbox terminal panel. Mount it once and keep it alive across tab switches\n * (shown/hidden, never unmounted) so the WebSocket, the shell session and the\n * scrollback survive the switch.\n */\nexport function SandboxTerminalPanel({\n workspaceId,\n isActive = true,\n connectionKey = 'terminal-conn',\n autoConnect = true,\n sessionTitle,\n description = 'Run shell commands inside your workspace sandbox — the same filesystem the agent sees.',\n heading: Heading = 'h2',\n surfaceTitle,\n}: SandboxTerminalPanelProps) {\n // Per-workspace so two workspaces open in one tab do not share a connection\n // id; computed before the hook because the id goes INTO the connection request.\n const connectionId = useMemo(\n () => tabTerminalConnectionId(`${connectionKey}:${workspaceId}`),\n [connectionKey, workspaceId],\n )\n const conn = useSandboxTerminalConnection({ workspaceId, connectionId, autoConnect })\n const { connect } = conn\n\n const onSurface = (body: ReactNode, actions?: ReactNode) => surfaceTitle === undefined\n ? body\n : <WorkspaceSurface title={surfaceTitle} actions={actions} contentClassName=\"flex flex-col overflow-hidden\">{body}</WorkspaceSurface>\n\n if (!conn.sidecarUrl || !conn.token) {\n return onSurface(\n <div className=\"flex min-h-0 min-w-0 flex-1 items-center justify-center px-6\">\n <div className=\"max-w-md space-y-4 text-center\">\n <TerminalGlyph className=\"mx-auto h-12 w-12 text-muted-foreground\" />\n <div>\n <Heading className=\"text-2xl font-semibold text-foreground\">Sandbox Terminal</Heading>\n <p className=\"mt-2 text-sm text-muted-foreground\">{description}</p>\n </div>\n {conn.loading ? (\n <p className=\"text-sm text-muted-foreground\">\n {conn.status === 'provisioning' ? 'Provisioning sandbox… (up to a minute on first start)' : 'Connecting…'}\n </p>\n ) : conn.error ? (\n <>\n <p className=\"text-sm text-destructive\">{conn.error}</p>\n <Button onClick={connect} variant=\"outline\" className=\"gap-2\">\n <RefreshGlyph className=\"h-4 w-4\" /> Retry\n </Button>\n </>\n ) : (\n <Button onClick={connect} className=\"gap-2\">\n <TerminalGlyph className=\"h-4 w-4\" /> Connect\n </Button>\n )}\n </div>\n </div>,\n )\n }\n\n const sidecarHost = (() => {\n try { return new URL(conn.sidecarUrl).host } catch { return conn.sidecarUrl }\n })()\n\n const status = (\n <>\n <StatusPill tone={TERMINAL_STATUS_TONE[conn.status] ?? 'neutral'} className=\"shrink-0\">\n {conn.status}\n </StatusPill>\n <span className=\"hidden truncate font-mono text-xs text-muted-foreground sm:inline\">{sidecarHost}</span>\n <Button variant=\"ghost\" size=\"sm\" onClick={connect} className=\"shrink-0 gap-1\">\n <RefreshGlyph className=\"h-3 w-3\" /> Reconnect\n </Button>\n </>\n )\n\n return onSurface(\n <div className=\"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden\">\n {surfaceTitle === undefined ? (\n <div role=\"toolbar\" aria-label=\"Terminal controls\" className=\"flex shrink-0 items-center justify-between gap-2 border-b border-border bg-card px-4 py-2\">\n <div className=\"flex min-w-0 items-center gap-2\">\n <TerminalGlyph className=\"h-4 w-4 shrink-0 text-muted-foreground\" />\n <Heading className=\"shrink-0 text-xs font-medium text-foreground\">Sandbox Terminal</Heading>\n </div>\n <div className=\"flex min-w-0 items-center gap-2\">{status}</div>\n </div>\n ) : null}\n <div className=\"min-h-0 flex-1\">\n <Suspense\n fallback={\n <div className=\"flex flex-1 items-center justify-center bg-card\">\n <p className=\"text-sm text-muted-foreground\">Loading terminal...</p>\n </div>\n }\n >\n <TerminalView\n apiUrl={conn.sidecarUrl}\n token={conn.token}\n title={sessionTitle}\n subtitle={sidecarHost}\n isActive={isActive}\n connectionId={conn.connectionId}\n />\n </Suspense>\n </div>\n </div>,\n status,\n )\n}\n"],"mappings":";;;;;;AAAA,SAAS,MAAM,UAAU,eAA+B;AACxD,SAAS,QAAQ,kBAAmC;AACpD,SAAS,wBAAwB;AAmB3B,SA8EM,UA9EN,KAOF,YAPE;AAhBN,IAAM,eAAe;AAAA,EAAK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AAAA,8BAAC,iBAAc,WAAU,0CAAyC;AAAA,UAClE,oBAAC,WAAQ,WAAU,gDAA+C,8BAAgB;AAAA,WACpF;AAAA,QACA,oBAAC,SAAI,WAAU,mCAAmC,kBAAO;AAAA,SAC3D,IACE;AAAA,MACJ,oBAAC,SAAI,WAAU,kBACb;AAAA,QAAC;AAAA;AAAA,UACC,UACE,oBAAC,SAAI,WAAU,mDACb,8BAAC,OAAE,WAAU,iCAAgC,iCAAmB,GAClE;AAAA,UAGF;AAAA,YAAC;AAAA;AAAA,cACC,QAAQ,KAAK;AAAA,cACb,OAAO,KAAK;AAAA,cACZ,OAAO;AAAA,cACP,UAAU;AAAA,cACV;AAAA,cACA,cAAc,KAAK;AAAA;AAAA,UACrB;AAAA;AAAA,MACF,GACF;AAAA,OACF;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ModelInfo } from '@tangle-network/sandbox-ui/dashboard';
|
|
2
|
+
import type { CatalogModel } from '../catalog/index';
|
|
3
|
+
/** Options for the model-catalog hook. */
|
|
4
|
+
export interface UseModelsOptions {
|
|
5
|
+
/** False skips the fetch (e.g. a signed-out view). */
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
/** Catalog route; defaults to `/api/models`. Prefix it for a split API origin. */
|
|
8
|
+
url?: string;
|
|
9
|
+
}
|
|
10
|
+
/** The model catalog for a product's pickers. */
|
|
11
|
+
export interface UseModelsResult {
|
|
12
|
+
models: ModelInfo[];
|
|
13
|
+
/** Picker-ready list from the shared filter/dedupe/rank pipeline, built server-side. */
|
|
14
|
+
catalog: CatalogModel[];
|
|
15
|
+
loading: boolean;
|
|
16
|
+
error: string | null;
|
|
17
|
+
reload: () => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Load the model catalog (`{ data, catalog }`) from the product's models
|
|
21
|
+
* route. An in-memory cache per URL keeps later picker mounts instant within
|
|
22
|
+
* the page session; entries older than ten minutes refetch.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useModels(options?: UseModelsOptions): UseModelsResult;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComposerPlanModeSelection } from './composer-mode-controls';
|
|
2
|
+
/** Options for the per-thread plan-mode toggle. */
|
|
3
|
+
export interface UsePlanModeSelectionOptions {
|
|
4
|
+
/** PATCH target for a thread's `{ planMode }`; defaults to `/api/threads/:id`. */
|
|
5
|
+
threadUrl?: (threadId: string) => string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Per-THREAD plan-mode toggle for `ComposerModeControls`. Persists through
|
|
9
|
+
* `PATCH <threadUrl> { planMode }`. With no `threadId` (a new chat that has no
|
|
10
|
+
* thread yet) it is local state only; the product carries the value into the
|
|
11
|
+
* first send.
|
|
12
|
+
*
|
|
13
|
+
* Optimistic flip, rolled back if the PATCH fails or throws unless a newer
|
|
14
|
+
* toggle superseded it; a loader resync is ignored while a save is in flight
|
|
15
|
+
* so a stale revalidation cannot undo the click.
|
|
16
|
+
*/
|
|
17
|
+
export declare function usePlanModeSelection(threadId: string | undefined, initialPlanMode: boolean, options?: UsePlanModeSelectionOptions): Required<ComposerPlanModeSelection>;
|
|
@@ -8,11 +8,6 @@ import {
|
|
|
8
8
|
WorkspacePrewarmContext,
|
|
9
9
|
useWorkspacePrewarm
|
|
10
10
|
} from "../chunk-2HQP2CTA.js";
|
|
11
|
-
import {
|
|
12
|
-
buildSessionNavItem,
|
|
13
|
-
composeSidebarSessions,
|
|
14
|
-
resolveActiveNavId
|
|
15
|
-
} from "../chunk-SJWIZT7B.js";
|
|
16
11
|
import {
|
|
17
12
|
usePopoverDialog
|
|
18
13
|
} from "../chunk-QAHBSKWG.js";
|
|
@@ -23,6 +18,11 @@ import {
|
|
|
23
18
|
usePopover
|
|
24
19
|
} from "../chunk-RO25WIVS.js";
|
|
25
20
|
import "../chunk-ZAMHLXNS.js";
|
|
21
|
+
import {
|
|
22
|
+
buildSessionNavItem,
|
|
23
|
+
composeSidebarSessions,
|
|
24
|
+
resolveActiveNavId
|
|
25
|
+
} from "../chunk-SJWIZT7B.js";
|
|
26
26
|
import "../chunk-RASGKEAL.js";
|
|
27
27
|
import "../chunk-AMUXRAUO.js";
|
|
28
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-app",
|
|
3
|
-
"version": "0.63.
|
|
3
|
+
"version": "0.63.29",
|
|
4
4
|
"packageManager": "pnpm@11.24.0",
|
|
5
5
|
"description": "Build agent applications with typed chat, tools, sandboxes, integrations, billing, and evaluation.",
|
|
6
6
|
"keywords": [
|
|
@@ -45,7 +45,8 @@
|
|
|
45
45
|
"tangle-agent": "bin/tangle-agent.mjs",
|
|
46
46
|
"agent-app-invariants": "./dist/launch-invariants/cli.js",
|
|
47
47
|
"agent-app-rollout-check": "./dist/rollout/cli.js",
|
|
48
|
-
"agent-app-journeys": "./dist/journeys/cli.js"
|
|
48
|
+
"agent-app-journeys": "./dist/journeys/cli.js",
|
|
49
|
+
"agent-app-conformance": "./dist/conformance/cli.js"
|
|
49
50
|
},
|
|
50
51
|
"exports": {
|
|
51
52
|
"./package.json": "./package.json",
|
|
@@ -304,6 +305,11 @@
|
|
|
304
305
|
"import": "./dist/journeys/index.js",
|
|
305
306
|
"default": "./dist/journeys/index.js"
|
|
306
307
|
},
|
|
308
|
+
"./conformance": {
|
|
309
|
+
"types": "./dist/conformance/index.d.ts",
|
|
310
|
+
"import": "./dist/conformance/index.js",
|
|
311
|
+
"default": "./dist/conformance/index.js"
|
|
312
|
+
},
|
|
307
313
|
"./integrations": {
|
|
308
314
|
"types": "./dist/integrations/index.d.ts",
|
|
309
315
|
"import": "./dist/integrations/index.js",
|