@llmnative/agentico 0.13.2 → 0.14.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.
- package/README.md +1 -0
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +98 -84
- package/dist/index.mjs.map +1 -1
- package/dist/types/domain/agentDefinition.d.ts +5 -0
- package/dist/types/presentation/useAgent.d.ts +5 -1
- package/llms.txt +1 -0
- package/package.json +1 -1
|
@@ -95,6 +95,11 @@ export interface AgentDefinition<TParams, TContext, TResult> {
|
|
|
95
95
|
* For an agent that talks and uses tools, with nothing to save at the end. `parseResponse`
|
|
96
96
|
* still runs on each reply (what `run` and `sendMessage` resolve to). */
|
|
97
97
|
conversational?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* CR-015: false = no "Continue without AI" when the model fails: the agent has no result of its own without a
|
|
100
|
+
* model (e.g. a chat), so only Retry is offered. Absent: offered, as before.
|
|
101
|
+
*/
|
|
102
|
+
offersFallback?: boolean;
|
|
98
103
|
/**
|
|
99
104
|
* CR-014: runs an action of a card of the chat (the host's: open what it drafted, discard it…); its outcome
|
|
100
105
|
* goes into the card, whose buttons are then off. A rejection is shown as an error of the card.
|
|
@@ -156,13 +156,17 @@ export interface UseAgentResult<TParams, TResult> extends AgentControlState {
|
|
|
156
156
|
* answers and shows them read-only. Resolves with the result of that new turn, if any; rejects
|
|
157
157
|
* (leaving the form open) when another turn is running or the entry is not of this conversation. */
|
|
158
158
|
answerQuestions: (entryId: string, partId: string, answers: AgentQuestionAnswer[]) => Promise<TResult | null>;
|
|
159
|
+
/** CR-015: the agent has a result of its own without a model ("Continue without AI"). */
|
|
160
|
+
offersFallback: boolean;
|
|
159
161
|
/** CR-014: an action of a card of the chat, run by the host; its outcome goes into the card. */
|
|
160
162
|
cardAction: (entryId: string, partId: string, actionId: string) => Promise<void>;
|
|
161
163
|
}
|
|
162
164
|
/** Solo la fetta di UseAgentResult che serve a un consumer del pannello globale (Agentico.tsx)
|
|
163
165
|
* per continuare una conversazione già avviata da run() — TParams non compare in nessuno dei
|
|
164
166
|
* membri qui sotto, quindi `never` è innocuo. */
|
|
165
|
-
export type AgentConversation<TResult> = Pick<UseAgentResult<never, TResult>, 'canContinue' | 'remote' | 'remoteModels' | 'alongside' | 'catalogGroup' | 'running' | 'error' | 'activity' | 'sendMessage' | 'stop' | 'runFallback' | 'snapshot' | 'answerQuestions' | 'cardAction'>;
|
|
167
|
+
export type AgentConversation<TResult> = Pick<UseAgentResult<never, TResult>, 'canContinue' | 'remote' | 'remoteModels' | 'alongside' | 'catalogGroup' | 'running' | 'error' | 'activity' | 'sendMessage' | 'stop' | 'runFallback' | 'snapshot' | 'answerQuestions' | 'cardAction' | 'offersFallback'>;
|
|
168
|
+
/** The entries of a reopened chat: what was still running stopped, what was streaming done. */
|
|
169
|
+
export declare function settleActivity(activity: AgentActivityEntry[]): AgentActivityEntry[];
|
|
166
170
|
export declare function useAgent<TParams, TContext, TResult>(definition: AgentDefinition<TParams, TContext, TResult>, options?: {
|
|
167
171
|
defaultEnabled?: boolean;
|
|
168
172
|
}): UseAgentResult<TParams, TResult>;
|
package/llms.txt
CHANGED
|
@@ -45,6 +45,7 @@ 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-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.
|
|
48
49
|
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)`.
|
|
49
50
|
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.
|
|
50
51
|
CR-012: `executor.catalogReasoning(params, provider) → 'low' | 'medium' | 'high' | 'max' | undefined`: the turns of the chat on that provider of the catalog send `reasoning` on each request (@llmnative/react 1.46 maps it per provider).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmnative/agentico",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.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",
|