@nextclaw/kernel 0.1.15-beta.6 → 0.1.15

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,9 +1,10 @@
1
1
  import { a as getUnsignedUpdateManifest, c as UpdateBlockReason, d as UpdateSnapshot, f as UpdateStatus, i as UpdateManifestReader, l as UpdatePreferences, n as UpdateHostKind, o as serializeUnsignedUpdateManifest, r as UpdateManifest, s as InstallationKind, t as UnsignedUpdateManifest, u as UpdateProgress } from "./update-manifest.types-DLWDvs_v.js";
2
- import { AgentRouteResolver, BaseChannel, ChannelManager, ChannelManager as ChannelManager$1, Config, ContextCompactionPlan, ContextWindowSnapshot, CreateSessionInput, CreatedSession, CronService, Disposable, ExtensionChannelBinding, ExtensionDiagnostic, ExtensionRegistry, ExtensionUiMetadata, GatewayController, InboundAttachment, InboundMessage, LLMProvider, LLMResponse, LLMStreamEvent, MessageBus, RequestSessionParams, RequestedSkillsMetadataReader, SearchConfig, Session, SessionManager, SessionMessage, SessionRequestDispatcher, SessionRequestRecord, SessionRequestToolResult, SessionSearchManager, SkillInfo, SkillInfo as SkillInfo$1, SkillScope, SpawnSessionAndRequestParams, ThinkingLevel, buildCompressingCompactionCheckpoint, resolveThinkingLevel } from "@nextclaw/core";
3
- import { AgentRunSendIngressPayload, EventBus, Ingress, Unsubscribe } from "@nextclaw/shared";
4
- import { ListMessagesOptions, ListSessionsOptions, NcpAgentRuntime, NcpEndpointEvent, NcpEventType, NcpLLMApi, NcpLLMApiInput, NcpLLMApiOptions, NcpMessage, NcpRunHandle, NcpSessionApi, NcpSessionPatch, NcpSessionSummary, NcpTool, OpenAIChatChunk } from "@nextclaw/ncp";
2
+ import { ListMessagesOptions, ListSessionsOptions, NcpAgentConversationStateManager, NcpAgentRuntime, NcpEndpointEvent, NcpEventType, NcpLLMApi, NcpLLMApiInput, NcpLLMApiOptions, NcpMessage, NcpMessagePart, NcpRunHandle, NcpSessionApi, NcpSessionPatch, NcpSessionSummary, NcpTool, OpenAIChatChunk } from "@nextclaw/ncp";
3
+ import { BaseChannel, ChannelManager, ChannelManager as ChannelManager$1, Config, ContextCompactionPlan, ContextWindowSnapshot, CreateSessionInput, CreatedSession, CronService, Disposable, ExtensionChannelBinding, ExtensionDiagnostic, ExtensionRegistry, ExtensionUiMetadata, GatewayController, InboundAttachment, InboundMessage, LLMProvider, LLMResponse, LLMStreamEvent, MessageBus, RequestSessionParams, RequestedSkillsMetadataReader, SearchConfig, Session, SessionMessage, SessionRequestDispatcher, SessionRequestRecord, SessionRequestToolResult, SessionSearchManager, SkillInfo, SkillInfo as SkillInfo$1, SkillScope, SpawnSessionAndRequestParams, ThinkingLevel, buildCompressingCompactionCheckpoint, resolveThinkingLevel } from "@nextclaw/core";
5
4
  import { LocalAssetStore } from "@nextclaw/ncp-agent-runtime";
5
+ import { AgentRunSendIngressPayload, EventBus, Ingress, Unsubscribe } from "@nextclaw/shared";
6
6
  import { AgentSessionRecord, ChatTarget, NcpReplyInput, RuntimeFactoryParams } from "@nextclaw/ncp-toolkit";
7
+
7
8
  //#region src/features/runtime-registry/services/agent-runtime-registry.service.d.ts
