@nextclaw/kernel 0.6.12 → 0.6.13

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.js CHANGED
@@ -436,7 +436,7 @@ var ContextCompactionPreflightService = class {
436
436
  });
437
437
  };
438
438
  begin = (params) => {
439
- const { contextBlocks = [], inputMessages, model, requestMetadata, sessionId, sessionMessages, storedAgentId, storedMetadata } = params;
439
+ const { contextBlocks = [], inputMessages, model, requestMetadata, sessionId, sessionMessages, storedAgentId, storedMetadata, trigger = "automatic" } = params;
440
440
  const { contextTokens, reservedContextTokens } = this.resolveCompactionProfile({
441
441
  requestMetadata,
442
442
  storedAgentId
@@ -456,10 +456,10 @@ var ContextCompactionPreflightService = class {
456
456
  contextTokens,
457
457
  reservedContextTokens
458
458
  });
459
- const plan = !budget.shouldCompact ? null : this.compactionService.prepareForModelInput({
459
+ const plan = trigger === "automatic" && !budget.shouldCompact ? null : this.compactionService.prepareForModelInput({
460
460
  messages,
461
461
  contextTokens,
462
- compactionThresholdTokens: budget.triggerTokens
462
+ compactionThresholdTokens: trigger === "manual" ? 0 : budget.triggerTokens
463
463
  });
464
464
  const coveredSessionMessageCount = plan ? (existingCheckpoint?.coveredSessionMessageCount ?? 0) + plan.coveredMessages.length - (existingCheckpoint ? 1 : 0) : 0;
465
465
  const serviceMessageId = createContextCompactionMessageId();
@@ -600,6 +600,12 @@ var AgentRunContextCompactionManager = class {
600
600
  this.preflightService = new ContextCompactionPreflightService(agentManager, providerManager);
601
601
  }
602
602
  runPreflight = async (input) => {
603
+ return await this.run(input, "automatic");
604
+ };
605
+ runManual = async (input) => {
606
+ return await this.run(input, "manual");
607
+ };
608
+ run = async (input, trigger) => {
603
609
  const beginResult = this.preflightService.begin({
604
610
  contextBlocks: input.contextBlocks,
605
611
  inputMessages: [],
@@ -608,7 +614,8 @@ var AgentRunContextCompactionManager = class {
608
614
  sessionId: input.sessionId,
609
615
  sessionMessages: input.messages,
610
616
  storedAgentId: input.agentId,
611
- storedMetadata: input.metadata
617
+ storedMetadata: input.metadata,
618
+ trigger
612
619
  });
613
620
  if (!beginResult.pendingCompaction) return [];
614
621
  const finishResult = await this.preflightService.finish(beginResult.pendingCompaction);
@@ -4758,6 +4765,56 @@ var SessionManager = class {
4758
4765
  };
4759
4766
  };
4760
4767
  //#endregion
4768
+ //#region src/managers/session-context-compaction.manager.ts
4769
+ var SessionContextCompactionError = class extends Error {
4770
+ constructor(code, message) {
4771
+ super(message);
4772
+ this.code = code;
4773
+ this.name = "SessionContextCompactionError";
4774
+ }
4775
+ };
4776
+ function isSessionContextCompactionError(error) {
4777
+ return error instanceof SessionContextCompactionError;
4778
+ }
4779
+ var SessionContextCompactionManager = class {
4780
+ constructor(agentRuntimeManager, eventBus, sessionManager, sessionRunManager) {
4781
+ this.agentRuntimeManager = agentRuntimeManager;
4782
+ this.eventBus = eventBus;
4783
+ this.sessionManager = sessionManager;
4784
+ this.sessionRunManager = sessionRunManager;
4785
+ }
4786
+ compact = async (requestedSessionId) => {
4787
+ const sessionId = requestedSessionId.trim();
4788
+ if (!(sessionId ? await this.sessionManager.getSession(sessionId) : null)) throw new SessionContextCompactionError("SESSION_NOT_FOUND", `Session not found: ${sessionId || requestedSessionId}`);
4789
+ const sessionRun = this.sessionRunManager.getSessionRun(sessionId) ?? await this.sessionRunManager.createSessionRun(sessionId);
4790
+ if (sessionRun.isRunning()) throw new SessionContextCompactionError("SESSION_BUSY", `Session is running: ${sessionId}`);
4791
+ const session = await this.sessionManager.getAgentRunSession(sessionId);
4792
+ const runtime = this.agentRuntimeManager.getOrCreate({
4793
+ agentRuntimeId: session.agentRuntimeId,
4794
+ session,
4795
+ sessionRun
4796
+ });
4797
+ if (!runtime.compactContext) throw new SessionContextCompactionError("CONTEXT_COMPACTION_UNSUPPORTED", `Agent runtime does not support context compaction: ${session.agentRuntimeId}`);
4798
+ const result = await runtime.compactContext({
4799
+ session,
4800
+ sessionRun
4801
+ });
4802
+ if (!result.supported) throw new SessionContextCompactionError("CONTEXT_COMPACTION_UNSUPPORTED", `Agent runtime does not support context compaction: ${session.agentRuntimeId}`);
4803
+ if (!result.performed) throw new SessionContextCompactionError("NOTHING_TO_COMPACT", "There is not enough session history to compact.");
4804
+ if (result.events.length > 0) {
4805
+ await sessionRun.applyEvents(result.events);
4806
+ for (const event of result.events) this.eventBus.emit(eventKeys.ncpEvent, event, {
4807
+ emittedAt: (/* @__PURE__ */ new Date()).toISOString(),
4808
+ source: "session-context-compaction"
4809
+ });
4810
+ }
4811
+ return {
4812
+ compacted: true,
4813
+ sessionId
4814
+ };
4815
+ };
4816
+ };
4817
+ //#endregion
4761
4818
  //#region src/types/panel-app.types.ts
4762
4819
  var PanelAppError = class extends Error {
4763
4820
  constructor(code, message) {
@@ -4789,6 +4846,7 @@ var PanelAppAssetTokenService = class {
4789
4846
  const claims = {
4790
4847
  panelAppId: params.panelAppId,
4791
4848
  sourceName: params.sourceName,
4849
+ sourcePath: params.sourcePath,
4792
4850
  expiresAt: this.now() + this.ttlMs,
4793
4851
  nonce: randomBytes(12).toString("base64url")
4794
4852
  };
@@ -4819,7 +4877,7 @@ var PanelAppAssetTokenService = class {
4819
4877
  };
4820
4878
  };
4821
4879
  function isPanelAppAssetTokenClaims(value) {
4822
- return typeof value === "object" && value !== null && "panelAppId" in value && "sourceName" in value && "expiresAt" in value && "nonce" in value && typeof value.panelAppId === "string" && typeof value.sourceName === "string" && typeof value.expiresAt === "number" && typeof value.nonce === "string";
4880
+ return typeof value === "object" && value !== null && "panelAppId" in value && "sourceName" in value && "sourcePath" in value && "expiresAt" in value && "nonce" in value && typeof value.panelAppId === "string" && typeof value.sourceName === "string" && typeof value.sourcePath === "string" && typeof value.expiresAt === "number" && typeof value.nonce === "string";
4823
4881
  }
4824
4882
  //#endregion
4825
4883
  //#region src/stores/panel-app-state.store.ts
@@ -5957,8 +6015,25 @@ var PanelAppSourceService = class {
5957
6015
  throw new PanelAppError("PANEL_APP_READ_FAILED", error instanceof Error ? error.message : String(error));
5958
6016
  }
5959
6017
  };
6018
+ resolveSourcePath = async (sourcePath) => {
6019
+ const normalizedPath = sourcePath.trim();
6020
+ if (!normalizedPath || !isAbsolute(normalizedPath)) throw new PanelAppError("PANEL_APP_INVALID_SOURCE_PATH", "panel app source path must be absolute");
6021
+ const resolvedPath = resolve(normalizedPath);
6022
+ try {
6023
+ return await this.readSource(dirname(resolvedPath), basename(resolvedPath));
6024
+ } catch (error) {
6025
+ if (isPanelAppError(error)) throw error;
6026
+ if (isMissingFileError$1(error)) throw new PanelAppError("PANEL_APP_NOT_FOUND", "panel app not found");
6027
+ throw new PanelAppError("PANEL_APP_READ_FAILED", error instanceof Error ? error.message : String(error));
6028
+ }
6029
+ };
5960
6030
  getAsset = async (panelsPath, id, assetPath) => {
5961
- const source = await this.resolveSource(panelsPath, id);
6031
+ return await this.readAsset(await this.resolveSource(panelsPath, id), assetPath);
6032
+ };
6033
+ getAssetBySourcePath = async (sourcePath, assetPath) => {
6034
+ return await this.readAsset(await this.resolveSourcePath(sourcePath), assetPath);
6035
+ };
6036
+ readAsset = async (source, assetPath) => {
5962
6037
  if (source.kind !== "folder") throw new PanelAppError("PANEL_APP_NOT_FOUND", "panel app asset not found");
5963
6038
  const filePath = resolvePanelAppRelativePath(source.sourcePath, assetPath);
5964
6039
  try {
@@ -6021,7 +6096,21 @@ function resolvePanelAppActivityMs(entry) {
6021
6096
  //#region src/utils/panel-app-content-source.utils.ts
6022
6097
  async function readPanelAppContentSource(params) {
6023
6098
  const { createAssetBaseHref, id, panelsPath, sourceService } = params;
6024
- const source = await sourceService.resolveSource(panelsPath, id);
6099
+ return await readResolvedPanelAppContentSource(await sourceService.resolveSource(panelsPath, id), createAssetBaseHref);
6100
+ }
6101
+ async function readPanelAppContentSourceByPath(params) {
6102
+ const { createAssetBaseHref, path, sourceService } = params;
6103
+ return await readResolvedPanelAppContentSource(await sourceService.resolveSourcePath(path), createAssetBaseHref);
6104
+ }
6105
+ async function readPanelAppContentSourceByIdOrPath(params) {
6106
+ const { sourcePath, ...standardSourceParams } = params;
6107
+ return sourcePath ? await readPanelAppContentSourceByPath({
6108
+ createAssetBaseHref: params.createAssetBaseHref,
6109
+ path: sourcePath,
6110
+ sourceService: params.sourceService
6111
+ }) : await readPanelAppContentSource(standardSourceParams);
6112
+ }
6113
+ async function readResolvedPanelAppContentSource(source, createAssetBaseHref) {
6025
6114
  const html = await readFile(source.entryPath, "utf8");
6026
6115
  const manifest = source.manifest ?? parsePanelAppManifest(html);
6027
6116
  const sourceId = encodePanelAppId(source.sourceName);
@@ -6109,12 +6198,13 @@ var PanelAppManager = class {
6109
6198
  entries: (await Promise.all(sources.map((source) => this.buildPanelAppEntry(source, appState[encodePanelAppId(source.sourceName)] ?? {})))).sort(this.comparePanelApps)
6110
6199
  };
6111
6200
  };
6112
- getPanelAppContent = async (id) => {
6201
+ getPanelAppContent = async (id, sourcePath) => {
6113
6202
  try {
6114
- const resolved = await readPanelAppContentSource({
6203
+ const resolved = await readPanelAppContentSourceByIdOrPath({
6115
6204
  createAssetBaseHref: this.createAssetBaseHref,
6116
6205
  id,
6117
6206
  panelsPath: this.getPanelsPath(this.getWorkspacePath()),
6207
+ sourcePath,
6118
6208
  sourceService: this.sourceService
6119
6209
  });
6120
6210
  const clientGranted = await this.isPanelAppClientGranted(resolved.appId, resolved.manifest.client);
@@ -6153,8 +6243,7 @@ var PanelAppManager = class {
6153
6243
  getPanelAppAssetByToken = async (token, assetPath) => {
6154
6244
  const claims = this.assetTokenService.verify(token);
6155
6245
  if (encodePanelAppId(claims.sourceName) !== claims.panelAppId) throw new PanelAppError("PANEL_APP_ASSET_TOKEN_INVALID", "invalid panel app asset token");
6156
- const panelsPath = this.getPanelsPath(this.getWorkspacePath());
6157
- return await this.sourceService.getAsset(panelsPath, claims.panelAppId, assetPath);
6246
+ return await this.sourceService.getAssetBySourcePath(claims.sourcePath, assetPath);
6158
6247
  };
6159
6248
  getPanelAppBridgeScript = () => getPanelAppBridgeScript({
6160
6249
  appId: "",
@@ -6265,7 +6354,8 @@ var PanelAppManager = class {
6265
6354
  createAssetBaseHref = (source) => {
6266
6355
  const token = this.assetTokenService.issue({
6267
6356
  panelAppId: encodePanelAppId(source.sourceName),
6268
- sourceName: source.sourceName
6357
+ sourceName: source.sourceName,
6358
+ sourcePath: source.sourcePath
6269
6359
  });
6270
6360
  return `${PANEL_APP_TOKENIZED_ASSET_BASE_PATH}/${encodeURIComponent(token)}/`;
6271
6361
  };
@@ -9430,6 +9520,20 @@ var NcpAgentRuntimeWrapper = class {
9430
9520
  await this.disposeRuntimeInstance();
9431
9521
  this.currentTools = [];
9432
9522
  };
9523
+ compactContext = async (options) => {
9524
+ const runtime = this.getRuntime();
9525
+ if (!runtime.compactContext) return {
9526
+ events: [],
9527
+ performed: false,
9528
+ supported: false
9529
+ };
9530
+ await runtime.compactContext({ sessionId: options.sessionRun.sessionId });
9531
+ return {
9532
+ events: [],
9533
+ performed: true,
9534
+ supported: true
9535
+ };
9536
+ };
9433
9537
  disposeRuntimeInstance = async () => {
9434
9538
  if (this.runtime && "dispose" in this.runtime && typeof this.runtime.dispose === "function") await this.runtime.dispose();
9435
9539
  this.runtime = null;
@@ -9518,21 +9622,42 @@ var AgentRunRuntimeContribution = class {
9518
9622
  kind: DEFAULT_AGENT_RUNTIME_ENTRY_ID,
9519
9623
  label: "Native",
9520
9624
  defaultReuseScope: "global",
9521
- createRuntime: () => new DefaultNcpAgentRuntime({
9522
- llmApi: new ProviderManagerNcpLLMApi(this.kernel.llmProviders),
9523
- modelInputBuilder: this.modelInputBuilder,
9524
- runPreflight: async ({ contextBlocks, spec, sessionRun }) => {
9525
- const session = await this.kernel.sessionManager.getAgentRunSession(sessionRun.sessionId);
9526
- return await this.kernel.contextCompactionManager.runPreflight({
9527
- agentId: spec.agentId,
9528
- contextBlocks,
9529
- messages: sessionRun.getSnapshot().messages,
9530
- metadata: session.metadata,
9531
- model: spec.model,
9532
- sessionId: sessionRun.sessionId
9533
- });
9534
- }
9535
- })
9625
+ createRuntime: () => {
9626
+ const runtime = new DefaultNcpAgentRuntime({
9627
+ llmApi: new ProviderManagerNcpLLMApi(this.kernel.llmProviders),
9628
+ modelInputBuilder: this.modelInputBuilder,
9629
+ runPreflight: async ({ contextBlocks, spec, sessionRun }) => {
9630
+ const session = await this.kernel.sessionManager.getAgentRunSession(sessionRun.sessionId);
9631
+ return await this.kernel.contextCompactionManager.runPreflight({
9632
+ agentId: spec.agentId,
9633
+ contextBlocks,
9634
+ messages: sessionRun.getSnapshot().messages,
9635
+ metadata: session.metadata,
9636
+ model: spec.model,
9637
+ sessionId: sessionRun.sessionId
9638
+ });
9639
+ }
9640
+ });
9641
+ return {
9642
+ run: runtime.run.bind(runtime),
9643
+ compactContext: async ({ session, sessionRun }) => {
9644
+ const model = session.model ?? this.kernel.configManager.getDefaultModel();
9645
+ const events = await this.kernel.contextCompactionManager.runManual({
9646
+ agentId: session.agentId ?? this.kernel.agents.getDefaultAgentId(),
9647
+ contextBlocks: [],
9648
+ messages: sessionRun.getSnapshot().messages,
9649
+ metadata: session.metadata,
9650
+ model,
9651
+ sessionId: session.sessionId
9652
+ });
9653
+ return {
9654
+ events,
9655
+ performed: events.length > 0,
9656
+ supported: true
9657
+ };
9658
+ }
9659
+ };
9660
+ }
9536
9661
  });
9537
9662
  registerNarpRuntime = (provider) => this.kernel.agentRuntimeManager.register({
9538
9663
  kind: provider.kind,
@@ -9895,6 +10020,7 @@ var ReplyFormatContextProvider = class {
9895
10020
  "Display choice: Do not make every UI an inline card. Choose inline only for a compact, immediately usable card or short interaction. Use the side panel for normal Panel Apps, long reading, rich editing, file browsing, large tables, multi-page workflows, or sustained workspaces.",
9896
10021
  "Inline display: when the final reply should include a non-clickable inline display placeholder, output a fenced `nextclaw-inline` JSON block:",
9897
10022
  "```nextclaw-inline\n{\"target\":{\"type\":\"panel_app\",\"payload\":{\"appId\":\"timer\"}},\"title\":\"Timer\"}\n```",
10023
+ "For a Panel App outside the standard panels directory, keep `appId` and add its absolute source `path` to the same `panel_app` payload; the same optional `path` is supported by `show_panel_app` for side-panel display.",
9898
10024
  "Supported targets are `panel_app`, `json`, `file`, and `url`. Prefer `panel_app` for inline Panel App display; use `file` and `url` only as non-clickable placeholders when a clickable link is not intended; use `file` for generated local HTML and `url` only for a real http/https page, never for a local path or an invented root-relative URL; use `json` for inert JSON snapshots.",
9899
10025
  "Inline display is Markdown-only and display-only: no opening, executing, or tool action. Never call `show_panel_app` for inline display, including when the user asks which Panel Apps are suitable for inline display or says to show them inline. `show_panel_app` is only for immediately opening a Panel App outside the final reply in the side panel. Use Markdown links for clickable resources and `show_file` / `show_url` / `show_panel_app` only when the UI should immediately show or run content outside the final reply.",
9900
10026
  "For ordinary local HTML files or page prototypes that should open outside the reply, call `show_file` with `path` and `viewer=\"rendered\"`; use `viewer=\"source\"` when the user needs source text. This rule does not apply to an inline visualization selected under the Visualization contract or to a request that says the result must appear directly in the current reply: in those cases do not call `show_file`, `show_url`, a browser-opening command, or any other external display action. Markdown file links open source by default; append `?viewer=rendered` only when the link itself should open the rendered HTML view. Do not convert a plain HTML file into a Panel App just to preview it.",
@@ -11420,10 +11546,15 @@ function normalizeShowUrlArgs(args) {
11420
11546
  }
11421
11547
  function normalizeShowPanelAppArgs(args) {
11422
11548
  const params = normalizeToolParams(args);
11549
+ const path = readOptionalString$1(params.path);
11550
+ if (path && !isAbsolute(path)) throw new Error("path must be an absolute path.");
11423
11551
  return {
11424
11552
  target: {
11425
11553
  type: "panel_app",
11426
- payload: { appId: readRequiredString(params.appId, "appId") }
11554
+ payload: {
11555
+ appId: readRequiredString(params.appId, "appId"),
11556
+ path
11557
+ }
11427
11558
  },
11428
11559
  ...readCommonRequestFields(params, PANEL_APP_PURPOSES)
11429
11560
  };
@@ -11544,6 +11675,10 @@ const SHOW_CONTENT_TOOL_SPECS = [
11544
11675
  type: "string",
11545
11676
  description: "Installed Panel App id to show."
11546
11677
  },
11678
+ path: {
11679
+ type: "string",
11680
+ description: "Optional absolute path to a .panel.html file or .panel directory outside the standard panels directory."
11681
+ },
11547
11682
  title: {
11548
11683
  type: "string",
11549
11684
  description: "Optional title for the shown content."
@@ -11714,6 +11849,7 @@ var NextclawKernel = class {
11714
11849
  contextCompactionManager;
11715
11850
  contextProviderManager = new ContextProviderManager();
11716
11851
  sessionRunManager;
11852
+ sessionContextCompactionManager;
11717
11853
  toolProviderManager = new ToolProviderManager();
11718
11854
  agentRunRequestManager;
11719
11855
  ncpAgentSessionJournalStore;
@@ -11782,6 +11918,7 @@ var NextclawKernel = class {
11782
11918
  });
11783
11919
  this.contextCompactionManager = new AgentRunContextCompactionManager(this.agents, this.llmProviders, this.sessionManager);
11784
11920
  this.sessionRunManager = new SessionRunManager(this.sessionManager);
11921
+ this.sessionContextCompactionManager = new SessionContextCompactionManager(this.agentRuntimeManager, this.eventBus, this.sessionManager, this.sessionRunManager);
11785
11922
  this.agentRunRequestManager = new AgentRunRequestManager(this.agentRuntimeManager, this.agents, this.configManager, this.contextProviderManager, this.eventBus, this.ingress, this.sessionManager, this.sessionRunManager, this.toolProviderManager);
11786
11923
  this.contributions = [
11787
11924
  new ToolProviderContribution(this),
@@ -12389,6 +12526,6 @@ function resolveLegacyEventType(message) {
12389
12526
  return `message.${role || "other"}`;
12390
12527
  }
12391
12528
  //#endregion
12392
- export { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, AccessManager, AgentManager, AgentRunClient, AutomationManager, BuiltinNarpRuntimeProviderService, CONTEXT_COMPACTION_PROJECTION_KIND, CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, CONTEXT_COMPACTION_TIMELINE_KIND, ChannelManager, CommandRegistry, ConfigManager, ContextCompactionPreflightService, ContextWindowPreviewManager, DEFAULT_AGENT_RUNTIME_ENTRY_ID, DEFAULT_SERVICE_ACTION_RISK, ExtensionManager, GatewayInboundProcessor, LlmProviderManager, LlmUsageManager, LlmUsageStore, McpManager, McpServiceAppRuntimeService, NARP_HTTP_RUNTIME_KIND, NARP_STDIO_RUNTIME_KIND, NEXTCLAW_TIMELINE_KIND_METADATA_KEY, NcpAgentSessionJournalStore, NextclawKernel, PANEL_APP_AGENT_CAPABILITIES, PROJECT_TEMPLATE_IDS, PanelAppAssetTokenService, PanelAppError, PanelAppManager, PreferenceError, PreferenceManager, ProjectError, ProjectManager, ProviderManagerNcpLLMApi, SERVICE_APP_MANIFEST_FILE_NAME, ServiceAppError, ServiceAppManager, SessionManager, SessionMessageCursorError, SessionRequestManager, SessionSettingsError, SkillManager, UpdateManifestReader, buildAgentRunSendPayload, buildContextCompactionModelInput, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildNextclawNcpRunContext, buildServiceActionId, createAgentRuntimeSessionRequestDispatcher, createAssetTools, createContextCompactionMessageId, createContextWindowSignature, createLlmUsageRecord, describeAgentRuntimeSessionTypes, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, getAutomaticUpdateCheckDelay, getServiceActionName, getServiceAppManifestPath, getUnsignedUpdateManifest, hasLlmUsageTelemetry, isContextCompactionProjectionMessage, isContextCompactionTimelineMessage, isContextWindowSnapshot, isPanelAppAgentCapability, isPanelAppError, isPreferenceError, isProjectError, isReplyCapableChannel, isServiceAppError, isSessionMessageCursorError, isSessionSettingsError, listExtensionChannelIds, listServiceAppManifestActions, mergeServiceAppRuntimeActions, normalizeAgentRuntimeSessionTypeIcon, normalizeLlmUsageModel, normalizeOptionalString, parseServiceAppManifest, parseSkillFrontmatter, readContextWindowEventSessionId, readLatestContextCompactionCheckpoint, readLearningLoopRuntimeConfig, readMetadataModel, readMetadataThinking, readServiceAppManifest, resolveAgentRuntimeEntries, resolveAutomaticUpdateCheckIntervalMs, resolveChannelReplyRoute, resolveEffectiveModel, resolveLegacyEventType, resolveSessionChannelContext, runGatewayInboundLoop, sanitizeLlmUsage, serializeUnsignedUpdateManifest, shouldRefreshContextWindowDuringStream, shouldRefreshContextWindowImmediately, stripSkillFrontmatter, syncSessionThinkingPreference, toNcpMessages, waitForAgentRuntimeSessionReply };
12529
+ export { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, AccessManager, AgentManager, AgentRunClient, AutomationManager, BuiltinNarpRuntimeProviderService, CONTEXT_COMPACTION_PROJECTION_KIND, CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, CONTEXT_COMPACTION_TIMELINE_KIND, ChannelManager, CommandRegistry, ConfigManager, ContextCompactionPreflightService, ContextWindowPreviewManager, DEFAULT_AGENT_RUNTIME_ENTRY_ID, DEFAULT_SERVICE_ACTION_RISK, ExtensionManager, GatewayInboundProcessor, LlmProviderManager, LlmUsageManager, LlmUsageStore, McpManager, McpServiceAppRuntimeService, NARP_HTTP_RUNTIME_KIND, NARP_STDIO_RUNTIME_KIND, NEXTCLAW_TIMELINE_KIND_METADATA_KEY, NcpAgentSessionJournalStore, NextclawKernel, PANEL_APP_AGENT_CAPABILITIES, PROJECT_TEMPLATE_IDS, PanelAppAssetTokenService, PanelAppError, PanelAppManager, PreferenceError, PreferenceManager, ProjectError, ProjectManager, ProviderManagerNcpLLMApi, SERVICE_APP_MANIFEST_FILE_NAME, ServiceAppError, ServiceAppManager, SessionContextCompactionError, SessionContextCompactionManager, SessionManager, SessionMessageCursorError, SessionRequestManager, SessionSettingsError, SkillManager, UpdateManifestReader, buildAgentRunSendPayload, buildContextCompactionModelInput, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildNextclawNcpRunContext, buildServiceActionId, createAgentRuntimeSessionRequestDispatcher, createAssetTools, createContextCompactionMessageId, createContextWindowSignature, createLlmUsageRecord, describeAgentRuntimeSessionTypes, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, getAutomaticUpdateCheckDelay, getServiceActionName, getServiceAppManifestPath, getUnsignedUpdateManifest, hasLlmUsageTelemetry, isContextCompactionProjectionMessage, isContextCompactionTimelineMessage, isContextWindowSnapshot, isPanelAppAgentCapability, isPanelAppError, isPreferenceError, isProjectError, isReplyCapableChannel, isServiceAppError, isSessionContextCompactionError, isSessionMessageCursorError, isSessionSettingsError, listExtensionChannelIds, listServiceAppManifestActions, mergeServiceAppRuntimeActions, normalizeAgentRuntimeSessionTypeIcon, normalizeLlmUsageModel, normalizeOptionalString, parseServiceAppManifest, parseSkillFrontmatter, readContextWindowEventSessionId, readLatestContextCompactionCheckpoint, readLearningLoopRuntimeConfig, readMetadataModel, readMetadataThinking, readServiceAppManifest, resolveAgentRuntimeEntries, resolveAutomaticUpdateCheckIntervalMs, resolveChannelReplyRoute, resolveEffectiveModel, resolveLegacyEventType, resolveSessionChannelContext, runGatewayInboundLoop, sanitizeLlmUsage, serializeUnsignedUpdateManifest, shouldRefreshContextWindowDuringStream, shouldRefreshContextWindowImmediately, stripSkillFrontmatter, syncSessionThinkingPreference, toNcpMessages, waitForAgentRuntimeSessionReply };
12393
12530
 
12394
12531
  //# sourceMappingURL=index.js.map