@llmnative/agentico 0.21.0 → 0.22.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.
- package/LICENSE +201 -201
- package/README.md +1 -0
- package/dist/index.js +16 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2480 -1155
- package/dist/index.mjs.map +1 -1
- package/dist/types/domain/orchestrator/agenticoOrchestratorAgent.d.ts +8 -0
- package/dist/types/domain/routing.d.ts +127 -0
- package/dist/types/i18n/types.d.ts +71 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/presentation/AgenticoContext.d.ts +39 -1
- package/dist/types/presentation/AgenticoRoutingSettings.d.ts +24 -0
- package/dist/types/presentation/AgenticoSettingsModal.d.ts +1 -1
- package/llms.txt +2 -0
- package/package.json +81 -81
|
@@ -8,6 +8,14 @@ export interface OrchestratorAgentParams {
|
|
|
8
8
|
/** Subagent the starting page is pinned to, `null` for a generic chat. Restricts the
|
|
9
9
|
* cross-agent tools to the ones that subagent declares (SubagentManifest.crossAgentToolIds). */
|
|
10
10
|
scopedSubagentId: string | null;
|
|
11
|
+
/** CR-023: what the routing offers on the current path (see routing.ts), `null` = everything.
|
|
12
|
+
* The subagent the conversation is scoped to is offered anyway, with the tools it uses
|
|
13
|
+
* (`toolsOf`, else its manifest). */
|
|
14
|
+
route?: {
|
|
15
|
+
subagentIds: string[] | null;
|
|
16
|
+
toolNames: string[] | null;
|
|
17
|
+
toolsOf?: Record<string, string[]>;
|
|
18
|
+
} | null;
|
|
11
19
|
}
|
|
12
20
|
export interface OrchestratorAgentContext {
|
|
13
21
|
cliCatalog: string;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type { SubagentManifest } from './subagentManifest';
|
|
2
|
+
/** A context for the model about a point of the host app. */
|
|
3
|
+
export interface AgenticoPageRule {
|
|
4
|
+
/** Stable id: a saved change replaces the default rule with the same id. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Name shown to people. */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** Regular expression matched against the path only (no query, no hash), e.g.
|
|
9
|
+
* `^/sites/(?<siteId>[^/]+)/pages/(?<pageId>[^/]+)$`. Anchor it (`^…$`) to match the whole path. */
|
|
10
|
+
pattern: string;
|
|
11
|
+
/** Flags of the regular expression (`i`…). `g` and `y` are ignored. */
|
|
12
|
+
flags?: string;
|
|
13
|
+
/** Text for the model. `{name}` = a named group of the pattern, `{1}`, `{2}`… = numbered groups,
|
|
14
|
+
* `{path}` = the whole path. A group that matched nothing (an optional one) gives an empty text;
|
|
15
|
+
* a placeholder that is no group stays as it is. */
|
|
16
|
+
context?: string;
|
|
17
|
+
/** A disabled rule never matches (a default rule turned off by a saved change). */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** Where the subagent is offered and what it uses. */
|
|
21
|
+
export interface AgenticoSubagentRouting {
|
|
22
|
+
/** Regular expressions on the path where it is offered. Absent = everywhere; `[]` = nowhere (only
|
|
23
|
+
* when a chat is scoped to it: an anchor on the page, a button of the host). */
|
|
24
|
+
paths?: string[];
|
|
25
|
+
/** Names of the data-collection tools it uses. Absent = the ones of its manifest
|
|
26
|
+
* (`crossAgentToolIds`). Tools used everywhere are added anyway. */
|
|
27
|
+
tools?: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface AgenticoToolRouting {
|
|
30
|
+
/** Used by every subagent, so offered on every page. */
|
|
31
|
+
everywhere?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/** The routing of the host: its defaults in code, or those with the changes kept by people. */
|
|
34
|
+
export interface AgenticoRouting {
|
|
35
|
+
/** Context per path, in order: the first matching rule wins. */
|
|
36
|
+
pages?: AgenticoPageRule[];
|
|
37
|
+
/** By subagent id. A subagent missing here: everywhere, with the tools of its manifest. */
|
|
38
|
+
subagents?: Record<string, AgenticoSubagentRouting>;
|
|
39
|
+
/** By tool name. A tool missing here: used by the subagents that name it. */
|
|
40
|
+
tools?: Record<string, AgenticoToolRouting>;
|
|
41
|
+
}
|
|
42
|
+
/** Where a page rule comes from, after mergeAgenticoRouting(). */
|
|
43
|
+
export type AgenticoRoutingOrigin = 'default' | 'modified' | 'added';
|
|
44
|
+
export interface AgenticoPageRuleWithOrigin extends AgenticoPageRule {
|
|
45
|
+
origin: AgenticoRoutingOrigin;
|
|
46
|
+
/** The default rule this one changes (only when `origin` is `modified`). */
|
|
47
|
+
defaultRule?: AgenticoPageRule;
|
|
48
|
+
}
|
|
49
|
+
/** Changes kept by the host over its defaults: only what differs. */
|
|
50
|
+
export interface AgenticoRoutingChanges {
|
|
51
|
+
/** Page rules replacing a default rule with the same id, or added. */
|
|
52
|
+
pages?: AgenticoPageRule[];
|
|
53
|
+
/** Order of the page rules by id. Ids missing here keep their place after the listed ones. */
|
|
54
|
+
pageOrder?: string[];
|
|
55
|
+
/** Entries replacing the default entry of the same subagent. */
|
|
56
|
+
subagents?: Record<string, AgenticoSubagentRouting>;
|
|
57
|
+
/** Entries replacing the default entry of the same tool. */
|
|
58
|
+
tools?: Record<string, AgenticoToolRouting>;
|
|
59
|
+
}
|
|
60
|
+
/** Where the host keeps the changes people make to its routing (its database, per tenant…). */
|
|
61
|
+
export interface AgenticoRoutingStore {
|
|
62
|
+
/** The changes kept; nothing kept: `null` or `{}`. */
|
|
63
|
+
load(): Promise<AgenticoRoutingChanges | null>;
|
|
64
|
+
/** Keeps the changes (only what differs from the defaults; `{}` = back to the defaults). */
|
|
65
|
+
save(changes: AgenticoRoutingChanges): Promise<void>;
|
|
66
|
+
}
|
|
67
|
+
/** The page rule matching a path. */
|
|
68
|
+
export interface AgenticoPageMatch {
|
|
69
|
+
rule: AgenticoPageRule;
|
|
70
|
+
/** Groups of the pattern: named ones by name, numbered ones by number ("1", "2"…). */
|
|
71
|
+
groups: Record<string, string>;
|
|
72
|
+
/** The context of the rule with its placeholders filled, `null` when the rule has none. */
|
|
73
|
+
context: string | null;
|
|
74
|
+
}
|
|
75
|
+
/** What Agentico offers on a path. */
|
|
76
|
+
export interface AgenticoRouteMatch {
|
|
77
|
+
path: string;
|
|
78
|
+
/** The page rule of the path, `null` = none. */
|
|
79
|
+
page: AgenticoPageMatch | null;
|
|
80
|
+
/** The context of the page rule, `null` = none. */
|
|
81
|
+
context: string | null;
|
|
82
|
+
/** Subagents whose paths match (a subagent only for an anchored page is still offered only when scoped). */
|
|
83
|
+
subagentIds: string[];
|
|
84
|
+
/** Data-collection tools offered: the ones the subagents offered here use, and the ones used everywhere. */
|
|
85
|
+
toolNames: string[];
|
|
86
|
+
/** The tools each registered subagent uses, wherever it is offered (a scoped chat uses these). */
|
|
87
|
+
toolsOf: Record<string, string[]>;
|
|
88
|
+
}
|
|
89
|
+
export type AgenticoRoutingIssueCode = 'invalid-pattern' | 'duplicate-id' | 'missing-id' | 'unknown-subagent' | 'unknown-tool' | 'anchored-subagent';
|
|
90
|
+
export interface AgenticoRoutingIssue {
|
|
91
|
+
/** What the issue is about: a page rule (key = its id), a subagent (its id) or a tool (its name). */
|
|
92
|
+
where: 'page' | 'subagent' | 'tool';
|
|
93
|
+
key: string;
|
|
94
|
+
/** Index of the page rule, or of the path of the subagent, the issue is about. */
|
|
95
|
+
index?: number;
|
|
96
|
+
code: AgenticoRoutingIssueCode;
|
|
97
|
+
/** `error`: it cannot work as written. `warning`: it works, maybe not as expected. */
|
|
98
|
+
level: 'error' | 'warning';
|
|
99
|
+
/** The subagent id, tool name or the error of the regular expression the issue is about. */
|
|
100
|
+
detail?: string;
|
|
101
|
+
}
|
|
102
|
+
type KnownSubagent = Pick<SubagentManifest, 'id' | 'onlyWhenAnchored' | 'crossAgentToolIds'>;
|
|
103
|
+
/** The path matched: query and hash removed. */
|
|
104
|
+
export declare function routePathOf(location: string): string;
|
|
105
|
+
/** The regular expression of a pattern, or its error. Cached. */
|
|
106
|
+
export declare function compileRoutePattern(pattern: string, flags?: string): RegExp | Error;
|
|
107
|
+
/** Whether one of `paths` matches `location` (absent = everywhere; an invalid pattern never matches). */
|
|
108
|
+
export declare function matchesAnyPath(paths: readonly string[] | undefined, location: string): boolean;
|
|
109
|
+
/** The first enabled page rule matching `location` (path, query and hash allowed: only the path counts). */
|
|
110
|
+
export declare function matchAgenticoPage(rules: readonly AgenticoPageRule[], location: string): AgenticoPageMatch | null;
|
|
111
|
+
/** The tools a subagent uses: its routing, else its manifest; plus the ones used everywhere. */
|
|
112
|
+
export declare function subagentToolsOf(routing: AgenticoRouting, manifest: KnownSubagent): string[];
|
|
113
|
+
/** What Agentico offers on `location` with `routing`, for the registered `subagents`. */
|
|
114
|
+
export declare function resolveAgenticoRoute(routing: AgenticoRouting, location: string, subagents: readonly KnownSubagent[]): AgenticoRouteMatch;
|
|
115
|
+
/** The page rules of the defaults with the changes, each one with its origin. */
|
|
116
|
+
export declare function mergeAgenticoPageRules(defaults: readonly AgenticoPageRule[], changes?: Pick<AgenticoRoutingChanges, 'pages' | 'pageOrder'> | null): AgenticoPageRuleWithOrigin[];
|
|
117
|
+
/** The defaults of the host with the changes kept elsewhere. */
|
|
118
|
+
export declare function mergeAgenticoRouting(defaults: AgenticoRouting, changes?: AgenticoRoutingChanges | null): AgenticoRouting;
|
|
119
|
+
/** What a host saves to get `next` back from its `defaults` with mergeAgenticoRouting(): only the
|
|
120
|
+
* page rules, subagents and tools that differ, and the order of the page rules when it changed. */
|
|
121
|
+
export declare function diffAgenticoRouting(defaults: AgenticoRouting, next: AgenticoRouting): AgenticoRoutingChanges;
|
|
122
|
+
/** Problems of a routing, against the subagents and data-collection tools the host registers. */
|
|
123
|
+
export declare function validateAgenticoRouting(routing: AgenticoRouting, known: {
|
|
124
|
+
subagents: readonly KnownSubagent[];
|
|
125
|
+
toolNames: readonly string[];
|
|
126
|
+
}): AgenticoRoutingIssue[];
|
|
127
|
+
export {};
|
|
@@ -87,6 +87,77 @@ export interface AgenticoDict {
|
|
|
87
87
|
settingsChatTitles: string;
|
|
88
88
|
settingsThreadEvents: string;
|
|
89
89
|
settingsConnectors: string;
|
|
90
|
+
settingsSubagents: string;
|
|
91
|
+
settingsTools: string;
|
|
92
|
+
settingsPages: string;
|
|
93
|
+
routingHere: string;
|
|
94
|
+
routingHereBadge: string;
|
|
95
|
+
routingContext: string;
|
|
96
|
+
routingNoContext: string;
|
|
97
|
+
routingOfferedHere: string;
|
|
98
|
+
routingNone: string;
|
|
99
|
+
routingOffered: string;
|
|
100
|
+
routingNotOffered: string;
|
|
101
|
+
routingOnlyAnchored: string;
|
|
102
|
+
routingNoRouting: string;
|
|
103
|
+
routingSubagentsIntro: string;
|
|
104
|
+
routingWhere: string;
|
|
105
|
+
routingEverywhere: string;
|
|
106
|
+
routingNowhere: string;
|
|
107
|
+
routingUses: string;
|
|
108
|
+
routingNoTools: string;
|
|
109
|
+
routingModified: string;
|
|
110
|
+
routingToolsIntro: string;
|
|
111
|
+
routingUsedBy: string;
|
|
112
|
+
routingAllSubagents: string;
|
|
113
|
+
routingNoSubagents: string;
|
|
114
|
+
routingPagesIntro: string;
|
|
115
|
+
routingNoPage: string;
|
|
116
|
+
routingTryPath: string;
|
|
117
|
+
routingTryPathFeedback: string;
|
|
118
|
+
routingTryPathCount: string;
|
|
119
|
+
routingNoMatch: string;
|
|
120
|
+
routingApplies: string;
|
|
121
|
+
routingOverridden: string;
|
|
122
|
+
routingOriginDefault: string;
|
|
123
|
+
routingOriginModified: string;
|
|
124
|
+
routingOriginAdded: string;
|
|
125
|
+
routingRuleOff: string;
|
|
126
|
+
routingMoveUp: string;
|
|
127
|
+
routingMoveDown: string;
|
|
128
|
+
routingRestore: string;
|
|
129
|
+
routingRemove: string;
|
|
130
|
+
routingNewRule: string;
|
|
131
|
+
routingReadOnly: string;
|
|
132
|
+
routingLoadError: string;
|
|
133
|
+
routingSaveError: string;
|
|
134
|
+
routingEditOf: string;
|
|
135
|
+
routingFieldEverywhere: string;
|
|
136
|
+
routingFieldPaths: string;
|
|
137
|
+
routingFieldPathsFeedback: string;
|
|
138
|
+
routingAddPath: string;
|
|
139
|
+
routingRemovePath: string;
|
|
140
|
+
routingFieldTools: string;
|
|
141
|
+
routingToolsEverywhereNote: string;
|
|
142
|
+
routingFieldAllSubagents: string;
|
|
143
|
+
routingFieldUsedBy: string;
|
|
144
|
+
routingFieldId: string;
|
|
145
|
+
routingFieldIdFeedback: string;
|
|
146
|
+
routingFieldLabel: string;
|
|
147
|
+
routingFieldPattern: string;
|
|
148
|
+
routingFieldPatternFeedback: string;
|
|
149
|
+
routingPatternRequired: string;
|
|
150
|
+
routingFieldContextFeedback: string;
|
|
151
|
+
routingFieldActive: string;
|
|
152
|
+
routingFieldActiveFeedback: string;
|
|
153
|
+
routingSave: string;
|
|
154
|
+
routingCancel: string;
|
|
155
|
+
routingIssueInvalidPattern: string;
|
|
156
|
+
routingIssueDuplicateId: string;
|
|
157
|
+
routingIssueMissingId: string;
|
|
158
|
+
routingIssueUnknownSubagent: string;
|
|
159
|
+
routingIssueUnknownTool: string;
|
|
160
|
+
routingIssueAnchoredSubagent: string;
|
|
90
161
|
/** CR-011: renaming a saved chat. */
|
|
91
162
|
/** CR-014: the whole text of a card, and closing it. */
|
|
92
163
|
cardView: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -26,7 +26,8 @@ export { AgenticoToggle } from './presentation/AgenticoToggle';
|
|
|
26
26
|
export { useAgenticoSettings, type AgenticoSettingsConfig } from './presentation/AgenticoSettingsContext';
|
|
27
27
|
export { AgenticoSettingsModal } from './presentation/AgenticoSettingsModal';
|
|
28
28
|
export { AGENTICO_SETTING_KEYS, DEFAULT_AGENTICO_SETTINGS, effectiveSettings, shownSettings, browserSettingsStore, type AgenticoSettings, type AgenticoSettingKey, type AgenticoSettingsStore, } from './domain/settings';
|
|
29
|
-
export { AgenticoProvider, useAgentico, ORCHESTRATOR_TASK_ID, type AgenticoScope, type AgenticoTask, type ComponentAnchor, } from './presentation/AgenticoContext';
|
|
29
|
+
export { AgenticoProvider, useAgentico, ORCHESTRATOR_TASK_ID, type AgenticoScope, type AgenticoRoute, type AgenticoRoutingState, type AgenticoTask, type ComponentAnchor, } from './presentation/AgenticoContext';
|
|
30
|
+
export { resolveAgenticoRoute, matchAgenticoPage, matchesAnyPath, subagentToolsOf, mergeAgenticoRouting, mergeAgenticoPageRules, diffAgenticoRouting, validateAgenticoRouting, compileRoutePattern, routePathOf, type AgenticoRouting, type AgenticoPageRule, type AgenticoPageRuleWithOrigin, type AgenticoSubagentRouting, type AgenticoToolRouting, type AgenticoRoutingOrigin, type AgenticoRoutingChanges, type AgenticoRoutingStore, type AgenticoPageMatch, type AgenticoRouteMatch, type AgenticoRoutingIssue, type AgenticoRoutingIssueCode, } from './domain/routing';
|
|
30
31
|
export { useAgent, type AgentActivityEntry, type AgentConversation, type UseAgentResult } from './presentation/useAgent';
|
|
31
32
|
export { useAgenticoPageContext } from './presentation/useAgenticoPageContext';
|
|
32
33
|
export { useSubagentComponentContext } from './presentation/useSubagentComponentContext';
|
|
@@ -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 AgenticoPageRuleWithOrigin, type AgenticoRouteMatch, type AgenticoRouting, type AgenticoRoutingChanges, type AgenticoRoutingStore } from '../domain/routing';
|
|
8
9
|
import { type AgenticoSettingsConfig } from './AgenticoSettingsContext';
|
|
9
10
|
/** Where results are saved and chats are kept: the host's current tenant, company, workspace…
|
|
10
11
|
* `null` while the host has none selected — destinations then refuse to save. */
|
|
@@ -147,9 +148,42 @@ export interface ComponentAnchor {
|
|
|
147
148
|
* host). */
|
|
148
149
|
pinnedEntityId?: string;
|
|
149
150
|
}
|
|
151
|
+
/** CR-023: where the person is in the host app, and what Agentico knows and offers there (see routing.ts). */
|
|
152
|
+
export interface AgenticoRoute {
|
|
153
|
+
/** The current location of the host app (its router's): only the path is matched. */
|
|
154
|
+
path: string;
|
|
155
|
+
/** The routing of the host in code: where each subagent is offered and the tools it uses, the
|
|
156
|
+
* tools used everywhere, the context per page. */
|
|
157
|
+
defaults: AgenticoRouting;
|
|
158
|
+
/** Where the changes people make are kept (Settings › Subagents, Tools, Pages). Absent: shown,
|
|
159
|
+
* not changed. Keep it stable (memoized). */
|
|
160
|
+
store?: AgenticoRoutingStore | null;
|
|
161
|
+
/** The person may see the routing but not change it. */
|
|
162
|
+
readOnly?: boolean;
|
|
163
|
+
}
|
|
164
|
+
/** CR-023: the routing in use (the host's defaults with the changes kept), for the settings modal. */
|
|
165
|
+
export interface AgenticoRoutingState {
|
|
166
|
+
/** The current path, `null` without `<AgenticoProvider route>`. */
|
|
167
|
+
path: string | null;
|
|
168
|
+
defaults: AgenticoRouting;
|
|
169
|
+
/** The defaults with the changes kept. */
|
|
170
|
+
routing: AgenticoRouting;
|
|
171
|
+
/** The page rules in use, each with its origin. */
|
|
172
|
+
pages: AgenticoPageRuleWithOrigin[];
|
|
173
|
+
/** The changes kept (what differs from the defaults: a subagent or tool listed here is modified). */
|
|
174
|
+
changes: AgenticoRoutingChanges;
|
|
175
|
+
/** Present when the person may change it. Throws when the store refuses. */
|
|
176
|
+
save: ((next: AgenticoRouting) => Promise<void>) | null;
|
|
177
|
+
/** Why the kept changes could not be read (the defaults apply meanwhile). */
|
|
178
|
+
error: string | null;
|
|
179
|
+
}
|
|
150
180
|
interface AgenticoContextValue {
|
|
151
181
|
/** The host scope passed to <AgenticoProvider scope>. */
|
|
152
182
|
scope: AgenticoScope | null;
|
|
183
|
+
/** CR-023: what is offered on the current path (<AgenticoProvider route>), `null` = no routing: everything offered. */
|
|
184
|
+
route: AgenticoRouteMatch | null;
|
|
185
|
+
/** CR-023: the routing in use and how to change it. */
|
|
186
|
+
routing: AgenticoRoutingState;
|
|
153
187
|
/** CR-018: the person using the panel (<AgenticoProvider person>): the author of their messages. */
|
|
154
188
|
person: ChatAuthor | null;
|
|
155
189
|
/** CR-019: where the panel reads what happened around a chat (<AgenticoProvider threadEvents>). */
|
|
@@ -338,8 +372,12 @@ interface AgenticoContextValue {
|
|
|
338
372
|
/** Changes at every startSubagent() — React `key` of that SubagentRunner. */
|
|
339
373
|
startRunId: string | null;
|
|
340
374
|
}
|
|
341
|
-
export declare function AgenticoProvider({ children, scope, person, threadEvents, settings }: {
|
|
375
|
+
export declare function AgenticoProvider({ children, scope, person, threadEvents, settings, route: routeProp }: {
|
|
342
376
|
children: React.ReactNode;
|
|
377
|
+
/** CR-023: the current path of the host app and its routing (see routing.ts): which subagents and
|
|
378
|
+
* data-collection tools are offered there, and the context the model gets. Absent = everything
|
|
379
|
+
* offered, no context. Keep `defaults` stable (memoized). */
|
|
380
|
+
route?: AgenticoRoute | null;
|
|
343
381
|
/** CR-022: the settings of Agentico: where they are kept, which ones the code fixes or hides, and the connectors
|
|
344
382
|
* of the AI providers shown in the settings modal. Keep it stable (memoized). */
|
|
345
383
|
settings?: AgenticoSettingsConfig;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type AgenticoPageRule } from '../domain/routing';
|
|
3
|
+
/** A tool name made readable: `read_sitemap` → "Read sitemap". The name itself stays in the editor title. */
|
|
4
|
+
export declare function toolLabel(name: string): string;
|
|
5
|
+
/** Props of the three tabs: the editor open on top (the settings modal dims behind it). */
|
|
6
|
+
interface RoutingTabProps {
|
|
7
|
+
onStack?: (open: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function AgenticoSubagentsSettings({ onStack }: RoutingTabProps): React.JSX.Element;
|
|
10
|
+
export declare function AgenticoToolsSettings({ onStack }: RoutingTabProps): React.JSX.Element;
|
|
11
|
+
/** The editor of a page rule. `flags` is not shown (only `i` would matter, paths are lower case): kept as it is.
|
|
12
|
+
* `active`: the switch on = the rule applies; a default rule is switched off instead of deleted. */
|
|
13
|
+
export type AgenticoPageRuleForm = {
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
pattern: string;
|
|
17
|
+
flags: string;
|
|
18
|
+
context: string;
|
|
19
|
+
active: string;
|
|
20
|
+
};
|
|
21
|
+
/** The page rule written in the editor; empty optional fields left out. */
|
|
22
|
+
export declare function pageRuleFromForm(record: Partial<Record<keyof AgenticoPageRuleForm, unknown>>): AgenticoPageRule;
|
|
23
|
+
export declare function AgenticoPagesSettings({ onStack }: RoutingTabProps): React.JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
/** Whether the modal has anything to show: a setting the person changes, or the connectors. */
|
|
2
|
+
/** Whether the modal has anything to show: a setting the person changes, the subagents, tools and pages (CR-023), or the connectors. */
|
|
3
3
|
export declare function useHasAgenticoSettings(): boolean;
|
|
4
4
|
export declare function AgenticoSettingsModal(): React.JSX.Element | null;
|
package/llms.txt
CHANGED
|
@@ -60,3 +60,5 @@ CR-021: `ThreadEvent.open: true` shows its body at once; `ThreadEvent.actions: [
|
|
|
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.
|
|
61
61
|
|
|
62
62
|
Message parts (0.3.0): the turn also has `onText(text, { id?, done? })` (without id: the one reply, kept below steps and reasoning; with id: a text part of its own), `onReasoning(text, { id?, done?, duration? })` (whole text so far; shown closed, "Reasoned for N s", duration measured if not given), `onQuestions(questions, { id? }) → Promise<answers>` (questions `{ id?, header?, question, options?: [{ label, description? }], multiple?, recommended?, custom? }`; answers `[{ id?, header?, values: string[] }]`). Answers given while the turn runs resolve that promise; given later (or after a reload) they start a new turn with `text: ''` and `answers: { id, answers }` (id = the questions part id, default `questions-N`). Parts are kept in `AgentActivityEntry.parts` (`text` | `reasoning` | `tool` | `questions`, `detail` = the text) and saved with the chat; old chats without parts show `detail`. Rendered with `ChatMarkdown`, `ChatReasoning`, steps grouped in a `Tree`, `ChatQuestions` (needs `@llmnative/react` 1.34). `useAgent().answerQuestions(entryId, partId, answers)`.
|
|
63
|
+
|
|
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".
|
package/package.json
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@llmnative/agentico",
|
|
3
|
-
"version": "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
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@llmnative/agentico",
|
|
3
|
+
"version": "0.22.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": "^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
|
+
}
|