@nextclaw/kernel 0.18.5 → 0.19.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.
Files changed (62) hide show
  1. package/dist/agent-model-input-budget.utils-tw9zs9WM.js +26 -0
  2. package/dist/agent-model-input-budget.utils-tw9zs9WM.js.map +1 -0
  3. package/dist/agent-run-context-compaction.manager-BV6tB0wL.d.ts +28 -0
  4. package/dist/agent-run-context-compaction.manager-BV6tB0wL.d.ts.map +1 -0
  5. package/dist/agent-run-model-input-builder.service-C3ydUx3d.js +320 -0
  6. package/dist/agent-run-model-input-builder.service-C3ydUx3d.js.map +1 -0
  7. package/dist/agent-run.types-CNVBBJnd.d.ts +71 -0
  8. package/dist/agent-run.types-CNVBBJnd.d.ts.map +1 -0
  9. package/dist/context-compaction-preflight.service-ClJEGWKS.d.ts +97 -0
  10. package/dist/context-compaction-preflight.service-ClJEGWKS.d.ts.map +1 -0
  11. package/dist/context-compaction-preflight.service-K0tE34Oz.js +689 -0
  12. package/dist/context-compaction-preflight.service-K0tE34Oz.js.map +1 -0
  13. package/dist/context-compaction.utils-Csf80mdq.d.ts +42 -0
  14. package/dist/context-compaction.utils-Csf80mdq.d.ts.map +1 -0
  15. package/dist/features/context-compaction/services/context-compaction-preflight.service.d.ts +2 -0
  16. package/dist/features/context-compaction/services/context-compaction-preflight.service.js +2 -0
  17. package/dist/features/context-compaction/utils/context-compaction.utils.d.ts +2 -0
  18. package/dist/features/context-compaction/utils/context-compaction.utils.js +202 -0
  19. package/dist/features/context-compaction/utils/context-compaction.utils.js.map +1 -0
  20. package/dist/index.d.ts +52 -1196
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +375 -1797
  23. package/dist/index.js.map +1 -1
  24. package/dist/managers/agent-run-context-compaction.manager.d.ts +2 -0
  25. package/dist/managers/agent-run-context-compaction.manager.js +68 -0
  26. package/dist/managers/agent-run-context-compaction.manager.js.map +1 -0
  27. package/dist/request-context-tail.manager-DXC4rdAP.d.ts +22 -0
  28. package/dist/request-context-tail.manager-DXC4rdAP.d.ts.map +1 -0
  29. package/dist/services/agent-run-model-input-builder.service.d.ts +58 -0
  30. package/dist/services/agent-run-model-input-builder.service.d.ts.map +1 -0
  31. package/dist/services/agent-run-model-input-builder.service.js +2 -0
  32. package/dist/tool-schema.tools-CtZEKWeY.js +75 -0
  33. package/dist/tool-schema.tools-CtZEKWeY.js.map +1 -0
  34. package/dist/tools/show-content.tools.d.ts +10 -0
  35. package/dist/tools/show-content.tools.d.ts.map +1 -0
  36. package/dist/tools/show-content.tools.js +294 -0
  37. package/dist/tools/show-content.tools.js.map +1 -0
  38. package/dist/tools/tool-schema.tools.d.ts +29 -0
  39. package/dist/tools/tool-schema.tools.d.ts.map +1 -0
  40. package/dist/tools/tool-schema.tools.js +2 -0
  41. package/dist/tools/user-question.tools.d.ts +63 -0
  42. package/dist/tools/user-question.tools.d.ts.map +1 -0
  43. package/dist/tools/user-question.tools.js +77 -0
  44. package/dist/tools/user-question.tools.js.map +1 -0
  45. package/dist/types/update-contract.types.d.ts +1 -1
  46. package/dist/types/update-contract.types.js +1 -1
  47. package/dist/{update-manifest.types-CQpbURTE.d.ts → update-manifest.types-Dl4B87Pa.d.ts} +1 -1
  48. package/dist/{update-manifest.types-CQpbURTE.d.ts.map → update-manifest.types-Dl4B87Pa.d.ts.map} +1 -1
  49. package/dist/{update-manifest.types-C0qPrjGQ.js → update-manifest.types-eSil_QH0.js} +1 -1
  50. package/dist/{update-manifest.types-C0qPrjGQ.js.map → update-manifest.types-eSil_QH0.js.map} +1 -1
  51. package/dist/user-question.manager-BSpxlV5l.d.ts +1037 -0
  52. package/dist/user-question.manager-BSpxlV5l.d.ts.map +1 -0
  53. package/dist/user-question.utils-DWVtPv4S.d.ts +27 -0
  54. package/dist/user-question.utils-DWVtPv4S.d.ts.map +1 -0
  55. package/dist/utils/agent-onboarding-context.utils.d.ts +6 -0
  56. package/dist/utils/agent-onboarding-context.utils.d.ts.map +1 -0
  57. package/dist/utils/agent-onboarding-context.utils.js +39 -0
  58. package/dist/utils/agent-onboarding-context.utils.js.map +1 -0
  59. package/dist/utils/user-question.utils.d.ts +2 -0
  60. package/dist/utils/user-question.utils.js +105 -0
  61. package/dist/utils/user-question.utils.js.map +1 -0
  62. package/package.json +61 -16
package/dist/index.d.ts CHANGED
@@ -1,11 +1,18 @@
1
+ import { a as ContextCompactionTrigger, i as ContextCompactionPreflightService, n as ContextCompactionPreflightBeginResult, o as CompactionSummaryProvider, r as ContextCompactionPreflightResult, t as CompactionProfileResolver } from "./context-compaction-preflight.service-ClJEGWKS.js";
2
+ import { _ as readContextCompactionCheckpoint, a as CONTEXT_COMPACTION_SYSTEM_PREAMBLE, b as shouldRefreshContextWindowDuringStream, c as ContextCompactionTimelineCheckpoint, d as buildContextCompactionTimelineNcpMessage, f as createContextCompactionMessageId, g as isContextWindowSnapshot, h as isContextCompactionTimelineMessage, i as CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, l as NEXTCLAW_TIMELINE_KIND_METADATA_KEY, m as isContextCompactionProjectionMessage, n as CONTEXT_COMPACTION_PART_START, o as CONTEXT_COMPACTION_TIMELINE_KIND, p as createContextWindowSignature, r as CONTEXT_COMPACTION_PROJECTION_KIND, s as ContextCompactionModelProjection, t as CONTEXT_COMPACTION_CONTINUATION_TEXT, u as buildContextCompactionModelProjection, v as readContextWindowEventSessionId, x as shouldRefreshContextWindowImmediately, y as readLatestContextCompactionCheckpoint } from "./context-compaction.utils-Csf80mdq.js";
3
+ import { $ as CreateProjectInput, A as ProjectRecentArtifact, At as PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS, B as ProjectWorkItemListEntry, C as ProjectAgreementMaterial, Ct as AgentManager, D as CreateProjectWorkStateInput, Dt as ConfigManagerOptions, E as CreateProjectWorkItemInput, Et as ConfigManager, F as ProjectWorkActor, Ft as LlmProviderRuntime, G as ProjectWorkSummary, H as ProjectWorkListInput, I as ProjectWorkArtifactLink, It as ProviderModelsDiscoverInput, J as ProjectError, K as UpdateProjectWorkItemInput, L as ProjectWorkAttention, Lt as ChannelManager, M as ProjectWorkActivity, Mt as ProviderModelCatalogManager, N as ProjectWorkActivityPage, Nt as ProviderModelCatalogSnapshot, O as PROJECT_WORK_ATTENTION_VALUES, Ot as ConfigManagerRuntimeHooks, P as ProjectWorkActivityType, Pt as LlmProviderManager, Q as isProjectError, R as ProjectWorkItem, S as ProjectMaterialService, St as ContextProviderManager, T as ProjectWorkManager, Tt as ResolvedAgentProfile, U as ProjectWorkState, V as ProjectWorkItemPage, W as ProjectWorkStateCategory, X as ProjectManager, Y as ProjectErrorCode, Z as ProjectManagerOptions, _ as SessionManager, _t as isSessionMessageCursorError, a as AgentRunClient, at as NcpAgentSessionJournalStore, b as ProjectWorkErrorCode, bt as ToolProviderManager, c as AgentRunReplyOptions, ct as SessionMessageCursorError, d as SessionRunManager, dt as SessionModelTokenUsage, et as PROJECT_TEMPLATE_IDS, f as SessionRunPendingRequest, ft as SessionSettingsError, g as ProductActivitySource, gt as SessionTokenUsageTotals, h as ProductActivitySink, ht as SessionTokenUsageSummary, i as UserQuestionResolution, it as ProjectTemplateId, j as ProjectRecentArtifactPage, jt as ProviderModelCatalogEntry, k as PROJECT_WORK_STATE_CATEGORIES, kt as ConfigMutationResult, l as AgentRunStreamOptions, lt as SessionMessagePage, m as ProductActivitySignal, mt as SessionTokenUsageStatus, n as UserQuestionManager, nt as ProjectSessionBinding, o as AgentRunExecution, ot as AgentRunSession, p as ProductActivityKind, pt as SessionSettingsPatch, q as UpdateProjectWorkStateInput, r as UserQuestionReplyResolution, rt as ProjectTemplate, s as AgentRunReply, st as CreateAgentRunSessionParams, t as UserQuestionError, tt as ProjectRecord, u as SessionRun, ut as SessionMetadataUpdate, v as SessionManagerOptions, vt as isSessionSettingsError, w as ProjectSkillMaterial, wt as AgentManagerOptions, x as isProjectWorkError, xt as ToolRunContext, y as ProjectWorkError, yt as AgentContextWindowManager, z as ProjectWorkItemDetail } from "./user-question.manager-BSpxlV5l.js";
4
+ import { a as ContextBlock$1, c as SessionQueuedInput, i as AgentRunSpec, l as SessionSteerQueuedInputResult, n as AgentRunContinueRequest, s as SessionPendingInput, t as AgentRunAccepted } from "./agent-run.types-CNVBBJnd.js";
5
+ import { n as AgentRunContextCompactionManager } from "./agent-run-context-compaction.manager-BV6tB0wL.js";
6
+ import { t as RequestContextTailManager } from "./request-context-tail.manager-DXC4rdAP.js";
7
+ import { n as UserQuestionPrompt, r as UserQuestionView, t as USER_QUESTION_EXTENSION_TYPE } from "./user-question.utils-DWVtPv4S.js";
1
8
  import { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, getAutomaticUpdateCheckDelay, resolveAutomaticUpdateCheckIntervalMs } from "./utils/automatic-update-check.utils.js";
2
- import { a as getUnsignedUpdateManifest, c as UpdateBlockReason, d as UpdateStatus, i as UpdateManifestReader, l as UpdateProgress, n as UpdateHostKind, o as serializeUnsignedUpdateManifest, r as UpdateManifest, s as InstallationKind, t as UnsignedUpdateManifest, u as UpdateSnapshot } from "./update-manifest.types-CQpbURTE.js";
9
+ import { a as getUnsignedUpdateManifest, c as UpdateBlockReason, d as UpdateStatus, i as UpdateManifestReader, l as UpdateProgress, n as UpdateHostKind, o as serializeUnsignedUpdateManifest, r as UpdateManifest, s as InstallationKind, t as UnsignedUpdateManifest, u as UpdateSnapshot } from "./update-manifest.types-Dl4B87Pa.js";
3
10
  import { AgentRunSendIngressPayload, AppEventEmitOptions, AppEventEnvelope, AppEventHandler, AppEventKey, Contribution as Contribution$1, Disposer, Disposer as Disposer$1, EventBus, EventBus as EventBus$1, EventBusOptions, InboxDelivery, InboxDeliveryContentType, InboxDeliveryListView, InboxDeliverySource, InboxDeliveryStateAction, Ingress, Ingress as Ingress$1, IngressContext, IngressEnvelope, IngressHandler, Key, RuntimeModelSelectionMode, SystemObjectReferenceGroupDescriptor, SystemObjectReferenceItem, SystemObjectReferenceListView, SystemObjectResolvedReference, TypedKey, Unsubscribe, Unsubscribe as Unsubscribe$1, createTypedKey, eventKeys, ingressKeys } from "@nextclaw/shared";
4
11
  import { LocalAssetStore } from "@nextclaw/ncp-agent-runtime";
5
12
  import * as _$_nextclaw_core0 from "@nextclaw/core";
