@tangle-network/agent-app 0.60.235 → 0.60.236

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 (46) hide show
  1. package/dist/assistant/index.js +7 -7
  2. package/dist/chat-react/index.js +4 -4
  3. package/dist/{chunk-BNFUJNPS.js → chunk-A77IBQ7S.js} +456 -431
  4. package/dist/chunk-A77IBQ7S.js.map +1 -0
  5. package/dist/{chunk-JYIMW5U5.js → chunk-BGDQ7245.js} +3571 -3546
  6. package/dist/chunk-BGDQ7245.js.map +1 -0
  7. package/dist/{chunk-232KA6MR.js → chunk-CI53V6DD.js} +3 -3
  8. package/dist/{chunk-4JAXSEYW.js → chunk-DLVMKDFX.js} +3 -3
  9. package/dist/{chunk-JYVUFRRV.js → chunk-FUZETA6Z.js} +2 -2
  10. package/dist/{chunk-XIN7DOAB.js → chunk-R4X5474U.js} +35 -33
  11. package/dist/chunk-R4X5474U.js.map +1 -0
  12. package/dist/{chunk-5IZRAZEZ.js → chunk-ZDPUC6CM.js} +3 -3
  13. package/dist/{mention-editor-6FJ6HRSN.js → mention-editor-B23OMFT2.js} +2 -2
  14. package/dist/settings-react/index.js +1 -1
  15. package/dist/studio-react/index.js +1 -1
  16. package/dist/web-react/agent-profile-editor.js +4 -4
  17. package/dist/web-react/chat-composer-types.d.ts +301 -0
  18. package/dist/web-react/chat-composer.d.ts +2 -300
  19. package/dist/web-react/chat-empty-state.d.ts +27 -0
  20. package/dist/web-react/chat-message-body.d.ts +23 -0
  21. package/dist/web-react/chat-message-metrics.d.ts +6 -0
  22. package/dist/web-react/chat-message-types.d.ts +158 -0
  23. package/dist/web-react/chat-messages.d.ts +17 -0
  24. package/dist/web-react/chat-tool-call.d.ts +31 -0
  25. package/dist/web-react/composer-glyphs.d.ts +28 -0
  26. package/dist/web-react/index.d.ts +6 -245
  27. package/dist/web-react/index.js +7 -7
  28. package/dist/web-react/record-grid-editors.d.ts +31 -0
  29. package/dist/web-react/record-grid-review-actions.d.ts +13 -0
  30. package/dist/web-react/record-grid-source-marker.d.ts +27 -0
  31. package/dist/web-react/record-grid-types.d.ts +86 -0
  32. package/dist/web-react/record-grid.d.ts +2 -85
  33. package/dist/web-react/run-drill-in.d.ts +28 -0
  34. package/dist/web-react/use-composer-commands.d.ts +25 -0
  35. package/dist/web-react/use-composer-file-intake.d.ts +20 -0
  36. package/dist/web-react/use-composer-send.d.ts +34 -0
  37. package/dist/workspace-react/index.js +3 -3
  38. package/package.json +1 -1
  39. package/dist/chunk-BNFUJNPS.js.map +0 -1
  40. package/dist/chunk-JYIMW5U5.js.map +0 -1
  41. package/dist/chunk-XIN7DOAB.js.map +0 -1
  42. /package/dist/{chunk-232KA6MR.js.map → chunk-CI53V6DD.js.map} +0 -0
  43. /package/dist/{chunk-4JAXSEYW.js.map → chunk-DLVMKDFX.js.map} +0 -0
  44. /package/dist/{chunk-JYVUFRRV.js.map → chunk-FUZETA6Z.js.map} +0 -0
  45. /package/dist/{chunk-5IZRAZEZ.js.map → chunk-ZDPUC6CM.js.map} +0 -0
  46. /package/dist/{mention-editor-6FJ6HRSN.js.map → mention-editor-B23OMFT2.js.map} +0 -0
