@tangle-network/agent-app 0.51.10 → 0.51.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.
@@ -151,8 +151,16 @@ export interface SlashCommand {
151
151
  description: string;
152
152
  run: () => void;
153
153
  }
154
+ /** A skill the host has made eligible for this turn. The id is the value the
155
+ * host validates and sends; the name and description are display metadata. */
156
+ export interface ComposerSkillOption {
157
+ id: string;
158
+ name: string;
159
+ description: string;
160
+ }
154
161
  export interface ChatComposerProps {
155
- /** Send the trimmed, non-empty message. Attached files travel separately via
162
+ /** Send the trimmed message, or an empty message when a skill is selected.
163
+ * Attached files travel separately via
156
164
  * `onAttach` + `pendingFiles` (the host consumes and clears them on send).
157
165
  * Optional when `onSendParts` is wired.
158
166
  *
@@ -271,9 +279,8 @@ export interface ChatComposerProps {
271
279
  * react, starter-kit, suggestion) are OPTIONAL peers — a consumer installs
272
280
  * them to use this prop.
273
281
  *
274
- * The rich input owns its own keyboard surface, so `slashCommands` is
275
- * disabled while `mention` is set rather than left half-armed with a menu
276
- * no key can reach; no shipped surface combines the two. Seed and
282
+ * General `slashCommands` remain disabled while `mention` is set; the
283
+ * skill picker has explicit keyboard handling in both input modes. Seed and
277
284
  * failed-send drafts still apply in mention mode, but caret placement (a
278
285
  * textarea affordance) degrades to content-only.
279
286
  */
@@ -282,6 +289,14 @@ export interface ChatComposerProps {
282
289
  * Omit (or pass []) and `/` types as ordinary text. Inert while `mention`
283
290
  * is set — see {@link mention}. */
284
291
  slashCommands?: SlashCommand[];
292
+ /** Skills available in the current authenticated workspace and harness.
293
+ * The host resolves eligibility; this list only drives selection UI. */
294
+ eligibleSkills?: ReadonlyArray<ComposerSkillOption>;
295
+ /** The host-owned skill selected for the next turn. */
296
+ selectedSkillId?: string | null;
297
+ /** Picking or removing a skill reports its typed id and display metadata.
298
+ * The host persists selection through queued turns and rejected sends. */
299
+ onSelectedSkillChange?: (skill: ComposerSkillOption | null) => void;
285
300
  /** Dictation is opt-in: pass `onDictate` and the action row gains a mic
286
301
  * button (browsers without `MediaRecorder`/`getUserMedia` render none).
287
302
  * Click starts the capture; the button flips to a stop control with the
@@ -310,4 +325,4 @@ export interface ChatComposerProps {
310
325
  sendTone?: 'contrast' | 'primary';
311
326
  className?: string;
312
327
  }
313
- export declare function ChatComposer({ onSend, onSendParts, onSendFailed, sendFailureMessage, onCancel, isStreaming, disabled, placeholder, value, onValueChange, initialValue, seed, onSeedApplied, controls, controlsPlacement, onAttach, onAttachFolder, pendingFiles, onRemoveFile, onRetryFile, accept, onRejectFiles, dropTitle, dropDescription, contextItems, canSubmitAttachmentsOnly, attachmentsNotReadyMessage, canSubmitWhileBusy, autoFocus, minRows, maxHeight, trailing, mention, slashCommands, onDictate, onDictateError, focusShortcut, floating, sendLabel, sendVariant, sendTone, className, }: ChatComposerProps): import("react").JSX.Element;
328
+ export declare function ChatComposer({ onSend, onSendParts, onSendFailed, sendFailureMessage, onCancel, isStreaming, disabled, placeholder, value, onValueChange, initialValue, seed, onSeedApplied, controls, controlsPlacement, onAttach, onAttachFolder, pendingFiles, onRemoveFile, onRetryFile, accept, onRejectFiles, dropTitle, dropDescription, contextItems, canSubmitAttachmentsOnly, attachmentsNotReadyMessage, canSubmitWhileBusy, autoFocus, minRows, maxHeight, trailing, mention, slashCommands, eligibleSkills, selectedSkillId, onSelectedSkillChange, onDictate, onDictateError, focusShortcut, floating, sendLabel, sendVariant, sendTone, className, }: ChatComposerProps): import("react").JSX.Element;
@@ -177,7 +177,7 @@ import {
177
177
  renamePastedImages,
178
178
  useComposerAttachments,
179
179
  useDictation
180
- } from "../chunk-OSZBBLK5.js";
180
+ } from "../chunk-BYAQQPLN.js";
181
181
  import "../chunk-L7MB2LLM.js";
182
182
  import {
183
183
  DEFAULT_EFFORT_LEVELS,
@@ -49,6 +49,14 @@ export interface MentionEditorProps {
49
49
  /** Registers a focus callback the composer wires to Cmd/Ctrl+L; called with
50
50
  * `null` on unmount so the composer never focuses a destroyed editor. */
51
51
  registerFocus?: (focus: (() => void) | null) => void;
52
+ /** Handles the shared skill slash menu before Enter would submit a turn. */
53
+ onComposerKeyDown?: (event: globalThis.KeyboardEvent) => boolean;
54
+ /** Lets the composer hide its slash menu while @ suggestions own the keys. */
55
+ onMentionMenuOpenChange?: (open: boolean) => void;
56
+ /** Accessible listbox state for the shared slash picker. `@` suggestions
57
+ * take priority when both inputs have candidate state. */
58
+ slashListId?: string;
59
+ slashActiveId?: string;
52
60
  /**
53
61
  * Clipboard files pulled off a paste. Returns true when consumed so the
54
62
  * editor suppresses its default text paste — the same funnel the textarea
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-app",
3
- "version": "0.51.10",
3
+ "version": "0.51.12",
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": [