@llmnative/agentico 0.15.2 → 0.16.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.
@@ -140,6 +140,8 @@ export interface AgentExecutorTurn<TParams, TContext> {
140
140
  rewound?: {
141
141
  activity: EntityChatActivityEntry[];
142
142
  };
143
+ /** CR-017: the files the person sent with this message (`AgentExecutor.attachments`), as the AI providers take them. */
144
+ attachments?: AIAttachment[];
143
145
  /** Present when the person answered questions of an earlier turn (CR-004): the turn carries
144
146
  * them, structured, with `text` empty. The executor decides how to forward them (e.g. to the
145
147
  * `question` tool of its session). Questions answered while their own turn is still running
@@ -212,6 +214,11 @@ export interface AgentExecutor<TParams, TContext, TResult> {
212
214
  * Edit: what the executor keeps of the conversation would not go back with the chat.
213
215
  */
214
216
  canRewind?: boolean;
217
+ /**
218
+ * CR-017: the executor takes files with a message (chosen, dropped or pasted in the composer), which then offers
219
+ * them on its models too; they reach its turn as `attachments`. Without it, no attachments on its models.
220
+ */
221
+ attachments?: boolean;
215
222
  /** CR-009: the group (and its badge) the models of the AI catalog are listed under, next to the executor's. */
216
223
  catalogGroup?(provider: string, label: string): {
217
224
  group: string;
@@ -66,7 +66,6 @@ export interface AgenticoDict {
66
66
  /** User message sent to the model by the retry button */
67
67
  retryMessage: string;
68
68
  /** CR-016: the actions on a message of the person, the composer while editing one, the confirmation. */
69
- retryFromHere: string;
70
69
  editMessage: string;
71
70
  editingMessage: string;
72
71
  cancelEdit: string;
@@ -13,7 +13,7 @@ import type { AgentCardPart, AgentQuestionAnswer, AgentQuestionsPart } from '../
13
13
  * (prima tutte le bolle erano sticky nella stessa lista, e una bolla più alta spuntava sotto
14
14
  * una più bassa, sopra il testo). Sfondo pieno e `z-20`: il testo che scorre sotto (tabelle,
15
15
  * codice) non le passa sopra. */
16
- /** CR-016: what the person can do on one of their messages: send it again from there, or edit it. */
16
+ /** CR-016: what the person can do on one of their messages: edit it, or send it again when its answer was cut. */
17
17
  export interface UserMessageActions {
18
18
  /** Whether the message has them (a message of this conversation, with where the chat goes back to). */
19
19
  available: (entry: AgentActivityEntry) => boolean;
@@ -161,6 +161,8 @@ export interface UseAgentResult<TParams, TResult> extends AgentControlState {
161
161
  canRewind: boolean;
162
162
  /** CR-016: whether a message of the person can be gone back to (it knows, or the history shows, where it was). */
163
163
  rewindable: (entryId: string) => boolean;
164
+ /** CR-017: whether the executor takes files with a message (the composer offers them on its models). */
165
+ executorAttachments: boolean;
164
166
  /** Answers the questions part `partId` of the entry `entryId` (CR-004). If the turn that asked
165
167
  * is still waiting, its `onQuestions` promise resolves; otherwise a new turn of the executor
166
168
  * carries them (`AgentExecutorTurn.answers`, with empty `text`). Either way the part keeps the
@@ -175,7 +177,7 @@ export interface UseAgentResult<TParams, TResult> extends AgentControlState {
175
177
  /** Solo la fetta di UseAgentResult che serve a un consumer del pannello globale (Agentico.tsx)
176
178
  * per continuare una conversazione già avviata da run() — TParams non compare in nessuno dei
177
179
  * membri qui sotto, quindi `never` è innocuo. */
178
- export type AgentConversation<TResult> = Pick<UseAgentResult<never, TResult>, 'canContinue' | 'remote' | 'remoteModels' | 'alongside' | 'catalogGroup' | 'running' | 'error' | 'activity' | 'sendMessage' | 'stop' | 'runFallback' | 'snapshot' | 'answerQuestions' | 'cardAction' | 'offersFallback' | 'rewind' | 'canRewind' | 'rewindable'>;
180
+ export type AgentConversation<TResult> = Pick<UseAgentResult<never, TResult>, 'canContinue' | 'remote' | 'remoteModels' | 'alongside' | 'catalogGroup' | 'running' | 'error' | 'activity' | 'sendMessage' | 'stop' | 'runFallback' | 'snapshot' | 'answerQuestions' | 'cardAction' | 'offersFallback' | 'rewind' | 'canRewind' | 'rewindable' | 'executorAttachments'>;
179
181
  /** The entries of a reopened chat: what was still running stopped, what was streaming done. */
180
182
  export declare function settleActivity(activity: AgentActivityEntry[]): AgentActivityEntry[];
181
183
  export declare function useAgent<TParams, TContext, TResult>(definition: AgentDefinition<TParams, TContext, TResult>, options?: {
package/llms.txt CHANGED
@@ -45,7 +45,8 @@ buildContext (always runs) · buildPrompt · buildFollowUpPrompt · parseRespons
45
45
  `executor.turn({ params, context, text, first, signal, model?, onText(whole reply so far), onStep({ id, label, status }) }) → { text, result? }`; `executor.models(params)` / `defaultModel(params)` put the models of the executor in the composer: the turns go to the host instead of the AI provider; `text` is what the person typed (opening message on the first turn). The conversation is `remote: true`: no attachments, no fallback; the picker shows `remoteModels`.
46
46
  CR-009: `executor.alongside: true` keeps the agent on the AI catalog (prompts, tools, approvals): only the turns whose model is one of `executor.models` go to `executor.turn` (`first` on its first one); the picker shows the executor's models (`{ label, value, group?, groupBadge?: { label, variant? } }`) then the catalog's, grouped by `executor.catalogGroup(provider, label) → { group, badge? }`; `useAgent` gives `alongside`, `catalogGroup`.
47
47
  CR-010: `executor.catalogProviders(params) → string[] | undefined` limits the AI catalog of a chat to those providers (composer and turns; a model of another provider is never used: the executor's first model, else the first allowed one). A saved chat keeps `startedAt` (first save; `chatStartedAt(snapshot)` falls back to `savedAt`); `listEntityChats` lists the last started first and the history shows the start.
48
- CR-016: Retry from here and Edit on a message of the person (hover): `useAgent().rewind(entryId, text?)` cuts the chat and the history of the model at that message (`entry.historyAt`) and sends it again; `canRewind` (always without an executor; with one, only if `executor.canRewind`), and its next turn carries `rewound: { activity }` (start again from the chat as it is). A confirmation lists the steps done after it (they stay done).
48
+ CR-017: `executor.attachments: true` offers attachments on the models of the executor; the turn gets `attachments: AIAttachment[]` (name, mimeType, base64). Going back sends the text again, not the files.
49
+ CR-016: Edit on a message of the person (on hover), Retry on one whose answer was cut (stopped, failed; also the Retry of the error bar): `useAgent().rewind(entryId, text?)` cuts the chat and the history of the model at that message (`entry.historyAt`) and sends it again; `canRewind` (always without an executor; with one, only if `executor.canRewind`), and its next turn carries `rewound: { activity }` (start again from the chat as it is). A confirmation lists the steps done after it (they stay done).
49
50
  CR-015: `AgentDefinition.offersFallback: false` hides "Continue without AI" when the model fails (an agent with no result without a model, e.g. a chat); default shown.
50
51
  CR-014: cards in messages — part `{ type: 'card', id, title, badge?, body?, details?, actions?: [{ id, label, icon?, variant? }], data?, outcome? }`; `AgentTool.card(input, output)` adds one after the tool ran, `turn.onCard(card)` for an executor; `AgentDefinition.onCardAction(params, card, actionId) → { status: 'done' | 'dismissed' | 'error', text, link? }` (stored in the card, buttons off); View opens `details` in a side modal; `useAgent().cardAction(entryId, partId, actionId)`.
51
52
  CR-013: `configureEntityChatStore({ storageKey, backend })` — `EntityChatBackend { load(scopeId), save(snapshot), remove(scopeId, subagentId, entityId) }`: the browser copy stays (sync reads), writes also go to the backend; `syncEntityChats(scopeId)` (AgenticoProvider on scope change) merges by `changedAt`, drops chats gone remotely, sends never-sent ones; a refused removal comes back.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/agentico",
3
- "version": "0.15.2",
3
+ "version": "0.16.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",