@@ -0,0 +1,86 @@
1
+ /** Host data and mutation contracts for the editable record table. */
2
+ import type { ReactNode } from 'react';
3
+ import type { AsyncEmptySpec, AsyncResourceState } from './async';
4
+ import type { RecordGridColumn, RecordGridProposal, RecordGridRow, RecordGridValue } from './record-grid-model';
5
+ /** One committed cell edit, handed to `onUpdate`. */
6
+ export interface RecordGridCellChange {
7
+ /** The row as it was BEFORE the edit — what rollback restores. */
8
+ row: RecordGridRow;
9
+ columnId: string;
10
+ value: RecordGridValue;
11
+ /** The full value bag after the edit: what a whole-row write would send. */
12
+ values: Readonly<Record<string, RecordGridValue>>;
13
+ }
14
+ /** Outcome of an update or a delete. `value` optionally carries the server's
15
+ * canonical row, which replaces the optimistic one. */
16
+ export type RecordGridWriteOutcome = {
17
+ succeeded: true;
18
+ value?: RecordGridRow;
19
+ } | {
20
+ succeeded: false;
21
+ error: string;
22
+ };
23
+ /** Outcome of a create. The row is REQUIRED on success: a create that does not
24
+ * name the row it wrote leaves the grid unable to address it. */
25
+ export type RecordGridCreateOutcome = {
26
+ succeeded: true;
27
+ value: RecordGridRow;
28
+ } | {
29
+ succeeded: false;
30
+ error: string;
31
+ };
32
+ /** Properties for the editable, provenance-aware record grid. */
33
+ export interface RecordGridProps {
34
+ /** Column definitions, in render order. */
35
+ columns: readonly RecordGridColumn[];
36
+ /** Fetch state over the caller's rows — `web-react/async`'s
37
+ * `AsyncResourceState`, the same three-state contract every other screen
38
+ * in the shell fetches through. `ready`/`empty`'s value is the base rows;
39
+ * optimistic edits are layered over it and dropped as a later value
40
+ * catches up. `error` always carries `retry` — there is no way to render a
41
+ * failed fetch with no recovery action, by construction. */
42
+ state: AsyncResourceState<readonly RecordGridRow[]>;
43
+ /** Accessible name for the grid. Required — an unnamed grid is unusable with
44
+ * a screen reader. */
45
+ caption: string;
46
+ /** What the empty state says, and what it offers next — `web-react/async`'s
47
+ * `AsyncEmptySpec`, so an empty grid reads in the same words as an empty
48
+ * list or panel elsewhere in the product. */
49
+ empty: AsyncEmptySpec;
50
+ /** Persist one created row. Absent → no add affordance. */
51
+ onCreate?: (values: Readonly<Record<string, RecordGridValue>>) => Promise<RecordGridCreateOutcome>;
52
+ /** Persist one cell edit. Absent → every cell renders read-only. */
53
+ onUpdate?: (change: RecordGridCellChange) => Promise<RecordGridWriteOutcome>;
54
+ /** Delete one row. Absent → no delete affordance. */
55
+ onDelete?: (row: RecordGridRow) => Promise<RecordGridWriteOutcome>;
56
+ /** A proposed change set to review against the live rows (see
57
+ * `diffRecordGridProposal`). While a non-empty diff is on the table the grid
58
+ * is a REVIEW surface, not an editor: cell editing, row add, and row delete
59
+ * are inert; changed cells render the struck live value against the
60
+ * proposed one; added/removed rows are marked; each diffed row carries
61
+ * accept/reject controls. A proposal that diffs to nothing renders the grid
62
+ * unchanged — there is nothing to review. */
63
+ proposed?: RecordGridProposal;
64
+ /** Accept one diffed row — write its proposed values, adopt the addition, or
65
+ * confirm the removal. The caller owns what accepting MEANS (a record-store
66
+ * review write); the grid reports the decision and the caller moves the row
67
+ * out of `proposed`. */
68
+ onAcceptRow?: (rowId: string) => void;
69
+ /** Reject one diffed row — the live row stands. */
70
+ onRejectRow?: (rowId: string) => void;
71
+ /** Accept every remaining diffed row at once. */
72
+ onAcceptAll?: () => void;
73
+ /** Reject every remaining diffed row at once. */
74
+ onRejectAll?: () => void;
75
+ /** Starting values for the add form. */
76
+ newRowDefaults?: Readonly<Record<string, RecordGridValue>>;
77
+ /** Label of the add control and of the add form. Defaults to `Add row`. */
78
+ addLabel?: string;
79
+ /** BCP-47 locale for number, currency, and date display. */
80
+ locale?: string;
81
+ /** Rendered above the grid — filters, counts, a product action row. */
82
+ toolbar?: ReactNode;
83
+ /** Skeleton rows in the loading state. Defaults to 3. */
84
+ loadingRowCount?: number;
85
+ className?: string;
86
+ }
@@ -40,92 +40,9 @@
40
40
  * Presentation is Tailwind against the shared design tokens, with no icon
