@llmnative/agentico 0.8.0 → 0.9.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.
@@ -190,4 +190,10 @@ export interface AgentExecutor<TParams, TContext, TResult> {
190
190
  group: string;
191
191
  badge?: AgentModelGroupBadge;
192
192
  };
193
+ /**
194
+ * CR-010: the providers of the AI catalog this chat may run on (absent: all). The composer lists only
195
+ * their models; a model of another provider is never used: the first model of the executor is picked
196
+ * instead, else the first allowed model of the catalog.
197
+ */
198
+ catalogProviders?(params: TParams): readonly string[] | undefined;
193
199
  }
@@ -28,7 +28,11 @@ export interface EntityChatSnapshot {
28
28
  params: Record<string, unknown>;
29
29
  history: AIConversationTurn[];
30
30
  activity: EntityChatActivityEntry[];
31
+ /** When it was last saved: its last message. */
31
32
  savedAt: number;
33
+ /** CR-010: when it started (its first save), kept by every later save. Absent on a chat saved
34
+ * before 0.9.0: read it with `chatStartedAt`. */
35
+ startedAt?: number;
32
36
  /** Etichetta human-friendly dell'entità (es. il nome del tema) — usata dallo storico chat
33
37
  * di Agentico (vedi Agentico.tsx) per mostrare "cosa" senza dover rileggere l'entità stessa
34
38
  * dal suo DataProviderAdapter (che questo store, domain-side, non possiede). */
@@ -42,14 +46,15 @@ export declare function configureEntityChatStore(options: {
42
46
  * stata rimossa, vedi removeEntityChat). */
43
47
  export declare function getEntityChat(scopeId: string, subagentId: string, entityId: string): EntityChatSnapshot | null;
44
48
  /** Sovrascrive (o crea) la chat associata a questa entità — vedi il commento in testa al file
45
- * per perché è sempre un overwrite, mai un accumulo. */
46
- export declare function saveEntityChat(snapshot: Omit<EntityChatSnapshot, 'savedAt'>): void;
49
+ * per perché è sempre un overwrite, mai un accumulo. Its start (CR-010) stays the one of its first save. */
50
+ export declare function saveEntityChat(snapshot: Omit<EntityChatSnapshot, 'savedAt' | 'startedAt'>): void;
51
+ /** CR-010: when a chat started; a chat saved before 0.9.0, which does not know it: its last save. */
52
+ export declare const chatStartedAt: (snapshot: Pick<EntityChatSnapshot, 'savedAt' | 'startedAt'>) => number;
47
53
  /** Rimuove la chat di un'entità — chiamata quando l'entità stessa viene eliminata, altrimenti
48
54
  * resterebbe un'entry orfana senza nulla a cui riattaccarsi. */
49
55
  export declare function removeEntityChat(scopeId: string, subagentId: string, entityId: string): void;
50
- /** Tutte le chat salvate di uno scope, più recenti prima — per lo storico di Agentico
51
- * (Agentico.tsx), che le mescola across subagent (theme, redirects, html-to-liquid) in un'unica
52
- * lista ordinata per data. */
56
+ /** Tutte le chat salvate di uno scope, le ultime iniziate prima (CR-010: riaprirne una non la sposta)
57
+ * — per lo storico di Agentico (Agentico.tsx), che le mescola across subagent in un'unica lista. */
53
58
  export declare function listEntityChats(scopeId: string): EntityChatSnapshot[];
54
59
  /** The id of the Agentico task of the chat of an entity: the same when the chat is resumed from
55
60
  * the history and when a page starts it again (AgenticoContext.startSubagent), so it stays one
@@ -44,6 +44,9 @@ export interface AgenticoDict {
44
44
  /** `{label}` = subagent label */
45
45
  newInstance: string;
46
46
  chatHistory: string;
47
+ /** CR-010: the tooltip of a chat of the history, `{at}` its start and its last message. */
48
+ chatStarted: string;
49
+ chatLastMessage: string;
47
50
  newChat: string;
48
51
  searchChats: string;
49
52
  messagePlaceholder: string;
@@ -15,7 +15,7 @@ export { extractJsonBlock } from './domain/extractJsonBlock';
15
15
  export type { ResultDestination, DestinationContext, ResultDestinationOutcome } from './domain/resultDestination';
16
16
  export { jsonExportDestination, JSON_EXPORT_DESTINATION_ID } from './domain/jsonExportDestination';
17
17
  export { registerDestinations, getDestinationRegistry } from './domain/destinationRegistry';
18
- export { configureEntityChatStore, saveEntityChat, getEntityChat, listEntityChats, removeEntityChat, entityChatTaskId, type EntityChatSnapshot, } from './domain/entityChatStore';
18
+ export { configureEntityChatStore, saveEntityChat, chatStartedAt, getEntityChat, listEntityChats, removeEntityChat, entityChatTaskId, type EntityChatSnapshot, } from './domain/entityChatStore';
19
19
  export { agenticoTranslations, agenticoEn, agenticoIt, agenticoDe, useAgenticoI18n, type AgenticoDict } from './i18n';
20
20
  export { Agentico, AGENTICO_WIDTH, type AgenticoProps } from './presentation/Agentico';
21
21
  export { AGENTICO_MIN_WIDTH, AGENTICO_MAX_WIDTH, AGENTICO_WIDTH_STORAGE_KEY, type AgenticoPanelSize } from './presentation/panelWidth';
package/llms.txt CHANGED
@@ -44,5 +44,6 @@ buildContext (always runs) · buildPrompt · buildFollowUpPrompt · parseRespons
44
44
 
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
+ 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.
47
48
 
48
49
  Message parts (0.3.0): the turn also has `onText(text, { id?, done? })` (without id: the one reply, kept below steps and reasoning; with id: a text part of its own), `onReasoning(text, { id?, done?, duration? })` (whole text so far; shown closed, "Reasoned for N s", duration measured if not given), `onQuestions(questions, { id? }) → Promise<answers>` (questions `{ id?, header?, question, options?: [{ label, description? }], multiple?, recommended?, custom? }`; answers `[{ id?, header?, values: string[] }]`). Answers given while the turn runs resolve that promise; given later (or after a reload) they start a new turn with `text: ''` and `answers: { id, answers }` (id = the questions part id, default `questions-N`). Parts are kept in `AgentActivityEntry.parts` (`text` | `reasoning` | `tool` | `questions`, `detail` = the text) and saved with the chat; old chats without parts show `detail`. Rendered with `ChatMarkdown`, `ChatReasoning`, steps grouped in a `Tree`, `ChatQuestions` (needs `@llmnative/react` 1.34). `useAgent().answerQuestions(entryId, partId, answers)`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/agentico",
3
- "version": "0.8.0",
3
+ "version": "0.9.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",