6
- import { BaseChannel, Config, ContextCompactionCheckpoint, ContextCompactionPhase, ContextCompactionPlan, ContextWindowSnapshot, CreateAgentProfileInput, CreateSessionContextInheritanceInput, CreateSessionInput, CreatedSession, CronService, DiagnosticRuntime, EffectiveAgentProfile, ExtensionChannelBinding, ExtensionDiagnostic, ExtensionRegistry, ExtensionUiMetadata, GatewayController, InboundAttachment, InboundMessage, LLMProvider, LLMResponse, LLMResponse as LLMResponse$1, LLMStreamEvent, LLMStreamEvent as LLMStreamEvent$1, LocalExecutionClaimService, LocalizedTextMap, LocalizedTextMap as LocalizedTextMap$1, McpServerDefinition, McpServerDefinition as McpServerDefinition$1, MessageBus, ModelThinkingCapability, OutboundMessage, ProviderCatalogPlugin, ProviderCatalogPlugin as ProviderCatalogPlugin$1, ProviderModelDiscoveryResult, ProviderSpec, ProviderSpec as ProviderSpec$1, RUNTIME_INSTANCE_DESKTOP_DATA_DIRECTORY_ENV, RUNTIME_INSTANCE_DESKTOP_LOGS_DIRECTORY_ENV, RUNTIME_INSTANCE_DISTRIBUTION_ENV, RUNTIME_INSTANCE_INSTALLATION_KIND_ENV, RUNTIME_INSTANCE_PORTABLE_DATA_ROOT_ENV, RequestSessionParams, SearchConfig, SessionMessage, SessionRequestDispatcher, SessionRequestRecord, SessionRequestSourceNotifier, SessionRequestToolResult, SessionSearchService, SkillFrontmatter, SkillInfo, SkillInfo as SkillInfo$1, SkillScope, SpawnSessionAndRequestParams, ThinkingLevel, UpdateAgentProfileInput, buildCompressingCompactionCheckpoint, buildLocalizedTextMap, parseSkillFrontmatter, resolveThinkingLevel, stripSkillFrontmatter } from "@nextclaw/core";
7
- import { ListMessagesOptions, ListSessionsOptions, ModelInputTail, ModelInputTailSection, NcpAgentConversationStateManager, NcpAgentRuntime, NcpEndpointEvent, NcpEndpointEvent as NcpEndpointEvent$1, NcpEventType, NcpInputDelivery, NcpJsonValue, NcpLLMApi, NcpLLMApiInput, NcpLLMApiOptions, NcpMessage, NcpMessage as NcpMessage$1, NcpMessagePart, NcpResolvedInputDelivery, NcpRunHandle, NcpRunTriggerInput, NcpSessionApi, NcpSessionMessagePageInfo, NcpSessionPatch, NcpSessionSummary, NcpTool, NcpTool as NcpTool$1, OpenAIChatChunk, OpenAIChatMessage } from "@nextclaw/ncp";
8
- import { AgentSessionRecord, ChatTarget, NcpReplyInput, RuntimeFactoryParams } from "@nextclaw/ncp-toolkit";
13
+ import { BaseChannel, Config, CronService, DiagnosticRuntime, ExtensionChannelBinding, ExtensionDiagnostic, ExtensionRegistry, ExtensionUiMetadata, GatewayController, InboundAttachment, InboundMessage, LLMResponse, LLMResponse as LLMResponse$1, LLMStreamEvent, LLMStreamEvent as LLMStreamEvent$1, LocalExecutionClaimService, LocalizedTextMap, LocalizedTextMap as LocalizedTextMap$1, McpServerDefinition, McpServerDefinition as McpServerDefinition$1, MessageBus, ModelThinkingCapability, ProviderCatalogPlugin, ProviderCatalogPlugin as ProviderCatalogPlugin$1, ProviderSpec, ProviderSpec as ProviderSpec$1, RUNTIME_INSTANCE_DESKTOP_DATA_DIRECTORY_ENV, RUNTIME_INSTANCE_DESKTOP_LOGS_DIRECTORY_ENV, RUNTIME_INSTANCE_DISTRIBUTION_ENV, RUNTIME_INSTANCE_INSTALLATION_KIND_ENV, RUNTIME_INSTANCE_PORTABLE_DATA_ROOT_ENV, RequestSessionParams, SessionMessage, SessionRequestDispatcher, SessionRequestRecord, SessionRequestSourceNotifier, SessionRequestToolResult, SessionSearchService, SkillFrontmatter, SkillInfo, SkillInfo as SkillInfo$1, SkillScope, SpawnSessionAndRequestParams, ThinkingLevel, buildLocalizedTextMap, parseSkillFrontmatter, resolveThinkingLevel, stripSkillFrontmatter } from "@nextclaw/core";
14
+ import { NcpAgentRuntime, NcpEndpointEvent, NcpEndpointEvent as NcpEndpointEvent$1, NcpJsonValue, NcpLLMApi, NcpLLMApiInput, NcpLLMApiOptions, NcpMessage, NcpMessage as NcpMessage$1, NcpMessagePart, NcpResolvedInputDelivery, NcpRunHandle, NcpTool, NcpTool as NcpTool$1, OpenAIChatChunk, OpenAIChatMessage } from "@nextclaw/ncp";
15
+ import { ChatTarget, NcpReplyInput, RuntimeFactoryParams } from "@nextclaw/ncp-toolkit";
9
16
  import * as _$_nextclaw_app_runtime0 from "@nextclaw/app-runtime";
10
17
  import { AppDocumentGrantMutationResult, AppDocumentGrantState, AppInstallProgressHandler, AppInstalledPermissionState, AppNativeArtifactTarget, AppPermissions, AppPlatformTargetService, AppRollbackResult, AppRuntimeIsolation, AppRuntimeProfile, AppSecretBinding, AppSecretSlot, AppStorageContext, AppStorageUsage, AppUninstallResult, AppUpdateResult } from "@nextclaw/app-runtime";
11
18
  import * as _$_nextclaw_mcp0 from "@nextclaw/mcp";
