@nextclaw/kernel 0.9.2 → 0.10.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,11 +1,13 @@
1
1
  import { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, getAutomaticUpdateCheckDelay, resolveAutomaticUpdateCheckIntervalMs } from "./utils/automatic-update-check.utils.js";
2
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";
3
- import { BaseChannel, Config, ContextCompactionCheckpoint, ContextCompactionPhase, ContextCompactionPlan, ContextWindowSnapshot, CreateAgentProfileInput, CreateSessionContextInheritanceInput, CreateSessionInput, CreatedSession, CronService, DiagnosticRuntime, EffectiveAgentProfile, ExtensionChannelBinding, ExtensionDiagnostic, ExtensionRegistry, ExtensionUiMetadata, GatewayController, InboundAttachment, InboundMessage, LLMProvider, LLMResponse, LLMStreamEvent, MessageBus, ModelThinkingCapability, OutboundMessage, ProviderModelDiscoveryResult, RequestSessionParams, RequestedSkillsMetadataReader, SearchConfig, SessionMessage, SessionRequestDispatcher, SessionRequestRecord, SessionRequestToolResult, SessionSearchService, SkillInfo, SkillInfo as SkillInfo$1, SkillScope, SpawnSessionAndRequestParams, ThinkingLevel, UpdateAgentProfileInput, buildCompressingCompactionCheckpoint, resolveThinkingLevel } from "@nextclaw/core";
4
- import { ListMessagesOptions, ListSessionsOptions, NcpAgentConversationStateManager, NcpAgentRuntime, NcpEndpointEvent, NcpEventType, NcpInputDelivery, NcpLLMApi, NcpLLMApiInput, NcpLLMApiOptions, NcpMessage, NcpMessagePart, NcpRunHandle, NcpSessionApi, NcpSessionMessagePageInfo, NcpSessionPatch, NcpSessionSummary, NcpTool, OpenAIChatChunk } from "@nextclaw/ncp";
5
- import { AgentRunSendIngressPayload, EventBus, InboxDelivery, InboxDeliveryContentType, InboxDeliveryListView, InboxDeliverySource, InboxDeliveryStateAction, Ingress, RuntimeModelSelectionMode, SystemObjectReferenceGroupDescriptor, SystemObjectReferenceItem, SystemObjectReferenceListView, SystemObjectResolvedReference, Unsubscribe } from "@nextclaw/shared";
3
+ 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, McpServerDefinition, McpServerDefinition as McpServerDefinition$1, MessageBus, ModelThinkingCapability, OutboundMessage, ProviderCatalogPlugin, ProviderCatalogPlugin as ProviderCatalogPlugin$1, ProviderModelDiscoveryResult, ProviderSpec, ProviderSpec as ProviderSpec$1, RequestSessionParams, RequestedSkillsMetadataReader, SearchConfig, SessionMessage, SessionRequestDispatcher, SessionRequestRecord, SessionRequestToolResult, SessionSearchService, SkillInfo, SkillInfo as SkillInfo$1, SkillScope, SpawnSessionAndRequestParams, ThinkingLevel, UpdateAgentProfileInput, buildCompressingCompactionCheckpoint, resolveThinkingLevel } from "@nextclaw/core";
4
+ import { ListMessagesOptions, ListSessionsOptions, NcpAgentConversationStateManager, NcpAgentRuntime, NcpContextTail, NcpEndpointEvent, NcpEndpointEvent as NcpEndpointEvent$1, NcpEventType, NcpInputDelivery, NcpJsonValue, NcpLLMApi, NcpLLMApiInput, NcpLLMApiOptions, NcpMessage, NcpMessage as NcpMessage$1, NcpMessagePart, NcpResolvedInputDelivery, NcpRunHandle, NcpSessionApi, NcpSessionMessagePageInfo, NcpSessionPatch, NcpSessionSummary, NcpTool, NcpTool as NcpTool$1, OpenAIChatChunk, OpenAIChatMessage } from "@nextclaw/ncp";
5
+ 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";
6
6
  import { LocalAssetStore } from "@nextclaw/ncp-agent-runtime";
7
- import { AppInstallProgressHandler, AppNativeArtifactTarget, AppPlatformTargetService, AppRollbackResult, AppRuntimeIsolation, AppRuntimeProfile, AppStorageContext, AppStorageUsage, AppUninstallResult, AppUpdateResult } from "@nextclaw/app-runtime";
8
7
  import { AgentSessionRecord, ChatTarget, NcpReplyInput, RuntimeFactoryParams } from "@nextclaw/ncp-toolkit";
8
+ import { AppInstallProgressHandler, AppNativeArtifactTarget, AppPlatformTargetService, AppRollbackResult, AppRuntimeIsolation, AppRuntimeProfile, AppStorageContext, AppStorageUsage, AppUninstallResult, AppUpdateResult } from "@nextclaw/app-runtime";
9
+ import * as _$_nextclaw_mcp0 from "@nextclaw/mcp";
10
+ import { McpCatalogFilter, McpCatalogFilter as McpCatalogFilter$1, McpRegistryService, McpServerRecord, McpServerRecord as McpServerRecord$1, McpToolCatalogEntry, McpToolCatalogEntry as McpToolCatalogEntry$1 } from "@nextclaw/mcp";
9
11
 
10
12
  //#region src/features/runtime-registry/utils/agent-runtime-registry.utils.d.ts