41
41
  * library and no sandbox-ui — the same contract as the rest of `/web-react`.
42
42
  */
43
- import { type ReactNode } from 'react';
44
- import { type AsyncEmptySpec, type AsyncResourceState } from './async';
45
- import { type RecordGridColumn, type RecordGridProposal, type RecordGridRow, type RecordGridValue } from './record-grid-model';
46
43
  export * from './record-grid-model';
47
- /** One committed cell edit, handed to `onUpdate`. */
48
- export interface RecordGridCellChange {
49
- /** The row as it was BEFORE the edit — what rollback restores. */
50
- row: RecordGridRow;
51
- columnId: string;
52
- value: RecordGridValue;
53
- /** The full value bag after the edit: what a whole-row write would send. */
54
- values: Readonly<Record<string, RecordGridValue>>;
55
- }
56
- /** Outcome of an update or a delete. `value` optionally carries the server's
57
- * canonical row, which replaces the optimistic one. */
58
- export type RecordGridWriteOutcome = {
59
- succeeded: true;
60
- value?: RecordGridRow;
61
- } | {
62
- succeeded: false;
63
- error: string;
64
- };
65
- /** Outcome of a create. The row is REQUIRED on success: a create that does not
66
- * name the row it wrote leaves the grid unable to address it. */
67
- export type RecordGridCreateOutcome = {
68
- succeeded: true;
69
- value: RecordGridRow;
70
- } | {
71
- succeeded: false;
72
- error: string;
73
- };
74
- /** Properties for the editable, provenance-aware record grid. */
75
- export interface RecordGridProps {
76
- /** Column definitions, in render order. */
77
- columns: readonly RecordGridColumn[];
78
- /** Fetch state over the caller's rows — `web-react/async`'s
79
- * `AsyncResourceState`, the same three-state contract every other screen
80
- * in the shell fetches through. `ready`/`empty`'s value is the base rows;
81
- * optimistic edits are layered over it and dropped as a later value
82
- * catches up. `error` always carries `retry` — there is no way to render a
83
- * failed fetch with no recovery action, by construction. */
84
- state: AsyncResourceState<readonly RecordGridRow[]>;
85
- /** Accessible name for the grid. Required — an unnamed grid is unusable with
86
- * a screen reader. */
87
- caption: string;
88
- /** What the empty state says, and what it offers next — `web-react/async`'s
89
- * `AsyncEmptySpec`, so an empty grid reads in the same words as an empty
90
- * list or panel elsewhere in the product. */
91
- empty: AsyncEmptySpec;
92
- /** Persist one created row. Absent → no add affordance. */
93
- onCreate?: (values: Readonly<Record<string, RecordGridValue>>) => Promise<RecordGridCreateOutcome>;
94
- /** Persist one cell edit. Absent → every cell renders read-only. */
95
- onUpdate?: (change: RecordGridCellChange) => Promise<RecordGridWriteOutcome>;
96
- /** Delete one row. Absent → no delete affordance. */
97
- onDelete?: (row: RecordGridRow) => Promise<RecordGridWriteOutcome>;
98
- /** A proposed change set to review against the live rows (see
99
- * `diffRecordGridProposal`). While a non-empty diff is on the table the grid
100
- * is a REVIEW surface, not an editor: cell editing, row add, and row delete
101
- * are inert; changed cells render the struck live value against the
102
- * proposed one; added/removed rows are marked; each diffed row carries
103
- * accept/reject controls. A proposal that diffs to nothing renders the grid
104
- * unchanged — there is nothing to review. */
105
- proposed?: RecordGridProposal;
106
- /** Accept one diffed row — write its proposed values, adopt the addition, or
107
- * confirm the removal. The caller owns what accepting MEANS (a record-store
108
- * review write); the grid reports the decision and the caller moves the row
109
- * out of `proposed`. */
110
- onAcceptRow?: (rowId: string) => void;
111
- /** Reject one diffed row — the live row stands. */
112
- onRejectRow?: (rowId: string) => void;
113
- /** Accept every remaining diffed row at once. */
114
- onAcceptAll?: () => void;
115
- /** Reject every remaining diffed row at once. */
116
- onRejectAll?: () => void;
117
- /** Starting values for the add form. */
118
- newRowDefaults?: Readonly<Record<string, RecordGridValue>>;
119
- /** Label of the add control and of the add form. Defaults to `Add row`. */
120
- addLabel?: string;
121
- /** BCP-47 locale for number, currency, and date display. */
122
- locale?: string;
123
- /** Rendered above the grid — filters, counts, a product action row. */
124
- toolbar?: ReactNode;
125
- /** Skeleton rows in the loading state. Defaults to 3. */
126
- loadingRowCount?: number;
127
- className?: string;
128
- }
44
+ export type { RecordGridCellChange, RecordGridWriteOutcome, RecordGridCreateOutcome, RecordGridProps } from './record-grid-types';
45
+ import type { RecordGridProps } from './record-grid-types';
129
46
  /**
130
47
  * The shared editable record table. A row is a flat value bag keyed by column
131
48
  * id, so a record store's fold output maps straight on: one cell per entry,
@@ -0,0 +1,28 @@
1
+ /** One step of a retained tool run (e.g. a sandbox command + its output). */
2
+ export interface ToolRunStep {
3
+ at: string;
4
+ label: string;
5
+ detail?: string;
6
+ status?: 'ok' | 'error';
7
+ }
8
+ /** A retained tool run keyed by the parent message's toolCallId. The product
9
+ * persists these server-side (fail-closed: only ids its own loop created)
10
+ * and serves them to the drill-in panel. */
11
+ export interface ToolRunRecord {
12
+ toolCallId: string;
13
+ toolName: string;
14
+ title: string;
15
+ status: 'running' | 'complete' | 'error';
16
+ steps: ToolRunStep[];
17
+ }
18
+ /** Define properties required to run a drill and handle its closure event */
19
+ export interface RunDrillInProps {
20
+ run: ToolRunRecord;
21
+ onClose: () => void;
22
+ }
23
+ /**
24
+ * Readonly side panel showing a retained tool run's transcript — the
25
+ * "drill into what the sandbox actually did" view. Follow-ups happen in the
26
+ * main chat, never here.
27
+ */
28
+ export declare function RunDrillIn({ run, onClose }: RunDrillInProps): import("react").JSX.Element;
@@ -0,0 +1,25 @@
1
+ /** Slash-command and skill selection for plain and rich composer inputs. */
2
+ import { type RefObject } from 'react';
3
+ import { type CommandPaletteItem } from '../session-shell/index';
4
+ import type { ChatComposerProps } from './chat-composer-types';
5
+ type ComposerCommandsOptions = Pick<ChatComposerProps, 'mention' | 'slashCommands' | 'onSelectedSkillChange'> & {
6
+ text: string;
7
+ textRef: RefObject<string>;
8
+ setText: (next: string) => void;
9
+ eligibleSkills: NonNullable<ChatComposerProps['eligibleSkills']>;
10
+ };
11
+ export declare function useComposerCommands({ text, textRef, setText, mention, slashCommands, eligibleSkills, onSelectedSkillChange }: ComposerCommandsOptions): {
12
+ cardRef: RefObject<HTMLDivElement | null>;
13
+ slashPanelRef: RefObject<HTMLDivElement | null>;
14
+ slashListId: string;
15
+ setMentionSuggestionOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
16
+ slashActiveIndex: number;
17
+ slashOpen: boolean;
18
+ slashFiltered: CommandPaletteItem[];
19
+ skillQuery: string | undefined;
20
+ hasSkills: boolean;
21
+ setSlashActive: import("react").Dispatch<import("react").SetStateAction<number>>;
22
+ pickSlash: (id: string) => void;
23
+ handleSlashKeyDown: (e: Pick<globalThis.KeyboardEvent, 'key' | 'shiftKey' | 'preventDefault'>) => boolean;
24
+ };
25
+ export {};
@@ -0,0 +1,20 @@
1
+ /** One accepted-file path for file pickers, clipboard pastes, and drops. */
2
+ import { type ChangeEvent, type ClipboardEvent, type DragEvent } from 'react';
3
+ import type { ChatComposerProps } from './chat-composer-types';
4
+ type ComposerFileIntakeOptions = Pick<ChatComposerProps, 'onAttach' | 'onAttachFolder' | 'accept' | 'onRejectFiles'> & {
5
+ pendingFiles: NonNullable<ChatComposerProps['pendingFiles']>;
6
+ };
7
+ export declare function useComposerFileIntake({ onAttach, onAttachFolder, accept, onRejectFiles, pendingFiles }: ComposerFileIntakeOptions): {
8
+ fileInputRef: import("react").RefObject<HTMLInputElement | null>;
9
+ folderInputRef: import("react").RefObject<HTMLInputElement | null>;
10
+ dragOver: boolean;
11
+ handleFileChange: (e: ChangeEvent<HTMLInputElement>) => void;
12
+ handleFolderChange: (e: ChangeEvent<HTMLInputElement>) => void;
13
+ handlePaste: (e: ClipboardEvent<HTMLTextAreaElement>) => void;
14
+ ingestPastedFiles: (clipboardFiles: FileList) => boolean;
15
+ handleDragEnter: (e: DragEvent) => void;
16
+ handleDragLeave: (e: DragEvent) => void;
17
+ handleDragOver: (e: DragEvent) => void;
18
+ handleDrop: (e: DragEvent) => void;
19
+ };
20
+ export {};
@@ -0,0 +1,34 @@
1
+ /** Optimistic send admission, rejected-draft recovery, and explicit retry. */
2
+ import { type RefObject } from 'react';
3
+ import type { ChatComposerProps, ComposerFilePart } from './chat-composer-types';
4
+ interface FailedSend {
5
+ message: string;
6
+ /** The user's exact draft, untrimmed — what a restore puts back. */
7
+ text: string;
8
+ /** The trimmed form the handler was called with, so Retry sends the same
9
+ * bytes the rejected attempt did. */
10
+ trimmed: string;
11
+ parts: ComposerFilePart[];
12
+ restored: boolean;
13
+ }
14
+ type ComposerSendOptions = Pick<ChatComposerProps, 'onSend' | 'onSendParts' | 'onSendFailed' | 'attachmentsNotReadyMessage' | 'selectedSkillId'> & {
15
+ text: string;
16
+ textRef: {
17
+ current: string;
18
+ };
19
+ textareaRef: RefObject<HTMLTextAreaElement | null>;
20
+ setText: (next: string) => void;
21
+ pendingFiles: NonNullable<ChatComposerProps['pendingFiles']>;
22
+ sendFailureMessage: string;
23
+ sendBlockedByStream: boolean;
24
+ disabled: boolean;
25
+ sendDisabled: boolean;
26
+ canSubmitAttachmentsOnly: boolean;
27
+ };
28
+ export declare function useComposerSend({ text, textRef, textareaRef, setText, pendingFiles, sendFailureMessage, sendBlockedByStream, disabled, sendDisabled, canSubmitAttachmentsOnly, onSend, onSendParts, onSendFailed, attachmentsNotReadyMessage, selectedSkillId }: ComposerSendOptions): {
29
+ failedSend: FailedSend | null;
30
+ setFailedSend: import("react").Dispatch<import("react").SetStateAction<FailedSend | null>>;
31
+ send: () => void;
32
+ retryFailedSend: () => void;
33
+ };
34
+ export {};
@@ -3,7 +3,7 @@ import {
3
3
  ActionDialogButton,
4
4
  WorkspaceInitial,
5
5
  WorkspaceSwitcher
6
- } from "../chunk-5IZRAZEZ.js";
6
+ } from "../chunk-ZDPUC6CM.js";
7
7
  import {
8
8
  WorkspacePrewarmContext,
9
9
  useWorkspacePrewarm
@@ -15,13 +15,13 @@ import {
15
15
  } from "../chunk-SJWIZT7B.js";
16
16
  import {
17
17
  usePopoverDialog
18
- } from "../chunk-JYVUFRRV.js";
18
+ } from "../chunk-FUZETA6Z.js";
19
19
  import {
20
20
  CheckGlyph,
21
21
  OVERLAY_SHADOW,
22
22
  PopoverSurface,
23
23
  usePopover
24
- } from "../chunk-XIN7DOAB.js";
24
+ } from "../chunk-R4X5474U.js";
25
25
  import "../chunk-RASGKEAL.js";
26
26
  import "../chunk-AMUXRAUO.js";
27
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-app",
3
- "version": "0.60.235",
3
+ "version": "0.60.236",
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": [