@llmnative/agentico 0.25.0 → 0.27.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 +7 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1215 -1209
- package/dist/index.mjs.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +298 -250
- package/dist/server.mjs.map +1 -1
- package/dist/types/backend/agenticoBackend.d.ts +5 -1
- package/dist/types/presentation/AgenticoSettingsContext.d.ts +8 -0
- package/dist/types/server/runners.d.ts +30 -7
- package/dist/types/server/server.d.ts +20 -8
- package/llms.txt +1 -1
- package/package.json +2 -2
|
@@ -11,7 +11,11 @@ export type AgenticoMe = {
|
|
|
11
11
|
project: string;
|
|
12
12
|
tenant?: string;
|
|
13
13
|
namespace: string; /** The namespace has a runner to work on. */
|
|
14
|
-
hasRunner?: boolean;
|
|
14
|
+
hasRunner?: boolean; /** What this person administers (CR-027, CR-028). */
|
|
15
|
+
administers?: {
|
|
16
|
+
runners: boolean;
|
|
17
|
+
memories: boolean;
|
|
18
|
+
};
|
|
15
19
|
};
|
|
16
20
|
export type AgenticoMemory = {
|
|
17
21
|
id: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { AIConnectionsProps } from '@llmnative/react';
|
|
3
3
|
import type { AgenticoBackend } from '../backend/agenticoBackend';
|
|
4
|
+
import type { AgentExecutorModel } from '../domain/agentDefinition';
|
|
4
5
|
import { type AgenticoSettingKey, type AgenticoSettings, type AgenticoSettingsStore } from '../domain/settings';
|
|
5
6
|
/** What the host says about the settings (`<AgenticoProvider settings>`). */
|
|
6
7
|
export interface AgenticoSettingsConfig {
|
|
@@ -10,6 +11,12 @@ export interface AgenticoSettingsConfig {
|
|
|
10
11
|
fixed?: Partial<AgenticoSettings>;
|
|
11
12
|
/** Settings not shown: they keep their saved or default value. */
|
|
12
13
|
hidden?: AgenticoSettingKey[];
|
|
14
|
+
/**
|
|
15
|
+
* CR-029: the models the host offers for `defaultModel` when it keeps the AI providers on its server (their keys
|
|
16
|
+
* never reach the browser): `value` is the host's id of the model, `group` its provider. Given, the modal lists
|
|
17
|
+
* these instead of the AI catalog of the browser; the host reads `defaultModel` from its `store`.
|
|
18
|
+
*/
|
|
19
|
+
models?: AgentExecutorModel[];
|
|
13
20
|
/** The section Connectors of the modal: the AI providers (and the host's connectors, e.g. a subscription on a runner). */
|
|
14
21
|
connections?: Omit<AIConnectionsProps, 'className'>;
|
|
15
22
|
/** CR-024: tabs of the host after Agentico's (e.g. "My subscriptions" on a runner), drawn by the host. */
|
|
@@ -32,6 +39,7 @@ interface AgenticoSettingsContextValue {
|
|
|
32
39
|
/** The settings the modal shows. */
|
|
33
40
|
shown: AgenticoSettingKey[];
|
|
34
41
|
connections?: AgenticoSettingsConfig['connections'];
|
|
42
|
+
models?: AgentExecutorModel[];
|
|
35
43
|
tabs?: AgenticoSettingsTab[];
|
|
36
44
|
backend?: AgenticoBackend;
|
|
37
45
|
save: (values: Partial<AgenticoSettings>) => Promise<void>;
|
|
@@ -15,6 +15,11 @@ export interface RunnerRecord {
|
|
|
15
15
|
/** The id of the platform key on the runner, to revoke it when the runner is removed. */
|
|
16
16
|
keyId?: string;
|
|
17
17
|
hostFingerprint?: string;
|
|
18
|
+
/**
|
|
19
|
+
* CR-028: the namespaces that administer it (a tenant's own runner; several: shared). None: a runner of the
|
|
20
|
+
* project, administered by the platform, that any namespace may be put on.
|
|
21
|
+
*/
|
|
22
|
+
owners?: string[];
|
|
18
23
|
createdAt: number;
|
|
19
24
|
updatedAt: number;
|
|
20
25
|
}
|
|
@@ -25,7 +30,19 @@ export type RunnerEntry = {
|
|
|
25
30
|
url: string;
|
|
26
31
|
isDefault: boolean;
|
|
27
32
|
draining: boolean;
|
|
33
|
+
owners?: string[];
|
|
28
34
|
};
|
|
35
|
+
/** Who looks at the runners: the platform (all of them), or the admin of a namespace (its own). */
|
|
36
|
+
export type RunnerViewer = {
|
|
37
|
+
platform: true;
|
|
38
|
+
} | {
|
|
39
|
+
platform: false;
|
|
40
|
+
namespace: string;
|
|
41
|
+
};
|
|
42
|
+
/** Whether a viewer administers a runner. */
|
|
43
|
+
export declare const administersRunner: (viewer: RunnerViewer, record: Pick<RunnerRecord, 'owners'>) => boolean;
|
|
44
|
+
/** Whether a namespace may work on a runner: one of the project, or one it owns. */
|
|
45
|
+
export declare const usableBy: (namespace: string, record: Pick<RunnerRecord, 'owners'>) => boolean;
|
|
29
46
|
/** Which runner and memory a namespace uses. */
|
|
30
47
|
export interface NamespaceRecord {
|
|
31
48
|
id: string;
|
|
@@ -100,7 +117,13 @@ export type RunnerTarget = {
|
|
|
100
117
|
key: string;
|
|
101
118
|
};
|
|
102
119
|
export declare function createFleet(deps: FleetDeps): {
|
|
103
|
-
|
|
120
|
+
/** The runners a viewer administers (all of them without a viewer). */
|
|
121
|
+
list(viewer?: RunnerViewer): Promise<RunnerEntry[]>;
|
|
122
|
+
/** Whether a namespace has a runner to work on (its own, or one of the project). */
|
|
123
|
+
hasRunnerFor(namespace: string): Promise<boolean>;
|
|
124
|
+
/** A namespace becomes an owner of a runner (shared), or stops being one. */
|
|
125
|
+
share(id: string, namespace: string): Promise<void>;
|
|
126
|
+
unshare(id: string, namespace: string): Promise<void>;
|
|
104
127
|
/** Connects a runner with a pairing code (the key it gives, of this project, stays here). */
|
|
105
128
|
add(input: {
|
|
106
129
|
name?: string;
|
|
@@ -109,12 +132,12 @@ export declare function createFleet(deps: FleetDeps): {
|
|
|
109
132
|
key?: string;
|
|
110
133
|
}, extra?: {
|
|
111
134
|
hostFingerprint?: string;
|
|
112
|
-
}): Promise<RunnerEntry>;
|
|
135
|
+
}, owner?: string): Promise<RunnerEntry>;
|
|
113
136
|
/** Asks a runner to connect (device flow, with the project): its admin approves in its console. */
|
|
114
137
|
startPairing(input: {
|
|
115
138
|
name?: string;
|
|
116
139
|
url: string;
|
|
117
|
-
}, startedBy: string): Promise<{
|
|
140
|
+
}, startedBy: string, owner?: string): Promise<{
|
|
118
141
|
id: string;
|
|
119
142
|
code: string;
|
|
120
143
|
approveUrl: string;
|
|
@@ -131,10 +154,10 @@ export declare function createFleet(deps: FleetDeps): {
|
|
|
131
154
|
name?: string;
|
|
132
155
|
isDefault?: boolean;
|
|
133
156
|
draining?: boolean;
|
|
134
|
-
}): Promise<void>;
|
|
157
|
+
}, viewer?: RunnerViewer): Promise<void>;
|
|
135
158
|
/** Only a runner no namespace uses: its people would lose their chats and subscriptions there. */
|
|
136
|
-
remove(id: string): Promise<void>;
|
|
137
|
-
status(id: string): Promise<RunnerStatus>;
|
|
159
|
+
remove(id: string, viewer?: RunnerViewer): Promise<void>;
|
|
160
|
+
status(id: string, viewer?: RunnerViewer): Promise<RunnerStatus>;
|
|
138
161
|
/**
|
|
139
162
|
* Puts a namespace on a runner: the tenant there (made if missing) and a key of its own, kept as a secret.
|
|
140
163
|
* Moving it, the key on the runner before is revoked unless `keepBefore` (chats still going there).
|
|
@@ -164,7 +187,7 @@ export declare function createFleet(deps: FleetDeps): {
|
|
|
164
187
|
domain: string;
|
|
165
188
|
access: SshTarget;
|
|
166
189
|
version?: string;
|
|
167
|
-
}, startedBy: string, onProgress?: (progress: InstallProgress) => void): Promise<{
|
|
190
|
+
}, startedBy: string, onProgress?: (progress: InstallProgress) => void, owner?: string): Promise<{
|
|
168
191
|
installId: string;
|
|
169
192
|
done: Promise<RunnerEntry>;
|
|
170
193
|
}>;
|
|
@@ -2,7 +2,7 @@ import { type RunnerStatus } from '@llmnative/runner/client';
|
|
|
2
2
|
import { type AdapterFactory } from './connections';
|
|
3
3
|
import { type MemoryEntry, type MemoryViewer } from './memories';
|
|
4
4
|
import type { AgenticoIdentity, AgenticoKnownTenant, AgenticoRecords, AgenticoSecrets } from './ports';
|
|
5
|
-
import { createFleet, type RunnerConnection, type RunnerEntry } from './runners';
|
|
5
|
+
import { createFleet, type RunnerConnection, type RunnerEntry, type RunnerViewer } from './runners';
|
|
6
6
|
export type AgenticoServerOptions = {
|
|
7
7
|
/** Who asks, from the sign-in of the host; null: not signed in (401). */
|
|
8
8
|
identity: (request: Request) => Promise<AgenticoIdentity | null>;
|
|
@@ -17,6 +17,15 @@ export type AgenticoServerOptions = {
|
|
|
17
17
|
* requests. The session must not be in `authorization` there, which is the provider's.
|
|
18
18
|
*/
|
|
19
19
|
sessionHeaders?: string[];
|
|
20
|
+
/**
|
|
21
|
+
* Whether the admin of a namespace connects and administers runners and memories of its own (CR-027, CR-028), as
|
|
22
|
+
* in Playbook where every organization keeps its own. Absent: they are the platform's (the CMS, where assigning the
|
|
23
|
+
* infrastructure to a tenant is a platform action), and an admin only uses them.
|
|
24
|
+
*/
|
|
25
|
+
tenantOwned?: {
|
|
26
|
+
runners?: boolean;
|
|
27
|
+
memories?: boolean;
|
|
28
|
+
};
|
|
20
29
|
/** The path the handler is mounted on (e.g. `/api/agentico`): stripped from every request. */
|
|
21
30
|
basePath?: string;
|
|
22
31
|
adapter?: AdapterFactory;
|
|
@@ -83,7 +92,10 @@ export declare function createAgenticoServer(options: AgenticoServerOptions): {
|
|
|
83
92
|
}>;
|
|
84
93
|
};
|
|
85
94
|
fleet: (project: string) => {
|
|
86
|
-
list(): Promise<RunnerEntry[]>;
|
|
95
|
+
list(viewer?: RunnerViewer): Promise<RunnerEntry[]>;
|
|
96
|
+
hasRunnerFor(namespace: string): Promise<boolean>;
|
|
97
|
+
share(id: string, namespace: string): Promise<void>;
|
|
98
|
+
unshare(id: string, namespace: string): Promise<void>;
|
|
87
99
|
add(input: {
|
|
88
100
|
name?: string;
|
|
89
101
|
url: string;
|
|
@@ -91,11 +103,11 @@ export declare function createAgenticoServer(options: AgenticoServerOptions): {
|
|
|
91
103
|
key?: string;
|
|
92
104
|
}, extra?: {
|
|
93
105
|
hostFingerprint?: string;
|
|
94
|
-
}): Promise<RunnerEntry>;
|
|
106
|
+
}, owner?: string): Promise<RunnerEntry>;
|
|
95
107
|
startPairing(input: {
|
|
96
108
|
name?: string;
|
|
97
109
|
url: string;
|
|
98
|
-
}, startedBy: string): Promise<{
|
|
110
|
+
}, startedBy: string, owner?: string): Promise<{
|
|
99
111
|
id: string;
|
|
100
112
|
code: string;
|
|
101
113
|
approveUrl: string;
|
|
@@ -111,9 +123,9 @@ export declare function createAgenticoServer(options: AgenticoServerOptions): {
|
|
|
111
123
|
name?: string;
|
|
112
124
|
isDefault?: boolean;
|
|
113
125
|
draining?: boolean;
|
|
114
|
-
}): Promise<void>;
|
|
115
|
-
remove(id: string): Promise<void>;
|
|
116
|
-
status(id: string): Promise<RunnerStatus>;
|
|
126
|
+
}, viewer?: RunnerViewer): Promise<void>;
|
|
127
|
+
remove(id: string, viewer?: RunnerViewer): Promise<void>;
|
|
128
|
+
status(id: string, viewer?: RunnerViewer): Promise<RunnerStatus>;
|
|
117
129
|
assign(namespace: string, runnerId: string, options?: {
|
|
118
130
|
keepBefore?: boolean;
|
|
119
131
|
name?: string;
|
|
@@ -130,7 +142,7 @@ export declare function createAgenticoServer(options: AgenticoServerOptions): {
|
|
|
130
142
|
domain: string;
|
|
131
143
|
access: import("@llmnative/runner/setup").SshTarget;
|
|
132
144
|
version?: string;
|
|
133
|
-
}, startedBy: string, onProgress?: (progress: import("@llmnative/runner/setup").InstallProgress) => void): Promise<{
|
|
145
|
+
}, startedBy: string, onProgress?: (progress: import("@llmnative/runner/setup").InstallProgress) => void, owner?: string): Promise<{
|
|
134
146
|
installId: string;
|
|
135
147
|
done: Promise<RunnerEntry>;
|
|
136
148
|
}>;
|
package/llms.txt
CHANGED
|
@@ -54,7 +54,7 @@ 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.
|
|
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. CR-029 (0.27.0): `settings.models?: AgentExecutorModel[]` ({ value, label, group? }) — the models of a host that keeps the AI providers on its server; the modal lists them for `defaultModel` instead of the AI catalog of the browser, and the host reads `defaultModel` from its `store`.
|
|
58
58
|
|
|
59
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).
|
|
60
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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmnative/agentico",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.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",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"zod": "^3.24.1"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@llmnative/runner": "^1.
|
|
62
|
+
"@llmnative/runner": "^1.3.0",
|
|
63
63
|
"zod-to-json-schema": "^3.24.1"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|