@nextclaw/kernel 0.1.2 → 0.1.3
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/dist/index.d.ts +869 -343
- package/dist/index.js +4281 -229
- package/dist/types/update-contract.types.d.ts +1 -1
- package/dist/update-manifest.types-DLWDvs_v.d.ts +27 -0
- package/package.json +14 -2
- package/dist/update-manifest.types-BAJqcsP5.d.ts +0 -59
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import { a as getUnsignedUpdateManifest, c as UpdateBlockReason, d as UpdateSnapshot, f as UpdateStatus, i as UpdateManifestReader, l as UpdatePreferences, n as UpdateHostKind, o as serializeUnsignedUpdateManifest, r as UpdateManifest, s as InstallationKind, t as UnsignedUpdateManifest, u as UpdateProgress } from "./update-manifest.types-
|
|
2
|
-
import {
|
|
1
|
+
import { a as getUnsignedUpdateManifest, c as UpdateBlockReason, d as UpdateSnapshot, f as UpdateStatus, i as UpdateManifestReader, l as UpdatePreferences, n as UpdateHostKind, o as serializeUnsignedUpdateManifest, r as UpdateManifest, s as InstallationKind, t as UnsignedUpdateManifest, u as UpdateProgress } from "./update-manifest.types-DLWDvs_v.js";
|
|
2
|
+
import { BaseChannel, ChannelManager, ChannelManager as ChannelManager$1, Config, ContextCompactionPlan, ContextWindowSnapshot, CronService, Disposable, ExtensionRegistry, GatewayController, InboundAttachment, InboundMessage, LLMProvider, LLMResponse, LLMStreamEvent, MessageBus, SearchConfig, SessionManager, SessionMessage, SessionRequestDispatcher, SessionRequestManager, SessionRequestRecord, SessionRequestToolResult, SessionSearchManager, SpawnSessionAndRequestParams, ThinkingLevel, buildCompressingCompactionCheckpoint } from "@nextclaw/core";
|
|
3
|
+
import * as _$_nextclaw_shared0 from "@nextclaw/shared";
|
|
4
|
+
import { EventBus, Ingress, Unsubscribe } from "@nextclaw/shared";
|
|
5
|
+
import { LocalAssetStore } from "@nextclaw/ncp-agent-runtime";
|
|
6
|
+
import * as _$_nextclaw_ncp0 from "@nextclaw/ncp";
|
|
7
|
+
import { ListMessagesOptions, ListSessionsOptions, NcpAgentClientEndpoint, NcpAgentRunApi, NcpAgentRunInput, NcpAgentRuntime, NcpContextBuilder, NcpContextPrepareOptions, NcpEndpointEvent, NcpLLMApi, NcpLLMApiInput, NcpLLMApiOptions, NcpMessage, NcpMessagePart, NcpSessionApi, NcpSessionPatch, NcpSessionStatus, NcpSessionSummary, NcpTool, NcpToolDefinition, NcpToolRegistry, OpenAIChatChunk } from "@nextclaw/ncp";
|
|
8
|
+
import { AgentSessionStore, ChatTarget, DefaultNcpAgentBackend, NcpReplyInput, RuntimeFactoryParams } from "@nextclaw/ncp-toolkit";
|
|
9
|
+
import { McpNcpToolRegistryAdapter } from "@nextclaw/ncp-mcp";
|
|
10
|
+
import { PluginChannelBinding, PluginRegistry, PluginUiMetadata } from "@nextclaw/openclaw-compat";
|
|
11
|
+
import { NcpHttpAgentStreamProvider } from "@nextclaw/ncp-http-agent-server";
|
|
3
12
|
|
|
4
13
|
//#region src/types/entity-ids.types.d.ts
|
|
5
14
|
type AgentId = string;
|
|
@@ -7,7 +16,6 @@ type TaskId = string;
|
|
|
7
16
|
type SessionId = string;
|
|
8
17
|
type ToolId = string;
|
|
9
18
|
type SkillId = string;
|
|
10
|
-
type LlmProviderId = string;
|
|
11
19
|
type AutomationId = string;
|
|
12
20
|
type ChannelId = string;
|
|
13
21
|
//#endregion
|
|
@@ -16,7 +24,6 @@ type AgentRecord = {
|
|
|
16
24
|
id: AgentId;
|
|
17
25
|
name: string;
|
|
18
26
|
description?: string;
|
|
19
|
-
defaultProviderId?: LlmProviderId | null;
|
|
20
27
|
enabledSkillIds: SkillId[];
|
|
21
28
|
enabledToolIds: ToolId[];
|
|
22
29
|
metadata: Record<string, unknown>;
|
|
@@ -24,159 +31,583 @@ type AgentRecord = {
|
|
|
24
31
|
//#endregion
|
|
25
32
|
//#region src/managers/agent.manager.d.ts
|
|
26
33
|
declare class AgentManager {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
listAgents: () => never;
|
|
35
|
+
getAgent: (agentId: AgentId) => never;
|
|
36
|
+
requireAgent: (agentId: AgentId) => never;
|
|
37
|
+
saveAgent: (agent: AgentRecord) => never;
|
|
38
|
+
removeAgent: (agentId: AgentId) => never;
|
|
39
|
+
attachSkill: (agentId: AgentId, skillId: SkillId) => never;
|
|
40
|
+
detachSkill: (agentId: AgentId, skillId: SkillId) => never;
|
|
41
|
+
attachTool: (agentId: AgentId, toolId: ToolId) => never;
|
|
42
|
+
detachTool: (agentId: AgentId, toolId: ToolId) => never;
|
|
36
43
|
}
|
|
37
44
|
//#endregion
|
|
38
|
-
//#region src/
|
|
39
|
-
type
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
//#region src/managers/llm-provider.manager.d.ts
|
|
46
|
+
type ProviderChatParams = {
|
|
47
|
+
messages: Array<Record<string, unknown>>;
|
|
48
|
+
tools?: Array<Record<string, unknown>>;
|
|
49
|
+
model?: string | null;
|
|
50
|
+
maxTokens?: number;
|
|
51
|
+
thinkingLevel?: ThinkingLevel | null;
|
|
52
|
+
signal?: AbortSignal;
|
|
53
|
+
};
|
|
54
|
+
type LlmProviderRuntime = {
|
|
55
|
+
get: (model?: string | null) => LLMProvider;
|
|
56
|
+
chat: (params: ProviderChatParams) => Promise<LLMResponse>;
|
|
57
|
+
chatStream: (params: ProviderChatParams) => AsyncGenerator<LLMStreamEvent>;
|
|
58
|
+
};
|
|
59
|
+
type ProviderConnectionTestInput = {
|
|
60
|
+
providerName: string | null;
|
|
61
|
+
apiKey?: string | null;
|
|
62
|
+
apiBase?: string | null;
|
|
63
|
+
defaultModel: string;
|
|
64
|
+
extraHeaders?: Record<string, string> | null;
|
|
65
|
+
wireApi?: "auto" | "chat" | "responses" | null;
|
|
66
|
+
messages: Array<Record<string, unknown>>;
|
|
67
|
+
maxTokens?: number;
|
|
68
|
+
signal?: AbortSignal;
|
|
57
69
|
};
|
|
70
|
+
declare class LlmProviderManager {
|
|
71
|
+
private readonly providerRegistry;
|
|
72
|
+
private readonly providerPool;
|
|
73
|
+
private readonly missingProvider;
|
|
74
|
+
private config;
|
|
75
|
+
constructor();
|
|
76
|
+
load: (config: Config) => void;
|
|
77
|
+
get: (model?: string | null) => LLMProvider;
|
|
78
|
+
readonly chat: (params: ProviderChatParams) => Promise<LLMResponse>;
|
|
79
|
+
readonly chatStream: (this: LlmProviderManager, params: ProviderChatParams) => AsyncGenerator<LLMStreamEvent>;
|
|
80
|
+
readonly testConnection: (input: ProviderConnectionTestInput) => Promise<void>;
|
|
81
|
+
private resolveRoute;
|
|
82
|
+
private resolveProvider;
|
|
83
|
+
private matchPrefixedProvider;
|
|
84
|
+
private getOrCreateProvider;
|
|
85
|
+
private createProvider;
|
|
86
|
+
private buildCacheKey;
|
|
87
|
+
}
|
|
58
88
|
//#endregion
|
|
59
|
-
//#region src/managers/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
89
|
+
//#region src/managers/extension.manager.d.ts
|
|
90
|
+
type AgentRuntimeContribution = {
|
|
91
|
+
pluginId: string;
|
|
92
|
+
kind: string;
|
|
93
|
+
label: string;
|
|
94
|
+
createRuntime: (params: RuntimeFactoryParams) => NcpAgentRuntime;
|
|
95
|
+
createRuntimeForEntry?: (params: {
|
|
96
|
+
entry: {
|
|
97
|
+
id: string;
|
|
98
|
+
label: string;
|
|
99
|
+
type: string;
|
|
100
|
+
enabled?: boolean;
|
|
101
|
+
config?: Record<string, unknown>;
|
|
102
|
+
};
|
|
103
|
+
runtimeParams: RuntimeFactoryParams;
|
|
104
|
+
}) => NcpAgentRuntime;
|
|
105
|
+
describeSessionType?: (params?: {
|
|
106
|
+
describeMode?: "observation" | "probe";
|
|
107
|
+
}) => Promise<Record<string, unknown> | null | undefined> | Record<string, unknown> | null | undefined;
|
|
108
|
+
describeSessionTypeForEntry?: (params: {
|
|
109
|
+
entry: {
|
|
110
|
+
id: string;
|
|
111
|
+
label: string;
|
|
112
|
+
type: string;
|
|
113
|
+
enabled?: boolean;
|
|
114
|
+
config?: Record<string, unknown>;
|
|
115
|
+
};
|
|
116
|
+
describeParams?: {
|
|
117
|
+
describeMode?: "observation" | "probe";
|
|
118
|
+
};
|
|
119
|
+
}) => Promise<Record<string, unknown> | null | undefined> | Record<string, unknown> | null | undefined;
|
|
120
|
+
source?: string;
|
|
121
|
+
};
|
|
122
|
+
type NextclawExtensionRegistry = ExtensionRegistry & {
|
|
123
|
+
ncpAgentRuntimes: AgentRuntimeContribution[];
|
|
124
|
+
};
|
|
125
|
+
type ExtensionContributions = {
|
|
126
|
+
registry: PluginRegistry;
|
|
127
|
+
extensionRegistry: NextclawExtensionRegistry;
|
|
128
|
+
channelBindings?: PluginChannelBinding[];
|
|
129
|
+
uiMetadata?: PluginUiMetadata[];
|
|
130
|
+
};
|
|
131
|
+
declare class ExtensionManager {
|
|
132
|
+
private pluginRegistry;
|
|
133
|
+
private extensionRegistry;
|
|
134
|
+
private channelBindings;
|
|
135
|
+
private uiMetadata;
|
|
136
|
+
loadContributions: (contributions: ExtensionContributions) => void;
|
|
137
|
+
loadExtensionRegistry: (extensionRegistry: NextclawExtensionRegistry) => void;
|
|
138
|
+
getExtensionRegistry: () => NextclawExtensionRegistry;
|
|
139
|
+
getChannelBindings: () => PluginChannelBinding[];
|
|
140
|
+
getUiMetadata: () => PluginUiMetadata[];
|
|
141
|
+
toConfigView: (config: Config) => Config;
|
|
142
|
+
mergeConfigView: (current: Config, nextConfigView: Record<string, unknown>) => Config;
|
|
143
|
+
resolveMessageToolHints: (params: {
|
|
144
|
+
channel?: string | null;
|
|
145
|
+
config?: Config;
|
|
146
|
+
accountId?: string | null;
|
|
147
|
+
}) => string[];
|
|
68
148
|
}
|
|
69
149
|
//#endregion
|
|
70
|
-
//#region src/
|
|
71
|
-
|
|
72
|
-
type
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
150
|
+
//#region src/features/runtime-registry/services/agent-runtime-registry.service.d.ts
|
|
151
|
+
declare const DEFAULT_AGENT_RUNTIME_ENTRY_ID = "native";
|
|
152
|
+
type AgentRuntimeSessionTypeIcon = {
|
|
153
|
+
kind: "image";
|
|
154
|
+
src: string;
|
|
155
|
+
alt?: string | null;
|
|
156
|
+
};
|
|
157
|
+
type AgentRuntimeSessionTypeOption = {
|
|
158
|
+
value: string;
|
|
159
|
+
label: string;
|
|
160
|
+
icon?: AgentRuntimeSessionTypeIcon | null;
|
|
161
|
+
ready?: boolean;
|
|
162
|
+
reason?: string | null;
|
|
163
|
+
reasonMessage?: string | null;
|
|
164
|
+
supportedModels?: string[];
|
|
165
|
+
recommendedModel?: string | null;
|
|
166
|
+
cta?: {
|
|
167
|
+
kind: string;
|
|
168
|
+
label?: string;
|
|
169
|
+
href?: string;
|
|
170
|
+
} | null;
|
|
171
|
+
};
|
|
172
|
+
type AgentRuntimeSessionTypeDescribeParams = {
|
|
173
|
+
describeMode?: "observation" | "probe";
|
|
174
|
+
};
|
|
175
|
+
type AgentRuntimeEntry = {
|
|
176
|
+
id: string;
|
|
177
|
+
label: string;
|
|
178
|
+
icon?: AgentRuntimeSessionTypeIcon | null;
|
|
179
|
+
type: string;
|
|
180
|
+
enabled?: boolean;
|
|
181
|
+
config?: Record<string, unknown>;
|
|
182
|
+
};
|
|
183
|
+
type AgentRuntimeProviderRegistration = {
|
|
184
|
+
kind: string;
|
|
185
|
+
label: string;
|
|
186
|
+
createRuntime: (params: RuntimeFactoryParams) => NcpAgentRuntime;
|
|
187
|
+
createRuntimeForEntry?: (params: {
|
|
188
|
+
entry: AgentRuntimeEntry;
|
|
189
|
+
runtimeParams: RuntimeFactoryParams;
|
|
190
|
+
}) => NcpAgentRuntime;
|
|
191
|
+
describeSessionType?: (params?: AgentRuntimeSessionTypeDescribeParams) => Promise<Omit<AgentRuntimeSessionTypeOption, "value" | "label"> | null | undefined> | Omit<AgentRuntimeSessionTypeOption, "value" | "label"> | null | undefined;
|
|
192
|
+
describeSessionTypeForEntry?: (params: {
|
|
193
|
+
entry: AgentRuntimeEntry;
|
|
194
|
+
describeParams?: AgentRuntimeSessionTypeDescribeParams;
|
|
195
|
+
}) => Promise<Omit<AgentRuntimeSessionTypeOption, "value" | "label"> | null | undefined> | Omit<AgentRuntimeSessionTypeOption, "value" | "label"> | null | undefined;
|
|
196
|
+
};
|
|
197
|
+
declare function normalizeAgentRuntimeSessionTypeIcon(value: unknown): AgentRuntimeSessionTypeIcon | null;
|
|
198
|
+
type ConfigRuntimeEntry = {
|
|
199
|
+
enabled?: boolean;
|
|
200
|
+
label?: string;
|
|
201
|
+
icon?: unknown;
|
|
202
|
+
type?: string;
|
|
203
|
+
config?: Record<string, unknown>;
|
|
204
|
+
};
|
|
205
|
+
type AgentRuntimeResolverConfig = {
|
|
206
|
+
ui?: {
|
|
207
|
+
ncp?: {
|
|
208
|
+
runtimes?: {
|
|
209
|
+
native?: unknown;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
agents: {
|
|
214
|
+
runtimes: {
|
|
215
|
+
entries?: Record<string, ConfigRuntimeEntry>;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
declare function resolveAgentRuntimeEntries(params: {
|
|
220
|
+
config: AgentRuntimeResolverConfig;
|
|
221
|
+
providerKinds: string[];
|
|
222
|
+
}): {
|
|
223
|
+
defaultEntryId: string;
|
|
224
|
+
entries: AgentRuntimeEntry[];
|
|
225
|
+
};
|
|
226
|
+
declare class AgentRuntimeRegistry {
|
|
227
|
+
private readonly providers;
|
|
228
|
+
private entries;
|
|
229
|
+
private defaultEntryId;
|
|
230
|
+
register: (registration: AgentRuntimeProviderRegistration) => Disposable;
|
|
231
|
+
applyEntries: (params: {
|
|
232
|
+
entries: AgentRuntimeEntry[];
|
|
233
|
+
defaultEntryId?: string;
|
|
234
|
+
}) => void;
|
|
235
|
+
listProviderKinds: () => string[];
|
|
236
|
+
createRuntime: (params: RuntimeFactoryParams) => NcpAgentRuntime;
|
|
237
|
+
listSessionTypes: (params?: AgentRuntimeSessionTypeDescribeParams) => Promise<{
|
|
238
|
+
defaultType: string;
|
|
239
|
+
options: AgentRuntimeSessionTypeOption[];
|
|
240
|
+
}>;
|
|
241
|
+
}
|
|
79
242
|
//#endregion
|
|
80
|
-
//#region src/
|
|
81
|
-
declare class
|
|
82
|
-
readonly
|
|
83
|
-
readonly
|
|
84
|
-
readonly
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
243
|
+
//#region src/features/runtime-registry/controllers/plugin-runtime-registration.controller.d.ts
|
|
244
|
+
declare class PluginRuntimeRegistrationController {
|
|
245
|
+
private readonly runtimeRegistry;
|
|
246
|
+
private readonly extensions;
|
|
247
|
+
private readonly pluginRuntimeScopes;
|
|
248
|
+
private pluginRuntimeSnapshotKey;
|
|
249
|
+
constructor(runtimeRegistry: AgentRuntimeRegistry, extensions: ExtensionManager);
|
|
250
|
+
refreshPluginRuntimeRegistrations: () => void;
|
|
251
|
+
dispose: () => void;
|
|
252
|
+
private syncPluginRuntimeRegistrations;
|
|
253
|
+
private resolveActiveExtensionRegistry;
|
|
88
254
|
}
|
|
89
255
|
//#endregion
|
|
90
|
-
//#region src/
|
|
91
|
-
type
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
256
|
+
//#region src/features/ncp-dispatch/utils/agent-runtime-handle.utils.d.ts
|
|
257
|
+
type AgentRuntimeSessionTypes = Awaited<ReturnType<AgentRuntimeRegistry["listSessionTypes"]>>;
|
|
258
|
+
type AgentRuntimeEndpoint = {
|
|
259
|
+
agentClientEndpoint: NcpAgentClientEndpoint;
|
|
260
|
+
streamProvider?: NcpHttpAgentStreamProvider;
|
|
261
|
+
listSessionTypes?: (params?: AgentRuntimeSessionTypeDescribeParams) => Promise<AgentRuntimeSessionTypes> | AgentRuntimeSessionTypes;
|
|
262
|
+
assetApi?: {
|
|
263
|
+
put: (input: {
|
|
264
|
+
fileName: string;
|
|
265
|
+
mimeType?: string | null;
|
|
266
|
+
bytes: Uint8Array;
|
|
267
|
+
createdAt?: Date;
|
|
268
|
+
}) => ReturnType<LocalAssetStore["putBytes"]>;
|
|
269
|
+
stat: LocalAssetStore["statRecord"];
|
|
270
|
+
resolveContentPath: LocalAssetStore["resolveContentPath"];
|
|
271
|
+
};
|
|
272
|
+
basePath?: string;
|
|
273
|
+
};
|
|
274
|
+
type AgentRuntimeHandle = AgentRuntimeEndpoint & {
|
|
275
|
+
runApi: NcpAgentRunApi;
|
|
276
|
+
sessionApi: NcpSessionApi;
|
|
277
|
+
applyMcpConfig?: (config: Config) => Promise<void>;
|
|
278
|
+
dispose?: () => Promise<void>;
|
|
279
|
+
};
|
|
280
|
+
declare function createAgentRuntimeHandle(params: {
|
|
281
|
+
backend: DefaultNcpAgentBackend;
|
|
282
|
+
runtimeRegistry: AgentRuntimeRegistry;
|
|
283
|
+
refreshPluginRuntimeRegistrations: () => void;
|
|
284
|
+
refreshConfiguredRuntimeEntries: () => void;
|
|
285
|
+
applyMcpConfig: (config: Config) => Promise<void>;
|
|
286
|
+
dispose: () => Promise<void>;
|
|
287
|
+
assetStore: LocalAssetStore;
|
|
288
|
+
}): AgentRuntimeHandle;
|
|
118
289
|
//#endregion
|
|
119
|
-
//#region src/
|
|
120
|
-
type
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
};
|
|
290
|
+
//#region src/features/ncp-dispatch/utils/nextclaw-ncp-runner.utils.d.ts
|
|
291
|
+
type AssetApi = {
|
|
292
|
+
put: (input: {
|
|
293
|
+
fileName: string;
|
|
294
|
+
mimeType?: string | null;
|
|
295
|
+
bytes: Uint8Array;
|
|
296
|
+
createdAt?: Date;
|
|
297
|
+
}) => Promise<{
|
|
298
|
+
uri: string;
|
|
299
|
+
}>;
|
|
300
|
+
resolveContentPath?: (uri: string) => string | null;
|
|
301
|
+
};
|
|
302
|
+
type NcpRunnerAgent = {
|
|
303
|
+
runApi: NcpAgentRunApi;
|
|
304
|
+
assetApi?: AssetApi;
|
|
305
|
+
};
|
|
306
|
+
type RunPromptOverNcpParams = {
|
|
307
|
+
agent: NcpRunnerAgent;
|
|
308
|
+
sessionId: string;
|
|
309
|
+
content: string;
|
|
310
|
+
attachments?: InboundAttachment[];
|
|
311
|
+
metadata?: Record<string, unknown>;
|
|
312
|
+
abortSignal?: AbortSignal;
|
|
313
|
+
onAssistantDelta?: (delta: string) => void;
|
|
314
|
+
onEvent?: (event: NcpEndpointEvent) => void;
|
|
315
|
+
missingCompletedMessageError?: string;
|
|
316
|
+
runErrorMessage?: string;
|
|
317
|
+
};
|
|
318
|
+
type StreamPromptOverNcpParams = Omit<RunPromptOverNcpParams, "onAssistantDelta" | "missingCompletedMessageError" | "runErrorMessage">;
|
|
319
|
+
declare function buildUserMessageParts(params: {
|
|
320
|
+
content: string;
|
|
321
|
+
attachments?: InboundAttachment[];
|
|
322
|
+
assetApi?: AssetApi;
|
|
323
|
+
}): Promise<NcpMessagePart[]>;
|
|
324
|
+
declare function buildNcpUserMessage(params: {
|
|
325
|
+
sessionId: string;
|
|
326
|
+
content: string;
|
|
327
|
+
attachments?: InboundAttachment[];
|
|
328
|
+
metadata?: Record<string, unknown>;
|
|
329
|
+
assetApi?: AssetApi;
|
|
330
|
+
}): Promise<NcpMessage>;
|
|
331
|
+
declare function streamPromptOverNcp(params: StreamPromptOverNcpParams): AsyncGenerator<NcpEndpointEvent>;
|
|
332
|
+
declare function runPromptOverNcp(params: RunPromptOverNcpParams): Promise<{
|
|
333
|
+
text: string;
|
|
334
|
+
completedMessage: NcpMessage;
|
|
335
|
+
}>;
|
|
131
336
|
//#endregion
|
|
132
|
-
//#region src/
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
337
|
+
//#region src/features/ncp-dispatch/utils/channel-reply.utils.d.ts
|
|
338
|
+
type ReplyCapableChannel = BaseChannel<Record<string, unknown>> & {
|
|
339
|
+
consumeNcpReply(input: NcpReplyInput): Promise<void>;
|
|
340
|
+
};
|
|
341
|
+
type ChannelReplyRoute = {
|
|
342
|
+
target: ChatTarget;
|
|
343
|
+
channel: ReplyCapableChannel;
|
|
344
|
+
};
|
|
345
|
+
type ResolvedInboundRoute = {
|
|
346
|
+
accountId?: string | null;
|
|
347
|
+
};
|
|
348
|
+
type ChannelReplyRouterDispatchParams = {
|
|
349
|
+
agent: NcpRunnerAgent;
|
|
350
|
+
route: ChannelReplyRoute;
|
|
351
|
+
sessionId: string;
|
|
352
|
+
content: string;
|
|
353
|
+
attachments?: InboundAttachment[];
|
|
354
|
+
metadata?: Record<string, unknown>;
|
|
355
|
+
abortSignal?: AbortSignal;
|
|
356
|
+
onEvent?: (event: NcpEndpointEvent) => void;
|
|
357
|
+
};
|
|
358
|
+
declare function isReplyCapableChannel(channel: BaseChannel<Record<string, unknown>> | null | undefined): channel is ReplyCapableChannel;
|
|
359
|
+
declare function resolveChannelReplyRoute(params: {
|
|
360
|
+
channel: BaseChannel<Record<string, unknown>> | null | undefined;
|
|
361
|
+
message: InboundMessage;
|
|
362
|
+
route: ResolvedInboundRoute;
|
|
363
|
+
}): ChannelReplyRoute | null;
|
|
364
|
+
declare function dispatchChannelReplyRoute(params: ChannelReplyRouterDispatchParams): Promise<void>;
|
|
365
|
+
//#endregion
|
|
366
|
+
//#region src/features/ncp-dispatch/utils/nextclaw-ncp-dispatch.utils.d.ts
|
|
367
|
+
type DirectPromptDispatchParams = {
|
|
368
|
+
config: Config;
|
|
369
|
+
sessionManager: SessionManager;
|
|
370
|
+
resolveNcpAgent?: () => NcpRunnerAgent | null;
|
|
371
|
+
content: string;
|
|
372
|
+
sessionKey?: string;
|
|
373
|
+
channel?: string;
|
|
374
|
+
chatId?: string;
|
|
375
|
+
attachments?: InboundAttachment[];
|
|
376
|
+
metadata?: Record<string, unknown>;
|
|
377
|
+
agentId?: string;
|
|
378
|
+
abortSignal?: AbortSignal;
|
|
379
|
+
onAssistantDelta?: (delta: string) => void;
|
|
380
|
+
};
|
|
381
|
+
type GatewayInboundLoopRuntime = {
|
|
382
|
+
kernel: {
|
|
383
|
+
channels: ChannelManager$1;
|
|
384
|
+
};
|
|
385
|
+
messageBus: MessageBus;
|
|
386
|
+
sessionManager: SessionManager;
|
|
387
|
+
configManager: {
|
|
388
|
+
loadConfig: () => Config;
|
|
389
|
+
};
|
|
390
|
+
liveAgentRuntime: NcpRunnerAgent | null;
|
|
391
|
+
appEventBus?: EventBus;
|
|
392
|
+
};
|
|
393
|
+
declare function dispatchPromptOverNcp(params: DirectPromptDispatchParams): Promise<string>;
|
|
394
|
+
declare function runGatewayInboundLoop(runtime: GatewayInboundLoopRuntime): Promise<void>;
|
|
395
|
+
//#endregion
|
|
396
|
+
//#region src/types/llm-usage.types.d.ts
|
|
397
|
+
type LlmUsageSummary = {
|
|
398
|
+
promptTokens: number;
|
|
399
|
+
completionTokens: number;
|
|
400
|
+
totalTokens: number;
|
|
401
|
+
cachedTokens: number;
|
|
402
|
+
cacheHit: boolean;
|
|
403
|
+
cacheMetricKeys: string[];
|
|
404
|
+
};
|
|
405
|
+
type LlmUsageRecord = {
|
|
406
|
+
version: 1;
|
|
407
|
+
observedAt: string;
|
|
408
|
+
source: string;
|
|
409
|
+
model: string | null;
|
|
410
|
+
usage: Record<string, number>;
|
|
411
|
+
summary: LlmUsageSummary;
|
|
412
|
+
};
|
|
413
|
+
type LlmUsageSnapshot = LlmUsageRecord;
|
|
414
|
+
declare function createLlmUsageRecord(params: {
|
|
415
|
+
observedAt?: string;
|
|
416
|
+
source: string;
|
|
417
|
+
model?: string | null;
|
|
418
|
+
usage: Record<string, number>;
|
|
419
|
+
}): LlmUsageRecord;
|
|
420
|
+
declare function sanitizeLlmUsage(usage: Record<string, number>): Record<string, number>;
|
|
421
|
+
declare function hasLlmUsageTelemetry(usage: Record<string, number>): boolean;
|
|
422
|
+
declare function buildLlmUsageSummary(usage: Record<string, number>): LlmUsageSummary;
|
|
423
|
+
declare function normalizeLlmUsageModel(value: string | null | undefined): string | null;
|
|
424
|
+
//#endregion
|
|
425
|
+
//#region src/stores/llm-usage.store.d.ts
|
|
426
|
+
type LlmUsageStoreOptions = {
|
|
427
|
+
snapshotPath?: string;
|
|
428
|
+
historyPath?: string;
|
|
429
|
+
};
|
|
430
|
+
declare class LlmUsageStore {
|
|
431
|
+
private readonly options;
|
|
432
|
+
constructor(options?: LlmUsageStoreOptions);
|
|
433
|
+
get snapshotPath(): string;
|
|
434
|
+
get historyPath(): string;
|
|
435
|
+
readSnapshot: () => LlmUsageRecord | null;
|
|
436
|
+
writeSnapshot: (snapshot: LlmUsageRecord) => void;
|
|
437
|
+
clearSnapshot: () => void;
|
|
438
|
+
listHistory: () => LlmUsageRecord[];
|
|
439
|
+
appendHistory: (record: LlmUsageRecord) => void;
|
|
440
|
+
clearHistory: () => void;
|
|
146
441
|
}
|
|
147
442
|
//#endregion
|
|
148
|
-
//#region src/managers/
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
443
|
+
//#region src/managers/llm-usage.manager.d.ts
|
|
444
|
+
type LlmUsageManagerOptions = {
|
|
445
|
+
store?: LlmUsageStore;
|
|
446
|
+
};
|
|
447
|
+
declare class LlmUsageManager {
|
|
448
|
+
private readonly store;
|
|
449
|
+
constructor(options?: LlmUsageManagerOptions);
|
|
450
|
+
observeProviderManager: (providerManager: LlmProviderRuntime, source: string) => LlmProviderRuntime;
|
|
451
|
+
record: (params: {
|
|
452
|
+
observedAt?: string;
|
|
453
|
+
source: string;
|
|
454
|
+
model?: string | null;
|
|
455
|
+
usage: Record<string, number>;
|
|
456
|
+
}) => LlmUsageRecord | null;
|
|
157
457
|
}
|
|
158
458
|
//#endregion
|
|
159
|
-
//#region src/
|
|
160
|
-
type
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
459
|
+
//#region src/managers/agent-runtime.manager.d.ts
|
|
460
|
+
type AgentRuntimeManagerOptions = {
|
|
461
|
+
bus: MessageBus;
|
|
462
|
+
providerManager: LlmProviderRuntime;
|
|
463
|
+
sessions: SessionManager;
|
|
464
|
+
ingress: Ingress;
|
|
465
|
+
sessionRequests: SessionRequestManager;
|
|
466
|
+
sessionSearch: SessionSearchManager;
|
|
467
|
+
ncpAgentSessionStore: AgentSessionStore;
|
|
468
|
+
cronService?: CronService | null;
|
|
469
|
+
configManager: {
|
|
470
|
+
loadConfig: () => Config;
|
|
471
|
+
};
|
|
472
|
+
extensions: ExtensionManager;
|
|
473
|
+
eventBus: EventBus;
|
|
474
|
+
handleNcpEvent: (event: NcpEndpointEvent) => void;
|
|
475
|
+
llmUsage: LlmUsageManager;
|
|
476
|
+
onSessionUpdated: (sessionKey: string) => void;
|
|
477
|
+
};
|
|
478
|
+
declare class AgentRuntimeManager {
|
|
479
|
+
private readonly params;
|
|
480
|
+
private readonly runtimeRegistry;
|
|
481
|
+
private readonly mcpRuntimeSupport;
|
|
482
|
+
private readonly assetStore;
|
|
483
|
+
private readonly pluginRuntimeRegistrationController;
|
|
484
|
+
private readonly refreshConfiguredRuntimeEntries;
|
|
485
|
+
private backend;
|
|
486
|
+
private handle;
|
|
487
|
+
private builtinNarpRegistrations;
|
|
488
|
+
private kernelBootstrapped;
|
|
489
|
+
private warmupPromise;
|
|
490
|
+
private unsubscribeNcpEvents;
|
|
491
|
+
private unsubscribeAgentRuntimeRequestIngress;
|
|
492
|
+
private gatewayController;
|
|
493
|
+
private disposed;
|
|
494
|
+
constructor(params: AgentRuntimeManagerOptions);
|
|
495
|
+
get currentHandle(): AgentRuntimeHandle | null;
|
|
496
|
+
connectGatewayController: (gatewayController: GatewayController) => void;
|
|
497
|
+
bootstrap: () => Promise<AgentRuntimeHandle>;
|
|
498
|
+
warmDerivedCapabilities: () => Promise<void>;
|
|
499
|
+
dispose: () => Promise<void>;
|
|
500
|
+
private readonly registerCoreRuntimes;
|
|
501
|
+
private runDerivedCapabilityWarmup;
|
|
502
|
+
private publishSessionRunStatus;
|
|
503
|
+
private publishNcpEvent;
|
|
504
|
+
private handleSessionMessageRequest;
|
|
505
|
+
private updateToolCallResult;
|
|
506
|
+
private readonly assertNotDisposed;
|
|
507
|
+
}
|
|
508
|
+
//#endregion
|
|
509
|
+
//#region src/managers/automation.manager.d.ts
|
|
510
|
+
type AutomationManagerOptions = {
|
|
511
|
+
storePath: string;
|
|
512
|
+
};
|
|
513
|
+
declare class AutomationManager extends CronService {
|
|
514
|
+
constructor(options: AutomationManagerOptions);
|
|
515
|
+
}
|
|
516
|
+
//#endregion
|
|
517
|
+
//#region src/managers/config.manager.d.ts
|
|
518
|
+
type ConfigManagerRuntimeHooks = {
|
|
519
|
+
resolveChannelConfig?: (config: Config) => Config;
|
|
520
|
+
getExtensionChannels?: () => ExtensionRegistry["channels"];
|
|
521
|
+
applyAgentRuntimeConfig?: (config: Config) => void;
|
|
522
|
+
reloadCompanion?: (params: {
|
|
523
|
+
config: Config;
|
|
524
|
+
changedPaths: string[];
|
|
525
|
+
}) => Promise<void> | void;
|
|
526
|
+
reloadMcp?: (params: {
|
|
527
|
+
config: Config;
|
|
528
|
+
changedPaths: string[];
|
|
529
|
+
}) => Promise<void> | void;
|
|
530
|
+
reloadPlugins?: (params: {
|
|
531
|
+
config: Config;
|
|
532
|
+
changedPaths: string[];
|
|
533
|
+
}) => Promise<{
|
|
534
|
+
restartChannels?: boolean;
|
|
535
|
+
} | void> | {
|
|
536
|
+
restartChannels?: boolean;
|
|
537
|
+
} | void;
|
|
538
|
+
onRestartRequired?: (paths: string[]) => void;
|
|
539
|
+
};
|
|
540
|
+
type ConfigManagerOptions = {
|
|
541
|
+
configPath?: string;
|
|
542
|
+
channels: ChannelManager$1;
|
|
543
|
+
providerManager: LlmProviderManager;
|
|
544
|
+
};
|
|
545
|
+
declare class ConfigManager {
|
|
546
|
+
private readonly options;
|
|
547
|
+
readonly configPath: string;
|
|
548
|
+
private currentConfig;
|
|
549
|
+
private hooks;
|
|
550
|
+
private reloadTask;
|
|
551
|
+
private providerReloadTask;
|
|
552
|
+
private reloadTimer;
|
|
553
|
+
private reloadRunning;
|
|
554
|
+
private reloadPending;
|
|
555
|
+
constructor(options: ConfigManagerOptions);
|
|
556
|
+
get config(): Config;
|
|
557
|
+
loadConfig: () => Config;
|
|
558
|
+
installRuntimeHooks: (hooks: ConfigManagerRuntimeHooks) => void;
|
|
559
|
+
applyLiveConfigReload: () => Promise<void>;
|
|
560
|
+
applyReloadPlan: (nextConfig: Config) => Promise<void>;
|
|
561
|
+
scheduleReload: (reason: string) => void;
|
|
562
|
+
runReload: (reason: string) => Promise<void>;
|
|
563
|
+
reloadConfig: (reason?: string) => Promise<string>;
|
|
564
|
+
rebuildChannels: (nextConfig: Config, options?: {
|
|
565
|
+
start?: boolean;
|
|
566
|
+
}) => Promise<void>;
|
|
567
|
+
private resolveChannelConfig;
|
|
568
|
+
private resolveExtensionChannels;
|
|
569
|
+
private reloadProvider;
|
|
570
|
+
private reloadPlugins;
|
|
571
|
+
private reloadMcp;
|
|
572
|
+
private reloadCompanion;
|
|
573
|
+
}
|
|
574
|
+
//#endregion
|
|
575
|
+
//#region src/configs/learning-loop.config.d.ts
|
|
576
|
+
declare const LEARNING_LOOP_DISABLED_METADATA_KEY = "learning_loop_disabled";
|
|
577
|
+
declare const LEARNING_LOOP_LAST_TOOL_CALL_COUNT_METADATA_KEY = "learning_loop_last_tool_call_count";
|
|
578
|
+
declare const LEARNING_LOOP_LAST_REQUESTED_AT_METADATA_KEY = "learning_loop_last_requested_at";
|
|
579
|
+
declare const LEARNING_LOOP_LAST_REVIEW_SESSION_ID_METADATA_KEY = "learning_loop_last_review_session_id";
|
|
580
|
+
declare const LEARNING_LOOP_SOURCE_SESSION_ID_METADATA_KEY = "learning_loop_source_session_id";
|
|
581
|
+
declare const LEARNING_LOOP_REQUESTED_SKILLS: string[];
|
|
582
|
+
declare const DEFAULT_LEARNING_LOOP_TOOL_CALL_THRESHOLD = 15;
|
|
583
|
+
type LearningLoopRuntimeConfig = {
|
|
164
584
|
enabled: boolean;
|
|
165
|
-
|
|
585
|
+
toolCallThreshold: number;
|
|
166
586
|
};
|
|
587
|
+
declare function readLearningLoopRuntimeConfig(config: Config): LearningLoopRuntimeConfig;
|
|
167
588
|
//#endregion
|
|
168
|
-
//#region src/managers/
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
589
|
+
//#region src/managers/learning-loop.manager.d.ts
|
|
590
|
+
type LearningLoopSessionRequester = {
|
|
591
|
+
spawnSessionAndRequest: (params: SpawnSessionAndRequestParams) => Promise<SessionRequestToolResult>;
|
|
592
|
+
};
|
|
593
|
+
type LearningLoopManagerOptions = {
|
|
594
|
+
eventBus: EventBus;
|
|
595
|
+
sessionManager: SessionManager;
|
|
596
|
+
sessionRequester: LearningLoopSessionRequester;
|
|
597
|
+
resolveLearningLoopConfig?: () => LearningLoopRuntimeConfig;
|
|
598
|
+
};
|
|
599
|
+
declare class LearningLoopManager {
|
|
600
|
+
private readonly options;
|
|
601
|
+
private readonly sessionStore;
|
|
602
|
+
private readonly inFlightSessionIds;
|
|
603
|
+
private unsubscribe;
|
|
604
|
+
constructor(options: LearningLoopManagerOptions);
|
|
605
|
+
start: () => void;
|
|
606
|
+
dispose: () => void;
|
|
607
|
+
private handleRunFinished;
|
|
608
|
+
private handleRunFinishedInBackground;
|
|
609
|
+
private readRuntimeConfig;
|
|
610
|
+
private buildReviewTitle;
|
|
180
611
|
}
|
|
181
612
|
//#endregion
|
|
182
613
|
//#region src/types/skill.types.d.ts
|
|
@@ -191,32 +622,13 @@ type SkillRecord = {
|
|
|
191
622
|
//#endregion
|
|
192
623
|
//#region src/managers/skill.manager.d.ts
|
|
193
624
|
declare class SkillManager {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
//#endregion
|
|
203
|
-
//#region src/managers/task.manager.d.ts
|
|
204
|
-
declare class TaskManager {
|
|
205
|
-
readonly listTasks: () => never;
|
|
206
|
-
readonly getTask: (taskId: TaskId) => never;
|
|
207
|
-
readonly requireTask: (taskId: TaskId) => never;
|
|
208
|
-
readonly createTask: (input: {
|
|
209
|
-
title: string;
|
|
210
|
-
agentId: AgentId;
|
|
211
|
-
sessionId: SessionId;
|
|
212
|
-
input: unknown;
|
|
213
|
-
metadata?: Record<string, unknown>;
|
|
214
|
-
}) => never;
|
|
215
|
-
readonly saveTask: (task: TaskRecord) => never;
|
|
216
|
-
readonly updateTaskStatus: (taskId: TaskId, status: TaskStatus) => never;
|
|
217
|
-
readonly completeTask: (taskId: TaskId, output: unknown) => never;
|
|
218
|
-
readonly failTask: (taskId: TaskId, error: string) => never;
|
|
219
|
-
readonly cancelTask: (taskId: TaskId) => never;
|
|
625
|
+
listSkills: () => never;
|
|
626
|
+
getSkill: (skillId: SkillId) => never;
|
|
627
|
+
requireSkill: (skillId: SkillId) => never;
|
|
628
|
+
saveSkill: (skill: SkillRecord) => never;
|
|
629
|
+
enableSkill: (skillId: SkillId) => never;
|
|
630
|
+
disableSkill: (skillId: SkillId) => never;
|
|
631
|
+
resolveSkills: (skillIds: SkillId[]) => never;
|
|
220
632
|
}
|
|
221
633
|
//#endregion
|
|
222
634
|
//#region src/types/tool.types.d.ts
|
|
@@ -231,32 +643,41 @@ type ToolRecord = {
|
|
|
231
643
|
//#endregion
|
|
232
644
|
//#region src/managers/tool.manager.d.ts
|
|
233
645
|
declare class ToolManager {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
646
|
+
listTools: () => never;
|
|
647
|
+
getTool: (toolId: ToolId) => never;
|
|
648
|
+
requireTool: (toolId: ToolId) => never;
|
|
649
|
+
saveTool: (tool: ToolRecord) => never;
|
|
650
|
+
enableTool: (toolId: ToolId) => never;
|
|
651
|
+
disableTool: (toolId: ToolId) => never;
|
|
652
|
+
resolveTools: (toolIds: ToolId[]) => never;
|
|
241
653
|
}
|
|
242
654
|
//#endregion
|
|
243
|
-
//#region src/
|
|
244
|
-
type
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
655
|
+
//#region src/services/ncp-session-api.service.d.ts
|
|
656
|
+
type NcpSessionApiServiceOptions = {
|
|
657
|
+
eventBus: EventBus;
|
|
658
|
+
getConfig: () => Config;
|
|
659
|
+
sessionManager: SessionManager;
|
|
660
|
+
};
|
|
661
|
+
declare class NcpSessionApiService implements NcpSessionApi {
|
|
662
|
+
private readonly options;
|
|
663
|
+
private unsubscribeSessionUpdated;
|
|
664
|
+
private readonly contextWindowPreview;
|
|
665
|
+
constructor(options: NcpSessionApiServiceOptions);
|
|
666
|
+
start: () => void;
|
|
667
|
+
dispose: () => void;
|
|
668
|
+
publishSessionChange: (sessionKey: string) => Promise<void>;
|
|
669
|
+
listSessions: (options?: ListSessionsOptions) => Promise<NcpSessionSummary[]>;
|
|
670
|
+
listSessionMessages: (sessionId: string, options?: ListMessagesOptions) => Promise<NcpMessage[]>;
|
|
671
|
+
getSession: (sessionId: string) => Promise<NcpSessionSummary | null>;
|
|
672
|
+
updateSession: (sessionId: string, patch: NcpSessionPatch) => Promise<NcpSessionSummary | null>;
|
|
673
|
+
deleteSession: (sessionId: string) => Promise<void>;
|
|
674
|
+
}
|
|
258
675
|
//#endregion
|
|
259
676
|
//#region src/app/nextclaw-kernel.d.ts
|
|
677
|
+
type NextclawKernelOptions = {
|
|
678
|
+
homeDir?: string;
|
|
679
|
+
configPath?: string;
|
|
680
|
+
};
|
|
260
681
|
type NextclawKernelRuntimeControl<TGatewayInput, TUiInput, TStartInput> = {
|
|
261
682
|
gateway: (input: TGatewayInput) => Promise<void>;
|
|
262
683
|
ui: (input: TUiInput) => Promise<void>;
|
|
@@ -267,173 +688,278 @@ type NextclawKernelRuntimeControl<TGatewayInput, TUiInput, TStartInput> = {
|
|
|
267
688
|
};
|
|
268
689
|
declare class NextclawKernelControlManager<TGatewayInput, TUiInput, TStartInput> {
|
|
269
690
|
private runtimeControl;
|
|
270
|
-
|
|
271
|
-
|
|
691
|
+
installRuntimeControl: (runtimeControl: NextclawKernelRuntimeControl<TGatewayInput, TUiInput, TStartInput>) => void;
|
|
692
|
+
requireRuntimeControl: () => NextclawKernelRuntimeControl<TGatewayInput, TUiInput, TStartInput>;
|
|
272
693
|
}
|
|
273
|
-
declare class NextclawKernel
|
|
694
|
+
declare class NextclawKernel {
|
|
695
|
+
readonly eventBus: EventBus;
|
|
696
|
+
readonly ingress: Ingress;
|
|
697
|
+
readonly messageBus: MessageBus;
|
|
698
|
+
readonly llmProviders: LlmProviderManager;
|
|
699
|
+
readonly llmUsage: LlmUsageManager;
|
|
700
|
+
readonly configManager: ConfigManager;
|
|
274
701
|
readonly agents: AgentManager;
|
|
275
|
-
readonly tasks: TaskManager;
|
|
276
702
|
readonly sessions: SessionManager;
|
|
277
|
-
readonly
|
|
278
|
-
readonly control: NextclawKernelControlManager<TGatewayInput, TUiInput, TStartInput>;
|
|
703
|
+
readonly control: NextclawKernelControlManager<unknown, unknown, unknown>;
|
|
279
704
|
readonly tools: ToolManager;
|
|
280
705
|
readonly skills: SkillManager;
|
|
281
|
-
readonly llmProviders: LlmProviderManager;
|
|
282
706
|
readonly automation: AutomationManager;
|
|
283
|
-
readonly channels: ChannelManager;
|
|
284
|
-
readonly
|
|
707
|
+
readonly channels: ChannelManager$1;
|
|
708
|
+
readonly sessionRequests: SessionRequestManager;
|
|
709
|
+
readonly sessionSearch: SessionSearchManager;
|
|
710
|
+
readonly ncpSessionApi: NcpSessionApiService;
|
|
711
|
+
readonly extensions: ExtensionManager;
|
|
712
|
+
readonly agentRuntimeManager: AgentRuntimeManager;
|
|
713
|
+
readonly learningLoop: LearningLoopManager;
|
|
714
|
+
private readonly sessionLifecycleEvents;
|
|
715
|
+
private readonly ncpAgentSessionStore;
|
|
716
|
+
private startPromise;
|
|
717
|
+
constructor(options?: NextclawKernelOptions);
|
|
718
|
+
start: () => Promise<void>;
|
|
719
|
+
dispose: () => Promise<void>;
|
|
720
|
+
private publishSessionUpdated;
|
|
721
|
+
private handleNcpEvent;
|
|
285
722
|
}
|
|
286
723
|
//#endregion
|
|
287
|
-
//#region src/
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
724
|
+
//#region src/utils/learning-loop-prompt.utils.d.ts
|
|
725
|
+
declare function buildLearningLoopTask(params: {
|
|
726
|
+
sessionId: string;
|
|
727
|
+
toolCallsSinceReview: number;
|
|
728
|
+
currentToolCallCount: number;
|
|
729
|
+
}): string;
|
|
730
|
+
//#endregion
|
|
731
|
+
//#region src/features/narp-runtime/services/builtin-narp-runtime-registration.service.d.ts
|
|
732
|
+
declare const NARP_HTTP_RUNTIME_KIND = "narp-http";
|
|
733
|
+
declare const NARP_STDIO_RUNTIME_KIND = "narp-stdio";
|
|
734
|
+
declare class BuiltinNarpRuntimeRegistrationService {
|
|
735
|
+
private readonly getConfig;
|
|
736
|
+
constructor(getConfig: () => Config);
|
|
737
|
+
registerInto: (runtimeRegistry: AgentRuntimeRegistry) => Disposable[];
|
|
738
|
+
private createUnavailableRuntime;
|
|
739
|
+
private createHttpRuntime;
|
|
740
|
+
private createStdioRuntime;
|
|
741
|
+
}
|
|
742
|
+
//#endregion
|
|
743
|
+
//#region src/features/native-runtime/services/context-compaction-preflight.service.d.ts
|
|
744
|
+
type ContextWindowOwner = "nextclaw" | "runtime";
|
|
745
|
+
type ContextCompactionPreflightResult = {
|
|
746
|
+
contextWindow: ContextWindowSnapshot;
|
|
747
|
+
metadata: Record<string, unknown>;
|
|
748
|
+
sessionMessages: NcpMessage[];
|
|
749
|
+
timelineMessage: NcpMessage | null;
|
|
750
|
+
};
|
|
751
|
+
type ContextCompactionPreflightBeginResult = ContextCompactionPreflightResult & {
|
|
752
|
+
pendingCompaction: ContextCompactionPendingWork | null;
|
|
753
|
+
};
|
|
754
|
+
type ContextCompactionPendingWork = {
|
|
755
|
+
checkpoint: ReturnType<typeof buildCompressingCompactionCheckpoint>;
|
|
756
|
+
contextTokens: number;
|
|
757
|
+
inputMessageIds: string[];
|
|
758
|
+
model: string;
|
|
759
|
+
plan: ContextCompactionPlan;
|
|
760
|
+
reservedContextTokens: number;
|
|
761
|
+
sessionId: string;
|
|
762
|
+
};
|
|
763
|
+
declare class ContextCompactionPreflightService {
|
|
764
|
+
private readonly options;
|
|
765
|
+
private readonly compactionService;
|
|
766
|
+
private readonly contextWindowBudgetService;
|
|
767
|
+
constructor(options: {
|
|
768
|
+
getConfig: () => Config;
|
|
769
|
+
providerManager?: LlmProviderRuntime;
|
|
770
|
+
sessionManager: SessionManager;
|
|
771
|
+
});
|
|
772
|
+
run: (params: {
|
|
773
|
+
contextWindowOwner: ContextWindowOwner;
|
|
774
|
+
inputMessages: readonly NcpMessage[];
|
|
775
|
+
requestMetadata: Record<string, unknown>;
|
|
776
|
+
sessionId: string;
|
|
777
|
+
sessionMessages: readonly NcpMessage[];
|
|
778
|
+
}) => Promise<ContextCompactionPreflightResult | null>;
|
|
779
|
+
preview: (params: {
|
|
780
|
+
contextWindowOwner: ContextWindowOwner;
|
|
781
|
+
requestMetadata: Record<string, unknown>;
|
|
782
|
+
sessionId: string;
|
|
783
|
+
sessionMessages: readonly NcpMessage[];
|
|
784
|
+
}) => ContextWindowSnapshot | null;
|
|
785
|
+
begin: (params: {
|
|
786
|
+
contextWindowOwner: ContextWindowOwner;
|
|
787
|
+
inputMessages: readonly NcpMessage[];
|
|
788
|
+
requestMetadata: Record<string, unknown>;
|
|
789
|
+
sessionId: string;
|
|
790
|
+
sessionMessages: readonly NcpMessage[];
|
|
791
|
+
}) => ContextCompactionPreflightBeginResult | null;
|
|
792
|
+
private buildContextWindowSnapshotForMessages;
|
|
793
|
+
finish: (pending: ContextCompactionPendingWork) => Promise<ContextCompactionPreflightResult>;
|
|
794
|
+
private generateSummary;
|
|
795
|
+
}
|
|
796
|
+
//#endregion
|
|
797
|
+
//#region src/features/native-runtime/services/native-agent-runtime-factory.service.d.ts
|
|
798
|
+
type NativeRuntimeFactory = (runtimeParams: RuntimeFactoryParams) => NcpAgentRuntime;
|
|
799
|
+
type UpdateToolCallResult = (params: {
|
|
800
|
+
sessionId: string;
|
|
801
|
+
toolCallId: string;
|
|
802
|
+
result: unknown;
|
|
803
|
+
}) => Promise<void>;
|
|
804
|
+
type NativeAgentRuntimeFactoryOptions = {
|
|
805
|
+
bus: MessageBus;
|
|
806
|
+
providerManager: LlmProviderRuntime;
|
|
807
|
+
sessions: SessionManager;
|
|
808
|
+
sessionRequests: SessionRequestManager;
|
|
809
|
+
sessionSearch: SessionSearchManager;
|
|
810
|
+
cronService?: CronService | null;
|
|
811
|
+
configManager: {
|
|
812
|
+
loadConfig: () => Config;
|
|
813
|
+
};
|
|
814
|
+
extensions: ExtensionManager;
|
|
815
|
+
llmUsage: LlmUsageManager;
|
|
816
|
+
onSessionUpdated: (sessionKey: string) => void;
|
|
817
|
+
resolveGatewayController: () => GatewayController | undefined;
|
|
818
|
+
mcpToolRegistryAdapter: McpNcpToolRegistryAdapter;
|
|
819
|
+
assetStore: LocalAssetStore;
|
|
820
|
+
updateToolCallResult: UpdateToolCallResult;
|
|
821
|
+
};
|
|
822
|
+
declare class NativeAgentRuntimeFactory {
|
|
823
|
+
private readonly options;
|
|
824
|
+
private readonly observedProviderManager;
|
|
825
|
+
constructor(options: NativeAgentRuntimeFactoryOptions);
|
|
826
|
+
create: NativeRuntimeFactory;
|
|
827
|
+
resolveOpenAiToolsForRuntime: (input: NcpAgentRunInput) => _$_nextclaw_ncp0.OpenAITool[] | undefined;
|
|
828
|
+
private createToolRegistry;
|
|
829
|
+
}
|
|
830
|
+
//#endregion
|
|
831
|
+
//#region src/features/native-runtime/services/nextclaw-ncp-tool-registry.service.d.ts
|
|
832
|
+
type NextclawNcpToolRegistryOptions = {
|
|
833
|
+
bus: MessageBus;
|
|
834
|
+
providerManager: LlmProviderRuntime;
|
|
835
|
+
sessionManager: SessionManager;
|
|
836
|
+
cronService?: CronService | null;
|
|
837
|
+
gatewayController?: GatewayController;
|
|
838
|
+
getConfig: () => Config;
|
|
839
|
+
getExtensionRegistry?: () => ExtensionRegistry | undefined;
|
|
840
|
+
getAdditionalTools?: (context: PreparedRunContext) => ReadonlyArray<NcpTool>;
|
|
841
|
+
onSessionUpdated?: (sessionKey: string) => void;
|
|
842
|
+
sessionRequestManager: SessionRequestManager;
|
|
843
|
+
updateToolCallResult: (params: {
|
|
844
|
+
sessionId: string;
|
|
845
|
+
toolCallId: string;
|
|
846
|
+
result: unknown;
|
|
847
|
+
}) => Promise<void>;
|
|
848
|
+
};
|
|
849
|
+
type PreparedRunContext = {
|
|
850
|
+
agentId: string;
|
|
319
851
|
channel: string;
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
852
|
+
chatId: string;
|
|
853
|
+
config: Config;
|
|
854
|
+
contextTokens: number;
|
|
855
|
+
execTimeoutSeconds: number;
|
|
856
|
+
handoffDepth: number;
|
|
857
|
+
maxTokens?: number;
|
|
858
|
+
metadata: Record<string, unknown>;
|
|
859
|
+
model: string;
|
|
860
|
+
restrictToWorkspace: boolean;
|
|
861
|
+
searchConfig: SearchConfig;
|
|
862
|
+
sessionId: string;
|
|
863
|
+
workspace: string;
|
|
864
|
+
};
|
|
865
|
+
declare class NextclawNcpToolRegistry implements NcpToolRegistry {
|
|
866
|
+
private readonly options;
|
|
867
|
+
private registry;
|
|
868
|
+
private readonly tools;
|
|
869
|
+
private currentExtensionToolContext;
|
|
870
|
+
constructor(options: NextclawNcpToolRegistryOptions);
|
|
871
|
+
prepareForRun: (context: PreparedRunContext) => void;
|
|
872
|
+
listTools: () => ReadonlyArray<NcpTool>;
|
|
873
|
+
getTool: (name: string) => NcpTool | undefined;
|
|
874
|
+
getToolDefinitions: () => ReadonlyArray<NcpToolDefinition>;
|
|
875
|
+
execute: (toolCallId: string, toolName: string, args: unknown) => Promise<unknown>;
|
|
876
|
+
private buildToolExecutionContext;
|
|
877
|
+
private registerDefaultTools;
|
|
878
|
+
private registerMessagingTools;
|
|
879
|
+
private registerExtensionTools;
|
|
880
|
+
private registerTool;
|
|
881
|
+
private registerAdditionalTools;
|
|
882
|
+
private isToolAvailable;
|
|
883
|
+
}
|
|
884
|
+
declare function resolveAgentHandoffDepth(metadata: Record<string, unknown>): number;
|
|
885
|
+
declare function readAccountIdForHints(metadata: Record<string, unknown>, sessionMetadata: Record<string, unknown>): string | undefined;
|
|
886
|
+
//#endregion
|
|
887
|
+
//#region src/features/native-runtime/services/nextclaw-ncp-context-builder.service.d.ts
|
|
888
|
+
type MessageToolHintsResolver = (params: {
|
|
342
889
|
sessionKey: string;
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
type: "connection.close";
|
|
363
|
-
};
|
|
364
|
-
type ConnectionErrorEvent = AppEventEnvelope<{
|
|
365
|
-
message?: string;
|
|
366
|
-
} | undefined> & {
|
|
367
|
-
type: "connection.error";
|
|
368
|
-
};
|
|
369
|
-
type RuntimeUpdateSnapshotEvent = AppEventEnvelope<UpdateSnapshot> & {
|
|
370
|
-
type: "runtime.update.snapshot";
|
|
371
|
-
};
|
|
372
|
-
type AppEvent = ConfigUpdatedEvent | ChannelConfigApplyStatusEvent | SessionUpdatedEvent | SessionRunStatusEvent | SessionSummaryUpsertEvent | SessionSummaryDeleteEvent | ConfigReloadStartedEvent | ConfigReloadFinishedEvent | ErrorEvent | ConnectionOpenEvent | ConnectionCloseEvent | ConnectionErrorEvent | RuntimeUpdateSnapshotEvent;
|
|
373
|
-
//#endregion
|
|
374
|
-
//#region src/events/event-bus.service.d.ts
|
|
375
|
-
declare class EventBus {
|
|
376
|
-
private readonly listeners;
|
|
377
|
-
private readonly globalListeners;
|
|
378
|
-
private listenerCount;
|
|
379
|
-
private readonly onFirstSubscriber?;
|
|
380
|
-
private readonly onListenerError?;
|
|
381
|
-
private readonly onNoSubscribers?;
|
|
382
|
-
constructor(options?: EventBusOptions);
|
|
383
|
-
emit: <T>(key: AppEventKey<T>, payload: T, options?: AppEventEmitOptions) => void;
|
|
384
|
-
emitEnvelope: <T>(event: AppEventEnvelope<T>) => void;
|
|
385
|
-
on: <T>(key: AppEventKey<T>, handler: AppEventHandler<T>) => (() => void);
|
|
386
|
-
off: <T>(key: AppEventKey<T>, handler: AppEventHandler<T>) => void;
|
|
387
|
-
once: <T>(key: AppEventKey<T>, handler: AppEventHandler<T>) => (() => void);
|
|
388
|
-
subscribeAll: (handler: (event: AppEventEnvelope) => void) => (() => void);
|
|
389
|
-
private registerSubscriber;
|
|
390
|
-
private unregisterSubscriber;
|
|
391
|
-
private safeInvokeListener;
|
|
392
|
-
private safeInvokeGlobalListener;
|
|
890
|
+
channel: string;
|
|
891
|
+
chatId: string;
|
|
892
|
+
accountId?: string | null;
|
|
893
|
+
}) => string[];
|
|
894
|
+
type NextclawNcpContextBuilderOptions = {
|
|
895
|
+
sessionManager: SessionManager;
|
|
896
|
+
toolRegistry: NextclawNcpToolRegistry;
|
|
897
|
+
getConfig: () => Config;
|
|
898
|
+
resolveMessageToolHints?: MessageToolHintsResolver;
|
|
899
|
+
assetStore?: LocalAssetStore | null;
|
|
900
|
+
};
|
|
901
|
+
declare class NextclawNcpContextBuilder implements NcpContextBuilder {
|
|
902
|
+
private readonly options;
|
|
903
|
+
private readonly inputBudgetPruner;
|
|
904
|
+
constructor(options: NextclawNcpContextBuilderOptions);
|
|
905
|
+
prepare: (input: NcpAgentRunInput, _options?: NcpContextPrepareOptions) => NcpLLMApiInput;
|
|
906
|
+
private prepareRunContext;
|
|
907
|
+
private buildModelMessages;
|
|
908
|
+
private pruneModelMessages;
|
|
393
909
|
}
|
|
394
910
|
//#endregion
|
|
395
|
-
//#region src/
|
|
396
|
-
|
|
397
|
-
readonly
|
|
398
|
-
|
|
399
|
-
|
|
911
|
+
//#region src/features/native-runtime/services/provider-manager-ncp-llm-api.service.d.ts
|
|
912
|
+
declare class ProviderManagerNcpLLMApi implements NcpLLMApi {
|
|
913
|
+
private readonly providerManager;
|
|
914
|
+
constructor(providerManager: LlmProviderRuntime);
|
|
915
|
+
readonly generate: (this: ProviderManagerNcpLLMApi, input: NcpLLMApiInput, options?: NcpLLMApiOptions) => AsyncGenerator<OpenAIChatChunk>;
|
|
916
|
+
}
|
|
400
917
|
//#endregion
|
|
401
|
-
//#region src/
|
|
402
|
-
declare function
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
918
|
+
//#region src/features/native-runtime/tools/ncp-asset.tools.d.ts
|
|
919
|
+
declare function createAssetTools(params: {
|
|
920
|
+
assetStore: LocalAssetStore;
|
|
921
|
+
contentBasePath?: string;
|
|
922
|
+
}): NcpTool[];
|
|
923
|
+
//#endregion
|
|
924
|
+
//#region src/features/session-request/utils/agent-runtime-session-request-dispatcher.utils.d.ts
|
|
925
|
+
declare const AGENT_RUNTIME_SESSION_MESSAGE_INGRESS_TYPE: _$_nextclaw_shared0.TypedKey<AgentRuntimeSessionMessageRequest>;
|
|
926
|
+
type AgentRuntimeSessionMessageRequest = {
|
|
927
|
+
message: NcpMessage;
|
|
928
|
+
requestId: string;
|
|
929
|
+
sessionId: string;
|
|
930
|
+
};
|
|
931
|
+
type AgentRuntimeSessionRequestDispatcherOptions = {
|
|
932
|
+
eventBus: EventBus;
|
|
933
|
+
ingress: Ingress;
|
|
934
|
+
};
|
|
935
|
+
declare function waitForAgentRuntimeSessionReply(input: {
|
|
936
|
+
eventBus: EventBus;
|
|
937
|
+
onAccepted: (messageId: string) => void;
|
|
938
|
+
requestId: string;
|
|
939
|
+
}): {
|
|
940
|
+
dispose: Unsubscribe;
|
|
941
|
+
promise: Promise<NcpMessage>;
|
|
942
|
+
};
|
|
943
|
+
declare function dispatchAgentRuntimeSessionRequest(input: {
|
|
944
|
+
ingress: Ingress;
|
|
945
|
+
request: SessionRequestRecord;
|
|
946
|
+
task: string;
|
|
947
|
+
}): Promise<void>;
|
|
948
|
+
declare function createAgentRuntimeSessionRequestDispatcher(options: AgentRuntimeSessionRequestDispatcherOptions): SessionRequestDispatcher;
|
|
949
|
+
//#endregion
|
|
950
|
+
//#region src/utils/ncp-session-summary.utils.d.ts
|
|
951
|
+
declare function createNcpSessionSummary(params: {
|
|
952
|
+
sessionId: string;
|
|
953
|
+
agentId?: string;
|
|
954
|
+
messages: readonly NcpMessage[];
|
|
955
|
+
updatedAt: string;
|
|
956
|
+
status: NcpSessionStatus;
|
|
957
|
+
metadata?: Record<string, unknown>;
|
|
958
|
+
contextWindow?: Record<string, unknown> | null;
|
|
959
|
+
}): NcpSessionSummary;
|
|
960
|
+
//#endregion
|
|
961
|
+
//#region src/utils/ncp-session-message-adapter.utils.d.ts
|
|
962
|
+
declare function toNcpMessages(sessionId: string, messages: SessionMessage[]): NcpMessage[];
|
|
963
|
+
declare function resolveLegacyEventType(message: SessionMessage): string;
|
|
438
964
|
//#endregion
|
|
439
|
-
export { AgentId, AgentManager, AgentRecord,
|
|
965
|
+
export { AGENT_RUNTIME_SESSION_MESSAGE_INGRESS_TYPE, AgentId, AgentManager, AgentRecord, AgentRuntimeContribution, AgentRuntimeEndpoint, AgentRuntimeEntry, type AgentRuntimeHandle, AgentRuntimeManager, AgentRuntimeManagerOptions, AgentRuntimeProviderRegistration, AgentRuntimeRegistry, AgentRuntimeSessionMessageRequest, AgentRuntimeSessionRequestDispatcherOptions, AgentRuntimeSessionTypeDescribeParams, AgentRuntimeSessionTypeIcon, AgentRuntimeSessionTypeOption, AutomationId, AutomationManager, AutomationManagerOptions, BuiltinNarpRuntimeRegistrationService, ChannelId, ChannelManager, ChannelReplyRouterDispatchParams, ConfigManager, ConfigManagerOptions, ConfigManagerRuntimeHooks, ContextCompactionPendingWork, ContextCompactionPreflightBeginResult, ContextCompactionPreflightResult, ContextCompactionPreflightService, ContextWindowOwner, DEFAULT_AGENT_RUNTIME_ENTRY_ID, DEFAULT_LEARNING_LOOP_TOOL_CALL_THRESHOLD, DirectPromptDispatchParams, ExtensionContributions, ExtensionManager, GatewayInboundLoopRuntime, InstallationKind, LEARNING_LOOP_DISABLED_METADATA_KEY, LEARNING_LOOP_LAST_REQUESTED_AT_METADATA_KEY, LEARNING_LOOP_LAST_REVIEW_SESSION_ID_METADATA_KEY, LEARNING_LOOP_LAST_TOOL_CALL_COUNT_METADATA_KEY, LEARNING_LOOP_REQUESTED_SKILLS, LEARNING_LOOP_SOURCE_SESSION_ID_METADATA_KEY, LearningLoopManager, LearningLoopManagerOptions, LearningLoopRuntimeConfig, LearningLoopSessionRequester, LlmProviderManager, LlmProviderRuntime, LlmUsageManager, LlmUsageManagerOptions, LlmUsageRecord, LlmUsageSnapshot, LlmUsageStore, LlmUsageStoreOptions, LlmUsageSummary, NARP_HTTP_RUNTIME_KIND, NARP_STDIO_RUNTIME_KIND, NativeAgentRuntimeFactory, NativeAgentRuntimeFactoryOptions, NativeRuntimeFactory, NcpRunnerAgent, NcpSessionApiService, NcpSessionApiServiceOptions, NextclawExtensionRegistry, NextclawKernel, NextclawKernelOptions, NextclawNcpContextBuilder, NextclawNcpToolRegistry, PluginRuntimeRegistrationController, ProviderManagerNcpLLMApi, RunPromptOverNcpParams, SessionId, SkillId, SkillManager, SkillRecord, StreamPromptOverNcpParams, TaskId, ToolId, ToolManager, ToolRecord, UnsignedUpdateManifest, UpdateBlockReason, UpdateHostKind, UpdateManifest, UpdateManifestReader, UpdatePreferences, UpdateProgress, UpdateSnapshot, UpdateStatus, UpdateToolCallResult, buildLearningLoopTask, buildLlmUsageSummary, buildNcpUserMessage, buildUserMessageParts, createAgentRuntimeHandle, createAgentRuntimeSessionRequestDispatcher, createAssetTools, createLlmUsageRecord, createNcpSessionSummary, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, getUnsignedUpdateManifest, hasLlmUsageTelemetry, isReplyCapableChannel, normalizeAgentRuntimeSessionTypeIcon, normalizeLlmUsageModel, readAccountIdForHints, readLearningLoopRuntimeConfig, resolveAgentHandoffDepth, resolveAgentRuntimeEntries, resolveChannelReplyRoute, resolveLegacyEventType, runGatewayInboundLoop, runPromptOverNcp, sanitizeLlmUsage, serializeUnsignedUpdateManifest, streamPromptOverNcp, toNcpMessages, waitForAgentRuntimeSessionReply };
|