@@ -101,1038 +108,6 @@ declare function describeAgentRuntimeSessionTypes(params: {
101
108
  options: AgentRuntimeSessionTypeOption[];
102
109
  }>;
103
110
  //#endregion
104
- //#region src/managers/channel.manager.d.ts
105
- declare class ChannelManager {
106
- private readonly deps;
107
- private channels;
108
- private channelConfig;
109
- private dispatching;
110
- private dispatchTask;
111
- private extensionChannels;
112
- constructor(deps: {
113
- bus: MessageBus;
114
- diagnostics?: Pick<DiagnosticRuntime, "record" | "readCorrelationId">;
115
- });
116
- readonly load: (params: {
117
- channelConfig: Config;
118
- extensionChannels?: ExtensionRegistry["channels"];
119
- }) => void;
120
- readonly reload: (params: {
121
- channelConfig: Config;
122
- extensionChannels?: ExtensionRegistry["channels"];
123
- start?: boolean;
124
- }) => Promise<void>;
125
- readonly start: () => Promise<void>;
126
- readonly stop: () => Promise<void>;
127
- readonly status: () => Record<string, {
128
- enabled: boolean;
129
- running: boolean;
130
- }>;
131
- get enabledChannels(): string[];
132
- readonly getChannel: (name: string) => BaseChannel<Record<string, unknown>> | null;
133
- readonly deliver: (message: OutboundMessage) => Promise<boolean>;
134
- private readonly recordDelivery;
135
- private readonly initChannels;
136
- private readonly startChannel;
137
- private readonly normalizeOutbound;
138
- private readonly dispatchOutbound;
139
- }
140
- //#endregion
141
- //#region src/managers/llm-provider.manager.d.ts
142
- type ProviderChatParams = {
143
- messages: Array<Record<string, unknown>>;
144
- tools?: Array<Record<string, unknown>>;
145
- model?: string | null;
146
- maxTokens?: number;
147
- thinkingLevel?: ThinkingLevel | null;
148
- sessionId?: string;
149
- requestId?: string;
150
- signal?: AbortSignal;
151
- };
152
- type LlmProviderRuntime = {
153
- get: (model?: string | null) => LLMProvider;
154
- chat: (params: ProviderChatParams) => Promise<LLMResponse$1>;
155
- chatStream: (params: ProviderChatParams) => AsyncGenerator<LLMStreamEvent$1>;
156
- };
157
- type ProviderConnectionTestInput = {
158
- providerName: string | null;
159
- apiKey?: string | null;
160
- apiBase?: string | null;
161
- defaultModel: string;
162
- extraHeaders?: Record<string, string> | null;
163
- wireApi?: "auto" | "chat" | "responses" | null;
164
- messages: Array<Record<string, unknown>>;
165
- maxTokens?: number;
166
- signal?: AbortSignal;
167
- };
168
- type ProviderModelsDiscoverInput = {
169
- providerName: string | null;
170
- apiKey?: string | null;
171
- apiBase?: string | null;
172
- extraHeaders?: Record<string, string> | null;
173
- signal?: AbortSignal;
174
- };
175
- declare class LlmProviderManager {
176
- private readonly providerRegistry;
177
- private readonly contributedProviderPlugins;
178
- private readonly providerModelDiscovery;
179
- private readonly providerPool;
180
- private readonly missingProvider;
181
- private config;
182
- constructor();
183
- registerProviderPlugin: (plugin: ProviderCatalogPlugin$1) => (() => void);
184
- listProviderSpecs: () => readonly ProviderSpec$1[];
185
- load: (config: Config) => void;
186
- get: (model?: string | null) => LLMProvider;
187
- readonly chat: (params: ProviderChatParams) => Promise<LLMResponse$1>;
188
- readonly chatStream: (this: LlmProviderManager, params: ProviderChatParams) => AsyncGenerator<LLMStreamEvent$1>;
189
- readonly testConnection: (input: ProviderConnectionTestInput) => Promise<void>;
190
- supportsModelDiscovery: (providerName: string | null) => boolean;
191
- discoverModels: (input: ProviderModelsDiscoverInput) => Promise<ProviderModelDiscoveryResult>;
192
- private refreshProviderRegistry;
193
- private resolveRoute;
194
- private resolveProvider;
195
- private matchPrefixedProvider;
196
- private resolveProviderType;
197
- private resolveProviderApiKey;
198
- private rewriteModelForTemplate;
199
- private normalizeProviderModelConfigForRoute;
200
- private getOrCreateProvider;
201
- private createProvider;
202
- private prepareMessagesForProvider;
203
- private buildRequestHeaders;
204
- private buildCacheKey;
205
- }
206
- //#endregion
207
- //#region src/managers/provider-model-catalog.manager.d.ts
208
- declare const PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS: number;
209
- type ProviderModelCatalogEntry = {
210
- providerId: string;
211
- models: string[];
212
- source: "provider" | "catalog" | null;
213
- fetchedAt: string | null;
214
- lastError: {
215
- message: string;
216
- occurredAt: string;
217
- } | null;
218
- };
219
- type ProviderModelCatalogSnapshot = {
220
- refreshIntervalMs: number;
221
- refreshing: boolean;
222
- lastRefreshStartedAt: string | null;
223
- lastRefreshCompletedAt: string | null;
224
- providers: Record<string, ProviderModelCatalogEntry>;
225
- };
226
- type ProviderModelCatalogManagerOptions = {
227
- refreshIntervalMs?: number;
228
- providerTimeoutMs?: number;
229
- now?: () => Date;
230
- };
231
- declare class ProviderModelCatalogManager {
232
- private readonly providerManager;
233
- private config;
234
- private readonly entries;
235
- private readonly providerTimeoutMs;
236
- private readonly refreshIntervalMs;
237
- private readonly now;
238
- private refreshTask;
239
- private refreshPending;
240
- private refreshTimer;
241
- private started;
242
- private lastRefreshStartedAt;
243
- private lastRefreshCompletedAt;
244
- constructor(providerManager: Pick<LlmProviderManager, "discoverModels" | "supportsModelDiscovery">, options?: ProviderModelCatalogManagerOptions);
245
- load: (config: Config) => void;
246
- start: () => void;
247
- dispose: () => void;
248
- refresh: () => Promise<void>;
249
- getSnapshot: () => ProviderModelCatalogSnapshot;
250
- private refreshConfiguredProviders;
251
- private refreshProvider;
252
- }
253
- //#endregion
254
- //#region src/managers/config.manager.d.ts
255
- type ConfigManagerRuntimeHooks = {
256
- resolveChannelConfig?: (config: Config) => Config;
257
- getExtensionChannels?: () => ExtensionRegistry["channels"];
258
- applyAgentRuntimeConfig?: (config: Config) => void;
259
- reloadExtensions?: (params: {
260
- config: Config;
261
- changedPaths: string[];
262
- }) => Promise<void> | void;
263
- reloadCompanion?: (params: {
264
- config: Config;
265
- changedPaths: string[];
266
- }) => Promise<void> | void;
267
- reloadMcp?: (params: {
268
- config: Config;
269
- changedPaths: string[];
270
- }) => Promise<void> | void;
271
- onRestartRequired?: (paths: string[]) => void;
272
- };
273
- type ConfigManagerOptions = {
274
- configPath?: string;
275
- channels: ChannelManager;
276
- diagnostics?: Pick<DiagnosticRuntime, "record">;
277
- providerManager: LlmProviderManager;
278
- providerModelCatalogManager?: Pick<ProviderModelCatalogManager, "load">;
279
- };
280
- type ConfigMutationResult = Record<string, unknown> & {
281
- ok: boolean;
282
- error?: string;
283
- };
284
- type RawConfigMutationParams = {
285
- raw: string;
286
- baseHash?: string;
287
- note?: string;
288
- version?: string;
289
- };
290
- declare class ConfigManager {
291
- private readonly options;
292
- readonly configPath: string;
293
- private currentConfig;
294
- private hooks;
295
- private reloadTask;
296
- private providerReloadTask;
297
- private reloadTimer;
298
- private reloadRunning;
299
- private reloadPending;
300
- constructor(options: ConfigManagerOptions);
301
- get config(): Config;
302
- loadConfig: () => Config;
303
- getDefaultModel: () => string;
304
- getModelMaxTokens: (model: string) => number | undefined;
305
- installRuntimeHooks: (hooks: ConfigManagerRuntimeHooks) => (() => void);
306
- applyLiveConfigReload: () => Promise<void>;
307
- applyReloadPlan: (nextConfig: Config) => Promise<void>;
308
- private recordConfigEvent;
309
- getConfigSnapshot: (params?: {
310
- version?: string;
311
- }) => Record<string, unknown>;
312
- getConfigSchema: (params?: {
313
- version?: string;
314
- }) => Record<string, unknown>;
315
- applyRawConfig: (params: RawConfigMutationParams) => Promise<ConfigMutationResult>;
316
- patchRawConfig: (params: RawConfigMutationParams) => Promise<ConfigMutationResult>;
317
- applyConfig: (nextConfig: Config, note?: string) => Promise<ConfigMutationResult>;
318
- scheduleReload: (reason: string) => void;
319
- runReload: (_reason: string) => Promise<void>;
320
- reloadConfig: (reason?: string) => Promise<string>;
321
- rebuildChannels: (nextConfig: Config, options?: {
322
- start?: boolean;
323
- }) => Promise<void>;
324
- private resolveChannelConfig;
325
- private resolveExtensionChannels;
326
- private reloadProvider;
327
- private reloadMcp;
328
- private reloadCompanion;
329
- private readConfigSnapshot;
330
- private redactConfig;
331
- private validateBaseHash;
332
- private validateConfigInput;
333
- private mutateRawConfig;
334
- private applyConfigChange;
335
- private createConfigMutationResult;
336
- }
337
- //#endregion
338
- //#region src/managers/agent.manager.d.ts
339
- type ResolvedAgentProfile = EffectiveAgentProfile & {
340
- contextTokens: number;
341
- model: string;
342
- reservedContextTokens: number;
343
- };
344
- type AgentManagerOptions = {
345
- configPath?: string;
346
- initializeAgentHomeDirectory?: (homeDirectory: string) => void;
347
- };
348
- declare class AgentManager {
349
- private readonly configManager?;
350
- private readonly options;
351
- constructor(configManager?: Pick<ConfigManager, "applyLiveConfigReload" | "loadConfig"> | undefined, options?: AgentManagerOptions);
352
- listAgents: () => EffectiveAgentProfile[];
353
- getAgent: (agentId: string) => EffectiveAgentProfile | null;
354
- getDefaultAgentId: () => string;
355
- resolveAgentProfile: (agentId?: string | null) => ResolvedAgentProfile;
356
- resolveAgentProfileForContextWindow: (params: {
357
- agentId: string;
358
- contextTokens: number;
359
- }) => ResolvedAgentProfile;
360
- resolveAgentProfileForRun: (params?: {
361
- agentId?: string | null;
362
- requestMetadata?: Record<string, unknown>;
363
- storedAgentId?: string | null;
364
- }) => ResolvedAgentProfile;
365
- createAgent: (input: CreateAgentProfileInput) => Promise<EffectiveAgentProfile>;
366
- updateAgent: (input: UpdateAgentProfileInput) => Promise<EffectiveAgentProfile>;
367
- removeAgent: (agentId: string) => Promise<boolean>;
368
- private loadConfig;
369
- private reloadLiveConfig;
370
- private resolveAgentProfileFromConfig;
371
- }
372
- //#endregion
373
- //#region src/types/agent-run.types.d.ts
374
- type ThinkingEffort = string;
375
- type ContextBlock$1 = string;
376
- type AgentRunRequest = {
377
- sessionId?: string;
378
- peerId?: string;
379
- message: NcpMessage$1;
380
- agentRuntimeId?: string;
381
- agentId?: string;
382
- projectRoot?: string;
383
- channel?: string;
384
- correlationId?: string;
385
- metadata?: Record<string, unknown>;
386
- model?: string;
387
- maxTokens?: number;
388
- thinkingEffort?: ThinkingEffort | null;
389
- delivery?: NcpInputDelivery;
390
- idempotencyKey?: string;
391
- trigger?: NcpRunTriggerInput;
392
- };
393
- type AgentRunContinueRequest = {
394
- correlationId?: string;
395
- sessionId: string;
396
- trigger?: NcpRunTriggerInput;
397
- };
398
- type AgentRunAccepted = {
399
- sessionId: string;
400
- userMessageId: string;
401
- runId: string | null;
402
- correlationId?: string;
403
- delivery: NcpResolvedInputDelivery;
404
- };
405
- type SessionQueuedInput = {
406
- id: string;
407
- sessionId: string;
408
- enqueuedAt: string;
409
- message: NcpMessage$1;
410
- metadata: Record<string, unknown>;
411
- };
412
- type SessionPendingInput = SessionQueuedInput & {
413
- placement: "queued" | "steering";
414
- intendedRunId: string | null;
415
- };
416
- type SessionSteerQueuedInputResult = {
417
- ok: true;
418
- input: SessionPendingInput;
419
- } | {
420
- ok: false;
421
- reason: "not-found" | "unavailable";
422
- };
423
- type AgentRunSpec = {
424
- runId: string;
425
- runtimeId: string;
426
- agentId: string;
427
- model: string;
428
- requestedModel: string | null;
429
- maxTokens?: number;
430
- thinkingEffort?: ThinkingEffort | null;
431
- correlationId?: string;
432
- };
433
- type ContextProvider$1 = {
434
- provide: (request: AgentRunRequest) => Promise<readonly ContextBlock$1[]> | readonly ContextBlock$1[];
435
- };
436
- type ToolProvider = {
437
- provide: (request: AgentRunRequest) => Promise<readonly NcpTool$1[]> | readonly NcpTool$1[];
438
- };
439
- //#endregion
440
- //#region src/managers/context-provider.manager.d.ts
441
- declare class ContextProviderManager {
442
- private readonly providers;
443
- register: (provider: ContextProvider$1) => (() => void);
444
- buildContext: (request: AgentRunRequest) => Promise<readonly ContextBlock$1[]>;
445
- dispose: () => void;
446
- }
447
- //#endregion
448
- //#region src/managers/tool-provider.manager.d.ts
449
- type ToolRunContext = {
450
- agentId: string;
451
- channel: string;
452
- chatId: string;
453
- config: Config;
454
- execTimeoutSeconds: number;
455
- handoffDepth: number;
456
- metadata: Record<string, unknown>;
457
- restrictToWorkspace: boolean;
458
- searchConfig: SearchConfig;
459
- sessionId: string;
460
- workspace: string;
461
- };
462
- declare class ToolProviderManager {
463
- private readonly diagnostics?;
464
- private readonly providers;
465
- constructor(diagnostics?: Pick<DiagnosticRuntime, "record"> | undefined);
466
- register: (provider: ToolProvider) => (() => void);
467
- buildTools: (request: AgentRunRequest) => Promise<readonly NcpTool$1[]>;
468
- dispose: () => void;
469
- private readonly wrapTool;
470
- }
471
- //#endregion
472
- //#region src/managers/agent-context-window.manager.d.ts
473
- type AgentContextWindowEvaluation = {
474
- agentId: string;
475
- contextTokens: number;
476
- fixedInputTokens: number;
477
- minimumContextTokens: number;
478
- reservedContextTokens: number;
479
- };
480
- type AgentRunSurface = {
481
- contextBlocks: readonly string[];
482
- tools: readonly NcpTool$1[];
483
- };
484
- declare class AgentContextWindowManager {
485
- private readonly agentManager;
486
- private readonly contextProviderManager;
487
- private readonly toolProviderManager;
488
- private readonly runInputBudgetBySession;
489
- private readonly preflightService;
490
- constructor(agentManager: AgentManager, contextProviderManager: ContextProviderManager, toolProviderManager: ToolProviderManager, assetStore?: LocalAssetStore | null);
491
- resolveRunSurface: (request: AgentRunRequest) => Promise<AgentRunSurface>;
492
- forgetSession: (sessionId: string) => void;
493
- previewSession: (params: {
494
- requestMetadata: Record<string, unknown>;
495
- sessionId: string;
496
- sessionMessages: readonly NcpMessage$1[];
497
- storedAgentId?: string;
498
- storedMetadata: Record<string, unknown>;
499
- }) => Promise<ContextWindowSnapshot | null>;
500
- assertCanSave: (params: {
501
- agentId: string;
502
- contextTokens: number;
503
- }) => Promise<AgentContextWindowEvaluation>;
504
- assertDefaultCanSave: (contextTokens: number) => Promise<AgentContextWindowEvaluation[]>;
505
- private createValidationRequest;
506
- private estimateFixedInputTokens;
507
- private resolveSessionFixedInputTokens;
508
- private buildRunSurface;
509
- private resolveMinimumContextTokens;
510
- }
511
- //#endregion
512
- //#region src/managers/agent-run-context-compaction.manager.d.ts
513
- type AgentRunContextCompactionInput = {
514
- sessionId: string;
515
- agentId: string;
516
- contextBlocks: readonly string[];
517
- messages: readonly NcpMessage$1[];
518
- metadata: Record<string, unknown>;
519
- model: string;
520
- phase?: ContextCompactionPhase;
521
- signal?: AbortSignal;
522
- tools?: readonly NcpTool$1[];
523
- };
524
- declare class AgentRunContextCompactionManager {
525
- private readonly preflightService;
526
- constructor(agentManager: AgentManager, providerManager: LlmProviderRuntime, assetStore?: LocalAssetStore | null);
527
- runPreflight: (input: AgentRunContextCompactionInput) => AsyncIterable<NcpEndpointEvent$1>;
528
- runManual: (input: AgentRunContextCompactionInput) => Promise<readonly NcpEndpointEvent$1[]>;
529
- private run;
530
- private toEvent;
531
- }
532
- //#endregion
533
- //#region src/utils/ncp-agent-session-journal.utils.d.ts
534
- declare const NCP_AGENT_SESSION_SNAPSHOT_MESSAGE_EVENT_TYPE = "session.snapshot.message";
535
- declare const NCP_SESSION_REQUEST_ACCEPTED_EVENT_TYPE = "session.request.accepted";
536
- declare const NCP_SESSION_REQUEST_COMPLETED_EVENT_TYPE = "session.request.completed";
537
- declare const NCP_SESSION_REQUEST_FAILED_EVENT_TYPE = "session.request.failed";
538
- type NcpAgentSessionSnapshotMessageEvent = {
539
- type: typeof NCP_AGENT_SESSION_SNAPSHOT_MESSAGE_EVENT_TYPE;
540
- payload: Extract<NcpEndpointEvent$1, {
541
- type: NcpEventType.MessageSent;
542
- }>["payload"];
543
- };
544
- type NcpSessionRequestJournalEventType = typeof NCP_SESSION_REQUEST_ACCEPTED_EVENT_TYPE | typeof NCP_SESSION_REQUEST_COMPLETED_EVENT_TYPE | typeof NCP_SESSION_REQUEST_FAILED_EVENT_TYPE;
545
- type NcpSessionRequestJournalEvent = {
546
- type: NcpSessionRequestJournalEventType;
547
- payload: {
548
- sessionId: string;
549
- request: unknown;
550
- };
551
- };
552
- type NcpAgentSessionJournalReplayEvent = NcpEndpointEvent$1 | NcpAgentSessionSnapshotMessageEvent | NcpSessionRequestJournalEvent;
553
- //#endregion
554
- //#region src/utils/ncp-agent-unfinished-run.utils.d.ts
555
- type UnfinishedNcpAgentRun = {
556
- sessionId: string;
557
- messageId?: string;
558
- runId?: string;
559
- startedAt?: string;
560
- };
561
- //#endregion
562
- //#region src/types/session.types.d.ts
563
- type SessionMetadataUpdate = {
564
- sessionId: string;
565
- metadata: Record<string, unknown>;
566
- expectedMetadata?: Record<string, unknown>;
567
- };
568
- type SessionMessagePage = {
569
- messages: NcpMessage$1[];
570
- messageDetailCursors: Record<string, string>;
571
- total: number;
572
- pageInfo: NcpSessionMessagePageInfo;
573
- contextWindow: Record<string, unknown> | null;
574
- };
575
- type SessionTokenUsageStatus = "reported" | "partial" | "unavailable";
576
- type SessionTokenUsageTotals = {
577
- inputTokens: number | null;
578
- outputTokens: number | null;
579
- cachedInputTokens: number | null;
580
- totalTokens: number | null;
581
- cacheHitRate: number | null;
582
- };
583
- type SessionModelTokenUsage = SessionTokenUsageTotals & {
584
- model: string;
585
- runCount: number;
586
- modelCallCount: number | null;
587
- reportedModelCallCount: number | null;
588
- status: SessionTokenUsageStatus;
589
- };
590
- type SessionTokenUsageSummary = {
591
- sessionId: string;
592
- totals: SessionTokenUsageTotals;
593
- models: SessionModelTokenUsage[];
594
- runCount: number;
595
- modelCallCount: number | null;
596
- reportedModelCallCount: number | null;
597
- status: SessionTokenUsageStatus;
598
- };
599
- declare class SessionMessageCursorError extends Error {
600
- constructor(message?: string);
601
- }
602
- declare function isSessionMessageCursorError(error: unknown): error is SessionMessageCursorError;
603
- type AgentRunSession = {
604
- sessionId: string;
605
- agentId?: string;
606
- agentRuntimeId: string;
607
- metadata: Record<string, unknown>;
608
- model?: string;
609
- projectRoot?: string;
610
- projectId?: string;
611
- workingDir: string;
612
- thinkingEffort?: ThinkingEffort | null;
613
- };
614
- type CreateAgentRunSessionParams = {
615
- sessionId?: string;
616
- peerId?: string;
617
- agentId?: string;
618
- agentRuntimeId?: string;
619
- channel?: string;
620
- metadata?: Record<string, unknown>;
621
- model?: string;
622
- parentSessionId?: string;
623
- projectRoot?: string;
624
- sourceSessionId?: string;
625
- sourceSessionMetadata?: Record<string, unknown>;
626
- contextInheritance?: CreateSessionContextInheritanceInput;
627
- task?: string;
628
- thinkingEffort?: ThinkingEffort | null;
629
- };
630
- type SessionSettingsPatch = {
631
- label?: string | null;
632
- preferredModel?: string | null;
633
- preferredThinking?: string | null;
634
- sessionType?: string | null;
635
- projectRoot?: string | null;
636
- uiReadAt?: string | null;
637
- };
638
- declare class SessionSettingsError extends Error {
639
- readonly code: "PREFERRED_THINKING_INVALID";
640
- constructor(code: "PREFERRED_THINKING_INVALID", message: string);
641
- }
642
- declare function isSessionSettingsError(error: unknown): error is SessionSettingsError;
643
- //#endregion
644
- //#region src/stores/ncp-agent-session-journal.store.d.ts
645
- declare class NcpAgentSessionJournalStore {
646
- private readonly journalDir;
647
- private readonly sessions;
648
- private readonly nextSeqBySession;
649
- private readonly writeChains;
650
- private readonly metadataStore;
651
- private readonly messageProjectionStore;
652
- private readonly journalLoaderStore;
653
- private readonly unfinishedRunStore;
654
- private readonly summaryIndexStore;
655
- private readonly summaryReadStore;
656
- constructor(journalDir: string);
657
- initialize: () => Promise<void>;
658
- close: () => void;
659
- appendSessionEvent: (params: {
660
- sessionId: string;
661
- event: NcpAgentSessionJournalReplayEvent;
662
- }) => Promise<void>;
663
- synchronizeSessionMessageProjection: (sessionId: string) => Promise<boolean>;
664
- getSession: (sessionId: string) => Promise<AgentSessionRecord | null>;
665
- listSessionSummaries: (options?: {
666
- limit?: number;
667
- }) => Promise<NcpSessionSummary[]>;
668
- listSessionSummaryPage: (options: {
669
- page: number;
670
- pageSize: number;
671
- query?: string;
672
- }) => Promise<{
673
- sessions: NcpSessionSummary[];
674
- total: number;
675
- }>;
676
- getSessionSummary: (sessionId: string) => Promise<NcpSessionSummary | null>;
677
- listUnfinishedRuns: () => Promise<UnfinishedNcpAgentRun[]>;
678
- listSessionMessages: (sessionId: string) => Promise<NcpMessage$1[]>;
679
- listSessionMessagePage: (params: {
680
- sessionId: string;
681
- limit: number;
682
- cursor?: string;
683
- }) => Promise<SessionMessagePage | null>;
684
- updateSessionMessageProjectionContextWindow: (sessionId: string, contextWindow: Record<string, unknown> | null) => Promise<void>;
685
- getSessionMessageProjectionContextWindow: (sessionId: string) => Promise<Record<string, unknown> | null>;
686
- setSessionMetadata: (params: {
687
- sessionId: string;
688
- metadata: Record<string, unknown>;
689
- }) => Promise<boolean>;
690
- updateSessionMetadata: (params: SessionMetadataUpdate) => Promise<boolean>;
691
- private setSessionMetadataNow;
692
- private updateSessionMetadataNow;
693
- importSessionSnapshot: (record: AgentSessionRecord) => Promise<void>;
694
- deleteSession: (sessionId: string) => Promise<AgentSessionRecord | null>;
695
- hasSession: (sessionId: string) => Promise<boolean>;
696
- private appendSessionEventNow;
697
- private loadSession;
698
- private appendJournalEntry;
699
- private ensureJournalDir;
700
- private sessionPath;
701
- }
702
- //#endregion
703
- //#region src/features/projects/types/project.types.d.ts
704
- declare const PROJECT_TEMPLATE_IDS: readonly ["empty", "knowledge-base"];
705
- type ProjectTemplateId = (typeof PROJECT_TEMPLATE_IDS)[number];
706
- type ProjectTemplate = {
707
- id: ProjectTemplateId;
708
- name: string;
709
- description: string;
710
- };
711
- type ProjectRecord = {
712
- id: string;
713
- name: string;
714
- rootPath: string;
715
- template?: ProjectTemplateId;
716
- createdAt: string;
717
- updatedAt: string;
718
- };
719
- type CreateProjectInput = {
720
- name: string;
721
- rootPath?: string;
722
- template?: ProjectTemplateId;
723
- };
724
- type ProjectSessionBinding = {
725
- projectId: string;
726
- rootPath: string;
727
- };
728
- //#endregion
729
- //#region src/features/projects/managers/project.manager.d.ts
730
- type ProjectManagerOptions = {
731
- databasePath: string;
732
- legacyStorePath: string;
733
- getDefaultWorkspacePath: () => string;
734
- onProjectRegistered?: (project: ProjectRecord) => Promise<void>;
735
- };
736
- type ProjectErrorCode = "PROJECT_NAME_INVALID" | "PROJECT_PATH_INVALID_TYPE" | "PROJECT_PATH_NOT_FOUND" | "PROJECT_PATH_NOT_DIRECTORY" | "PROJECT_PATH_IS_DEFAULT_WORKSPACE" | "PROJECT_PATH_NOT_EMPTY" | "PROJECT_TEMPLATE_INVALID" | "PROJECT_NOT_FOUND" | "PROJECT_REMOVE_CONFIRMATION_MISMATCH";
737
- declare class ProjectError extends Error {
738
- readonly code: ProjectErrorCode;
739
- constructor(code: ProjectErrorCode, message: string);
740
- }
741
- declare function isProjectError(error: unknown): error is ProjectError;
742
- declare class ProjectManager {
743
- private readonly options;
744
- private readonly store;
745
- constructor(options: ProjectManagerOptions);
746
- initialize: () => Promise<void>;
747
- dispose: () => void;
748
- listProjects: () => Promise<ProjectRecord[]>;
749
- getProjectById: (projectId: string) => Promise<ProjectRecord | null>;
750
- getRegisteredProject: (rootPath: unknown) => Promise<ProjectRecord | null>;
751
- listTemplates: () => ProjectTemplate[];
752
- createProject: (input: CreateProjectInput) => Promise<ProjectRecord>;
753
- addExistingProject: (rootPath: unknown, name?: string) => Promise<ProjectRecord | null>;
754
- registerExistingProject: (rootPath: unknown, name?: string) => Promise<ProjectRecord | null>;
755
- removeProject: (projectId: string, confirmProjectId: string) => Promise<ProjectRecord>;
756
- normalizeSessionProjectRoot: (value: unknown) => Promise<string | null>;
757
- normalizeSessionProjectContext: (value: unknown) => Promise<ProjectSessionBinding | null>;
758
- resolveExistingProjectRoot: (value: unknown) => Promise<string | null>;
759
- private upsertProject;
760
- private assertNotDefaultWorkspace;
761
- private isDefaultWorkspace;
762
- private materializeTemplate;
763
- private readPathState;
764
- private normalizeName;
765
- private normalizeTemplate;
766
- private resolvePath;
767
- private resolveDefaultWorkspacePath;
768
- private isMissingFileError;
769
- }
770
- //#endregion
771
- //#region src/features/projects/types/project-work.types.d.ts
772
- declare const PROJECT_WORK_STATE_CATEGORIES: readonly ["backlog", "unstarted", "started", "completed", "canceled"];
773
- type ProjectWorkStateCategory = (typeof PROJECT_WORK_STATE_CATEGORIES)[number];
774
- declare const PROJECT_WORK_ATTENTION_VALUES: readonly ["none", "blocked", "awaiting-user"];
775
- type ProjectWorkAttention = (typeof PROJECT_WORK_ATTENTION_VALUES)[number];
776
- type ProjectWorkActor = {
777
- kind: "agent" | "cli" | "system" | "user";
778
- id?: string;
779
- sessionId?: string;
780
- };
781
- type ProjectWorkState = {
782
- id: string;
783
- projectId: string;
784
- name: string;
785
- category: ProjectWorkStateCategory;
786
- position: number;
787
- isDefault: boolean;
788
- createdAt: string;
789
- updatedAt: string;
790
- };
791
- type ProjectWorkItem = {
792
- id: string;
793
- projectId: string;
794
- title: string;
795
- description: string;
796
- stateId: string;
797
- attention: ProjectWorkAttention;
798
- version: number;
799
- createdAt: string;
800
- updatedAt: string;
801
- deletedAt: string | null;
802
- };
803
- type ProjectWorkActivityType = "artifact-linked" | "artifact-unlinked" | "created" | "deleted" | "restored" | "state-changed" | "updated";
804
- type ProjectWorkActivity = {
805
- id: string;
806
- projectId: string;
807
- workItemId: string;
808
- type: ProjectWorkActivityType;
809
- actor: ProjectWorkActor;
810
- details: Record<string, unknown>;
811
- createdAt: string;
812
- };
813
- type ProjectWorkArtifactLink = {
814
- id: string;
815
- projectId: string;
816
- workItemId: string;
817
- path: string;
818
- label: string | null;
819
- createdAt: string;
820
- };
821
- type ProjectWorkItemDetail = ProjectWorkItem & {
822
- state: ProjectWorkState;
823
- artifacts: ProjectWorkArtifactLink[];
824
- };
825
- type ProjectWorkItemListEntry = ProjectWorkItem & {
826
- state: ProjectWorkState;
827
- artifactCount: number;
828
- };
829
- type ProjectWorkListInput = {
830
- stateId?: string;
831
- includeDeleted?: boolean;
832
- cursor?: string;
833
- limit?: number;
834
- };
835
- type ProjectWorkItemPage = {
836
- items: ProjectWorkItemListEntry[];
837
- nextCursor: string | null;
838
- total: number;
839
- };
840
- type ProjectRecentArtifact = {
841
- id: string;
842
- path: string;
843
- label: string | null;
844
- workItemId: string;
845
- workItemTitle: string;
846
- createdAt: string;
847
- exists: boolean;
848
- };
849
- type ProjectRecentArtifactPage = {
850
- artifacts: ProjectRecentArtifact[];
851
- nextCursor: string | null;
852
- total: number;
853
- };
854
- type ProjectWorkSummary = {
855
- active: number;
856
- attention: number;
857
- completed: number;
858
- total: number;
859
- updatedAt: string | null;
860
- };
861
- type ProjectWorkActivityPage = {
862
- activities: ProjectWorkActivity[];
863
- nextCursor: string | null;
864
- };
865
- type CreateProjectWorkItemInput = {
866
- title: string;
867
- description?: string;
868
- stateId?: string;
869
- attention?: ProjectWorkAttention;
870
- };
871
- type UpdateProjectWorkItemInput = {
872
- title?: string;
873
- description?: string;
874
- stateId?: string;
875
- attention?: ProjectWorkAttention;
876
- expectedVersion?: number;
877
- };
878
- type CreateProjectWorkStateInput = {
879
- name: string;
880
- category: ProjectWorkStateCategory;
881
- position?: number;
882
- isDefault?: boolean;
883
- };
884
- type UpdateProjectWorkStateInput = {
885
- name?: string;
886
- category?: ProjectWorkStateCategory;
887
- position?: number;
888
- isDefault?: boolean;
889
- };
890
- //#endregion
891
- //#region src/features/projects/managers/project-work.manager.d.ts
892
- declare class ProjectWorkManager {
893
- private readonly options;
894
- private readonly store;
895
- private readonly queries;
896
- constructor(options: {
897
- databasePath: string;
898
- eventBus: EventBus$1;
899
- projectManager: ProjectManager;
900
- });
901
- initialize: () => Promise<void>;
902
- dispose: () => void;
903
- ensureProject: (projectId: string) => Promise<void>;
904
- list: (projectId: string, input?: ProjectWorkListInput) => Promise<ProjectWorkItemPage>;
905
- summary: (projectId: string) => Promise<ProjectWorkSummary>;
906
- listRecentArtifacts: (projectId: string, input?: {
907
- cursor?: string;
908
- limit?: number;
909
- query?: string;
910
- }) => Promise<ProjectRecentArtifactPage>;
911
- get: (projectId: string, workItemId: string) => Promise<ProjectWorkItemDetail>;
912
- create: (projectId: string, input: CreateProjectWorkItemInput, actor: ProjectWorkActor) => Promise<ProjectWorkItemDetail>;
913
- update: (projectId: string, workItemId: string, input: UpdateProjectWorkItemInput, actor: ProjectWorkActor) => Promise<ProjectWorkItemDetail>;
914
- delete: (projectId: string, workItemId: string, actor: ProjectWorkActor) => Promise<ProjectWorkItemDetail>;
915
- restore: (projectId: string, workItemId: string, actor: ProjectWorkActor) => Promise<ProjectWorkItemDetail>;
916
- listActivities: (projectId: string, workItemId: string, options?: {
917
- cursor?: string;
918
- limit?: number;
919
- }) => Promise<ProjectWorkActivityPage>;
920
- listStates: (projectId: string) => Promise<ProjectWorkState[]>;
921
- createState: (projectId: string, input: CreateProjectWorkStateInput) => Promise<ProjectWorkState>;
922
- updateState: (projectId: string, stateId: string, input: UpdateProjectWorkStateInput) => Promise<ProjectWorkState>;
923
- deleteState: (projectId: string, stateId: string, migrateToStateId: string | null, actor: ProjectWorkActor) => Promise<void>;
924
- linkArtifact: (params: {
925
- projectId: string;
926
- workItemId: string;
927
- path: string;
928
- label?: string;
929
- actor: ProjectWorkActor;
930
- }) => Promise<ProjectWorkArtifactLink>;
931
- unlinkArtifact: (params: {
932
- projectId: string;
933
- workItemId: string;
934
- artifactLinkId: string;
935
- actor: ProjectWorkActor;
936
- }) => Promise<void>;
937
- private setDeleted;
938
- private requireProject;
939
- private requireName;
940
- private assertAttention;
941
- private assertCategory;
942
- private normalizeActor;
943
- private normalizeArtifactPath;
944
- private emit;
945
- }
946
- //#endregion
947
- //#region src/features/projects/types/project-material.types.d.ts
948
- type ProjectAgreementMaterial = {
949
- path: "AGENTS.md";
950
- available: boolean;
951
- };
952
- type ProjectSkillMaterial = {
953
- ref: string;
954
- name: string;
955
- description?: string;
956
- path: string;
957
- };
958
- //#endregion
959
- //#region src/features/projects/services/project-material.service.d.ts
960
- declare class ProjectMaterialService {
961
- private readonly options;
962
- constructor(options: {
963
- projectManager: Pick<ProjectManager, "getProjectById">;
964
- });
965
- getAgreement: (projectId: string) => Promise<ProjectAgreementMaterial>;
966
- listSkills: (projectId: string) => Promise<ProjectSkillMaterial[]>;
967
- private requireProject;
968
- private isFile;
969
- }
970
- //#endregion
971
- //#region src/features/projects/types/project-work-error.types.d.ts
972
- type ProjectWorkErrorCode = "PROJECT_NOT_FOUND" | "PROJECT_WORK_ARTIFACT_INVALID" | "PROJECT_WORK_ARTIFACT_NOT_FOUND" | "PROJECT_WORK_ITEM_NOT_FOUND" | "PROJECT_WORK_STATE_IN_USE" | "PROJECT_WORK_STATE_INVALID" | "PROJECT_WORK_STATE_NOT_FOUND" | "PROJECT_WORK_VALIDATION_FAILED" | "PROJECT_WORK_VERSION_CONFLICT";
973
- declare class ProjectWorkError extends Error {
974
- readonly code: ProjectWorkErrorCode;
975
- constructor(code: ProjectWorkErrorCode, message: string);
976
- }
977
- declare function isProjectWorkError(error: unknown): error is ProjectWorkError;
978
- //#endregion
979
- //#region src/services/session-event-coordinator.service.d.ts
980
- type PublishSessionEventParams = {
981
- sessionId: string;
982
- event: NcpEndpointEvent$1;
983
- source: string;
984
- synchronizeMessageProjection?: boolean;
985
- };
986
- //#endregion
987
- //#region src/managers/session.manager.d.ts
988
- type CreateNcpSessionInput = CreateSessionInput & {
989
- sessionId?: string;
990
- };
991
- type SessionManagerOptions = {
992
- providerManager?: LlmProviderRuntime;
993
- agentContextWindowManager: AgentContextWindowManager;
994
- agentManager: AgentManager;
995
- configManager: ConfigManager;
996
- eventBus: EventBus$1;
997
- journalStore: NcpAgentSessionJournalStore;
998
- projectManager: ProjectManager;
999
- sessionSearch: SessionSearchService;
1000
- beforeDeleteSession?: (sessionId: string) => Promise<void>;
1001
- };
1002
- declare class SessionManager implements NcpSessionApi {
1003
- private readonly options;
1004
- private readonly titles?;
1005
- private readonly sessionEvents;
1006
- private readonly settings;
1007
- private readonly summaryProjection;
1008
- private readonly workingDirResolver;
1009
- constructor(options: SessionManagerOptions);
1010
- start: () => Promise<void>;
1011
- dispose: () => void;
1012
- publishSessionEvent: (params: PublishSessionEventParams) => Promise<void>;
1013
- flushSessionEvents: () => Promise<void>;
1014
- createSession: (params: CreateNcpSessionInput) => Promise<CreatedSession>;
1015
- appendSessionEvent: (params: {
1016
- sessionId: string;
1017
- event: NcpAgentSessionJournalReplayEvent;
1018
- }) => Promise<void>;
1019
- applyGeneratedTitle: (sessionId: string, expectedMetadata: Record<string, unknown>, title: string | null, messageId: string) => Promise<boolean>;
1020
- setSessionMetadata: (sessionId: string, metadata: Record<string, unknown>) => Promise<boolean>;
1021
- updateSessionMetadata: (sessionId: string, metadata: Record<string, unknown>) => Promise<boolean>;
1022
- private writeSessionMetadata;
1023
- updateSession: (sessionId: string, patch: NcpSessionPatch) => Promise<NcpSessionSummary | null>;
1024
- patchSessionSettings: (sessionId: string, patch: SessionSettingsPatch, options?: {
1025
- createIfMissing?: boolean;
1026
- }) => Promise<NcpSessionSummary | null>;
1027
- deleteSession: (sessionId: string) => Promise<void>;
1028
- getSessionRecord: (sessionId: string) => Promise<AgentSessionRecord | null>;
1029
- listSessions: (options?: ListSessionsOptions) => Promise<NcpSessionSummary[]>;
1030
- listSessionPage: (options: {
1031
- page: number;
1032
- pageSize: number;
1033
- query?: string;
1034
- }) => Promise<{
1035
- sessions: NcpSessionSummary[];
1036
- total: number;
1037
- }>;
1038
- listSessionMessages: (sessionId: string, options?: ListMessagesOptions) => Promise<NcpMessage$1[]>;
1039
- getSessionTokenUsage: (sessionId: string) => Promise<SessionTokenUsageSummary | null>;
1040
- listSessionMessagePage: (sessionId: string, options: {
1041
- limit: number;
1042
- cursor?: string;
1043
- }) => Promise<SessionMessagePage | null>;
1044
- getSession: (sessionId: string) => Promise<NcpSessionSummary | null>;
1045
- getContextWindow: (sessionId: string, liveRecord?: AgentSessionRecord | null) => Promise<Record<string, unknown> | null>;
1046
- getAgentRunSession: (sessionId: string) => Promise<AgentRunSession>;
1047
- createAgentRunSession: (params: CreateAgentRunSessionParams) => Promise<AgentRunSession>;
1048
- getOrCreateAgentRunSession: (params: CreateAgentRunSessionParams) => Promise<AgentRunSession>;
1049
- private toAgentRunSession;
1050
- patchSessionMetadata: (sessionId: string, patch: Record<string, unknown>) => Promise<void>;
1051
- clearSessionMessages: (sessionId: string) => Promise<number>;
1052
- rewindSessionBeforeMessage: (sessionId: string, messageId: string) => Promise<AgentSessionRecord>;
1053
- publishSessionChange: (sessionKey: string) => Promise<void>;
1054
- }
1055
- //#endregion
1056
- //#region src/types/product-activity.types.d.ts
1057
- type ProductActivityKind = "intent_accepted" | "run_succeeded";
1058
- type ProductActivitySource = "direct" | "channel";
1059
- type ProductActivitySignal = {
1060
- kind: ProductActivityKind;
1061
- occurredAt: string;
1062
- source: ProductActivitySource;
1063
- };
1064
- type ProductActivitySink = {
1065
- record: (signal: ProductActivitySignal) => Promise<void> | void;
1066
- };
1067
- //#endregion
1068
- //#region src/managers/session-run.manager.d.ts
1069
- type SessionRunQueuedRequest = {
1070
- id: string;
1071
- runId: string;
1072
- enqueuedAt: string;
1073
- request: AgentRunRequest;
1074
- session: AgentRunSession;
1075
- };
1076
- type SessionRunActiveRequest = SessionRunQueuedRequest & {
1077
- signal: AbortSignal;
1078
- };
1079
- type SessionRunPendingRequest = SessionRunQueuedRequest & {
1080
- placement: "queued" | "steering";
1081
- intendedRunId: string | null;
1082
- };
1083
- declare class SessionRun {
1084
- private readonly stateManager;
1085
- private readonly productActivitySink?;
1086
- readonly sessionId: string;
1087
- private readonly statusListeners;
1088
- private readonly pendingInputs;
1089
- private activeRunId;
1090
- private activeRunController;
1091
- private activeProductActivitySource;
1092
- constructor(seed: {
1093
- sessionId: string;
1094
- messages: readonly NcpMessage$1[];
1095
- }, stateManager?: NcpAgentConversationStateManager, productActivitySink?: ProductActivitySink | undefined);
1096
- getSnapshot: () => {
1097
- messages: readonly NcpMessage$1[];
1098
- };
1099
- applyEvents: (events: readonly NcpEndpointEvent$1[]) => Promise<void>;
1100
- replaceMessages: (messages: readonly NcpMessage$1[]) => void;
1101
- onStatusChange: (listener: (status: "idle" | "running") => void) => (() => void);
1102
- enqueueRequest: (request: AgentRunRequest, session: AgentRunSession) => SessionRunQueuedRequest;
1103
- listQueuedRequests: () => readonly SessionRunQueuedRequest[];
1104
- listPendingRequests: () => readonly SessionRunPendingRequest[];
1105
- removeQueuedRequest: (queuedRequestId: string) => SessionRunQueuedRequest | null;
1106
- moveQueuedRequestToNextStep: (queuedRequestId: string) => SessionRunPendingRequest | null;
1107
- claimNextStepRequests: (runId: string) => readonly SessionRunPendingRequest[];
1108
- acknowledgeNextStepRequests: (requestIds: readonly string[]) => void;
1109
- getActiveRunId: () => string | null;
1110
- beginNextRun: () => SessionRunActiveRequest | null;
1111
- abortRun: (runId?: string, reason?: unknown) => boolean;
1112
- isRunning: () => boolean;
1113
- isBusy: () => boolean;
1114
- dispose: () => void;
1115
- private applyRunEvents;
1116
- private emitStatusChangeIfNeeded;
1117
- }
1118
- declare class SessionRunManager {
1119
- private readonly sessionManager;
1120
- private readonly productActivitySink?;
1121
- private readonly runs;
1122
- private readonly pendingCreations;
1123
- constructor(sessionManager: SessionManager, productActivitySink?: ProductActivitySink | undefined);
1124
- getSessionRun: (sessionId: string) => SessionRun | null;
1125
- isSessionRunning: (sessionId: string) => boolean;
1126
- listActiveRuns: () => ReadonlyArray<{
1127
- sessionId: string;
1128
- runId: string;
1129
- }>;
1130
- getOrCreateSessionRun: (sessionId: string) => Promise<SessionRun>;
1131
- createSessionRun: (sessionId: string) => Promise<SessionRun>;
1132
- deleteSessionRun: (sessionId: string) => boolean;
1133
- dispose: () => void;
1134
- }
1135
- //#endregion
1136
111
  //#region src/managers/agent-runtime.manager.d.ts
1137
112
  type AgentRuntimeRunOptions = {
1138
113
  session: AgentRunSession;
@@ -2038,24 +1013,6 @@ declare class AppDataManager {
2038
1013
  private isMissingFileError;
2039
1014
  }
2040
1015
  //#endregion
2041
- //#region src/managers/request-context-tail.manager.d.ts
2042
- type RequestContextTailRequest = {
2043
- sessionId: string;
2044
- runId: string;
2045
- agentId: string;
2046
- model: string;
2047
- signal?: AbortSignal;
2048
- };
2049
- type RequestContextTailProvider = {
2050
- provide: (request: RequestContextTailRequest) => Promise<readonly ModelInputTailSection[]> | readonly ModelInputTailSection[];
2051
- };
2052
- declare class RequestContextTailManager {
2053
- private readonly providers;
2054
- register: (provider: RequestContextTailProvider) => (() => void);
2055
- build: (request: RequestContextTailRequest) => Promise<ModelInputTail | undefined>;
2056
- dispose: () => void;
2057
- }
2058
- //#endregion
2059
1016
  //#region src/features/capability-grants/types/capability-grant.types.d.ts
2060
1017
  type CapabilityGrantSubject = {
2061
1018
  type: string;
@@ -3716,44 +2673,6 @@ declare class PreferenceManager {
3716
2673
  private isPlainRecord;
3717
2674
  }
3718
2675
  //#endregion
3719
- //#region src/services/agent-run-client.service.d.ts
3720
- type AgentRunReplyOptions = {
3721
- abortSignal?: AbortSignal;
3722
- onAssistantDelta?: (delta: string) => void;
3723
- onEvent?: (event: NcpEndpointEvent$1) => void;
3724
- missingCompletedMessageError?: string;
3725
- runErrorMessage?: string;
3726
- };
3727
- type AgentRunStreamOptions = {
3728
- abortSignal?: AbortSignal;
3729
- onEvent?: (event: NcpEndpointEvent$1) => void;
3730
- };
3731
- type AgentRunReply = {
3732
- handle: NcpRunHandle;
3733
- text: string;
3734
- completedMessage: NcpMessage$1;
3735
- };
3736
- type AgentRunExecution = {
3737
- handle: NcpRunHandle;
3738
- events: AsyncIterable<NcpEndpointEvent$1>;
3739
- result: Promise<AgentRunReply>;
3740
- cancel: () => Promise<void>;
3741
- dispose: () => void;
3742
- };
3743
- declare class AgentRunClient {
3744
- private readonly options;
3745
- constructor(options: {
3746
- eventBus: Pick<EventBus$1, "on">;
3747
- ingress: Pick<Ingress$1, "handle">;
3748
- });
3749
- send: (input: AgentRunSendIngressPayload) => Promise<NcpRunHandle>;
3750
- sendAndWaitForReply: (input: AgentRunSendIngressPayload, options?: AgentRunReplyOptions) => Promise<AgentRunReply>;
3751
- startRun: (input: AgentRunSendIngressPayload, options?: AgentRunReplyOptions) => Promise<AgentRunExecution>;
3752
- sendAndStreamEvents: (this: AgentRunClient, input: AgentRunSendIngressPayload, options?: AgentRunStreamOptions) => AsyncGenerator<NcpEndpointEvent$1>;
3753
- private prepareObserver;
3754
- private sendWithCorrelation;
3755
- }
3756
- //#endregion
3757
2676
  //#region src/types/portable-service-runner-protocol.types.d.ts
3758
2677
  type RunnerOperation = "cancel-job" | "deliver-event" | "invoke" | "job-status" | "list-actions" | "start-provider" | "start-resident" | "start-job" | "resolve-host-call" | "stats" | "stop";
3759
2678
  type PortableRunnerJobEvent = {
@@ -4646,6 +3565,9 @@ type NextclawKernelOptions = {
4646
3565
  runtimeVersion?: string;
4647
3566
  productActivitySink?: ProductActivitySink;
4648
3567
  desktopHost?: DesktopHost;
3568
+ contextProfile?: "default" | "embedded";
3569
+ sessionSearchEnabled?: boolean;
3570
+ sessionTitleEnabled?: boolean;
4649
3571
  };
4650
3572
  type NextclawKernelRuntimeControl<TGatewayInput, TUiInput, TStartInput> = {
4651
3573
  gateway: (input: TGatewayInput) => Promise<void>;
@@ -4661,6 +3583,7 @@ declare class NextclawKernelControlManager<TGatewayInput, TUiInput, TStartInput>
4661
3583
  requireRuntimeControl: () => NextclawKernelRuntimeControl<TGatewayInput, TUiInput, TStartInput>;
4662
3584
  }
4663
3585
  declare class NextclawKernel {
3586
+ private readonly options;
4664
3587
  readonly eventBus: EventBus$1;
4665
3588
  readonly ingress: Ingress$1;
4666
3589
  readonly messageBus: MessageBus;
@@ -4682,6 +3605,7 @@ declare class NextclawKernel {
4682
3605
  readonly assetStore: LocalAssetStore;
4683
3606
  readonly mcpManager: McpManager;
4684
3607
  readonly sessionManager: SessionManager;
3608
+ private userQuestionManager;
4685
3609
  readonly inboxDeliveryManager: InboxDeliveryManager;
4686
3610
  readonly systemObjectReferenceManager: SystemObjectReferenceManager;
4687
3611
  readonly panelAppManager: PanelAppManager;
@@ -4712,6 +3636,7 @@ declare class NextclawKernel {
4712
3636
  private gatewayController;
4713
3637
  constructor(options?: NextclawKernelOptions);
4714
3638
  private createCapabilityGrantLegacyMigration;
3639
+ get userQuestions(): UserQuestionManager;
4715
3640
  listSessionTypes: (params?: AgentRuntimeSessionTypeDescribeParams) => Promise<{
4716
3641
  defaultType: string;
4717
3642
  options: AgentRuntimeSessionTypeOption[];
@@ -4862,6 +3787,7 @@ type DirectPromptDispatchParams = {
4862
3787
  abortSignal?: AbortSignal;
4863
3788
  onAssistantDelta?: (delta: string) => void;
4864
3789
  onEvent?: (event: NcpEndpointEvent$1) => void;
3790
+ allowSlashCommands?: boolean;
4865
3791
  };
4866
3792
  type DirectPromptDispatchResult = {
4867
3793
  kind: "agent" | "command";
@@ -4904,6 +3830,7 @@ declare class NextclawHarnessError extends Error {
4904
3830
  }
4905
3831
  type NextclawTaskInput = {
4906
3832
  input: string;
3833
+ channel?: string;
4907
3834
  agentId?: string;
4908
3835
  sessionId?: string;
4909
3836
  model?: string;
@@ -4921,12 +3848,21 @@ type NextclawTaskResult = {
4921
3848
  text: string;
4922
3849
  completedMessage: NcpMessage$1 | null;
4923
3850
  };
3851
+ type NextclawUserQuestion = UserQuestionView;
3852
+ type NextclawUserQuestionReply = {
3853
+ question: NextclawUserQuestion;
3854
+ text: string | null;
3855
+ };
4924
3856
  type NextclawHarnessOptions = {
4925
3857
  homeDir?: string;
4926
3858
  configPath?: string;
4927
3859
  builtInAppsDirectory?: string;
4928
3860
  portableServiceRunnerPath?: string;
4929
- productVersion?: string;
3861
+ productVersion?: string; /** Static tool catalog for an embedded app; omitted keeps the full NextClaw catalog. */
3862
+ allowedToolNames?: readonly string[]; /** Preserve safety, identity and memory while omitting host-specific context. */
3863
+ contextProfile?: "default" | "embedded";
3864
+ sessionSearchEnabled?: boolean;
3865
+ sessionTitleEnabled?: boolean;
4930
3866
  productActivitySink?: {
4931
3867
  record: (signal: {
4932
3868
  kind: "intent_accepted" | "run_succeeded";
@@ -4952,6 +3888,7 @@ type NextclawSessionCreateInput = {
4952
3888
  };
4953
3889
  type NextclawSessionRunInput = {
4954
3890
  input: string;
3891
+ channel?: string;
4955
3892
  model?: string;
4956
3893
  signal?: AbortSignal;
4957
3894
  onEvent?: (event: NcpEndpointEvent$1) => void;
@@ -5054,6 +3991,7 @@ interface INextclawAgentSessions {
5054
3991
  }
5055
3992
  interface INextclawSessionRegistry {
5056
3993
  resume(sessionId: string): Promise<INextclawSession>;
3994
+ delete(sessionId: string): Promise<void>;
5057
3995
  }
5058
3996
  interface INextclawAgent {
5059
3997
  readonly definition: NextclawAgentDefinition;
@@ -5071,6 +4009,16 @@ interface INextclawHarness {
5071
4009
  readonly contributions: INextclawContributionRegistry;
5072
4010
  start(): Promise<void>;
5073
4011
  runTask(input: NextclawTaskInput): Promise<NextclawTaskResult>;
4012
+ listUserQuestions(sessionId: string): Promise<NextclawUserQuestion[]>;
4013
+ answerUserQuestion(input: {
4014
+ sessionId: string;
4015
+ questionId: string;
4016
+ action: "answer" | "dismiss";
4017
+ answer?: string;
4018
+ signal?: AbortSignal;
4019
+ onEvent?: (event: NcpEndpointEvent$1) => void;
4020
+ onAssistantDelta?: (delta: string) => void;
4021
+ }): Promise<NextclawUserQuestionReply>;
5074
4022
  dispose(): Promise<void>;
5075
4023
  }
5076
4024
  //#endregion
@@ -5088,6 +4036,16 @@ declare class NextclawHarness implements INextclawHarness {
5088
4036
  constructor(options?: NextclawHarnessOptions);
5089
4037
  start: () => Promise<void>;
5090
4038
  runTask: (input: NextclawTaskInput) => Promise<NextclawTaskResult>;
4039
+ listUserQuestions: (sessionId: string) => Promise<NextclawUserQuestion[]>;
4040
+ answerUserQuestion: (input: {
4041
+ sessionId: string;
4042
+ questionId: string;
4043
+ action: "answer" | "dismiss";
4044
+ answer?: string;
4045
+ signal?: AbortSignal;
4046
+ onEvent?: NextclawTaskInput["onEvent"];
4047
+ onAssistantDelta?: NextclawTaskInput["onAssistantDelta"];
4048
+ }) => Promise<NextclawUserQuestionReply>;
5091
4049
  dispose: () => Promise<void>;
5092
4050
  private readonly requireKernel;
5093
4051
  private startInternal;
@@ -5262,108 +4220,6 @@ declare class ContextCompactionJournalRecoveryService {
5262
4220
  private readEventMessageId;
5263
4221
  }
5264
4222
  //#endregion
5265
- //#region src/features/context-compaction/services/context-compaction-preflight.service.d.ts
5266
- type ContextCompactionPreflightResult = {
5267
- contextWindow: ContextWindowSnapshot;
5268
- sessionMessages: NcpMessage$1[];
5269
- timelineMessage: NcpMessage$1 | null;
5270
- };
5271
- type ContextCompactionPreflightBeginResult = {
5272
- contextWindow: ContextWindowSnapshot;
5273
- sessionMessages: NcpMessage$1[];
5274
- pendingCompaction: ContextCompactionPendingWork | null;
5275
- };
5276
- type ContextCompactionTrigger = "automatic" | "manual";
5277
- type ContinuationMessageBoundary = {
5278
- messageId: string;
5279
- coveredPartCount: number;
5280
- };
5281
- type ContextCompactionPendingWork = {
5282
- checkpoint: ReturnType<typeof buildCompressingCompactionCheckpoint>;
5283
- contextBlockMessages: Record<string, unknown>[];
5284
- continuationMessageBoundary: ContinuationMessageBoundary | null;
5285
- contextTokens: number;
5286
- phase: ContextCompactionPhase;
5287
- serviceMessageId: string;
5288
- model: string;
5289
- plan: ContextCompactionPlan;
5290
- reservedContextTokens: number;
5291
- snapshotFixedInputTokens: number;
5292
- sessionId: string;
5293
- sessionMessages: NcpMessage$1[];
5294
- };
5295
- declare class ContextCompactionPreflightService {
5296
- private readonly agentManager;
5297
- private readonly assetStore;
5298
- private readonly compactionService;
5299
- private readonly contextWindowBudgetService;
5300
- private readonly summaryGenerationService;
5301
- constructor(agentManager: AgentManager, providerManager?: LlmProviderRuntime, assetStore?: LocalAssetStore | null);
5302
- preview: (params: {
5303
- completeInputBudget?: boolean;
5304
- contextBlocks?: readonly string[];
5305
- fixedInputTokens?: number;
5306
- requestMetadata: Record<string, unknown>;
5307
- sessionId: string;
5308
- sessionMessages: readonly NcpMessage$1[];
5309
- storedAgentId?: string;
5310
- storedMetadata: Record<string, unknown>;
5311
- tools?: readonly NcpTool$1[];
5312
- }) => ContextWindowSnapshot | null;
5313
- begin: (params: {
5314
- contextBlocks?: readonly string[];
5315
- inputMessages: readonly NcpMessage$1[];
5316
- model: string;
5317
- phase?: ContextCompactionPhase;
5318
- requestMetadata: Record<string, unknown>;
5319
- sessionId: string;
5320
- sessionMessages: readonly NcpMessage$1[];
5321
- storedAgentId?: string;
5322
- storedMetadata: Record<string, unknown>;
5323
- tools?: readonly NcpTool$1[];
5324
- trigger?: ContextCompactionTrigger;
5325
- }) => ContextCompactionPreflightBeginResult;
5326
- finish: (pending: ContextCompactionPendingWork, signal?: AbortSignal) => Promise<ContextCompactionPreflightResult>;
5327
- private resolveCompactionProfile;
5328
- }
5329
- //#endregion
5330
- //#region src/features/context-compaction/utils/context-compaction.utils.d.ts
5331
- declare const NEXTCLAW_TIMELINE_KIND_METADATA_KEY = "nextclaw_timeline_kind";
5332
- declare const CONTEXT_COMPACTION_TIMELINE_KIND = "context_compaction";
5333
- declare const CONTEXT_COMPACTION_PROJECTION_METADATA_KEY = "nextclaw_context_projection";
5334
- declare const CONTEXT_COMPACTION_PROJECTION_KIND = "compressed_context";
5335
- declare const CONTEXT_COMPACTION_PART_START = "nextclaw_compaction_part_start";
5336
- declare const CONTEXT_COMPACTION_CONTINUATION_TEXT = "Continue the active run from the compressed working context. Do not repeat completed tool calls; proceed with the next required action.";
5337
- declare const CONTEXT_COMPACTION_SYSTEM_PREAMBLE: string;
5338
- type ContextCompactionTimelineCheckpoint = ContextCompactionCheckpoint;
5339
- declare function readContextCompactionCheckpoint(message: NcpMessage$1): ContextCompactionCheckpoint | null;
5340
- declare function createContextCompactionMessageId(): string;
5341
- declare function buildContextCompactionTimelineNcpMessage(params: {
5342
- messageId: string;
5343
- sessionId: string;
5344
- checkpoint: ContextCompactionTimelineCheckpoint;
5345
- }): NcpMessage$1;
5346
- declare function isContextCompactionTimelineMessage(message: {
5347
- metadata?: Record<string, unknown> | undefined;
5348
- } | null | undefined): boolean;
5349
- declare function isContextCompactionProjectionMessage(message: {
5350
- metadata?: Record<string, unknown> | undefined;
5351
- } | null | undefined): boolean;
5352
- declare function readLatestContextCompactionCheckpoint(sessionMessages: readonly NcpMessage$1[]): ContextCompactionCheckpoint | null;
5353
- type ContextCompactionModelProjection = {
5354
- messages: NcpMessage$1[];
5355
- stablePrefixMessageCount: number;
5356
- };
5357
- declare function buildContextCompactionModelProjection(params: {
5358
- sessionId: string;
5359
- sessionMessages: readonly NcpMessage$1[];
5360
- }): ContextCompactionModelProjection;
5361
- declare function readContextWindowEventSessionId(event: NcpEndpointEvent$1): string | null;
5362
- declare function isContextWindowSnapshot(value: unknown): value is Record<string, unknown>;
5363
- declare function createContextWindowSignature(value: Record<string, unknown>): string;
5364
- declare function shouldRefreshContextWindowDuringStream(event: NcpEndpointEvent$1): boolean;
5365
- declare function shouldRefreshContextWindowImmediately(event: NcpEndpointEvent$1): boolean;
5366
- //#endregion
5367
4223
  //#region src/features/native-runtime/services/provider-manager-ncp-llm-api.service.d.ts
5368
4224
  declare class ProviderManagerNcpLLMApi implements NcpLLMApi {
5369
4225
  private readonly providerManager;
@@ -5445,5 +4301,5 @@ declare function resolveLegacyEventType(message: SessionMessage): string;
5445
4301
  declare function getUiContentParamsBootstrapScript(): string;
5446
4302
  declare function injectUiContentParamsBootstrap(html: string): string;
5447
4303
  //#endregion
5448
- export { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, AccessLoginResult, AccessManager, AccessManagerOptions, AccessPasswordStatus, AccessPrincipal, AccessRole, AccessSessionRecord, AccessSessionState, AgentManager, AgentManagerOptions, AgentRunClient, type AgentRunReply, type AgentRunReplyOptions, AgentRunSession, type AgentRunStreamOptions, type AgentRuntimeEntry, type AgentRuntimeProviderRegistration, AgentRuntimeSessionRequestDispatcherOptions, type AgentRuntimeSessionTypeCatalog, type AgentRuntimeSessionTypeDescribeParams, AgentRuntimeSessionTypeIcon, type AgentRuntimeSessionTypeOption, AgentRuntimeSessionTypeProvider, AgentServiceActionCaller, AppDataDeleteResult, AppDataDiagnostic, AppDataEntry, AppDataError, AppDataErrorCode, AppDataLifecycle, AppDataList, AppDataManager, AppDataSource, type AppDocumentGrantMutationResult, type AppEventEmitOptions, type AppEventEnvelope, type AppEventHandler, type AppEventKey, type AppInstalledPermissionState, AppPackageComponentKind, AppPackageComponentSource, AppPackageComponentSourceList, AppPackageComponentView, AppPackageConflict, AppPackageDependencyBinding, AppPackageDependencyBindingInput, AppPackageDependencyCandidate, AppPackageDependencyCycle, AppPackageDependencyDiagnostic, AppPackageDependencyDiagnosticCode, AppPackageDependencyView, AppPackageError, AppPackageErrorCode, AppPackageHostTarget, AppPackageList, AppPackageManager, AppPackageOperationAction, AppPackageOperationInput, AppPackageOperationList, AppPackageOperationResult, AppPackageOperationStatus, AppPackageOperationView, AppPackageReadiness, AppPackageReadinessRequirement, AppPackageReadinessStatus, AppPackageRuntimeHooks, AppPackageSecretReadiness, AppPackageSecretSlotView, AppPackageSecretStatus, AppPackageUnavailableDiagnostic, AppPackageUninstallRollback, AppPackageView, type AssetApi, AutomationManager, AutomationManagerOptions, BindContextInput, type BuildAgentRunSendPayloadParams, BuildContextTailInput, BuiltinNarpRuntimeProviderService, CONTEXT_COMPACTION_CONTINUATION_TEXT, CONTEXT_COMPACTION_PART_START, CONTEXT_COMPACTION_PROJECTION_KIND, CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, CONTEXT_COMPACTION_SYSTEM_PREAMBLE, CONTEXT_COMPACTION_TIMELINE_KIND, CapabilityGrant, CapabilityGrantDecision, CapabilityGrantFilter, CapabilityGrantLegacyMigrationService, CapabilityGrantListener, CapabilityGrantManager, CapabilityGrantRequest, CapabilityGrantResource, CapabilityGrantRevocationListener, CapabilityGrantStore, CapabilityGrantSubject, CapabilityProviderView, ChannelManager, ChannelReplyRouterDispatchParams, CommandRegistry, ConfigManager, ConfigManagerOptions, ConfigManagerRuntimeHooks, ConfigMutationResult, ContextBinding, type ContextBlock, ContextCompactionJournalRecoveryService, ContextCompactionModelProjection, ContextCompactionPreflightBeginResult, ContextCompactionPreflightResult, ContextCompactionPreflightService, ContextCompactionTimelineCheckpoint, ContextCompactionTrigger, type ContextProvider, type ContextProviderRequest, Contribution, CreateAgentRunSessionParams, CreateInboxDeliveryInput, CreateProjectInput, CreateProjectWorkItemInput, CreateProjectWorkStateInput, DEFAULT_AGENT_RUNTIME_ENTRY_ID, DEFAULT_SERVICE_ACTION_RISK, DESKTOP_HOST_ACCESS, DESKTOP_HOST_PROTOCOL_VERSION, DesktopApplicationTarget, DesktopCapabilityError, DesktopCapabilityErrorCode, DesktopHost, DesktopHostAccess, DesktopHostCaller, DesktopHostCapabilityDeclaration, DesktopHostCapabilityManager, DesktopHostEvent, DesktopHostEventListener, DesktopHostManifest, DesktopHostMethod, DesktopHostRequest, DesktopHostResponse, DesktopHostStatus, DesktopNodeReplService, DesktopSessionCaller, DesktopSessionStateService, DesktopSnapshotOptions, DirectPromptDispatchExecution, DirectPromptDispatchParams, DirectPromptDispatchResult, type Disposer, EventAdmissionPolicy, EventBus, type EventBusOptions, EventDelivery, EventSubscription, EventSubscriptionBudget, ExtensionLoadProgress, ExtensionLoadResult, ExtensionManager, type ExtensionRuntimeStatus, FeatureControlsService, GatewayInboundLoopRuntime, GatewayInboundProcessor, type IContextRegistry, type IKernel, type IMcpRegistry, type IModelRegistry, type INextclawAgent, type INextclawAgentRegistry, type INextclawAgentSessions, type INextclawContributionRegistry, type INextclawHarness, type INextclawRun, type INextclawSession, type INextclawSessionRegistry, type IRuntimeRegistry, type IToolRegistry, InboxDeliveryError, InboxDeliveryErrorCode, InboxDeliveryManager, InboxDeliveryManagerOptions, Ingress, type IngressContext, type IngressEnvelope, type IngressHandler, InstallationKind, InstalledSkillDetail, InstalledSkillSummary, InstalledSkillsList, JsonPointer, JsonValue, type Key, type LLMResponse, type LLMStreamEvent, type LearningLoopRuntimeConfig, type LeasedResidentEvent, LegacyVerificationRecord, LlmProviderManager, LlmProviderRuntime, LlmUsageManager, LlmUsageManagerOptions, LlmUsageRecord, LlmUsageSnapshot, LlmUsageStats, LlmUsageStore, LlmUsageStoreOptions, LlmUsageSummary, type LocalizedTextMap, MAX_INBOX_DELIVERY_CONTENT_LENGTH, type McpCatalogFilter, McpManager, type McpServerDefinition, type McpServerRecord, McpServiceAppRuntimeService, type McpToolCallInput, type McpToolCatalogEntry, type ModelChatInput, NARP_HTTP_RUNTIME_KIND, NARP_STDIO_RUNTIME_KIND, NEXTCLAW_TIMELINE_KIND_METADATA_KEY, NcpAgentSessionJournalStore, type NcpEndpointEvent, type NcpMessage, type NcpTool, type NextclawAgentDefinition, type NextclawContributionDescriptor, NextclawHarness, NextclawHarnessError, type NextclawHarnessErrorCode, type NextclawHarnessOptions, NextclawKernel, NextclawKernelOptions, NextclawNcpResolvedAgentProfile, NextclawNcpResolvedRunContext, NextclawNcpRunContextResolveParams, type NextclawRunStatus, type NextclawSessionCreateInput, type NextclawSessionRunInput, type NextclawTaskInput, type NextclawTaskResult, ObservationCapabilityDescriptor, ObservationContextTail, ObservationEvent, ObservationEventAdmissionDecision, ObservationExtensionRuntime, ObservationManager, ObservationManagerOptions, ObservationRef, ObservationRelationshipStatus, ObservationState, ObservationTarget, PANEL_APP_AGENT_CAPABILITIES, PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT, PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT_FINGERPRINT, PORTABLE_RUNTIME_ACCEPTANCE_LOCALES, PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS, PORTABLE_RUNTIME_ACCEPTANCE_PRESENTATION, PORTABLE_RUNTIME_ACCEPTANCE_REFERENCE_APP_ID, PROJECT_TEMPLATE_IDS, PROJECT_WORK_ATTENTION_VALUES, PROJECT_WORK_STATE_CATEGORIES, PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS, PanelAppAgentCapability, PanelAppAgentGenerateObjectInput, PanelAppAgentGenerateObjectRequest, PanelAppAgentGenerateObjectResult, PanelAppAgentRunClient, PanelAppAgentSendPayload, PanelAppAgentSendRequest, PanelAppAgentSendResult, PanelAppAssetTokenService, PanelAppBridgeSession, PanelAppCapabilityGrant, PanelAppCapabilityGrantCaller, PanelAppClientGrant, PanelAppContent, PanelAppDeleteResult, PanelAppEntry, PanelAppError, PanelAppErrorCode, PanelAppList, PanelAppManager, type PanelAppPreferencesUpdate, PanelServiceActionCaller, PlannedRestartRecovery, PlannedRestartRecoveryManager, PlannedRestartRecoveryResult, PlannedRestartRecoveryTicket, type PortableRunnerObservation, type PortableRuntimeAcceptanceContractView, PortableRuntimeAcceptanceDefinition, type PortableRuntimeAcceptanceDefinitionView, type PortableRuntimeAcceptanceEvaluationContext, type PortableRuntimeAcceptanceEvidence, type PortableRuntimeAcceptanceEvidenceArtifact, PortableRuntimeAcceptanceEvidenceSource, PortableRuntimeAcceptanceId, type PortableRuntimeAcceptanceIdentity, type PortableRuntimeAcceptanceIdentityResult, PortableRuntimeAcceptanceIdentityService, type PortableRuntimeAcceptanceLocale, PortableRuntimeAcceptanceManager, PortableRuntimeAcceptancePlatform, type PortableRuntimeAcceptancePresentation, type PortableRuntimeAcceptanceResult, type PortableRuntimeAcceptanceResultStatus, type PortableRuntimeAcceptanceStatusEntry, type PortableRuntimeAcceptanceStatusView, type PortableRuntimeAcceptanceSurfaceResult, type PortableRuntimeAcceptanceUnavailableIdentity, PreferenceEntry, PreferenceError, PreferenceErrorCode, PreferenceJsonValue, PreferenceManager, PreferenceManagerOptions, ProductActivityKind, ProductActivitySignal, ProductActivitySink, ProductActivitySource, type ProductFeatureControls, ProjectAgreementMaterial, ProjectError, ProjectErrorCode, ProjectManager, ProjectManagerOptions, ProjectMaterialService, ProjectRecentArtifact, ProjectRecentArtifactPage, ProjectRecord, ProjectSessionBinding, ProjectSkillMaterial, ProjectTemplate, ProjectTemplateId, ProjectWorkActivity, ProjectWorkActivityPage, ProjectWorkActivityType, ProjectWorkActor, ProjectWorkArtifactLink, ProjectWorkAttention, ProjectWorkError, ProjectWorkErrorCode, ProjectWorkItem, ProjectWorkItemDetail, ProjectWorkItemListEntry, ProjectWorkItemPage, ProjectWorkListInput, ProjectWorkManager, ProjectWorkState, ProjectWorkStateCategory, ProjectWorkSummary, type ProviderCatalogPlugin, ProviderManagerNcpLLMApi, ProviderModelCatalogEntry, ProviderModelCatalogManager, ProviderModelCatalogSnapshot, ProviderModelsDiscoverInput, type ProviderSpec, RUNTIME_INSTANCE_DESKTOP_DATA_DIRECTORY_ENV, RUNTIME_INSTANCE_DESKTOP_LOGS_DIRECTORY_ENV, RUNTIME_INSTANCE_DISTRIBUTION_ENV, RUNTIME_INSTANCE_INSTALLATION_KIND_ENV, RUNTIME_INSTANCE_PORTABLE_DATA_ROOT_ENV, type ResidentEventInput, ResolveRuntimeInstanceSnapshotParams, ResolvedAgentProfile, ResolvedDesktopApplicationTarget, RuntimeDistribution, RuntimeInstallationKind, RuntimeInstanceSnapshot, SERVICE_APP_MANIFEST_FILE_NAME, ServiceAction, ServiceActionCaller, ServiceActionGrant, ServiceActionGrantRequest, ServiceActionGrantState, ServiceActionInvocationFacts, ServiceActionInvokeRequest, ServiceActionInvokeResult, ServiceActionRisk, ServiceActionRuntimeState, ServiceAppAgentCapabilitySlot, ServiceAppAiCapabilityService, ServiceAppCapabilityProvision, ServiceAppCapabilityRequirement, ServiceAppDeleteResult, ServiceAppError, type ServiceAppErrorCode, ServiceAppExternalRemediation, ServiceAppJobCaller, ServiceAppJobChunkEvent, ServiceAppJobEvent, type ServiceAppJobEventSink, ServiceAppJobJournalService, ServiceAppJobList, ServiceAppJobProgressEvent, type ServiceAppJobScope, ServiceAppJobStatus, ServiceAppJobTerminalEvent, ServiceAppJobView, ServiceAppJobWatch, ServiceAppLifecycle, ServiceAppList, ServiceAppManager, ServiceAppManifest, ServiceAppManifestAction, ServiceAppModelCapabilitySlot, ServiceAppProtocol, ServiceAppProvides, ServiceAppRecord, ServiceAppRequirements, ServiceAppResidentEventDisposition, ServiceAppResidentEventInboxService, ServiceAppResidentEventList, type ServiceAppResidentEventScope, ServiceAppResidentEventStatus, ServiceAppResidentEventView, ServiceAppResourceRequirement, ServiceAppRuntimeService, ServiceAppRuntimeStatus, ServiceAppTerminalJobStatus, ServiceAppWitContract, SessionContextCompactionError, SessionContextCompactionErrorCode, SessionContextCompactionManager, SessionContextCompactionResult, SessionManager, SessionManagerOptions, SessionMessageCursorError, SessionMessagePage, SessionMetadataUpdate, SessionModelTokenUsage, type SessionPendingInput, type SessionQueuedInput, SessionRequestManager, SessionRequestManagerOptions, SessionSettingsError, SessionSettingsPatch, type SessionSteerQueuedInputResult, SessionTokenUsageStatus, SessionTokenUsageSummary, SessionTokenUsageTotals, type SkillFrontmatter, type SkillInfo, SkillManager, type SkillScope, SubscribeEventsInput, SystemObjectReferenceError, SystemObjectReferenceErrorCode, SystemObjectReferenceManager, SystemObjectReferenceProvider, SystemObjectReferenceSnapshotSource, type TypedKey, TypedPredicate, UnavailableDesktopHost, UnsignedUpdateManifest, type Unsubscribe, UpdateBlockReason, UpdateHostKind, UpdateManifest, UpdateManifestReader, UpdateProgress, UpdateProjectWorkItemInput, UpdateProjectWorkStateInput, UpdateSnapshot, UpdateStatus, VerificationEvidenceRecord, VerificationRecord, VerificationRecordEntrySurface, VerificationRecordError, VerificationRecordInput, VerificationRecordList, VerificationRecordObservation, VerificationRecordRole, VerificationRecordService, VerificationRecordStatus, type WorkspaceServiceDataOwner, assertObservationJsonValue, assertObservationPredicate, buildAgentRunSendPayload, buildContextCompactionModelProjection, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildNextclawNcpRunContext, buildObservationEventModelMessage, buildServiceActionId, buildSessionRequestCompletionMessage, capabilityGrantCovers, createAgentRuntimeSessionRequestDispatcher, createAgentRuntimeSessionRequestSourceNotifier, createAssetTools, createCapabilityDeclarationFingerprint, createContextCompactionMessageId, createContextWindowSignature, createCronJobSystemObjectProvider, createDesktopHostError, createInboxDeliverySystemObjectProvider, createLlmUsageRecord, createPanelAppAgentGrantRequest, createPanelAppClientGrantRequest, createServiceActionGrantRequest, createServiceAppAgentSlotGrantRequest, createServiceAppModelSlotGrantRequest, createTypedKey, describeAgentRuntimeSessionTypes, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, dispatchPromptOverNcpResult, evaluateObservationEventAdmission, evaluatePortableRuntimeAcceptance, evaluatePortableRuntimeAcceptanceArtifact, eventKeys, getAutomaticUpdateCheckDelay, getCapabilityGrantKey, getServiceActionName, getServiceAppManifestPath, getUiContentParamsBootstrapScript, getUnsignedUpdateManifest, hasLlmUsageTelemetry, ingressKeys, injectUiContentParamsBootstrap, isAppDataError, isAppPackageError, isContextCompactionProjectionMessage, isContextCompactionTimelineMessage, isContextWindowSnapshot, isInboxDeliveryError, isPanelAppAgentCapability, isPanelAppError, isPreferenceError, isProjectError, isProjectWorkError, isReplyCapableChannel, isServiceAppError, isSessionContextCompactionError, isSessionMessageCursorError, isSessionSettingsError, isSystemObjectReferenceError, listExtensionChannelIds, listServiceAppManifestActions, matchesCapabilityGrantFilter, matchesObservationPredicate, mergeServiceAppRuntimeActions, normalizeAgentRuntimeSessionTypeIcon, normalizeCapabilityGrantRequest, normalizeLlmUsageModel, normalizeOptionalString, normalizePortableRuntimeEnvironment, parseObservationDuration, parsePortableRuntimeAcceptanceEvidenceArtifact, parseServiceAppManifest, parseSkillFrontmatter, presentPortableRuntimeAcceptanceDefinition, readContextCompactionCheckpoint, readContextWindowEventSessionId, readJsonPointer, readLatestContextCompactionCheckpoint, readLearningLoopRuntimeConfig, readMetadataModel, readMetadataThinking, readServiceActionTargetId, readServiceAppManifest, readServiceAppSlotTarget, resolveAgentRuntimeEntries, resolveAutomaticUpdateCheckIntervalMs, resolveChannelReplyRoute, resolveEffectiveModel, resolveLegacyEventType, resolvePortableRuntimeAcceptanceLocale, resolveRuntimeInstanceSnapshot, resolveSessionChannelContext, runGatewayInboundLoop, runNextclawTask, sanitizeLlmUsage, serializeUnsignedUpdateManifest, shouldRefreshContextWindowDuringStream, shouldRefreshContextWindowImmediately, startPromptOverNcpExecution, stripSkillFrontmatter, syncSessionThinkingPreference, toBoundedJson, toNcpMessages, waitForAgentRuntimeSessionReply };
4304
+ export { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, AccessLoginResult, AccessManager, AccessManagerOptions, AccessPasswordStatus, AccessPrincipal, AccessRole, AccessSessionRecord, AccessSessionState, AgentManager, AgentManagerOptions, AgentRunClient, type AgentRunReply, type AgentRunReplyOptions, AgentRunSession, type AgentRunStreamOptions, type AgentRuntimeEntry, type AgentRuntimeProviderRegistration, AgentRuntimeSessionRequestDispatcherOptions, type AgentRuntimeSessionTypeCatalog, type AgentRuntimeSessionTypeDescribeParams, AgentRuntimeSessionTypeIcon, type AgentRuntimeSessionTypeOption, AgentRuntimeSessionTypeProvider, AgentServiceActionCaller, AppDataDeleteResult, AppDataDiagnostic, AppDataEntry, AppDataError, AppDataErrorCode, AppDataLifecycle, AppDataList, AppDataManager, AppDataSource, type AppDocumentGrantMutationResult, type AppEventEmitOptions, type AppEventEnvelope, type AppEventHandler, type AppEventKey, type AppInstalledPermissionState, AppPackageComponentKind, AppPackageComponentSource, AppPackageComponentSourceList, AppPackageComponentView, AppPackageConflict, AppPackageDependencyBinding, AppPackageDependencyBindingInput, AppPackageDependencyCandidate, AppPackageDependencyCycle, AppPackageDependencyDiagnostic, AppPackageDependencyDiagnosticCode, AppPackageDependencyView, AppPackageError, AppPackageErrorCode, AppPackageHostTarget, AppPackageList, AppPackageManager, AppPackageOperationAction, AppPackageOperationInput, AppPackageOperationList, AppPackageOperationResult, AppPackageOperationStatus, AppPackageOperationView, AppPackageReadiness, AppPackageReadinessRequirement, AppPackageReadinessStatus, AppPackageRuntimeHooks, AppPackageSecretReadiness, AppPackageSecretSlotView, AppPackageSecretStatus, AppPackageUnavailableDiagnostic, AppPackageUninstallRollback, AppPackageView, type AssetApi, AutomationManager, AutomationManagerOptions, BindContextInput, type BuildAgentRunSendPayloadParams, BuildContextTailInput, BuiltinNarpRuntimeProviderService, CONTEXT_COMPACTION_CONTINUATION_TEXT, CONTEXT_COMPACTION_PART_START, CONTEXT_COMPACTION_PROJECTION_KIND, CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, CONTEXT_COMPACTION_SYSTEM_PREAMBLE, CONTEXT_COMPACTION_TIMELINE_KIND, CapabilityGrant, CapabilityGrantDecision, CapabilityGrantFilter, CapabilityGrantLegacyMigrationService, CapabilityGrantListener, CapabilityGrantManager, CapabilityGrantRequest, CapabilityGrantResource, CapabilityGrantRevocationListener, CapabilityGrantStore, CapabilityGrantSubject, CapabilityProviderView, ChannelManager, ChannelReplyRouterDispatchParams, CommandRegistry, CompactionProfileResolver, CompactionSummaryProvider, ConfigManager, ConfigManagerOptions, ConfigManagerRuntimeHooks, ConfigMutationResult, ContextBinding, type ContextBlock, ContextCompactionJournalRecoveryService, ContextCompactionModelProjection, ContextCompactionPreflightBeginResult, ContextCompactionPreflightResult, ContextCompactionPreflightService, ContextCompactionTimelineCheckpoint, ContextCompactionTrigger, type ContextProvider, type ContextProviderRequest, Contribution, CreateAgentRunSessionParams, CreateInboxDeliveryInput, CreateProjectInput, CreateProjectWorkItemInput, CreateProjectWorkStateInput, DEFAULT_AGENT_RUNTIME_ENTRY_ID, DEFAULT_SERVICE_ACTION_RISK, DESKTOP_HOST_ACCESS, DESKTOP_HOST_PROTOCOL_VERSION, DesktopApplicationTarget, DesktopCapabilityError, DesktopCapabilityErrorCode, DesktopHost, DesktopHostAccess, DesktopHostCaller, DesktopHostCapabilityDeclaration, DesktopHostCapabilityManager, DesktopHostEvent, DesktopHostEventListener, DesktopHostManifest, DesktopHostMethod, DesktopHostRequest, DesktopHostResponse, DesktopHostStatus, DesktopNodeReplService, DesktopSessionCaller, DesktopSessionStateService, DesktopSnapshotOptions, DirectPromptDispatchExecution, DirectPromptDispatchParams, DirectPromptDispatchResult, type Disposer, EventAdmissionPolicy, EventBus, type EventBusOptions, EventDelivery, EventSubscription, EventSubscriptionBudget, ExtensionLoadProgress, ExtensionLoadResult, ExtensionManager, type ExtensionRuntimeStatus, FeatureControlsService, GatewayInboundLoopRuntime, GatewayInboundProcessor, type IContextRegistry, type IKernel, type IMcpRegistry, type IModelRegistry, type INextclawAgent, type INextclawAgentRegistry, type INextclawAgentSessions, type INextclawContributionRegistry, type INextclawHarness, type INextclawRun, type INextclawSession, type INextclawSessionRegistry, type IRuntimeRegistry, type IToolRegistry, InboxDeliveryError, InboxDeliveryErrorCode, InboxDeliveryManager, InboxDeliveryManagerOptions, Ingress, type IngressContext, type IngressEnvelope, type IngressHandler, InstallationKind, InstalledSkillDetail, InstalledSkillSummary, InstalledSkillsList, JsonPointer, JsonValue, type Key, type LLMResponse, type LLMStreamEvent, type LearningLoopRuntimeConfig, type LeasedResidentEvent, LegacyVerificationRecord, LlmProviderManager, LlmProviderRuntime, LlmUsageManager, LlmUsageManagerOptions, LlmUsageRecord, LlmUsageSnapshot, LlmUsageStats, LlmUsageStore, LlmUsageStoreOptions, LlmUsageSummary, type LocalizedTextMap, MAX_INBOX_DELIVERY_CONTENT_LENGTH, type McpCatalogFilter, McpManager, type McpServerDefinition, type McpServerRecord, McpServiceAppRuntimeService, type McpToolCallInput, type McpToolCatalogEntry, type ModelChatInput, NARP_HTTP_RUNTIME_KIND, NARP_STDIO_RUNTIME_KIND, NEXTCLAW_TIMELINE_KIND_METADATA_KEY, NcpAgentSessionJournalStore, type NcpEndpointEvent, type NcpMessage, type NcpTool, type NextclawAgentDefinition, type NextclawContributionDescriptor, NextclawHarness, NextclawHarnessError, type NextclawHarnessErrorCode, type NextclawHarnessOptions, NextclawKernel, NextclawKernelOptions, NextclawNcpResolvedAgentProfile, NextclawNcpResolvedRunContext, NextclawNcpRunContextResolveParams, type NextclawRunStatus, type NextclawSessionCreateInput, type NextclawSessionRunInput, type NextclawTaskInput, type NextclawTaskResult, type NextclawUserQuestion, type NextclawUserQuestionReply, ObservationCapabilityDescriptor, ObservationContextTail, ObservationEvent, ObservationEventAdmissionDecision, ObservationExtensionRuntime, ObservationManager, ObservationManagerOptions, ObservationRef, ObservationRelationshipStatus, ObservationState, ObservationTarget, PANEL_APP_AGENT_CAPABILITIES, PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT, PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT_FINGERPRINT, PORTABLE_RUNTIME_ACCEPTANCE_LOCALES, PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS, PORTABLE_RUNTIME_ACCEPTANCE_PRESENTATION, PORTABLE_RUNTIME_ACCEPTANCE_REFERENCE_APP_ID, PROJECT_TEMPLATE_IDS, PROJECT_WORK_ATTENTION_VALUES, PROJECT_WORK_STATE_CATEGORIES, PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS, PanelAppAgentCapability, PanelAppAgentGenerateObjectInput, PanelAppAgentGenerateObjectRequest, PanelAppAgentGenerateObjectResult, PanelAppAgentRunClient, PanelAppAgentSendPayload, PanelAppAgentSendRequest, PanelAppAgentSendResult, PanelAppAssetTokenService, PanelAppBridgeSession, PanelAppCapabilityGrant, PanelAppCapabilityGrantCaller, PanelAppClientGrant, PanelAppContent, PanelAppDeleteResult, PanelAppEntry, PanelAppError, PanelAppErrorCode, PanelAppList, PanelAppManager, type PanelAppPreferencesUpdate, PanelServiceActionCaller, PlannedRestartRecovery, PlannedRestartRecoveryManager, PlannedRestartRecoveryResult, PlannedRestartRecoveryTicket, type PortableRunnerObservation, type PortableRuntimeAcceptanceContractView, PortableRuntimeAcceptanceDefinition, type PortableRuntimeAcceptanceDefinitionView, type PortableRuntimeAcceptanceEvaluationContext, type PortableRuntimeAcceptanceEvidence, type PortableRuntimeAcceptanceEvidenceArtifact, PortableRuntimeAcceptanceEvidenceSource, PortableRuntimeAcceptanceId, type PortableRuntimeAcceptanceIdentity, type PortableRuntimeAcceptanceIdentityResult, PortableRuntimeAcceptanceIdentityService, type PortableRuntimeAcceptanceLocale, PortableRuntimeAcceptanceManager, PortableRuntimeAcceptancePlatform, type PortableRuntimeAcceptancePresentation, type PortableRuntimeAcceptanceResult, type PortableRuntimeAcceptanceResultStatus, type PortableRuntimeAcceptanceStatusEntry, type PortableRuntimeAcceptanceStatusView, type PortableRuntimeAcceptanceSurfaceResult, type PortableRuntimeAcceptanceUnavailableIdentity, PreferenceEntry, PreferenceError, PreferenceErrorCode, PreferenceJsonValue, PreferenceManager, PreferenceManagerOptions, ProductActivityKind, ProductActivitySignal, ProductActivitySink, ProductActivitySource, type ProductFeatureControls, ProjectAgreementMaterial, ProjectError, ProjectErrorCode, ProjectManager, ProjectManagerOptions, ProjectMaterialService, ProjectRecentArtifact, ProjectRecentArtifactPage, ProjectRecord, ProjectSessionBinding, ProjectSkillMaterial, ProjectTemplate, ProjectTemplateId, ProjectWorkActivity, ProjectWorkActivityPage, ProjectWorkActivityType, ProjectWorkActor, ProjectWorkArtifactLink, ProjectWorkAttention, ProjectWorkError, ProjectWorkErrorCode, ProjectWorkItem, ProjectWorkItemDetail, ProjectWorkItemListEntry, ProjectWorkItemPage, ProjectWorkListInput, ProjectWorkManager, ProjectWorkState, ProjectWorkStateCategory, ProjectWorkSummary, type ProviderCatalogPlugin, ProviderManagerNcpLLMApi, ProviderModelCatalogEntry, ProviderModelCatalogManager, ProviderModelCatalogSnapshot, ProviderModelsDiscoverInput, type ProviderSpec, RUNTIME_INSTANCE_DESKTOP_DATA_DIRECTORY_ENV, RUNTIME_INSTANCE_DESKTOP_LOGS_DIRECTORY_ENV, RUNTIME_INSTANCE_DISTRIBUTION_ENV, RUNTIME_INSTANCE_INSTALLATION_KIND_ENV, RUNTIME_INSTANCE_PORTABLE_DATA_ROOT_ENV, type ResidentEventInput, ResolveRuntimeInstanceSnapshotParams, ResolvedAgentProfile, ResolvedDesktopApplicationTarget, RuntimeDistribution, RuntimeInstallationKind, RuntimeInstanceSnapshot, SERVICE_APP_MANIFEST_FILE_NAME, ServiceAction, ServiceActionCaller, ServiceActionGrant, ServiceActionGrantRequest, ServiceActionGrantState, ServiceActionInvocationFacts, ServiceActionInvokeRequest, ServiceActionInvokeResult, ServiceActionRisk, ServiceActionRuntimeState, ServiceAppAgentCapabilitySlot, ServiceAppAiCapabilityService, ServiceAppCapabilityProvision, ServiceAppCapabilityRequirement, ServiceAppDeleteResult, ServiceAppError, type ServiceAppErrorCode, ServiceAppExternalRemediation, ServiceAppJobCaller, ServiceAppJobChunkEvent, ServiceAppJobEvent, type ServiceAppJobEventSink, ServiceAppJobJournalService, ServiceAppJobList, ServiceAppJobProgressEvent, type ServiceAppJobScope, ServiceAppJobStatus, ServiceAppJobTerminalEvent, ServiceAppJobView, ServiceAppJobWatch, ServiceAppLifecycle, ServiceAppList, ServiceAppManager, ServiceAppManifest, ServiceAppManifestAction, ServiceAppModelCapabilitySlot, ServiceAppProtocol, ServiceAppProvides, ServiceAppRecord, ServiceAppRequirements, ServiceAppResidentEventDisposition, ServiceAppResidentEventInboxService, ServiceAppResidentEventList, type ServiceAppResidentEventScope, ServiceAppResidentEventStatus, ServiceAppResidentEventView, ServiceAppResourceRequirement, ServiceAppRuntimeService, ServiceAppRuntimeStatus, ServiceAppTerminalJobStatus, ServiceAppWitContract, SessionContextCompactionError, SessionContextCompactionErrorCode, SessionContextCompactionManager, SessionContextCompactionResult, SessionManager, SessionManagerOptions, SessionMessageCursorError, SessionMessagePage, SessionMetadataUpdate, SessionModelTokenUsage, type SessionPendingInput, type SessionQueuedInput, SessionRequestManager, SessionRequestManagerOptions, SessionSettingsError, SessionSettingsPatch, type SessionSteerQueuedInputResult, SessionTokenUsageStatus, SessionTokenUsageSummary, SessionTokenUsageTotals, type SkillFrontmatter, type SkillInfo, SkillManager, type SkillScope, SubscribeEventsInput, SystemObjectReferenceError, SystemObjectReferenceErrorCode, SystemObjectReferenceManager, SystemObjectReferenceProvider, SystemObjectReferenceSnapshotSource, type TypedKey, TypedPredicate, USER_QUESTION_EXTENSION_TYPE, UnavailableDesktopHost, UnsignedUpdateManifest, type Unsubscribe, UpdateBlockReason, UpdateHostKind, UpdateManifest, UpdateManifestReader, UpdateProgress, UpdateProjectWorkItemInput, UpdateProjectWorkStateInput, UpdateSnapshot, UpdateStatus, UserQuestionError, UserQuestionManager, UserQuestionPrompt, UserQuestionReplyResolution, UserQuestionResolution, UserQuestionView, VerificationEvidenceRecord, VerificationRecord, VerificationRecordEntrySurface, VerificationRecordError, VerificationRecordInput, VerificationRecordList, VerificationRecordObservation, VerificationRecordRole, VerificationRecordService, VerificationRecordStatus, type WorkspaceServiceDataOwner, assertObservationJsonValue, assertObservationPredicate, buildAgentRunSendPayload, buildContextCompactionModelProjection, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildNextclawNcpRunContext, buildObservationEventModelMessage, buildServiceActionId, buildSessionRequestCompletionMessage, capabilityGrantCovers, createAgentRuntimeSessionRequestDispatcher, createAgentRuntimeSessionRequestSourceNotifier, createAssetTools, createCapabilityDeclarationFingerprint, createContextCompactionMessageId, createContextWindowSignature, createCronJobSystemObjectProvider, createDesktopHostError, createInboxDeliverySystemObjectProvider, createLlmUsageRecord, createPanelAppAgentGrantRequest, createPanelAppClientGrantRequest, createServiceActionGrantRequest, createServiceAppAgentSlotGrantRequest, createServiceAppModelSlotGrantRequest, createTypedKey, describeAgentRuntimeSessionTypes, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, dispatchPromptOverNcpResult, evaluateObservationEventAdmission, evaluatePortableRuntimeAcceptance, evaluatePortableRuntimeAcceptanceArtifact, eventKeys, getAutomaticUpdateCheckDelay, getCapabilityGrantKey, getServiceActionName, getServiceAppManifestPath, getUiContentParamsBootstrapScript, getUnsignedUpdateManifest, hasLlmUsageTelemetry, ingressKeys, injectUiContentParamsBootstrap, isAppDataError, isAppPackageError, isContextCompactionProjectionMessage, isContextCompactionTimelineMessage, isContextWindowSnapshot, isInboxDeliveryError, isPanelAppAgentCapability, isPanelAppError, isPreferenceError, isProjectError, isProjectWorkError, isReplyCapableChannel, isServiceAppError, isSessionContextCompactionError, isSessionMessageCursorError, isSessionSettingsError, isSystemObjectReferenceError, listExtensionChannelIds, listServiceAppManifestActions, matchesCapabilityGrantFilter, matchesObservationPredicate, mergeServiceAppRuntimeActions, normalizeAgentRuntimeSessionTypeIcon, normalizeCapabilityGrantRequest, normalizeLlmUsageModel, normalizeOptionalString, normalizePortableRuntimeEnvironment, parseObservationDuration, parsePortableRuntimeAcceptanceEvidenceArtifact, parseServiceAppManifest, parseSkillFrontmatter, presentPortableRuntimeAcceptanceDefinition, readContextCompactionCheckpoint, readContextWindowEventSessionId, readJsonPointer, readLatestContextCompactionCheckpoint, readLearningLoopRuntimeConfig, readMetadataModel, readMetadataThinking, readServiceActionTargetId, readServiceAppManifest, readServiceAppSlotTarget, resolveAgentRuntimeEntries, resolveAutomaticUpdateCheckIntervalMs, resolveChannelReplyRoute, resolveEffectiveModel, resolveLegacyEventType, resolvePortableRuntimeAcceptanceLocale, resolveRuntimeInstanceSnapshot, resolveSessionChannelContext, runGatewayInboundLoop, runNextclawTask, sanitizeLlmUsage, serializeUnsignedUpdateManifest, shouldRefreshContextWindowDuringStream, shouldRefreshContextWindowImmediately, startPromptOverNcpExecution, stripSkillFrontmatter, syncSessionThinkingPreference, toBoundedJson, toNcpMessages, waitForAgentRuntimeSessionReply };
5449
4305
  //# sourceMappingURL=index.d.ts.map