@llmnative/agentico 0.23.0 → 0.24.1

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,11 @@
1
+ export { createAgenticoServer } from './server';
2
+ export type { AgenticoServer, AgenticoServerOptions } from './server';
3
+ export type { AgenticoIdentity, AgenticoKnownTenant, AgenticoRecords, AgenticoRole, AgenticoSecrets } from './ports';
4
+ export { namespaceOf, inProject, tenantOf, PROJECT_ID, TENANT_ID, NamespaceError } from './namespace';
5
+ export { memoryStores, fileStores } from './stores';
6
+ export { createConnections, defaultAdapterFactory, CONNECTIONS } from './connections';
7
+ export type { AdapterFactory, Connections, ConnectionsSnapshot, ConnectionResult } from './connections';
8
+ export { createFleet, FleetError, normalizeRunnerUrl, NAMESPACE_KEY_PERMISSIONS, RUNNERS, NAMESPACES } from './runners';
9
+ export type { Fleet, RunnerEntry, RunnerRecord, NamespaceRecord, RunnerConnection, RunnerTarget } from './runners';
10
+ export { createMemories, MemoryError, MEMORIES } from './memories';
11
+ export type { Memories, MemoryEntry, MemoryCheck, MemoryHit } from './memories';
@@ -0,0 +1,76 @@
1
+ import type { AgenticoRecords, AgenticoSecrets } from './ports';
2
+ export declare const MEMORIES = "agentico_memories";
3
+ export interface MemoryRecord {
4
+ id: string;
5
+ name: string;
6
+ /** The API: `<apiUrl>/ns/<namespace>/search`, `/document`. */
7
+ apiUrl: string;
8
+ /** The MCP server the agents and the IDE connect to. */
9
+ mcpUrl?: string;
10
+ createdAt: number;
11
+ }
12
+ export type MemoryEntry = Omit<MemoryRecord, 'createdAt'>;
13
+ export type MemoryCheck = {
14
+ ok: true;
15
+ } | {
16
+ ok: false;
17
+ error: 'rejected' | 'unreachable' | 'invalid';
18
+ status?: number;
19
+ };
20
+ export type MemoryHit = {
21
+ id?: string;
22
+ title?: string;
23
+ content: string;
24
+ score?: number;
25
+ metadata?: Record<string, unknown>;
26
+ };
27
+ export declare class MemoryError extends Error {
28
+ readonly code: 'invalid' | 'not-found' | 'conflict' | 'unreachable' | 'rejected';
29
+ constructor(code: MemoryError['code'], reason: string);
30
+ }
31
+ export type MemoriesDeps = {
32
+ records: AgenticoRecords;
33
+ secrets: AgenticoSecrets;
34
+ fetch?: typeof fetch;
35
+ newId?: () => string;
36
+ now?: () => number;
37
+ };
38
+ export declare function createMemories(deps: MemoriesDeps): {
39
+ list(): Promise<MemoryEntry[]>;
40
+ /** Whether a memory answers with these credentials: a search that finds nothing is fine. */
41
+ check(input: {
42
+ apiUrl: string;
43
+ key: string;
44
+ }): Promise<MemoryCheck>;
45
+ /** Adds a memory once it answers with its key. */
46
+ add(input: {
47
+ name?: string;
48
+ apiUrl: string;
49
+ mcpUrl?: string;
50
+ key: string;
51
+ }): Promise<MemoryEntry>;
52
+ /** Name and MCP address; a new key only when given (it is checked first). */
53
+ update(id: string, patch: {
54
+ name?: string;
55
+ mcpUrl?: string | null;
56
+ key?: string;
57
+ }): Promise<MemoryEntry>;
58
+ remove(id: string, inUse: boolean): Promise<void>;
59
+ /** The passages of a namespace that answer a query, best first. */
60
+ search(id: string, namespace: string, query: string, limit?: number): Promise<MemoryHit[]>;
61
+ /** Writes a document in a namespace; the same `documentId` replaces it. */
62
+ write(id: string, namespace: string, input: {
63
+ title: string;
64
+ content: string;
65
+ documentId?: string;
66
+ }): Promise<{
67
+ id?: string;
68
+ }>;
69
+ /** What an agent or an IDE needs to reach the memory of a namespace: never the key (asked apart, once). */
70
+ coordinates(id: string, namespace: string): Promise<{
71
+ apiUrl: string;
72
+ mcpUrl?: string;
73
+ namespace: string;
74
+ }>;
75
+ };
76
+ export type Memories = ReturnType<typeof createMemories>;
@@ -0,0 +1,13 @@
1
+ /** A project: no hyphen, so that `<project>-<tenant>` names one project only (the rule of the runner, 1.2). */
2
+ export declare const PROJECT_ID: RegExp;
3
+ /** A tenant: what fits after `<project>-` in a tenant of the runner (63 characters in all). */
4
+ export declare const TENANT_ID: RegExp;
5
+ export declare class NamespaceError extends Error {
6
+ constructor(message: string);
7
+ }
8
+ /** The namespace of a project and its tenant, checked. */
9
+ export declare function namespaceOf(project: string, tenant?: string): string;
10
+ /** Whether a namespace is of a project. */
11
+ export declare const inProject: (project: string, namespace: string) => boolean;
12
+ /** The tenant of a namespace of a project, or undefined for the project itself. */
13
+ export declare const tenantOf: (project: string, namespace: string) => string | undefined;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * What a person may do:
3
+ * - `platform`: the runners and memories of the project, and which runner and memory each namespace uses;
4
+ * - `admin`: the cloud connections of their namespace;
5
+ * - `member`: use them (models, runner, memory).
6
+ */
7
+ export type AgenticoRole = 'platform' | 'admin' | 'member';
8
+ /** Who asks, as the host knows it from its own sign-in. */
9
+ export interface AgenticoIdentity {
10
+ user: {
11
+ id: string;
12
+ name?: string;
13
+ };
14
+ role: AgenticoRole;
15
+ /** The project of the host (`crm`, `cms`, `playbook`): lowercase letters and digits, no hyphen. */
16
+ project: string;
17
+ /** The tenant inside a multi-tenant project; absent for a project with one tenant. */
18
+ tenant?: string;
19
+ }
20
+ /** Documents that are not secret, by collection; every document carries its own `id`. */
21
+ export interface AgenticoRecords {
22
+ get<T extends {
23
+ id: string;
24
+ }>(collection: string, id: string): Promise<T | null>;
25
+ list<T extends {
26
+ id: string;
27
+ }>(collection: string): Promise<T[]>;
28
+ put<T extends {
29
+ id: string;
30
+ }>(collection: string, record: T): Promise<void>;
31
+ delete(collection: string, id: string): Promise<void>;
32
+ }
33
+ /** Secrets by name (keys of runners and providers, keys of memories): never in a document, an answer or a log. */
34
+ export interface AgenticoSecrets {
35
+ get(name: string): Promise<string | null>;
36
+ set(name: string, value: string): Promise<void>;
37
+ delete(name: string): Promise<void>;
38
+ }
39
+ /** A tenant of the project the host knows (the tenants of a CMS): listed in Projects even before it has a runner. */
40
+ export type AgenticoKnownTenant = {
41
+ id: string;
42
+ name?: string;
43
+ };
@@ -0,0 +1,180 @@
1
+ import { type RunnerKey, type RunnerPairingPoll, type RunnerPairingRequest, type RunnerPermission, type RunnerStatus, type RunnerTenant } from '@llmnative/runner/client';
2
+ import { installOverSsh, type InstallProgress, type SshTarget } from '@llmnative/runner/setup';
3
+ import type { AgenticoRecords, AgenticoSecrets } from './ports';
4
+ export declare const RUNNERS = "agentico_runners";
5
+ export declare const PAIRINGS = "agentico_runner_pairings";
6
+ export declare const NAMESPACES = "agentico_namespaces";
7
+ export declare const RUNNER_CHATS = "agentico_runner_chats";
8
+ export declare const INSTALLS = "agentico_runner_installs";
9
+ export interface RunnerRecord {
10
+ id: string;
11
+ name: string;
12
+ url: string;
13
+ isDefault: boolean;
14
+ draining: boolean;
15
+ /** The id of the platform key on the runner, to revoke it when the runner is removed. */
16
+ keyId?: string;
17
+ hostFingerprint?: string;
18
+ createdAt: number;
19
+ updatedAt: number;
20
+ }
21
+ /** What the pages see of a runner: never its key. */
22
+ export type RunnerEntry = {
23
+ id: string;
24
+ name: string;
25
+ url: string;
26
+ isDefault: boolean;
27
+ draining: boolean;
28
+ };
29
+ /** Which runner and memory a namespace uses. */
30
+ export interface NamespaceRecord {
31
+ id: string;
32
+ runnerId?: string;
33
+ /** The id of the key of the namespace on its runner. */
34
+ runnerKeyId?: string;
35
+ memoryId?: string;
36
+ }
37
+ export interface InstallRecord {
38
+ id: string;
39
+ status: 'running' | 'done' | 'error';
40
+ lines: string[];
41
+ runnerId?: string;
42
+ error?: string;
43
+ startedBy: string;
44
+ }
45
+ /** The part of RunnerClient the fleet uses (a fake one in the tests). */
46
+ export interface RunnerConnection {
47
+ pair(code: string, name?: string, project?: string): Promise<{
48
+ key: string;
49
+ record: RunnerKey;
50
+ version: string;
51
+ }>;
52
+ requestPairing(name: string, project?: string): Promise<RunnerPairingRequest>;
53
+ pollPairing(request: string): Promise<RunnerPairingPoll>;
54
+ platform: {
55
+ status(): Promise<RunnerStatus>;
56
+ tenants(): Promise<RunnerTenant[]>;
57
+ createTenant(id: string, options?: {
58
+ name?: string;
59
+ key?: boolean;
60
+ keyPermissions?: RunnerPermission[];
61
+ }): Promise<{
62
+ tenant: RunnerTenant;
63
+ key?: string;
64
+ keyRecord?: RunnerKey;
65
+ }>;
66
+ createKey(tenant: string, input?: {
67
+ name?: string;
68
+ permissions?: RunnerPermission[];
69
+ }): Promise<{
70
+ key: string;
71
+ record: RunnerKey;
72
+ }>;
73
+ revokeKey(tenant: string, id: string): Promise<boolean>;
74
+ revokePlatformKey(id: string): Promise<boolean>;
75
+ };
76
+ }
77
+ export type FleetErrorCode = 'invalid' | 'not-found' | 'conflict';
78
+ export declare class FleetError extends Error {
79
+ readonly code: FleetErrorCode;
80
+ constructor(code: FleetErrorCode, reason: string);
81
+ }
82
+ /** What the backend of the host does for the people of a namespace: always as one of them (act-as-user). */
83
+ export declare const NAMESPACE_KEY_PERMISSIONS: RunnerPermission[];
84
+ export declare function normalizeRunnerUrl(value: string): string;
85
+ export type FleetDeps = {
86
+ project: string;
87
+ /** How the platform is named on the runner (its console shows it): e.g. the name of the host. */
88
+ platformName: string;
89
+ records: AgenticoRecords;
90
+ secrets: AgenticoSecrets;
91
+ connect?: (url: string, key?: string) => RunnerConnection;
92
+ install?: typeof installOverSsh;
93
+ newId?: () => string;
94
+ now?: () => number;
95
+ };
96
+ /** Where a request of a person goes. */
97
+ export type RunnerTarget = {
98
+ runnerId: string;
99
+ url: string;
100
+ key: string;
101
+ };
102
+ export declare function createFleet(deps: FleetDeps): {
103
+ list(): Promise<RunnerEntry[]>;
104
+ /** Connects a runner with a pairing code (the key it gives, of this project, stays here). */
105
+ add(input: {
106
+ name?: string;
107
+ url: string;
108
+ code?: string;
109
+ key?: string;
110
+ }, extra?: {
111
+ hostFingerprint?: string;
112
+ }): Promise<RunnerEntry>;
113
+ /** Asks a runner to connect (device flow, with the project): its admin approves in its console. */
114
+ startPairing(input: {
115
+ name?: string;
116
+ url: string;
117
+ }, startedBy: string): Promise<{
118
+ id: string;
119
+ code: string;
120
+ approveUrl: string;
121
+ expiresAt: string;
122
+ }>;
123
+ /** How a request goes; approved, the runner is connected with the key it gave (once). */
124
+ pairingStatus(id: string, startedBy: string): Promise<{
125
+ status: 'pending' | 'denied' | 'expired';
126
+ } | {
127
+ status: 'approved';
128
+ runner: RunnerEntry;
129
+ }>;
130
+ update(id: string, patch: {
131
+ name?: string;
132
+ isDefault?: boolean;
133
+ draining?: boolean;
134
+ }): Promise<void>;
135
+ /** 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>;
138
+ /**
139
+ * Puts a namespace on a runner: the tenant there (made if missing) and a key of its own, kept as a secret.
140
+ * Moving it, the key on the runner before is revoked unless `keepBefore` (chats still going there).
141
+ */
142
+ assign(namespace: string, runnerId: string, options?: {
143
+ keepBefore?: boolean;
144
+ name?: string;
145
+ }): Promise<void>;
146
+ /**
147
+ * Where a request of a person of a namespace goes. A chat going stays on the runner it started on; a new chat
148
+ * leaves a draining runner for the default one; a namespace without a runner is put on the default one.
149
+ */
150
+ route(namespace: string, request?: {
151
+ newChat?: boolean;
152
+ chat?: string;
153
+ user?: string;
154
+ }): Promise<RunnerTarget | null>;
155
+ /** A chat started: where, so that its next messages go there too. */
156
+ chatStarted(namespace: string, user: string, chat: string, runnerId: string): Promise<void>;
157
+ chatClosed(namespace: string, user: string, chat: string): Promise<void>;
158
+ /**
159
+ * Installs a runner over SSH and connects it; the log goes to its document as it comes. The SSH access is used
160
+ * for this connection only, never kept.
161
+ */
162
+ install(input: {
163
+ name?: string;
164
+ domain: string;
165
+ access: SshTarget;
166
+ version?: string;
167
+ }, startedBy: string, onProgress?: (progress: InstallProgress) => void): Promise<{
168
+ installId: string;
169
+ done: Promise<RunnerEntry>;
170
+ }>;
171
+ /** The log of an installation from a line on. */
172
+ installState(installId: string, startedBy: string, from?: number): Promise<{
173
+ status: InstallRecord['status'];
174
+ lines: string[];
175
+ next: number;
176
+ runnerId?: string;
177
+ error?: string;
178
+ } | null>;
179
+ };
180
+ export type Fleet = ReturnType<typeof createFleet>;
@@ -0,0 +1,141 @@
1
+ import { type RunnerStatus } from '@llmnative/runner/client';
2
+ import { type AdapterFactory } from './connections';
3
+ import { type MemoryEntry } from './memories';
4
+ import type { AgenticoIdentity, AgenticoKnownTenant, AgenticoRecords, AgenticoSecrets } from './ports';
5
+ import { createFleet, type RunnerConnection, type RunnerEntry } from './runners';
6
+ export type AgenticoServerOptions = {
7
+ /** Who asks, from the sign-in of the host; null: not signed in (401). */
8
+ identity: (request: Request) => Promise<AgenticoIdentity | null>;
9
+ records: AgenticoRecords;
10
+ secrets: AgenticoSecrets;
11
+ /** How the platform is named on the runners it connects (their console shows it), e.g. "Consuletica CRM". */
12
+ platformName: string;
13
+ /** The tenants of the project the host knows, listed in Projects even before they have a runner or a memory. */
14
+ tenants?: (identity: AgenticoIdentity) => Promise<AgenticoKnownTenant[]>;
15
+ /**
16
+ * The headers that carry the session of the host (e.g. `x-session`): never forwarded by the proxy of the AI
17
+ * requests. The session must not be in `authorization` there, which is the provider's.
18
+ */
19
+ sessionHeaders?: string[];
20
+ /** The path the handler is mounted on (e.g. `/api/agentico`): stripped from every request. */
21
+ basePath?: string;
22
+ adapter?: AdapterFactory;
23
+ fetch?: typeof fetch;
24
+ connectRunner?: (url: string, key?: string) => RunnerConnection;
25
+ install?: Parameters<typeof createFleet>[0]['install'];
26
+ log?: (event: string, details?: Record<string, unknown>) => void;
27
+ now?: () => number;
28
+ };
29
+ export declare function createAgenticoServer(options: AgenticoServerOptions): {
30
+ connections: {
31
+ snapshot(namespace: string): Promise<import("./connections").ConnectionsSnapshot>;
32
+ connect(namespace: string, provider: string, fields: Record<string, string>): Promise<import("./connections").ConnectionResult>;
33
+ addAccount(namespace: string, provider: string, fields: Record<string, string>): Promise<import("./connections").ConnectionResult>;
34
+ disconnect(namespace: string, provider: string): Promise<void>;
35
+ removeAccount(namespace: string, provider: string, accountId: string): Promise<void>;
36
+ orderAccounts(namespace: string, provider: string, accountIds: string[]): Promise<void>;
37
+ setOrder(namespace: string, order: string[] | null): Promise<void>;
38
+ adapter(namespace: string, provider: string): Promise<import("@llmnative/react").AIProviderAdapter | null>;
39
+ models(namespace: string, provider: string): Promise<import("@llmnative/react").AIModelDescriptor[]>;
40
+ complete(namespace: string, provider: string, request: import("@llmnative/react").AICompleteRequest): Promise<import("@llmnative/react").AICompleteResult | null>;
41
+ resolve(namespace: string, request: {
42
+ url: string;
43
+ headers: Record<string, string>;
44
+ }): Promise<import("@llmnative/react/server").ServerCredentialResolution>;
45
+ };
46
+ memories: {
47
+ list(): Promise<MemoryEntry[]>;
48
+ check(input: {
49
+ apiUrl: string;
50
+ key: string;
51
+ }): Promise<import("./memories").MemoryCheck>;
52
+ add(input: {
53
+ name?: string;
54
+ apiUrl: string;
55
+ mcpUrl?: string;
56
+ key: string;
57
+ }): Promise<MemoryEntry>;
58
+ update(id: string, patch: {
59
+ name?: string;
60
+ mcpUrl?: string | null;
61
+ key?: string;
62
+ }): Promise<MemoryEntry>;
63
+ remove(id: string, inUse: boolean): Promise<void>;
64
+ search(id: string, namespace: string, query: string, limit?: number): Promise<import("./memories").MemoryHit[]>;
65
+ write(id: string, namespace: string, input: {
66
+ title: string;
67
+ content: string;
68
+ documentId?: string;
69
+ }): Promise<{
70
+ id?: string;
71
+ }>;
72
+ coordinates(id: string, namespace: string): Promise<{
73
+ apiUrl: string;
74
+ mcpUrl?: string;
75
+ namespace: string;
76
+ }>;
77
+ };
78
+ fleet: (project: string) => {
79
+ list(): Promise<RunnerEntry[]>;
80
+ add(input: {
81
+ name?: string;
82
+ url: string;
83
+ code?: string;
84
+ key?: string;
85
+ }, extra?: {
86
+ hostFingerprint?: string;
87
+ }): Promise<RunnerEntry>;
88
+ startPairing(input: {
89
+ name?: string;
90
+ url: string;
91
+ }, startedBy: string): Promise<{
92
+ id: string;
93
+ code: string;
94
+ approveUrl: string;
95
+ expiresAt: string;
96
+ }>;
97
+ pairingStatus(id: string, startedBy: string): Promise<{
98
+ status: 'pending' | 'denied' | 'expired';
99
+ } | {
100
+ status: 'approved';
101
+ runner: RunnerEntry;
102
+ }>;
103
+ update(id: string, patch: {
104
+ name?: string;
105
+ isDefault?: boolean;
106
+ draining?: boolean;
107
+ }): Promise<void>;
108
+ remove(id: string): Promise<void>;
109
+ status(id: string): Promise<RunnerStatus>;
110
+ assign(namespace: string, runnerId: string, options?: {
111
+ keepBefore?: boolean;
112
+ name?: string;
113
+ }): Promise<void>;
114
+ route(namespace: string, request?: {
115
+ newChat?: boolean;
116
+ chat?: string;
117
+ user?: string;
118
+ }): Promise<import("./runners").RunnerTarget | null>;
119
+ chatStarted(namespace: string, user: string, chat: string, runnerId: string): Promise<void>;
120
+ chatClosed(namespace: string, user: string, chat: string): Promise<void>;
121
+ install(input: {
122
+ name?: string;
123
+ domain: string;
124
+ access: import("@llmnative/runner/setup").SshTarget;
125
+ version?: string;
126
+ }, startedBy: string, onProgress?: (progress: import("@llmnative/runner/setup").InstallProgress) => void): Promise<{
127
+ installId: string;
128
+ done: Promise<RunnerEntry>;
129
+ }>;
130
+ installState(installId: string, startedBy: string, from?: number): Promise<{
131
+ status: import("./runners").InstallRecord['status'];
132
+ lines: string[];
133
+ next: number;
134
+ runnerId?: string;
135
+ error?: string;
136
+ } | null>;
137
+ };
138
+ handle(request: Request): Promise<Response>;
139
+ };
140
+ export type AgenticoServer = ReturnType<typeof createAgenticoServer>;
141
+ export type { RunnerStatus };
@@ -0,0 +1,11 @@
1
+ import type { AgenticoRecords, AgenticoSecrets } from './ports';
2
+ /** Documents and secrets kept in memory: lost when the process ends. */
3
+ export declare function memoryStores(): {
4
+ records: AgenticoRecords;
5
+ secrets: AgenticoSecrets;
6
+ };
7
+ /** Documents in `records.json` and secrets in `secrets.json` of a folder, both 0600: the folder stays out of git. */
8
+ export declare function fileStores(folder: string): {
9
+ records: AgenticoRecords;
10
+ secrets: AgenticoSecrets;
11
+ };
package/llms.txt CHANGED
@@ -63,3 +63,4 @@ Message parts (0.3.0): the turn also has `onText(text, { id?, done? })` (without
63
63
 
64
64
  CR-023: `<AgenticoProvider route={{ path, defaults, store?, readOnly? }}>` (defaults memoized). `AgenticoRouting { subagents?: Record<id, { paths?: string[] (regex on the path, no query/hash; absent = everywhere, [] = only when scoped), tools?: string[] (absent = manifest crossAgentToolIds) }>, tools?: Record<name, { everywhere?: boolean }>, pages?: AgenticoPageRule[] }`; `AgenticoPageRule { id, label?, pattern, flags?, context? ({name}/{1} groups, {path}), disabled? }`, the first enabled matching page rule wins. `resolveAgenticoRoute(routing, location, manifests)` → `{ path, page, context, subagentIds (paths match), toolNames (tools of the offered subagents + everywhere), toolsOf }` = `useAgentico().route`. The page context comes before the page/anchor context in the prompt; the orchestrator offers only those subagents (onlyWhenAnchored still only when scoped) and tools; a scoped subagent uses `toolsOf[id]`. `mergeAgenticoRouting(defaults, changes)`, `diffAgenticoRouting(defaults, next)` → `AgenticoRoutingChanges { pages?, pageOrder?, subagents?, tools? }` (only what differs; an empty subagent entry or `everywhere: false` equals a missing one), `mergeAgenticoPageRules` (origin `default`/`modified`+`defaultRule`/`added`), `validateAgenticoRouting(routing, { subagents, toolNames })` → issues `{ where: page|subagent|tool, key, index?, code, level }`: `invalid-pattern`, `duplicate-id`, `missing-id`, `unknown-tool` (errors), `unknown-subagent`, `anchored-subagent`, unknown tool entry (warnings). Not access control. `route.store` (`AgenticoRoutingStore { load(): changes|null, save(changes) }`), `route.readOnly`; `useAgentico().routing` → `{ path, defaults, routing, pages (with origin), changes, save|null, error }`. Settings tabs: Chats, Subagents (a box per subagent: paths, description, tools as readable badges; click → editor modal on top: paths add/remove/edit, try a path, tools, restore), Tools (a box per tool: subagents that use it or all; click → editor), Pages (context per path: edit in a modal with the switch Active in its head, move, restore, delete added), Connectors. Each routing tab has a toolbar button "Try a path" (0.22.1): a field prefilled with the current path filters the boxes to what matches; on Pages every matching rule is shown, the first "Applies" (context filled), the others "Overridden by #n".
65
65
  CR-024 (0.23.0): `<AgenticoProvider harness>` — `AgenticoHarness { models(): AgentExecutorModel[] (read while rendering: keep them cached, pass a new object when they change), turn(AgenticoHarnessTurn) → { text } (rejects with words for the person), close?(chatId) }`; `AgenticoHarnessTurn { chatId (8 hex, new when first), first, prompt, model, tools: { name, description, inputSchema (JSON Schema) }[], callTool(name, input) → { result, isError? }, attachments?, signal, onText (whole text), onReasoning, onStep }`. For every agent without `executor` Agentico composes one alongside the catalog (`createHarnessExecutor(definition, harness, { labels, earlier? })`): first turn `buildPrompt` (+ the chat so far when it starts mid-chat or after a rewind, then the message), then `buildFollowUpPrompt`; tools of `getTools` through `runHostTool(tools, name, input, { onQuestions, onStep, onCard? }, { approveQuestion, approve, reject, rejected })` (validation, CR-008 approval, step, CR-014 card; never throws); result `parseResponse(text)`. The starter composer lists the harness models first. `settings.tabs: AgenticoSettingsTab[] { id, label, render() }` — host tabs after Agentico's in the settings modal.
66
+ CR-025/026 (0.24.0): `@llmnative/agentico/server` — `createAgenticoServer({ identity(request) → { user: { id, name? }, role: 'platform' | 'admin' | 'member', project, tenant? } | null, records, secrets, platformName, basePath?, sessionHeaders?, tenants?(identity), adapter?, fetch?, connectRunner?, install?, log? })` → `{ handle(Request): Response, connections, memories, fleet(project) }`; stores `memoryStores()`, `fileStores(dir)` (JSON 0600); namespace `namespaceOf(project, tenant?)` = `<project>[-<tenant>]` (project `^[a-z0-9]{1,32}$`). Routes: `GET me`; `connections` (GET snapshot, POST|DELETE `/:provider` {fields}, `/:provider/accounts[/:id|/order]`, PUT `/order`, GET `/:provider/models`; `?namespace=` for the platform); `ai/complete` {provider, request}; `ai/proxy?url=` (framework proxy, CR-102); `runner/v1/*` (person routes, act-as-user, chats stay on their runner), `runner-namespace/v1/accounts*` (admin); `runners` (GET, POST {url, code|key}, `pairings` POST/GET `:id`, `installs` POST/GET `:id?from=`, PATCH/DELETE `:id`, GET `:id/status`) platform; `memories` (GET, POST {apiUrl, mcpUrl?, key, name?}, POST `check`, PATCH/DELETE `:id`) platform; `memory` (GET coordinates, POST `search` {query, limit}, POST `write` {title, content, documentId?}) of the namespace; GET `projects`; PUT `namespaces/:ns` {runnerId?, memoryId?|null} platform. Browser: `createAgenticoBackend({ baseUrl, headers?, fetch? })` → `{ me, connections(namespace?) (AIConnectionStore), fleet (RunnerFleet of @llmnative/runner/ui), runner(), runnerOfNamespace() (RunnerClient), memories, memory, projects }`; `settings.backend` adds the tabs Connections (boxes Cloud / runners / Add a runner → modals), Memory (platform), Projects (admin+), replaces Connectors, and makes the runner the harness when the host gives none. Dependency `@llmnative/runner` ^1.2.0.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/agentico",
3
- "version": "0.23.0",
3
+ "version": "0.24.1",
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",
@@ -10,6 +10,11 @@
10
10
  "types": "./dist/types/index.d.ts",
11
11
  "import": "./dist/index.mjs",
12
12
  "require": "./dist/index.js"
13
+ },
14
+ "./server": {
15
+ "types": "./dist/types/server/index.d.ts",
16
+ "import": "./dist/server.mjs",
17
+ "require": "./dist/server.js"
13
18
  }
14
19
  },
15
20
  "files": [
@@ -54,6 +59,7 @@
54
59
  "zod": "^3.24.1"
55
60
  },
56
61
  "dependencies": {
62
+ "@llmnative/runner": "^1.2.0",
57
63
  "zod-to-json-schema": "^3.24.1"
58
64
  },
59
65
  "devDependencies": {
@@ -62,6 +68,7 @@
62
68
  "@supabase/supabase-js": "^2.119.0",
63
69
  "@testing-library/jest-dom": "^7.0.1",
64
70
  "@testing-library/react": "^16.3.3",
71
+ "@types/node": "^24.19.4",
65
72
  "@types/react": "^19.3.0",
66
73
  "@types/react-dom": "^19.3.0",
67
74
  "firebase": "^12.19.0",