@llmnative/agentico 0.4.0 → 0.5.0

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.
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { AIModelDescriptor, ChatbotAction, DataProviderAdapter, StorageProviderAdapter } from '@llmnative/react';
2
+ import type { AIModelDescriptor, ChatbotAction, DataProviderAdapter, EditorCommand, StorageProviderAdapter } from '@llmnative/react';
3
3
  import type { AgentActivityEntry, AgentConversation } from './useAgent';
4
4
  import type { ResultDestination } from '../domain/resultDestination';
5
5
  import type { SubagentUsageCard } from '../domain/subagentUsageCard';
@@ -99,6 +99,8 @@ export interface AgenticoTask<TResult = unknown> {
99
99
  panelActions?: React.ReactNode;
100
100
  /** Buttons of the host in the composer (see registerSubagentControls, CR-003). */
101
101
  composerActions?: ChatbotAction[];
102
+ /** Slash commands of the host in the composer (see registerSubagentControls, CR-006). */
103
+ composerCommands?: EditorCommand[];
102
104
  /** Chiamato quando questo task viene sostituito da uno nuovo (vedi openTask) o quando
103
105
  * l'utente lo interrompe — SEMPRE definito da chi possiede il task
104
106
  * (OrchestratorRunner/SubagentRunner), mai un fallback generico su closeTask: quel
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ChatbotAction } from '@llmnative/react';
2
+ import type { ChatbotAction, EditorCommand } from '@llmnative/react';
3
3
  /** What the controls of a subagent receive (CR-003). */
4
4
  export interface SubagentControlsProps {
5
5
  /** The raw params the subagent was started with. */
@@ -15,12 +15,20 @@ export interface SubagentControlsProps {
15
15
  export interface SubagentControls {
16
16
  /** Buttons of the composer, next to the attachments (`ChatbotAction` with `onClick`). */
17
17
  actions?: ChatbotAction[];
18
+ /**
19
+ * Slash commands of the composer (CR-006): typing `/` opens a menu of them (`EditorCommand`
20
+ * of `@llmnative/react`, as `Chatbot commands`). A command without `handler` inserts
21
+ * `/name ` in the text; the message is sent as it is, so the executor's turn receives
22
+ * `text` like `"/to-spec ..."` — what it means is up to the host. Not offered while docked
23
+ * questions take the place of the composer (CR-005).
24
+ */
25
+ commands?: EditorCommand[];
18
26
  /** Shown above the composer while the task is open. */
19
27
  content?: ReactNode;
20
28
  }
21
29
  /**
22
30
  * A React hook of the host: called by the runner of each task of its subagent, on every render.
23
- * Its `actions` and `content` must keep their identity while nothing changes (`useMemo`): a new
31
+ * Its `actions`, `commands` and `content` must keep their identity while nothing changes (`useMemo`): a new
24
32
  * one registers the task again, and a new one at every render would never stop.
25
33
  */
26
34
  export type UseSubagentControls = (props: SubagentControlsProps) => SubagentControls;
package/llms.txt CHANGED
@@ -9,7 +9,7 @@
9
9
  - `registerSubagents(manifests)` — SubagentManifest: id, label, icon, description, indexPath, commands (name, summary, Zod inputSchema, describeOutput), definition (AgentDefinition), toParams, destinationIds, optional crossAgentToolIds, withCollected, manualEntry, componentContexts, chatEntityId (chat saved at every turn under that entity), onlyWhenAnchored (offered by the orchestrator only when scoped to it).
10
10
  - `registerDestinations({ id: ResultDestination })` — apply(result, { scopeId, dataProvider, storageProvider, proxyFetch }, meta).
11
11
  - `registerSubagentReports({ subagentId: SubagentReportModule })`.
12
- - `registerSubagentControls({ subagentId: useControls })` — a hook of the host per task (props: params, taskId, running, close) returning `{ actions?: ChatbotAction[] (with onClick), content?: ReactNode }`, memoized: actions in the prompt, content above it.
12
+ - `registerSubagentControls({ subagentId: useControls })` — a hook of the host per task (props: params, taskId, running, close) returning `{ actions?: ChatbotAction[] (with onClick), commands?: EditorCommand[], content?: ReactNode }`, memoized: actions in the prompt, slash commands on `/` (a command without handler inserts `/name `; the turn gets it as plain `text`, the host decides what it means; hidden while docked questions replace the composer), content above it.
13
13
  - `SubagentManifest.onArchive(entityId, params)` / `confirmArchive(entityId, params)` — archiving a chat from the history (hover icon).
14
14
  - `registerCrossAgentTools((ctx) => AgentTool[])` — ctx: attachmentsRef, collected (per-conversation scratchpad), proxyFetch.
15
15
  - `configureAgenticoPrompts(partial)` — model-facing pack; `agenticoPromptsEn` (default) / `agenticoPromptsIt`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/agentico",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Agentic chat orchestrator for @llmnative/react apps: a persistent panel that talks with the user and hands the work to host-registered subagents.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",