8
9
  type AgentRuntimeSessionTypeIcon = {
9
10
  kind: "image";
@@ -128,14 +129,6 @@ declare class AgentManager {
128
129
  detachTool: (agentId: AgentId, toolId: ToolId) => never;
129
130
  }
130
131
  //#endregion
131
- //#region src/managers/automation.manager.d.ts
132
- type AutomationManagerOptions = {
133
- storePath: string;
134
- };
135
- declare class AutomationManager extends CronService {
136
- constructor(options: AutomationManagerOptions);
137
- }
138
- //#endregion
139
132
  //#region src/managers/llm-provider.manager.d.ts
140
133
  type ProviderChatParams = {
141
134
  messages: Array<Record<string, unknown>>;
@@ -257,6 +250,339 @@ declare class ConfigManager {
257
250
  private createConfigMutationResult;
258
251
  }
259
252
  //#endregion
253
+ //#region src/utils/ncp-agent-session-journal.utils.d.ts
254
+ declare const NCP_AGENT_SESSION_SNAPSHOT_MESSAGE_EVENT_TYPE = "session.snapshot.message";
255
+ declare const NCP_SESSION_REQUEST_ACCEPTED_EVENT_TYPE = "session.request.accepted";
256
+ declare const NCP_SESSION_REQUEST_COMPLETED_EVENT_TYPE = "session.request.completed";
257
+ declare const NCP_SESSION_REQUEST_FAILED_EVENT_TYPE = "session.request.failed";
258
+ type NcpAgentSessionSnapshotMessageEvent = {
259
+ type: typeof NCP_AGENT_SESSION_SNAPSHOT_MESSAGE_EVENT_TYPE;
260
+ payload: Extract<NcpEndpointEvent, {
261
+ type: NcpEventType.MessageSent;
262
+ }>["payload"];
263
+ };
264
+ type NcpSessionRequestJournalEventType = typeof NCP_SESSION_REQUEST_ACCEPTED_EVENT_TYPE | typeof NCP_SESSION_REQUEST_COMPLETED_EVENT_TYPE | typeof NCP_SESSION_REQUEST_FAILED_EVENT_TYPE;
265
+ type NcpSessionRequestJournalEvent = {
266
+ type: NcpSessionRequestJournalEventType;
267
+ payload: {
268
+ sessionId: string;
269
+ request: unknown;
270
+ };
271
+ };
272
+ type NcpAgentSessionJournalReplayEvent = NcpEndpointEvent | NcpAgentSessionSnapshotMessageEvent | NcpSessionRequestJournalEvent;
273
+ //#endregion
274
+ //#region src/stores/ncp-agent-session-journal.store.d.ts
275
+ declare class NcpAgentSessionJournalStore {
276
+ private readonly journalDir;
277
+ private readonly sessions;
278
+ private readonly nextSeqBySession;
279
+ private readonly writeChains;
280
+ private readonly metadataStore;
281
+ private readonly summaryIndexStore;
282
+ constructor(journalDir: string);
283
+ appendSessionEvent: (params: {
284
+ sessionId: string;
285
+ event: NcpAgentSessionJournalReplayEvent;
286
+ }) => Promise<void>;
287
+ getSession: (sessionId: string) => Promise<AgentSessionRecord | null>;
288
+ listSessionSummaries: () => Promise<NcpSessionSummary[]>;
289
+ listSessionMessages: (sessionId: string) => Promise<NcpMessage[]>;
290
+ setSessionMetadata: (params: {
291
+ sessionId: string;
292
+ metadata: Record<string, unknown>;
293
+ }) => Promise<boolean>;
294
+ updateSessionMetadata: (params: {
295
+ sessionId: string;
296
+ metadata: Record<string, unknown>;
297
+ }) => Promise<boolean>;
298
+ private setSessionMetadataNow;
299
+ private updateSessionMetadataNow;
300
+ importSessionSnapshot: (record: AgentSessionRecord) => Promise<void>;
301
+ deleteSession: (sessionId: string) => Promise<AgentSessionRecord | null>;
302
+ hasSession: (sessionId: string) => Promise<boolean>;
303
+ private appendSessionEventNow;
304
+ private withMetadata;
305
+ private loadSession;
306
+ private parseSessionJournal;
307
+ private appendJournalEntry;
308
+ private ensureJournalDir;
309
+ private sessionPath;
310
+ }
311
+ //#endregion
312
+ //#region src/types/agent-run.types.d.ts
313
+ type ThinkingEffort = string;
314
+ type ContextBlock = string;
315
+ type AgentRunRequest = {
316
+ sessionId?: string;
317
+ peerId?: string;
318
+ message: NcpMessage;
319
+ agentRuntimeId?: string;
320
+ agentId?: string;
321
+ projectRoot?: string;
322
+ channel?: string;
323
+ correlationId?: string;
324
+ metadata?: Record<string, unknown>;
325
+ model?: string;
326
+ maxTokens?: number;
327
+ thinkingEffort?: ThinkingEffort | null;
328
+ };
329
+ type AgentRunSpec = {
330
+ runId: string;
331
+ agentId: string;
332
+ model: string;
333
+ maxTokens?: number;
334
+ thinkingEffort?: ThinkingEffort | null;
335
+ correlationId?: string;
336
+ };
337
+ type ContextProvider = {
338
+ provide: (request: AgentRunRequest) => Promise<readonly ContextBlock[]> | readonly ContextBlock[];
339
+ };
340
+ type ToolProvider = {
341
+ provide: (request: AgentRunRequest) => Promise<readonly NcpTool[]> | readonly NcpTool[];
342
+ };
343
+ //#endregion
344
+ //#region src/types/session.types.d.ts
345
+ type AgentRunSession = {
346
+ sessionId: string;
347
+ agentId?: string;
348
+ agentRuntimeId: string;
349
+ metadata: Record<string, unknown>;
350
+ model?: string;
351
+ projectRoot?: string;
352
+ thinkingEffort?: ThinkingEffort | null;
353
+ };
354
+ type CreateAgentRunSessionParams = {
355
+ sessionId?: string;
356
+ peerId?: string;
357
+ agentId?: string;
358
+ agentRuntimeId?: string;
359
+ channel?: string;
360
+ metadata?: Record<string, unknown>;
361
+ model?: string;
362
+ projectRoot?: string;
363
+ task?: string;
364
+ thinkingEffort?: ThinkingEffort | null;
365
+ };
366
+ //#endregion
367
+ //#region src/managers/session.manager.d.ts
368
+ type CreateNcpSessionInput = CreateSessionInput & {
369
+ sessionId?: string;
370
+ };
371
+ type SessionManagerOptions = {
372
+ configManager: ConfigManager;
373
+ eventBus: EventBus;
374
+ journalStore: NcpAgentSessionJournalStore;
375
+ sessionSearch: SessionSearchManager;
376
+ };
377
+ declare class SessionManager implements NcpSessionApi {
378
+ private readonly options;
379
+ readonly cleanups: Array<() => void>;
380
+ private readonly contextWindowPreview;
381
+ private started;
382
+ constructor(options: SessionManagerOptions);
383
+ start: () => void;
384
+ dispose: () => void;
385
+ createSession: (params: CreateNcpSessionInput) => Promise<CreatedSession>;
386
+ appendSessionEvent: (params: {
387
+ sessionId: string;
388
+ event: NcpAgentSessionJournalReplayEvent;
389
+ }) => Promise<void>;
390
+ setSessionMetadata: (sessionId: string, metadata: Record<string, unknown>) => Promise<boolean>;
391
+ updateSessionMetadata: (sessionId: string, metadata: Record<string, unknown>) => Promise<boolean>;
392
+ updateSession: (sessionId: string, patch: NcpSessionPatch) => Promise<NcpSessionSummary | null>;
393
+ deleteSession: (sessionId: string) => Promise<void>;
394
+ getSessionRecord: (sessionId: string) => Promise<AgentSessionRecord | null>;
395
+ listSessions: (options?: ListSessionsOptions) => Promise<NcpSessionSummary[]>;
396
+ listSessionMessages: (sessionId: string, options?: ListMessagesOptions) => Promise<NcpMessage[]>;
397
+ getSession: (sessionId: string) => Promise<NcpSessionSummary | null>;
398
+ getContextWindow: (sessionId: string, liveRecord?: AgentSessionRecord | null) => Promise<Record<string, unknown> | null>;
399
+ getAgentRunSession: (sessionId: string) => Promise<AgentRunSession>;
400
+ createAgentRunSession: (params: CreateAgentRunSessionParams) => Promise<AgentRunSession>;
401
+ getOrCreateAgentRunSession: (params: CreateAgentRunSessionParams) => Promise<AgentRunSession>;
402
+ patchSessionMetadata: (sessionId: string, patch: Record<string, unknown>) => Promise<void>;
403
+ clearSessionMessages: (sessionId: string) => Promise<number>;
404
+ publishSessionChange: (sessionKey: string) => Promise<void>;
405
+ private createSummaryFromRecord;
406
+ private publishSessionMetadataChanged;
407
+ }
408
+ //#endregion
409
+ //#region src/managers/agent-run-context-compaction.manager.d.ts
410
+ type AgentRunContextCompactionInput = {
411
+ sessionId: string;
412
+ agentId: string;
413
+ messages: readonly NcpMessage[];
414
+ metadata: Record<string, unknown>;
415
+ };
416
+ declare class AgentRunContextCompactionManager {
417
+ private readonly sessionManager;
418
+ private readonly preflightService;
419
+ constructor(configManager: ConfigManager, providerManager: LlmProviderRuntime, sessionManager: SessionManager);
420
+ runPreflight: (input: AgentRunContextCompactionInput) => Promise<readonly NcpEndpointEvent[]>;
421
+ private toEvents;
422
+ }
423
+ //#endregion
424
+ //#region src/managers/session-run.manager.d.ts
425
+ type SessionRunSnapshot = {
426
+ messages: readonly NcpMessage[];
427
+ };
428
+ type SessionRunSeed = {
429
+ sessionId: string;
430
+ messages: readonly NcpMessage[];
431
+ };
432
+ type SessionRunEventPublishMeta = {
433
+ emittedAt?: string;
434
+ source: string;
435
+ };
436
+ type SessionRunActiveRun = {
437
+ runId: string;
438
+ signal: AbortSignal;
439
+ };
440
+ declare class MessageInbox<T> {
441
+ private readonly messages;
442
+ enqueue: (message: T) => void;
443
+ drain: () => T[];
444
+ isEmpty: () => boolean;
445
+ }
446
+ declare class SessionRun {
447
+ private readonly eventBus?;
448
+ private readonly stateManager;
449
+ readonly inbox: MessageInbox<NcpMessage>;
450
+ readonly sessionId: string;
451
+ private activeRunId;
452
+ private activeRunController;
453
+ constructor(seed: SessionRunSeed, eventBus?: EventBus | undefined, stateManager?: NcpAgentConversationStateManager);
454
+ getSnapshot: () => SessionRunSnapshot;
455
+ applyEvents: (events: readonly NcpEndpointEvent[]) => Promise<void>;
456
+ applyAndPublishEvents: (events: readonly NcpEndpointEvent[], meta: SessionRunEventPublishMeta) => Promise<void>;
457
+ beginRun: () => SessionRunActiveRun;
458
+ abortRun: (runId?: string) => boolean;
459
+ isRunning: () => boolean;
460
+ dispose: () => void;
461
+ private applyRunEvents;
462
+ }
463
+ declare class SessionRunManager {
464
+ private readonly sessionManager;
465
+ private readonly eventBus?;
466
+ private readonly runs;
467
+ constructor(sessionManager: SessionManager, eventBus?: EventBus | undefined);
468
+ getSessionRun: (sessionId: string) => SessionRun | null;
469
+ isSessionRunning: (sessionId: string) => boolean;
470
+ createSessionRun: (sessionId: string) => Promise<SessionRun>;
471
+ deleteSessionRun: (sessionId: string) => boolean;
472
+ dispose: () => void;
473
+ }
474
+ //#endregion
475
+ //#region src/managers/agent-runtime.manager.d.ts
476
+ type AgentRuntimeRunOptions = {
477
+ sessionRun: SessionRun;
478
+ contextBlocks: readonly ContextBlock[];
479
+ tools: readonly NcpTool[];
480
+ signal?: AbortSignal;
481
+ };
482
+ type AgentRuntime = {
483
+ run: (spec: AgentRunSpec, options: AgentRuntimeRunOptions) => AsyncIterable<NcpEndpointEvent>;
484
+ dispose?: () => Promise<void> | void;
485
+ };
486
+ type AgentRuntimeRegistration = {
487
+ kind: string;
488
+ label: string;
489
+ defaultReuseScope: AgentRuntimeReuseScope;
490
+ createRuntime: (params: AgentRuntimeCreateParams) => AgentRuntime;
491
+ describeSessionTypeForEntry?: (params: {
492
+ entry: AgentRuntimeEntry;
493
+ describeParams?: AgentRuntimeSessionTypeDescribeParams;
494
+ }) => Promise<Omit<AgentRuntimeSessionTypeOption, "value" | "label"> | null | undefined> | Omit<AgentRuntimeSessionTypeOption, "value" | "label"> | null | undefined;
495
+ };
496
+ type AgentRuntimeReuseScope = "global" | "session";
497
+ type AgentRuntimeCreateParams = {
498
+ entry: AgentRuntimeEntry;
499
+ session: AgentRunSession;
500
+ sessionRun: SessionRun;
501
+ };
502
+ type AgentRuntimeCacheParams = {
503
+ agentRuntimeId: string;
504
+ session: AgentRunSession;
505
+ sessionRun: SessionRun;
506
+ };
507
+ declare class AgentRuntimeManager {
508
+ private readonly providers;
509
+ private readonly entries;
510
+ private readonly globalRuntimes;
511
+ private readonly sessionRuntimes;
512
+ register: (registration: AgentRuntimeRegistration) => (() => Promise<void>);
513
+ applyEntries: (entries: readonly AgentRuntimeEntry[]) => void;
514
+ getOrCreate: (params: AgentRuntimeCacheParams) => AgentRuntime;
515
+ listSessionTypes: (_params?: AgentRuntimeSessionTypeDescribeParams) => Promise<{
516
+ defaultType: string;
517
+ options: AgentRuntimeSessionTypeOption[];
518
+ }>;
519
+ dispose: () => Promise<void>;
520
+ private normalizeId;
521
+ private getEntry;
522
+ private getProvider;
523
+ private resolveReuseScope;
524
+ private disposeAllRuntimes;
525
+ }
526
+ //#endregion
527
+ //#region src/managers/context-provider.manager.d.ts
528
+ declare class ContextProviderManager {
529
+ private readonly providers;
530
+ register: (provider: ContextProvider) => (() => void);
531
+ buildContext: (request: AgentRunRequest) => Promise<readonly ContextBlock[]>;
532
+ dispose: () => void;
533
+ }
534
+ //#endregion
535
+ //#region src/managers/tool-provider.manager.d.ts
536
+ type ToolRunContext = {
537
+ agentId: string;
538
+ channel: string;
539
+ chatId: string;
540
+ config: Config;
541
+ execTimeoutSeconds: number;
542
+ handoffDepth: number;
543
+ metadata: Record<string, unknown>;
544
+ restrictToWorkspace: boolean;
545
+ searchConfig: SearchConfig;
546
+ sessionId: string;
547
+ workspace: string;
548
+ };
549
+ declare class ToolProviderManager {
550
+ private readonly providers;
551
+ register: (provider: ToolProvider) => (() => void);
552
+ buildTools: (request: AgentRunRequest) => Promise<readonly NcpTool[]>;
553
+ dispose: () => void;
554
+ }
555
+ //#endregion
556
+ //#region src/managers/agent-run-request.manager.d.ts
557
+ declare class AgentRunRequestManager {
558
+ private readonly agentRuntimeManager;
559
+ private readonly configManager;
560
+ private readonly contextProviderManager;
561
+ private readonly eventBus;
562
+ private readonly ingress;
563
+ private readonly sessionManager;
564
+ private readonly sessionRunManager;
565
+ private readonly toolProviderManager;
566
+ readonly cleanups: Array<() => void>;
567
+ private started;
568
+ constructor(agentRuntimeManager: AgentRuntimeManager, configManager: ConfigManager, contextProviderManager: ContextProviderManager, eventBus: EventBus, ingress: Ingress, sessionManager: SessionManager, sessionRunManager: SessionRunManager, toolProviderManager: ToolProviderManager);
569
+ start: () => void;
570
+ dispose: () => void;
571
+ private handleSendRequest;
572
+ private handleAbortRequest;
573
+ private handleSessionMessageRequest;
574
+ private send;
575
+ private abort;
576
+ }
577
+ //#endregion
578
+ //#region src/managers/automation.manager.d.ts
579
+ type AutomationManagerOptions = {
580
+ storePath: string;
581
+ };
582
+ declare class AutomationManager extends CronService {
583
+ constructor(options: AutomationManagerOptions);
584
+ }
585
+ //#endregion
260
586
  //#region src/managers/extension.manager.d.ts
261
587
  type ExtensionLoadProgress = {
262
588
  extensionId: string;
@@ -417,99 +743,6 @@ declare class McpManager {
417
743
  private prewarmEnabledServersSafely;
418
744
  }
419
745
  //#endregion
420
- //#region src/utils/ncp-agent-session-journal.utils.d.ts
421
- declare const NCP_AGENT_SESSION_SNAPSHOT_MESSAGE_EVENT_TYPE = "session.snapshot.message";
422
- declare const NCP_SESSION_REQUEST_ACCEPTED_EVENT_TYPE = "session.request.accepted";
423
- declare const NCP_SESSION_REQUEST_COMPLETED_EVENT_TYPE = "session.request.completed";
424
- declare const NCP_SESSION_REQUEST_FAILED_EVENT_TYPE = "session.request.failed";
425
- type NcpAgentSessionSnapshotMessageEvent = {
426
- type: typeof NCP_AGENT_SESSION_SNAPSHOT_MESSAGE_EVENT_TYPE;
427
- payload: Extract<NcpEndpointEvent, {
428
- type: NcpEventType.MessageSent;
429
- }>["payload"];
430
- };
431
- type NcpSessionRequestJournalEventType = typeof NCP_SESSION_REQUEST_ACCEPTED_EVENT_TYPE | typeof NCP_SESSION_REQUEST_COMPLETED_EVENT_TYPE | typeof NCP_SESSION_REQUEST_FAILED_EVENT_TYPE;
432
- type NcpSessionRequestJournalEvent = {
433
- type: NcpSessionRequestJournalEventType;
434
- payload: {
435
- sessionId: string;
436
- request: unknown;
437
- };
438
- };
439
- type NcpAgentSessionJournalReplayEvent = NcpEndpointEvent | NcpAgentSessionSnapshotMessageEvent | NcpSessionRequestJournalEvent;
440
- //#endregion
441
- //#region src/stores/ncp-agent-session-journal.store.d.ts
442
- declare class NcpAgentSessionJournalStore {
443
- private readonly journalDir;
444
- private readonly sessions;
445
- private readonly nextSeqBySession;
446
- private readonly writeChains;
447
- private readonly metadataStore;
448
- private readonly summaryIndexStore;
449
- constructor(journalDir: string);
450
- appendSessionEvent: (params: {
451
- sessionId: string;
452
- event: NcpAgentSessionJournalReplayEvent;
453
- }) => Promise<void>;
454
- getSession: (sessionId: string) => Promise<AgentSessionRecord | null>;
455
- listSessionSummaries: () => Promise<NcpSessionSummary[]>;
456
- listSessionMessages: (sessionId: string) => Promise<NcpMessage[]>;
457
- setSessionMetadata: (params: {
458
- sessionId: string;
459
- metadata: Record<string, unknown>;
460
- }) => Promise<boolean>;
461
- updateSessionMetadata: (params: {
462
- sessionId: string;
463
- metadata: Record<string, unknown>;
464
- }) => Promise<boolean>;
465
- private setSessionMetadataNow;
466
- private updateSessionMetadataNow;
467
- importSessionSnapshot: (record: AgentSessionRecord) => Promise<void>;
468
- deleteSession: (sessionId: string) => Promise<AgentSessionRecord | null>;
469
- hasSession: (sessionId: string) => Promise<boolean>;
470
- private appendSessionEventNow;
471
- private withMetadata;
472
- private loadSession;
473
- private parseSessionJournal;
474
- private appendJournalEntry;
475
- private ensureJournalDir;
476
- private sessionPath;
477
- }
478
- //#endregion
479
- //#region src/managers/ncp-session.manager.d.ts
480
- type CreateNcpSessionInput = CreateSessionInput & {
481
- sessionId?: string;
482
- };
483
- type NcpSessionManagerOptions = {
484
- configManager: ConfigManager;
485
- eventBus: EventBus;
486
- journalStore: NcpAgentSessionJournalStore;
487
- sessionSearch: SessionSearchManager;
488
- };
489
- declare class NcpSessionManager implements NcpSessionApi {
490
- private readonly options;
491
- private readonly contextWindowPreview;
492
- constructor(options: NcpSessionManagerOptions);
493
- dispose: () => void;
494
- createSession: (params: CreateNcpSessionInput) => Promise<CreatedSession>;
495
- appendSessionEvent: (params: {
496
- sessionId: string;
497
- event: NcpAgentSessionJournalReplayEvent;
498
- }) => Promise<void>;
499
- setSessionMetadata: (sessionId: string, metadata: Record<string, unknown>) => Promise<boolean>;
500
- updateSessionMetadata: (sessionId: string, metadata: Record<string, unknown>) => Promise<boolean>;
501
- updateSession: (sessionId: string, patch: NcpSessionPatch) => Promise<NcpSessionSummary | null>;
502
- deleteSession: (sessionId: string) => Promise<void>;
503
- getSessionRecord: (sessionId: string) => Promise<AgentSessionRecord | null>;
504
- listSessions: (options?: ListSessionsOptions) => Promise<NcpSessionSummary[]>;
505
- listSessionMessages: (sessionId: string, options?: ListMessagesOptions) => Promise<NcpMessage[]>;
506
- getSession: (sessionId: string) => Promise<NcpSessionSummary | null>;
507
- getContextWindow: (sessionId: string, liveRecord?: AgentSessionRecord | null) => Promise<Record<string, unknown> | null>;
508
- publishSessionChange: (sessionKey: string) => Promise<void>;
509
- private createSummaryFromRecord;
510
- private publishSessionMetadataChanged;
511
- }
512
- //#endregion
513
746
  //#region src/stores/panel-app-state.store.d.ts
514
747
  type PanelAppPreferencesUpdate = {
515
748
  favorite?: boolean;
@@ -589,15 +822,81 @@ type ServiceActionGrantRequest = {
589
822
  declaredActions: string[];
590
823
  };
591
824
  //#endregion
825
+ //#region src/types/panel-app.types.d.ts
826
+ type PanelAppErrorCode = "AGENT_OBJECT_REQUEST_FAILED" | "AGENT_OBJECT_RESULT_NOT_SUBMITTED" | "AGENT_OBJECT_RESULT_SCHEMA_INVALID" | "AGENT_OBJECT_RESULT_TIMEOUT" | "AUTHORIZATION_REQUIRED" | "PANEL_APP_AGENT_REQUEST_INVALID" | "PANEL_APP_BRIDGE_SESSION_NOT_FOUND" | "PANEL_APP_CAPABILITY_NOT_DECLARED" | "PANEL_APP_INVALID_ASSET_PATH" | "PANEL_APP_INVALID_ID" | "PANEL_APP_MANIFEST_INVALID" | "PANEL_APP_NOT_FOUND" | "PANEL_APP_READ_FAILED";
827
+ declare class PanelAppError extends Error {
828
+ readonly code: PanelAppErrorCode;
829
+ constructor(code: PanelAppErrorCode, message: string);
830
+ }
831
+ declare function isPanelAppError(error: unknown): error is PanelAppError;
832
+ declare const PANEL_APP_AGENT_CAPABILITIES: readonly ["agent:send", "agent:generateObject"];
833
+ type PanelAppAgentCapability = typeof PANEL_APP_AGENT_CAPABILITIES[number];
834
+ declare function isPanelAppAgentCapability(value: unknown): value is PanelAppAgentCapability;
835
+ type PanelAppCapabilityGrantCaller = {
836
+ surface: "panel-app";
837
+ appId: string;
838
+ };
839
+ type PanelAppCapabilityGrant = {
840
+ caller: PanelAppCapabilityGrantCaller;
841
+ capability: PanelAppAgentCapability;
842
+ grantedAt: string;
843
+ };
844
+ type PanelAppAgentSendPayload = {
845
+ sessionId?: string;
846
+ peerId?: string;
847
+ content: NcpMessagePart[];
848
+ message?: never;
849
+ metadata?: Record<string, unknown>;
850
+ } | {
851
+ sessionId?: string;
852
+ peerId?: string;
853
+ message: NcpMessage | (Omit<NcpMessage, "sessionId"> & {
854
+ sessionId?: string;
855
+ });
856
+ content?: never;
857
+ metadata?: Record<string, unknown>;
858
+ };
859
+ type PanelAppAgentSendRequest = {
860
+ payload: PanelAppAgentSendPayload;
861
+ };
862
+ type PanelAppAgentSendResult = NcpRunHandle;
863
+ type PanelAppAgentRunClient = {
864
+ send: (input: AgentRunSendIngressPayload) => Promise<NcpRunHandle>;
865
+ sendAndStreamEvents: (input: AgentRunSendIngressPayload) => AsyncGenerator<NcpEndpointEvent>;
866
+ };
867
+ type PanelAppAgentGenerateObjectInput = {
868
+ peerId: string;
869
+ prompt: string;
870
+ context?: unknown;
871
+ schema: Record<string, unknown>;
872
+ title?: string;
873
+ timeoutMs?: number;
874
+ };
875
+ type PanelAppAgentGenerateObjectRequest = {
876
+ input: PanelAppAgentGenerateObjectInput;
877
+ };
878
+ type PanelAppAgentGenerateObjectResult = {
879
+ result: unknown;
880
+ };
881
+ //#endregion
882
+ //#region src/utils/panel-app-source.utils.d.ts
883
+ type PanelAppAssetContentType = "application/javascript; charset=utf-8" | "application/json; charset=utf-8" | "application/octet-stream" | "image/png" | "image/svg+xml; charset=utf-8" | "image/webp" | "text/css; charset=utf-8" | "text/plain; charset=utf-8";
884
+ type PanelAppAsset = {
885
+ content: Buffer;
886
+ contentType: PanelAppAssetContentType;
887
+ };
888
+ //#endregion
592
889
  //#region src/managers/panel-app.manager.d.ts
593
890
  declare const PANEL_APP_CONTENT_TYPE: "text/html; charset=utf-8";
594
891
  type PanelAppEntry = {
595
892
  id: string;
596
893
  fileName: string;
894
+ kind: "single-file" | "folder";
597
895
  title: string;
598
896
  description?: string;
599
897
  icon?: string;
600
898
  contentPath: string;
899
+ createdAt: string;
601
900
  updatedAt: string;
602
901
  sizeBytes: number;
603
902
  favorite: boolean;
@@ -614,32 +913,39 @@ type PanelAppContent = {
614
913
  fileName: string;
615
914
  html: string;
616
915
  contentType: typeof PANEL_APP_CONTENT_TYPE;
916
+ capabilities: string[];
617
917
  serviceActions: string[];
618
918
  };
919
+ type PanelAppDeleteResult = {
920
+ deleted: true;
921
+ fileName: string;
922
+ id: string;
923
+ };
619
924
  type PanelAppBridgeSession = {
620
925
  id: string;
621
926
  token: string;
622
927
  panelAppId: string;
623
928
  tabId: string;
624
929
  caller: ServiceActionCaller;
930
+ declaredCapabilities: string[];
625
931
  declaredActions: string[];
626
932
  createdAt: string;
627
933
  expiresAt: string;
628
934
  };
629
- type PanelAppErrorCode = "PANEL_APP_BRIDGE_SESSION_NOT_FOUND" | "PANEL_APP_INVALID_ID" | "PANEL_APP_NOT_FOUND" | "PANEL_APP_READ_FAILED";
630
- declare class PanelAppError extends Error {
631
- readonly code: PanelAppErrorCode;
632
- constructor(code: PanelAppErrorCode, message: string);
633
- }
634
- declare function isPanelAppError(error: unknown): error is PanelAppError;
635
935
  declare class PanelAppManager {
636
936
  private readonly params;
637
937
  private readonly bridgeSessions;
938
+ private readonly agentRunClient;
939
+ private readonly sourceService;
638
940
  constructor(params: {
941
+ agentRunClient?: PanelAppAgentRunClient;
639
942
  configManager: ConfigManager;
943
+ eventBus?: EventBus;
944
+ ingress?: Ingress;
640
945
  });
641
946
  listPanelApps: () => Promise<PanelAppList>;
642
947
  getPanelAppContent: (id: string) => Promise<PanelAppContent>;
948
+ getPanelAppAsset: (id: string, assetPath: string) => Promise<PanelAppAsset>;
643
949
  getPanelAppBridgeScript: () => string;
644
950
  createPanelAppBridgeSession: (params: {
645
951
  id: string;
@@ -647,21 +953,25 @@ declare class PanelAppManager {
647
953
  }) => Promise<PanelAppBridgeSession>;
648
954
  resolvePanelAppBridgeSession: (token: string) => PanelAppBridgeSession;
649
955
  deletePanelAppBridgeSession: (token: string) => void;
956
+ sendAgentMessage: (bridgeSessionToken: string, payload: PanelAppAgentSendPayload) => Promise<PanelAppAgentSendResult>;
957
+ generateAgentObject: (bridgeSessionToken: string, input: PanelAppAgentGenerateObjectInput) => Promise<PanelAppAgentGenerateObjectResult>;
958
+ grantAgentCapability: (bridgeSessionToken: string, capability: PanelAppAgentCapability) => Promise<PanelAppCapabilityGrant>;
650
959
  updatePanelAppPreferences: (id: string, preferences: PanelAppPreferencesUpdate) => Promise<PanelAppEntry>;
651
960
  recordPanelAppOpened: (id: string) => Promise<PanelAppEntry>;
961
+ deletePanelApp: (id: string) => Promise<PanelAppDeleteResult>;
962
+ private assertAgentCapabilityGranted;
963
+ private assertDeclaredCapability;
964
+ private describeMissingAgentCapability;
965
+ private requireAgentRunClient;
652
966
  private getWorkspacePath;
653
967
  private getPanelsPath;
654
968
  private createStateStore;
655
- private listPanelAppFileNames;
969
+ private createCapabilityGrantStore;
656
970
  private buildPanelAppEntry;
657
971
  private resolvePanelAppFileName;
658
- private encodePanelAppId;
659
- private decodePanelAppId;
660
- private isPanelAppFileName;
661
- private toPanelAppTitle;
662
972
  private comparePanelApps;
663
- private compareIsoDesc;
664
973
  private deleteExpiredBridgeSessions;
974
+ private deleteBridgeSessionsByPanelAppId;
665
975
  private isMissingFileError;
666
976
  }
667
977
  //#endregion
@@ -829,7 +1139,7 @@ declare class SkillManager {
829
1139
  //#region src/features/session-request/managers/session-request.manager.d.ts
830
1140
  type SessionRequestManagerOptions = {
831
1141
  dispatcher: SessionRequestDispatcher;
832
- ncpSessionManager: NcpSessionManager;
1142
+ sessionManager: SessionManager;
833
1143
  };
834
1144
  declare class SessionRequestManager {
835
1145
  private readonly options;
@@ -892,7 +1202,6 @@ declare class NextclawKernel {
892
1202
  readonly llmUsage: LlmUsageManager;
893
1203
  readonly configManager: ConfigManager;
894
1204
  readonly agents: AgentManager;
895
- readonly sessions: SessionManager;
896
1205
  readonly control: NextclawKernelControlManager<unknown, unknown, unknown>;
897
1206
  readonly skills: SkillManager;
898
1207
  readonly automation: AutomationManager;
@@ -901,13 +1210,17 @@ declare class NextclawKernel {
901
1210
  readonly sessionSearch: SessionSearchManager;
902
1211
  readonly assetStore: LocalAssetStore;
903
1212
  readonly mcpManager: McpManager;
904
- readonly ncpSessionManager: NcpSessionManager;
1213
+ readonly sessionManager: SessionManager;
905
1214
  readonly panelAppManager: PanelAppManager;
906
1215
  readonly serviceAppManager: ServiceAppManager;
907
1216
  readonly extensions: ExtensionManager;
1217
+ readonly agentRuntimeManager: AgentRuntimeManager;
1218
+ readonly contextCompactionManager: AgentRunContextCompactionManager;
1219
+ readonly contextProviderManager: ContextProviderManager;
1220
+ readonly sessionRunManager: SessionRunManager;
1221
+ readonly toolProviderManager: ToolProviderManager;
1222
+ readonly agentRunRequestManager: AgentRunRequestManager;
908
1223
  private readonly ncpAgentSessionJournalStore;
909
- private readonly kernelBranch;
910
- private readonly agentRunContribution;
911
1224
  private readonly contributions;
912
1225
  private gatewayController;
913
1226
  constructor(options?: NextclawKernelOptions);
@@ -944,22 +1257,28 @@ declare class BuiltinNarpRuntimeProviderService {
944
1257
  private createStdioRuntime;
945
1258
  }
946
1259
  //#endregion
947
- //#region src/features/agent-run/managers/tool-provider.manager.d.ts
948
- type ToolRunContext = {
949
- agentId: string;
950
- channel: string;
951
- chatId: string;
952
- config: Config;
953
- execTimeoutSeconds: number;
954
- handoffDepth: number;
955
- metadata: Record<string, unknown>;
956
- restrictToWorkspace: boolean;
957
- searchConfig: SearchConfig;
1260
+ //#region src/utils/agent-run-send-payload.utils.d.ts
1261
+ type AssetApi = {
1262
+ putBytes: (input: {
1263
+ fileName: string;
1264
+ mimeType?: string | null;
1265
+ bytes: Uint8Array;
1266
+ createdAt?: Date;
1267
+ }) => Promise<{
1268
+ uri: string;
1269
+ }>;
1270
+ resolveContentPath?: (uri: string) => string | null;
1271
+ };
1272
+ type BuildAgentRunSendPayloadParams = {
958
1273
  sessionId: string;
959
- workspace: string;
1274
+ content: string;
1275
+ attachments?: InboundAttachment[];
1276
+ metadata?: Record<string, unknown>;
1277
+ assetApi?: AssetApi;
960
1278
  };
1279
+ declare function buildAgentRunSendPayload(params: BuildAgentRunSendPayloadParams): Promise<AgentRunSendIngressPayload>;
961
1280
  //#endregion
962
- //#region src/features/agent-run/services/agent-run-client.service.d.ts
1281
+ //#region src/services/agent-run-client.service.d.ts
963
1282
  type AgentRunReplyOptions = {
964
1283
  abortSignal?: AbortSignal;
965
1284
  onAssistantDelta?: (delta: string) => void;
@@ -989,27 +1308,6 @@ declare class AgentRunClient {
989
1308
  private sendWithCorrelation;
990
1309
  }
991
1310
  //#endregion
992
- //#region src/features/agent-run/utils/agent-run-send-payload.utils.d.ts
993
- type AssetApi = {
994
- putBytes: (input: {
995
- fileName: string;
996
- mimeType?: string | null;
997
- bytes: Uint8Array;
998
- createdAt?: Date;
999
- }) => Promise<{
1000
- uri: string;
1001
- }>;
1002
- resolveContentPath?: (uri: string) => string | null;
1003
- };
1004
- type BuildAgentRunSendPayloadParams = {
1005
- sessionId: string;
1006
- content: string;
1007
- attachments?: InboundAttachment[];
1008
- metadata?: Record<string, unknown>;
1009
- assetApi?: AssetApi;
1010
- };
1011
- declare function buildAgentRunSendPayload(params: BuildAgentRunSendPayloadParams): Promise<AgentRunSendIngressPayload>;
1012
- //#endregion
1013
1311
  //#region src/features/ncp-dispatch/services/gateway-inbound-processor.service.d.ts
1014
1312
  type GatewayInboundLoopRuntime = {
1015
1313
  kernel: {
@@ -1081,6 +1379,53 @@ type DirectPromptDispatchParams = {
1081
1379
  };
1082
1380
  declare function dispatchPromptOverNcp(params: DirectPromptDispatchParams): Promise<string>;
1083
1381
  //#endregion
1382
+ //#region src/services/command-registry.service.d.ts
1383
+ type CommandOptionType = "string" | "boolean" | "number";
1384
+ type CommandOption = {
1385
+ name: string;
1386
+ description: string;
1387
+ type: CommandOptionType;
1388
+ required?: boolean;
1389
+ };
1390
+ type CommandExecutionContext = {
1391
+ channel: string;
1392
+ chatId: string;
1393
+ senderId: string;
1394
+ sessionKey?: string;
1395
+ };
1396
+ type CommandResult = {
1397
+ content: string;
1398
+ ephemeral?: boolean;
1399
+ };
1400
+ type ParsedTextCommand = {
1401
+ name: string;
1402
+ args: Record<string, unknown>;
1403
+ };
1404
+ type SlashCommandSpec = {
1405
+ name: string;
1406
+ description: string;
1407
+ options?: CommandOption[];
1408
+ };
1409
+ declare class CommandRegistry {
1410
+ private readonly config;
1411
+ private readonly sessionManager?;
1412
+ private readonly specs;
1413
+ private readonly lookup;
1414
+ constructor(config: Config, sessionManager?: SessionManager | undefined);
1415
+ listSlashCommands: () => SlashCommandSpec[];
1416
+ execute: (name: string, args: Record<string, unknown> | undefined, ctx: CommandExecutionContext) => Promise<CommandResult>;
1417
+ parseTextCommand: (input: string) => ParsedTextCommand | null;
1418
+ executeText: (input: string, ctx: CommandExecutionContext) => Promise<CommandResult | null>;
1419
+ private registerDefaults;
1420
+ private register;
1421
+ private buildHelpText;
1422
+ private getOrCreateCommandSession;
1423
+ private resolveSessionModel;
1424
+ private resolveSessionThinking;
1425
+ private parseTextArgs;
1426
+ private parseTextOptionValue;
1427
+ }
1428
+ //#endregion
1084
1429
  //#region src/features/context-compaction/managers/context-compaction.manager.d.ts
1085
1430
  declare class ContextWindowPreviewManager {
1086
1431
  private readonly options;
@@ -1288,5 +1633,5 @@ type SkillRecord = {
1288
1633
  metadata: Record<string, unknown>;
1289
1634
  };
1290
1635
  //#endregion
1291
- export { AgentId, AgentManager, AgentRecord, AgentRunClient, type AgentRunReply, type AgentRunReplyOptions, type AgentRunStreamOptions, AgentRuntimeEntry, AgentRuntimeProviderRegistration, AgentRuntimeRegistry, AgentRuntimeSessionRequestDispatcherOptions, AgentRuntimeSessionTypeDescribeParams, AgentRuntimeSessionTypeIcon, AgentRuntimeSessionTypeOption, type AssetApi, AutomationId, AutomationManager, AutomationManagerOptions, type BuildAgentRunSendPayloadParams, BuiltinNarpRuntimeProviderService, CONTEXT_COMPACTION_TIMELINE_KIND, ChannelId, ChannelManager, ChannelReplyRouterDispatchParams, ConfigManager, ConfigManagerOptions, ConfigManagerRuntimeHooks, ConfigMutationResult, ContextCompactionPreflightBeginResult, ContextCompactionPreflightResult, ContextCompactionPreflightService, ContextCompactionTimelineCheckpoint, ContextWindowPreviewManager, DEFAULT_AGENT_RUNTIME_ENTRY_ID, DirectPromptDispatchParams, ExtensionLoadProgress, ExtensionLoadResult, ExtensionManager, GatewayInboundLoopRuntime, GatewayInboundProcessor, InstallationKind, InstalledSkillDetail, InstalledSkillSummary, InstalledSkillsList, type LearningLoopRuntimeConfig, LlmProviderManager, LlmProviderRuntime, LlmUsageManager, LlmUsageManagerOptions, LlmUsageRecord, LlmUsageSnapshot, LlmUsageStats, LlmUsageStore, LlmUsageStoreOptions, LlmUsageSummary, LocalizedTextMap, McpManager, NARP_HTTP_RUNTIME_KIND, NARP_STDIO_RUNTIME_KIND, NEXTCLAW_TIMELINE_KIND_METADATA_KEY, NcpAgentSessionJournalStore, NcpSessionManager, NcpSessionManagerOptions, NextclawKernel, NextclawKernelOptions, NextclawNcpResolvedAgentProfile, NextclawNcpResolvedRunContext, NextclawNcpRunContextParams, PanelAppBridgeSession, PanelAppContent, PanelAppEntry, PanelAppError, PanelAppErrorCode, PanelAppList, PanelAppManager, type PanelAppPreferencesUpdate, ProviderManagerNcpLLMApi, ServiceAction, ServiceActionCaller, ServiceActionGrant, ServiceActionGrantRequest, ServiceActionGrantState, ServiceActionInvokeRequest, ServiceActionInvokeResult, ServiceActionRisk, ServiceActionRuntimeState, ServiceAppError, ServiceAppErrorCode, ServiceAppList, ServiceAppManager, ServiceAppManifest, ServiceAppManifestAction, ServiceAppProtocol, ServiceAppRecord, ServiceAppRuntimeStatus, SessionId, SessionRequestManager, SessionRequestManagerOptions, SkillFrontmatter, SkillId, type SkillInfo, SkillManager, SkillRecord, type SkillScope, TaskId, ToolId, ToolRecord, UnsignedUpdateManifest, UpdateBlockReason, UpdateHostKind, UpdateManifest, UpdateManifestReader, UpdatePreferences, UpdateProgress, UpdateSnapshot, UpdateStatus, buildAgentRunSendPayload, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildSessionOrchestrationSection, createAgentRuntimeSessionRequestDispatcher, createAssetTools, createContextWindowSignature, createLlmUsageRecord, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, getUnsignedUpdateManifest, hasLlmUsageTelemetry, isContextCompactionTimelineMessage, isContextWindowSnapshot, isPanelAppError, isReplyCapableChannel, isServiceAppError, listExtensionChannelIds, normalizeAgentRuntimeSessionTypeIcon, normalizeLlmUsageModel, normalizeOptionalString, parseSkillFrontmatter, projectNcpMessagesWithContextCompaction, readContextWindowEventSessionId, readLearningLoopRuntimeConfig, readMetadataModel, readMetadataThinking, resolveAgentRuntimeEntries, resolveChannelReplyRoute, resolveEffectiveModel, resolveLegacyEventType, resolveNextclawNcpRunContext, resolveSessionChannelContext, runGatewayInboundLoop, sanitizeLlmUsage, serializeUnsignedUpdateManifest, shouldRefreshContextWindowDuringStream, shouldRefreshContextWindowImmediately, stripSkillFrontmatter, syncSessionThinkingPreference, toNcpMessages, upsertContextCompactionTimelineMessage, waitForAgentRuntimeSessionReply };
1636
+ export { AgentId, AgentManager, AgentRecord, AgentRunClient, type AgentRunReply, type AgentRunReplyOptions, AgentRunSession, type AgentRunStreamOptions, AgentRuntimeEntry, AgentRuntimeProviderRegistration, AgentRuntimeRegistry, AgentRuntimeSessionRequestDispatcherOptions, AgentRuntimeSessionTypeDescribeParams, AgentRuntimeSessionTypeIcon, AgentRuntimeSessionTypeOption, type AssetApi, AutomationId, AutomationManager, AutomationManagerOptions, type BuildAgentRunSendPayloadParams, BuiltinNarpRuntimeProviderService, CONTEXT_COMPACTION_TIMELINE_KIND, ChannelId, ChannelManager, ChannelReplyRouterDispatchParams, CommandRegistry, ConfigManager, ConfigManagerOptions, ConfigManagerRuntimeHooks, ConfigMutationResult, ContextCompactionPreflightBeginResult, ContextCompactionPreflightResult, ContextCompactionPreflightService, ContextCompactionTimelineCheckpoint, ContextWindowPreviewManager, CreateAgentRunSessionParams, DEFAULT_AGENT_RUNTIME_ENTRY_ID, DirectPromptDispatchParams, ExtensionLoadProgress, ExtensionLoadResult, ExtensionManager, GatewayInboundLoopRuntime, GatewayInboundProcessor, InstallationKind, InstalledSkillDetail, InstalledSkillSummary, InstalledSkillsList, type LearningLoopRuntimeConfig, LlmProviderManager, LlmProviderRuntime, LlmUsageManager, LlmUsageManagerOptions, LlmUsageRecord, LlmUsageSnapshot, LlmUsageStats, LlmUsageStore, LlmUsageStoreOptions, LlmUsageSummary, LocalizedTextMap, McpManager, NARP_HTTP_RUNTIME_KIND, NARP_STDIO_RUNTIME_KIND, NEXTCLAW_TIMELINE_KIND_METADATA_KEY, NcpAgentSessionJournalStore, NextclawKernel, NextclawKernelOptions, NextclawNcpResolvedAgentProfile, NextclawNcpResolvedRunContext, NextclawNcpRunContextParams, PANEL_APP_AGENT_CAPABILITIES, PanelAppAgentCapability, PanelAppAgentGenerateObjectInput, PanelAppAgentGenerateObjectRequest, PanelAppAgentGenerateObjectResult, PanelAppAgentRunClient, PanelAppAgentSendPayload, PanelAppAgentSendRequest, PanelAppAgentSendResult, PanelAppBridgeSession, PanelAppCapabilityGrant, PanelAppCapabilityGrantCaller, PanelAppContent, PanelAppDeleteResult, PanelAppEntry, PanelAppError, PanelAppErrorCode, PanelAppList, PanelAppManager, type PanelAppPreferencesUpdate, ProviderManagerNcpLLMApi, ServiceAction, ServiceActionCaller, ServiceActionGrant, ServiceActionGrantRequest, ServiceActionGrantState, ServiceActionInvokeRequest, ServiceActionInvokeResult, ServiceActionRisk, ServiceActionRuntimeState, ServiceAppError, ServiceAppErrorCode, ServiceAppList, ServiceAppManager, ServiceAppManifest, ServiceAppManifestAction, ServiceAppProtocol, ServiceAppRecord, ServiceAppRuntimeStatus, SessionId, SessionManager, SessionManagerOptions, SessionRequestManager, SessionRequestManagerOptions, SkillFrontmatter, SkillId, type SkillInfo, SkillManager, SkillRecord, type SkillScope, TaskId, ToolId, ToolRecord, UnsignedUpdateManifest, UpdateBlockReason, UpdateHostKind, UpdateManifest, UpdateManifestReader, UpdatePreferences, UpdateProgress, UpdateSnapshot, UpdateStatus, buildAgentRunSendPayload, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildSessionOrchestrationSection, createAgentRuntimeSessionRequestDispatcher, createAssetTools, createContextWindowSignature, createLlmUsageRecord, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, getUnsignedUpdateManifest, hasLlmUsageTelemetry, isContextCompactionTimelineMessage, isContextWindowSnapshot, isPanelAppAgentCapability, isPanelAppError, isReplyCapableChannel, isServiceAppError, listExtensionChannelIds, normalizeAgentRuntimeSessionTypeIcon, normalizeLlmUsageModel, normalizeOptionalString, parseSkillFrontmatter, projectNcpMessagesWithContextCompaction, readContextWindowEventSessionId, readLearningLoopRuntimeConfig, readMetadataModel, readMetadataThinking, resolveAgentRuntimeEntries, resolveChannelReplyRoute, resolveEffectiveModel, resolveLegacyEventType, resolveNextclawNcpRunContext, resolveSessionChannelContext, runGatewayInboundLoop, sanitizeLlmUsage, serializeUnsignedUpdateManifest, shouldRefreshContextWindowDuringStream, shouldRefreshContextWindowImmediately, stripSkillFrontmatter, syncSessionThinkingPreference, toNcpMessages, upsertContextCompactionTimelineMessage, waitForAgentRuntimeSessionReply };
1292
1637
  //# sourceMappingURL=index.d.ts.map