11
13
  type AgentRuntimeSessionTypeIcon = {
@@ -145,8 +147,8 @@ type ProviderChatParams = {
145
147
  };
146
148
  type LlmProviderRuntime = {
147
149
  get: (model?: string | null) => LLMProvider;
148
- chat: (params: ProviderChatParams) => Promise<LLMResponse>;
149
- chatStream: (params: ProviderChatParams) => AsyncGenerator<LLMStreamEvent>;
150
+ chat: (params: ProviderChatParams) => Promise<LLMResponse$1>;
151
+ chatStream: (params: ProviderChatParams) => AsyncGenerator<LLMStreamEvent$1>;
150
152
  };
151
153
  type ProviderConnectionTestInput = {
152
154
  providerName: string | null;
@@ -168,18 +170,22 @@ type ProviderModelsDiscoverInput = {
168
170
  };
169
171
  declare class LlmProviderManager {
170
172
  private readonly providerRegistry;
173
+ private readonly contributedProviderPlugins;
171
174
  private readonly providerModelDiscovery;
172
175
  private readonly providerPool;
173
176
  private readonly missingProvider;
174
177
  private config;
175
178
  constructor();
179
+ registerProviderPlugin: (plugin: ProviderCatalogPlugin$1) => (() => void);
180
+ listProviderSpecs: () => readonly ProviderSpec$1[];
176
181
  load: (config: Config) => void;
177
182
  get: (model?: string | null) => LLMProvider;
178
- readonly chat: (params: ProviderChatParams) => Promise<LLMResponse>;
179
- readonly chatStream: (this: LlmProviderManager, params: ProviderChatParams) => AsyncGenerator<LLMStreamEvent>;
183
+ readonly chat: (params: ProviderChatParams) => Promise<LLMResponse$1>;
184
+ readonly chatStream: (this: LlmProviderManager, params: ProviderChatParams) => AsyncGenerator<LLMStreamEvent$1>;
180
185
  readonly testConnection: (input: ProviderConnectionTestInput) => Promise<void>;
181
186
  supportsModelDiscovery: (providerName: string | null) => boolean;
182
187
  discoverModels: (input: ProviderModelsDiscoverInput) => Promise<ProviderModelDiscoveryResult>;
188
+ private refreshProviderRegistry;
183
189
  private resolveRoute;
184
190
  private resolveProvider;
185
191
  private matchPrefixedProvider;
@@ -291,7 +297,7 @@ declare class ConfigManager {
291
297
  loadConfig: () => Config;
292
298
  getDefaultModel: () => string;
293
299
  getModelMaxTokens: (model: string) => number | undefined;
294
- installRuntimeHooks: (hooks: ConfigManagerRuntimeHooks) => void;
300
+ installRuntimeHooks: (hooks: ConfigManagerRuntimeHooks) => (() => void);
295
301
  applyLiveConfigReload: () => Promise<void>;
296
302
  applyReloadPlan: (nextConfig: Config) => Promise<void>;
297
303
  private recordConfigEvent;
@@ -361,11 +367,11 @@ declare class AgentManager {
361
367
  //#endregion
362
368
  //#region src/types/agent-run.types.d.ts
363
369
  type ThinkingEffort = string;
364
- type ContextBlock = string;
370
+ type ContextBlock$1 = string;
365
371
  type AgentRunRequest = {
366
372
  sessionId?: string;
367
373
  peerId?: string;
368
- message: NcpMessage;
374
+ message: NcpMessage$1;
369
375
  agentRuntimeId?: string;
370
376
  agentId?: string;
371
377
  projectRoot?: string;
@@ -376,12 +382,13 @@ type AgentRunRequest = {
376
382
  maxTokens?: number;
377
383
  thinkingEffort?: ThinkingEffort | null;
378
384
  delivery?: NcpInputDelivery;
385
+ idempotencyKey?: string;
379
386
  };
380
387
  type SessionQueuedInput = {
381
388
  id: string;
382
389
  sessionId: string;
383
390
  enqueuedAt: string;
384
- message: NcpMessage;
391
+ message: NcpMessage$1;
385
392
  metadata: Record<string, unknown>;
386
393
  };
387
394
  type SessionPendingInput = SessionQueuedInput & {
@@ -405,18 +412,18 @@ type AgentRunSpec = {
405
412
  thinkingEffort?: ThinkingEffort | null;
406
413
  correlationId?: string;
407
414
  };
408
- type ContextProvider = {
409
- provide: (request: AgentRunRequest) => Promise<readonly ContextBlock[]> | readonly ContextBlock[];
415
+ type ContextProvider$1 = {
416
+ provide: (request: AgentRunRequest) => Promise<readonly ContextBlock$1[]> | readonly ContextBlock$1[];
410
417
  };
411
418
  type ToolProvider = {
412
- provide: (request: AgentRunRequest) => Promise<readonly NcpTool[]> | readonly NcpTool[];
419
+ provide: (request: AgentRunRequest) => Promise<readonly NcpTool$1[]> | readonly NcpTool$1[];
413
420
  };
414
421
  //#endregion
415
422
  //#region src/managers/context-provider.manager.d.ts
416
423
  declare class ContextProviderManager {
417
424
  private readonly providers;
418
- register: (provider: ContextProvider) => (() => void);
419
- buildContext: (request: AgentRunRequest) => Promise<readonly ContextBlock[]>;
425
+ register: (provider: ContextProvider$1) => (() => void);
426
+ buildContext: (request: AgentRunRequest) => Promise<readonly ContextBlock$1[]>;
420
427
  dispose: () => void;
421
428
  }
422
429
  //#endregion
@@ -439,7 +446,7 @@ declare class ToolProviderManager {
439
446
  private readonly providers;
440
447
  constructor(diagnostics?: Pick<DiagnosticRuntime, "record"> | undefined);
441
448
  register: (provider: ToolProvider) => (() => void);
442
- buildTools: (request: AgentRunRequest) => Promise<readonly NcpTool[]>;
449
+ buildTools: (request: AgentRunRequest) => Promise<readonly NcpTool$1[]>;
443
450
  dispose: () => void;
444
451
  private readonly wrapTool;
445
452
  }
@@ -454,7 +461,7 @@ type AgentContextWindowEvaluation = {
454
461
  };
455
462
  type AgentRunSurface = {
456
463
  contextBlocks: readonly string[];
457
- tools: readonly NcpTool[];
464
+ tools: readonly NcpTool$1[];
458
465
  };
459
466
  declare class AgentContextWindowManager {
460
467
  private readonly agentManager;
@@ -468,7 +475,7 @@ declare class AgentContextWindowManager {
468
475
  previewSession: (params: {
469
476
  requestMetadata: Record<string, unknown>;
470
477
  sessionId: string;
471
- sessionMessages: readonly NcpMessage[];
478
+ sessionMessages: readonly NcpMessage$1[];
472
479
  storedAgentId?: string;
473
480
  storedMetadata: Record<string, unknown>;
474
481
  }) => Promise<ContextWindowSnapshot | null>;
@@ -489,18 +496,18 @@ type AgentRunContextCompactionInput = {
489
496
  sessionId: string;
490
497
  agentId: string;
491
498
  contextBlocks: readonly string[];
492
- messages: readonly NcpMessage[];
499
+ messages: readonly NcpMessage$1[];
493
500
  metadata: Record<string, unknown>;
494
501
  model: string;
495
502
  phase?: ContextCompactionPhase;
496
503
  signal?: AbortSignal;
497
- tools?: readonly NcpTool[];
504
+ tools?: readonly NcpTool$1[];
498
505
  };
499
506
  declare class AgentRunContextCompactionManager {
500
507
  private readonly preflightService;
501
508
  constructor(agentManager: AgentManager, providerManager: LlmProviderRuntime);
502
- runPreflight: (input: AgentRunContextCompactionInput) => AsyncIterable<NcpEndpointEvent>;
503
- runManual: (input: AgentRunContextCompactionInput) => Promise<readonly NcpEndpointEvent[]>;
509
+ runPreflight: (input: AgentRunContextCompactionInput) => AsyncIterable<NcpEndpointEvent$1>;
510
+ runManual: (input: AgentRunContextCompactionInput) => Promise<readonly NcpEndpointEvent$1[]>;
504
511
  private run;
505
512
  private toEvent;
506
513
  }
@@ -512,7 +519,7 @@ declare const NCP_SESSION_REQUEST_COMPLETED_EVENT_TYPE = "session.request.comple
512
519
  declare const NCP_SESSION_REQUEST_FAILED_EVENT_TYPE = "session.request.failed";
513
520
  type NcpAgentSessionSnapshotMessageEvent = {
514
521
  type: typeof NCP_AGENT_SESSION_SNAPSHOT_MESSAGE_EVENT_TYPE;
515
- payload: Extract<NcpEndpointEvent, {
522
+ payload: Extract<NcpEndpointEvent$1, {
516
523
  type: NcpEventType.MessageSent;
517
524
  }>["payload"];
518
525
  };
@@ -524,7 +531,7 @@ type NcpSessionRequestJournalEvent = {
524
531
  request: unknown;
525
532
  };
526
533
  };
527
- type NcpAgentSessionJournalReplayEvent = NcpEndpointEvent | NcpAgentSessionSnapshotMessageEvent | NcpSessionRequestJournalEvent;
534
+ type NcpAgentSessionJournalReplayEvent = NcpEndpointEvent$1 | NcpAgentSessionSnapshotMessageEvent | NcpSessionRequestJournalEvent;
528
535
  //#endregion
529
536
  //#region src/utils/ncp-agent-unfinished-run.utils.d.ts
530
537
  type UnfinishedNcpAgentRun = {
@@ -536,7 +543,7 @@ type UnfinishedNcpAgentRun = {
536
543
  //#endregion
537
544
  //#region src/types/session.types.d.ts
538
545
  type SessionMessagePage = {
539
- messages: NcpMessage[];
546
+ messages: NcpMessage$1[];
540
547
  messageDetailCursors: Record<string, string>;
541
548
  total: number;
542
549
  pageInfo: NcpSessionMessagePageInfo;
@@ -622,6 +629,7 @@ declare class NcpAgentSessionJournalStore {
622
629
  private readonly summaryIndexStore;
623
630
  private readonly summaryReadStore;
624
631
  constructor(journalDir: string);
632
+ initialize: () => Promise<void>;
625
633
  appendSessionEvent: (params: {
626
634
  sessionId: string;
627
635
  event: NcpAgentSessionJournalReplayEvent;
@@ -632,7 +640,7 @@ declare class NcpAgentSessionJournalStore {
632
640
  }) => Promise<NcpSessionSummary[]>;
633
641
  getSessionSummary: (sessionId: string) => Promise<NcpSessionSummary | null>;
634
642
  listUnfinishedRuns: () => Promise<UnfinishedNcpAgentRun[]>;
635
- listSessionMessages: (sessionId: string) => Promise<NcpMessage[]>;
643
+ listSessionMessages: (sessionId: string) => Promise<NcpMessage$1[]>;
636
644
  listSessionMessagePage: (params: {
637
645
  sessionId: string;
638
646
  limit: number;
@@ -723,14 +731,17 @@ type SessionManagerOptions = {
723
731
  agentContextWindowManager: AgentContextWindowManager;
724
732
  agentManager: AgentManager;
725
733
  configManager: ConfigManager;
726
- eventBus: EventBus;
734
+ eventBus: EventBus$1;
727
735
  journalStore: NcpAgentSessionJournalStore;
728
736
  projectManager: ProjectManager;
729
737
  sessionSearch: SessionSearchService;
738
+ beforeDeleteSession?: (sessionId: string) => Promise<void>;
730
739
  };
731
740
  declare class SessionManager implements NcpSessionApi {
732
741
  private readonly options;
733
742
  private readonly eventIngestion;
743
+ private readonly settings;
744
+ private readonly summaryProjection;
734
745
  private readonly workingDirResolver;
735
746
  constructor(options: SessionManagerOptions);
736
747
  start: () => Promise<void>;
@@ -749,7 +760,7 @@ declare class SessionManager implements NcpSessionApi {
749
760
  deleteSession: (sessionId: string) => Promise<void>;
750
761
  getSessionRecord: (sessionId: string) => Promise<AgentSessionRecord | null>;
751
762
  listSessions: (options?: ListSessionsOptions) => Promise<NcpSessionSummary[]>;
752
- listSessionMessages: (sessionId: string, options?: ListMessagesOptions) => Promise<NcpMessage[]>;
763
+ listSessionMessages: (sessionId: string, options?: ListMessagesOptions) => Promise<NcpMessage$1[]>;
753
764
  getSessionTokenUsage: (sessionId: string) => Promise<SessionTokenUsageSummary | null>;
754
765
  listSessionMessagePage: (sessionId: string, options: {
755
766
  limit: number;
@@ -764,10 +775,6 @@ declare class SessionManager implements NcpSessionApi {
764
775
  clearSessionMessages: (sessionId: string) => Promise<number>;
765
776
  rewindSessionBeforeMessage: (sessionId: string, messageId: string) => Promise<AgentSessionRecord>;
766
777
  publishSessionChange: (sessionKey: string) => Promise<void>;
767
- private createSummaryFromRecord;
768
- private createSummaryWithContextWindow;
769
- private publishSessionMetadataChanged;
770
- private applySessionProjectPatch;
771
778
  }
772
779
  //#endregion
773
780
  //#region src/types/product-activity.types.d.ts
@@ -808,13 +815,13 @@ declare class SessionRun {
808
815
  private activeProductActivitySource;
809
816
  constructor(seed: {
810
817
  sessionId: string;
811
- messages: readonly NcpMessage[];
818
+ messages: readonly NcpMessage$1[];
812
819
  }, stateManager?: NcpAgentConversationStateManager, productActivitySink?: ProductActivitySink | undefined);
813
820
  getSnapshot: () => {
814
- messages: readonly NcpMessage[];
821
+ messages: readonly NcpMessage$1[];
815
822
  };
816
- applyEvents: (events: readonly NcpEndpointEvent[]) => Promise<void>;
817
- replaceMessages: (messages: readonly NcpMessage[]) => void;
823
+ applyEvents: (events: readonly NcpEndpointEvent$1[]) => Promise<void>;
824
+ replaceMessages: (messages: readonly NcpMessage$1[]) => void;
818
825
  onStatusChange: (listener: (status: "idle" | "running") => void) => (() => void);
819
826
  enqueueRequest: (request: AgentRunRequest, session: AgentRunSession) => SessionRunQueuedRequest;
820
827
  listQueuedRequests: () => readonly SessionRunQueuedRequest[];
@@ -851,14 +858,14 @@ declare class SessionRunManager {
851
858
  type AgentRuntimeRunOptions = {
852
859
  session: AgentRunSession;
853
860
  sessionRun: SessionRun;
854
- contextBlocks: readonly ContextBlock[];
855
- tools: readonly NcpTool[];
856
- initialMessages: readonly NcpMessage[];
861
+ contextBlocks: readonly ContextBlock$1[];
862
+ tools: readonly NcpTool$1[];
863
+ initialMessages: readonly NcpMessage$1[];
857
864
  signal?: AbortSignal;
858
865
  };
859
866
  type AgentRuntimeContextCompactionOptions = Pick<AgentRuntimeRunOptions, "session" | "sessionRun">;
860
867
  type AgentRuntimeContextCompactionResult = {
861
- events: readonly NcpEndpointEvent[];
868
+ events: readonly NcpEndpointEvent$1[];
862
869
  performed: boolean;
863
870
  supported: boolean;
864
871
  };
@@ -866,7 +873,7 @@ type AgentRuntime = {
866
873
  capabilities?: {
867
874
  nextStepInput?: boolean;
868
875
  };
869
- run: (spec: AgentRunSpec, options: AgentRuntimeRunOptions) => AsyncIterable<NcpEndpointEvent>;
876
+ run: (spec: AgentRunSpec, options: AgentRuntimeRunOptions) => AsyncIterable<NcpEndpointEvent$1>;
870
877
  compactContext?: (options: AgentRuntimeContextCompactionOptions) => Promise<AgentRuntimeContextCompactionResult>;
871
878
  dispose?: () => Promise<void> | void;
872
879
  };
@@ -894,10 +901,16 @@ type AgentRuntimeCacheParams = {
894
901
  declare class AgentRuntimeManager {
895
902
  private readonly providers;
896
903
  private readonly entries;
904
+ private readonly configuredEntries;
905
+ private readonly contributedEntries;
897
906
  private readonly globalRuntimes;
898
907
  private readonly sessionRuntimes;
899
908
  register: (registration: AgentRuntimeRegistration) => (() => Promise<void>);
909
+ registerProvider: (provider: AgentRuntimeProviderRegistration, host: {
910
+ resolveAssetContentPath: (assetUri: string) => string | null;
911
+ }) => (() => Promise<void>);
900
912
  applyEntries: (entries: readonly AgentRuntimeEntry[]) => void;
913
+ registerEntry: (entry: AgentRuntimeEntry) => (() => Promise<void>);
901
914
  getOrCreate: (params: AgentRuntimeCacheParams) => AgentRuntime;
902
915
  disposeRuntime: (params: AgentRuntimeCacheParams) => Promise<boolean>;
903
916
  listSessionTypes: (params?: AgentRuntimeSessionTypeDescribeParams) => Promise<{
@@ -906,6 +919,7 @@ declare class AgentRuntimeManager {
906
919
  }>;
907
920
  dispose: () => Promise<void>;
908
921
  private normalizeId;
922
+ private rebuildEntries;
909
923
  private getEntry;
910
924
  private getProvider;
911
925
  private resolveReuseScope;
@@ -945,9 +959,11 @@ declare class AgentRunRequestManager {
945
959
  readonly cleanups: Array<() => void>;
946
960
  private readonly observedSessionRuns;
947
961
  private readonly sessionCommandManager;
962
+ private readonly idempotency;
963
+ private readonly runtimeRuns;
948
964
  readonly pendingInputs: AgentRunInputDeliveryService;
949
965
  private started;
950
- constructor(agentRuntimeManager: AgentRuntimeManager, agentManager: AgentManager, configManager: ConfigManager, agentContextWindowManager: AgentContextWindowManager, eventBus: EventBus, ingress: Ingress, sessionManager: SessionManager, sessionRunManager: SessionRunManager, diagnostics?: Pick<DiagnosticRuntime, "record"> | undefined);
966
+ constructor(agentRuntimeManager: AgentRuntimeManager, agentManager: AgentManager, configManager: ConfigManager, agentContextWindowManager: AgentContextWindowManager, eventBus: EventBus$1, ingress: Ingress$1, sessionManager: SessionManager, sessionRunManager: SessionRunManager, diagnostics?: Pick<DiagnosticRuntime, "record"> | undefined);
951
967
  start: () => void;
952
968
  dispose: () => void;
953
969
  private handleSendRequest;
@@ -956,6 +972,7 @@ declare class AgentRunRequestManager {
956
972
  private handleContinueRequest;
957
973
  private handleSessionMessageRequest;
958
974
  private send;
975
+ private sendOnce;
959
976
  private startQueuedRun;
960
977
  private startRuntimeRun;
961
978
  private publishRunStartupFailure;
@@ -1313,6 +1330,343 @@ declare class AppDataManager {
1313
1330
  private isMissingFileError;
1314
1331
  }
1315
1332
  //#endregion
1333
+ //#region src/features/observation/types/observation.types.d.ts
1334
+ type JsonValue = NcpJsonValue;
1335
+ type ObservationCapabilityDescriptor = {
1336
+ extensionId: string;
1337
+ kind: "context" | "events";
1338
+ title: string;
1339
+ description?: string;
1340
+ configSchema?: Record<string, unknown>;
1341
+ replay?: "supported" | "unsupported";
1342
+ };
1343
+ type ObservationTarget = {
1344
+ sessionId: string;
1345
+ agentId: string;
1346
+ };
1347
+ type ObservationEvent = {
1348
+ eventId: string;
1349
+ eventType: string;
1350
+ occurredAt: string;
1351
+ observedAt: string;
1352
+ cursor?: string;
1353
+ dedupeKey?: string;
1354
+ causationId?: string;
1355
+ correlationId?: string;
1356
+ payload: JsonValue;
1357
+ sourceRefs?: string[];
1358
+ };
1359
+ type ObservationRelationshipStatus = "active" | "paused" | "degraded" | "expired" | "broken";
1360
+ type ContextBinding = {
1361
+ bindingId: string;
1362
+ extensionId: string;
1363
+ config: JsonValue;
1364
+ target: ObservationTarget;
1365
+ projection: {
1366
+ maxChars?: number;
1367
+ maxItems?: number;
1368
+ };
1369
+ status: ObservationRelationshipStatus;
1370
+ statusReason?: string;
1371
+ createdAt: string;
1372
+ expiresAt?: string;
1373
+ lastReadAt?: string;
1374
+ };
1375
+ type JsonPointer = string;
1376
+ type TypedPredicate = {
1377
+ op: "exists";
1378
+ path: JsonPointer;
1379
+ } | {
1380
+ op: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "contains";
1381
+ path: JsonPointer;
1382
+ value: JsonValue;
1383
+ } | {
1384
+ op: "and";
1385
+ args: TypedPredicate[];
1386
+ } | {
1387
+ op: "or";
1388
+ args: TypedPredicate[];
1389
+ } | {
1390
+ op: "not";
1391
+ arg: TypedPredicate;
1392
+ };
1393
+ type EventAdmissionPolicy = {
1394
+ predicate?: TypedPredicate;
1395
+ dedupe?: {
1396
+ key: JsonPointer;
1397
+ window?: string;
1398
+ };
1399
+ };
1400
+ type EventSubscriptionBudget = {
1401
+ maxPending: number;
1402
+ maxDeliveriesPerWindow?: number;
1403
+ window?: string;
1404
+ };
1405
+ type EventSubscription = {
1406
+ subscriptionId: string;
1407
+ extensionId: string;
1408
+ config: JsonValue;
1409
+ target: ObservationTarget;
1410
+ admission: EventAdmissionPolicy;
1411
+ delivery: "queue" | "prefer-steer";
1412
+ budget: EventSubscriptionBudget;
1413
+ cursor?: string;
1414
+ status: ObservationRelationshipStatus;
1415
+ statusReason?: string;
1416
+ createdAt: string;
1417
+ expiresAt?: string;
1418
+ suppressedCount?: number;
1419
+ lastSuppressedAt?: string;
1420
+ lastSuppressionReason?: "predicate" | "dedupe" | "max_pending" | "rate_limit";
1421
+ lastGapAt?: string;
1422
+ gapReason?: "replay_unsupported";
1423
+ };
1424
+ type EventDelivery = {
1425
+ deliveryId: string;
1426
+ subscriptionId: string;
1427
+ eventId: string;
1428
+ event: ObservationEvent;
1429
+ dedupeValue?: string;
1430
+ targetSessionId: string;
1431
+ requestedDelivery: "queue" | "prefer-steer";
1432
+ resolvedDelivery?: NcpResolvedInputDelivery;
1433
+ status: "pending" | "submitted" | "materialized" | "failed";
1434
+ ingressIdempotencyKey: string;
1435
+ messageId: string;
1436
+ createdAt: string;
1437
+ updatedAt: string;
1438
+ failure?: {
1439
+ code: string;
1440
+ message: string;
1441
+ };
1442
+ };
1443
+ type ObservationState = {
1444
+ bindings: ContextBinding[];
1445
+ subscriptions: EventSubscription[];
1446
+ deliveries: EventDelivery[];
1447
+ };
1448
+ type ObservationRef = {
1449
+ kind: "context_binding";
1450
+ id: string;
1451
+ } | {
1452
+ kind: "event_subscription";
1453
+ id: string;
1454
+ };
1455
+ type BindContextInput = {
1456
+ extensionId: string;
1457
+ config: JsonValue;
1458
+ targetSessionId: string;
1459
+ projection?: {
1460
+ maxChars?: number;
1461
+ maxItems?: number;
1462
+ };
1463
+ ttl?: string;
1464
+ };
1465
+ type SubscribeEventsInput = {
1466
+ extensionId: string;
1467
+ config: JsonValue;
1468
+ targetSessionId: string;
1469
+ admission?: EventAdmissionPolicy;
1470
+ delivery?: "queue" | "prefer-steer";
1471
+ budget?: Partial<EventSubscriptionBudget>;
1472
+ ttl?: string;
1473
+ };
1474
+ type BuildContextTailInput = {
1475
+ sessionId: string;
1476
+ signal?: AbortSignal;
1477
+ };
1478
+ type ObservationContextTail = NcpContextTail;
1479
+ type ObservationExtensionRuntime = {
1480
+ discoverObservations: (input?: {
1481
+ query?: string;
1482
+ kinds?: Array<"context" | "events">;
1483
+ }) => ObservationCapabilityDescriptor[];
1484
+ readObservation: (input: {
1485
+ extensionId: string;
1486
+ config: JsonValue;
1487
+ signal?: AbortSignal;
1488
+ }) => Promise<JsonValue>;
1489
+ subscribeObservation: (input: {
1490
+ extensionId: string;
1491
+ subscriptionId: string;
1492
+ config: JsonValue;
1493
+ cursor?: string;
1494
+ }) => Promise<{
1495
+ replay: "supported" | "unsupported";
1496
+ }>;
1497
+ unsubscribeObservation: (input: {
1498
+ extensionId: string;
1499
+ subscriptionId: string;
1500
+ }) => Promise<void>;
1501
+ };
1502
+ //#endregion
1503
+ //#region src/features/observation/managers/observation.manager.d.ts
1504
+ type ObservationManagerOptions = {
1505
+ storePath: string;
1506
+ sessionManager: SessionManager;
1507
+ agentManager: AgentManager;
1508
+ ingress: Ingress$1;
1509
+ eventBus: EventBus$1;
1510
+ now?: () => Date;
1511
+ };
1512
+ declare class ObservationManager {
1513
+ private readonly options;
1514
+ private readonly store;
1515
+ private readonly context;
1516
+ private readonly events;
1517
+ private readonly cleanups;
1518
+ private runtime;
1519
+ private started;
1520
+ constructor(options: ObservationManagerOptions);
1521
+ setExtensionRuntime: (runtime: ObservationExtensionRuntime) => void;
1522
+ start: () => Promise<void>;
1523
+ dispose: () => Promise<void>;
1524
+ bindContext: (input: BindContextInput) => Promise<ContextBinding>;
1525
+ subscribeEvents: (input: SubscribeEventsInput) => Promise<EventSubscription>;
1526
+ acceptExtensionEvent: (input: {
1527
+ extensionId: string;
1528
+ subscriptionId: string;
1529
+ event: ObservationEvent;
1530
+ }) => Promise<{
1531
+ accepted: boolean;
1532
+ }>;
1533
+ onExtensionObservationRuntimeExited: (extensionId: string) => void;
1534
+ onExtensionObservationRuntimeReady: (extensionId: string) => Promise<void>;
1535
+ buildContextTail: (input: BuildContextTailInput) => Promise<ObservationContextTail | undefined>;
1536
+ discoverObservations: (input?: {
1537
+ query?: string;
1538
+ kinds?: Array<"context" | "events">;
1539
+ }) => ObservationCapabilityDescriptor[];
1540
+ listObservations: (sessionId?: string) => Promise<{
1541
+ bindings: ContextBinding[];
1542
+ subscriptions: EventSubscription[];
1543
+ deliveries: EventDelivery[];
1544
+ }>;
1545
+ getObservation: (ref: ObservationRef) => Promise<ContextBinding | EventSubscription | null>;
1546
+ updateObservation: (action: "pause" | "resume" | "remove", ref: ObservationRef) => Promise<{
1547
+ observation: ContextBinding | EventSubscription | null;
1548
+ remainingDeliveries: number;
1549
+ }>;
1550
+ removeSession: (sessionId: string) => Promise<void>;
1551
+ private revalidateSession;
1552
+ private resolveNativeTarget;
1553
+ private requireCapability;
1554
+ private requireRuntime;
1555
+ private requireString;
1556
+ private runBackground;
1557
+ }
1558
+ //#endregion
1559
+ //#region src/features/observation/utils/observation.utils.d.ts
1560
+ declare function parseObservationDuration(value: string, field: string): number;
1561
+ declare function readJsonPointer(value: unknown, pointer: string): unknown;
1562
+ declare function assertObservationJsonValue(value: unknown, depth?: number): asserts value is JsonValue;
1563
+ declare function assertObservationPredicate(predicate: TypedPredicate, depth?: number): void;
1564
+ declare function matchesObservationPredicate(predicate: TypedPredicate | undefined, event: ObservationEvent): boolean;
1565
+ type ObservationEventAdmissionDecision = {
1566
+ kind: "admitted";
1567
+ delivery: EventDelivery;
1568
+ } | {
1569
+ kind: "existing";
1570
+ deliveryId: string;
1571
+ } | {
1572
+ kind: "suppressed";
1573
+ reason: "predicate" | "dedupe" | "max_pending" | "rate_limit";
1574
+ };
1575
+ declare function evaluateObservationEventAdmission(input: {
1576
+ state: ObservationState;
1577
+ subscription: EventSubscription;
1578
+ event: ObservationEvent;
1579
+ deliveryId: string;
1580
+ now: Date;
1581
+ }): ObservationEventAdmissionDecision;
1582
+ declare function toBoundedJson(value: JsonValue, maxChars: number): JsonValue;
1583
+ declare function serializeContextTail(tail: NcpContextTail): string;
1584
+ declare function buildObservationEventModelMessage(message: NcpMessage$1): OpenAIChatMessage | null;
1585
+ //#endregion
1586
+ //#region src/features/extension-runtime/types/extension-runtime.types.d.ts
1587
+ type ExtensionServerConfig = {
1588
+ type: "stdio";
1589
+ command: string;
1590
+ args?: string[];
1591
+ env?: Record<string, string>;
1592
+ };
1593
+ type ExtensionManifest = {
1594
+ id: string;
1595
+ name?: string;
1596
+ version?: string;
1597
+ rootDir: string;
1598
+ server: ExtensionServerConfig;
1599
+ contributes?: {
1600
+ observations?: {
1601
+ read?: {
1602
+ description: string;
1603
+ configSchema?: Record<string, unknown>;
1604
+ };
1605
+ events?: {
1606
+ description: string;
1607
+ configSchema?: Record<string, unknown>;
1608
+ replay?: "supported" | "unsupported";
1609
+ };
1610
+ };
1611
+ channels?: Array<{
1612
+ id: string;
1613
+ name?: string;
1614
+ description?: string;
1615
+ meta?: Record<string, unknown>;
1616
+ configSchema?: Record<string, unknown>;
1617
+ configUiHints?: Record<string, Record<string, unknown>>;
1618
+ auth?: boolean | Record<string, unknown>;
1619
+ outbound?: {
1620
+ text?: boolean;
1621
+ };
1622
+ }>;
1623
+ };
1624
+ };
1625
+ type ExtensionProcessState = "stopped" | "starting" | "running" | "stopping" | "failed";
1626
+ type ExtensionLeaseReason = {
1627
+ kind: "enabled-channel";
1628
+ channelId: string;
1629
+ } | {
1630
+ kind: "auth-session";
1631
+ sessionId: string;
1632
+ expiresAt: string;
1633
+ } | {
1634
+ kind: "auth-handoff";
1635
+ channelId: string;
1636
+ expiresAt: string;
1637
+ } | {
1638
+ kind: "request";
1639
+ requestId: string;
1640
+ } | {
1641
+ kind: "observation-subscription";
1642
+ subscriptionId: string;
1643
+ };
1644
+ type ExtensionRuntimeStatus = {
1645
+ extensionId: string;
1646
+ generation: string | null;
1647
+ lastExit: {
1648
+ at: string;
1649
+ code: number | null;
1650
+ expected: boolean;
1651
+ signal: string | null;
1652
+ } | null;
1653
+ leaseReasons: ExtensionLeaseReason[];
1654
+ memory: {
1655
+ pssBytes: number | null;
1656
+ rssBytes: number | null;
1657
+ } | null;
1658
+ pid: number | null;
1659
+ startedAt: string | null;
1660
+ state: ExtensionProcessState;
1661
+ startupDurationMs: number | null;
1662
+ };
1663
+ //#endregion
1664
+ //#region src/features/extension-runtime/utils/extension-channel-catalog.utils.d.ts
1665
+ declare function listExtensionChannelIds(params: {
1666
+ config: Config;
1667
+ workspace: string;
1668
+ }): string[];
1669
+ //#endregion
1316
1670
  //#region src/managers/extension.manager.d.ts
1317
1671
  type ExtensionLoadProgress = {
1318
1672
  extensionId: string;
@@ -1328,10 +1682,11 @@ type ExtensionLoadResult = {
1328
1682
  type ExtensionManagerOptions = {
1329
1683
  diagnostics: DiagnosticRuntime;
1330
1684
  configManager: Pick<ConfigManager, "loadConfig">;
1331
- eventBus: Pick<EventBus, "emitEnvelope">;
1332
- ingress: Pick<Ingress, "addHandler">;
1685
+ eventBus: Pick<EventBus$1, "emitEnvelope">;
1686
+ ingress: Pick<Ingress$1, "addHandler">;
1333
1687
  messageBus: Pick<MessageBus, "publishInbound">;
1334
1688
  sessionManager: SessionManager;
1689
+ observations: ObservationManager;
1335
1690
  };
1336
1691
  type ExtensionLoadParams = {
1337
1692
  config?: Config;
@@ -1359,6 +1714,7 @@ declare class ExtensionManager {
1359
1714
  getChannelBindings: () => ExtensionChannelBinding[];
1360
1715
  getUiMetadata: () => ExtensionUiMetadata[];
1361
1716
  getRuntimeStatus: () => ExtensionRuntimeStatus[];
1717
+ getManifests: () => ExtensionManifest[];
1362
1718
  authenticateEventStreamCredential: (input: {
1363
1719
  extensionId: string | null;
1364
1720
  generation: string | null;
@@ -1476,7 +1832,7 @@ type CreateInboxDeliveryInput = {
1476
1832
  source: InboxDeliverySource;
1477
1833
  };
1478
1834
  type InboxDeliveryManagerOptions = {
1479
- eventBus: Pick<EventBus, "emit">;
1835
+ eventBus: Pick<EventBus$1, "emit">;
1480
1836
  storePath: string;
1481
1837
  };
1482
1838
  type InboxDeliveryErrorCode = "INBOX_DELIVERY_INVALID_CONTENT" | "INBOX_DELIVERY_INVALID_SUMMARY" | "INBOX_DELIVERY_INVALID_TITLE" | "INBOX_DELIVERY_NOT_FOUND";
@@ -1541,7 +1897,9 @@ declare function createCronJobSystemObjectProvider(automation: Pick<AutomationMa
1541
1897
  //#endregion
1542
1898
  //#region src/managers/mcp.manager.d.ts
1543
1899
  declare class McpManager {
1900
+ private baseConfig;
1544
1901
  private currentMcpConfig;
1902
+ private readonly contributedServers;
1545
1903
  private readonly mcpLifecycleManager;
1546
1904
  private readonly mcpRegistryService;
1547
1905
  private readonly toolRegistryAdapter;
@@ -1549,10 +1907,15 @@ declare class McpManager {
1549
1907
  constructor(getConfig: () => Config);
1550
1908
  listToolsForRun: (params: {
1551
1909
  agentId: string;
1552
- }) => ReadonlyArray<NcpTool>;
1910
+ }) => ReadonlyArray<NcpTool$1>;
1911
+ registerServer: (name: string, definition: McpServerDefinition$1) => Promise<() => Promise<void>>;
1912
+ listServers: () => _$_nextclaw_mcp0.McpServerRecord[];
1913
+ listTools: (filter?: McpCatalogFilter$1) => _$_nextclaw_mcp0.McpToolCatalogEntry[];
1914
+ callTool: (params: Parameters<McpRegistryService["callTool"]>[0]) => Promise<unknown>;
1553
1915
  start: () => void;
1554
1916
  applyConfig: (config: Config) => Promise<void>;
1555
1917
  dispose: () => Promise<void>;
1918
+ private buildEffectiveConfig;
1556
1919
  private prewarmEnabledServersSafely;
1557
1920
  }
1558
1921
  //#endregion
@@ -1572,7 +1935,7 @@ declare class SessionContextCompactionManager {
1572
1935
  private readonly eventBus;
1573
1936
  private readonly sessionManager;
1574
1937
  private readonly sessionRunManager;
1575
- constructor(agentRuntimeManager: AgentRuntimeManager, eventBus: EventBus, sessionManager: SessionManager, sessionRunManager: SessionRunManager);
1938
+ constructor(agentRuntimeManager: AgentRuntimeManager, eventBus: EventBus$1, sessionManager: SessionManager, sessionRunManager: SessionRunManager);
1576
1939
  compact: (requestedSessionId: string) => Promise<SessionContextCompactionResult>;
1577
1940
  }
1578
1941
  //#endregion
@@ -1753,7 +2116,7 @@ type PanelAppAgentSendPayload = {
1753
2116
  } | {
1754
2117
  sessionId?: string;
1755
2118
  peerId?: string;
1756
- message: NcpMessage | (Omit<NcpMessage, "sessionId"> & {
2119
+ message: NcpMessage$1 | (Omit<NcpMessage$1, "sessionId"> & {
1757
2120
  sessionId?: string;
1758
2121
  });
1759
2122
  content?: never;
@@ -1765,7 +2128,7 @@ type PanelAppAgentSendRequest = {
1765
2128
  type PanelAppAgentSendResult = NcpRunHandle;
1766
2129
  type PanelAppAgentRunClient = {
1767
2130
  send: (input: AgentRunSendIngressPayload) => Promise<NcpRunHandle>;
1768
- sendAndStreamEvents: (input: AgentRunSendIngressPayload) => AsyncGenerator<NcpEndpointEvent>;
2131
+ sendAndStreamEvents: (input: AgentRunSendIngressPayload) => AsyncGenerator<NcpEndpointEvent$1>;
1769
2132
  };
1770
2133
  type PanelAppAgentGenerateObjectInput = {
1771
2134
  peerId: string;
@@ -1802,8 +2165,8 @@ declare class PanelAppManager {
1802
2165
  constructor(params: {
1803
2166
  agentRunClient?: PanelAppAgentRunClient;
1804
2167
  configManager: ConfigManager;
1805
- eventBus?: EventBus;
1806
- ingress?: Ingress;
2168
+ eventBus?: EventBus$1;
2169
+ ingress?: Ingress$1;
1807
2170
  listPackageComponentSources?: () => Promise<AppPackageComponentSource[]>;
1808
2171
  });
1809
2172
  listPanelApps: () => Promise<PanelAppList>;
@@ -2092,19 +2455,19 @@ declare class SessionRequestManager {
2092
2455
  //#endregion
2093
2456
  //#region src/features/session-request/utils/agent-runtime-session-request-dispatcher.utils.d.ts
2094
2457
  type AgentRuntimeSessionRequestDispatcherOptions = {
2095
- eventBus: EventBus;
2096
- ingress: Ingress;
2458
+ eventBus: EventBus$1;
2459
+ ingress: Ingress$1;
2097
2460
  };
2098
2461
  declare function waitForAgentRuntimeSessionReply(input: {
2099
- eventBus: EventBus;
2462
+ eventBus: EventBus$1;
2100
2463
  onAccepted: (messageId: string) => void;
2101
2464
  requestId: string;
2102
2465
  }): {
2103
- dispose: Unsubscribe;
2104
- promise: Promise<NcpMessage>;
2466
+ dispose: Unsubscribe$1;
2467
+ promise: Promise<NcpMessage$1>;
2105
2468
  };
2106
2469
  declare function dispatchAgentRuntimeSessionRequest(input: {
2107
- ingress: Ingress;
2470
+ ingress: Ingress$1;
2108
2471
  request: SessionRequestRecord;
2109
2472
  task: string;
2110
2473
  }): Promise<void>;
@@ -2132,8 +2495,8 @@ declare class NextclawKernelControlManager<TGatewayInput, TUiInput, TStartInput>
2132
2495
  requireRuntimeControl: () => NextclawKernelRuntimeControl<TGatewayInput, TUiInput, TStartInput>;
2133
2496
  }
2134
2497
  declare class NextclawKernel {
2135
- readonly eventBus: EventBus;
2136
- readonly ingress: Ingress;
2498
+ readonly eventBus: EventBus$1;
2499
+ readonly ingress: Ingress$1;
2137
2500
  readonly messageBus: MessageBus;
2138
2501
  readonly diagnostics: DiagnosticRuntime;
2139
2502
  readonly llmProviders: LlmProviderManager;
@@ -2168,10 +2531,12 @@ declare class NextclawKernel {
2168
2531
  readonly sessionContextCompactionManager: SessionContextCompactionManager;
2169
2532
  readonly toolProviderManager: ToolProviderManager;
2170
2533
  readonly agentRunRequestManager: AgentRunRequestManager;
2534
+ readonly observations: ObservationManager;
2171
2535
  private readonly ncpAgentSessionJournalStore;
2172
2536
  private readonly contributions;
2173
2537
  private gatewayController;
2174
2538
  constructor(options?: NextclawKernelOptions);
2539
+ private createContributions;
2175
2540
  private installAppPackageRuntimeHooks;
2176
2541
  listSessionTypes: (params?: AgentRuntimeSessionTypeDescribeParams) => Promise<{
2177
2542
  defaultType: string;
@@ -2231,28 +2596,36 @@ declare function buildAgentRunSendPayload(params: BuildAgentRunSendPayloadParams
2231
2596
  type AgentRunReplyOptions = {
2232
2597
  abortSignal?: AbortSignal;
2233
2598
  onAssistantDelta?: (delta: string) => void;
2234
- onEvent?: (event: NcpEndpointEvent) => void;
2599
+ onEvent?: (event: NcpEndpointEvent$1) => void;
2235
2600
  missingCompletedMessageError?: string;
2236
2601
  runErrorMessage?: string;
2237
2602
  };
2238
2603
  type AgentRunStreamOptions = {
2239
2604
  abortSignal?: AbortSignal;
2240
- onEvent?: (event: NcpEndpointEvent) => void;
2605
+ onEvent?: (event: NcpEndpointEvent$1) => void;
2241
2606
  };
2242
2607
  type AgentRunReply = {
2243
2608
  handle: NcpRunHandle;
2244
2609
  text: string;
2245
- completedMessage: NcpMessage;
2610
+ completedMessage: NcpMessage$1;
2611
+ };
2612
+ type AgentRunExecution = {
2613
+ handle: NcpRunHandle;
2614
+ events: AsyncIterable<NcpEndpointEvent$1>;
2615
+ result: Promise<AgentRunReply>;
2616
+ cancel: () => Promise<void>;
2617
+ dispose: () => void;
2246
2618
  };
2247
2619
  declare class AgentRunClient {
2248
2620
  private readonly options;
2249
2621
  constructor(options: {
2250
- eventBus: Pick<EventBus, "on">;
2251
- ingress: Pick<Ingress, "handle">;
2622
+ eventBus: Pick<EventBus$1, "on">;
2623
+ ingress: Pick<Ingress$1, "handle">;
2252
2624
  });
2253
2625
  send: (input: AgentRunSendIngressPayload) => Promise<NcpRunHandle>;
2254
2626
  sendAndWaitForReply: (input: AgentRunSendIngressPayload, options?: AgentRunReplyOptions) => Promise<AgentRunReply>;
2255
- sendAndStreamEvents: (this: AgentRunClient, input: AgentRunSendIngressPayload, options?: AgentRunStreamOptions) => AsyncGenerator<NcpEndpointEvent>;
2627
+ startRun: (input: AgentRunSendIngressPayload, options?: AgentRunReplyOptions) => Promise<AgentRunExecution>;
2628
+ sendAndStreamEvents: (this: AgentRunClient, input: AgentRunSendIngressPayload, options?: AgentRunStreamOptions) => AsyncGenerator<NcpEndpointEvent$1>;
2256
2629
  private prepareObserver;
2257
2630
  private sendWithCorrelation;
2258
2631
  }
@@ -2270,7 +2643,7 @@ type GatewayInboundLoopRuntime = {
2270
2643
  configManager: {
2271
2644
  loadConfig: () => Config;
2272
2645
  };
2273
- appEventBus?: EventBus;
2646
+ appEventBus?: EventBus$1;
2274
2647
  };
2275
2648
  declare class GatewayInboundProcessor {
2276
2649
  private runtime;
@@ -2304,7 +2677,7 @@ type ChannelReplyRouterDispatchParams = {
2304
2677
  attachments?: InboundAttachment[];
2305
2678
  metadata?: Record<string, unknown>;
2306
2679
  abortSignal?: AbortSignal;
2307
- onEvent?: (event: NcpEndpointEvent) => void;
2680
+ onEvent?: (event: NcpEndpointEvent$1) => void;
2308
2681
  };
2309
2682
  declare function isReplyCapableChannel(channel: BaseChannel<Record<string, unknown>> | null | undefined): channel is ReplyCapableChannel;
2310
2683
  declare function resolveChannelReplyRoute(params: {
@@ -2327,9 +2700,244 @@ type DirectPromptDispatchParams = {
2327
2700
  agentId?: string;
2328
2701
  abortSignal?: AbortSignal;
2329
2702
  onAssistantDelta?: (delta: string) => void;
2703
+ onEvent?: (event: NcpEndpointEvent$1) => void;
2330
2704
  };
2705
+ type DirectPromptDispatchResult = {
2706
+ kind: "agent" | "command";
2707
+ agentId: string;
2708
+ sessionId: string;
2709
+ runId: string | null;
2710
+ text: string;
2711
+ completedMessage: NcpMessage$1 | null;
2712
+ };
2713
+ type DirectPromptDispatchExecution = {
2714
+ kind: "command";
2715
+ result: DirectPromptDispatchResult;
2716
+ } | {
2717
+ kind: "agent";
2718
+ agentId: string;
2719
+ sessionId: string;
2720
+ execution: AgentRunExecution;
2721
+ };
2722
+ declare function startPromptOverNcpExecution(params: DirectPromptDispatchParams): Promise<DirectPromptDispatchExecution>;
2723
+ declare function dispatchPromptOverNcpResult(params: DirectPromptDispatchParams): Promise<DirectPromptDispatchResult>;
2331
2724
  declare function dispatchPromptOverNcp(params: DirectPromptDispatchParams): Promise<string>;
2332
2725
  //#endregion
2726
+ //#region src/features/harness/managers/nextclaw-contribution.manager.d.ts
2727
+ declare abstract class Contribution extends Contribution$1 {
2728
+ readonly id: string;
2729
+ readonly version?: string;
2730
+ protected constructor(options: {
2731
+ id: string;
2732
+ version?: string;
2733
+ });
2734
+ protected get kernel(): IKernel;
2735
+ }
2736
+ //#endregion
2737
+ //#region src/features/harness/types/nextclaw-harness.types.d.ts
2738
+ type NextclawHarnessErrorCode = "invalid_input" | "cancelled" | "lifecycle" | "runtime_failure";
2739
+ declare class NextclawHarnessError extends Error {
2740
+ readonly code: NextclawHarnessErrorCode;
2741
+ readonly cause?: unknown;
2742
+ constructor(code: NextclawHarnessErrorCode, message: string, cause?: unknown);
2743
+ }
2744
+ type NextclawTaskInput = {
2745
+ input: string;
2746
+ agentId?: string;
2747
+ sessionId?: string;
2748
+ model?: string;
2749
+ signal?: AbortSignal;
2750
+ onEvent?: (event: NcpEndpointEvent$1) => void;
2751
+ onAssistantDelta?: (delta: string) => void;
2752
+ };
2753
+ type NextclawTaskResult = {
2754
+ schemaVersion: "nextclaw.task/v1";
2755
+ status: "completed";
2756
+ kind: "agent" | "command";
2757
+ agentId: string;
2758
+ sessionId: string;
2759
+ runId: string | null;
2760
+ text: string;
2761
+ completedMessage: NcpMessage$1 | null;
2762
+ };
2763
+ type NextclawHarnessOptions = {
2764
+ homeDir?: string;
2765
+ configPath?: string;
2766
+ builtInAppsDirectory?: string;
2767
+ productVersion?: string;
2768
+ productActivitySink?: {
2769
+ record: (signal: {
2770
+ kind: "intent_accepted" | "run_succeeded";
2771
+ occurredAt: string;
2772
+ source: "direct" | "channel";
2773
+ }) => Promise<void> | void;
2774
+ };
2775
+ };
2776
+ type NextclawAgentDefinition = {
2777
+ id: string;
2778
+ displayName?: string;
2779
+ description?: string;
2780
+ model?: string;
2781
+ runtime?: string;
2782
+ runtimeConfig?: Record<string, unknown> | null;
2783
+ };
2784
+ type NextclawSessionCreateInput = {
2785
+ sessionId?: string;
2786
+ task: string;
2787
+ title?: string;
2788
+ workspace?: string;
2789
+ model?: string;
2790
+ };
2791
+ type NextclawSessionRunInput = {
2792
+ input: string;
2793
+ model?: string;
2794
+ signal?: AbortSignal;
2795
+ onEvent?: (event: NcpEndpointEvent$1) => void;
2796
+ onAssistantDelta?: (delta: string) => void;
2797
+ };
2798
+ type NextclawRunStatus = "running" | "completed" | "failed" | "cancelled";
2799
+ type NextclawContributionDescriptor = {
2800
+ id: string;
2801
+ version?: string;
2802
+ };
2803
+ interface IToolRegistry {
2804
+ register(tool: NcpTool$1): Disposer$1;
2805
+ }
2806
+ type ContextBlock = string;
2807
+ type ContextProviderRequest = {
2808
+ sessionId?: string;
2809
+ peerId?: string;
2810
+ message: NcpMessage$1;
2811
+ agentRuntimeId?: string;
2812
+ agentId?: string;
2813
+ projectRoot?: string;
2814
+ channel?: string;
2815
+ correlationId?: string;
2816
+ metadata?: Record<string, unknown>;
2817
+ model?: string;
2818
+ maxTokens?: number;
2819
+ thinkingEffort?: string | null;
2820
+ };
2821
+ type ContextProvider = {
2822
+ provide: (request: ContextProviderRequest) => Promise<readonly ContextBlock[]> | readonly ContextBlock[];
2823
+ };
2824
+ interface IContextRegistry {
2825
+ register(provider: ContextProvider): Disposer$1;
2826
+ }
2827
+ type ModelChatInput = {
2828
+ messages: Array<Record<string, unknown>>;
2829
+ tools?: Array<Record<string, unknown>>;
2830
+ model?: string | null;
2831
+ maxTokens?: number;
2832
+ thinkingLevel?: ThinkingLevel | null;
2833
+ signal?: AbortSignal;
2834
+ };
2835
+ interface IModelRegistry {
2836
+ registerProvider(plugin: ProviderCatalogPlugin$1): Disposer$1;
2837
+ listProviders(): readonly ProviderSpec$1[];
2838
+ chat(input: ModelChatInput): Promise<LLMResponse$1>;
2839
+ chatStream(input: ModelChatInput): AsyncIterable<LLMStreamEvent$1>;
2840
+ }
2841
+ type AgentRuntimeSessionTypeCatalog = {
2842
+ defaultType: string;
2843
+ options: AgentRuntimeSessionTypeOption[];
2844
+ };
2845
+ interface IRuntimeRegistry {
2846
+ registerProvider(provider: AgentRuntimeProviderRegistration): Disposer$1;
2847
+ registerEntry(entry: AgentRuntimeEntry): Disposer$1;
2848
+ listSessionTypes(params?: AgentRuntimeSessionTypeDescribeParams): Promise<AgentRuntimeSessionTypeCatalog>;
2849
+ }
2850
+ type McpToolCallInput = {
2851
+ serverName: string;
2852
+ toolName: string;
2853
+ args: Record<string, unknown>;
2854
+ signal?: AbortSignal;
2855
+ };
2856
+ interface IMcpRegistry {
2857
+ registerServer(name: string, definition: McpServerDefinition$1): Promise<Disposer$1>;
2858
+ listServers(): readonly McpServerRecord$1[];
2859
+ listTools(filter?: McpCatalogFilter$1): readonly McpToolCatalogEntry$1[];
2860
+ callTool(input: McpToolCallInput): Promise<unknown>;
2861
+ }
2862
+ interface IKernel {
2863
+ readonly eventBus: EventBus$1;
2864
+ readonly ingress: Ingress$1;
2865
+ readonly tools: IToolRegistry;
2866
+ readonly context: IContextRegistry;
2867
+ readonly models: IModelRegistry;
2868
+ readonly runtimes: IRuntimeRegistry;
2869
+ readonly mcp: IMcpRegistry;
2870
+ }
2871
+ interface INextclawContributionRegistry {
2872
+ register(contribution: Contribution): Disposer$1;
2873
+ list(): readonly NextclawContributionDescriptor[];
2874
+ }
2875
+ interface INextclawRun {
2876
+ readonly agentId: string;
2877
+ readonly runId: string | null;
2878
+ readonly sessionId: string;
2879
+ readonly status: NextclawRunStatus;
2880
+ events(): AsyncIterable<NcpEndpointEvent$1>;
2881
+ result(): Promise<NextclawTaskResult>;
2882
+ cancel(): Promise<void>;
2883
+ }
2884
+ interface INextclawSession {
2885
+ readonly agentId: string;
2886
+ readonly sessionId: string;
2887
+ run(input: NextclawSessionRunInput): Promise<INextclawRun>;
2888
+ }
2889
+ interface INextclawAgentSessions {
2890
+ create(input: NextclawSessionCreateInput): Promise<INextclawSession>;
2891
+ resume(sessionId: string): Promise<INextclawSession>;
2892
+ }
2893
+ interface INextclawSessionRegistry {
2894
+ resume(sessionId: string): Promise<INextclawSession>;
2895
+ }
2896
+ interface INextclawAgent {
2897
+ readonly definition: NextclawAgentDefinition;
2898
+ readonly id: string;
2899
+ readonly sessions: INextclawAgentSessions;
2900
+ }
2901
+ interface INextclawAgentRegistry {
2902
+ create(definition: NextclawAgentDefinition): Promise<INextclawAgent>;
2903
+ get(agentId?: string): INextclawAgent;
2904
+ list(): readonly NextclawAgentDefinition[];
2905
+ }
2906
+ interface INextclawHarness {
2907
+ readonly agents: INextclawAgentRegistry;
2908
+ readonly sessions: INextclawSessionRegistry;
2909
+ readonly contributions: INextclawContributionRegistry;
2910
+ start(): Promise<void>;
2911
+ runTask(input: NextclawTaskInput): Promise<NextclawTaskResult>;
2912
+ dispose(): Promise<void>;
2913
+ }
2914
+ //#endregion
2915
+ //#region src/features/harness/managers/nextclaw-harness.manager.d.ts
2916
+ declare class NextclawHarness implements INextclawHarness {
2917
+ private readonly options;
2918
+ readonly agents: INextclawAgentRegistry;
2919
+ readonly sessions: INextclawSessionRegistry;
2920
+ readonly contributions: INextclawContributionRegistry;
2921
+ private readonly contributionRegistry;
2922
+ private readonly ownedRuns;
2923
+ private state;
2924
+ private kernel;
2925
+ private startPromise;
2926
+ constructor(options?: NextclawHarnessOptions);
2927
+ start: () => Promise<void>;
2928
+ runTask: (input: NextclawTaskInput) => Promise<NextclawTaskResult>;
2929
+ dispose: () => Promise<void>;
2930
+ private readonly requireKernel;
2931
+ private startInternal;
2932
+ private resolveTaskSession;
2933
+ private readonly onRunCreated;
2934
+ private readonly onRunSettled;
2935
+ private disposeRuns;
2936
+ }
2937
+ //#endregion
2938
+ //#region src/features/harness/utils/nextclaw-task.utils.d.ts
2939
+ declare function runNextclawTask(input: NextclawTaskInput, options?: NextclawHarnessOptions): Promise<NextclawTaskResult>;
2940
+ //#endregion
2333
2941
  //#region src/services/panel-app-asset-token.service.d.ts
2334
2942
  type PanelAppAssetTokenClaims = {
2335
2943
  panelAppId: string;
@@ -2436,22 +3044,29 @@ declare function getServiceActionName(actionId: string, appId: string): string;
2436
3044
  //#region src/features/context-compaction/services/context-compaction-journal-recovery.service.d.ts
2437
3045
  declare class ContextCompactionJournalRecoveryService {
2438
3046
  private readonly pendingMessageIds;
3047
+ private readonly pendingCheckpoints;
2439
3048
  private readonly recoveredTerminals;
2440
- seed: (messages: readonly NcpMessage[]) => void;
2441
- track: (event: NcpEndpointEvent) => void;
2442
- terminalize: (message: NcpMessage) => NcpMessage;
3049
+ private readonly terminalMessages;
3050
+ seed: (messages: readonly NcpMessage$1[]) => void;
3051
+ track: (event: NcpEndpointEvent$1) => void;
3052
+ private trackMessageSent;
3053
+ private trackTerminalEvent;
3054
+ terminalize: (message: NcpMessage$1) => NcpMessage$1;
2443
3055
  private readCheckpoint;
3056
+ private readCheckpointByMessageId;
3057
+ private readContinuationMessageId;
3058
+ private readEventMessageId;
2444
3059
  }
2445
3060
  //#endregion
2446
3061
  //#region src/features/context-compaction/services/context-compaction-preflight.service.d.ts
2447
3062
  type ContextCompactionPreflightResult = {
2448
3063
  contextWindow: ContextWindowSnapshot;
2449
- sessionMessages: NcpMessage[];
2450
- timelineMessage: NcpMessage | null;
3064
+ sessionMessages: NcpMessage$1[];
3065
+ timelineMessage: NcpMessage$1 | null;
2451
3066
  };
2452
3067
  type ContextCompactionPreflightBeginResult = {
2453
3068
  contextWindow: ContextWindowSnapshot;
2454
- sessionMessages: NcpMessage[];
3069
+ sessionMessages: NcpMessage$1[];
2455
3070
  pendingCompaction: ContextCompactionPendingWork | null;
2456
3071
  };
2457
3072
  type ContextCompactionTrigger = "automatic" | "manual";
@@ -2471,40 +3086,39 @@ type ContextCompactionPendingWork = {
2471
3086
  reservedContextTokens: number;
2472
3087
  snapshotFixedInputTokens: number;
2473
3088
  sessionId: string;
2474
- sessionMessages: NcpMessage[];
3089
+ sessionMessages: NcpMessage$1[];
2475
3090
  };
2476
3091
  declare class ContextCompactionPreflightService {
2477
3092
  private readonly agentManager;
2478
- private readonly providerManager?;
2479
3093
  private readonly compactionService;
2480
3094
  private readonly contextWindowBudgetService;
2481
- constructor(agentManager: AgentManager, providerManager?: LlmProviderRuntime | undefined);
3095
+ private readonly summaryGenerationService;
3096
+ constructor(agentManager: AgentManager, providerManager?: LlmProviderRuntime);
2482
3097
  preview: (params: {
2483
3098
  completeInputBudget?: boolean;
2484
3099
  contextBlocks?: readonly string[];
2485
3100
  fixedInputTokens?: number;
2486
3101
  requestMetadata: Record<string, unknown>;
2487
3102
  sessionId: string;
2488
- sessionMessages: readonly NcpMessage[];
3103
+ sessionMessages: readonly NcpMessage$1[];
2489
3104
  storedAgentId?: string;
2490
3105
  storedMetadata: Record<string, unknown>;
2491
- tools?: readonly NcpTool[];
3106
+ tools?: readonly NcpTool$1[];
2492
3107
  }) => ContextWindowSnapshot | null;
2493
3108
  begin: (params: {
2494
3109
  contextBlocks?: readonly string[];
2495
- inputMessages: readonly NcpMessage[];
3110
+ inputMessages: readonly NcpMessage$1[];
2496
3111
  model: string;
2497
3112
  phase?: ContextCompactionPhase;
2498
3113
  requestMetadata: Record<string, unknown>;
2499
3114
  sessionId: string;
2500
- sessionMessages: readonly NcpMessage[];
3115
+ sessionMessages: readonly NcpMessage$1[];
2501
3116
  storedAgentId?: string;
2502
3117
  storedMetadata: Record<string, unknown>;
2503
- tools?: readonly NcpTool[];
3118
+ tools?: readonly NcpTool$1[];
2504
3119
  trigger?: ContextCompactionTrigger;
2505
3120
  }) => ContextCompactionPreflightBeginResult;
2506
3121
  finish: (pending: ContextCompactionPendingWork, signal?: AbortSignal) => Promise<ContextCompactionPreflightResult>;
2507
- private generateSummary;
2508
3122
  private resolveCompactionProfile;
2509
3123
  }
2510
3124
  //#endregion
@@ -2516,33 +3130,33 @@ declare const CONTEXT_COMPACTION_PROJECTION_KIND = "compressed_context";
2516
3130
  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.";
2517
3131
  declare const CONTEXT_COMPACTION_SYSTEM_PREAMBLE: string;
2518
3132
  type ContextCompactionTimelineCheckpoint = ContextCompactionCheckpoint;
2519
- declare function readContextCompactionCheckpoint(message: NcpMessage): ContextCompactionCheckpoint | null;
3133
+ declare function readContextCompactionCheckpoint(message: NcpMessage$1): ContextCompactionCheckpoint | null;
2520
3134
  declare function createContextCompactionMessageId(): string;
2521
3135
  declare function buildContextCompactionTimelineNcpMessage(params: {
2522
3136
  messageId: string;
2523
3137
  sessionId: string;
2524
3138
  checkpoint: ContextCompactionTimelineCheckpoint;
2525
- }): NcpMessage;
3139
+ }): NcpMessage$1;
2526
3140
  declare function isContextCompactionTimelineMessage(message: {
2527
3141
  metadata?: Record<string, unknown> | undefined;
2528
3142
  } | null | undefined): boolean;
2529
3143
  declare function isContextCompactionProjectionMessage(message: {
2530
3144
  metadata?: Record<string, unknown> | undefined;
2531
3145
  } | null | undefined): boolean;
2532
- declare function readLatestContextCompactionCheckpoint(sessionMessages: readonly NcpMessage[]): ContextCompactionCheckpoint | null;
3146
+ declare function readLatestContextCompactionCheckpoint(sessionMessages: readonly NcpMessage$1[]): ContextCompactionCheckpoint | null;
2533
3147
  type ContextCompactionModelProjection = {
2534
- messages: NcpMessage[];
3148
+ messages: NcpMessage$1[];
2535
3149
  stablePrefixMessageCount: number;
2536
3150
  };
2537
3151
  declare function buildContextCompactionModelProjection(params: {
2538
3152
  sessionId: string;
2539
- sessionMessages: readonly NcpMessage[];
3153
+ sessionMessages: readonly NcpMessage$1[];
2540
3154
  }): ContextCompactionModelProjection;
2541
- declare function readContextWindowEventSessionId(event: NcpEndpointEvent): string | null;
3155
+ declare function readContextWindowEventSessionId(event: NcpEndpointEvent$1): string | null;
2542
3156
  declare function isContextWindowSnapshot(value: unknown): value is Record<string, unknown>;
2543
3157
  declare function createContextWindowSignature(value: Record<string, unknown>): string;
2544
- declare function shouldRefreshContextWindowDuringStream(event: NcpEndpointEvent): boolean;
2545
- declare function shouldRefreshContextWindowImmediately(event: NcpEndpointEvent): boolean;
3158
+ declare function shouldRefreshContextWindowDuringStream(event: NcpEndpointEvent$1): boolean;
3159
+ declare function shouldRefreshContextWindowImmediately(event: NcpEndpointEvent$1): boolean;
2546
3160
  //#endregion
2547
3161
  //#region src/features/native-runtime/services/provider-manager-ncp-llm-api.service.d.ts
2548
3162
  declare class ProviderManagerNcpLLMApi implements NcpLLMApi {
@@ -2555,7 +3169,7 @@ declare class ProviderManagerNcpLLMApi implements NcpLLMApi {
2555
3169
  declare function createAssetTools(params: {
2556
3170
  assetStore: LocalAssetStore;
2557
3171
  contentBasePath?: string;
2558
- }): NcpTool[];
3172
+ }): NcpTool$1[];
2559
3173
  //#endregion
2560
3174
  //#region src/features/native-runtime/utils/nextclaw-ncp-run-context.utils.d.ts
2561
3175
  type NextclawNcpResolvedAgentProfile = {
@@ -2617,56 +3231,13 @@ declare function resolveSessionChannelContext(params: {
2617
3231
  metadata: Record<string, unknown>;
2618
3232
  };
2619
3233
  //#endregion
2620
- //#region src/features/extension-runtime/types/extension-runtime.types.d.ts
2621
- type ExtensionProcessState = "stopped" | "starting" | "running" | "stopping" | "failed";
2622
- type ExtensionLeaseReason = {
2623
- kind: "enabled-channel";
2624
- channelId: string;
2625
- } | {
2626
- kind: "auth-session";
2627
- sessionId: string;
2628
- expiresAt: string;
2629
- } | {
2630
- kind: "auth-handoff";
2631
- channelId: string;
2632
- expiresAt: string;
2633
- } | {
2634
- kind: "request";
2635
- requestId: string;
2636
- };
2637
- type ExtensionRuntimeStatus = {
2638
- extensionId: string;
2639
- generation: string | null;
2640
- lastExit: {
2641
- at: string;
2642
- code: number | null;
2643
- expected: boolean;
2644
- signal: string | null;
2645
- } | null;
2646
- leaseReasons: ExtensionLeaseReason[];
2647
- memory: {
2648
- pssBytes: number | null;
2649
- rssBytes: number | null;
2650
- } | null;
2651
- pid: number | null;
2652
- startedAt: string | null;
2653
- state: ExtensionProcessState;
2654
- startupDurationMs: number | null;
2655
- };
2656
- //#endregion
2657
- //#region src/features/extension-runtime/utils/extension-channel-catalog.utils.d.ts
2658
- declare function listExtensionChannelIds(params: {
2659
- config: Config;
2660
- workspace: string;
2661
- }): string[];
2662
- //#endregion
2663
3234
  //#region src/utils/ncp-session-message-adapter.utils.d.ts
2664
- declare function toNcpMessages(sessionId: string, messages: SessionMessage[]): NcpMessage[];
3235
+ declare function toNcpMessages(sessionId: string, messages: SessionMessage[]): NcpMessage$1[];
2665
3236
  declare function resolveLegacyEventType(message: SessionMessage): string;
2666
3237
  //#endregion
2667
3238
  //#region src/utils/ui-content-params-injection.utils.d.ts
2668
3239
  declare function getUiContentParamsBootstrapScript(): string;
2669
3240
  declare function injectUiContentParamsBootstrap(html: string): string;
2670
3241
  //#endregion
2671
- export { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, AccessLoginResult, AccessManager, AccessManagerOptions, AccessPasswordStatus, AccessPrincipal, AccessRole, AccessSessionRecord, AccessSessionState, AgentManager, AgentManagerOptions, AgentRunClient, type AgentRunReply, type AgentRunReplyOptions, AgentRunSession, type AgentRunStreamOptions, AgentRuntimeEntry, AgentRuntimeProviderRegistration, AgentRuntimeSessionRequestDispatcherOptions, AgentRuntimeSessionTypeDescribeParams, AgentRuntimeSessionTypeIcon, AgentRuntimeSessionTypeOption, AgentRuntimeSessionTypeProvider, AppDataDeleteResult, AppDataDiagnostic, AppDataEntry, AppDataError, AppDataErrorCode, AppDataLifecycle, AppDataList, AppDataManager, AppDataSource, AppPackageComponentKind, AppPackageComponentSource, AppPackageComponentView, AppPackageConflict, AppPackageError, AppPackageErrorCode, AppPackageHostTarget, AppPackageList, AppPackageManager, AppPackageOperationAction, AppPackageOperationInput, AppPackageOperationList, AppPackageOperationResult, AppPackageOperationStatus, AppPackageOperationView, AppPackageRuntimeHooks, AppPackageView, type AssetApi, AutomationManager, AutomationManagerOptions, type BuildAgentRunSendPayloadParams, BuiltinNarpRuntimeProviderService, CONTEXT_COMPACTION_CONTINUATION_TEXT, CONTEXT_COMPACTION_PROJECTION_KIND, CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, CONTEXT_COMPACTION_SYSTEM_PREAMBLE, CONTEXT_COMPACTION_TIMELINE_KIND, ChannelManager, ChannelReplyRouterDispatchParams, CommandRegistry, ConfigManager, ConfigManagerOptions, ConfigManagerRuntimeHooks, ConfigMutationResult, ContextCompactionJournalRecoveryService, ContextCompactionModelProjection, ContextCompactionPreflightBeginResult, ContextCompactionPreflightResult, ContextCompactionPreflightService, ContextCompactionTimelineCheckpoint, ContextCompactionTrigger, CreateAgentRunSessionParams, CreateInboxDeliveryInput, CreateProjectInput, DEFAULT_AGENT_RUNTIME_ENTRY_ID, DEFAULT_SERVICE_ACTION_RISK, DirectPromptDispatchParams, ExtensionLoadProgress, ExtensionLoadResult, ExtensionManager, type ExtensionRuntimeStatus, GatewayInboundLoopRuntime, GatewayInboundProcessor, InboxDeliveryError, InboxDeliveryErrorCode, InboxDeliveryManager, InboxDeliveryManagerOptions, InstallationKind, InstalledSkillDetail, InstalledSkillSummary, InstalledSkillsList, type LearningLoopRuntimeConfig, LlmProviderManager, LlmProviderRuntime, LlmUsageManager, LlmUsageManagerOptions, LlmUsageRecord, LlmUsageSnapshot, LlmUsageStats, LlmUsageStore, LlmUsageStoreOptions, LlmUsageSummary, LocalizedTextMap, MAX_INBOX_DELIVERY_CONTENT_LENGTH, McpManager, McpServiceAppRuntimeService, NARP_HTTP_RUNTIME_KIND, NARP_STDIO_RUNTIME_KIND, NEXTCLAW_TIMELINE_KIND_METADATA_KEY, NcpAgentSessionJournalStore, NextclawKernel, NextclawKernelOptions, NextclawNcpResolvedAgentProfile, NextclawNcpResolvedRunContext, NextclawNcpRunContextResolveParams, PANEL_APP_AGENT_CAPABILITIES, PROJECT_TEMPLATE_IDS, PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS, PanelAppAgentCapability, PanelAppAgentGenerateObjectInput, PanelAppAgentGenerateObjectRequest, PanelAppAgentGenerateObjectResult, PanelAppAgentRunClient, PanelAppAgentSendPayload, PanelAppAgentSendRequest, PanelAppAgentSendResult, PanelAppAssetTokenService, PanelAppBridgeSession, PanelAppCapabilityGrant, PanelAppCapabilityGrantCaller, type PanelAppClientGrant, PanelAppContent, PanelAppDeleteResult, PanelAppEntry, PanelAppError, PanelAppErrorCode, PanelAppList, PanelAppManager, type PanelAppPreferencesUpdate, PreferenceEntry, PreferenceError, PreferenceErrorCode, PreferenceJsonValue, PreferenceManager, PreferenceManagerOptions, ProductActivityKind, ProductActivitySignal, ProductActivitySink, ProductActivitySource, ProjectError, ProjectErrorCode, ProjectManager, ProjectManagerOptions, ProjectRecord, ProjectTemplate, ProjectTemplateId, ProviderManagerNcpLLMApi, ProviderModelCatalogEntry, ProviderModelCatalogManager, ProviderModelCatalogSnapshot, ProviderModelsDiscoverInput, ResolvedAgentProfile, SERVICE_APP_MANIFEST_FILE_NAME, ServiceAction, ServiceActionCaller, ServiceActionGrant, ServiceActionGrantRequest, ServiceActionGrantState, ServiceActionInvokeRequest, ServiceActionInvokeResult, ServiceActionRisk, ServiceActionRuntimeState, ServiceAppDeleteResult, ServiceAppError, type ServiceAppErrorCode, ServiceAppList, ServiceAppManager, ServiceAppManifest, ServiceAppManifestAction, ServiceAppProtocol, ServiceAppRecord, ServiceAppRuntimeStatus, SessionContextCompactionError, SessionContextCompactionErrorCode, SessionContextCompactionManager, SessionContextCompactionResult, SessionManager, SessionManagerOptions, SessionMessageCursorError, SessionMessagePage, SessionModelTokenUsage, type SessionPendingInput, type SessionQueuedInput, SessionRequestManager, SessionRequestManagerOptions, SessionSettingsError, SessionSettingsPatch, type SessionSteerQueuedInputResult, SessionTokenUsageStatus, SessionTokenUsageSummary, SessionTokenUsageTotals, SkillFrontmatter, type SkillInfo, SkillManager, type SkillScope, SystemObjectReferenceError, SystemObjectReferenceErrorCode, SystemObjectReferenceManager, SystemObjectReferenceProvider, SystemObjectReferenceSnapshotSource, UnsignedUpdateManifest, UpdateBlockReason, UpdateHostKind, UpdateManifest, UpdateManifestReader, UpdateProgress, UpdateSnapshot, UpdateStatus, type WorkspaceServiceDataOwner, buildAgentRunSendPayload, buildContextCompactionModelProjection, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildNextclawNcpRunContext, buildServiceActionId, createAgentRuntimeSessionRequestDispatcher, createAssetTools, createContextCompactionMessageId, createContextWindowSignature, createCronJobSystemObjectProvider, createInboxDeliverySystemObjectProvider, createLlmUsageRecord, describeAgentRuntimeSessionTypes, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, getAutomaticUpdateCheckDelay, getServiceActionName, getServiceAppManifestPath, getUiContentParamsBootstrapScript, getUnsignedUpdateManifest, hasLlmUsageTelemetry, injectUiContentParamsBootstrap, isAppDataError, isAppPackageError, isContextCompactionProjectionMessage, isContextCompactionTimelineMessage, isContextWindowSnapshot, isInboxDeliveryError, isPanelAppAgentCapability, isPanelAppError, isPreferenceError, isProjectError, isReplyCapableChannel, isServiceAppError, isSessionContextCompactionError, isSessionMessageCursorError, isSessionSettingsError, isSystemObjectReferenceError, listExtensionChannelIds, listServiceAppManifestActions, mergeServiceAppRuntimeActions, normalizeAgentRuntimeSessionTypeIcon, normalizeLlmUsageModel, normalizeOptionalString, parseServiceAppManifest, parseSkillFrontmatter, readContextCompactionCheckpoint, readContextWindowEventSessionId, readLatestContextCompactionCheckpoint, readLearningLoopRuntimeConfig, readMetadataModel, readMetadataThinking, readServiceAppManifest, resolveAgentRuntimeEntries, resolveAutomaticUpdateCheckIntervalMs, resolveChannelReplyRoute, resolveEffectiveModel, resolveLegacyEventType, resolveSessionChannelContext, runGatewayInboundLoop, sanitizeLlmUsage, serializeUnsignedUpdateManifest, shouldRefreshContextWindowDuringStream, shouldRefreshContextWindowImmediately, stripSkillFrontmatter, syncSessionThinkingPreference, toNcpMessages, waitForAgentRuntimeSessionReply };
3242
+ 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, AppDataDeleteResult, AppDataDiagnostic, AppDataEntry, AppDataError, AppDataErrorCode, AppDataLifecycle, AppDataList, AppDataManager, AppDataSource, type AppEventEmitOptions, type AppEventEnvelope, type AppEventHandler, type AppEventKey, AppPackageComponentKind, AppPackageComponentSource, AppPackageComponentView, AppPackageConflict, AppPackageError, AppPackageErrorCode, AppPackageHostTarget, AppPackageList, AppPackageManager, AppPackageOperationAction, AppPackageOperationInput, AppPackageOperationList, AppPackageOperationResult, AppPackageOperationStatus, AppPackageOperationView, AppPackageRuntimeHooks, AppPackageView, type AssetApi, AutomationManager, AutomationManagerOptions, BindContextInput, type BuildAgentRunSendPayloadParams, BuildContextTailInput, BuiltinNarpRuntimeProviderService, CONTEXT_COMPACTION_CONTINUATION_TEXT, CONTEXT_COMPACTION_PROJECTION_KIND, CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, CONTEXT_COMPACTION_SYSTEM_PREAMBLE, CONTEXT_COMPACTION_TIMELINE_KIND, 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, DEFAULT_AGENT_RUNTIME_ENTRY_ID, DEFAULT_SERVICE_ACTION_RISK, DirectPromptDispatchExecution, DirectPromptDispatchParams, DirectPromptDispatchResult, type Disposer, EventAdmissionPolicy, EventBus, type EventBusOptions, EventDelivery, EventSubscription, EventSubscriptionBudget, ExtensionLoadProgress, ExtensionLoadResult, ExtensionManager, type ExtensionRuntimeStatus, 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, LlmProviderManager, LlmProviderRuntime, LlmUsageManager, LlmUsageManagerOptions, LlmUsageRecord, LlmUsageSnapshot, LlmUsageStats, LlmUsageStore, LlmUsageStoreOptions, LlmUsageSummary, 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, PROJECT_TEMPLATE_IDS, PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS, PanelAppAgentCapability, PanelAppAgentGenerateObjectInput, PanelAppAgentGenerateObjectRequest, PanelAppAgentGenerateObjectResult, PanelAppAgentRunClient, PanelAppAgentSendPayload, PanelAppAgentSendRequest, PanelAppAgentSendResult, PanelAppAssetTokenService, PanelAppBridgeSession, PanelAppCapabilityGrant, PanelAppCapabilityGrantCaller, type PanelAppClientGrant, PanelAppContent, PanelAppDeleteResult, PanelAppEntry, PanelAppError, PanelAppErrorCode, PanelAppList, PanelAppManager, type PanelAppPreferencesUpdate, PreferenceEntry, PreferenceError, PreferenceErrorCode, PreferenceJsonValue, PreferenceManager, PreferenceManagerOptions, ProductActivityKind, ProductActivitySignal, ProductActivitySink, ProductActivitySource, ProjectError, ProjectErrorCode, ProjectManager, ProjectManagerOptions, ProjectRecord, ProjectTemplate, ProjectTemplateId, type ProviderCatalogPlugin, ProviderManagerNcpLLMApi, ProviderModelCatalogEntry, ProviderModelCatalogManager, ProviderModelCatalogSnapshot, ProviderModelsDiscoverInput, type ProviderSpec, ResolvedAgentProfile, SERVICE_APP_MANIFEST_FILE_NAME, ServiceAction, ServiceActionCaller, ServiceActionGrant, ServiceActionGrantRequest, ServiceActionGrantState, ServiceActionInvokeRequest, ServiceActionInvokeResult, ServiceActionRisk, ServiceActionRuntimeState, ServiceAppDeleteResult, ServiceAppError, type ServiceAppErrorCode, ServiceAppList, ServiceAppManager, ServiceAppManifest, ServiceAppManifestAction, ServiceAppProtocol, ServiceAppRecord, ServiceAppRuntimeStatus, SessionContextCompactionError, SessionContextCompactionErrorCode, SessionContextCompactionManager, SessionContextCompactionResult, SessionManager, SessionManagerOptions, SessionMessageCursorError, SessionMessagePage, SessionModelTokenUsage, type SessionPendingInput, type SessionQueuedInput, SessionRequestManager, SessionRequestManagerOptions, SessionSettingsError, SessionSettingsPatch, type SessionSteerQueuedInputResult, SessionTokenUsageStatus, SessionTokenUsageSummary, SessionTokenUsageTotals, SkillFrontmatter, type SkillInfo, SkillManager, type SkillScope, SubscribeEventsInput, SystemObjectReferenceError, SystemObjectReferenceErrorCode, SystemObjectReferenceManager, SystemObjectReferenceProvider, SystemObjectReferenceSnapshotSource, type TypedKey, TypedPredicate, UnsignedUpdateManifest, type Unsubscribe, UpdateBlockReason, UpdateHostKind, UpdateManifest, UpdateManifestReader, UpdateProgress, UpdateSnapshot, UpdateStatus, type WorkspaceServiceDataOwner, assertObservationJsonValue, assertObservationPredicate, buildAgentRunSendPayload, buildContextCompactionModelProjection, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildNextclawNcpRunContext, buildObservationEventModelMessage, buildServiceActionId, createAgentRuntimeSessionRequestDispatcher, createAssetTools, createContextCompactionMessageId, createContextWindowSignature, createCronJobSystemObjectProvider, createInboxDeliverySystemObjectProvider, createLlmUsageRecord, createTypedKey, describeAgentRuntimeSessionTypes, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, dispatchPromptOverNcpResult, evaluateObservationEventAdmission, eventKeys, getAutomaticUpdateCheckDelay, getServiceActionName, getServiceAppManifestPath, getUiContentParamsBootstrapScript, getUnsignedUpdateManifest, hasLlmUsageTelemetry, ingressKeys, injectUiContentParamsBootstrap, isAppDataError, isAppPackageError, isContextCompactionProjectionMessage, isContextCompactionTimelineMessage, isContextWindowSnapshot, isInboxDeliveryError, isPanelAppAgentCapability, isPanelAppError, isPreferenceError, isProjectError, isReplyCapableChannel, isServiceAppError, isSessionContextCompactionError, isSessionMessageCursorError, isSessionSettingsError, isSystemObjectReferenceError, listExtensionChannelIds, listServiceAppManifestActions, matchesObservationPredicate, mergeServiceAppRuntimeActions, normalizeAgentRuntimeSessionTypeIcon, normalizeLlmUsageModel, normalizeOptionalString, parseObservationDuration, parseServiceAppManifest, parseSkillFrontmatter, readContextCompactionCheckpoint, readContextWindowEventSessionId, readJsonPointer, readLatestContextCompactionCheckpoint, readLearningLoopRuntimeConfig, readMetadataModel, readMetadataThinking, readServiceAppManifest, resolveAgentRuntimeEntries, resolveAutomaticUpdateCheckIntervalMs, resolveChannelReplyRoute, resolveEffectiveModel, resolveLegacyEventType, resolveSessionChannelContext, runGatewayInboundLoop, runNextclawTask, sanitizeLlmUsage, serializeContextTail, serializeUnsignedUpdateManifest, shouldRefreshContextWindowDuringStream, shouldRefreshContextWindowImmediately, startPromptOverNcpExecution, stripSkillFrontmatter, syncSessionThinkingPreference, toBoundedJson, toNcpMessages, waitForAgentRuntimeSessionReply };
2672
3243
  //# sourceMappingURL=index.d.ts.map