@llmnative/agentico 0.24.0 → 0.25.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.
@@ -10,7 +10,8 @@ export type AgenticoMe = {
10
10
  role: AgenticoRole;
11
11
  project: string;
12
12
  tenant?: string;
13
- namespace: string;
13
+ namespace: string; /** The namespace has a runner to work on. */
14
+ hasRunner?: boolean;
14
15
  };
15
16
  export type AgenticoMemory = {
16
17
  id: string;
@@ -1,14 +1,19 @@
1
1
  import React from 'react';
2
+ import type { AIConnectionsProps } from '@llmnative/react';
2
3
  import type { AgenticoBackend, AgenticoMe } from '../backend/agenticoBackend';
3
4
  /** Who is asking, read once per backend. */
4
5
  export declare function useAgenticoMe(backend: AgenticoBackend | undefined): {
5
6
  me: AgenticoMe | null;
6
7
  error: string | null;
7
8
  };
8
- /** Connections: Cloud, the runners of the project, Add a runner. */
9
- export declare function AgenticoConnectionsTab({ backend, me }: {
9
+ /**
10
+ * Connections: Cloud, the runners of the project, Add a runner. `cloud`: the connections of the host when it keeps its
11
+ * AI keys itself (its own store, the providers it allows); without it, those of the server of Agentico.
12
+ */
13
+ export declare function AgenticoConnectionsTab({ backend, me, cloud }: {
10
14
  backend: AgenticoBackend;
11
15
  me: AgenticoMe;
16
+ cloud?: Omit<AIConnectionsProps, 'className'>;
12
17
  }): React.JSX.Element;
13
18
  /** Memory: a box per memory of the project, Add a memory. */
14
19
  export declare function AgenticoMemoryTab({ backend }: {
@@ -16,7 +16,8 @@ export interface AgenticoSettingsConfig {
16
16
  tabs?: AgenticoSettingsTab[];
17
17
  /**
18
18
  * CR-026: the server of Agentico of the host (`createAgenticoBackend`): the tabs Connections (Cloud, the runners,
19
- * Add a runner), Memory and Projects. With it, Cloud takes the place of the Connectors section.
19
+ * Add a runner), Memory and Projects. With it, Cloud takes the place of the Connectors section: on `connections`
20
+ * when the host gives it (it keeps its AI keys itself), else on the server of Agentico.
20
21
  */
21
22
  backend?: AgenticoBackend;
22
23
  }
@@ -7,5 +7,5 @@ export { createConnections, defaultAdapterFactory, CONNECTIONS } from './connect
7
7
  export type { AdapterFactory, Connections, ConnectionsSnapshot, ConnectionResult } from './connections';
8
8
  export { createFleet, FleetError, normalizeRunnerUrl, NAMESPACE_KEY_PERMISSIONS, RUNNERS, NAMESPACES } from './runners';
9
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';
10
+ export { createMemories, MemoryError, MEMORIES, administers } from './memories';
11
+ export type { Memories, MemoryEntry, MemoryCheck, MemoryHit, MemoryRecord, MemoryViewer } from './memories';
@@ -7,9 +7,23 @@ export interface MemoryRecord {
7
7
  apiUrl: string;
8
8
  /** The MCP server the agents and the IDE connect to. */
9
9
  mcpUrl?: string;
10
+ /**
11
+ * CR-027: the namespaces that administer it (a tenant's own memory; several: shared, e.g. the memory of a runner
12
+ * its organizations use). None: a memory of the project, administered by the platform.
13
+ */
14
+ owners?: string[];
10
15
  createdAt: number;
11
16
  }
12
17
  export type MemoryEntry = Omit<MemoryRecord, 'createdAt'>;
18
+ /** Who looks at the memories: the platform (all of them), or the admin of a namespace (its own). */
19
+ export type MemoryViewer = {
20
+ platform: true;
21
+ } | {
22
+ platform: false;
23
+ namespace: string;
24
+ };
25
+ /** Whether a viewer administers a memory. */
26
+ export declare const administers: (viewer: MemoryViewer, record: Pick<MemoryRecord, 'owners'>) => boolean;
13
27
  export type MemoryCheck = {
14
28
  ok: true;
15
29
  } | {
@@ -36,26 +50,46 @@ export type MemoriesDeps = {
36
50
  now?: () => number;
37
51
  };
38
52
  export declare function createMemories(deps: MemoriesDeps): {
39
- list(): Promise<MemoryEntry[]>;
53
+ /** The memories a viewer administers (all of them without a viewer). */
54
+ list(viewer?: MemoryViewer): Promise<MemoryEntry[]>;
55
+ /** A memory the viewer administers, or not found (another tenant's looks the same as none). */
56
+ of(id: string, viewer?: MemoryViewer): Promise<MemoryRecord>;
40
57
  /** Whether a memory answers with these credentials: a search that finds nothing is fine. */
41
58
  check(input: {
42
59
  apiUrl: string;
43
60
  key: string;
44
61
  }): Promise<MemoryCheck>;
45
- /** Adds a memory once it answers with its key. */
62
+ /**
63
+ * Adds a memory once it answers with its key; `owner`: the namespace of the admin who adds it (a memory of the
64
+ * project without). The same address twice only under different owners (each tenant its own key).
65
+ */
46
66
  add(input: {
47
67
  name?: string;
48
68
  apiUrl: string;
49
69
  mcpUrl?: string;
50
70
  key: string;
51
- }): Promise<MemoryEntry>;
71
+ }, owner?: string): Promise<MemoryEntry>;
52
72
  /** Name and MCP address; a new key only when given (it is checked first). */
53
73
  update(id: string, patch: {
54
74
  name?: string;
55
75
  mcpUrl?: string | null;
56
76
  key?: string;
57
- }): Promise<MemoryEntry>;
58
- remove(id: string, inUse: boolean): Promise<void>;
77
+ }, viewer?: MemoryViewer): Promise<MemoryEntry>;
78
+ /**
79
+ * Removes a memory no namespace uses. An admin of one of several owners only leaves it to the others; the last
80
+ * owner (or the platform) removes it.
81
+ */
82
+ remove(id: string, inUse: boolean, viewer?: MemoryViewer): Promise<void>;
83
+ /** A namespace becomes an owner of a memory (a memory shared, e.g. the one of a runner its tenants use). */
84
+ share(id: string, namespace: string): Promise<void>;
85
+ /** A namespace stops owning a memory; the memory stays for its other owners (or the platform). */
86
+ unshare(id: string, namespace: string): Promise<void>;
87
+ /** Keeps a memory as given (a host taking over its memories): its key as a secret, its record as it is. */
88
+ put(record: Omit<MemoryRecord, 'createdAt'> & {
89
+ createdAt?: number;
90
+ }, key?: string): Promise<void>;
91
+ /** The key of a memory, for the host's own use on the server (a package of the IDE): never for a browser. */
92
+ keyOf(id: string): Promise<string | null>;
59
93
  /** The passages of a namespace that answer a query, best first. */
60
94
  search(id: string, namespace: string, query: string, limit?: number): Promise<MemoryHit[]>;
61
95
  /** Writes a document in a namespace; the same `documentId` replaces it. */
@@ -1,6 +1,6 @@
1
1
  import { type RunnerStatus } from '@llmnative/runner/client';
2
2
  import { type AdapterFactory } from './connections';
3
- import { type MemoryEntry } from './memories';
3
+ import { type MemoryEntry, type MemoryViewer } from './memories';
4
4
  import type { AgenticoIdentity, AgenticoKnownTenant, AgenticoRecords, AgenticoSecrets } from './ports';
5
5
  import { createFleet, type RunnerConnection, type RunnerEntry } from './runners';
6
6
  export type AgenticoServerOptions = {
@@ -44,7 +44,8 @@ export declare function createAgenticoServer(options: AgenticoServerOptions): {
44
44
  }): Promise<import("@llmnative/react/server").ServerCredentialResolution>;
45
45
  };
46
46
  memories: {
47
- list(): Promise<MemoryEntry[]>;
47
+ list(viewer?: MemoryViewer): Promise<MemoryEntry[]>;
48
+ of(id: string, viewer?: MemoryViewer): Promise<import("./memories").MemoryRecord>;
48
49
  check(input: {
49
50
  apiUrl: string;
50
51
  key: string;
@@ -54,13 +55,19 @@ export declare function createAgenticoServer(options: AgenticoServerOptions): {
54
55
  apiUrl: string;
55
56
  mcpUrl?: string;
56
57
  key: string;
57
- }): Promise<MemoryEntry>;
58
+ }, owner?: string): Promise<MemoryEntry>;
58
59
  update(id: string, patch: {
59
60
  name?: string;
60
61
  mcpUrl?: string | null;
61
62
  key?: string;
62
- }): Promise<MemoryEntry>;
63
- remove(id: string, inUse: boolean): Promise<void>;
63
+ }, viewer?: MemoryViewer): Promise<MemoryEntry>;
64
+ remove(id: string, inUse: boolean, viewer?: MemoryViewer): Promise<void>;
65
+ share(id: string, namespace: string): Promise<void>;
66
+ unshare(id: string, namespace: string): Promise<void>;
67
+ put(record: Omit<import("./memories").MemoryRecord, 'createdAt'> & {
68
+ createdAt?: number;
69
+ }, key?: string): Promise<void>;
70
+ keyOf(id: string): Promise<string | null>;
64
71
  search(id: string, namespace: string, query: string, limit?: number): Promise<import("./memories").MemoryHit[]>;
65
72
  write(id: string, namespace: string, input: {
66
73
  title: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/agentico",
3
- "version": "0.24.0",
3
+ "version": "0.25.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",