@tangle-network/agent-app 0.42.18 → 0.43.1
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/README.md +3 -2
- package/dist/assistant/index.d.ts +1 -0
- package/dist/assistant/index.js +1 -1
- package/dist/{chunk-WV2U5UIB.js → chunk-7DPQ5VWR.js} +138 -346
- package/dist/chunk-7DPQ5VWR.js.map +1 -0
- package/dist/composer/index.d.ts +2 -0
- package/dist/composer/index.js +22 -0
- package/dist/composer/index.js.map +1 -0
- package/dist/design-canvas-react/index.js +4 -4
- package/dist/teams-react/index.js +3 -3
- package/dist/theme/tailwind-preset.d.ts +3 -0
- package/dist/theme/tailwind-preset.js +7 -1
- package/dist/theme/tailwind-preset.js.map +1 -1
- package/dist/theme/tokens.css +12 -0
- package/dist/web-react/index.d.ts +12 -16
- package/dist/web-react/index.js +1 -1
- package/package.json +22 -7
- package/dist/chunk-WV2U5UIB.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/theme/tailwind-preset.ts"],"sourcesContent":["/**\n * Tailwind preset mapping the shadcn semantic color names used by web-react\n * (bg-card, text-muted-foreground, border-border, …) onto the CSS variables in\n * tokens.css — so a consuming app themes every agent-app surface from one source.\n *\n * // tailwind.config.{js,ts}\n * import agentAppPreset from '@tangle-network/agent-app/tailwind-preset'\n * export default { presets: [agentAppPreset], content: [...] }\n *\n * Pair with `import '@tangle-network/agent-app/styles'` for the variable values.\n * design-canvas/sequences need no preset — they consume vars via arbitrary\n * values (bg-[var(--bg-input)]), which Tailwind supports without color config.\n */\n\nconst withForeground = (name: string) => ({\n DEFAULT: `hsl(var(--${name}))`,\n foreground: `hsl(var(--${name}-foreground))`,\n})\n\nconst agentAppPreset = {\n darkMode: ['class', '[data-theme=\"dark\"]'] as [string, string],\n theme: {\n extend: {\n colors: {\n background: 'hsl(var(--background))',\n foreground: 'hsl(var(--foreground))',\n border: 'hsl(var(--border))',\n input: 'hsl(var(--input))',\n ring: 'hsl(var(--ring))',\n success: withForeground('success'),\n warning: withForeground('warning'),\n card: withForeground('card'),\n popover: withForeground('popover'),\n primary: withForeground('primary'),\n secondary: withForeground('secondary'),\n muted: withForeground('muted'),\n accent: withForeground('accent'),\n destructive: withForeground('destructive'),\n },\n },\n },\n}\n\nexport default agentAppPreset\n"],"mappings":";AAcA,IAAM,iBAAiB,CAAC,UAAkB;AAAA,EACxC,SAAS,aAAa,IAAI;AAAA,EAC1B,YAAY,aAAa,IAAI;AAC/B;AAEA,IAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC,SAAS,qBAAqB;AAAA,EACzC,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,QAAQ;AAAA,QACN,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,MAAM;AAAA,QACN,SAAS,eAAe,SAAS;AAAA,QACjC,SAAS,eAAe,SAAS;AAAA,QACjC,MAAM,eAAe,MAAM;AAAA,QAC3B,SAAS,eAAe,SAAS;AAAA,QACjC,SAAS,eAAe,SAAS;AAAA,QACjC,WAAW,eAAe,WAAW;AAAA,QACrC,OAAO,eAAe,OAAO;AAAA,QAC7B,QAAQ,eAAe,QAAQ;AAAA,QAC/B,aAAa,eAAe,aAAa;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/theme/tailwind-preset.ts"],"sourcesContent":["/**\n * Tailwind preset mapping the shadcn semantic color names used by web-react\n * (bg-card, text-muted-foreground, border-border, …) onto the CSS variables in\n * tokens.css — so a consuming app themes every agent-app surface from one source.\n *\n * // tailwind.config.{js,ts}\n * import agentAppPreset from '@tangle-network/agent-app/tailwind-preset'\n * export default { presets: [agentAppPreset], content: [...] }\n *\n * Pair with `import '@tangle-network/agent-app/styles'` for the variable values.\n * design-canvas/sequences need no preset — they consume vars via arbitrary\n * values (bg-[var(--bg-input)]), which Tailwind supports without color config.\n */\n\nconst withForeground = (name: string) => ({\n DEFAULT: `hsl(var(--${name}))`,\n foreground: `hsl(var(--${name}-foreground))`,\n})\n\nconst agentAppPreset = {\n darkMode: ['class', '[data-theme=\"dark\"]'] as [string, string],\n theme: {\n extend: {\n colors: {\n background: 'hsl(var(--background))',\n foreground: 'hsl(var(--foreground))',\n border: 'hsl(var(--border))',\n input: 'hsl(var(--input))',\n ring: 'hsl(var(--ring))',\n success: withForeground('success'),\n warning: withForeground('warning'),\n card: withForeground('card'),\n popover: withForeground('popover'),\n primary: withForeground('primary'),\n secondary: withForeground('secondary'),\n muted: withForeground('muted'),\n accent: withForeground('accent'),\n destructive: withForeground('destructive'),\n // MD3 surface ladder — wires sandbox-ui's `bg-surface-container*`\n // utilities (used by AgentComposer + its pickers) onto the shadcn\n // elevation triples, so those components render on-palette here.\n 'surface-container': 'hsl(var(--card))',\n 'surface-container-high': 'hsl(var(--popover))',\n 'surface-container-highest': 'hsl(var(--secondary))',\n },\n },\n },\n}\n\nexport default agentAppPreset\n"],"mappings":";AAcA,IAAM,iBAAiB,CAAC,UAAkB;AAAA,EACxC,SAAS,aAAa,IAAI;AAAA,EAC1B,YAAY,aAAa,IAAI;AAC/B;AAEA,IAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC,SAAS,qBAAqB;AAAA,EACzC,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,QAAQ;AAAA,QACN,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,MAAM;AAAA,QACN,SAAS,eAAe,SAAS;AAAA,QACjC,SAAS,eAAe,SAAS;AAAA,QACjC,MAAM,eAAe,MAAM;AAAA,QAC3B,SAAS,eAAe,SAAS;AAAA,QACjC,SAAS,eAAe,SAAS;AAAA,QACjC,WAAW,eAAe,WAAW;AAAA,QACrC,OAAO,eAAe,OAAO;AAAA,QAC7B,QAAQ,eAAe,QAAQ;AAAA,QAC/B,aAAa,eAAe,aAAa;AAAA;AAAA;AAAA;AAAA,QAIzC,qBAAqB;AAAA,QACrB,0BAA0B;AAAA,QAC1B,6BAA6B;AAAA,MAC/B;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,0BAAQ;","names":[]}
|
package/dist/theme/tokens.css
CHANGED
|
@@ -60,6 +60,18 @@
|
|
|
60
60
|
--border-default: hsl(var(--border));
|
|
61
61
|
--brand-primary: hsl(var(--primary));
|
|
62
62
|
|
|
63
|
+
/* MD3 bridge — sandbox-ui chat/composer components (AgentComposer and its
|
|
64
|
+
pickers) are authored against the brand MD3 surface ladder + accent tokens.
|
|
65
|
+
Map them onto the shadcn triples here so those components theme from this
|
|
66
|
+
same source in any agent-app shell. Full colors via the triples, so the dark
|
|
67
|
+
scope re-themes them through the cascade. The `surface-container*` Tailwind
|
|
68
|
+
utilities are wired separately in the preset. */
|
|
69
|
+
--md3-outline-variant: hsl(var(--border));
|
|
70
|
+
--accent-surface-soft: hsl(var(--accent));
|
|
71
|
+
--accent-text: hsl(var(--accent-foreground));
|
|
72
|
+
--status-error: hsl(var(--destructive));
|
|
73
|
+
--radius-md: 0.5rem;
|
|
74
|
+
|
|
63
75
|
/* canvas-only surfaces (not part of the shadcn vocabulary). Name matches the
|
|
64
76
|
`--canvas-backdrop` the design-canvas Workspace references (with a #1a1a1a fallback). */
|
|
65
77
|
--canvas-backdrop: hsl(240 7% 90%);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { ComposerFile as ComposerFile$1 } from '@tangle-network/sandbox-ui/chat';
|
|
3
4
|
import { S as StepAgentActivity } from '../agent-activity-C8ZG0F0M.js';
|
|
4
5
|
import { a as FlowTrace } from '../flow-types-Cb_AblZs.js';
|
|
5
6
|
import { C as CatalogModel } from '../model-catalog-BEAEVDaa.js';
|
|
@@ -79,15 +80,8 @@ interface StreamChatOptions {
|
|
|
79
80
|
*/
|
|
80
81
|
declare function streamChatTurn(opts: StreamChatOptions): Promise<ConsumeChatStreamResult>;
|
|
81
82
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
name: string;
|
|
85
|
-
size?: number;
|
|
86
|
-
kind: 'file' | 'folder';
|
|
87
|
-
/** Number of files inside, for a folder chip. */
|
|
88
|
-
fileCount?: number;
|
|
89
|
-
status: 'pending' | 'uploading' | 'ready' | 'error';
|
|
90
|
-
}
|
|
83
|
+
/** Re-exported from sandbox-ui — the staged-attachment chip shape. */
|
|
84
|
+
type ComposerFile = ComposerFile$1;
|
|
91
85
|
interface ChatComposerProps {
|
|
92
86
|
/** Send the trimmed, non-empty message. Attached files travel separately via
|
|
93
87
|
* `onAttach` + `pendingFiles` (the host consumes and clears them on send). */
|
|
@@ -95,8 +89,7 @@ interface ChatComposerProps {
|
|
|
95
89
|
/** Stop the in-flight turn; shown in place of Send while `isStreaming`. */
|
|
96
90
|
onCancel?: () => void;
|
|
97
91
|
isStreaming?: boolean;
|
|
98
|
-
/** Block input + send (e.g. while restoring).
|
|
99
|
-
* which keeps the textarea editable so the next turn can be composed. */
|
|
92
|
+
/** Block input + send (e.g. while restoring). */
|
|
100
93
|
disabled?: boolean;
|
|
101
94
|
placeholder?: string;
|
|
102
95
|
/** Controlled value. Omit for self-managed internal state (cleared on send). */
|
|
@@ -104,10 +97,13 @@ interface ChatComposerProps {
|
|
|
104
97
|
onValueChange?: (value: string) => void;
|
|
105
98
|
/** Initial text in uncontrolled mode; ignored when `value` is provided. */
|
|
106
99
|
initialValue?: string;
|
|
107
|
-
/** Inline controls (e.g. `<
|
|
108
|
-
* `<AgentSessionControls/>`). Rendered in a row above the input by default. */
|
|
100
|
+
/** Inline controls (e.g. `<AgentSessionControls/>`), rendered in the control row. */
|
|
109
101
|
controls?: ReactNode;
|
|
110
|
-
|
|
102
|
+
/**
|
|
103
|
+
* @deprecated The composer renders a single control row; this no longer moves
|
|
104
|
+
* the controls above the input. Retained for API compatibility.
|
|
105
|
+
*/
|
|
106
|
+
controlsPlacement?: "above" | "footer";
|
|
111
107
|
/** Attachments are opt-in: pass `onAttach` to show the attach button, accept
|
|
112
108
|
* drag-and-drop onto the input, and render `pendingFiles` chips. */
|
|
113
109
|
onAttach?: (files: FileList) => void;
|
|
@@ -119,11 +115,11 @@ interface ChatComposerProps {
|
|
|
119
115
|
dropDescription?: string;
|
|
120
116
|
/** Cmd/Ctrl+L focuses the input and shows the hint. Default true. */
|
|
121
117
|
focusShortcut?: boolean;
|
|
122
|
-
/** Send button label. Default "Send". */
|
|
118
|
+
/** Send button label (aria/title; the button is an icon). Default "Send". */
|
|
123
119
|
sendLabel?: string;
|
|
124
120
|
className?: string;
|
|
125
121
|
}
|
|
126
|
-
declare function ChatComposer({ onSend, onCancel, isStreaming, disabled, placeholder, value, onValueChange, initialValue, controls,
|
|
122
|
+
declare function ChatComposer({ onSend, onCancel, isStreaming, disabled, placeholder, value, onValueChange, initialValue, controls, onAttach, onAttachFolder, pendingFiles, onRemoveFile, accept, dropTitle, dropDescription, focusShortcut, sendLabel, className, }: ChatComposerProps): react.JSX.Element;
|
|
127
123
|
|
|
128
124
|
/**
|
|
129
125
|
* Provider brand marks — real logo path data (simple-icons / SVG Logos, both
|
package/dist/web-react/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.1",
|
|
4
4
|
"packageManager": "pnpm@10.33.4",
|
|
5
5
|
"description": "Application-shell framework for Tangle agent products: a bounded tool loop, the structured agent→app tool side channel, integration-hub client, per-workspace billing, and crypto — composed over the Tangle agent substrate through typed seams.",
|
|
6
6
|
"keywords": [
|
|
@@ -158,6 +158,11 @@
|
|
|
158
158
|
"import": "./dist/web-react/index.js",
|
|
159
159
|
"default": "./dist/web-react/index.js"
|
|
160
160
|
},
|
|
161
|
+
"./composer": {
|
|
162
|
+
"types": "./dist/composer/index.d.ts",
|
|
163
|
+
"import": "./dist/composer/index.js",
|
|
164
|
+
"default": "./dist/composer/index.js"
|
|
165
|
+
},
|
|
161
166
|
"./assistant": {
|
|
162
167
|
"types": "./dist/assistant/index.d.ts",
|
|
163
168
|
"import": "./dist/assistant/index.js",
|
|
@@ -337,15 +342,17 @@
|
|
|
337
342
|
},
|
|
338
343
|
"devDependencies": {
|
|
339
344
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
340
|
-
"@tangle-network/agent-eval": "^0.
|
|
345
|
+
"@tangle-network/agent-eval": "^0.100.0",
|
|
341
346
|
"@tangle-network/agent-integrations": "^0.44.0",
|
|
342
347
|
"@tangle-network/agent-interface": "^0.15.0",
|
|
343
348
|
"@tangle-network/agent-knowledge": "^1.7.0",
|
|
344
|
-
"@tangle-network/agent-runtime": "^0.
|
|
349
|
+
"@tangle-network/agent-runtime": "^0.79.3",
|
|
350
|
+
"@tangle-network/brand": "^0.6.0",
|
|
345
351
|
"@tangle-network/sandbox": "^0.9.5",
|
|
346
|
-
"@tangle-network/sandbox-ui": "^0.
|
|
352
|
+
"@tangle-network/sandbox-ui": "^0.60.0",
|
|
347
353
|
"@tangle-network/ui": "^4.1.0",
|
|
348
354
|
"@testing-library/dom": "^10.4.1",
|
|
355
|
+
"@xyflow/react": "^12.0.0",
|
|
349
356
|
"@testing-library/react": "^16.3.2",
|
|
350
357
|
"@types/better-sqlite3": "^7.6.13",
|
|
351
358
|
"@types/node": "^25.6.0",
|
|
@@ -370,13 +377,15 @@
|
|
|
370
377
|
"peerDependencies": {
|
|
371
378
|
"@huggingface/transformers": ">=3",
|
|
372
379
|
"@radix-ui/react-dialog": ">=1.1",
|
|
373
|
-
"@tangle-network/agent-eval": ">=0.
|
|
380
|
+
"@tangle-network/agent-eval": ">=0.100.0",
|
|
374
381
|
"@tangle-network/agent-integrations": ">=0.44.0",
|
|
375
382
|
"@tangle-network/agent-interface": ">=0.15.0",
|
|
376
383
|
"@tangle-network/agent-knowledge": ">=1.7.0",
|
|
377
|
-
"@tangle-network/agent-runtime": ">=0.
|
|
384
|
+
"@tangle-network/agent-runtime": ">=0.79.3",
|
|
385
|
+
"@tangle-network/brand": ">=0.6.0",
|
|
378
386
|
"@tangle-network/sandbox": ">=0.9.4",
|
|
379
|
-
"@tangle-network/sandbox-ui": ">=0.
|
|
387
|
+
"@tangle-network/sandbox-ui": ">=0.60.0",
|
|
388
|
+
"@xyflow/react": ">=12.0.0",
|
|
380
389
|
"drizzle-orm": ">=0.36",
|
|
381
390
|
"konva": ">=9",
|
|
382
391
|
"lucide-react": ">=1",
|
|
@@ -413,6 +422,12 @@
|
|
|
413
422
|
"@tangle-network/sandbox-ui": {
|
|
414
423
|
"optional": true
|
|
415
424
|
},
|
|
425
|
+
"@tangle-network/brand": {
|
|
426
|
+
"optional": true
|
|
427
|
+
},
|
|
428
|
+
"@xyflow/react": {
|
|
429
|
+
"optional": true
|
|
430
|
+
},
|
|
416
431
|
"react-router": {
|
|
417
432
|
"optional": true
|
|
418
433
|
},
|