@llmnative/agentico 0.20.1 → 0.21.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.
@@ -0,0 +1,27 @@
1
+ import type { AIReasoningLevel } from '@llmnative/react';
2
+ export interface AgenticoSettings {
3
+ /** The model the chats start with on the AI catalog (`provider/model`); absent: the person picks one. */
4
+ defaultModel?: string;
5
+ /** How much the model reasons on the AI catalog when the agent does not say (`executor.catalogReasoning`). */
6
+ reasoning?: AIReasoningLevel;
7
+ /** The providers of the AI catalog the chats may use; absent: all the connected ones. */
8
+ providers?: string[];
9
+ /** The model writes the titles of the chats (CR-011). */
10
+ chatTitles: boolean;
11
+ /** The events of the host (what the other agents did) are shown among the messages (CR-019). */
12
+ threadEvents: boolean;
13
+ }
14
+ export type AgenticoSettingKey = keyof AgenticoSettings;
15
+ export declare const AGENTICO_SETTING_KEYS: readonly AgenticoSettingKey[];
16
+ export declare const DEFAULT_AGENTICO_SETTINGS: AgenticoSettings;
17
+ /** Where the settings the person changes are kept: the host's store (a database, its server). */
18
+ export interface AgenticoSettingsStore {
19
+ load(): Promise<Partial<AgenticoSettings>>;
20
+ save(values: Partial<AgenticoSettings>): Promise<void>;
21
+ }
22
+ /** The value of each setting: fixed by the host, else what the person saved, else the default. */
23
+ export declare function effectiveSettings(saved: Partial<AgenticoSettings>, fixed?: Partial<AgenticoSettings>): AgenticoSettings;
24
+ /** The settings the modal shows: neither fixed nor hidden by the host. */
25
+ export declare function shownSettings(fixed?: Partial<AgenticoSettings>, hidden?: readonly AgenticoSettingKey[]): AgenticoSettingKey[];
26
+ /** The store of this browser, when the host gives none. */
27
+ export declare const browserSettingsStore: AgenticoSettingsStore;
@@ -70,6 +70,23 @@ export interface AgenticoDict {
70
70
  /** CR-019: the filter in the header: show the events of the host, or the conversation only. */
71
71
  showEvents: string;
72
72
  hideEvents: string;
73
+ /** CR-022: the settings modal of Agentico. */
74
+ settingsTitle: string;
75
+ settingsSave: string;
76
+ settingsClose: string;
77
+ settingsChats: string;
78
+ settingsDefaultModel: string;
79
+ settingsDefaultModelNone: string;
80
+ settingsReasoning: string;
81
+ settingsReasoningDefault: string;
82
+ settingsReasoningLow: string;
83
+ settingsReasoningMedium: string;
84
+ settingsReasoningHigh: string;
85
+ settingsReasoningMax: string;
86
+ settingsProviders: string;
87
+ settingsChatTitles: string;
88
+ settingsThreadEvents: string;
89
+ settingsConnectors: string;
73
90
  /** CR-011: renaming a saved chat. */
74
91
  /** CR-014: the whole text of a card, and closing it. */
75
92
  cardView: string;
@@ -23,6 +23,9 @@ export { agenticoTranslations, agenticoEn, agenticoIt, agenticoDe, useAgenticoI1
23
23
  export { Agentico, AGENTICO_WIDTH, type AgenticoProps } from './presentation/Agentico';
24
24
  export { AGENTICO_MIN_WIDTH, AGENTICO_MAX_WIDTH, AGENTICO_WIDTH_STORAGE_KEY, type AgenticoPanelSize } from './presentation/panelWidth';
25
25
  export { AgenticoToggle } from './presentation/AgenticoToggle';
26
+ export { useAgenticoSettings, type AgenticoSettingsConfig } from './presentation/AgenticoSettingsContext';
27
+ export { AgenticoSettingsModal } from './presentation/AgenticoSettingsModal';
28
+ export { AGENTICO_SETTING_KEYS, DEFAULT_AGENTICO_SETTINGS, effectiveSettings, shownSettings, browserSettingsStore, type AgenticoSettings, type AgenticoSettingKey, type AgenticoSettingsStore, } from './domain/settings';
26
29
  export { AgenticoProvider, useAgentico, ORCHESTRATOR_TASK_ID, type AgenticoScope, type AgenticoTask, type ComponentAnchor, } from './presentation/AgenticoContext';
27
30
  export { useAgent, type AgentActivityEntry, type AgentConversation, type UseAgentResult } from './presentation/useAgent';
28
31
  export { useAgenticoPageContext } from './presentation/useAgenticoPageContext';
@@ -5,6 +5,7 @@ import type { ResultDestination } from '../domain/resultDestination';
5
5
  import type { SubagentUsageCard } from '../domain/subagentUsageCard';
6
6
  import { type ChatAuthor, type EntityChatSnapshot } from '../domain/entityChatStore';
7
7
  import type { ThreadEventsSource } from '../domain/threadEvents';
8
+ import { type AgenticoSettingsConfig } from './AgenticoSettingsContext';
8
9
  /** Where results are saved and chats are kept: the host's current tenant, company, workspace…
9
10
  * `null` while the host has none selected — destinations then refuse to save. */
10
11
  export interface AgenticoScope {
@@ -337,8 +338,11 @@ interface AgenticoContextValue {
337
338
  /** Changes at every startSubagent() — React `key` of that SubagentRunner. */
338
339
  startRunId: string | null;
339
340
  }
340
- export declare function AgenticoProvider({ children, scope, person, threadEvents }: {
341
+ export declare function AgenticoProvider({ children, scope, person, threadEvents, settings }: {
341
342
  children: React.ReactNode;
343
+ /** CR-022: the settings of Agentico: where they are kept, which ones the code fixes or hides, and the connectors
344
+ * of the AI providers shown in the settings modal. Keep it stable (memoized). */
345
+ settings?: AgenticoSettingsConfig;
342
346
  scope?: AgenticoScope | null;
343
347
  /** CR-018: who uses the panel: their messages carry their name and picture, kept with the chat. */
344
348
  person?: ChatAuthor | null;
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import type { AIConnectionsProps } from '@llmnative/react';
3
+ import { type AgenticoSettingKey, type AgenticoSettings, type AgenticoSettingsStore } from '../domain/settings';
4
+ /** What the host says about the settings (`<AgenticoProvider settings>`). */
5
+ export interface AgenticoSettingsConfig {
6
+ /** Where the values the person changes are kept; absent: this browser. */
7
+ store?: AgenticoSettingsStore;
8
+ /** Values fixed in code: applied, not shown, not changed. */
9
+ fixed?: Partial<AgenticoSettings>;
10
+ /** Settings not shown: they keep their saved or default value. */
11
+ hidden?: AgenticoSettingKey[];
12
+ /** The section Connectors of the modal: the AI providers (and the host's connectors, e.g. a subscription on a runner). */
13
+ connections?: Omit<AIConnectionsProps, 'className'>;
14
+ }
15
+ interface AgenticoSettingsContextValue {
16
+ settings: AgenticoSettings;
17
+ /** The settings the modal shows. */
18
+ shown: AgenticoSettingKey[];
19
+ connections?: AgenticoSettingsConfig['connections'];
20
+ save: (values: Partial<AgenticoSettings>) => Promise<void>;
21
+ isOpen: boolean;
22
+ open: () => void;
23
+ close: () => void;
24
+ }
25
+ export declare function AgenticoSettingsProvider({ config, children }: {
26
+ config?: AgenticoSettingsConfig;
27
+ children: React.ReactNode;
28
+ }): React.JSX.Element;
29
+ /** The settings of Agentico; the defaults outside `<AgenticoProvider>`. */
30
+ export declare function useAgenticoSettings(): AgenticoSettingsContextValue;
31
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ /** Whether the modal has anything to show: a setting the person changes, or the connectors. */
3
+ export declare function useHasAgenticoSettings(): boolean;
4
+ export declare function AgenticoSettingsModal(): React.JSX.Element | null;
@@ -2,8 +2,11 @@ import React from 'react';
2
2
  import type { ThreadEvent } from '../domain/threadEvents';
3
3
  /** Where the person's choice to see the events or not is kept (this browser only). */
4
4
  export declare const THREAD_EVENTS_STORAGE_KEY = "llmnative.agentico.threadEvents";
5
- /** Whether the events are shown (the filter in the header of the panel): on unless the person turned them off. */
6
- export declare function useShowThreadEvents(): [boolean, (show: boolean) => void];
5
+ /**
6
+ * Whether the events are shown (the filter in the header of the panel): on unless the person turned them off; never
7
+ * when the settings of Agentico turn them off (CR-022), and then the filter is not offered.
8
+ */
9
+ export declare function useShowThreadEvents(): [boolean, (show: boolean) => void, boolean];
7
10
  /** The events of `thread` from `from` to `to`, as the host has them; none without a source or a thread. */
8
11
  export declare function useThreadEvents(thread: string | undefined, from: number, to: number, enabled?: boolean): ThreadEvent[];
9
12
  /** One event: who did it in the column on the left, what happened next to their name, its time; opened, what it said. */
@@ -6,4 +6,10 @@ export interface UseAIModelCatalogResult {
6
6
  selectedModel: string;
7
7
  setSelectedModel: (id: string) => void;
8
8
  }
9
- export declare function useAIModelCatalog(): UseAIModelCatalogResult;
9
+ /**
10
+ * The AI catalog of the chats: the providers the settings allow (CR-022), and the model picked — else the one
11
+ * the settings start with. `unfiltered`: every connected provider (the settings modal).
12
+ */
13
+ export declare function useAIModelCatalog({ unfiltered }?: {
14
+ unfiltered?: boolean;
15
+ }): UseAIModelCatalogResult;
package/llms.txt CHANGED
@@ -54,6 +54,8 @@ CR-012: `executor.catalogReasoning(params, provider) → 'low' | 'medium' | 'hig
54
54
  CR-018: `SubagentManifest.thread(params)` makes the saved chats of the scope with the same key sessions of one chat: the panel shows the earlier ones above the open one, read-only (no questions, Retry or Edit), one more each time the person scrolls to the top or presses "Earlier session", each opened by a separator (title, start, "Continue this session" resumes it) and "This session" above the open one; the model reads only the open session. `SubagentManifest.speaker(params)` → `{ name, avatarUrl? }` puts the picture of the agent in a column on the left, its name next to it with a closed summary of the reasoning and steps before its text ("Reasoned for 4 s · 1 step", opened with a click), the text under them; `<AgenticoProvider person={{ name, avatarUrl? }}>` writes `author` on each message of the person (kept in the snapshot): their picture in the same column, Edit and Retry under it, the name above the full-width message; without a picture an `Identicon` of the name. `chatThreadOf(snapshot)`, `earlierSessions(scopeId, thread, openTaskId)`.
55
55
  CR-019: `<AgenticoProvider threadEvents={source}>` (keep it memoized): `source.load(thread, from, to)` → `ThreadEvent[]` (`id`, `at` ms, `author` ChatAuthor, `title`, optional `body` Markdown, `badge`, `href`, `icon`), optional `source.subscribe(thread, onChange)` → unsubscribe. In a chat with a `thread` the panel shows them among the turns by time (`placeEvents`), as compact cards with the author's picture in the left column (opened: the body; a link to `href`); the open session from the last message of the session before it, each earlier one up to its last message. Header filter "Conversation only" (kept in this browser, `llmnative.agentico.threadEvents`). The model never reads them. Every entry of a chat now keeps `at` (when it was born); entries saved before 0.18.0 have none.
56
56
  CR-020: the images attached to a message of the person stay in sight as previews (`entry.attachmentPreviews`: JPEG data URLs of at most 480 px a side, the first 4 images, drawn in the browser by `imagePreviews(files)` and kept with the chat); a click opens one larger; files without a preview stay as their names. `ThreadEvent.running: true` shows a spinner in place of its icon (an agent still at work on it).
57
+ CR-022: `<AgenticoProvider settings={{ store?, fixed?, hidden?, connections? }}>` (memoized). Settings `defaultModel` (`provider/model` the chats start with), `reasoning` (when `executor.catalogReasoning` says nothing), `providers` (the AI catalog the chats may use), `chatTitles`, `threadEvents`: fixed > saved (host `store.load/save`, default this browser) > default. The gear in the panel header opens `AgenticoSettingsModal`: the settings neither fixed nor hidden, and `connections` as `AIConnections` (@llmnative/react 3.2). `useAgenticoSettings()` → `{ settings, shown, save, open, close }`. Peer `@llmnative/react` ^3.2.0.
58
+
57
59
  CR-021: `ThreadEvent.open: true` shows its body at once; `ThreadEvent.actions: [{ id, label, icon?, primary? }]` are buttons on its card, run by `ThreadEventsSource.onAction(event, actionId, chat)`: `chat.compose(text)` puts a text in the field of the chat open in the panel (the person changes and sends it), `chat.send(text)` sends it as a message of the person (composed instead while a turn runs). `useAgentico().compose(text)` does the same anywhere (it opens the panel).
58
60
  CR-011: `SubagentManifest.autoTitle: true` gives its saved chats a title from the model (after a turn; once per session for older ones; a model of the catalog the chat may use), drops conversational chats where the person never wrote; `snapshot.name`/`namedBy`, `chatTitle(snapshot)`, `renameEntityChat(scopeId, subagentId, entityId, title, 'person' | 'model')` (the person's wins; empty resets), `onEntityChatsChange(listener)`; the history has Rename.
59
61
 
package/package.json CHANGED
@@ -1,79 +1,81 @@
1
- {
2
- "name": "@llmnative/agentico",
3
- "version": "0.20.1",
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
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
7
- "types": "dist/types/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/types/index.d.ts",
11
- "import": "./dist/index.mjs",
12
- "require": "./dist/index.js"
13
- }
14
- },
15
- "files": [
16
- "dist",
17
- "llms.txt"
18
- ],
19
- "sideEffects": false,
20
- "scripts": {
21
- "build": "vite build && tsc -p tsconfig.build.json",
22
- "typecheck": "tsc --noEmit",
23
- "test": "vitest run",
24
- "test:watch": "vitest",
25
- "prepublishOnly": "npm run build",
26
- "release:check": "node scripts/release/check-release.mjs"
27
- },
28
- "repository": {
29
- "type": "git",
30
- "url": "git+https://github.com/sherpadvisorylab/llmnative-agentico.git"
31
- },
32
- "bugs": {
33
- "url": "https://github.com/sherpadvisorylab/llmnative-agentico/issues"
34
- },
35
- "homepage": "https://github.com/sherpadvisorylab/llmnative-agentico#readme",
36
- "keywords": [
37
- "llmnative",
38
- "agent",
39
- "orchestrator",
40
- "subagent",
41
- "ai",
42
- "react"
43
- ],
44
- "author": "wolfgan",
45
- "license": "Apache-2.0",
46
- "engines": {
47
- "node": ">=24.18.0 <25"
48
- },
49
- "packageManager": "npm@11.11.0",
50
- "peerDependencies": {
51
- "@llmnative/react": "^1.34.0 || ^2.0.0",
52
- "react": "^19.2.0",
53
- "react-dom": "^19.2.0",
54
- "zod": "^3.24.1"
55
- },
56
- "dependencies": {
57
- "zod-to-json-schema": "^3.24.1"
58
- },
59
- "devDependencies": {
60
- "@llmnative/react": "^1.34.0",
61
- "@phosphor-icons/react": "^2.1.10",
62
- "@testing-library/jest-dom": "^7.0.1",
63
- "@testing-library/react": "^16.3.3",
64
- "@types/react": "^19.3.0",
65
- "@types/react-dom": "^19.3.0",
66
- "happy-dom": "^20.14.5",
67
- "lucide-react": "^1.52.0",
68
- "react": "^19.3.0",
69
- "react-dom": "^19.3.0",
70
- "react-router-dom": "^7.18.4",
71
- "typescript": "^7.0.2",
72
- "vite": "^8.3.2",
73
- "vitest": "^5.0.3",
74
- "zod": "^3.24.1"
75
- },
76
- "publishConfig": {
77
- "access": "public"
78
- }
79
- }
1
+ {
2
+ "name": "@llmnative/agentico",
3
+ "version": "0.21.0",
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
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/types/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "llms.txt"
18
+ ],
19
+ "sideEffects": false,
20
+ "scripts": {
21
+ "build": "vite build && tsc -p tsconfig.build.json",
22
+ "typecheck": "tsc --noEmit",
23
+ "test": "vitest run",
24
+ "test:watch": "vitest",
25
+ "prepublishOnly": "npm run build",
26
+ "release:check": "node scripts/release/check-release.mjs"
27
+ },
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/sherpadvisorylab/llmnative-agentico.git"
31
+ },
32
+ "bugs": {
33
+ "url": "https://github.com/sherpadvisorylab/llmnative-agentico/issues"
34
+ },
35
+ "homepage": "https://github.com/sherpadvisorylab/llmnative-agentico#readme",
36
+ "keywords": [
37
+ "llmnative",
38
+ "agent",
39
+ "orchestrator",
40
+ "subagent",
41
+ "ai",
42
+ "react"
43
+ ],
44
+ "author": "wolfgan",
45
+ "license": "Apache-2.0",
46
+ "engines": {
47
+ "node": ">=24.18.0 <25"
48
+ },
49
+ "packageManager": "npm@11.11.0",
50
+ "peerDependencies": {
51
+ "@llmnative/react": "^3.2.0",
52
+ "react": "^19.2.0",
53
+ "react-dom": "^19.2.0",
54
+ "zod": "^3.24.1"
55
+ },
56
+ "dependencies": {
57
+ "zod-to-json-schema": "^3.24.1"
58
+ },
59
+ "devDependencies": {
60
+ "@llmnative/react": "^3.2.0",
61
+ "@phosphor-icons/react": "^2.1.10",
62
+ "@supabase/supabase-js": "^2.119.0",
63
+ "@testing-library/jest-dom": "^7.0.1",
64
+ "@testing-library/react": "^16.3.3",
65
+ "@types/react": "^19.3.0",
66
+ "@types/react-dom": "^19.3.0",
67
+ "firebase": "^12.19.0",
68
+ "happy-dom": "^20.14.5",
69
+ "lucide-react": "^1.52.0",
70
+ "react": "^19.3.0",
71
+ "react-dom": "^19.3.0",
72
+ "react-router-dom": "^7.18.4",
73
+ "typescript": "^7.0.2",
74
+ "vite": "^8.3.2",
75
+ "vitest": "^5.0.3",
76
+ "zod": "^3.24.1"
77
+ },
78
+ "publishConfig": {
79
+ "access": "public"
80
+ }
81
+ }