@nextclaw/kernel 0.19.2-beta.0 → 0.19.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/app/worker/index.d.ts +4 -0
  2. package/dist/app/worker/index.js +3 -0
  3. package/dist/automatic-update-check.utils-C6lQfErN.d.ts +11 -0
  4. package/dist/automatic-update-check.utils-C6lQfErN.d.ts.map +1 -0
  5. package/dist/index.d.ts +4 -4339
  6. package/dist/index.js +12555 -18773
  7. package/dist/index.js.map +1 -1
  8. package/dist/nextclaw-harness.manager-7URpTz3z.js +9030 -0
  9. package/dist/nextclaw-harness.manager-7URpTz3z.js.map +1 -0
  10. package/dist/nextclaw-harness.manager-Df5Zagn_.d.ts +6001 -0
  11. package/dist/nextclaw-harness.manager-Df5Zagn_.d.ts.map +1 -0
  12. package/dist/types/update-contract.types.d.ts +1 -1
  13. package/dist/types/update-contract.types.js +1 -1
  14. package/dist/{update-manifest.types-eSil_QH0.js → update-manifest.types-CBp2VTM1.js} +1 -1
  15. package/dist/{update-manifest.types-eSil_QH0.js.map → update-manifest.types-CBp2VTM1.js.map} +1 -1
  16. package/dist/{update-manifest.types-Dl4B87Pa.d.ts → update-manifest.types-C_60CVvw.d.ts} +1 -1
  17. package/dist/{update-manifest.types-Dl4B87Pa.d.ts.map → update-manifest.types-C_60CVvw.d.ts.map} +1 -1
  18. package/dist/utils/automatic-update-check.utils.d.ts +2 -11
  19. package/package.json +17 -57
  20. package/dist/agent-model-input-budget.utils-tw9zs9WM.js +0 -26
  21. package/dist/agent-model-input-budget.utils-tw9zs9WM.js.map +0 -1
  22. package/dist/agent-run-context-compaction.manager-BV6tB0wL.d.ts +0 -28
  23. package/dist/agent-run-context-compaction.manager-BV6tB0wL.d.ts.map +0 -1
  24. package/dist/agent-run-model-input-builder.service-C3ydUx3d.js +0 -320
  25. package/dist/agent-run-model-input-builder.service-C3ydUx3d.js.map +0 -1
  26. package/dist/agent-run.types-CNVBBJnd.d.ts +0 -71
  27. package/dist/agent-run.types-CNVBBJnd.d.ts.map +0 -1
  28. package/dist/context-compaction-preflight.service-ClJEGWKS.d.ts +0 -97
  29. package/dist/context-compaction-preflight.service-ClJEGWKS.d.ts.map +0 -1
  30. package/dist/context-compaction-preflight.service-K0tE34Oz.js +0 -689
  31. package/dist/context-compaction-preflight.service-K0tE34Oz.js.map +0 -1
  32. package/dist/context-compaction.utils-Csf80mdq.d.ts +0 -42
  33. package/dist/context-compaction.utils-Csf80mdq.d.ts.map +0 -1
  34. package/dist/features/context-compaction/services/context-compaction-preflight.service.d.ts +0 -2
  35. package/dist/features/context-compaction/services/context-compaction-preflight.service.js +0 -2
  36. package/dist/features/context-compaction/utils/context-compaction.utils.d.ts +0 -2
  37. package/dist/features/context-compaction/utils/context-compaction.utils.js +0 -202
  38. package/dist/features/context-compaction/utils/context-compaction.utils.js.map +0 -1
  39. package/dist/index.d.ts.map +0 -1
  40. package/dist/managers/agent-run-context-compaction.manager.d.ts +0 -2
  41. package/dist/managers/agent-run-context-compaction.manager.js +0 -68
  42. package/dist/managers/agent-run-context-compaction.manager.js.map +0 -1
  43. package/dist/request-context-tail.manager-DXC4rdAP.d.ts +0 -22
  44. package/dist/request-context-tail.manager-DXC4rdAP.d.ts.map +0 -1
  45. package/dist/services/agent-run-model-input-builder.service.d.ts +0 -58
  46. package/dist/services/agent-run-model-input-builder.service.d.ts.map +0 -1
  47. package/dist/services/agent-run-model-input-builder.service.js +0 -2
  48. package/dist/tool-schema.tools-CtZEKWeY.js +0 -75
  49. package/dist/tool-schema.tools-CtZEKWeY.js.map +0 -1
  50. package/dist/tools/show-content.tools.d.ts +0 -10
  51. package/dist/tools/show-content.tools.d.ts.map +0 -1
  52. package/dist/tools/show-content.tools.js +0 -294
  53. package/dist/tools/show-content.tools.js.map +0 -1
  54. package/dist/tools/tool-schema.tools.d.ts +0 -29
  55. package/dist/tools/tool-schema.tools.d.ts.map +0 -1
  56. package/dist/tools/tool-schema.tools.js +0 -2
  57. package/dist/tools/user-question.tools.d.ts +0 -63
  58. package/dist/tools/user-question.tools.d.ts.map +0 -1
  59. package/dist/tools/user-question.tools.js +0 -77
  60. package/dist/tools/user-question.tools.js.map +0 -1
  61. package/dist/user-question.manager-38KBgZCg.d.ts +0 -1038
  62. package/dist/user-question.manager-38KBgZCg.d.ts.map +0 -1
  63. package/dist/user-question.utils-DWVtPv4S.d.ts +0 -27
  64. package/dist/user-question.utils-DWVtPv4S.d.ts.map +0 -1
  65. package/dist/utils/agent-onboarding-context.utils.d.ts +0 -6
  66. package/dist/utils/agent-onboarding-context.utils.d.ts.map +0 -1
  67. package/dist/utils/agent-onboarding-context.utils.js +0 -39
  68. package/dist/utils/agent-onboarding-context.utils.js.map +0 -1
  69. package/dist/utils/automatic-update-check.utils.d.ts.map +0 -1
  70. package/dist/utils/user-question.utils.d.ts +0 -2
  71. package/dist/utils/user-question.utils.js +0 -105
  72. package/dist/utils/user-question.utils.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,4339 +1,4 @@
1
- import { a as ContextCompactionTrigger, i as ContextCompactionPreflightService, n as ContextCompactionPreflightBeginResult, o as CompactionSummaryProvider, r as ContextCompactionPreflightResult, t as CompactionProfileResolver } from "./context-compaction-preflight.service-ClJEGWKS.js";
2
- import { _ as readContextCompactionCheckpoint, a as CONTEXT_COMPACTION_SYSTEM_PREAMBLE, b as shouldRefreshContextWindowDuringStream, c as ContextCompactionTimelineCheckpoint, d as buildContextCompactionTimelineNcpMessage, f as createContextCompactionMessageId, g as isContextWindowSnapshot, h as isContextCompactionTimelineMessage, i as CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, l as NEXTCLAW_TIMELINE_KIND_METADATA_KEY, m as isContextCompactionProjectionMessage, n as CONTEXT_COMPACTION_PART_START, o as CONTEXT_COMPACTION_TIMELINE_KIND, p as createContextWindowSignature, r as CONTEXT_COMPACTION_PROJECTION_KIND, s as ContextCompactionModelProjection, t as CONTEXT_COMPACTION_CONTINUATION_TEXT, u as buildContextCompactionModelProjection, v as readContextWindowEventSessionId, x as shouldRefreshContextWindowImmediately, y as readLatestContextCompactionCheckpoint } from "./context-compaction.utils-Csf80mdq.js";
3
- import { $ as CreateProjectInput, A as ProjectRecentArtifact, At as PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS, B as ProjectWorkItemListEntry, C as ProjectAgreementMaterial, Ct as AgentManager, D as CreateProjectWorkStateInput, Dt as ConfigManagerOptions, E as CreateProjectWorkItemInput, Et as ConfigManager, F as ProjectWorkActor, Ft as LlmProviderRuntime, G as ProjectWorkSummary, H as ProjectWorkListInput, I as ProjectWorkArtifactLink, It as ProviderModelsDiscoverInput, J as ProjectError, K as UpdateProjectWorkItemInput, L as ProjectWorkAttention, Lt as ChannelManager, M as ProjectWorkActivity, Mt as ProviderModelCatalogManager, N as ProjectWorkActivityPage, Nt as ProviderModelCatalogSnapshot, O as PROJECT_WORK_ATTENTION_VALUES, Ot as ConfigManagerRuntimeHooks, P as ProjectWorkActivityType, Pt as LlmProviderManager, Q as isProjectError, R as ProjectWorkItem, S as ProjectMaterialService, St as ContextProviderManager, T as ProjectWorkManager, Tt as ResolvedAgentProfile, U as ProjectWorkState, V as ProjectWorkItemPage, W as ProjectWorkStateCategory, X as ProjectManager, Y as ProjectErrorCode, Z as ProjectManagerOptions, _ as SessionManager, _t as isSessionMessageCursorError, a as AgentRunClient, at as NcpAgentSessionJournalStore, b as ProjectWorkErrorCode, bt as ToolProviderManager, c as AgentRunReplyOptions, ct as SessionMessageCursorError, d as SessionRunManager, dt as SessionModelTokenUsage, et as PROJECT_TEMPLATE_IDS, f as SessionRunPendingRequest, ft as SessionSettingsError, g as ProductActivitySource, gt as SessionTokenUsageTotals, h as ProductActivitySink, ht as SessionTokenUsageSummary, i as UserQuestionResolution, it as ProjectTemplateId, j as ProjectRecentArtifactPage, jt as ProviderModelCatalogEntry, k as PROJECT_WORK_STATE_CATEGORIES, kt as ConfigMutationResult, l as AgentRunStreamOptions, lt as SessionMessagePage, m as ProductActivitySignal, mt as SessionTokenUsageStatus, n as UserQuestionManager, nt as ProjectSessionBinding, o as AgentRunExecution, ot as AgentRunSession, p as ProductActivityKind, pt as SessionSettingsPatch, q as UpdateProjectWorkStateInput, r as UserQuestionReplyResolution, rt as ProjectTemplate, s as AgentRunReply, st as CreateAgentRunSessionParams, t as UserQuestionError, tt as ProjectRecord, u as SessionRun, ut as SessionMetadataUpdate, v as SessionManagerOptions, vt as isSessionSettingsError, w as ProjectSkillMaterial, wt as AgentManagerOptions, x as isProjectWorkError, xt as ToolRunContext, y as ProjectWorkError, yt as AgentContextWindowManager, z as ProjectWorkItemDetail } from "./user-question.manager-38KBgZCg.js";
4
- import { a as ContextBlock$1, c as SessionQueuedInput, i as AgentRunSpec, l as SessionSteerQueuedInputResult, n as AgentRunContinueRequest, s as SessionPendingInput, t as AgentRunAccepted } from "./agent-run.types-CNVBBJnd.js";
5
- import { n as AgentRunContextCompactionManager } from "./agent-run-context-compaction.manager-BV6tB0wL.js";
6
- import { t as RequestContextTailManager } from "./request-context-tail.manager-DXC4rdAP.js";
7
- import { n as UserQuestionPrompt, r as UserQuestionView, t as USER_QUESTION_EXTENSION_TYPE } from "./user-question.utils-DWVtPv4S.js";
8
- import { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, getAutomaticUpdateCheckDelay, resolveAutomaticUpdateCheckIntervalMs } from "./utils/automatic-update-check.utils.js";
9
- import { a as getUnsignedUpdateManifest, c as UpdateBlockReason, d as UpdateStatus, i as UpdateManifestReader, l as UpdateProgress, n as UpdateHostKind, o as serializeUnsignedUpdateManifest, r as UpdateManifest, s as InstallationKind, t as UnsignedUpdateManifest, u as UpdateSnapshot } from "./update-manifest.types-Dl4B87Pa.js";
10
- import { AgentRunSendIngressPayload, AppEventEmitOptions, AppEventEnvelope, AppEventHandler, AppEventKey, Contribution as Contribution$1, Disposer, Disposer as Disposer$1, EventBus, EventBus as EventBus$1, EventBusOptions, InboxDelivery, InboxDeliveryContentType, InboxDeliveryListView, InboxDeliverySource, InboxDeliveryStateAction, Ingress, Ingress as Ingress$1, IngressContext, IngressEnvelope, IngressHandler, Key, RuntimeModelSelectionMode, SystemObjectReferenceGroupDescriptor, SystemObjectReferenceItem, SystemObjectReferenceListView, SystemObjectResolvedReference, TypedKey, Unsubscribe, Unsubscribe as Unsubscribe$1, createTypedKey, eventKeys, ingressKeys } from "@nextclaw/shared";
11
- import { LocalAssetStore } from "@nextclaw/ncp-agent-runtime";
12
- import * as _$_nextclaw_core0 from "@nextclaw/core";
13
- import { BaseChannel, Config, CronService, DiagnosticRuntime, ExtensionChannelBinding, ExtensionDiagnostic, ExtensionRegistry, ExtensionUiMetadata, GatewayController, InboundAttachment, InboundMessage, LLMResponse, LLMResponse as LLMResponse$1, LLMStreamEvent, LLMStreamEvent as LLMStreamEvent$1, LocalExecutionClaimService, LocalizedTextMap, LocalizedTextMap as LocalizedTextMap$1, McpServerDefinition, McpServerDefinition as McpServerDefinition$1, MessageBus, ModelThinkingCapability, ProviderCatalogPlugin, ProviderCatalogPlugin as ProviderCatalogPlugin$1, ProviderSpec, ProviderSpec as ProviderSpec$1, RUNTIME_INSTANCE_DESKTOP_DATA_DIRECTORY_ENV, RUNTIME_INSTANCE_DESKTOP_LOGS_DIRECTORY_ENV, RUNTIME_INSTANCE_DISTRIBUTION_ENV, RUNTIME_INSTANCE_INSTALLATION_KIND_ENV, RUNTIME_INSTANCE_PORTABLE_DATA_ROOT_ENV, RequestSessionParams, SessionMessage, SessionRequestDispatcher, SessionRequestRecord, SessionRequestSourceNotifier, SessionRequestToolResult, SessionSearchService, SkillFrontmatter, SkillInfo, SkillInfo as SkillInfo$1, SkillScope, SpawnSessionAndRequestParams, ThinkingLevel, buildLocalizedTextMap, parseSkillFrontmatter, resolveThinkingLevel, stripSkillFrontmatter } from "@nextclaw/core";
14
- import * as _$_nextclaw_ncp0 from "@nextclaw/ncp";
15
- import { NcpAgentRuntime, NcpEndpointEvent, NcpEndpointEvent as NcpEndpointEvent$1, NcpJsonValue, NcpLLMApi, NcpLLMApiInput, NcpLLMApiOptions, NcpMessage, NcpMessage as NcpMessage$1, NcpMessagePart, NcpResolvedInputDelivery, NcpRunHandle, NcpTool, NcpTool as NcpTool$1, OpenAIChatChunk, OpenAIChatMessage } from "@nextclaw/ncp";
16
- import { ChatTarget, NcpReplyInput, RuntimeFactoryParams } from "@nextclaw/ncp-toolkit";
17
- import * as _$_nextclaw_app_runtime0 from "@nextclaw/app-runtime";
18
- import { AppDocumentGrantMutationResult, AppDocumentGrantState, AppInstallProgressHandler, AppInstalledPermissionState, AppNativeArtifactTarget, AppPermissions, AppPlatformTargetService, AppRollbackResult, AppRuntimeIsolation, AppRuntimeProfile, AppSecretBinding, AppSecretSlot, AppStorageContext, AppStorageUsage, AppUninstallResult, AppUpdateResult } from "@nextclaw/app-runtime";
19
- import * as _$_nextclaw_mcp0 from "@nextclaw/mcp";
20
- import { McpCatalogFilter, McpCatalogFilter as McpCatalogFilter$1, McpRegistryService, McpServerRecord, McpServerRecord as McpServerRecord$1, McpToolCatalogEntry, McpToolCatalogEntry as McpToolCatalogEntry$1 } from "@nextclaw/mcp";
21
-
22
- //#region src/features/runtime-registry/utils/agent-runtime-registry.utils.d.ts
23
- type AgentRuntimeSessionTypeIcon = {
24
- kind: "image";
25
- src: string;
26
- alt?: string | null;
27
- };
28
- type AgentRuntimeSessionTypeOption = {
29
- value: string;
30
- label: string;
31
- icon?: AgentRuntimeSessionTypeIcon | null;
32
- ready?: boolean;
33
- reason?: string | null;
34
- reasonMessage?: string | null;
35
- supportedModels?: string[];
36
- recommendedModel?: string | null;
37
- modelSelectionMode?: RuntimeModelSelectionMode;
38
- runtimeDefaultThinking?: ModelThinkingCapability | null;
39
- cta?: {
40
- kind: string;
41
- label?: string;
42
- href?: string;
43
- } | null;
44
- };
45
- type AgentRuntimeSessionTypeDescribeParams = {
46
- describeMode?: "observation" | "probe";
47
- };
48
- type AgentRuntimeEntry = {
49
- id: string;
50
- label: string;
51
- icon?: AgentRuntimeSessionTypeIcon | null;
52
- type: string;
53
- enabled?: boolean;
54
- injectNextclawContext?: boolean;
55
- config?: Record<string, unknown>;
56
- };
57
- type AgentRuntimeSessionTypeDescriptor = Omit<AgentRuntimeSessionTypeOption, "value" | "label">;
58
- type AgentRuntimeSessionTypeProvider = {
59
- describeSessionType?: (params?: AgentRuntimeSessionTypeDescribeParams) => Promise<AgentRuntimeSessionTypeDescriptor | null | undefined> | AgentRuntimeSessionTypeDescriptor | null | undefined;
60
- describeSessionTypeForEntry?: (params: {
61
- entry: AgentRuntimeEntry;
62
- describeParams?: AgentRuntimeSessionTypeDescribeParams;
63
- }) => Promise<AgentRuntimeSessionTypeDescriptor | null | undefined> | AgentRuntimeSessionTypeDescriptor | null | undefined;
64
- };
65
- type AgentRuntimeProviderRegistration = AgentRuntimeSessionTypeProvider & {
66
- kind: string;
67
- label: string;
68
- createRuntime: (params: RuntimeFactoryParams) => NcpAgentRuntime;
69
- createRuntimeForEntry?: (params: {
70
- entry: AgentRuntimeEntry;
71
- runtimeParams: RuntimeFactoryParams;
72
- }) => NcpAgentRuntime;
73
- };
74
- declare function normalizeAgentRuntimeSessionTypeIcon(value: unknown): AgentRuntimeSessionTypeIcon | null;
75
- type ConfigRuntimeEntry = {
76
- enabled?: boolean;
77
- label?: string;
78
- icon?: unknown;
79
- type?: string;
80
- config?: Record<string, unknown>;
81
- };
82
- type AgentRuntimeResolverConfig = {
83
- ui?: {
84
- ncp?: {
85
- runtimes?: {
86
- native?: unknown;
87
- };
88
- };
89
- };
90
- agents: {
91
- runtimes: {
92
- entries?: Record<string, ConfigRuntimeEntry>;
93
- };
94
- };
95
- };
96
- declare function resolveAgentRuntimeEntries(params: {
97
- config: AgentRuntimeResolverConfig;
98
- }): {
99
- defaultEntryId: string;
100
- entries: AgentRuntimeEntry[];
101
- };
102
- declare function describeAgentRuntimeSessionTypes(params: {
103
- entries: readonly AgentRuntimeEntry[];
104
- providers: ReadonlyMap<string, AgentRuntimeSessionTypeProvider>;
105
- defaultEntryId?: string;
106
- describeParams?: AgentRuntimeSessionTypeDescribeParams;
107
- }): Promise<{
108
- defaultType: string;
109
- options: AgentRuntimeSessionTypeOption[];
110
- }>;
111
- //#endregion
112
- //#region src/managers/agent-runtime.manager.d.ts
113
- type AgentRuntimeRunOptions = {
114
- session: AgentRunSession;
115
- sessionRun: SessionRun;
116
- contextBlocks: readonly ContextBlock$1[];
117
- tools: readonly NcpTool$1[];
118
- initialMessages: readonly NcpMessage$1[];
119
- signal?: AbortSignal;
120
- };
121
- type AgentRuntimeContextCompactionOptions = Pick<AgentRuntimeRunOptions, "session" | "sessionRun">;
122
- type AgentRuntimeContextCompactionResult = {
123
- events: readonly NcpEndpointEvent$1[];
124
- performed: boolean;
125
- supported: boolean;
126
- };
127
- type AgentRuntime = {
128
- capabilities?: {
129
- nextStepInput?: boolean;
130
- };
131
- run: (spec: AgentRunSpec, options: AgentRuntimeRunOptions) => AsyncIterable<NcpEndpointEvent$1>;
132
- compactContext?: (options: AgentRuntimeContextCompactionOptions) => Promise<AgentRuntimeContextCompactionResult>;
133
- dispose?: () => Promise<void> | void;
134
- };
135
- type AgentRuntimeRegistration = {
136
- kind: string;
137
- label: string;
138
- defaultReuseScope: AgentRuntimeReuseScope;
139
- createRuntime: (params: AgentRuntimeCreateParams) => AgentRuntime;
140
- describeSessionTypeForEntry?: (params: {
141
- entry: AgentRuntimeEntry;
142
- describeParams?: AgentRuntimeSessionTypeDescribeParams;
143
- }) => Promise<Omit<AgentRuntimeSessionTypeOption, "value" | "label"> | null | undefined> | Omit<AgentRuntimeSessionTypeOption, "value" | "label"> | null | undefined;
144
- };
145
- type AgentRuntimeReuseScope = "global" | "session";
146
- type AgentRuntimeCreateParams = {
147
- entry: AgentRuntimeEntry;
148
- session: AgentRunSession;
149
- sessionRun: SessionRun;
150
- };
151
- type AgentRuntimeCacheParams = {
152
- agentRuntimeId: string;
153
- session: AgentRunSession;
154
- sessionRun: SessionRun;
155
- };
156
- declare class AgentRuntimeManager {
157
- private readonly providers;
158
- private readonly entries;
159
- private readonly configuredEntries;
160
- private readonly contributedEntries;
161
- private readonly globalRuntimes;
162
- private readonly sessionRuntimes;
163
- register: (registration: AgentRuntimeRegistration) => (() => Promise<void>);
164
- registerProvider: (provider: AgentRuntimeProviderRegistration, host: {
165
- resolveAssetContentPath: (assetUri: string) => string | null;
166
- }) => (() => Promise<void>);
167
- applyEntries: (entries: readonly AgentRuntimeEntry[]) => void;
168
- registerEntry: (entry: AgentRuntimeEntry) => (() => Promise<void>);
169
- getOrCreate: (params: AgentRuntimeCacheParams) => AgentRuntime;
170
- disposeRuntime: (params: AgentRuntimeCacheParams) => Promise<boolean>;
171
- listSessionTypes: (params?: AgentRuntimeSessionTypeDescribeParams) => Promise<{
172
- defaultType: string;
173
- options: AgentRuntimeSessionTypeOption[];
174
- }>;
175
- dispose: () => Promise<void>;
176
- private normalizeId;
177
- private rebuildEntries;
178
- private getEntry;
179
- private getProvider;
180
- private resolveReuseScope;
181
- private resolveRuntimeCache;
182
- private disposeAllRuntimes;
183
- }
184
- //#endregion
185
- //#region src/services/agent-run-input-delivery.service.d.ts
186
- /** Resolves public pending-input actions while SessionRun remains the state owner. */
187
- declare class AgentRunInputDeliveryService {
188
- private readonly agentRuntimeManager;
189
- private readonly sessionManager;
190
- private readonly sessionRunManager;
191
- private readonly publishQueueUpdated;
192
- constructor(agentRuntimeManager: AgentRuntimeManager, sessionManager: SessionManager, sessionRunManager: SessionRunManager, publishQueueUpdated: (sessionId: string) => void);
193
- listQueuedInputs: (sessionId: string) => readonly SessionQueuedInput[];
194
- removeQueuedInput: (sessionId: string, queuedInputId: string) => SessionQueuedInput | null;
195
- listPendingInputs: (sessionId: string) => readonly SessionPendingInput[];
196
- steerQueuedInput: (sessionId: string, queuedInputId: string) => Promise<SessionSteerQueuedInputResult>;
197
- promotePreferredSteeringInput: (sessionRun: SessionRun, queuedInputId: string, session: AgentRunSession) => SessionRunPendingRequest | null;
198
- private supportsNextStepInput;
199
- private toPendingInput;
200
- private toQueuedInput;
201
- }
202
- //#endregion
203
- //#region src/services/agent-run-admission.service.d.ts
204
- /** Drains accepted ingress work before the restart owner snapshots active runs. */
205
- declare class AgentRunAdmissionService {
206
- private open;
207
- private active;
208
- private readonly waiters;
209
- suspend: () => Promise<void>;
210
- resume: () => void;
211
- accept: <T>(operation: () => Promise<T>) => Promise<T>;
212
- }
213
- //#endregion
214
- //#region src/managers/agent-run-request.manager.d.ts
215
- declare class AgentRunRequestManager {
216
- private readonly agentRuntimeManager;
217
- private readonly agentManager;
218
- private readonly configManager;
219
- private readonly agentContextWindowManager;
220
- private readonly eventBus;
221
- private readonly ingress;
222
- private readonly sessionManager;
223
- private readonly sessionRunManager;
224
- private readonly diagnostics?;
225
- private readonly executionClaims?;
226
- readonly cleanups: Array<() => void>;
227
- private readonly observedSessionRuns;
228
- private readonly sessionCommandManager;
229
- private readonly idempotency;
230
- private readonly runtimeRuns;
231
- readonly pendingInputs: AgentRunInputDeliveryService;
232
- private started;
233
- readonly admissions: AgentRunAdmissionService;
234
- constructor(agentRuntimeManager: AgentRuntimeManager, agentManager: AgentManager, configManager: ConfigManager, agentContextWindowManager: AgentContextWindowManager, eventBus: EventBus$1, ingress: Ingress$1, sessionManager: SessionManager, sessionRunManager: SessionRunManager, diagnostics?: Pick<DiagnosticRuntime, "record"> | undefined, executionClaims?: LocalExecutionClaimService | undefined);
235
- start: () => void;
236
- dispose: () => void;
237
- continueRunIfEligible: (request: AgentRunContinueRequest) => Promise<AgentRunAccepted | null>;
238
- private handleSendRequest;
239
- private handleAbortRequest;
240
- private handleEditMessageRequest;
241
- private handleContinueRequest;
242
- private handleSessionMessageRequest;
243
- private send;
244
- private sendOnce;
245
- private startQueuedRun;
246
- private resolveQueuedRunSpec;
247
- private claimSessionExecutionOrFail;
248
- private startRuntimeRun;
249
- private publishRunStartupFailure;
250
- private startNextQueuedRun;
251
- private observeSessionRun;
252
- private publishRunQueueUpdated;
253
- private publishNcpEvent;
254
- private getOrCreateSessionForRequest;
255
- private abort;
256
- }
257
- //#endregion
258
- //#region src/types/access.types.d.ts
259
- type AccessRole = "admin";
260
- type AccessPrincipal = {
261
- id: string;
262
- role: AccessRole;
263
- };
264
- type AccessSessionRecord = {
265
- tokenHash: string;
266
- principal: AccessPrincipal;
267
- createdAt: string;
268
- expiresAt: string;
269
- };
270
- type AccessSessionState = {
271
- kind: "nextclaw.access.sessions";
272
- version: 1;
273
- sessions: AccessSessionRecord[];
274
- };
275
- type AccessPasswordStatus = {
276
- enabled: boolean;
277
- configured: boolean;
278
- authenticated: boolean;
279
- username?: string;
280
- };
281
- type AccessLoginResult = {
282
- status: AccessPasswordStatus;
283
- token?: string;
284
- expiresAt?: string;
285
- };
286
- //#endregion
287
- //#region src/stores/access-session.store.d.ts
288
- declare class AccessSessionStore {
289
- private readonly storePath;
290
- constructor(storePath: string);
291
- findPrincipalByToken: (token: string | null | undefined, now: Date) => AccessPrincipal | null;
292
- saveSession: (session: AccessSessionRecord, now: Date) => void;
293
- deleteToken: (token: string | null | undefined) => void;
294
- clear: () => void;
295
- private readState;
296
- private writeState;
297
- }
298
- //#endregion
299
- //#region src/managers/access.manager.d.ts
300
- type AccessManagerOptions = {
301
- configManager?: ConfigManager;
302
- configPath?: string;
303
- homeDir?: string;
304
- sessionStorePath?: string;
305
- sessionTtlMs?: number;
306
- now?: () => Date;
307
- };
308
- declare class AccessManager {
309
- private readonly options;
310
- readonly sessions: AccessSessionStore;
311
- private readonly configPath;
312
- private readonly sessionTtlMs;
313
- private readonly now;
314
- constructor(options?: AccessManagerOptions);
315
- isPasswordProtectionEnabled: () => boolean;
316
- authenticateSession: (token: string | null | undefined) => AccessPrincipal | null;
317
- getPasswordAuthStatus: (token: string | null | undefined) => AccessPasswordStatus;
318
- setupPasswordAdmin: (input: {
319
- username: string;
320
- password: string;
321
- }) => Promise<AccessLoginResult>;
322
- loginWithPassword: (input: {
323
- username: string;
324
- password: string;
325
- }) => AccessLoginResult;
326
- logout: (token: string | null | undefined) => void;
327
- updatePassword: (input: {
328
- token: string | null | undefined;
329
- password: string;
330
- }) => Promise<AccessLoginResult>;
331
- setPasswordAuthEnabled: (input: {
332
- token: string | null | undefined;
333
- enabled: boolean;
334
- }) => Promise<AccessLoginResult>;
335
- createTrustedSession: () => AccessLoginResult | null;
336
- private loadCurrentConfig;
337
- private saveCurrentConfig;
338
- private readAuthConfig;
339
- private isConfigured;
340
- private createLoginResult;
341
- private createSession;
342
- }
343
- //#endregion
344
- //#region src/managers/automation.manager.d.ts
345
- type AutomationManagerOptions = {
346
- storePath: string;
347
- diagnostics?: Pick<DiagnosticRuntime, "record">;
348
- };
349
- declare class AutomationManager extends CronService {
350
- constructor(options: AutomationManagerOptions);
351
- }
352
- //#endregion
353
- //#region src/types/service-app.types.d.ts
354
- type ServiceAppProtocol = "mcp" | "wasi-component";
355
- type ServiceActionRisk = "read" | "write" | "external" | "dangerous";
356
- type ServiceAppRuntimeStatus = "idle" | "starting" | "running" | "failed" | "stopped";
357
- type ServiceAppManifestAction = {
358
- risk?: ServiceActionRisk;
359
- title?: string;
360
- description?: string;
361
- inputSchema?: Record<string, unknown>;
362
- timeoutMs?: number;
363
- };
364
- type ServiceAppLifecycle = {
365
- mode: "action";
366
- } | {
367
- mode: "resident";
368
- eventIntervalMs: number;
369
- } | {
370
- mode: "provider";
371
- };
372
- /**
373
- * A dependency intentionally kept outside a portable `.napp` artifact.
374
- * It never carries credentials, connection strings, or installation commands.
375
- */
376
- type ServiceAppExternalRemediation = {
377
- kind: "agent-setup";
378
- summary: string;
379
- requiresUserAction?: boolean;
380
- };
381
- /**
382
- * The versioned WIT surface used by a capability Provider and its Consumers.
383
- * A Provider carries an exact semver release; a Consumer carries the range it
384
- * accepts. This declaration is static manifest metadata, never a registry.
385
- */
386
- type ServiceAppWitContract = {
387
- package: string;
388
- interface: string;
389
- version: string;
390
- };
391
- type ServiceAppCapabilityRequirement = {
392
- id: string;
393
- version?: string; /** A Provider Component packaged beside this Consumer. */
394
- provider?: string;
395
- wit?: ServiceAppWitContract;
396
- title?: string;
397
- description?: string;
398
- remediation?: ServiceAppExternalRemediation;
399
- };
400
- type ServiceAppResourceRequirement = {
401
- binding: string;
402
- type: string;
403
- required?: boolean;
404
- title?: string;
405
- description?: string;
406
- remediation?: ServiceAppExternalRemediation;
407
- };
408
- /**
409
- * A portable Guest can name a slot but never a provider, model, or Agent.
410
- * The Kernel binds the slot through a capability grant after installation.
411
- */
412
- type ServiceAppModelCapabilitySlot = {
413
- id: string;
414
- title: string;
415
- description: string;
416
- required: boolean;
417
- maxTokens?: number;
418
- timeoutMs?: number;
419
- };
420
- type ServiceAppAgentCapabilitySlot = {
421
- id: string;
422
- title: string;
423
- description: string;
424
- required: boolean;
425
- };
426
- type ServiceAppRequirements = {
427
- capabilities?: ServiceAppCapabilityRequirement[];
428
- resources?: ServiceAppResourceRequirement[];
429
- modelSlots?: ServiceAppModelCapabilitySlot[];
430
- agentSlots?: ServiceAppAgentCapabilitySlot[];
431
- };
432
- /**
433
- * A stable capability exposed by a Service Provider App. Provider identity is
434
- * still the Service id; this declaration only describes what it can satisfy.
435
- */
436
- type ServiceAppCapabilityProvision = {
437
- id: string;
438
- version: string;
439
- wit?: ServiceAppWitContract;
440
- resourceTypes?: string[];
441
- };
442
- type ServiceAppProvides = {
443
- capabilities?: ServiceAppCapabilityProvision[];
444
- };
445
- type ServiceAppManifest = {
446
- id: string;
447
- title: string;
448
- description?: string;
449
- enabled: boolean;
450
- protocol: ServiceAppProtocol;
451
- command?: string;
452
- args?: string[];
453
- componentEntry?: string;
454
- providerIds?: string[];
455
- lifecycle?: ServiceAppLifecycle;
456
- requires?: ServiceAppRequirements;
457
- provides?: ServiceAppProvides;
458
- actions: Record<string, ServiceAppManifestAction>;
459
- };
460
- type ServiceAppRecord = {
461
- id: string;
462
- title: string;
463
- description?: string;
464
- dirPath: string;
465
- manifestPath: string;
466
- command?: string;
467
- args?: string[];
468
- cwd: string;
469
- enabled: boolean;
470
- protocol: ServiceAppProtocol;
471
- status: ServiceAppRuntimeStatus;
472
- lastError?: string;
473
- lastStartedAt?: string;
474
- lastReadyAt?: string;
475
- lastFailedAt?: string;
476
- sourceKind?: "workspace" | "package";
477
- packageId?: string;
478
- packageVersion?: string;
479
- packageDirectory?: string;
480
- dataDirectory?: string;
481
- instanceId?: string;
482
- storage?: AppStorageContext;
483
- isolation?: AppRuntimeIsolation;
484
- runtimeProfile?: AppRuntimeProfile;
485
- permissions?: AppPermissions;
486
- componentPath?: string;
487
- providerIds?: string[];
488
- lifecycle?: ServiceAppLifecycle;
489
- };
490
- type ServiceActionGrantState = "granted" | "not-granted" | "not-declared";
491
- type ServiceActionRuntimeState = "matched" | "missing" | "undeclared";
492
- type ServiceAction = {
493
- id: string;
494
- appId: string;
495
- name: string;
496
- title?: string;
497
- description?: string;
498
- inputSchema?: Record<string, unknown>;
499
- risk: ServiceActionRisk;
500
- runtimeState?: ServiceActionRuntimeState;
501
- grantState?: ServiceActionGrantState;
502
- };
503
- type PanelServiceActionCaller = {
504
- surface: "panel-app";
505
- appId: string;
506
- };
507
- type AgentServiceActionCaller = {
508
- surface: "agent";
509
- agentId: string;
510
- };
511
- type ServiceActionCaller = PanelServiceActionCaller | AgentServiceActionCaller;
512
- type ServiceActionGrant = {
513
- caller: ServiceActionCaller;
514
- actionId: string;
515
- risk: ServiceActionRisk;
516
- grantedAt: string;
517
- };
518
- type ServiceActionInvokeRequest = {
519
- caller: ServiceActionCaller;
520
- declaredActions?: string[];
521
- input?: Record<string, unknown>;
522
- };
523
- type ServiceActionInvokeResult = {
524
- actionId: string;
525
- result: unknown;
526
- invocation?: ServiceActionInvocationFacts;
527
- };
528
- /**
529
- * Durable status for an explicitly asynchronous Service App invocation.
530
- * Terminal statuses are intentionally irreversible: a retry is a new job
531
- * linked through `retryOf`, never a rewrite of the original execution.
532
- */
533
- type ServiceAppJobStatus = "queued" | "starting" | "running" | "succeeded" | "cancel-requested" | "cancelled" | "timed-out" | "failed" | "interrupted";
534
- type ServiceAppTerminalJobStatus = Extract<ServiceAppJobStatus, "succeeded" | "cancelled" | "timed-out" | "failed" | "interrupted">;
535
- type ServiceAppJobCaller = {
536
- surface: "panel" | "agent" | "installed-app-cli";
537
- id?: string;
538
- };
539
- type ServiceAppJobView = {
540
- id: string;
541
- appId: string;
542
- instanceId: string;
543
- componentId: string;
544
- actionName: string;
545
- status: ServiceAppJobStatus;
546
- createdAt: string;
547
- updatedAt: string;
548
- startedAt?: string;
549
- completedAt?: string;
550
- cancelRequestedAt?: string;
551
- retryOf?: string;
552
- callId: string;
553
- traceId: string;
554
- caller?: ServiceAppJobCaller;
555
- error?: {
556
- code?: string;
557
- message: string;
558
- };
559
- };
560
- type ServiceAppJobProgressEvent = {
561
- type: "progress";
562
- current?: number;
563
- total?: number;
564
- message?: string;
565
- };
566
- type ServiceAppJobChunkEvent = {
567
- type: "stream-chunk";
568
- content: string;
569
- };
570
- type ServiceAppJobTerminalEvent = {
571
- type: "terminal";
572
- status: ServiceAppTerminalJobStatus;
573
- error?: {
574
- code?: string;
575
- message: string;
576
- };
577
- };
578
- type ServiceAppJobEvent = {
579
- sequence: number;
580
- timestamp: string;
581
- } & (ServiceAppJobProgressEvent | ServiceAppJobChunkEvent | ServiceAppJobTerminalEvent);
582
- type ServiceAppJobList = {
583
- entries: ServiceAppJobView[];
584
- };
585
- type ServiceAppJobWatch = {
586
- job: ServiceAppJobView;
587
- events: ServiceAppJobEvent[]; /** Pass this value back as `afterSequence` to resume without a gap. */
588
- cursor: number;
589
- };
590
- /**
591
- * Durable host-owned delivery state for a Resident event. A Resident is a
592
- * serial lane, therefore an acknowledged event is the only state permitted
593
- * to advance that stream's cursor. Event payload is retained only in the
594
- * App instance journal, never in VerificationRecord evidence.
595
- */
596
- type ServiceAppResidentEventStatus = "received" | "pending" | "leased" | "acked" | "retry-wait" | "dead-letter";
597
- type ServiceAppResidentEventDisposition = {
598
- kind: "ack";
599
- } | {
600
- kind: "retry";
601
- delayMs?: number;
602
- error?: {
603
- code?: string;
604
- message?: string;
605
- };
606
- };
607
- type ServiceAppResidentEventView = {
608
- id: string;
609
- appId: string;
610
- instanceId: string;
611
- componentId: string;
612
- eventId: string;
613
- streamKey: string;
614
- sequence: number;
615
- status: ServiceAppResidentEventStatus;
616
- receivedAt: string;
617
- updatedAt: string;
618
- attempt: number;
619
- leaseExpiresAt?: string;
620
- nextAttemptAt?: string;
621
- ackedAt?: string;
622
- deadLetteredAt?: string;
623
- lastError?: {
624
- code?: string;
625
- message: string;
626
- };
627
- };
628
- type ServiceAppResidentEventList = {
629
- entries: ServiceAppResidentEventView[];
630
- cursors: Record<string, number>;
631
- frozen: boolean;
632
- };
633
- type ServiceActionInvocationFacts = {
634
- callId: string;
635
- traceId: string;
636
- dataVersion: string;
637
- verificationRunId: string;
638
- };
639
- type ServiceActionGrantRequest = {
640
- caller: ServiceActionCaller;
641
- declaredActions?: string[];
642
- };
643
- //#endregion
644
- //#region src/types/app-package.types.d.ts
645
- type AppPackageComponentKind = "panel" | "service";
646
- type AppPackageComponentSource = {
647
- kind: AppPackageComponentKind;
648
- id: string;
649
- packageId: string;
650
- packageVersion: string;
651
- sourcePath: string;
652
- manifestPath: string;
653
- dataDirectory: string;
654
- instanceId: string;
655
- storage: AppStorageContext;
656
- runtimeProfile: AppRuntimeProfile;
657
- isolation: AppRuntimeIsolation;
658
- permissions: AppPermissions;
659
- resolvedProviderIds?: string[];
660
- };
661
- type CapabilityProviderView = {
662
- providerId: string;
663
- appId: string;
664
- componentId: string;
665
- capabilities: Array<{
666
- id: string;
667
- version?: string;
668
- resourceTypes?: string[];
669
- wit?: ServiceAppWitContract;
670
- }>;
671
- };
672
- type AppPackageUnavailableDiagnostic = {
673
- appId: string;
674
- message: string;
675
- };
676
- type AppPackageComponentSourceList = {
677
- sources: AppPackageComponentSource[];
678
- unavailablePackages: AppPackageUnavailableDiagnostic[];
679
- };
680
- type AppPackageComponentView = AppPackageComponentSource & {
681
- title?: string;
682
- description?: string;
683
- icon?: string;
684
- titleI18n?: Record<string, string>;
685
- descriptionI18n?: Record<string, string>;
686
- };
687
- type AppPackageReadinessStatus = "ready" | "needs-capability" | "needs-configuration";
688
- type AppPackageReadinessRequirement = {
689
- componentId: string;
690
- kind: "capability" | "configuration";
691
- id: string;
692
- title: string;
693
- description?: string;
694
- remediation?: {
695
- kind: "agent-setup";
696
- summary: string;
697
- requiresUserAction?: boolean;
698
- };
699
- };
700
- type AppPackageReadiness = {
701
- status: AppPackageReadinessStatus;
702
- requirements: AppPackageReadinessRequirement[];
703
- };
704
- type AppPackageSecretStatus = "bound" | "ready" | "unbound" | "unresolved";
705
- type AppPackageSecretSlotView = Pick<AppSecretSlot, "id" | "title" | "description" | "required"> & {
706
- status: AppPackageSecretStatus;
707
- binding?: AppSecretBinding;
708
- errorCode?: "SECRET_BINDING_MISSING" | "SECRET_RESOLUTION_FAILED";
709
- };
710
- type AppPackageSecretReadiness = {
711
- readiness: AppPackageReadiness;
712
- slots: AppPackageSecretSlotView[];
713
- };
714
- type AppPackageDependencyBinding = {
715
- componentId: string;
716
- requirementKind: "capability" | "resource";
717
- requirementId: string;
718
- providerId: string;
719
- };
720
- type AppPackageDependencyCandidate = {
721
- requirement: AppPackageReadinessRequirement;
722
- providers: CapabilityProviderView[];
723
- };
724
- type AppPackageDependencyDiagnosticCode = "CAPABILITY_LEGACY_CONTRACT" | "CAPABILITY_PROVIDER_MISSING" | "CAPABILITY_VERSION_INCOMPATIBLE" | "CAPABILITY_WIT_INCOMPATIBLE" | "CAPABILITY_BINDING_MISSING" | "CAPABILITY_PROVIDER_UNAVAILABLE" | "PROVIDER_DEPENDENCY_CYCLE" | "RESOURCE_PROVIDER_MISSING" | "RESOURCE_BINDING_MISSING" | "RESOURCE_PROVIDER_UNAVAILABLE";
725
- type AppPackageDependencyDiagnostic = {
726
- code: AppPackageDependencyDiagnosticCode;
727
- componentId: string;
728
- requirementKind: "capability" | "resource";
729
- requirementId: string;
730
- providerId?: string;
731
- message: string;
732
- };
733
- type AppPackageDependencyCycle = {
734
- componentId: string;
735
- providerIds: string[];
736
- };
737
- type AppPackageDependencyView = {
738
- readiness: AppPackageReadiness;
739
- bindings: AppPackageDependencyBinding[];
740
- candidates: AppPackageDependencyCandidate[];
741
- resolvedProviderIds: Record<string, string[]>;
742
- diagnostics: AppPackageDependencyDiagnostic[];
743
- };
744
- type AppPackageDependencyBindingInput = {
745
- componentId: string;
746
- requirementKind: "capability" | "resource";
747
- requirementId: string;
748
- providerId: string;
749
- };
750
- type AppPackageView = {
751
- id: string;
752
- name: string;
753
- description?: string;
754
- icon?: string;
755
- nameI18n?: Record<string, string>;
756
- descriptionI18n?: Record<string, string>;
757
- activeVersion: string;
758
- installedVersions: string[];
759
- enabled: boolean;
760
- builtIn: boolean;
761
- primaryPanelId?: string;
762
- components: AppPackageComponentView[];
763
- dataDirectory: string;
764
- instanceId: string;
765
- storage: AppStorageContext;
766
- storageUsage?: AppStorageUsage;
767
- runtimeProfile: AppRuntimeProfile;
768
- isolation: AppRuntimeIsolation;
769
- readiness: AppPackageReadiness;
770
- secrets: AppPackageSecretReadiness;
771
- dependencies: AppPackageDependencyView;
772
- documentAccess: AppDocumentGrantState[];
773
- };
774
- type AppPackageHostTarget = {
775
- key: string;
776
- operatingSystem: "darwin" | "linux" | "win32";
777
- architecture: "x64" | "arm64";
778
- abi?: "gnu" | "musl" | "msvc";
779
- };
780
- type AppPackageList = {
781
- entries: AppPackageView[];
782
- hostTarget?: AppPackageHostTarget;
783
- };
784
- type AppPackageOperationAction = "install" | "rollback" | "uninstall" | "update";
785
- type AppPackageOperationStatus = "queued" | "resolving" | "downloading" | "verifying" | "installing" | "finalizing" | "succeeded" | "failed" | "interrupted";
786
- type AppPackageOperationInput = {
787
- action: "install";
788
- source: string;
789
- registryUrl?: string;
790
- } | {
791
- action: "update";
792
- appId: string;
793
- version?: string;
794
- registryUrl?: string;
795
- } | {
796
- action: "rollback";
797
- appId: string;
798
- version: string;
799
- } | {
800
- action: "uninstall";
801
- appId: string;
802
- purgeData?: boolean;
803
- };
804
- type AppPackageOperationResult = {
805
- appId: string;
806
- activeVersion?: string;
807
- changed?: boolean;
808
- removedVersions?: string[];
809
- dataRemoved?: boolean;
810
- };
811
- type AppPackageOperationView = {
812
- id: string;
813
- action: AppPackageOperationAction;
814
- appId?: string;
815
- source?: string;
816
- targetVersion?: string;
817
- status: AppPackageOperationStatus;
818
- completedSteps: number;
819
- totalSteps: number;
820
- createdAt: string;
821
- updatedAt: string;
822
- completedAt?: string;
823
- error?: string;
824
- result?: AppPackageOperationResult;
825
- };
826
- type AppPackageOperationList = {
827
- entries: AppPackageOperationView[];
828
- };
829
- type AppPackageConflict = {
830
- componentId: string;
831
- componentKind: AppPackageComponentKind;
832
- conflictingSource: string;
833
- };
834
- type AppPackageUninstallRollback = () => Promise<void>;
835
- type AppPackageRuntimeHooks = {
836
- listCapabilityProviders: () => Promise<CapabilityProviderView[]>;
837
- assertCanActivate: (sources: AppPackageComponentSource[]) => Promise<void>;
838
- afterActivate: (sources: AppPackageComponentSource[]) => Promise<void>;
839
- beforeDeactivate: (sources: AppPackageComponentSource[]) => Promise<void>;
840
- prepareCapabilityChange: (sources: AppPackageComponentSource[]) => Promise<AppPackageUninstallRollback>;
841
- afterCapabilityChange: (sources: AppPackageComponentSource[]) => Promise<void>;
842
- beforeUninstall: (sources: AppPackageComponentSource[]) => Promise<AppPackageUninstallRollback | void>;
843
- };
844
- type AppPackageErrorCode = "APP_PACKAGE_CONFLICT" | "APP_PACKAGE_INCOMPATIBLE" | "APP_PACKAGE_NOT_READY" | "APP_PACKAGE_NOT_FOUND" | "APP_PACKAGE_DEPENDENCY_MISSING" | "APP_PACKAGE_DEPENDENCY_INCOMPATIBLE" | "APP_PACKAGE_DEPENDENCY_CYCLE" | "APP_PACKAGE_OPERATION_FAILED" | "SECRET_SLOT_NOT_DECLARED" | "SECRET_BINDING_MISSING" | "SECRET_RESOLUTION_FAILED" | "DOCUMENT_SCOPE_NOT_DECLARED" | "DOCUMENT_SCOPE_NOT_GRANTED" | "DOCUMENT_SCOPE_MODE_INSUFFICIENT" | "DOCUMENT_SCOPE_UNAVAILABLE" | "DOCUMENT_SCOPE_MUTATION_FAILED";
845
- declare class AppPackageError extends Error {
846
- readonly code: AppPackageErrorCode;
847
- constructor(code: AppPackageErrorCode, message: string);
848
- }
849
- declare function isAppPackageError(error: unknown): error is AppPackageError;
850
- //#endregion
851
- //#region src/managers/app-package.manager.d.ts
852
- declare class AppPackageManager {
853
- private readonly params;
854
- private readonly appHomeService;
855
- private readonly installationService;
856
- private readonly manifestService;
857
- private readonly operationManager;
858
- private readonly hostTargetService;
859
- private readonly presentationService;
860
- private readonly dependencyCoordinator;
861
- private readonly componentCatalog;
862
- private readonly runtimeActivationService;
863
- private readonly registryService;
864
- private readonly grantService;
865
- private readonly documentAccessService;
866
- private readonly readinessManager;
867
- private runtimeHooks;
868
- private builtInBootstrapPromise;
869
- private builtInDefinitionsPromise;
870
- constructor(params: {
871
- appHomeDirectory: string;
872
- builtInAppsDirectory?: string;
873
- productVersion?: string;
874
- getSecretConfig?: () => Config;
875
- secretConfigPath?: string;
876
- });
877
- installRuntimeHooks: (hooks: Partial<AppPackageRuntimeHooks>) => void;
878
- start: () => Promise<void>;
879
- listPackages: (options?: {
880
- includeStorageUsage?: boolean;
881
- }) => Promise<AppPackageList>;
882
- listInstalledDataOwners: () => Promise<Array<{
883
- id: string;
884
- name: string;
885
- }>>;
886
- getPackage: (appId: string) => Promise<AppPackageView>;
887
- resolvePrimaryPanelId: (appId: string) => Promise<string | undefined>;
888
- inspectDependencies: (appId: string) => Promise<AppPackageDependencyView>;
889
- verifyDependencies: (appId: string) => Promise<AppPackageDependencyView>;
890
- setupDependencies: (appId: string) => Promise<AppPackageDependencyView>;
891
- bindDependency: (appId: string, input: AppPackageDependencyBindingInput) => Promise<AppPackageDependencyView>;
892
- unbindDependency: (appId: string, input: Omit<AppPackageDependencyBindingInput, "providerId">) => Promise<AppPackageDependencyView>;
893
- inspectSecrets: (appId: string) => Promise<AppPackageSecretReadiness>;
894
- verifySecrets: (appId: string) => Promise<AppPackageSecretReadiness>;
895
- bindSecret: (appId: string, input: {
896
- slotId: string;
897
- binding: AppSecretBinding;
898
- }) => Promise<AppPackageSecretReadiness>;
899
- unbindSecret: (appId: string, slotId: string) => Promise<AppPackageSecretReadiness>;
900
- inspectDocumentAccess: (appId: string) => Promise<_$_nextclaw_app_runtime0.AppInstalledPermissionState>;
901
- assertDocumentAccess: (appId: string, scopeId: string, requestedMode: "read" | "read-write") => Promise<void>;
902
- grantDocumentAccess: (appId: string, input: {
903
- scopeId: string;
904
- directoryPath: string;
905
- mode: "read" | "read-write";
906
- }) => Promise<_$_nextclaw_app_runtime0.AppDocumentGrantMutationResult>;
907
- revokeDocumentAccess: (appId: string, scopeId: string) => Promise<_$_nextclaw_app_runtime0.AppDocumentGrantMutationResult>;
908
- listActiveComponentSources: () => Promise<AppPackageComponentSource[]>;
909
- listActiveComponentSourcesWithDiagnostics: () => Promise<AppPackageComponentSourceList>;
910
- listOperations: () => Promise<AppPackageOperationList>;
911
- startOperation: (input: AppPackageOperationInput) => Promise<AppPackageOperationView>;
912
- install: (source: string, registryUrl?: string, onProgress?: AppInstallProgressHandler) => Promise<AppPackageView>;
913
- enable: (appId: string) => Promise<AppPackageView>;
914
- disable: (appId: string) => Promise<AppPackageView>;
915
- update: (appId: string, options?: {
916
- version?: string;
917
- registryUrl?: string;
918
- onProgress?: AppInstallProgressHandler;
919
- }) => Promise<{
920
- package: AppPackageView;
921
- result: AppUpdateResult;
922
- }>;
923
- rollback: (appId: string, version: string) => Promise<{
924
- package: AppPackageView;
925
- result: AppRollbackResult;
926
- }>;
927
- uninstall: (appId: string, purgeData: boolean) => Promise<AppUninstallResult>;
928
- private ensureBuiltInPackages;
929
- private installBuiltInPackages;
930
- private readListedPackageView;
931
- private resolveSecurity;
932
- private toComponentSources;
933
- private listBuiltInDefinitions;
934
- private isBuiltInAppId;
935
- private executeOperation;
936
- private isMissingFileError;
937
- private isTransientUninstallRead;
938
- }
939
- //#endregion
940
- //#region src/types/app-data.types.d.ts
941
- type AppDataSource = "package" | "workspace-service";
942
- type AppDataLifecycle = "active" | "retained";
943
- type AppDataEntry = {
944
- id: string;
945
- appId: string;
946
- instanceId: string;
947
- publisherId?: string;
948
- displayName: string;
949
- source: AppDataSource;
950
- lifecycle: AppDataLifecycle;
951
- storage: AppStorageContext;
952
- usage: AppStorageUsage;
953
- createdAt: string;
954
- migratedAt?: string;
955
- actions: {
956
- deleteRetainedData: boolean;
957
- };
958
- };
959
- type AppDataDiagnostic = {
960
- source: AppDataSource;
961
- instanceDirectory: string;
962
- message: string;
963
- };
964
- type AppDataList = {
965
- entries: AppDataEntry[];
966
- diagnostics: AppDataDiagnostic[];
967
- };
968
- type AppDataDeleteResult = {
969
- deleted: true;
970
- id: string;
971
- appId: string;
972
- instanceId: string;
973
- };
974
- type AppDataErrorCode = "APP_DATA_ACTIVE" | "APP_DATA_CONFIRMATION_MISMATCH" | "APP_DATA_INVALID_ID" | "APP_DATA_NOT_FOUND";
975
- declare class AppDataError extends Error {
976
- readonly code: AppDataErrorCode;
977
- constructor(code: AppDataErrorCode, message: string);
978
- }
979
- declare function isAppDataError(error: unknown): error is AppDataError;
980
- //#endregion
981
- //#region src/managers/app-data.manager.d.ts
982
- type WorkspaceDataOwner = {
983
- id: string;
984
- title: string;
985
- };
986
- declare class AppDataManager {
987
- private readonly params;
988
- private readonly appHomeService;
989
- private readonly fileLockService;
990
- private readonly inventoryService;
991
- private reconciliationDiagnostics;
992
- constructor(params: {
993
- appHomeDirectory: string;
994
- getWorkspacePath: () => string;
995
- listInstalledPackageOwners: () => Promise<Array<{
996
- id: string;
997
- name: string;
998
- }>>;
999
- listWorkspaceDataOwners: () => Promise<WorkspaceDataOwner[]>;
1000
- });
1001
- start: () => Promise<void>;
1002
- list: () => Promise<AppDataList>;
1003
- deleteRetained: (dataId: string, confirmAppId: string) => Promise<AppDataDeleteResult>;
1004
- private deletePackageData;
1005
- private deleteWorkspaceData;
1006
- private toEntry;
1007
- private createDataId;
1008
- private parseDataId;
1009
- private isPackageActive;
1010
- private isWorkspaceServiceActive;
1011
- private getWorkspaceInstancesRoot;
1012
- private workspaceScope;
1013
- private rethrowMissing;
1014
- private isMissingFileError;
1015
- }
1016
- //#endregion
1017
- //#region src/features/capability-grants/types/capability-grant.types.d.ts
1018
- type CapabilityGrantSubject = {
1019
- type: string;
1020
- id: string;
1021
- };
1022
- type CapabilityGrantResource = {
1023
- type: string;
1024
- target: unknown;
1025
- };
1026
- type CapabilityGrantRequest = {
1027
- subject: CapabilityGrantSubject;
1028
- resource: CapabilityGrantResource;
1029
- access: string[];
1030
- declarationFingerprint: string;
1031
- };
1032
- type CapabilityGrant = CapabilityGrantRequest & {
1033
- grantedAt: string;
1034
- lastUsedAt?: string;
1035
- };
1036
- type CapabilityGrantFilter = {
1037
- subject?: Partial<CapabilityGrantSubject>;
1038
- resourceType?: string;
1039
- target?: unknown;
1040
- access?: string[];
1041
- };
1042
- type CapabilityGrantDecision = {
1043
- granted: true;
1044
- grant: CapabilityGrant;
1045
- } | {
1046
- granted: false;
1047
- reason: "authorization_required";
1048
- };
1049
- //#endregion
1050
- //#region src/features/capability-grants/managers/capability-grant.manager.d.ts
1051
- type CapabilityGrantListener = (grants: CapabilityGrant[]) => void | Promise<void>;
1052
- type CapabilityGrantRevocationListener = CapabilityGrantListener;
1053
- declare class CapabilityGrantManager {
1054
- private readonly store;
1055
- private readonly grantListeners;
1056
- private readonly revocationListeners;
1057
- constructor(storePath: string);
1058
- check: (request: CapabilityGrantRequest) => Promise<CapabilityGrantDecision>;
1059
- require: (request: CapabilityGrantRequest) => Promise<CapabilityGrant>;
1060
- grant: (request: CapabilityGrantRequest, grantedAt?: string) => Promise<CapabilityGrant>;
1061
- list: (filter?: CapabilityGrantFilter) => Promise<CapabilityGrant[]>;
1062
- revoke: (filter: CapabilityGrantFilter) => Promise<CapabilityGrant[]>;
1063
- revokeMatching: (matches: (grant: CapabilityGrant) => boolean) => Promise<CapabilityGrant[]>;
1064
- import: (grants: CapabilityGrant[]) => Promise<void>;
1065
- replace: (grants: CapabilityGrant[]) => Promise<void>;
1066
- onGranted: (listener: CapabilityGrantListener) => (() => void);
1067
- onRevoked: (listener: CapabilityGrantRevocationListener) => (() => void);
1068
- }
1069
- //#endregion
1070
- //#region src/features/capability-grants/services/capability-grant-legacy-migration.service.d.ts
1071
- declare class CapabilityGrantLegacyMigrationService {
1072
- private readonly params;
1073
- private readonly sources;
1074
- constructor(params: {
1075
- capabilityGrantManager: CapabilityGrantManager;
1076
- markerPath: string;
1077
- validateGrant: (grant: CapabilityGrant) => Promise<boolean>;
1078
- workspacePath: string;
1079
- });
1080
- migrate: () => Promise<void>;
1081
- private readSources;
1082
- private assertImported;
1083
- private restore;
1084
- }
1085
- //#endregion
1086
- //#region src/features/capability-grants/stores/capability-grant.store.d.ts
1087
- declare class CapabilityGrantStore {
1088
- private readonly storePath;
1089
- private writeQueue;
1090
- constructor(storePath: string);
1091
- read: () => Promise<CapabilityGrant[]>;
1092
- replace: (grants: CapabilityGrant[]) => Promise<void>;
1093
- mutateGrants: (update: (grants: CapabilityGrant[]) => CapabilityGrant[]) => Promise<CapabilityGrant[]>;
1094
- private mutate;
1095
- private load;
1096
- private save;
1097
- }
1098
- //#endregion
1099
- //#region src/features/capability-grants/utils/capability-grant.utils.d.ts
1100
- declare function normalizeCapabilityGrantRequest(request: CapabilityGrantRequest): CapabilityGrantRequest;
1101
- declare function createCapabilityDeclarationFingerprint(value: unknown): string;
1102
- declare function getCapabilityGrantKey(request: CapabilityGrantRequest): string;
1103
- declare function capabilityGrantCovers(grant: CapabilityGrant, request: CapabilityGrantRequest): boolean;
1104
- declare function matchesCapabilityGrantFilter(grant: CapabilityGrant, filter: CapabilityGrantFilter): boolean;
1105
- //#endregion
1106
- //#region src/types/panel-app.types.d.ts
1107
- type PanelAppEntry = {
1108
- id: string;
1109
- appId: string;
1110
- fileName: string;
1111
- kind: "single-file" | "folder";
1112
- title: string;
1113
- description?: string;
1114
- icon?: string;
1115
- contentPath: string;
1116
- createdAt: string;
1117
- updatedAt: string;
1118
- sizeBytes: number;
1119
- favorite: boolean;
1120
- mainSidebar: boolean;
1121
- mainSidebarOrder?: number;
1122
- clientDeclared: boolean;
1123
- clientGranted: boolean;
1124
- lastOpenedAt?: string;
1125
- openCount: number;
1126
- sourceKind: "workspace" | "package";
1127
- packageId?: string;
1128
- packageVersion?: string;
1129
- };
1130
- type PanelAppList = {
1131
- workspacePath: string;
1132
- panelsPath: string;
1133
- entries: PanelAppEntry[];
1134
- unavailablePackages: Array<{
1135
- appId: string;
1136
- message: string;
1137
- }>;
1138
- };
1139
- type PanelAppContent = {
1140
- id: string;
1141
- appId: string;
1142
- fileName: string;
1143
- html: string;
1144
- contentType: "text/html; charset=utf-8";
1145
- capabilities: string[];
1146
- clientDeclared: boolean;
1147
- clientGranted: boolean;
1148
- serviceActions: string[];
1149
- };
1150
- type PanelAppDeleteResult = {
1151
- deleted: true;
1152
- fileName: string;
1153
- id: string;
1154
- };
1155
- type PanelAppBridgeSession = {
1156
- id: string;
1157
- token: string;
1158
- appId: string;
1159
- caller: PanelServiceActionCaller;
1160
- declaredCapabilities: string[];
1161
- declaredActions: string[];
1162
- clientDeclared: boolean;
1163
- createdAt: string;
1164
- expiresAt: string;
1165
- };
1166
- 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_ASSET_TOKEN_EXPIRED" | "PANEL_APP_ASSET_TOKEN_INVALID" | "PANEL_APP_BRIDGE_SESSION_NOT_FOUND" | "PANEL_APP_CAPABILITY_NOT_DECLARED" | "PANEL_APP_CLIENT_NOT_DECLARED" | "PANEL_APP_INVALID_ASSET_PATH" | "PANEL_APP_INVALID_ID" | "PANEL_APP_INVALID_SOURCE_PATH" | "PANEL_APP_MANIFEST_INVALID" | "PANEL_APP_MANAGED_SOURCE" | "PANEL_APP_NOT_FOUND" | "PANEL_APP_READ_FAILED";
1167
- declare class PanelAppError extends Error {
1168
- readonly code: PanelAppErrorCode;
1169
- constructor(code: PanelAppErrorCode, message: string);
1170
- }
1171
- declare function isPanelAppError(error: unknown): error is PanelAppError;
1172
- declare const PANEL_APP_AGENT_CAPABILITIES: readonly ["agent:send", "agent:generateObject"];
1173
- type PanelAppAgentCapability = typeof PANEL_APP_AGENT_CAPABILITIES[number];
1174
- declare function isPanelAppAgentCapability(value: unknown): value is PanelAppAgentCapability;
1175
- type PanelAppClientGrant = {
1176
- appId: string;
1177
- grantedAt: string;
1178
- };
1179
- type PanelAppCapabilityGrantCaller = {
1180
- surface: "panel-app";
1181
- appId: string;
1182
- };
1183
- type PanelAppCapabilityGrant = {
1184
- caller: PanelAppCapabilityGrantCaller;
1185
- capability: PanelAppAgentCapability;
1186
- grantedAt: string;
1187
- };
1188
- type PanelAppAgentSendPayload = {
1189
- sessionId?: string;
1190
- peerId?: string;
1191
- content: NcpMessagePart[];
1192
- message?: never;
1193
- metadata?: Record<string, unknown>;
1194
- } | {
1195
- sessionId?: string;
1196
- peerId?: string;
1197
- message: NcpMessage$1 | (Omit<NcpMessage$1, "sessionId"> & {
1198
- sessionId?: string;
1199
- });
1200
- content?: never;
1201
- metadata?: Record<string, unknown>;
1202
- };
1203
- type PanelAppAgentSendRequest = {
1204
- payload: PanelAppAgentSendPayload;
1205
- };
1206
- type PanelAppAgentSendResult = NcpRunHandle;
1207
- type PanelAppAgentRunClient = {
1208
- send: (input: AgentRunSendIngressPayload) => Promise<NcpRunHandle>;
1209
- sendAndStreamEvents: (input: AgentRunSendIngressPayload) => AsyncGenerator<NcpEndpointEvent$1>;
1210
- };
1211
- type PanelAppAgentGenerateObjectInput = {
1212
- peerId: string;
1213
- prompt: string;
1214
- context?: unknown;
1215
- schema: Record<string, unknown>;
1216
- title?: string;
1217
- timeoutMs?: number;
1218
- };
1219
- type PanelAppAgentGenerateObjectRequest = {
1220
- input: PanelAppAgentGenerateObjectInput;
1221
- };
1222
- type PanelAppAgentGenerateObjectResult = {
1223
- result: unknown;
1224
- };
1225
- //#endregion
1226
- //#region src/features/capability-grants/utils/capability-grant-resource.utils.d.ts
1227
- declare function createPanelAppClientGrantRequest(appId: string): CapabilityGrantRequest;
1228
- declare function createPanelAppAgentGrantRequest(caller: PanelServiceActionCaller, capability: PanelAppAgentCapability): CapabilityGrantRequest;
1229
- declare function createServiceActionGrantRequest(caller: ServiceActionCaller, action: ServiceAction): CapabilityGrantRequest;
1230
- declare function readServiceActionTargetId(target: unknown): string | null;
1231
- declare function createServiceAppModelSlotGrantRequest(app: ServiceAppRecord, slot: ServiceAppModelCapabilitySlot, modelId: string): CapabilityGrantRequest;
1232
- declare function createServiceAppAgentSlotGrantRequest(app: ServiceAppRecord, slot: ServiceAppAgentCapabilitySlot, agentId: string): CapabilityGrantRequest;
1233
- declare function readServiceAppSlotTarget(target: unknown): {
1234
- componentId: string;
1235
- slotId: string;
1236
- modelId?: string;
1237
- agentId?: string;
1238
- } | null;
1239
- //#endregion
1240
- //#region src/features/desktop-host/types/desktop-host.types.d.ts
1241
- declare const DESKTOP_HOST_PROTOCOL_VERSION: 1;
1242
- declare const DESKTOP_HOST_ACCESS: readonly ["ui.read", "ui.observe", "ui.write", "screen.capture-window", "input.keyboard", "input.pointer"];
1243
- type DesktopHostAccess = typeof DESKTOP_HOST_ACCESS[number];
1244
- type DesktopApplicationTarget = {
1245
- applicationId: string;
1246
- };
1247
- type ResolvedDesktopApplicationTarget = {
1248
- platform: "darwin";
1249
- applicationId: string;
1250
- bundleId: string;
1251
- } | {
1252
- platform: "win32";
1253
- applicationId: string;
1254
- appUserModelId?: string;
1255
- executableIdentity?: string;
1256
- } | {
1257
- platform: "linux";
1258
- applicationId: string;
1259
- desktopFileId?: string;
1260
- executableIdentity?: string;
1261
- };
1262
- type DesktopHostCaller = {
1263
- extensionId?: string;
1264
- agentId?: string;
1265
- sessionId?: string;
1266
- agentRunId?: string;
1267
- subscriptionId?: string;
1268
- };
1269
- type DesktopHostMethod = "host.hello" | "host.status" | "host.application.resolve" | "host.permissions.get" | "host.permissions.request" | "host.permissions.openSettings" | "host.ui.snapshot" | "host.ui.action" | "host.ui.observe" | "host.ui.unobserve" | "host.screen.captureWindow" | "host.input.click" | "host.input.typeText" | "host.input.pressKey";
1270
- type DesktopHostRequest = {
1271
- protocolVersion: typeof DESKTOP_HOST_PROTOCOL_VERSION;
1272
- requestId: string;
1273
- token: string;
1274
- method: DesktopHostMethod;
1275
- caller: DesktopHostCaller;
1276
- payload: unknown;
1277
- };
1278
- type DesktopHostResponse = {
1279
- protocolVersion: typeof DESKTOP_HOST_PROTOCOL_VERSION;
1280
- requestId: string;
1281
- ok: boolean;
1282
- result?: unknown;
1283
- error?: DesktopCapabilityError;
1284
- };
1285
- type DesktopHostEvent = {
1286
- protocolVersion: typeof DESKTOP_HOST_PROTOCOL_VERSION;
1287
- type: "host.event";
1288
- watchId: string;
1289
- event: unknown;
1290
- };
1291
- type DesktopHostStatus = {
1292
- online: boolean;
1293
- platform?: NodeJS.Platform;
1294
- protocolVersion?: number;
1295
- supportedAccess: DesktopHostAccess[];
1296
- supportedOperations: DesktopHostMethod[];
1297
- permissions: {
1298
- accessibility: "granted" | "not_granted" | "not_supported" | "unknown";
1299
- screenCapture: "granted" | "not_granted" | "not_supported" | "unknown";
1300
- };
1301
- };
1302
- type DesktopCapabilityErrorCode = "desktop_host_unavailable" | "desktop_host_protocol_mismatch" | "unsupported_platform" | "permission_not_granted" | "capability_not_declared" | "authorization_required" | "authorization_denied" | "target_not_running" | "window_not_found" | "element_not_found" | "stale_target" | "operation_not_supported" | "payload_limit_exceeded" | "host_operation_failed";
1303
- type DesktopCapabilityError = {
1304
- code: DesktopCapabilityErrorCode;
1305
- message: string;
1306
- recovery?: {
1307
- action: "open_settings" | "start_desktop" | "show_authorization" | "refresh_target" | "update_desktop";
1308
- };
1309
- request?: unknown;
1310
- };
1311
- type DesktopHostCapabilityDeclaration = {
1312
- access: DesktopHostAccess[];
1313
- };
1314
- type DesktopHostManifest = {
1315
- id: string;
1316
- contributes?: {
1317
- hostCapabilities?: {
1318
- desktopAutomation?: DesktopHostCapabilityDeclaration;
1319
- };
1320
- };
1321
- };
1322
- //#endregion
1323
- //#region src/features/desktop-host/services/desktop-host.service.d.ts
1324
- type DesktopHostEventListener = (event: DesktopHostEvent) => void;
1325
- /**
1326
- * The Kernel-facing boundary for the local desktop host. A runtime host owns
1327
- * its platform implementation; the Kernel owns grants and caller identity.
1328
- */
1329
- type DesktopHost = {
1330
- status: () => Promise<DesktopHostStatus>;
1331
- invoke: <T>(method: DesktopHostMethod, payload: Record<string, unknown>, caller: DesktopHostCaller) => Promise<T>;
1332
- onEvent: (listener: DesktopHostEventListener) => () => void;
1333
- dispose: () => Promise<void>;
1334
- };
1335
- declare function createDesktopHostError(error: DesktopCapabilityError): Error;
1336
- /** Used by short-lived Kernel entry points which do not own a local host. */
1337
- declare class UnavailableDesktopHost implements DesktopHost {
1338
- status: () => Promise<DesktopHostStatus>;
1339
- invoke: <T>() => Promise<T>;
1340
- onEvent: () => (() => void);
1341
- dispose: () => Promise<void>;
1342
- }
1343
- //#endregion
1344
- //#region src/features/desktop-host/managers/desktop-host-capability.manager.d.ts
1345
- declare class DesktopHostCapabilityManager {
1346
- private readonly options;
1347
- private readonly watches;
1348
- private readonly removeEventListener;
1349
- private readonly removeGrantListener;
1350
- private readonly removeRevocationListener;
1351
- constructor(options: {
1352
- capabilityGrantManager: CapabilityGrantManager;
1353
- host: DesktopHost;
1354
- findManifest: (extensionId: string) => DesktopHostManifest;
1355
- hasAgent?: (agentId: string) => boolean;
1356
- onAuthorizationRequired?: (input: {
1357
- applicationId: string;
1358
- caller: DesktopHostCaller;
1359
- request: CapabilityGrantRequest;
1360
- }) => void;
1361
- onEvent?: (input: {
1362
- extensionId: string;
1363
- generation: string;
1364
- watchId: string;
1365
- event: unknown;
1366
- }) => void;
1367
- onObservationAuthorizationRevoked?: (input: {
1368
- extensionId: string;
1369
- subscriptionId: string;
1370
- }) => Promise<void>;
1371
- onObservationAuthorizationGranted?: (input: {
1372
- extensionId: string;
1373
- }) => Promise<void>;
1374
- });
1375
- status: () => Promise<DesktopHostStatus>;
1376
- getPermissions: () => Promise<DesktopHostStatus["permissions"]>;
1377
- requestPermissions: () => Promise<DesktopHostStatus["permissions"]>;
1378
- openPermissionSettings: () => Promise<{
1379
- opened: boolean;
1380
- }>;
1381
- grantAccess: (request: CapabilityGrantRequest) => Promise<CapabilityGrant>;
1382
- invoke: <T>(input: {
1383
- extensionId: string;
1384
- generation: string;
1385
- method: DesktopHostMethod;
1386
- payload: Record<string, unknown>;
1387
- caller?: Omit<DesktopHostCaller, "extensionId">;
1388
- }) => Promise<T>;
1389
- private invokeUnscopedExtensionMethod;
1390
- invokeAgent: <T>(input: {
1391
- agentId: string;
1392
- sessionId: string;
1393
- agentRunId?: string;
1394
- source?: "legacy-tool" | "desktop";
1395
- method: "host.status" | "host.ui.snapshot" | "host.screen.captureWindow" | "host.ui.action" | "host.input.click" | "host.input.typeText" | "host.input.pressKey";
1396
- payload: Record<string, unknown>;
1397
- }) => Promise<T>;
1398
- releaseExtensionWatches: (extensionId: string, generation?: string) => Promise<void>;
1399
- private validateGrantRequest;
1400
- private removeWatch;
1401
- private requireGrant;
1402
- private requireAgentGrant;
1403
- private requireKnownAgent;
1404
- stop: () => Promise<void>;
1405
- dispose: () => Promise<void>;
1406
- private releaseAllWatches;
1407
- }
1408
- //#endregion
1409
- //#region src/features/desktop-host/services/desktop-node-repl.service.d.ts
1410
- /**
1411
- * Codex-style code entry point: a session-scoped REPL worker receives a small
1412
- * desktop SDK and no host Node.js capabilities. The SDK still delegates every
1413
- * operation to the normal state, grant, and audit owners.
1414
- */
1415
- declare class DesktopNodeReplService {
1416
- private readonly sessionState;
1417
- private readonly workers;
1418
- constructor(sessionState: DesktopSessionStateService);
1419
- execute: (input: DesktopSessionCaller & {
1420
- code: unknown;
1421
- signal?: AbortSignal;
1422
- }) => Promise<unknown>;
1423
- dispose: () => void;
1424
- private getOrCreateWorker;
1425
- private handleWorkerMessage;
1426
- private invokeDesktop;
1427
- private resolve;
1428
- private reject;
1429
- private scheduleIdleStop;
1430
- private stopWorker;
1431
- }
1432
- //#endregion
1433
- //#region src/features/desktop-host/services/desktop-session-state.service.d.ts
1434
- type DesktopSessionCaller = {
1435
- agentId: string;
1436
- sessionId: string;
1437
- agentRunId?: string;
1438
- };
1439
- type DesktopSnapshotOptions = {
1440
- target: {
1441
- applicationId: string;
1442
- };
1443
- source?: "accessibility" | "screen" | "both";
1444
- detail?: "low" | "high";
1445
- maxDepth?: number;
1446
- maxNodes?: number;
1447
- };
1448
- /** Owns short-lived AX element references for one Agent session. */
1449
- declare class DesktopSessionStateService {
1450
- private readonly manager;
1451
- private readonly statesBySession;
1452
- constructor(manager: DesktopHostCapabilityManager);
1453
- snapshot: (caller: DesktopSessionCaller, options: DesktopSnapshotOptions) => Promise<unknown>;
1454
- setValue: (caller: DesktopSessionCaller, input: {
1455
- target: {
1456
- applicationId: string;
1457
- };
1458
- stateId: string;
1459
- elementIndex: number;
1460
- value: string;
1461
- }) => Promise<unknown>;
1462
- click: (caller: DesktopSessionCaller, input: {
1463
- target: {
1464
- applicationId: string;
1465
- };
1466
- stateId: string;
1467
- elementIndex?: number;
1468
- coordinate?: {
1469
- x: number;
1470
- y: number;
1471
- };
1472
- }) => Promise<unknown>;
1473
- typeText: (caller: DesktopSessionCaller, input: {
1474
- target: {
1475
- applicationId: string;
1476
- };
1477
- stateId: string;
1478
- text: string;
1479
- }) => Promise<unknown>;
1480
- pressKey: (caller: DesktopSessionCaller, input: {
1481
- target: {
1482
- applicationId: string;
1483
- };
1484
- stateId: string;
1485
- key: string;
1486
- modifiers?: string[];
1487
- }) => Promise<unknown>;
1488
- private perform;
1489
- private remember;
1490
- private sessionStates;
1491
- }
1492
- //#endregion
1493
- //#region src/features/observation/types/observation.types.d.ts
1494
- type JsonValue = NcpJsonValue;
1495
- type ObservationCapabilityDescriptor = {
1496
- extensionId: string;
1497
- kind: "context" | "events";
1498
- title: string;
1499
- description?: string;
1500
- configSchema?: Record<string, unknown>;
1501
- replay?: "supported" | "unsupported";
1502
- };
1503
- type ObservationTarget = {
1504
- sessionId: string;
1505
- agentId: string;
1506
- };
1507
- type ObservationEvent = {
1508
- eventId: string;
1509
- eventType: string;
1510
- occurredAt: string;
1511
- observedAt: string;
1512
- cursor?: string;
1513
- dedupeKey?: string;
1514
- causationId?: string;
1515
- correlationId?: string;
1516
- payload: JsonValue;
1517
- sourceRefs?: string[];
1518
- };
1519
- type ObservationRelationshipStatus = "active" | "paused" | "degraded" | "expired" | "broken";
1520
- type ContextBinding = {
1521
- bindingId: string;
1522
- extensionId: string;
1523
- config: JsonValue;
1524
- target: ObservationTarget;
1525
- projection: {
1526
- maxChars?: number;
1527
- maxItems?: number;
1528
- };
1529
- status: ObservationRelationshipStatus;
1530
- statusReason?: string;
1531
- createdAt: string;
1532
- expiresAt?: string;
1533
- lastReadAt?: string;
1534
- };
1535
- type JsonPointer = string;
1536
- type TypedPredicate = {
1537
- op: "exists";
1538
- path: JsonPointer;
1539
- } | {
1540
- op: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "contains";
1541
- path: JsonPointer;
1542
- value: JsonValue;
1543
- } | {
1544
- op: "and";
1545
- args: TypedPredicate[];
1546
- } | {
1547
- op: "or";
1548
- args: TypedPredicate[];
1549
- } | {
1550
- op: "not";
1551
- arg: TypedPredicate;
1552
- };
1553
- type EventAdmissionPolicy = {
1554
- predicate?: TypedPredicate;
1555
- dedupe?: {
1556
- key: JsonPointer;
1557
- window?: string;
1558
- };
1559
- };
1560
- type EventSubscriptionBudget = {
1561
- maxPending: number;
1562
- maxDeliveriesPerWindow?: number;
1563
- window?: string;
1564
- };
1565
- type EventSubscription = {
1566
- subscriptionId: string;
1567
- extensionId: string;
1568
- config: JsonValue;
1569
- target: ObservationTarget;
1570
- admission: EventAdmissionPolicy;
1571
- delivery: "queue" | "prefer-steer";
1572
- budget: EventSubscriptionBudget;
1573
- cursor?: string;
1574
- status: ObservationRelationshipStatus;
1575
- statusReason?: string;
1576
- createdAt: string;
1577
- expiresAt?: string;
1578
- suppressedCount?: number;
1579
- lastSuppressedAt?: string;
1580
- lastSuppressionReason?: "predicate" | "dedupe" | "max_pending" | "rate_limit";
1581
- lastGapAt?: string;
1582
- gapReason?: "replay_unsupported";
1583
- };
1584
- type EventDelivery = {
1585
- deliveryId: string;
1586
- subscriptionId: string;
1587
- eventId: string;
1588
- event: ObservationEvent;
1589
- dedupeValue?: string;
1590
- targetSessionId: string;
1591
- requestedDelivery: "queue" | "prefer-steer";
1592
- resolvedDelivery?: NcpResolvedInputDelivery;
1593
- status: "pending" | "submitted" | "materialized" | "failed";
1594
- ingressIdempotencyKey: string;
1595
- messageId: string;
1596
- createdAt: string;
1597
- updatedAt: string;
1598
- failure?: {
1599
- code: string;
1600
- message: string;
1601
- };
1602
- };
1603
- type ObservationState = {
1604
- bindings: ContextBinding[];
1605
- subscriptions: EventSubscription[];
1606
- deliveries: EventDelivery[];
1607
- };
1608
- type ObservationRef = {
1609
- kind: "context_binding";
1610
- id: string;
1611
- } | {
1612
- kind: "event_subscription";
1613
- id: string;
1614
- };
1615
- type BindContextInput = {
1616
- extensionId: string;
1617
- config: JsonValue;
1618
- targetSessionId: string;
1619
- projection?: {
1620
- maxChars?: number;
1621
- maxItems?: number;
1622
- };
1623
- ttl?: string;
1624
- };
1625
- type SubscribeEventsInput = {
1626
- extensionId: string;
1627
- config: JsonValue;
1628
- targetSessionId: string;
1629
- admission?: EventAdmissionPolicy;
1630
- delivery?: "queue" | "prefer-steer";
1631
- budget?: Partial<EventSubscriptionBudget>;
1632
- ttl?: string;
1633
- };
1634
- type BuildContextTailInput = {
1635
- sessionId: string;
1636
- signal?: AbortSignal;
1637
- };
1638
- type ObservationContextTail = {
1639
- entries: ReadonlyArray<{
1640
- bindingId: string;
1641
- extensionId: string;
1642
- snapshotId?: string;
1643
- freshness: "fresh" | "stale" | "unknown" | "unavailable";
1644
- observedAt?: string;
1645
- payload: JsonValue;
1646
- }>;
1647
- };
1648
- type ObservationExtensionRuntime = {
1649
- discoverObservations: (input?: {
1650
- query?: string;
1651
- kinds?: Array<"context" | "events">;
1652
- }) => ObservationCapabilityDescriptor[];
1653
- readObservation: (input: {
1654
- extensionId: string;
1655
- config: JsonValue;
1656
- signal?: AbortSignal;
1657
- }) => Promise<JsonValue>;
1658
- subscribeObservation: (input: {
1659
- extensionId: string;
1660
- subscriptionId: string;
1661
- config: JsonValue;
1662
- cursor?: string;
1663
- }) => Promise<{
1664
- replay: "supported" | "unsupported";
1665
- }>;
1666
- unsubscribeObservation: (input: {
1667
- extensionId: string;
1668
- subscriptionId: string;
1669
- }) => Promise<void>;
1670
- };
1671
- //#endregion
1672
- //#region src/features/observation/managers/observation.manager.d.ts
1673
- type ObservationManagerOptions = {
1674
- storePath: string;
1675
- sessionManager: SessionManager;
1676
- agentManager: AgentManager;
1677
- ingress: Ingress$1;
1678
- eventBus: EventBus$1;
1679
- now?: () => Date;
1680
- };
1681
- declare class ObservationManager {
1682
- private readonly options;
1683
- private readonly store;
1684
- private readonly context;
1685
- private readonly events;
1686
- private readonly cleanups;
1687
- private runtime;
1688
- private started;
1689
- constructor(options: ObservationManagerOptions);
1690
- setExtensionRuntime: (runtime: ObservationExtensionRuntime) => void;
1691
- start: () => Promise<void>;
1692
- dispose: () => Promise<void>;
1693
- bindContext: (input: BindContextInput) => Promise<ContextBinding>;
1694
- subscribeEvents: (input: SubscribeEventsInput) => Promise<EventSubscription>;
1695
- acceptExtensionEvent: (input: {
1696
- extensionId: string;
1697
- subscriptionId: string;
1698
- event: ObservationEvent;
1699
- }) => Promise<{
1700
- accepted: boolean;
1701
- }>;
1702
- onExtensionObservationRuntimeExited: (extensionId: string) => void;
1703
- onExtensionObservationRuntimeReady: (extensionId: string) => Promise<void>;
1704
- onDesktopObservationAuthorizationRevoked: (input: {
1705
- extensionId: string;
1706
- subscriptionId: string;
1707
- }) => Promise<void>;
1708
- onDesktopObservationAuthorizationGranted: (input: {
1709
- extensionId: string;
1710
- }) => Promise<void>;
1711
- buildContextTail: (input: BuildContextTailInput) => Promise<ObservationContextTail | undefined>;
1712
- discoverObservations: (input?: {
1713
- query?: string;
1714
- kinds?: Array<"context" | "events">;
1715
- }) => ObservationCapabilityDescriptor[];
1716
- listObservations: (sessionId?: string) => Promise<{
1717
- bindings: ContextBinding[];
1718
- subscriptions: EventSubscription[];
1719
- deliveries: EventDelivery[];
1720
- }>;
1721
- getObservation: (ref: ObservationRef) => Promise<ContextBinding | EventSubscription | null>;
1722
- updateObservation: (action: "pause" | "resume" | "remove", ref: ObservationRef) => Promise<{
1723
- observation: ContextBinding | EventSubscription | null;
1724
- remainingDeliveries: number;
1725
- }>;
1726
- removeSession: (sessionId: string) => Promise<void>;
1727
- private revalidateSession;
1728
- private resolveNativeTarget;
1729
- private requireCapability;
1730
- private requireRuntime;
1731
- private requireString;
1732
- private runBackground;
1733
- }
1734
- //#endregion
1735
- //#region src/features/observation/utils/observation.utils.d.ts
1736
- declare function parseObservationDuration(value: string, field: string): number;
1737
- declare function readJsonPointer(value: unknown, pointer: string): unknown;
1738
- declare function assertObservationJsonValue(value: unknown, depth?: number): asserts value is JsonValue;
1739
- declare function assertObservationPredicate(predicate: TypedPredicate, depth?: number): void;
1740
- declare function matchesObservationPredicate(predicate: TypedPredicate | undefined, event: ObservationEvent): boolean;
1741
- type ObservationEventAdmissionDecision = {
1742
- kind: "admitted";
1743
- delivery: EventDelivery;
1744
- } | {
1745
- kind: "existing";
1746
- deliveryId: string;
1747
- } | {
1748
- kind: "suppressed";
1749
- reason: "predicate" | "dedupe" | "max_pending" | "rate_limit";
1750
- };
1751
- declare function evaluateObservationEventAdmission(input: {
1752
- state: ObservationState;
1753
- subscription: EventSubscription;
1754
- event: ObservationEvent;
1755
- deliveryId: string;
1756
- now: Date;
1757
- }): ObservationEventAdmissionDecision;
1758
- declare function toBoundedJson(value: JsonValue, maxChars: number): JsonValue;
1759
- declare function buildObservationEventModelMessage(message: NcpMessage$1): OpenAIChatMessage | null;
1760
- //#endregion
1761
- //#region src/features/extension-runtime/types/extension-runtime.types.d.ts
1762
- type ExtensionServerConfig = {
1763
- type: "stdio";
1764
- command: string;
1765
- args?: string[];
1766
- env?: Record<string, string>;
1767
- };
1768
- type ExtensionManifest = {
1769
- id: string;
1770
- name?: string;
1771
- version?: string;
1772
- rootDir: string;
1773
- server: ExtensionServerConfig;
1774
- contributes?: {
1775
- observations?: {
1776
- read?: {
1777
- description: string;
1778
- configSchema?: Record<string, unknown>;
1779
- };
1780
- events?: {
1781
- description: string;
1782
- configSchema?: Record<string, unknown>;
1783
- replay?: "supported" | "unsupported";
1784
- };
1785
- };
1786
- hostCapabilities?: {
1787
- desktopAutomation?: {
1788
- access: Array<"ui.read" | "ui.observe" | "ui.write" | "screen.capture-window" | "input.keyboard" | "input.pointer">;
1789
- };
1790
- };
1791
- channels?: Array<{
1792
- id: string;
1793
- name?: string;
1794
- description?: string;
1795
- meta?: Record<string, unknown>;
1796
- configSchema?: Record<string, unknown>;
1797
- configUiHints?: Record<string, Record<string, unknown>>;
1798
- auth?: boolean | Record<string, unknown>;
1799
- outbound?: {
1800
- text?: boolean;
1801
- };
1802
- }>;
1803
- };
1804
- };
1805
- type ExtensionProcessState = "stopped" | "starting" | "running" | "stopping" | "failed";
1806
- type ExtensionLeaseReason = {
1807
- kind: "enabled-channel";
1808
- channelId: string;
1809
- } | {
1810
- kind: "auth-session";
1811
- sessionId: string;
1812
- expiresAt: string;
1813
- } | {
1814
- kind: "auth-handoff";
1815
- channelId: string;
1816
- expiresAt: string;
1817
- } | {
1818
- kind: "request";
1819
- requestId: string;
1820
- } | {
1821
- kind: "observation-subscription";
1822
- subscriptionId: string;
1823
- };
1824
- type ExtensionRuntimeStatus = {
1825
- extensionId: string;
1826
- generation: string | null;
1827
- lastExit: {
1828
- at: string;
1829
- code: number | null;
1830
- expected: boolean;
1831
- signal: string | null;
1832
- } | null;
1833
- leaseReasons: ExtensionLeaseReason[];
1834
- memory: {
1835
- pssBytes: number | null;
1836
- rssBytes: number | null;
1837
- } | null;
1838
- pid: number | null;
1839
- startedAt: string | null;
1840
- state: ExtensionProcessState;
1841
- startupDurationMs: number | null;
1842
- };
1843
- //#endregion
1844
- //#region src/features/extension-runtime/utils/extension-channel-catalog.utils.d.ts
1845
- declare function listExtensionChannelIds(params: {
1846
- config: Config;
1847
- workspace: string;
1848
- }): string[];
1849
- //#endregion
1850
- //#region src/managers/extension.manager.d.ts
1851
- type ExtensionLoadProgress = {
1852
- extensionId: string;
1853
- loadedExtensionCount: number;
1854
- totalExtensionCount: number;
1855
- };
1856
- type ExtensionLoadResult = {
1857
- diagnostics: ExtensionDiagnostic[];
1858
- totalExtensionCount: number;
1859
- loadedExtensionCount: number;
1860
- shouldRestartChannels: boolean;
1861
- };
1862
- type ExtensionManagerOptions = {
1863
- diagnostics: DiagnosticRuntime;
1864
- configManager: Pick<ConfigManager, "loadConfig">;
1865
- eventBus: Pick<EventBus$1, "emitEnvelope">;
1866
- ingress: Pick<Ingress$1, "addHandler">;
1867
- messageBus: Pick<MessageBus, "publishInbound">;
1868
- sessionManager: SessionManager;
1869
- observations: ObservationManager;
1870
- capabilityGrantManager: CapabilityGrantManager;
1871
- desktopHost: DesktopHost;
1872
- hasAgent: (agentId: string) => boolean;
1873
- };
1874
- type ExtensionLoadParams = {
1875
- config?: Config;
1876
- changedPaths?: readonly string[];
1877
- onLoadStart?: (params: {
1878
- totalExtensionCount: number;
1879
- }) => void;
1880
- onExtensionProcessed?: (params: ExtensionLoadProgress) => void;
1881
- };
1882
- declare class ExtensionManager {
1883
- private readonly options;
1884
- private snapshot;
1885
- private readonly runtime;
1886
- constructor(options: ExtensionManagerOptions);
1887
- load: (params?: ExtensionLoadParams) => Promise<ExtensionLoadResult>;
1888
- reloadForConfigChange: (params: ExtensionLoadParams & {
1889
- changedPaths: readonly string[];
1890
- }) => Promise<ExtensionLoadResult>;
1891
- registerIngressHandlers: () => void;
1892
- start: (params: {
1893
- endpoint: string | null;
1894
- }) => Promise<void>;
1895
- stop: () => Promise<void>;
1896
- dispose: () => Promise<void>;
1897
- getExtensionRegistry: () => ExtensionRegistry;
1898
- getChannelBindings: () => ExtensionChannelBinding[];
1899
- getUiMetadata: () => ExtensionUiMetadata[];
1900
- getDesktopHost: () => DesktopHostCapabilityManager;
1901
- getRuntimeStatus: () => ExtensionRuntimeStatus[];
1902
- getManifests: () => ExtensionManifest[];
1903
- authenticateEventStreamCredential: (input: {
1904
- extensionId: string | null;
1905
- generation: string | null;
1906
- token: string | null;
1907
- }) => {
1908
- extensionId: string;
1909
- generation: string;
1910
- } | null;
1911
- toConfigView: (config: Config) => Config;
1912
- mergeConfigView: (current: Config, nextConfigView: Record<string, unknown>) => Config;
1913
- private readonly getWorkspace;
1914
- }
1915
- //#endregion
1916
- //#region src/types/llm-usage.types.d.ts
1917
- type LlmUsageSummary = {
1918
- promptTokens: number;
1919
- completionTokens: number;
1920
- totalTokens: number;
1921
- cachedTokens: number;
1922
- cacheHit: boolean;
1923
- cacheMetricKeys: string[];
1924
- };
1925
- type LlmUsageRecord = {
1926
- version: 1;
1927
- observedAt: string;
1928
- source: string;
1929
- model: string | null;
1930
- usage: Record<string, number>;
1931
- summary: LlmUsageSummary;
1932
- };
1933
- type LlmUsageSnapshot = LlmUsageRecord;
1934
- declare function createLlmUsageRecord(params: {
1935
- observedAt?: string;
1936
- source: string;
1937
- model?: string | null;
1938
- usage: Record<string, number>;
1939
- }): LlmUsageRecord;
1940
- declare function sanitizeLlmUsage(usage: Record<string, number>): Record<string, number>;
1941
- declare function hasLlmUsageTelemetry(usage: Record<string, number>): boolean;
1942
- declare function buildLlmUsageSummary(usage: Record<string, number>): LlmUsageSummary;
1943
- declare function normalizeLlmUsageModel(value: string | null | undefined): string | null;
1944
- //#endregion
1945
- //#region src/stores/llm-usage.store.d.ts
1946
- type LlmUsageStoreOptions = {
1947
- snapshotPath?: string;
1948
- historyPath?: string;
1949
- };
1950
- declare class LlmUsageStore {
1951
- private readonly options;
1952
- constructor(options?: LlmUsageStoreOptions);
1953
- get snapshotPath(): string;
1954
- get historyPath(): string;
1955
- readSnapshot: () => LlmUsageRecord | null;
1956
- writeSnapshot: (snapshot: LlmUsageRecord) => void;
1957
- clearSnapshot: () => void;
1958
- listHistory: () => LlmUsageRecord[];
1959
- appendHistory: (record: LlmUsageRecord) => void;
1960
- clearHistory: () => void;
1961
- }
1962
- //#endregion
1963
- //#region src/managers/llm-usage.manager.d.ts
1964
- type LlmUsageStats = {
1965
- totalRecords: number;
1966
- usageRecordCount: number;
1967
- emptyUsageRecordCount: number;
1968
- promptTokenRecordCount: number;
1969
- oldestObservedAt: string | null;
1970
- latestObservedAt: string | null;
1971
- totalPromptTokens: number;
1972
- totalCompletionTokens: number;
1973
- totalTokens: number;
1974
- totalCachedTokens: number;
1975
- cacheHitRecords: number;
1976
- cacheHitRate: number;
1977
- tokenCacheRate: number;
1978
- sources: Array<{
1979
- value: string;
1980
- count: number;
1981
- }>;
1982
- models: Array<{
1983
- value: string;
1984
- count: number;
1985
- }>;
1986
- };
1987
- type LlmUsageManagerOptions = {
1988
- store?: LlmUsageStore;
1989
- };
1990
- declare class LlmUsageManager {
1991
- private readonly store;
1992
- constructor(options?: LlmUsageManagerOptions);
1993
- get snapshotPath(): string;
1994
- get historyPath(): string;
1995
- observeProviderManager: (providerManager: LlmProviderRuntime, source: string) => LlmProviderRuntime;
1996
- record: (params: {
1997
- observedAt?: string;
1998
- source: string;
1999
- model?: string | null;
2000
- usage: Record<string, number>;
2001
- }) => LlmUsageRecord | null;
2002
- getSnapshot: () => LlmUsageRecord | null;
2003
- getHistory: (limit?: string | number) => LlmUsageRecord[];
2004
- resolveHistoryLimit: (value?: string | number) => number;
2005
- getStats: () => LlmUsageStats;
2006
- private readonly bumpCounter;
2007
- private readonly toSortedCounts;
2008
- }
2009
- //#endregion
2010
- //#region src/types/portable-runtime-acceptance.types.d.ts
2011
- declare const PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS: readonly ["darwin-arm64", "windows-x64", "linux-x64"];
2012
- type PortableRuntimeAcceptancePlatform = (typeof PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS)[number];
2013
- type PortableRuntimeAcceptanceEvidenceSource = "local" | "ci" | "release";
2014
- type PortableRuntimeAcceptanceDefinition = {
2015
- id: string;
2016
- titleKey: string;
2017
- descriptionKey: string;
2018
- checkerKey: string;
2019
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2020
- required: boolean;
2021
- scenarioVersion: string;
2022
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2023
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2024
- };
2025
- /**
2026
- * The sole machine-readable registry of portable runtime acceptance criteria.
2027
- * Product projections and release tooling consume this value; they must not
2028
- * reconstruct IDs from documents, panels, or test file names.
2029
- */
2030
- declare const PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT: readonly [{
2031
- titleKey: string;
2032
- descriptionKey: string;
2033
- id: "PRT-EXEC-001";
2034
- checkerKey: string;
2035
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2036
- required: boolean;
2037
- scenarioVersion: string;
2038
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2039
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2040
- }, {
2041
- titleKey: string;
2042
- descriptionKey: string;
2043
- id: "PRT-DATA-001";
2044
- checkerKey: string;
2045
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2046
- required: boolean;
2047
- scenarioVersion: string;
2048
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2049
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2050
- }, {
2051
- titleKey: string;
2052
- descriptionKey: string;
2053
- id: "PRT-FILE-001";
2054
- checkerKey: string;
2055
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2056
- required: boolean;
2057
- scenarioVersion: string;
2058
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2059
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2060
- }, {
2061
- titleKey: string;
2062
- descriptionKey: string;
2063
- id: "PRT-NET-001";
2064
- checkerKey: string;
2065
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2066
- required: boolean;
2067
- scenarioVersion: string;
2068
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2069
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2070
- }, {
2071
- titleKey: string;
2072
- descriptionKey: string;
2073
- id: "PRT-SECRET-001";
2074
- checkerKey: string;
2075
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2076
- required: boolean;
2077
- scenarioVersion: string;
2078
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2079
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2080
- }, {
2081
- titleKey: string;
2082
- descriptionKey: string;
2083
- id: "PRT-RES-001";
2084
- checkerKey: string;
2085
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2086
- required: boolean;
2087
- scenarioVersion: string;
2088
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2089
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2090
- }, {
2091
- titleKey: string;
2092
- descriptionKey: string;
2093
- id: "PRT-EVENT-001";
2094
- checkerKey: string;
2095
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2096
- required: boolean;
2097
- scenarioVersion: string;
2098
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2099
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2100
- }, {
2101
- titleKey: string;
2102
- descriptionKey: string;
2103
- id: "PRT-TASK-001";
2104
- checkerKey: string;
2105
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2106
- required: boolean;
2107
- scenarioVersion: string;
2108
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2109
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2110
- }, {
2111
- titleKey: string;
2112
- descriptionKey: string;
2113
- id: "PRT-STREAM-001";
2114
- checkerKey: string;
2115
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2116
- required: boolean;
2117
- scenarioVersion: string;
2118
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2119
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2120
- }, {
2121
- titleKey: string;
2122
- descriptionKey: string;
2123
- id: "PRT-AGENT-001";
2124
- checkerKey: string;
2125
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2126
- required: boolean;
2127
- scenarioVersion: string;
2128
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2129
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2130
- }, {
2131
- titleKey: string;
2132
- descriptionKey: string;
2133
- id: "PRT-AI-001";
2134
- checkerKey: string;
2135
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2136
- required: boolean;
2137
- scenarioVersion: string;
2138
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2139
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2140
- }, {
2141
- titleKey: string;
2142
- descriptionKey: string;
2143
- id: "PRT-COMP-001";
2144
- checkerKey: string;
2145
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2146
- required: boolean;
2147
- scenarioVersion: string;
2148
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2149
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2150
- }, {
2151
- titleKey: string;
2152
- descriptionKey: string;
2153
- id: "PRT-ENTRY-001";
2154
- checkerKey: string;
2155
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2156
- required: boolean;
2157
- scenarioVersion: string;
2158
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2159
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2160
- }, {
2161
- titleKey: string;
2162
- descriptionKey: string;
2163
- id: "PRT-LIFE-001";
2164
- checkerKey: string;
2165
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2166
- required: boolean;
2167
- scenarioVersion: string;
2168
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2169
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2170
- }, {
2171
- titleKey: string;
2172
- descriptionKey: string;
2173
- id: "PRT-BOUND-001";
2174
- checkerKey: string;
2175
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2176
- required: boolean;
2177
- scenarioVersion: string;
2178
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2179
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2180
- }, {
2181
- titleKey: string;
2182
- descriptionKey: string;
2183
- id: "PRT-PERF-001";
2184
- checkerKey: string;
2185
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2186
- required: boolean;
2187
- scenarioVersion: string;
2188
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2189
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2190
- }, {
2191
- titleKey: string;
2192
- descriptionKey: string;
2193
- id: "PRT-DX-001";
2194
- checkerKey: string;
2195
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2196
- required: boolean;
2197
- scenarioVersion: string;
2198
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2199
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2200
- }, {
2201
- titleKey: string;
2202
- descriptionKey: string;
2203
- id: "PRT-DIST-001";
2204
- checkerKey: string;
2205
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2206
- required: boolean;
2207
- scenarioVersion: string;
2208
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2209
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2210
- }, {
2211
- titleKey: string;
2212
- descriptionKey: string;
2213
- id: "PRT-EVID-001";
2214
- checkerKey: string;
2215
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2216
- required: boolean;
2217
- scenarioVersion: string;
2218
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2219
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2220
- }, {
2221
- titleKey: string;
2222
- descriptionKey: string;
2223
- id: "PRT-REF-001";
2224
- checkerKey: string;
2225
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2226
- required: boolean;
2227
- scenarioVersion: string;
2228
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2229
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2230
- }, {
2231
- titleKey: string;
2232
- descriptionKey: string;
2233
- id: "PRT-DOCS-001";
2234
- checkerKey: string;
2235
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2236
- required: boolean;
2237
- scenarioVersion: string;
2238
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2239
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2240
- }, {
2241
- titleKey: string;
2242
- descriptionKey: string;
2243
- id: "PRT-REL-001";
2244
- checkerKey: string;
2245
- category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2246
- required: boolean;
2247
- scenarioVersion: string;
2248
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2249
- platforms: readonly PortableRuntimeAcceptancePlatform[];
2250
- }];
2251
- type PortableRuntimeAcceptanceId = (typeof PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT)[number]["id"];
2252
- declare const PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT_FINGERPRINT: string;
2253
- //#endregion
2254
- //#region src/types/verification-record.types.d.ts
2255
- type VerificationRecordStatus = "passed" | "failed" | "blocked" | "not-supported" | "not-run";
2256
- type VerificationRecordRole = "panel" | "agent" | "cli" | "system";
2257
- type VerificationRecordEntrySurface = "panel" | "agent" | "installed-app-cli" | "system";
2258
- type VerificationRecordObservation = {
2259
- durationMs?: number;
2260
- runnerPid?: number | null;
2261
- memory?: {
2262
- rssBytes: number | null;
2263
- pssBytes: number | null;
2264
- } | null;
2265
- };
2266
- type VerificationRecordError = {
2267
- code?: string;
2268
- message: string;
2269
- };
2270
- /**
2271
- * Immutable, redacted evidence emitted by a real Kernel invocation.
2272
- * Inputs and outputs are represented by digests only; callers must never use
2273
- * this record as a storage channel for user content or secrets.
2274
- */
2275
- type VerificationRecord = {
2276
- evidenceSchemaVersion: 2; /** The producer that generated this versioned evidence. */
2277
- evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2278
- verificationRunId: string;
2279
- acceptanceId: string;
2280
- scenarioVersion: string;
2281
- productVersion: string;
2282
- runtimeVersion: string;
2283
- implementationFingerprint: string;
2284
- status: VerificationRecordStatus;
2285
- startedAt: string;
2286
- finishedAt: string;
2287
- environment: string;
2288
- appId: string;
2289
- componentId: string;
2290
- role: VerificationRecordRole;
2291
- entrySurface: VerificationRecordEntrySurface;
2292
- instanceId?: string;
2293
- actionOrEvent: string;
2294
- callId: string;
2295
- traceId: string;
2296
- capabilityDecisions: string[];
2297
- inputDigest: string;
2298
- outputDigest?: string;
2299
- dataVersion: string;
2300
- observation?: VerificationRecordObservation;
2301
- error?: VerificationRecordError;
2302
- recovery?: string;
2303
- evidenceRefs: string[];
2304
- };
2305
- /**
2306
- * Historical records are retained for audit but can never satisfy the current
2307
- * acceptance contract because they predate version/fingerprint evidence.
2308
- */
2309
- type LegacyVerificationRecord = Omit<VerificationRecord, "evidenceSchemaVersion" | "productVersion" | "runtimeVersion" | "implementationFingerprint" | "evidenceSource"> & {
2310
- evidenceSchemaVersion: 1;
2311
- };
2312
- type VerificationEvidenceRecord = VerificationRecord | LegacyVerificationRecord;
2313
- type VerificationRecordInput = (Omit<VerificationRecord, "evidenceSchemaVersion" | "verificationRunId"> & {
2314
- verificationRunId?: string;
2315
- }) | (Omit<LegacyVerificationRecord, "evidenceSchemaVersion" | "verificationRunId"> & {
2316
- verificationRunId?: string;
2317
- });
2318
- type VerificationRecordList = {
2319
- entries: VerificationEvidenceRecord[];
2320
- };
2321
- //#endregion
2322
- //#region src/utils/portable-runtime-acceptance-evaluator.utils.d.ts
2323
- type PortableRuntimeAcceptanceEvaluationContext = {
2324
- appId: string;
2325
- environment: PortableRuntimeAcceptancePlatform;
2326
- productVersion: string;
2327
- runtimeVersion: string;
2328
- implementationFingerprint: string;
2329
- contractFingerprint: string;
2330
- };
2331
- type PortableRuntimeAcceptanceEvidence = {
2332
- source: PortableRuntimeAcceptanceEvidenceSource;
2333
- records: VerificationEvidenceRecord[];
2334
- };
2335
- type PortableRuntimeAcceptanceEvidenceArtifact = {
2336
- schemaVersion: 1;
2337
- contractFingerprint: string;
2338
- targets: Array<PortableRuntimeAcceptanceEvaluationContext & {
2339
- evidence: PortableRuntimeAcceptanceEvidence[];
2340
- }>;
2341
- };
2342
- type PortableRuntimeAcceptanceResultStatus = "current-passed" | "missing" | "stale" | "failed" | "not-applicable";
2343
- type PortableRuntimeAcceptanceResult = {
2344
- acceptanceId: string;
2345
- required: boolean;
2346
- environment: PortableRuntimeAcceptancePlatform;
2347
- status: PortableRuntimeAcceptanceResultStatus;
2348
- latestRecord?: VerificationEvidenceRecord;
2349
- };
2350
- declare function evaluatePortableRuntimeAcceptance(input: {
2351
- context: PortableRuntimeAcceptanceEvaluationContext;
2352
- evidence: readonly PortableRuntimeAcceptanceEvidence[];
2353
- definitions?: readonly PortableRuntimeAcceptanceDefinition[];
2354
- }): PortableRuntimeAcceptanceResult[];
2355
- declare function evaluatePortableRuntimeAcceptanceArtifact(artifact: PortableRuntimeAcceptanceEvidenceArtifact): PortableRuntimeAcceptanceResult[];
2356
- declare function parsePortableRuntimeAcceptanceEvidenceArtifact(value: unknown): PortableRuntimeAcceptanceEvidenceArtifact;
2357
- //#endregion
2358
- //#region src/services/verification-record.service.d.ts
2359
- /** Owns durable, redacted evidence. Product surfaces can only read/export it. */
2360
- declare class VerificationRecordService {
2361
- private readonly params;
2362
- private loadPromise;
2363
- private readonly entries;
2364
- private mutationQueue;
2365
- constructor(params: {
2366
- storePath: string;
2367
- /**
2368
- * The Kernel-owned current runtime identity. Generic invocation evidence
2369
- * obtains its versioned local provenance here; callers never manufacture
2370
- * a fingerprint from their own observations.
2371
- */
2372
- resolveCurrentIdentity?: (appId: string) => Promise<PortableRuntimeAcceptanceEvaluationContext | undefined>;
2373
- });
2374
- record: (input: VerificationRecordInput) => Promise<VerificationEvidenceRecord>;
2375
- list: (filters?: {
2376
- acceptanceId?: string;
2377
- appId?: string;
2378
- limit?: number;
2379
- }) => Promise<VerificationRecordList>;
2380
- export: (filters?: Parameters<VerificationRecordService["list"]>[0]) => Promise<string>;
2381
- private ensureLoaded;
2382
- private load;
2383
- private mutate;
2384
- private save;
2385
- private trim;
2386
- private clone;
2387
- private parseStore;
2388
- private normalizeInput;
2389
- private withCurrentIdentity;
2390
- private normalizeStoredRecord;
2391
- private normalizeCurrentRecord;
2392
- private normalizeLegacyRecord;
2393
- private normalizeBaseRecord;
2394
- private isNonEmptyString;
2395
- private isEvidenceSource;
2396
- private isObservation;
2397
- private isMemory;
2398
- private isError;
2399
- private isMissing;
2400
- }
2401
- //#endregion
2402
- //#region src/managers/inbox-delivery.manager.d.ts
2403
- declare const MAX_INBOX_DELIVERY_CONTENT_LENGTH: number;
2404
- type CreateInboxDeliveryInput = {
2405
- title: string;
2406
- summary?: string | null;
2407
- content: string;
2408
- contentType: InboxDeliveryContentType;
2409
- source: InboxDeliverySource;
2410
- };
2411
- type InboxDeliveryManagerOptions = {
2412
- eventBus: Pick<EventBus$1, "emit">;
2413
- storePath: string;
2414
- };
2415
- type InboxDeliveryErrorCode = "INBOX_DELIVERY_INVALID_CONTENT" | "INBOX_DELIVERY_INVALID_SUMMARY" | "INBOX_DELIVERY_INVALID_TITLE" | "INBOX_DELIVERY_NOT_FOUND";
2416
- declare class InboxDeliveryError extends Error {
2417
- readonly code: InboxDeliveryErrorCode;
2418
- constructor(code: InboxDeliveryErrorCode, message: string);
2419
- }
2420
- declare function isInboxDeliveryError(error: unknown): error is InboxDeliveryError;
2421
- declare class InboxDeliveryManager {
2422
- private readonly options;
2423
- private readonly store;
2424
- private writeQueue;
2425
- constructor(options: InboxDeliveryManagerOptions);
2426
- listDeliveries: () => Promise<InboxDeliveryListView>;
2427
- getDelivery: (deliveryId: string) => Promise<InboxDelivery | null>;
2428
- createDelivery: (input: CreateInboxDeliveryInput) => Promise<InboxDelivery>;
2429
- updateDeliveryState: (deliveryId: string, action: InboxDeliveryStateAction) => Promise<InboxDelivery>;
2430
- deleteDelivery: (deliveryId: string) => Promise<boolean>;
2431
- private applyStateAction;
2432
- private normalizeRequiredText;
2433
- private normalizeOptionalText;
2434
- private notFound;
2435
- private publishChange;
2436
- private mutate;
2437
- }
2438
- //#endregion
2439
- //#region src/managers/system-object-reference.manager.d.ts
2440
- type SystemObjectReferenceSnapshotSource = {
2441
- item: SystemObjectReferenceItem;
2442
- content: string;
2443
- fileName: string;
2444
- mimeType: string;
2445
- };
2446
- type SystemObjectReferenceProvider = {
2447
- group: SystemObjectReferenceGroupDescriptor;
2448
- list: () => Promise<readonly SystemObjectReferenceItem[]> | readonly SystemObjectReferenceItem[];
2449
- resolve: (objectId: string) => Promise<SystemObjectReferenceSnapshotSource | null> | SystemObjectReferenceSnapshotSource | null;
2450
- };
2451
- type SystemObjectReferenceErrorCode = "SYSTEM_OBJECT_INVALID_REFERENCE" | "SYSTEM_OBJECT_NOT_FOUND" | "SYSTEM_OBJECT_PROVIDER_CONTRACT";
2452
- declare class SystemObjectReferenceError extends Error {
2453
- readonly code: SystemObjectReferenceErrorCode;
2454
- constructor(code: SystemObjectReferenceErrorCode, message: string);
2455
- }
2456
- declare function isSystemObjectReferenceError(error: unknown): error is SystemObjectReferenceError;
2457
- declare class SystemObjectReferenceManager {
2458
- private readonly assetStore;
2459
- private readonly providers;
2460
- private readonly resolvedCache;
2461
- constructor(assetStore: Pick<LocalAssetStore, "putBytes" | "statRecord">, providers?: readonly SystemObjectReferenceProvider[]);
2462
- registerProvider: (provider: SystemObjectReferenceProvider) => (() => void);
2463
- listTypes: () => SystemObjectReferenceGroupDescriptor[];
2464
- listReferences: (params?: {
2465
- query?: string;
2466
- limit?: number;
2467
- objectType?: string;
2468
- }) => Promise<SystemObjectReferenceListView>;
2469
- resolveReference: (uri: string) => Promise<SystemObjectResolvedReference>;
2470
- private assertSnapshotContract;
2471
- private assertListItemContract;
2472
- }
2473
- declare function createInboxDeliverySystemObjectProvider(manager: Pick<InboxDeliveryManager, "getDelivery" | "listDeliveries">): SystemObjectReferenceProvider;
2474
- declare function createCronJobSystemObjectProvider(automation: Pick<AutomationManager, "listJobs">): SystemObjectReferenceProvider;
2475
- //#endregion
2476
- //#region src/managers/mcp.manager.d.ts
2477
- declare class McpManager {
2478
- private baseConfig;
2479
- private currentMcpConfig;
2480
- private readonly contributedServers;
2481
- private readonly mcpLifecycleManager;
2482
- private readonly mcpRegistryService;
2483
- private readonly toolRegistryAdapter;
2484
- private warmupPromise;
2485
- constructor(getConfig: () => Config);
2486
- listToolsForRun: (params: {
2487
- agentId: string;
2488
- }) => ReadonlyArray<NcpTool$1>;
2489
- registerServer: (name: string, definition: McpServerDefinition$1) => Promise<() => Promise<void>>;
2490
- listServers: () => _$_nextclaw_mcp0.McpServerRecord[];
2491
- listTools: (filter?: McpCatalogFilter$1) => _$_nextclaw_mcp0.McpToolCatalogEntry[];
2492
- callTool: (params: Parameters<McpRegistryService["callTool"]>[0]) => Promise<unknown>;
2493
- start: () => void;
2494
- applyConfig: (config: Config) => Promise<void>;
2495
- dispose: () => Promise<void>;
2496
- private buildEffectiveConfig;
2497
- private prewarmEnabledServersSafely;
2498
- }
2499
- //#endregion
2500
- //#region src/managers/session-context-compaction.manager.d.ts
2501
- type SessionContextCompactionErrorCode = "CONTEXT_COMPACTION_UNSUPPORTED" | "NOTHING_TO_COMPACT" | "SESSION_BUSY" | "SESSION_NOT_FOUND";
2502
- declare class SessionContextCompactionError extends Error {
2503
- readonly code: SessionContextCompactionErrorCode;
2504
- constructor(code: SessionContextCompactionErrorCode, message: string);
2505
- }
2506
- declare function isSessionContextCompactionError(error: unknown): error is SessionContextCompactionError;
2507
- type SessionContextCompactionResult = {
2508
- compacted: true;
2509
- sessionId: string;
2510
- };
2511
- declare class SessionContextCompactionManager {
2512
- private readonly agentRuntimeManager;
2513
- private readonly eventBus;
2514
- private readonly sessionManager;
2515
- private readonly sessionRunManager;
2516
- constructor(agentRuntimeManager: AgentRuntimeManager, eventBus: EventBus$1, sessionManager: SessionManager, sessionRunManager: SessionRunManager);
2517
- compact: (requestedSessionId: string) => Promise<SessionContextCompactionResult>;
2518
- }
2519
- //#endregion
2520
- //#region src/stores/panel-app-state.store.d.ts
2521
- type PanelAppPreferencesUpdate = {
2522
- favorite?: boolean;
2523
- mainSidebar?: boolean;
2524
- };
2525
- //#endregion
2526
- //#region src/utils/panel-app-source.utils.d.ts
2527
- 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";
2528
- type PanelAppAsset = {
2529
- content: Buffer;
2530
- contentType: PanelAppAssetContentType;
2531
- };
2532
- //#endregion
2533
- //#region src/managers/panel-app.manager.d.ts
2534
- declare class PanelAppManager {
2535
- private readonly params;
2536
- private readonly bridgeSessions;
2537
- private readonly agentRunClient;
2538
- private readonly agentBridgeService;
2539
- private readonly assetTokenService;
2540
- private readonly sourceService;
2541
- private readonly packageStateManager;
2542
- private readonly entryPresenter;
2543
- private readonly entryResolver;
2544
- private readonly removalService;
2545
- constructor(params: {
2546
- agentRunClient?: PanelAppAgentRunClient;
2547
- configManager: ConfigManager;
2548
- eventBus?: EventBus$1;
2549
- ingress?: Ingress$1;
2550
- listPackageComponentSources?: () => Promise<AppPackageComponentSource[]>;
2551
- listPackageComponentDiagnostics?: () => Promise<AppPackageUnavailableDiagnostic[]>;
2552
- resolvePackagePrimaryPanelId?: (appId: string) => Promise<string | undefined>;
2553
- capabilityGrantManager: CapabilityGrantManager;
2554
- });
2555
- listPanelApps: () => Promise<PanelAppList>;
2556
- getPanelApp: (id: string) => Promise<PanelAppEntry>;
2557
- resolvePanelAppDisplayTarget: (id: string) => Promise<PanelAppEntry>;
2558
- getPanelAppContent: (id: string, sourcePath?: string) => Promise<PanelAppContent>;
2559
- getPanelAppAsset: (id: string, assetPath: string) => Promise<PanelAppAsset>;
2560
- getPanelAppAssetByToken: (token: string, assetPath: string) => Promise<PanelAppAsset>;
2561
- getPanelAppBridgeScript: () => string;
2562
- createPanelAppRuntimeTokenSession: (params: {
2563
- appId: string;
2564
- clientDeclared: boolean;
2565
- declaredActions: string[];
2566
- declaredCapabilities: string[];
2567
- }) => PanelAppBridgeSession;
2568
- createPanelAppBridgeSession: (params: {
2569
- id: string;
2570
- }) => Promise<PanelAppBridgeSession>;
2571
- grantPanelAppClient: (appId: string) => Promise<PanelAppClientGrant>;
2572
- revokePanelAppClient: (appId: string) => Promise<void>;
2573
- matchesCapabilityGrant: (grant: CapabilityGrant) => Promise<boolean>;
2574
- resolvePanelAppBridgeSession: (token: string) => PanelAppBridgeSession;
2575
- deletePanelAppBridgeSession: (token: string) => void;
2576
- sendAgentMessage: (bridgeSessionToken: string, payload: PanelAppAgentSendPayload) => Promise<PanelAppAgentSendResult>;
2577
- generateAgentObject: (bridgeSessionToken: string, input: PanelAppAgentGenerateObjectInput) => Promise<PanelAppAgentGenerateObjectResult>;
2578
- grantAgentCapability: (bridgeSessionToken: string, capability: PanelAppAgentCapability) => Promise<PanelAppCapabilityGrant>;
2579
- updatePanelAppPreferences: (id: string, preferences: PanelAppPreferencesUpdate) => Promise<PanelAppEntry>;
2580
- recordPanelAppOpened: (id: string) => Promise<PanelAppEntry>;
2581
- deletePanelApp: (id: string) => Promise<PanelAppDeleteResult>;
2582
- private getWorkspacePath;
2583
- private getPanelsPath;
2584
- private createAssetBaseHref;
2585
- private createStateStore;
2586
- assertCanActivatePackageComponents: (components: AppPackageComponentSource[]) => Promise<void>;
2587
- deactivatePackageComponents: (components: AppPackageComponentSource[]) => void;
2588
- preparePackageComponentDeactivation: (components: AppPackageComponentSource[]) => (() => Promise<void>);
2589
- removePackageComponentState: (components: AppPackageComponentSource[]) => Promise<() => Promise<void>>;
2590
- private deleteExpiredBridgeSessions;
2591
- private deleteBridgeSessionsByPanelAppId;
2592
- private suspendBridgeSessionsByPanelAppId;
2593
- private isPanelAppClientGranted;
2594
- private isMissingFileError;
2595
- }
2596
- //#endregion
2597
- //#region src/managers/planned-restart-recovery.manager.d.ts
2598
- type PlannedRestartRecoveryTicket = {
2599
- operationId: string;
2600
- };
2601
- type PlannedRestartRecoveryResult = {
2602
- status: "none" | "mismatch" | "expired" | "invalid" | "recovered" | "error";
2603
- operationId?: string;
2604
- resumed: number;
2605
- skipped: number;
2606
- failed: number;
2607
- };
2608
- type PlannedRestartRecovery = Pick<PlannedRestartRecoveryManager, "prepare" | "abort" | "recover" | "recoverFromSupervisor">;
2609
- type ActiveRun = {
2610
- sessionId: string;
2611
- runId: string;
2612
- };
2613
- type PlannedRestartRecoveryManagerOptions = {
2614
- manifestPath: string;
2615
- listActiveRuns: () => readonly ActiveRun[];
2616
- flushSessionEvents: () => Promise<void>;
2617
- suspendAdmissions: () => Promise<void>;
2618
- resumeAdmissions: () => void;
2619
- continueRun: (params: {
2620
- operationId: string;
2621
- sessionId: string;
2622
- sourceRunId: string;
2623
- triggeredAt: string;
2624
- }) => Promise<boolean>;
2625
- now?: () => Date;
2626
- manifestTtlMs?: number;
2627
- };
2628
- declare class PlannedRestartRecoveryManager {
2629
- private readonly options;
2630
- private readonly now;
2631
- private readonly manifestTtlMs;
2632
- private preparedOperationId;
2633
- private preparation;
2634
- constructor(options: PlannedRestartRecoveryManagerOptions);
2635
- prepare: (reason: string) => Promise<PlannedRestartRecoveryTicket>;
2636
- private prepareOnce;
2637
- abort: (operationId: string) => Promise<void>;
2638
- recover: (requestedOperationId: string | undefined) => Promise<PlannedRestartRecoveryResult>;
2639
- recoverFromSupervisor: () => Promise<PlannedRestartRecoveryResult>;
2640
- private continueClaimedRuns;
2641
- private readManifest;
2642
- private writeManifest;
2643
- private result;
2644
- }
2645
- //#endregion
2646
- //#region src/types/preference.types.d.ts
2647
- type PreferenceJsonValue = null | boolean | number | string | PreferenceJsonValue[] | {
2648
- [key: string]: PreferenceJsonValue;
2649
- };
2650
- type PreferenceEntry = {
2651
- key: string;
2652
- value: PreferenceJsonValue;
2653
- updatedAt: string;
2654
- };
2655
- //#endregion
2656
- //#region src/managers/preference.manager.d.ts
2657
- type PreferenceManagerOptions = {
2658
- storePath: string;
2659
- };
2660
- type PreferenceErrorCode = "PREFERENCE_INVALID_KEY" | "PREFERENCE_INVALID_VALUE";
2661
- declare class PreferenceError extends Error {
2662
- readonly code: PreferenceErrorCode;
2663
- constructor(code: PreferenceErrorCode, message: string);
2664
- }
2665
- declare function isPreferenceError(error: unknown): error is PreferenceError;
2666
- declare class PreferenceManager {
2667
- private readonly store;
2668
- constructor(options: PreferenceManagerOptions);
2669
- getPreference: (key: string) => Promise<PreferenceEntry | null>;
2670
- setPreference: (key: string, value: PreferenceJsonValue) => Promise<PreferenceEntry>;
2671
- deletePreference: (key: string) => Promise<boolean>;
2672
- private normalizeKey;
2673
- private isJsonValue;
2674
- private isPlainRecord;
2675
- }
2676
- //#endregion
2677
- //#region src/types/portable-service-runner-protocol.types.d.ts
2678
- type RunnerOperation = "cancel-job" | "deliver-event" | "invoke" | "job-status" | "list-actions" | "start-provider" | "start-resident" | "start-job" | "resolve-host-call" | "stats" | "stop";
2679
- type PortableRunnerJobEvent = {
2680
- kind: "job-progress";
2681
- protocolVersion?: string;
2682
- jobId: string;
2683
- sequence: number;
2684
- current?: number;
2685
- total?: number;
2686
- message?: string;
2687
- } | {
2688
- kind: "stream-chunk";
2689
- protocolVersion?: string;
2690
- jobId: string;
2691
- sequence: number;
2692
- content: string;
2693
- } | {
2694
- kind: "host-call-request";
2695
- protocolVersion?: string;
2696
- hostCallId: string;
2697
- jobId: string;
2698
- sequence: number;
2699
- callId: string;
2700
- traceId: string;
2701
- appId: string;
2702
- capability: string;
2703
- input: unknown;
2704
- } | {
2705
- kind: "job-terminal";
2706
- protocolVersion?: string;
2707
- jobId: string;
2708
- sequence: number;
2709
- status: "succeeded" | "cancelled" | "timed-out" | "failed" | "interrupted";
2710
- result?: unknown;
2711
- error?: {
2712
- code?: string;
2713
- message?: string;
2714
- };
2715
- };
2716
- type PortableRunnerHostCallRequest = Extract<PortableRunnerJobEvent, {
2717
- kind: "host-call-request";
2718
- }>;
2719
- type PortableRunnerObservation = {
2720
- operation: RunnerOperation;
2721
- appId?: string;
2722
- durationMs: number;
2723
- runnerPid: number | null;
2724
- memory: {
2725
- rssBytes: number | null;
2726
- pssBytes: number | null;
2727
- } | null;
2728
- logs: string[];
2729
- };
2730
- //#endregion
2731
- //#region src/services/service-app-job-journal.service.d.ts
2732
- type ServiceAppJobScope = {
2733
- appId: string;
2734
- instanceId: string;
2735
- stateDirectory: string;
2736
- };
2737
- type ServiceAppJobEventSink = {
2738
- reportProgress: (input: {
2739
- current?: number;
2740
- total?: number;
2741
- message?: string;
2742
- }) => Promise<ServiceAppJobEvent | undefined>;
2743
- emitChunk: (content: string) => Promise<ServiceAppJobEvent>;
2744
- recordTerminal: (input: {
2745
- status: ServiceAppTerminalJobStatus;
2746
- error?: {
2747
- code?: string;
2748
- message: string;
2749
- };
2750
- }) => Promise<ServiceAppJobView>;
2751
- };
2752
- /**
2753
- * The only durable owner for Service App Job state and stream facts.
2754
- *
2755
- * A journal belongs to one installed App instance, so user-visible work never
2756
- * crosses an App's `stateDirectory`. Verification records deliberately stay
2757
- * elsewhere and only retain redacted acceptance evidence.
2758
- */
2759
- declare class ServiceAppJobJournalService {
2760
- private readonly stores;
2761
- private readonly loadPromises;
2762
- private readonly mutationQueues;
2763
- private readonly lastProgressAt;
2764
- queue: (scope: ServiceAppJobScope, input: {
2765
- actionName: string;
2766
- componentId?: string;
2767
- callId: string;
2768
- traceId: string;
2769
- caller?: ServiceAppJobCaller;
2770
- retryOf?: string;
2771
- jobId?: string;
2772
- }) => Promise<ServiceAppJobView>;
2773
- get: (scope: ServiceAppJobScope, jobId: string) => Promise<ServiceAppJobView>;
2774
- list: (scope: ServiceAppJobScope) => Promise<ServiceAppJobList>;
2775
- watch: (scope: ServiceAppJobScope, jobId: string, afterSequence?: number) => Promise<ServiceAppJobWatch>;
2776
- transition: (scope: ServiceAppJobScope, jobId: string, status: Exclude<ServiceAppJobStatus, ServiceAppTerminalJobStatus>) => Promise<ServiceAppJobView>;
2777
- requestCancel: (scope: ServiceAppJobScope, jobId: string) => Promise<ServiceAppJobView>;
2778
- recordTerminal: (scope: ServiceAppJobScope, jobId: string, input: {
2779
- status: ServiceAppTerminalJobStatus;
2780
- error?: {
2781
- code?: string;
2782
- message: string;
2783
- };
2784
- }) => Promise<ServiceAppJobView>;
2785
- reportProgress: (scope: ServiceAppJobScope, jobId: string, input: {
2786
- current?: number;
2787
- total?: number;
2788
- message?: string;
2789
- }) => Promise<ServiceAppJobEvent | undefined>;
2790
- emitChunk: (scope: ServiceAppJobScope, jobId: string, content: string) => Promise<ServiceAppJobEvent>;
2791
- createEventSink: (scope: ServiceAppJobScope, jobId: string) => ServiceAppJobEventSink;
2792
- /** Marks durable in-flight work as interrupted after a host restart. */
2793
- recoverUnfinished: (scopes: readonly ServiceAppJobScope[]) => Promise<void>;
2794
- private requireJob;
2795
- private requireJobFromStore;
2796
- private assertCanTransition;
2797
- private assertActive;
2798
- private appendEvent;
2799
- private ensureLoaded;
2800
- private load;
2801
- private mutate;
2802
- private save;
2803
- private requireStore;
2804
- private toView;
2805
- private cloneEvent;
2806
- private isTerminal;
2807
- private eventBytes;
2808
- private storePath;
2809
- private jobKey;
2810
- private isStore;
2811
- private isJob;
2812
- private isEvent;
2813
- private isMissing;
2814
- }
2815
- //#endregion
2816
- //#region src/types/portable-service-app-runtime.types.d.ts
2817
- type PortableRuntimeState = {
2818
- status: ServiceAppRuntimeStatus;
2819
- lastError?: string;
2820
- lastStartedAt?: string;
2821
- lastReadyAt?: string;
2822
- lastFailedAt?: string;
2823
- };
2824
- type PortableServiceAppHostCall = {
2825
- app: ServiceAppRecord;
2826
- manifest: ServiceAppManifest;
2827
- request: PortableRunnerHostCallRequest;
2828
- signal: AbortSignal;
2829
- jobSignal?: AbortSignal;
2830
- deferTerminal?: (completion: Promise<void>) => void;
2831
- job?: {
2832
- jobId: string;
2833
- eventSink: ServiceAppJobEventSink;
2834
- callId?: string;
2835
- traceId?: string;
2836
- };
2837
- };
2838
- type PortableServiceAppHostCallHandler = (call: PortableServiceAppHostCall) => Promise<unknown>;
2839
- //#endregion
2840
- //#region src/services/service-app-ai-capability.service.d.ts
2841
- type ServiceAppAiCapabilityReadiness = {
2842
- ready: boolean;
2843
- requiredMissing: Array<{
2844
- kind: "model" | "agent";
2845
- slotId: string;
2846
- }>;
2847
- bindings: Array<{
2848
- kind: "model" | "agent";
2849
- slotId: string;
2850
- targetId: string;
2851
- grantedAt: string;
2852
- }>;
2853
- };
2854
- /**
2855
- * Product authorization owner for portable Service App AI slots. It is
2856
- * deliberately runner-agnostic: protocol 0.2 can inject these callbacks
2857
- * without creating a second binding registry or exposing credentials.
2858
- */
2859
- declare class ServiceAppAiCapabilityService {
2860
- private readonly params;
2861
- constructor(params: {
2862
- capabilityGrantManager: CapabilityGrantManager;
2863
- hasAgent: (agentId: string) => boolean;
2864
- hasModel: (modelId: string) => boolean;
2865
- providerManager?: LlmProviderRuntime;
2866
- llmUsage?: Pick<LlmUsageManager, "observeProviderManager">;
2867
- agentRunClient?: Pick<AgentRunClient, "startRun">;
2868
- });
2869
- inspect: (app: ServiceAppRecord, manifest: ServiceAppManifest) => Promise<ServiceAppAiCapabilityReadiness>;
2870
- assertReady: (app: ServiceAppRecord, manifest: ServiceAppManifest) => Promise<void>;
2871
- bindModel: (app: ServiceAppRecord, manifest: ServiceAppManifest, slotId: string, modelId: string) => Promise<ServiceAppAiCapabilityReadiness>;
2872
- bindAgent: (app: ServiceAppRecord, manifest: ServiceAppManifest, slotId: string, agentId: string) => Promise<ServiceAppAiCapabilityReadiness>;
2873
- unbind: (app: ServiceAppRecord, manifest: ServiceAppManifest, kind: "model" | "agent", slotId: string) => Promise<ServiceAppAiCapabilityReadiness>;
2874
- modelComplete: (params: {
2875
- app: ServiceAppRecord;
2876
- manifest: ServiceAppManifest;
2877
- slotId: string;
2878
- messages: Array<Record<string, unknown>>;
2879
- maxTokens?: number;
2880
- signal?: AbortSignal;
2881
- }) => Promise<_$_nextclaw_core0.LLMResponse>;
2882
- agentStart: (params: {
2883
- app: ServiceAppRecord;
2884
- manifest: ServiceAppManifest;
2885
- slotId: string;
2886
- input: AgentRunSendIngressPayload;
2887
- callId: string;
2888
- jobId?: string;
2889
- traceId?: string;
2890
- signal?: AbortSignal;
2891
- }) => Promise<AgentRunExecution>;
2892
- handlePortableHostCall: (call: PortableServiceAppHostCall) => Promise<unknown>;
2893
- private forwardPortableAgentResult;
2894
- private listBindings;
2895
- private requireBoundModel;
2896
- private requireBoundAgent;
2897
- private replaceBinding;
2898
- private requireModelSlot;
2899
- private requireAgentSlot;
2900
- private matchesModelGrant;
2901
- private matchesAgentGrant;
2902
- private requireProviderRuntime;
2903
- private clampMaxTokens;
2904
- private withSlotTimeout;
2905
- }
2906
- //#endregion
2907
- //#region src/services/service-app-resident-event-inbox.service.d.ts
2908
- type ServiceAppResidentEventScope = {
2909
- appId: string;
2910
- instanceId: string;
2911
- stateDirectory: string;
2912
- };
2913
- type ResidentEventInput = {
2914
- eventId: string;
2915
- streamKey?: string;
2916
- payload: Record<string, unknown>;
2917
- componentId?: string;
2918
- };
2919
- type LeasedResidentEvent = ServiceAppResidentEventView & {
2920
- payload: Record<string, unknown>;
2921
- };
2922
- /**
2923
- * Per installed-App-instance Resident delivery journal. The host owns the
2924
- * inbox and cursor; the Guest only receives a leased event and returns a
2925
- * disposition. This deliberately gives at-least-once delivery without
2926
- * claiming that arbitrary Guest side effects are exactly-once.
2927
- */
2928
- declare class ServiceAppResidentEventInboxService {
2929
- private readonly stores;
2930
- private readonly deadLetterStreams;
2931
- private readonly loadPromises;
2932
- private readonly mutationQueues;
2933
- enqueue: (scope: ServiceAppResidentEventScope, input: ResidentEventInput) => Promise<ServiceAppResidentEventView>;
2934
- list: (scope: ServiceAppResidentEventScope, params?: {
2935
- status?: ServiceAppResidentEventStatus;
2936
- deadLettersOnly?: boolean;
2937
- }) => Promise<ServiceAppResidentEventList>;
2938
- isStreamBlocked: (scope: ServiceAppResidentEventScope, streamKey?: string) => Promise<boolean>;
2939
- canAcceptEvent: (scope: ServiceAppResidentEventScope, streamKey?: string) => Promise<boolean>;
2940
- /** Reclaim expired leases then lease one item: one Resident means one lane. */
2941
- leaseNext: (scope: ServiceAppResidentEventScope, params?: {
2942
- leaseMs?: number;
2943
- now?: Date;
2944
- }) => Promise<LeasedResidentEvent | undefined>;
2945
- acknowledge: (scope: ServiceAppResidentEventScope, eventId: string) => Promise<ServiceAppResidentEventView>;
2946
- retry: (scope: ServiceAppResidentEventScope, eventId: string, disposition: Extract<ServiceAppResidentEventDisposition, {
2947
- kind: "retry";
2948
- }>) => Promise<ServiceAppResidentEventView>;
2949
- applyDisposition: (scope: ServiceAppResidentEventScope, eventId: string, disposition: ServiceAppResidentEventDisposition) => Promise<ServiceAppResidentEventView>;
2950
- replayDeadLetter: (scope: ServiceAppResidentEventScope, eventId: string) => Promise<ServiceAppResidentEventView>;
2951
- freeze: (scope: ServiceAppResidentEventScope) => Promise<void>;
2952
- resume: (scope: ServiceAppResidentEventScope) => Promise<void>;
2953
- private assertEventInput;
2954
- private retryDelay;
2955
- private clampLease;
2956
- private transition;
2957
- private assertLeased;
2958
- private requireEvent;
2959
- private requireEventByEventId;
2960
- private toView;
2961
- private toLeased;
2962
- private ensureLoaded;
2963
- private load;
2964
- private mutate;
2965
- private save;
2966
- private requireStore;
2967
- private requireDeadLetterStreams;
2968
- private trimAcknowledgedEvents;
2969
- private createStoreLimitError;
2970
- private storePath;
2971
- private readTime;
2972
- private isMissing;
2973
- private isStore;
2974
- private isEvent;
2975
- }
2976
- //#endregion
2977
- //#region src/services/service-app-runtime.service.d.ts
2978
- type RuntimeCall = {
2979
- app: ServiceAppRecord;
2980
- manifest: ServiceAppManifest;
2981
- };
2982
- declare class ServiceAppRuntimeService {
2983
- private readonly mcp;
2984
- private readonly portable;
2985
- private readonly protocols;
2986
- constructor(params: {
2987
- getConfig: () => Config;
2988
- configPath?: string;
2989
- appHomeDirectory?: string;
2990
- portableServiceRunnerPath?: string;
2991
- residentInbox?: ServiceAppResidentEventInboxService;
2992
- });
2993
- getStatus: (appId: string) => PortableRuntimeState;
2994
- getLastObservation: () => PortableRunnerObservation | undefined;
2995
- /** One kernel-owned callback path for Guest host calls; MCP never receives it. */
2996
- setPortableHostCallHandler: (handler: PortableServiceAppHostCallHandler | undefined) => void;
2997
- start: (call: RuntimeCall) => Promise<void>;
2998
- listActions: (call: RuntimeCall) => Promise<ServiceAction[]>;
2999
- invokeAction: (call: RuntimeCall & {
3000
- actionName: string;
3001
- input: Record<string, unknown>;
3002
- job?: {
3003
- jobId: string;
3004
- eventSink: ServiceAppJobEventSink;
3005
- callId?: string;
3006
- traceId?: string;
3007
- };
3008
- }) => Promise<unknown>;
3009
- stop: (appId: string) => Promise<void>;
3010
- restart: (appId: string) => Promise<void>;
3011
- cancelJob: (params: {
3012
- appId: string;
3013
- instanceId: string;
3014
- jobId: string;
3015
- }) => Promise<void>;
3016
- enqueueResidentEvent: (call: RuntimeCall & {
3017
- eventId: string;
3018
- streamKey?: string;
3019
- payload: Record<string, unknown>;
3020
- }) => Promise<ServiceAppResidentEventView>;
3021
- dispose: () => Promise<void>;
3022
- }
3023
- //#endregion
3024
- //#region src/managers/service-app-job.manager.d.ts
3025
- type ServiceAppLookup = (appId: string, materializeStorage?: boolean) => Promise<{
3026
- manifest: ServiceAppManifest;
3027
- record: ServiceAppRecord;
3028
- }>;
3029
- type JobRuntime = {
3030
- invokeAction: (params: {
3031
- app: ServiceAppRecord;
3032
- manifest: ServiceAppManifest;
3033
- actionName: string;
3034
- input: Record<string, unknown>;
3035
- job: {
3036
- jobId: string;
3037
- eventSink: ServiceAppJobEventSink;
3038
- callId: string;
3039
- traceId: string;
3040
- };
3041
- }) => Promise<unknown>;
3042
- cancelJob?: (params: {
3043
- appId: string;
3044
- instanceId: string;
3045
- jobId: string;
3046
- }) => Promise<void>;
3047
- enqueueResidentEvent?: (params: {
3048
- app: ServiceAppRecord;
3049
- manifest: ServiceAppManifest;
3050
- eventId: string;
3051
- streamKey?: string;
3052
- payload: Record<string, unknown>;
3053
- }) => Promise<ServiceAppResidentEventView>;
3054
- getLastObservation?: () => PortableRunnerObservation | undefined;
3055
- };
3056
- declare class ServiceAppJobManager {
3057
- private readonly params;
3058
- constructor(params: {
3059
- journal: ServiceAppJobJournalService;
3060
- residentInbox: ServiceAppResidentEventInboxService;
3061
- runtime: JobRuntime;
3062
- verificationRecords?: VerificationRecordService;
3063
- requireServiceApp: ServiceAppLookup;
3064
- listPackageComponentSources: () => Promise<AppPackageComponentSource[]>;
3065
- });
3066
- listVerificationRecords: (filters?: {
3067
- acceptanceId?: string;
3068
- appId?: string;
3069
- limit?: number;
3070
- }) => Promise<VerificationRecordList>;
3071
- exportVerificationRecords: (filters?: {
3072
- acceptanceId?: string;
3073
- appId?: string;
3074
- limit?: number;
3075
- }) => Promise<string>;
3076
- list: (appId: string, caller?: ServiceAppJobCaller) => Promise<ServiceAppJobList>;
3077
- get: (appId: string, jobId: string, caller?: ServiceAppJobCaller) => Promise<ServiceAppJobView>;
3078
- watch: (appId: string, jobId: string, afterSequence?: number, caller?: ServiceAppJobCaller) => Promise<ServiceAppJobWatch>;
3079
- cancel: (appId: string, jobId: string, caller?: ServiceAppJobCaller) => Promise<ServiceAppJobView>;
3080
- listResidentInbox: (appId: string, deadLettersOnly?: boolean) => Promise<ServiceAppResidentEventList>;
3081
- replayResidentDeadLetter: (appId: string, eventId: string) => Promise<ServiceAppResidentEventView>;
3082
- enqueueResidentEvent: (appId: string, input: ResidentEventInput) => Promise<ServiceAppResidentEventView>;
3083
- create: (params: {
3084
- record: ServiceAppRecord;
3085
- actionName: string;
3086
- callId: string;
3087
- traceId: string;
3088
- caller?: ServiceAppJobCaller;
3089
- retryOf?: string;
3090
- jobId?: string;
3091
- }) => Promise<ServiceAppJobView>;
3092
- createEventSink: (record: ServiceAppRecord, jobId: string) => ServiceAppJobEventSink;
3093
- invoke: (params: {
3094
- actionId: string;
3095
- actionName: string;
3096
- record: ServiceAppRecord;
3097
- manifest: ServiceAppManifest;
3098
- input: Record<string, unknown>;
3099
- role: "panel" | "agent" | "cli";
3100
- entrySurface: "panel" | "agent" | "installed-app-cli";
3101
- }) => Promise<ServiceActionInvokeResult>;
3102
- private recordInvocation;
3103
- private requireJobScope;
3104
- private requireResidentInboxScope;
3105
- private requireRecordScope;
3106
- private isVisible;
3107
- private assertVisible;
3108
- }
3109
- //#endregion
3110
- //#region src/services/service-app-record.service.d.ts
3111
- type ServiceAppStatusReader = {
3112
- getStatus: (appId: string) => {
3113
- status: ServiceAppRecord["status"];
3114
- lastError?: string;
3115
- lastStartedAt?: string;
3116
- lastReadyAt?: string;
3117
- lastFailedAt?: string;
3118
- };
3119
- };
3120
- type WorkspaceServiceDataOwner = {
3121
- id: string;
3122
- title: string;
3123
- };
3124
- declare class ServiceAppRecordService {
3125
- private readonly params;
3126
- private readonly instanceStorageService;
3127
- constructor(params: {
3128
- getWorkspacePath: () => string;
3129
- runtimeService: ServiceAppStatusReader;
3130
- listPackageComponentSources?: () => Promise<AppPackageComponentSource[]>;
3131
- listWorkspaceDirectoryNames?: (serviceAppsPath: string) => Promise<string[]>;
3132
- });
3133
- buildWorkspaceRecord: (serviceAppsPath: string, dirName: string) => Promise<ServiceAppRecord | null>;
3134
- buildPackageRecord: (source: AppPackageComponentSource) => Promise<ServiceAppRecord | null>;
3135
- require: (appId: string, materializeStorage?: boolean) => Promise<{
3136
- manifest: ServiceAppManifest;
3137
- record: ServiceAppRecord;
3138
- }>;
3139
- listValid: () => Promise<Array<{
3140
- manifest: ServiceAppManifest;
3141
- record: ServiceAppRecord;
3142
- }>>;
3143
- listWorkspaceDataOwners: (serviceAppsPath: string, dirNames: string[]) => Promise<WorkspaceServiceDataOwner[]>;
3144
- materializeWorkspaceStorage: (serviceId: string) => Promise<AppStorageContext>;
3145
- inspectWorkspaceStorage: (serviceId: string) => Promise<AppStorageContext | undefined>;
3146
- fromManifest: (dirPath: string, manifest: ServiceAppManifest, packageSource?: AppPackageComponentSource, storage?: AppStorageContext) => ServiceAppRecord;
3147
- private failedWorkspaceRecord;
3148
- private failedPackageRecord;
3149
- private toTitle;
3150
- private getWorkspaceInstanceDirectory;
3151
- private pathExists;
3152
- private isMissingFileError;
3153
- }
3154
- //#endregion
3155
- //#region src/managers/service-app-ai.manager.d.ts
3156
- declare class ServiceAppAiManager {
3157
- private readonly params;
3158
- constructor(params: {
3159
- capabilities: ServiceAppAiCapabilityService;
3160
- records: ServiceAppRecordService;
3161
- });
3162
- inspect: (appId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3163
- bindModel: (appId: string, slotId: string, modelId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3164
- bindAgent: (appId: string, slotId: string, agentId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3165
- unbind: (appId: string, kind: "model" | "agent", slotId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3166
- completeModel: (params: {
3167
- appId: string;
3168
- slotId: string;
3169
- messages: Array<Record<string, unknown>>;
3170
- maxTokens?: number;
3171
- signal?: AbortSignal;
3172
- }) => Promise<_$_nextclaw_core0.LLMResponse>;
3173
- startAgent: (params: {
3174
- appId: string;
3175
- slotId: string;
3176
- input: AgentRunSendIngressPayload;
3177
- callId: string;
3178
- jobId?: string;
3179
- traceId?: string;
3180
- signal?: AbortSignal;
3181
- }) => Promise<AgentRunExecution>;
3182
- }
3183
- //#endregion
3184
- //#region src/services/service-app-removal.service.d.ts
3185
- type ServiceAppRemovalDiagnostic = {
3186
- appId: string;
3187
- stagedPath: string;
3188
- message: string;
3189
- };
3190
- //#endregion
3191
- //#region src/utils/service-app-error.utils.d.ts
3192
- type ServiceAppErrorCode = "AUTHORIZATION_REQUIRED" | "DOCUMENT_SCOPE_NOT_GRANTED" | "DOCUMENT_SCOPE_MODE_INSUFFICIENT" | "DOCUMENT_SCOPE_UNAVAILABLE" | "SERVICE_APP_ACTION_NOT_DECLARED" | "SERVICE_APP_ACTION_NOT_FOUND" | "SERVICE_APP_INVALID_ACTION" | "SERVICE_APP_INVALID_CALLER" | "SERVICE_APP_INVALID_MANIFEST" | "SERVICE_APP_MANAGED_SOURCE" | "SERVICE_APP_JOB_CONFLICT" | "SERVICE_APP_JOB_CURSOR_INVALID" | "SERVICE_APP_JOB_EVENT_LIMIT" | "SERVICE_APP_JOB_NOT_FOUND" | "SERVICE_APP_JOB_TERMINAL" | "SERVICE_APP_RESIDENT_EVENT_NOT_FOUND" | "SERVICE_APP_RESIDENT_EVENT_CONFLICT" | "SERVICE_APP_RESIDENT_EVENT_LEASE_INVALID" | "SERVICE_APP_RESIDENT_INBOX_FROZEN" | "SERVICE_APP_RESIDENT_INBOX_LIMIT_EXCEEDED" | "SERVICE_APP_NOT_FOUND" | "SERVICE_APP_READ_FAILED" | "SERVICE_APP_RUNTIME_FAILED" | "STREAM_BACKPRESSURE_TIMEOUT" | "STREAM_CURSOR_EXPIRED" | "WASI_ABI_VERSION_MISMATCH" | "WASI_CAPABILITY_DENIED" | "WASI_COMPONENT_FAILED" | "WASI_COMPONENT_TRAP" | "WASI_GUEST_EXPORT_MISSING" | "WASI_INPUT_SCHEMA_MISMATCH";
3193
- declare class ServiceAppError extends Error {
3194
- readonly code: ServiceAppErrorCode;
3195
- readonly details?: Record<string, unknown> | undefined;
3196
- constructor(code: ServiceAppErrorCode, message: string, details?: Record<string, unknown> | undefined);
3197
- }
3198
- declare const isServiceAppError: (error: unknown) => error is ServiceAppError;
3199
- //#endregion
3200
- //#region src/managers/service-app.manager.d.ts
3201
- type ServiceAppList = {
3202
- workspacePath: string;
3203
- serviceAppsPath: string;
3204
- entries: ServiceAppRecord[];
3205
- diagnostics: ServiceAppRemovalDiagnostic[];
3206
- };
3207
- type ServiceAppDeleteResult = {
3208
- deleted: true;
3209
- id: string;
3210
- dataRemoved: boolean;
3211
- };
3212
- declare class ServiceAppManager {
3213
- private readonly params;
3214
- private readonly removalService;
3215
- private readonly runtimeService;
3216
- private readonly recordService;
3217
- private readonly actionGrants;
3218
- private readonly packageRuntime;
3219
- private readonly lifecycleService;
3220
- readonly aiCapabilities: ServiceAppAiCapabilityService;
3221
- private readonly aiManager;
3222
- private readonly verificationRecords?;
3223
- private readonly jobJournal;
3224
- private readonly jobManager;
3225
- private readonly activationManager;
3226
- private readonly residentInbox;
3227
- private reconciliationDiagnostics;
3228
- constructor(params: {
3229
- appHomeDirectory?: string;
3230
- configManager: ConfigManager;
3231
- runtimeService?: ServiceAppRuntime;
3232
- listPackageComponentSources?: () => Promise<AppPackageComponentSource[]>;
3233
- assertDocumentAccess?: (appId: string, scopeId: string, mode: "read" | "read-write") => Promise<void>;
3234
- capabilityGrantManager: CapabilityGrantManager;
3235
- hasAgent?: (agentId: string) => boolean;
3236
- providerManager?: LlmProviderRuntime;
3237
- llmUsage?: Pick<LlmUsageManager, "observeProviderManager">;
3238
- agentRunClient?: Pick<AgentRunClient, "startRun">;
3239
- portableServiceRunnerPath?: string;
3240
- verificationRecords?: VerificationRecordService;
3241
- jobJournal?: ServiceAppJobJournalService;
3242
- residentInbox?: ServiceAppResidentEventInboxService;
3243
- });
3244
- start: () => Promise<void>;
3245
- listServiceApps: () => Promise<ServiceAppList>;
3246
- listCapabilityProviders: () => Promise<CapabilityProviderView[]>;
3247
- getServiceApp: (appId: string) => Promise<ServiceAppRecord>;
3248
- inspectServiceAppAiCapabilities: (appId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3249
- verifyServiceAppAiCapabilities: (appId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3250
- bindServiceAppModelSlot: (appId: string, slotId: string, modelId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3251
- bindServiceAppAgentSlot: (appId: string, slotId: string, agentId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3252
- unbindServiceAppAiSlot: (appId: string, kind: "model" | "agent", slotId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3253
- completeServiceAppModelSlot: (params: Parameters<ServiceAppAiManager["completeModel"]>[0]) => Promise<_$_nextclaw_core0.LLMResponse>;
3254
- startServiceAppAgentSlot: (params: Parameters<ServiceAppAiManager["startAgent"]>[0]) => Promise<AgentRunExecution>;
3255
- listServiceActions: (params?: {
3256
- caller?: ServiceActionCaller;
3257
- appId?: string;
3258
- declaredActions?: readonly string[];
3259
- }) => Promise<ServiceAction[]>;
3260
- discoverServiceAppActions: (appId: string) => Promise<ServiceAction[]>;
3261
- invokeServiceAction: (actionId: string, request: ServiceActionInvokeRequest) => Promise<ServiceActionInvokeResult>;
3262
- /**
3263
- * Calls a Service component belonging to an enabled installed package.
3264
- * This is deliberately separate from source-tree `nextclaw app call`.
3265
- */
3266
- invokeInstalledServiceAction: (appId: string, actionName: string, input?: Record<string, unknown>) => Promise<ServiceActionInvokeResult>;
3267
- private assertDocumentInputAccess;
3268
- listVerificationRecords: (filters?: {
3269
- acceptanceId?: string;
3270
- appId?: string;
3271
- limit?: number;
3272
- }) => Promise<VerificationRecordList>;
3273
- exportVerificationRecords: (filters?: {
3274
- acceptanceId?: string;
3275
- appId?: string;
3276
- limit?: number;
3277
- }) => Promise<string>;
3278
- listServiceAppJobs: (appId: string, params?: {
3279
- caller?: ServiceAppJobCaller;
3280
- }) => Promise<ServiceAppJobList>;
3281
- getServiceAppJob: (appId: string, jobId: string, params?: {
3282
- caller?: ServiceAppJobCaller;
3283
- }) => Promise<ServiceAppJobView>;
3284
- watchServiceAppJob: (appId: string, jobId: string, afterSequence?: number, params?: {
3285
- caller?: ServiceAppJobCaller;
3286
- }) => Promise<ServiceAppJobWatch>;
3287
- cancelServiceAppJob: (appId: string, jobId: string, params?: {
3288
- caller?: ServiceAppJobCaller;
3289
- }) => Promise<ServiceAppJobView>;
3290
- listResidentInbox: (appId: string, params?: {
3291
- deadLettersOnly?: boolean;
3292
- }) => Promise<ServiceAppResidentEventList>;
3293
- replayResidentDeadLetter: (appId: string, eventId: string) => Promise<ServiceAppResidentEventView>;
3294
- enqueueResidentEvent: (appId: string, input: ResidentEventInput) => Promise<ServiceAppResidentEventView>;
3295
- createServiceAppJob: (params: Parameters<ServiceAppJobManager["create"]>[0]) => Promise<ServiceAppJobView>;
3296
- createServiceAppJobEventSink: (record: ServiceAppRecord, jobId: string) => ServiceAppJobEventSink;
3297
- grantServiceAction: (actionId: string, request: ServiceActionGrantRequest) => Promise<ServiceActionGrant>;
3298
- grantServiceActions: (actionIds: readonly string[], request: ServiceActionGrantRequest) => Promise<ServiceActionGrant[]>;
3299
- listServiceActionGrants: () => Promise<ServiceActionGrant[]>;
3300
- revokeServiceAction: (caller: ServiceActionCaller, actionId: string) => Promise<void>;
3301
- matchesCapabilityGrant: (grant: CapabilityGrant) => Promise<boolean>;
3302
- restartServiceApp: (appId: string) => Promise<ServiceAppRecord>;
3303
- listWorkspaceDataOwners: () => Promise<WorkspaceServiceDataOwner[]>;
3304
- deleteServiceApp: (appId: string, purgeData?: boolean) => Promise<ServiceAppDeleteResult>;
3305
- dispose: () => Promise<void>;
3306
- assertCanActivatePackageComponents: (components: AppPackageComponentSource[]) => Promise<void>;
3307
- activatePackageComponents: (components: AppPackageComponentSource[]) => Promise<void>;
3308
- deactivatePackageComponents: (components: AppPackageComponentSource[]) => Promise<void>;
3309
- preparePackageComponentDeactivation: (components: AppPackageComponentSource[]) => Promise<() => Promise<void>>;
3310
- removePackageComponentGrants: (components: AppPackageComponentSource[]) => Promise<() => Promise<void>>;
3311
- private withGrantState;
3312
- private requireServiceAction;
3313
- private requireServiceAppForAction;
3314
- private requireInstalledServiceApp;
3315
- private normalizeActionIds;
3316
- private toJobScope;
3317
- private getWorkspacePath;
3318
- private getServiceAppsPath;
3319
- private getServiceAppLockPath;
3320
- private listPackageComponentSources;
3321
- private listServiceAppDirNames;
3322
- private isMissingFileError;
3323
- }
3324
- type ServiceAppRuntime = Pick<ServiceAppRuntimeService, "dispose" | "getLastObservation" | "getStatus" | "invokeAction" | "listActions" | "restart" | "stop"> & Pick<Partial<ServiceAppRuntimeService>, "start"> & {
3325
- cancelJob?: (params: {
3326
- appId: string;
3327
- instanceId: string;
3328
- jobId: string;
3329
- }) => Promise<void>;
3330
- enqueueResidentEvent?: ServiceAppRuntimeService["enqueueResidentEvent"];
3331
- setPortableHostCallHandler?: ServiceAppRuntimeService["setPortableHostCallHandler"];
3332
- }; //# sourceMappingURL=service-app.manager.d.ts.map
3333
- //#endregion
3334
- //#region src/managers/skill.manager.d.ts
3335
- type WorkspaceParams = {
3336
- workspace: string;
3337
- };
3338
- type InstalledSkillSummary = {
3339
- ref: string;
3340
- name: string;
3341
- path: string;
3342
- relativePath: string | null;
3343
- scope: SkillInfo$1["scope"];
3344
- source: SkillInfo$1["source"];
3345
- summary: string | null;
3346
- summaryI18n: LocalizedTextMap$1 | null;
3347
- description: string | null;
3348
- descriptionI18n: LocalizedTextMap$1 | null;
3349
- author: string | null;
3350
- tags: string[];
3351
- always: boolean;
3352
- };
3353
- type InstalledSkillDetail = InstalledSkillSummary & {
3354
- metadata: Record<string, string> | null;
3355
- raw: string;
3356
- bodyRaw: string;
3357
- };
3358
- type InstalledSkillsList = {
3359
- workspace: string;
3360
- total: number;
3361
- skills: InstalledSkillSummary[];
3362
- };
3363
- declare class SkillManager {
3364
- private readonly loader;
3365
- private readonly workspace;
3366
- constructor(params: WorkspaceParams);
3367
- listSkills: (params?: {
3368
- filterUnavailable?: boolean;
3369
- }) => SkillInfo$1[];
3370
- getSkillInfo: (selector: string) => SkillInfo$1 | null;
3371
- getSkillMetadata: (selector: string | SkillInfo$1) => Record<string, string> | null;
3372
- loadSkillContent: (selector: string) => string | null;
3373
- listInstalledSkills: (params?: {
3374
- query?: string;
3375
- scope?: string;
3376
- }) => InstalledSkillsList;
3377
- getInstalledSkillDetail: (selector: string) => InstalledSkillDetail | null;
3378
- findBuiltinSkill: (name: string) => SkillInfo$1 | null;
3379
- resolveBuiltinSkillDir: (name: string) => string | null;
3380
- private buildInstalledSkillSummary;
3381
- private matchesInstalledSkillQuery;
3382
- private readAlwaysFlag;
3383
- private buildRelativePath;
3384
- private normalizeInstalledScope;
3385
- private normalizeOptionalString;
3386
- }
3387
- //#endregion
3388
- //#region src/features/session-request/managers/session-request.manager.d.ts
3389
- type SessionRequestManagerOptions = {
3390
- dispatcher: SessionRequestDispatcher;
3391
- notifySourceSession?: SessionRequestSourceNotifier;
3392
- sessionManager: SessionManager;
3393
- };
3394
- declare class SessionRequestManager {
3395
- private readonly options;
3396
- constructor(options: SessionRequestManagerOptions);
3397
- spawnSessionAndRequest: (params: SpawnSessionAndRequestParams) => Promise<SessionRequestToolResult>;
3398
- requestSession: (params: RequestSessionParams) => Promise<SessionRequestToolResult>;
3399
- private dispatchRequest;
3400
- private toSessionRequestPayload;
3401
- private buildToolResult;
3402
- private appendRequestEvents;
3403
- private runRequest;
3404
- private runRequestAndDeliverOutcome;
3405
- private updateSourceToolResult;
3406
- private appendAcceptedRequestEvent;
3407
- private appendRequestEvent;
3408
- }
3409
- //#endregion
3410
- //#region src/features/session-request/utils/agent-runtime-session-request-dispatcher.utils.d.ts
3411
- type AgentRuntimeSessionRequestDispatcherOptions = {
3412
- eventBus: EventBus$1;
3413
- ingress: Ingress$1;
3414
- };
3415
- declare function buildSessionRequestCompletionMessage(input: {
3416
- request: SessionRequestRecord;
3417
- result: SessionRequestToolResult;
3418
- }): NcpMessage$1;
3419
- declare function createAgentRuntimeSessionRequestSourceNotifier(options: {
3420
- ingress: Ingress$1;
3421
- }): SessionRequestSourceNotifier;
3422
- declare function waitForAgentRuntimeSessionReply(input: {
3423
- eventBus: EventBus$1;
3424
- onAccepted: (messageId: string) => void;
3425
- requestId: string;
3426
- }): {
3427
- dispose: Unsubscribe$1;
3428
- promise: Promise<NcpMessage$1>;
3429
- };
3430
- declare function dispatchAgentRuntimeSessionRequest(input: {
3431
- ingress: Ingress$1;
3432
- request: SessionRequestRecord;
3433
- task: string;
3434
- }): Promise<void>;
3435
- declare function createAgentRuntimeSessionRequestDispatcher(options: AgentRuntimeSessionRequestDispatcherOptions): SessionRequestDispatcher;
3436
- //#endregion
3437
- //#region src/features/feature-controls/types/feature-controls.types.d.ts
3438
- type ProductFeatureControls = {
3439
- desktopAutomation: {
3440
- available: boolean;
3441
- };
3442
- };
3443
- //#endregion
3444
- //#region src/features/feature-controls/services/feature-controls.service.d.ts
3445
- declare class FeatureControlsService {
3446
- private readonly desktopHost;
3447
- constructor(desktopHost: DesktopHost);
3448
- get: () => Promise<ProductFeatureControls>;
3449
- }
3450
- //#endregion
3451
- //#region src/utils/portable-runtime-acceptance-presentation.utils.d.ts
3452
- /**
3453
- * The only product-language owner for the portable-runtime acceptance
3454
- * contract. Every surface receives this projection from the Kernel instead of
3455
- * carrying a parallel list of PRT ids or translations.
3456
- */
3457
- declare const PORTABLE_RUNTIME_ACCEPTANCE_LOCALES: readonly ["zh-CN", "en"];
3458
- type PortableRuntimeAcceptanceLocale = (typeof PORTABLE_RUNTIME_ACCEPTANCE_LOCALES)[number];
3459
- type PortableRuntimeAcceptancePresentation = {
3460
- title: string;
3461
- description: string;
3462
- };
3463
- type PortableRuntimeAcceptancePresentationCatalog = Record<PortableRuntimeAcceptanceLocale, Record<string, string>>;
3464
- declare const PORTABLE_RUNTIME_ACCEPTANCE_PRESENTATION: PortableRuntimeAcceptancePresentationCatalog;
3465
- declare function resolvePortableRuntimeAcceptanceLocale(value: unknown): PortableRuntimeAcceptanceLocale;
3466
- declare function presentPortableRuntimeAcceptanceDefinition(definition: PortableRuntimeAcceptanceDefinition, locale: PortableRuntimeAcceptanceLocale): PortableRuntimeAcceptancePresentation;
3467
- //#endregion
3468
- //#region src/services/portable-runtime-acceptance-identity.service.d.ts
3469
- type PortableRuntimeAcceptanceIdentity = {
3470
- available: true;
3471
- context: PortableRuntimeAcceptanceEvaluationContext;
3472
- runtimeVersionSource: "configured" | "product-version-fallback";
3473
- runnerFingerprint: string;
3474
- };
3475
- type PortableRuntimeAcceptanceUnavailableIdentity = {
3476
- available: false;
3477
- reason: string;
3478
- environment: PortableRuntimeAcceptancePlatform | null;
3479
- productVersion: string | null;
3480
- runtimeVersion: string | null;
3481
- runtimeVersionSource: "configured" | "product-version-fallback" | null;
3482
- };
3483
- type PortableRuntimeAcceptanceIdentityResult = PortableRuntimeAcceptanceIdentity | PortableRuntimeAcceptanceUnavailableIdentity;
3484
- /**
3485
- * Resolves the identity against which evidence is judged. It deliberately
3486
- * reads the currently distributed runner rather than deriving identity from a
3487
- * previous VerificationRecord, so an updated runtime cannot self-certify with
3488
- * its own old evidence.
3489
- */
3490
- declare class PortableRuntimeAcceptanceIdentityService {
3491
- private readonly params;
3492
- private cachedRunner;
3493
- constructor(params: {
3494
- productVersion?: string;
3495
- runtimeVersion?: string;
3496
- portableServiceRunnerPath?: string;
3497
- platform?: NodeJS.Platform;
3498
- arch?: string;
3499
- });
3500
- resolve: (appId: string) => Promise<PortableRuntimeAcceptanceIdentityResult>;
3501
- private fingerprintRunner;
3502
- }
3503
- declare function normalizePortableRuntimeEnvironment(platform: NodeJS.Platform, arch: string): PortableRuntimeAcceptancePlatform | null;
3504
- //#endregion
3505
- //#region src/services/portable-runtime-acceptance-manager.service.d.ts
3506
- /** The fixed installed App used for the canonical portable-runtime acceptance matrix. */
3507
- declare const PORTABLE_RUNTIME_ACCEPTANCE_REFERENCE_APP_ID = "nextclaw.github-issue-watcher";
3508
- type PortableRuntimeAcceptanceContractView = {
3509
- contractFingerprint: string;
3510
- locale: PortableRuntimeAcceptanceLocale;
3511
- definitions: PortableRuntimeAcceptanceDefinitionView[];
3512
- };
3513
- type PortableRuntimeAcceptanceDefinitionView = PortableRuntimeAcceptanceDefinition & {
3514
- presentation: PortableRuntimeAcceptancePresentation;
3515
- };
3516
- /**
3517
- * The evaluator always has a concrete platform. Product status additionally
3518
- * represents an unavailable identity, where the host may itself be unknown.
3519
- */
3520
- type PortableRuntimeAcceptanceSurfaceResult = Omit<PortableRuntimeAcceptanceResult, "environment"> & {
3521
- environment: PortableRuntimeAcceptancePlatform | null;
3522
- };
3523
- type PortableRuntimeAcceptanceStatusEntry = PortableRuntimeAcceptanceDefinitionView & {
3524
- result: PortableRuntimeAcceptanceSurfaceResult;
3525
- };
3526
- type PortableRuntimeAcceptanceStatusView = {
3527
- schemaVersion: 1;
3528
- contract: PortableRuntimeAcceptanceContractView;
3529
- appId: string;
3530
- identity: PortableRuntimeAcceptanceIdentityResult;
3531
- entries: PortableRuntimeAcceptanceStatusEntry[];
3532
- summary: Record<PortableRuntimeAcceptanceResultStatus, number>;
3533
- };
3534
- /**
3535
- * Read-only product projection over the single contract registry and durable
3536
- * records. No Panel, API route, or CLI command computes an acceptance state.
3537
- */
3538
- declare class PortableRuntimeAcceptanceManager {
3539
- private readonly params;
3540
- constructor(params: {
3541
- verificationRecords: VerificationRecordService;
3542
- identity: PortableRuntimeAcceptanceIdentityService; /** Test-only injection keeps the production source the canonical registry. */
3543
- definitions?: readonly PortableRuntimeAcceptanceDefinition[];
3544
- });
3545
- private get definitions();
3546
- contract: (locale?: unknown) => PortableRuntimeAcceptanceContractView;
3547
- status: (params?: {
3548
- appId?: string;
3549
- locale?: unknown;
3550
- }) => Promise<PortableRuntimeAcceptanceStatusView>;
3551
- export: (params?: {
3552
- appId?: string;
3553
- locale?: unknown;
3554
- }) => Promise<PortableRuntimeAcceptanceStatusView>;
3555
- private present;
3556
- private groupEvidence;
3557
- private unavailableResults;
3558
- }
3559
- //#endregion
3560
- //#region src/app/nextclaw-kernel.d.ts
3561
- type NextclawKernelOptions = {
3562
- homeDir?: string;
3563
- configPath?: string;
3564
- builtInAppsDirectory?: string;
3565
- portableServiceRunnerPath?: string;
3566
- productVersion?: string; /** Version of the active runtime bundle; local development falls back to productVersion. */
3567
- runtimeVersion?: string;
3568
- productActivitySink?: ProductActivitySink;
3569
- desktopHost?: DesktopHost;
3570
- contextProfile?: "default" | "embedded";
3571
- sessionSearchEnabled?: boolean;
3572
- sessionTitleEnabled?: boolean;
3573
- };
3574
- type NextclawKernelRuntimeControl<TGatewayInput, TUiInput, TStartInput> = {
3575
- gateway: (input: TGatewayInput) => Promise<void>;
3576
- ui: (input: TUiInput) => Promise<void>;
3577
- start: (input: TStartInput) => Promise<void>;
3578
- restart: (input: TStartInput) => Promise<void>;
3579
- serve: (input: TStartInput) => Promise<void>;
3580
- stop: () => Promise<void>;
3581
- };
3582
- declare class NextclawKernelControlManager<TGatewayInput, TUiInput, TStartInput> {
3583
- private runtimeControl;
3584
- installRuntimeControl: (runtimeControl: NextclawKernelRuntimeControl<TGatewayInput, TUiInput, TStartInput>) => void;
3585
- requireRuntimeControl: () => NextclawKernelRuntimeControl<TGatewayInput, TUiInput, TStartInput>;
3586
- }
3587
- declare class NextclawKernel {
3588
- private readonly options;
3589
- readonly eventBus: EventBus$1;
3590
- readonly ingress: Ingress$1;
3591
- readonly messageBus: MessageBus;
3592
- readonly diagnostics: DiagnosticRuntime;
3593
- readonly llmProviders: LlmProviderManager;
3594
- readonly providerModelCatalog: ProviderModelCatalogManager;
3595
- readonly llmUsage: LlmUsageManager;
3596
- readonly configManager: ConfigManager;
3597
- readonly accessManager: AccessManager;
3598
- readonly agents: AgentManager;
3599
- readonly control: NextclawKernelControlManager<unknown, unknown, unknown>;
3600
- readonly skills: SkillManager;
3601
- readonly automation: AutomationManager;
3602
- readonly appPackageManager: AppPackageManager;
3603
- readonly appDataManager: AppDataManager;
3604
- readonly channels: ChannelManager;
3605
- readonly sessionRequests: SessionRequestManager;
3606
- readonly sessionSearch: SessionSearchService;
3607
- readonly assetStore: LocalAssetStore;
3608
- readonly mcpManager: McpManager;
3609
- readonly sessionManager: SessionManager;
3610
- private userQuestionManager;
3611
- readonly inboxDeliveryManager: InboxDeliveryManager;
3612
- readonly systemObjectReferenceManager: SystemObjectReferenceManager;
3613
- readonly panelAppManager: PanelAppManager;
3614
- readonly preferenceManager: PreferenceManager;
3615
- readonly projectManager: ProjectManager;
3616
- readonly projectMaterials: ProjectMaterialService;
3617
- readonly projectWorkManager: ProjectWorkManager;
3618
- readonly serviceAppManager: ServiceAppManager;
3619
- readonly extensions: ExtensionManager;
3620
- readonly agentRuntimeManager: AgentRuntimeManager;
3621
- readonly agentContextWindowManager: AgentContextWindowManager;
3622
- readonly contextCompactionManager: AgentRunContextCompactionManager;
3623
- readonly contextProviderManager: ContextProviderManager;
3624
- readonly requestContextTailManager: RequestContextTailManager;
3625
- readonly sessionRunManager: SessionRunManager;
3626
- readonly sessionContextCompactionManager: SessionContextCompactionManager;
3627
- readonly toolProviderManager: ToolProviderManager;
3628
- readonly agentRunRequestManager: AgentRunRequestManager;
3629
- readonly observations: ObservationManager;
3630
- readonly capabilityGrants: CapabilityGrantManager;
3631
- readonly featureControls: FeatureControlsService;
3632
- readonly verificationRecords: VerificationRecordService;
3633
- readonly portableRuntimeAcceptance: PortableRuntimeAcceptanceManager;
3634
- readonly plannedRestartRecovery: PlannedRestartRecoveryManager;
3635
- private readonly capabilityGrantLegacyMigration;
3636
- private readonly ncpAgentSessionJournalStore;
3637
- private readonly contributions;
3638
- private gatewayController;
3639
- constructor(options?: NextclawKernelOptions);
3640
- private createCapabilityGrantLegacyMigration;
3641
- get userQuestions(): UserQuestionManager;
3642
- listSessionTypes: (params?: AgentRuntimeSessionTypeDescribeParams) => Promise<{
3643
- defaultType: string;
3644
- options: AgentRuntimeSessionTypeOption[];
3645
- }>;
3646
- isSessionRunning: (sessionId: string) => boolean;
3647
- provideGatewayController: (gatewayController: GatewayController) => void;
3648
- getGatewayController: () => GatewayController | undefined;
3649
- start: () => Promise<void>;
3650
- dispose: () => Promise<void>;
3651
- }
3652
- //#endregion
3653
- //#region src/stores/session-journal-maintenance.store.d.ts
3654
- type SessionJournalCompactionResult = {
3655
- sessionId: string;
3656
- applied: boolean;
3657
- inputBytes: number;
3658
- outputBytes: number;
3659
- inputLines: number;
3660
- outputLines: number;
3661
- };
3662
- /** Refuse to append after a partial write: another JSONL entry would hide the torn tail. */
3663
- declare function assertSessionJournalTailComplete(source: string): Promise<void>;
3664
- /** Runs before the catalog opens. An interrupted switch always rolls back to the untouched backup. */
3665
- declare function recoverSessionJournalMaintenance(journalDir: string): Promise<void>;
3666
- /** Restores the original v1 journal after a successful offline compaction. All writers must be stopped. */
3667
- declare function restoreSessionJournalBackup(input: {
3668
- journalDir: string;
3669
- sessionId: string;
3670
- writersStopped?: true;
3671
- }): Promise<{
3672
- sessionId: string;
3673
- restored: true;
3674
- }>;
3675
- /** Explicit offline operation. The caller must stop every writer for this HOME before apply. */
3676
- declare function compactSessionJournal(input: {
3677
- journalDir: string;
3678
- sessionId: string;
3679
- apply: boolean;
3680
- writersStopped?: true;
3681
- }): Promise<SessionJournalCompactionResult>;
3682
- //#endregion
3683
- //#region src/contributions/learning-loop/config.d.ts
3684
- type LearningLoopRuntimeConfig = {
3685
- enabled: boolean;
3686
- toolCallThreshold: number;
3687
- };
3688
- declare function readLearningLoopRuntimeConfig(config: Config): LearningLoopRuntimeConfig;
3689
- //#endregion
3690
- //#region src/features/runtime-instance/utils/runtime-instance-snapshot.utils.d.ts
3691
- type RuntimeDistribution = "desktop" | "cli" | "unknown";
3692
- type RuntimeInstallationKind = "portable" | "installed" | null;
3693
- type RuntimeInstanceSnapshot = {
3694
- distribution: RuntimeDistribution;
3695
- installationKind: RuntimeInstallationKind;
3696
- storage: {
3697
- portableDataRoot: string | null;
3698
- runtimeHome: string;
3699
- desktopDataDirectory: string | null;
3700
- desktopLogsDirectory: string | null;
3701
- runtimeLogsDirectory: string;
3702
- configPath: string;
3703
- workspacePath: string;
3704
- };
3705
- };
3706
- type ResolveRuntimeInstanceSnapshotParams = {
3707
- configPath: string;
3708
- runtimeHome: string;
3709
- runtimeLogsDirectory: string;
3710
- workspacePath: string;
3711
- env?: NodeJS.ProcessEnv;
3712
- };
3713
- declare function resolveRuntimeInstanceSnapshot(params: ResolveRuntimeInstanceSnapshotParams): RuntimeInstanceSnapshot;
3714
- //#endregion
3715
- //#region src/configs/agent-runtime.config.d.ts
3716
- declare const DEFAULT_AGENT_RUNTIME_ENTRY_ID = "native";
3717
- //#endregion
3718
- //#region src/features/narp-runtime/services/builtin-narp-runtime-provider.service.d.ts
3719
- declare const NARP_HTTP_RUNTIME_KIND = "narp-http";
3720
- declare const NARP_STDIO_RUNTIME_KIND = "narp-stdio";
3721
- declare class BuiltinNarpRuntimeProviderService {
3722
- private readonly configManager;
3723
- constructor(configManager: Pick<ConfigManager, "loadConfig">);
3724
- createProviders: () => AgentRuntimeProviderRegistration[];
3725
- private createUnavailableRuntime;
3726
- private createHttpRuntime;
3727
- private createStdioRuntime;
3728
- }
3729
- //#endregion
3730
- //#region src/utils/agent-run-send-payload.utils.d.ts
3731
- type AssetApi = {
3732
- putBytes: (input: {
3733
- fileName: string;
3734
- mimeType?: string | null;
3735
- bytes: Uint8Array;
3736
- createdAt?: Date;
3737
- }) => Promise<{
3738
- uri: string;
3739
- }>;
3740
- resolveContentPath?: (uri: string) => string | null;
3741
- };
3742
- type BuildAgentRunSendPayloadParams = {
3743
- sessionId: string;
3744
- content: string;
3745
- attachments?: InboundAttachment[];
3746
- metadata?: Record<string, unknown>;
3747
- assetApi?: AssetApi;
3748
- };
3749
- declare function buildAgentRunSendPayload(params: BuildAgentRunSendPayloadParams): Promise<AgentRunSendIngressPayload>;
3750
- //#endregion
3751
- //#region src/features/ncp-dispatch/services/gateway-inbound-processor.service.d.ts
3752
- type GatewayInboundLoopRuntime = {
3753
- kernel: {
3754
- channels: ChannelManager;
3755
- assetStore: AssetApi;
3756
- diagnostics?: Pick<DiagnosticRuntime, "record" | "readCorrelationId">;
3757
- };
3758
- agentRunClient: AgentRunClient;
3759
- messageBus: MessageBus;
3760
- sessionManager: SessionManager;
3761
- configManager: {
3762
- loadConfig: () => Config;
3763
- };
3764
- appEventBus?: EventBus$1;
3765
- };
3766
- declare class GatewayInboundProcessor {
3767
- private runtime;
3768
- constructor(runtime: GatewayInboundLoopRuntime);
3769
- process: (message: InboundMessage) => Promise<void>;
3770
- private record;
3771
- private resolveRoute;
3772
- private dispatchSlashCommandMaybe;
3773
- private dispatchChannelReplyRouteMaybe;
3774
- private publishChannelReply;
3775
- }
3776
- declare function runGatewayInboundLoop(runtime: GatewayInboundLoopRuntime): Promise<void>;
3777
- //#endregion
3778
- //#region src/features/ncp-dispatch/utils/channel-reply.utils.d.ts
3779
- type ReplyCapableChannel = BaseChannel<Record<string, unknown>> & {
3780
- consumeNcpReply(input: NcpReplyInput): Promise<void>;
3781
- };
3782
- type ChannelReplyRoute = {
3783
- target: ChatTarget;
3784
- channel: ReplyCapableChannel;
3785
- };
3786
- type ResolvedInboundRoute = {
3787
- accountId?: string | null;
3788
- };
3789
- type ChannelReplyRouterDispatchParams = {
3790
- agentRunClient: AgentRunClient;
3791
- assetApi?: AssetApi;
3792
- route: ChannelReplyRoute;
3793
- sessionId: string;
3794
- content: string;
3795
- attachments?: InboundAttachment[];
3796
- metadata?: Record<string, unknown>;
3797
- abortSignal?: AbortSignal;
3798
- onEvent?: (event: NcpEndpointEvent$1) => void;
3799
- };
3800
- declare function isReplyCapableChannel(channel: BaseChannel<Record<string, unknown>> | null | undefined): channel is ReplyCapableChannel;
3801
- declare function resolveChannelReplyRoute(params: {
3802
- channel: BaseChannel<Record<string, unknown>> | null | undefined;
3803
- message: InboundMessage;
3804
- route: ResolvedInboundRoute;
3805
- }): ChannelReplyRoute | null;
3806
- declare function dispatchChannelReplyRoute(params: ChannelReplyRouterDispatchParams): Promise<void>;
3807
- //#endregion
3808
- //#region src/features/ncp-dispatch/utils/nextclaw-ncp-dispatch.utils.d.ts
3809
- type DirectPromptDispatchParams = {
3810
- config: Config;
3811
- agentRunClient: AgentRunClient;
3812
- content: string;
3813
- sessionKey?: string;
3814
- channel?: string;
3815
- chatId?: string;
3816
- attachments?: InboundAttachment[];
3817
- metadata?: Record<string, unknown>;
3818
- agentId?: string;
3819
- abortSignal?: AbortSignal;
3820
- onAssistantDelta?: (delta: string) => void;
3821
- onEvent?: (event: NcpEndpointEvent$1) => void;
3822
- allowSlashCommands?: boolean;
3823
- };
3824
- type DirectPromptDispatchResult = {
3825
- kind: "agent" | "command";
3826
- agentId: string;
3827
- sessionId: string;
3828
- runId: string | null;
3829
- text: string;
3830
- completedMessage: NcpMessage$1 | null;
3831
- };
3832
- type DirectPromptDispatchExecution = {
3833
- kind: "command";
3834
- result: DirectPromptDispatchResult;
3835
- } | {
3836
- kind: "agent";
3837
- agentId: string;
3838
- sessionId: string;
3839
- execution: AgentRunExecution;
3840
- };
3841
- declare function startPromptOverNcpExecution(params: DirectPromptDispatchParams): Promise<DirectPromptDispatchExecution>;
3842
- declare function dispatchPromptOverNcpResult(params: DirectPromptDispatchParams): Promise<DirectPromptDispatchResult>;
3843
- declare function dispatchPromptOverNcp(params: DirectPromptDispatchParams): Promise<string>;
3844
- //#endregion
3845
- //#region src/features/harness/managers/nextclaw-contribution.manager.d.ts
3846
- declare abstract class Contribution extends Contribution$1 {
3847
- readonly id: string;
3848
- readonly version?: string;
3849
- protected constructor(options: {
3850
- id: string;
3851
- version?: string;
3852
- });
3853
- protected get kernel(): IKernel;
3854
- }
3855
- //#endregion
3856
- //#region src/features/harness/types/nextclaw-harness.types.d.ts
3857
- type NextclawHarnessErrorCode = "invalid_input" | "cancelled" | "lifecycle" | "runtime_failure";
3858
- declare class NextclawHarnessError extends Error {
3859
- readonly code: NextclawHarnessErrorCode;
3860
- readonly cause?: unknown;
3861
- constructor(code: NextclawHarnessErrorCode, message: string, cause?: unknown);
3862
- }
3863
- type NextclawTaskInput = {
3864
- input: string;
3865
- channel?: string;
3866
- agentId?: string;
3867
- sessionId?: string;
3868
- model?: string;
3869
- signal?: AbortSignal;
3870
- onEvent?: (event: NcpEndpointEvent$1) => void;
3871
- onAssistantDelta?: (delta: string) => void;
3872
- };
3873
- type NextclawTaskResult = {
3874
- schemaVersion: "nextclaw.task/v1";
3875
- status: "completed";
3876
- kind: "agent" | "command";
3877
- agentId: string;
3878
- sessionId: string;
3879
- runId: string | null;
3880
- text: string;
3881
- completedMessage: NcpMessage$1 | null;
3882
- };
3883
- type NextclawUserQuestion = UserQuestionView;
3884
- type NextclawUserQuestionReply = {
3885
- question: NextclawUserQuestion;
3886
- text: string | null;
3887
- };
3888
- type NextclawHarnessOptions = {
3889
- homeDir?: string;
3890
- configPath?: string;
3891
- builtInAppsDirectory?: string;
3892
- portableServiceRunnerPath?: string;
3893
- productVersion?: string; /** Static tool catalog for an embedded app; omitted keeps the full NextClaw catalog. */
3894
- allowedToolNames?: readonly string[]; /** Preserve safety, identity and memory while omitting host-specific context. */
3895
- contextProfile?: "default" | "embedded";
3896
- sessionSearchEnabled?: boolean;
3897
- sessionTitleEnabled?: boolean;
3898
- productActivitySink?: {
3899
- record: (signal: {
3900
- kind: "intent_accepted" | "run_succeeded";
3901
- occurredAt: string;
3902
- source: "direct" | "channel";
3903
- }) => Promise<void> | void;
3904
- };
3905
- };
3906
- type NextclawAgentDefinition = {
3907
- id: string;
3908
- displayName?: string;
3909
- description?: string;
3910
- model?: string;
3911
- runtime?: string;
3912
- runtimeConfig?: Record<string, unknown> | null;
3913
- };
3914
- type NextclawSessionCreateInput = {
3915
- sessionId?: string;
3916
- task: string;
3917
- title?: string;
3918
- workspace?: string;
3919
- model?: string;
3920
- };
3921
- type NextclawSessionRunInput = {
3922
- input: string;
3923
- channel?: string;
3924
- model?: string;
3925
- signal?: AbortSignal;
3926
- onEvent?: (event: NcpEndpointEvent$1) => void;
3927
- onAssistantDelta?: (delta: string) => void;
3928
- };
3929
- type NextclawRunStatus = "running" | "completed" | "failed" | "cancelled";
3930
- type NextclawContributionDescriptor = {
3931
- id: string;
3932
- version?: string;
3933
- };
3934
- interface IToolRegistry {
3935
- register(tool: NcpTool$1): Disposer$1;
3936
- }
3937
- type ContextBlock = string;
3938
- type ContextProviderRequest = {
3939
- sessionId?: string;
3940
- peerId?: string;
3941
- message: NcpMessage$1;
3942
- agentRuntimeId?: string;
3943
- agentId?: string;
3944
- projectRoot?: string;
3945
- channel?: string;
3946
- correlationId?: string;
3947
- metadata?: Record<string, unknown>;
3948
- model?: string;
3949
- maxTokens?: number;
3950
- thinkingEffort?: string | null;
3951
- };
3952
- type ContextProvider = {
3953
- provide: (request: ContextProviderRequest) => Promise<readonly ContextBlock[]> | readonly ContextBlock[];
3954
- };
3955
- interface IContextRegistry {
3956
- register(provider: ContextProvider): Disposer$1;
3957
- }
3958
- type ModelChatInput = {
3959
- messages: Array<Record<string, unknown>>;
3960
- tools?: Array<Record<string, unknown>>;
3961
- model?: string | null;
3962
- maxTokens?: number;
3963
- thinkingLevel?: ThinkingLevel | null;
3964
- signal?: AbortSignal;
3965
- };
3966
- interface IModelRegistry {
3967
- registerProvider(plugin: ProviderCatalogPlugin$1): Disposer$1;
3968
- listProviders(): readonly ProviderSpec$1[];
3969
- chat(input: ModelChatInput): Promise<LLMResponse$1>;
3970
- chatStream(input: ModelChatInput): AsyncIterable<LLMStreamEvent$1>;
3971
- }
3972
- type AgentRuntimeSessionTypeCatalog = {
3973
- defaultType: string;
3974
- options: AgentRuntimeSessionTypeOption[];
3975
- };
3976
- interface IRuntimeRegistry {
3977
- registerProvider(provider: AgentRuntimeProviderRegistration): Disposer$1;
3978
- registerEntry(entry: AgentRuntimeEntry): Disposer$1;
3979
- listSessionTypes(params?: AgentRuntimeSessionTypeDescribeParams): Promise<AgentRuntimeSessionTypeCatalog>;
3980
- }
3981
- type McpToolCallInput = {
3982
- serverName: string;
3983
- toolName: string;
3984
- args: Record<string, unknown>;
3985
- signal?: AbortSignal;
3986
- };
3987
- interface IMcpRegistry {
3988
- registerServer(name: string, definition: McpServerDefinition$1): Promise<Disposer$1>;
3989
- listServers(): readonly McpServerRecord$1[];
3990
- listTools(filter?: McpCatalogFilter$1): readonly McpToolCatalogEntry$1[];
3991
- callTool(input: McpToolCallInput): Promise<unknown>;
3992
- }
3993
- interface IKernel {
3994
- readonly eventBus: EventBus$1;
3995
- readonly ingress: Ingress$1;
3996
- readonly tools: IToolRegistry;
3997
- readonly context: IContextRegistry;
3998
- readonly models: IModelRegistry;
3999
- readonly runtimes: IRuntimeRegistry;
4000
- readonly mcp: IMcpRegistry;
4001
- }
4002
- interface INextclawContributionRegistry {
4003
- register(contribution: Contribution): Disposer$1;
4004
- list(): readonly NextclawContributionDescriptor[];
4005
- }
4006
- interface INextclawRun {
4007
- readonly agentId: string;
4008
- readonly runId: string | null;
4009
- readonly sessionId: string;
4010
- readonly status: NextclawRunStatus;
4011
- events(): AsyncIterable<NcpEndpointEvent$1>;
4012
- result(): Promise<NextclawTaskResult>;
4013
- cancel(): Promise<void>;
4014
- }
4015
- interface INextclawSession {
4016
- readonly agentId: string;
4017
- readonly sessionId: string;
4018
- run(input: NextclawSessionRunInput): Promise<INextclawRun>;
4019
- }
4020
- interface INextclawAgentSessions {
4021
- create(input: NextclawSessionCreateInput): Promise<INextclawSession>;
4022
- resume(sessionId: string): Promise<INextclawSession>;
4023
- }
4024
- interface INextclawSessionRegistry {
4025
- resume(sessionId: string): Promise<INextclawSession>;
4026
- delete(sessionId: string): Promise<void>;
4027
- }
4028
- interface INextclawAgent {
4029
- readonly definition: NextclawAgentDefinition;
4030
- readonly id: string;
4031
- readonly sessions: INextclawAgentSessions;
4032
- }
4033
- interface INextclawAgentRegistry {
4034
- create(definition: NextclawAgentDefinition): Promise<INextclawAgent>;
4035
- get(agentId?: string): INextclawAgent;
4036
- list(): readonly NextclawAgentDefinition[];
4037
- }
4038
- interface INextclawHarness {
4039
- readonly agents: INextclawAgentRegistry;
4040
- readonly sessions: INextclawSessionRegistry;
4041
- readonly contributions: INextclawContributionRegistry;
4042
- start(): Promise<void>;
4043
- runTask(input: NextclawTaskInput): Promise<NextclawTaskResult>;
4044
- listSessionMessages(sessionId: string): Promise<NcpMessage$1[]>;
4045
- listUserQuestions(sessionId: string): Promise<NextclawUserQuestion[]>;
4046
- answerUserQuestion(input: {
4047
- sessionId: string;
4048
- questionId: string;
4049
- action: "answer" | "dismiss";
4050
- answer?: string;
4051
- signal?: AbortSignal;
4052
- onEvent?: (event: NcpEndpointEvent$1) => void;
4053
- onAssistantDelta?: (delta: string) => void;
4054
- }): Promise<NextclawUserQuestionReply>;
4055
- dispose(): Promise<void>;
4056
- }
4057
- //#endregion
4058
- //#region src/features/harness/managers/nextclaw-harness.manager.d.ts
4059
- declare class NextclawHarness implements INextclawHarness {
4060
- private readonly options;
4061
- readonly agents: INextclawAgentRegistry;
4062
- readonly sessions: INextclawSessionRegistry;
4063
- readonly contributions: INextclawContributionRegistry;
4064
- private readonly contributionRegistry;
4065
- private readonly ownedRuns;
4066
- private state;
4067
- private kernel;
4068
- private startPromise;
4069
- constructor(options?: NextclawHarnessOptions);
4070
- start: () => Promise<void>;
4071
- runTask: (input: NextclawTaskInput) => Promise<NextclawTaskResult>;
4072
- listSessionMessages: (sessionId: string) => Promise<_$_nextclaw_ncp0.NcpMessage[]>;
4073
- listUserQuestions: (sessionId: string) => Promise<NextclawUserQuestion[]>;
4074
- answerUserQuestion: (input: {
4075
- sessionId: string;
4076
- questionId: string;
4077
- action: "answer" | "dismiss";
4078
- answer?: string;
4079
- signal?: AbortSignal;
4080
- onEvent?: NextclawTaskInput["onEvent"];
4081
- onAssistantDelta?: NextclawTaskInput["onAssistantDelta"];
4082
- }) => Promise<NextclawUserQuestionReply>;
4083
- dispose: () => Promise<void>;
4084
- private readonly requireKernel;
4085
- private startInternal;
4086
- private resolveTaskSession;
4087
- private readonly onRunCreated;
4088
- private readonly onRunSettled;
4089
- private disposeRuns;
4090
- }
4091
- //#endregion
4092
- //#region src/features/harness/utils/nextclaw-task.utils.d.ts
4093
- declare function runNextclawTask(input: NextclawTaskInput, options?: NextclawHarnessOptions): Promise<NextclawTaskResult>;
4094
- //#endregion
4095
- //#region src/services/panel-app-asset-token.service.d.ts
4096
- type PanelAppAssetTokenClaims = {
4097
- panelAppId: string;
4098
- sourceName: string;
4099
- sourcePath: string;
4100
- expiresAt: number;
4101
- nonce: string;
4102
- };
4103
- type PanelAppAssetTokenServiceParams = {
4104
- now?: () => number;
4105
- secret?: Buffer;
4106
- ttlMs?: number;
4107
- };
4108
- declare class PanelAppAssetTokenService {
4109
- private readonly now;
4110
- private readonly secret;
4111
- private readonly ttlMs;
4112
- constructor(params?: PanelAppAssetTokenServiceParams);
4113
- issue: (params: {
4114
- panelAppId: string;
4115
- sourceName: string;
4116
- sourcePath: string;
4117
- }) => string;
4118
- verify: (token: string) => PanelAppAssetTokenClaims;
4119
- private sign;
4120
- private matchesSignature;
4121
- private parseClaims;
4122
- }
4123
- //#endregion
4124
- //#region src/services/mcp-service-app-runtime.service.d.ts
4125
- type RuntimeState = {
4126
- status: ServiceAppRuntimeStatus;
4127
- lastError?: string;
4128
- lastStartedAt?: string;
4129
- lastReadyAt?: string;
4130
- lastFailedAt?: string;
4131
- };
4132
- declare class McpServiceAppRuntimeService {
4133
- private readonly params;
4134
- private readonly lifecycleManager;
4135
- private readonly states;
4136
- constructor(params: {
4137
- getConfig: () => Config;
4138
- });
4139
- getStatus: (appId: string) => RuntimeState;
4140
- listActions: ({
4141
- app,
4142
- manifest
4143
- }: {
4144
- app: ServiceAppRecord;
4145
- manifest: ServiceAppManifest;
4146
- }) => Promise<ServiceAction[]>;
4147
- invokeAction: ({
4148
- app,
4149
- manifest,
4150
- actionName,
4151
- input
4152
- }: {
4153
- app: ServiceAppRecord;
4154
- manifest: ServiceAppManifest;
4155
- actionName: string;
4156
- input: Record<string, unknown>;
4157
- }) => Promise<unknown>;
4158
- stop: (appId: string) => Promise<void>;
4159
- restart: (appId: string) => Promise<void>;
4160
- dispose: () => Promise<void>;
4161
- private toMcpServerRecord;
4162
- private createAppRuntimeEnv;
4163
- private toServiceAction;
4164
- }
4165
- //#endregion
4166
- //#region src/services/command-registry.service.d.ts
4167
- type CommandOptionType = "string" | "boolean" | "number";
4168
- type CommandOption = {
4169
- name: string;
4170
- description: string;
4171
- type: CommandOptionType;
4172
- required?: boolean;
4173
- };
4174
- type CommandExecutionContext = {
4175
- channel: string;
4176
- chatId: string;
4177
- senderId: string;
4178
- sessionKey?: string;
4179
- };
4180
- type CommandResult = {
4181
- content: string;
4182
- ephemeral?: boolean;
4183
- };
4184
- type ParsedTextCommand = {
4185
- name: string;
4186
- args: Record<string, unknown>;
4187
- };
4188
- type SlashCommandSpec = {
4189
- name: string;
4190
- description: string;
4191
- options?: CommandOption[];
4192
- };
4193
- declare class CommandRegistry {
4194
- private readonly config;
4195
- private readonly sessionManager?;
4196
- private readonly specs;
4197
- private readonly lookup;
4198
- constructor(config: Config, sessionManager?: SessionManager | undefined);
4199
- listSlashCommands: () => SlashCommandSpec[];
4200
- execute: (name: string, args: Record<string, unknown> | undefined, ctx: CommandExecutionContext) => Promise<CommandResult>;
4201
- parseTextCommand: (input: string) => ParsedTextCommand | null;
4202
- executeText: (input: string, ctx: CommandExecutionContext) => Promise<CommandResult | null>;
4203
- private registerDefaults;
4204
- private register;
4205
- private buildHelpText;
4206
- private getOrCreateCommandSession;
4207
- private resolveSessionModel;
4208
- private resolveSessionThinking;
4209
- private parseTextArgs;
4210
- private parseTextOptionValue;
4211
- }
4212
- //#endregion
4213
- //#region src/utils/service-app-manifest.utils.d.ts
4214
- declare const SERVICE_APP_MANIFEST_FILE_NAME = "service-app.json";
4215
- declare function getServiceAppManifestPath(dirPath: string): string;
4216
- declare function readServiceAppManifest(dirPath: string, options?: ServiceAppManifestParseOptions): Promise<ServiceAppManifest>;
4217
- type ServiceAppManifestParseOptions = {
4218
- target?: AppNativeArtifactTarget;
4219
- platformTargetService?: AppPlatformTargetService;
4220
- };
4221
- declare function parseServiceAppManifest(raw: string, options?: ServiceAppManifestParseOptions): ServiceAppManifest;
4222
- //#endregion
4223
- //#region src/utils/service-app-runtime-action.utils.d.ts
4224
- declare function listServiceAppManifestActions(record: ServiceAppRecord, manifest: ServiceAppManifest): ServiceAction[];
4225
- declare function mergeServiceAppRuntimeActions({
4226
- record,
4227
- manifest,
4228
- runtimeActions
4229
- }: {
4230
- record: ServiceAppRecord;
4231
- manifest: ServiceAppManifest;
4232
- runtimeActions: ServiceAction[];
4233
- }): ServiceAction[];
4234
- //#endregion
4235
- //#region src/utils/service-action.utils.d.ts
4236
- declare const DEFAULT_SERVICE_ACTION_RISK: ServiceActionRisk;
4237
- declare function buildServiceActionId(appId: string, actionName: string): string;
4238
- declare function getServiceActionName(actionId: string, appId: string): string;
4239
- //#endregion
4240
- //#region src/features/context-compaction/services/context-compaction-journal-recovery.service.d.ts
4241
- declare class ContextCompactionJournalRecoveryService {
4242
- private readonly pendingMessageIds;
4243
- private readonly pendingCheckpoints;
4244
- private readonly recoveredTerminals;
4245
- private readonly terminalMessages;
4246
- seed: (messages: readonly NcpMessage$1[]) => void;
4247
- track: (event: NcpEndpointEvent$1) => void;
4248
- private trackMessageSent;
4249
- private trackTerminalEvent;
4250
- terminalize: (message: NcpMessage$1) => NcpMessage$1;
4251
- private readCheckpoint;
4252
- private readCheckpointByMessageId;
4253
- private readContinuationMessageId;
4254
- private readEventMessageId;
4255
- }
4256
- //#endregion
4257
- //#region src/features/native-runtime/services/provider-manager-ncp-llm-api.service.d.ts
4258
- declare class ProviderManagerNcpLLMApi implements NcpLLMApi {
4259
- private readonly providerManager;
4260
- constructor(providerManager: LlmProviderRuntime);
4261
- readonly generate: (this: ProviderManagerNcpLLMApi, input: NcpLLMApiInput, options?: NcpLLMApiOptions) => AsyncGenerator<OpenAIChatChunk>;
4262
- }
4263
- //#endregion
4264
- //#region src/features/native-runtime/tools/ncp-asset.tools.d.ts
4265
- declare function createAssetTools(params: {
4266
- assetStore: LocalAssetStore;
4267
- contentBasePath?: string;
4268
- }): NcpTool$1[];
4269
- //#endregion
4270
- //#region src/features/native-runtime/utils/nextclaw-ncp-run-context.utils.d.ts
4271
- type NextclawNcpResolvedAgentProfile = {
4272
- agentId: string;
4273
- displayName: string;
4274
- contextTokens: number;
4275
- execTimeoutSeconds: number;
4276
- model: string;
4277
- reservedContextTokens: number;
4278
- restrictToWorkspace: boolean;
4279
- searchConfig: Config["search"];
4280
- workspace: string;
4281
- };
4282
- type NextclawNcpRunContextResolveParams = {
4283
- agentProfile: ResolvedAgentProfile;
4284
- config: Config;
4285
- sessionId: string;
4286
- requestMetadata?: Record<string, unknown>;
4287
- sessionMetadata?: Record<string, unknown>;
4288
- };
4289
- type NextclawNcpResolvedRunContext = {
4290
- channel: string;
4291
- chatId: string;
4292
- config: Config;
4293
- effectiveModel: string;
4294
- effectiveWorkspace: string;
4295
- profile: NextclawNcpResolvedAgentProfile;
4296
- requestMetadata: Record<string, unknown>;
4297
- requestedToolNames: string[];
4298
- runtimeThinking: ReturnType<typeof resolveThinkingLevel>;
4299
- sessionKey: string;
4300
- sessionMetadata: Record<string, unknown>;
4301
- toolRunContext: ToolRunContext;
4302
- };
4303
- declare function buildNextclawNcpRunContext(params: NextclawNcpRunContextResolveParams): NextclawNcpResolvedRunContext;
4304
- //#endregion
4305
- //#region src/features/native-runtime/utils/nextclaw-ncp-session-preferences.utils.d.ts
4306
- declare function normalizeOptionalString(value: unknown): string | undefined;
4307
- declare function readMetadataModel(metadata: Record<string, unknown>): string | null;
4308
- declare function readMetadataThinking(metadata: Record<string, unknown>): ThinkingLevel | "__clear__" | null;
4309
- declare function resolveEffectiveModel(params: {
4310
- sessionMetadata: Record<string, unknown>;
4311
- requestMetadata: Record<string, unknown>;
4312
- fallbackModel: string;
4313
- }): {
4314
- metadata: Record<string, unknown>;
4315
- model: string;
4316
- };
4317
- declare function syncSessionThinkingPreference(params: {
4318
- sessionMetadata: Record<string, unknown>;
4319
- requestMetadata: Record<string, unknown>;
4320
- }): Record<string, unknown>;
4321
- declare function resolveSessionChannelContext(params: {
4322
- sessionMetadata: Record<string, unknown>;
4323
- requestMetadata: Record<string, unknown>;
4324
- }): {
4325
- channel: string;
4326
- chatId: string;
4327
- metadata: Record<string, unknown>;
4328
- };
4329
- //#endregion
4330
- //#region src/utils/ncp-session-message-adapter.utils.d.ts
4331
- declare function toNcpMessages(sessionId: string, messages: SessionMessage[]): NcpMessage$1[];
4332
- declare function resolveLegacyEventType(message: SessionMessage): string;
4333
- //#endregion
4334
- //#region src/utils/ui-content-params-injection.utils.d.ts
4335
- declare function getUiContentParamsBootstrapScript(): string;
4336
- declare function injectUiContentParamsBootstrap(html: string): string;
4337
- //#endregion
4338
- export { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, AccessLoginResult, AccessManager, AccessManagerOptions, AccessPasswordStatus, AccessPrincipal, AccessRole, AccessSessionRecord, AccessSessionState, AgentManager, AgentManagerOptions, AgentRunClient, type AgentRunReply, type AgentRunReplyOptions, AgentRunSession, type AgentRunStreamOptions, type AgentRuntimeEntry, type AgentRuntimeProviderRegistration, AgentRuntimeSessionRequestDispatcherOptions, type AgentRuntimeSessionTypeCatalog, type AgentRuntimeSessionTypeDescribeParams, AgentRuntimeSessionTypeIcon, type AgentRuntimeSessionTypeOption, AgentRuntimeSessionTypeProvider, AgentServiceActionCaller, AppDataDeleteResult, AppDataDiagnostic, AppDataEntry, AppDataError, AppDataErrorCode, AppDataLifecycle, AppDataList, AppDataManager, AppDataSource, type AppDocumentGrantMutationResult, type AppEventEmitOptions, type AppEventEnvelope, type AppEventHandler, type AppEventKey, type AppInstalledPermissionState, AppPackageComponentKind, AppPackageComponentSource, AppPackageComponentSourceList, AppPackageComponentView, AppPackageConflict, AppPackageDependencyBinding, AppPackageDependencyBindingInput, AppPackageDependencyCandidate, AppPackageDependencyCycle, AppPackageDependencyDiagnostic, AppPackageDependencyDiagnosticCode, AppPackageDependencyView, AppPackageError, AppPackageErrorCode, AppPackageHostTarget, AppPackageList, AppPackageManager, AppPackageOperationAction, AppPackageOperationInput, AppPackageOperationList, AppPackageOperationResult, AppPackageOperationStatus, AppPackageOperationView, AppPackageReadiness, AppPackageReadinessRequirement, AppPackageReadinessStatus, AppPackageRuntimeHooks, AppPackageSecretReadiness, AppPackageSecretSlotView, AppPackageSecretStatus, AppPackageUnavailableDiagnostic, AppPackageUninstallRollback, AppPackageView, type AssetApi, AutomationManager, AutomationManagerOptions, BindContextInput, type BuildAgentRunSendPayloadParams, BuildContextTailInput, BuiltinNarpRuntimeProviderService, CONTEXT_COMPACTION_CONTINUATION_TEXT, CONTEXT_COMPACTION_PART_START, CONTEXT_COMPACTION_PROJECTION_KIND, CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, CONTEXT_COMPACTION_SYSTEM_PREAMBLE, CONTEXT_COMPACTION_TIMELINE_KIND, CapabilityGrant, CapabilityGrantDecision, CapabilityGrantFilter, CapabilityGrantLegacyMigrationService, CapabilityGrantListener, CapabilityGrantManager, CapabilityGrantRequest, CapabilityGrantResource, CapabilityGrantRevocationListener, CapabilityGrantStore, CapabilityGrantSubject, CapabilityProviderView, ChannelManager, ChannelReplyRouterDispatchParams, CommandRegistry, CompactionProfileResolver, CompactionSummaryProvider, ConfigManager, ConfigManagerOptions, ConfigManagerRuntimeHooks, ConfigMutationResult, ContextBinding, type ContextBlock, ContextCompactionJournalRecoveryService, ContextCompactionModelProjection, ContextCompactionPreflightBeginResult, ContextCompactionPreflightResult, ContextCompactionPreflightService, ContextCompactionTimelineCheckpoint, ContextCompactionTrigger, type ContextProvider, type ContextProviderRequest, Contribution, CreateAgentRunSessionParams, CreateInboxDeliveryInput, CreateProjectInput, CreateProjectWorkItemInput, CreateProjectWorkStateInput, DEFAULT_AGENT_RUNTIME_ENTRY_ID, DEFAULT_SERVICE_ACTION_RISK, DESKTOP_HOST_ACCESS, DESKTOP_HOST_PROTOCOL_VERSION, DesktopApplicationTarget, DesktopCapabilityError, DesktopCapabilityErrorCode, DesktopHost, DesktopHostAccess, DesktopHostCaller, DesktopHostCapabilityDeclaration, DesktopHostCapabilityManager, DesktopHostEvent, DesktopHostEventListener, DesktopHostManifest, DesktopHostMethod, DesktopHostRequest, DesktopHostResponse, DesktopHostStatus, DesktopNodeReplService, DesktopSessionCaller, DesktopSessionStateService, DesktopSnapshotOptions, DirectPromptDispatchExecution, DirectPromptDispatchParams, DirectPromptDispatchResult, type Disposer, EventAdmissionPolicy, EventBus, type EventBusOptions, EventDelivery, EventSubscription, EventSubscriptionBudget, ExtensionLoadProgress, ExtensionLoadResult, ExtensionManager, type ExtensionRuntimeStatus, FeatureControlsService, GatewayInboundLoopRuntime, GatewayInboundProcessor, type IContextRegistry, type IKernel, type IMcpRegistry, type IModelRegistry, type INextclawAgent, type INextclawAgentRegistry, type INextclawAgentSessions, type INextclawContributionRegistry, type INextclawHarness, type INextclawRun, type INextclawSession, type INextclawSessionRegistry, type IRuntimeRegistry, type IToolRegistry, InboxDeliveryError, InboxDeliveryErrorCode, InboxDeliveryManager, InboxDeliveryManagerOptions, Ingress, type IngressContext, type IngressEnvelope, type IngressHandler, InstallationKind, InstalledSkillDetail, InstalledSkillSummary, InstalledSkillsList, JsonPointer, JsonValue, type Key, type LLMResponse, type LLMStreamEvent, type LearningLoopRuntimeConfig, type LeasedResidentEvent, LegacyVerificationRecord, LlmProviderManager, LlmProviderRuntime, LlmUsageManager, LlmUsageManagerOptions, LlmUsageRecord, LlmUsageSnapshot, LlmUsageStats, LlmUsageStore, LlmUsageStoreOptions, LlmUsageSummary, type LocalizedTextMap, MAX_INBOX_DELIVERY_CONTENT_LENGTH, type McpCatalogFilter, McpManager, type McpServerDefinition, type McpServerRecord, McpServiceAppRuntimeService, type McpToolCallInput, type McpToolCatalogEntry, type ModelChatInput, NARP_HTTP_RUNTIME_KIND, NARP_STDIO_RUNTIME_KIND, NEXTCLAW_TIMELINE_KIND_METADATA_KEY, NcpAgentSessionJournalStore, type NcpEndpointEvent, type NcpMessage, type NcpTool, type NextclawAgentDefinition, type NextclawContributionDescriptor, NextclawHarness, NextclawHarnessError, type NextclawHarnessErrorCode, type NextclawHarnessOptions, NextclawKernel, NextclawKernelOptions, NextclawNcpResolvedAgentProfile, NextclawNcpResolvedRunContext, NextclawNcpRunContextResolveParams, type NextclawRunStatus, type NextclawSessionCreateInput, type NextclawSessionRunInput, type NextclawTaskInput, type NextclawTaskResult, type NextclawUserQuestion, type NextclawUserQuestionReply, ObservationCapabilityDescriptor, ObservationContextTail, ObservationEvent, ObservationEventAdmissionDecision, ObservationExtensionRuntime, ObservationManager, ObservationManagerOptions, ObservationRef, ObservationRelationshipStatus, ObservationState, ObservationTarget, PANEL_APP_AGENT_CAPABILITIES, PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT, PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT_FINGERPRINT, PORTABLE_RUNTIME_ACCEPTANCE_LOCALES, PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS, PORTABLE_RUNTIME_ACCEPTANCE_PRESENTATION, PORTABLE_RUNTIME_ACCEPTANCE_REFERENCE_APP_ID, PROJECT_TEMPLATE_IDS, PROJECT_WORK_ATTENTION_VALUES, PROJECT_WORK_STATE_CATEGORIES, PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS, PanelAppAgentCapability, PanelAppAgentGenerateObjectInput, PanelAppAgentGenerateObjectRequest, PanelAppAgentGenerateObjectResult, PanelAppAgentRunClient, PanelAppAgentSendPayload, PanelAppAgentSendRequest, PanelAppAgentSendResult, PanelAppAssetTokenService, PanelAppBridgeSession, PanelAppCapabilityGrant, PanelAppCapabilityGrantCaller, PanelAppClientGrant, PanelAppContent, PanelAppDeleteResult, PanelAppEntry, PanelAppError, PanelAppErrorCode, PanelAppList, PanelAppManager, type PanelAppPreferencesUpdate, PanelServiceActionCaller, PlannedRestartRecovery, PlannedRestartRecoveryManager, PlannedRestartRecoveryResult, PlannedRestartRecoveryTicket, type PortableRunnerObservation, type PortableRuntimeAcceptanceContractView, PortableRuntimeAcceptanceDefinition, type PortableRuntimeAcceptanceDefinitionView, type PortableRuntimeAcceptanceEvaluationContext, type PortableRuntimeAcceptanceEvidence, type PortableRuntimeAcceptanceEvidenceArtifact, PortableRuntimeAcceptanceEvidenceSource, PortableRuntimeAcceptanceId, type PortableRuntimeAcceptanceIdentity, type PortableRuntimeAcceptanceIdentityResult, PortableRuntimeAcceptanceIdentityService, type PortableRuntimeAcceptanceLocale, PortableRuntimeAcceptanceManager, PortableRuntimeAcceptancePlatform, type PortableRuntimeAcceptancePresentation, type PortableRuntimeAcceptanceResult, type PortableRuntimeAcceptanceResultStatus, type PortableRuntimeAcceptanceStatusEntry, type PortableRuntimeAcceptanceStatusView, type PortableRuntimeAcceptanceSurfaceResult, type PortableRuntimeAcceptanceUnavailableIdentity, PreferenceEntry, PreferenceError, PreferenceErrorCode, PreferenceJsonValue, PreferenceManager, PreferenceManagerOptions, ProductActivityKind, ProductActivitySignal, ProductActivitySink, ProductActivitySource, type ProductFeatureControls, ProjectAgreementMaterial, ProjectError, ProjectErrorCode, ProjectManager, ProjectManagerOptions, ProjectMaterialService, ProjectRecentArtifact, ProjectRecentArtifactPage, ProjectRecord, ProjectSessionBinding, ProjectSkillMaterial, ProjectTemplate, ProjectTemplateId, ProjectWorkActivity, ProjectWorkActivityPage, ProjectWorkActivityType, ProjectWorkActor, ProjectWorkArtifactLink, ProjectWorkAttention, ProjectWorkError, ProjectWorkErrorCode, ProjectWorkItem, ProjectWorkItemDetail, ProjectWorkItemListEntry, ProjectWorkItemPage, ProjectWorkListInput, ProjectWorkManager, ProjectWorkState, ProjectWorkStateCategory, ProjectWorkSummary, type ProviderCatalogPlugin, ProviderManagerNcpLLMApi, ProviderModelCatalogEntry, ProviderModelCatalogManager, ProviderModelCatalogSnapshot, ProviderModelsDiscoverInput, type ProviderSpec, RUNTIME_INSTANCE_DESKTOP_DATA_DIRECTORY_ENV, RUNTIME_INSTANCE_DESKTOP_LOGS_DIRECTORY_ENV, RUNTIME_INSTANCE_DISTRIBUTION_ENV, RUNTIME_INSTANCE_INSTALLATION_KIND_ENV, RUNTIME_INSTANCE_PORTABLE_DATA_ROOT_ENV, type ResidentEventInput, ResolveRuntimeInstanceSnapshotParams, ResolvedAgentProfile, ResolvedDesktopApplicationTarget, RuntimeDistribution, RuntimeInstallationKind, RuntimeInstanceSnapshot, SERVICE_APP_MANIFEST_FILE_NAME, ServiceAction, ServiceActionCaller, ServiceActionGrant, ServiceActionGrantRequest, ServiceActionGrantState, ServiceActionInvocationFacts, ServiceActionInvokeRequest, ServiceActionInvokeResult, ServiceActionRisk, ServiceActionRuntimeState, ServiceAppAgentCapabilitySlot, ServiceAppAiCapabilityService, ServiceAppCapabilityProvision, ServiceAppCapabilityRequirement, ServiceAppDeleteResult, ServiceAppError, type ServiceAppErrorCode, ServiceAppExternalRemediation, ServiceAppJobCaller, ServiceAppJobChunkEvent, ServiceAppJobEvent, type ServiceAppJobEventSink, ServiceAppJobJournalService, ServiceAppJobList, ServiceAppJobProgressEvent, type ServiceAppJobScope, ServiceAppJobStatus, ServiceAppJobTerminalEvent, ServiceAppJobView, ServiceAppJobWatch, ServiceAppLifecycle, ServiceAppList, ServiceAppManager, ServiceAppManifest, ServiceAppManifestAction, ServiceAppModelCapabilitySlot, ServiceAppProtocol, ServiceAppProvides, ServiceAppRecord, ServiceAppRequirements, ServiceAppResidentEventDisposition, ServiceAppResidentEventInboxService, ServiceAppResidentEventList, type ServiceAppResidentEventScope, ServiceAppResidentEventStatus, ServiceAppResidentEventView, ServiceAppResourceRequirement, ServiceAppRuntimeService, ServiceAppRuntimeStatus, ServiceAppTerminalJobStatus, ServiceAppWitContract, SessionContextCompactionError, SessionContextCompactionErrorCode, SessionContextCompactionManager, SessionContextCompactionResult, SessionJournalCompactionResult, SessionManager, SessionManagerOptions, SessionMessageCursorError, SessionMessagePage, SessionMetadataUpdate, SessionModelTokenUsage, type SessionPendingInput, type SessionQueuedInput, SessionRequestManager, SessionRequestManagerOptions, SessionSettingsError, SessionSettingsPatch, type SessionSteerQueuedInputResult, SessionTokenUsageStatus, SessionTokenUsageSummary, SessionTokenUsageTotals, type SkillFrontmatter, type SkillInfo, SkillManager, type SkillScope, SubscribeEventsInput, SystemObjectReferenceError, SystemObjectReferenceErrorCode, SystemObjectReferenceManager, SystemObjectReferenceProvider, SystemObjectReferenceSnapshotSource, type TypedKey, TypedPredicate, USER_QUESTION_EXTENSION_TYPE, UnavailableDesktopHost, UnsignedUpdateManifest, type Unsubscribe, UpdateBlockReason, UpdateHostKind, UpdateManifest, UpdateManifestReader, UpdateProgress, UpdateProjectWorkItemInput, UpdateProjectWorkStateInput, UpdateSnapshot, UpdateStatus, UserQuestionError, UserQuestionManager, UserQuestionPrompt, UserQuestionReplyResolution, UserQuestionResolution, UserQuestionView, VerificationEvidenceRecord, VerificationRecord, VerificationRecordEntrySurface, VerificationRecordError, VerificationRecordInput, VerificationRecordList, VerificationRecordObservation, VerificationRecordRole, VerificationRecordService, VerificationRecordStatus, type WorkspaceServiceDataOwner, assertObservationJsonValue, assertObservationPredicate, assertSessionJournalTailComplete, buildAgentRunSendPayload, buildContextCompactionModelProjection, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildNextclawNcpRunContext, buildObservationEventModelMessage, buildServiceActionId, buildSessionRequestCompletionMessage, capabilityGrantCovers, compactSessionJournal, createAgentRuntimeSessionRequestDispatcher, createAgentRuntimeSessionRequestSourceNotifier, createAssetTools, createCapabilityDeclarationFingerprint, createContextCompactionMessageId, createContextWindowSignature, createCronJobSystemObjectProvider, createDesktopHostError, createInboxDeliverySystemObjectProvider, createLlmUsageRecord, createPanelAppAgentGrantRequest, createPanelAppClientGrantRequest, createServiceActionGrantRequest, createServiceAppAgentSlotGrantRequest, createServiceAppModelSlotGrantRequest, createTypedKey, describeAgentRuntimeSessionTypes, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, dispatchPromptOverNcpResult, evaluateObservationEventAdmission, evaluatePortableRuntimeAcceptance, evaluatePortableRuntimeAcceptanceArtifact, eventKeys, getAutomaticUpdateCheckDelay, getCapabilityGrantKey, getServiceActionName, getServiceAppManifestPath, getUiContentParamsBootstrapScript, getUnsignedUpdateManifest, hasLlmUsageTelemetry, ingressKeys, injectUiContentParamsBootstrap, isAppDataError, isAppPackageError, isContextCompactionProjectionMessage, isContextCompactionTimelineMessage, isContextWindowSnapshot, isInboxDeliveryError, isPanelAppAgentCapability, isPanelAppError, isPreferenceError, isProjectError, isProjectWorkError, isReplyCapableChannel, isServiceAppError, isSessionContextCompactionError, isSessionMessageCursorError, isSessionSettingsError, isSystemObjectReferenceError, listExtensionChannelIds, listServiceAppManifestActions, matchesCapabilityGrantFilter, matchesObservationPredicate, mergeServiceAppRuntimeActions, normalizeAgentRuntimeSessionTypeIcon, normalizeCapabilityGrantRequest, normalizeLlmUsageModel, normalizeOptionalString, normalizePortableRuntimeEnvironment, parseObservationDuration, parsePortableRuntimeAcceptanceEvidenceArtifact, parseServiceAppManifest, parseSkillFrontmatter, presentPortableRuntimeAcceptanceDefinition, readContextCompactionCheckpoint, readContextWindowEventSessionId, readJsonPointer, readLatestContextCompactionCheckpoint, readLearningLoopRuntimeConfig, readMetadataModel, readMetadataThinking, readServiceActionTargetId, readServiceAppManifest, readServiceAppSlotTarget, recoverSessionJournalMaintenance, resolveAgentRuntimeEntries, resolveAutomaticUpdateCheckIntervalMs, resolveChannelReplyRoute, resolveEffectiveModel, resolveLegacyEventType, resolvePortableRuntimeAcceptanceLocale, resolveRuntimeInstanceSnapshot, resolveSessionChannelContext, restoreSessionJournalBackup, runGatewayInboundLoop, runNextclawTask, sanitizeLlmUsage, serializeUnsignedUpdateManifest, shouldRefreshContextWindowDuringStream, shouldRefreshContextWindowImmediately, startPromptOverNcpExecution, stripSkillFrontmatter, syncSessionThinkingPreference, toBoundedJson, toNcpMessages, waitForAgentRuntimeSessionReply };
4339
- //# sourceMappingURL=index.d.ts.map
1
+ import { $ as renderSystemExecutionPolicy, $a as PanelAppAgentRunClient, $c as readContextWindowEventSessionId, $i as isInboxDeliveryError, $l as ProviderModelCatalogEntry, $n as RUNTIME_INSTANCE_DESKTOP_LOGS_DIRECTORY_ENV, $o as AppPackageDependencyDiagnostic, $r as ResidentEventInput, $s as ServiceAppProtocol, $t as PortableRuntimeAcceptanceIdentity, $u as ProjectTemplate, A as ProviderCatalogPlugin, Aa as DesktopCapabilityErrorCode, Ac as NextclawNcpResolvedAgentProfile, Ai as createLlmUsageRecord, Al as UserQuestionError, An as ingressKeys, Ao as CapabilityGrantSubject, Ar as PortableRuntimeAcceptanceResultStatus, As as ServiceActionGrantState, At as ObservationRef, Au as ProjectWorkActivityType, B as LocalizedTextMap, Ba as ResolvedDesktopApplicationTarget, Bc as CONTEXT_COMPACTION_SYSTEM_PREAMBLE, Bi as SystemObjectReferenceErrorCode, Bl as AgentRunClient, Bn as isReplyCapableChannel, Bo as isAppDataError, Br as VerificationRecordList, Bs as ServiceAppJobCaller, Bt as mergeServiceAppRuntimeActions, Bu as ProjectWorkStateCategory, C as NextclawRunStatus, Ca as DesktopHostEventListener, Cc as NativeAgentRuntimeResources, Cd as LlmProviderManager, Ci as LlmUsageStats, Cl as ModelChatInput, Cn as NcpEndpointEvent, Co as CapabilityGrantManager, Cr as isServiceAppError, Cs as isAppPackageError, Ct as EventSubscriptionBudget, Cu as CreateProjectWorkStateInput, D as NextclawTaskResult, Da as DESKTOP_HOST_PROTOCOL_VERSION, Dc as resolveEffectiveModel, Dd as AgentProfilePersistence, Di as LlmUsageSnapshot, Dl as ContextCompactionPreflightService, Dn as Unsubscribe, Do as CapabilityGrantFilter, Dr as PortableRuntimeAcceptanceEvidence, Ds as ServiceActionCaller, Dt as ObservationContextTail, Du as ProjectRecentArtifactPage, E as NextclawTaskInput, Ea as DESKTOP_HOST_ACCESS, Ec as readMetadataThinking, Ed as AgentManager, Ei as LlmUsageRecord, El as ContextCompactionPreflightResult, En as TypedKey, Eo as CapabilityGrantDecision, Er as PortableRuntimeAcceptanceEvaluationContext, Es as ServiceAction, Et as ObservationCapabilityDescriptor, Eu as ProjectRecentArtifact, F as NextclawKernel, Fa as DesktopHostManifest, Fc as ProviderManagerNcpLLMApi, Fi as SessionContextCompactionErrorCode, Fl as UserQuestionPrompt, Fn as dispatchPromptOverNcp, Fo as AppDataError, Fr as VerificationEvidenceRecord, Fs as ServiceActionRuntimeState, Ft as TypedPredicate, Fu as ProjectWorkItemDetail, G as appendCurrentTimeContextTail, Ga as createServiceAppModelSlotGrantRequest, Gc as buildContextCompactionModelProjection, Gi as createInboxDeliverySystemObjectProvider, Gl as ProductActivitySignal, Gn as AssetApi, Go as AppPackageComponentSource, Gr as PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT_FINGERPRINT, Gs as ServiceAppJobStatus, Gt as CommandRegistry, Gu as ProjectErrorCode, H as buildLocalizedTextMap, Ha as createPanelAppClientGrantRequest, Hc as ContextCompactionModelProjection, Hi as SystemObjectReferenceProvider, Hl as AgentRunReplyOptions, Hn as GatewayInboundLoopRuntime, Ho as AppDocumentGrantMutationResult, Hr as VerificationRecordRole, Hs as ServiceAppJobEvent, Ht as getServiceAppManifestPath, Hu as UpdateProjectWorkItemInput, I as NextclawKernelOptions, Ia as DesktopHostMethod, Ic as CONTEXT_COMPACTION_CONTINUATION_TEXT, Ii as SessionContextCompactionManager, Il as UserQuestionView, In as dispatchPromptOverNcpResult, Io as AppDataErrorCode, Ir as VerificationRecord, Is as ServiceAppAgentCapabilitySlot, It as DEFAULT_SERVICE_ACTION_RISK, Iu as ProjectWorkItemListEntry, J as createShowContentTools, Ja as PANEL_APP_AGENT_CAPABILITIES, Jc as createContextWindowSignature, Ji as InboxDeliveryError, Jl as ConfigManager, Jn as BuiltinNarpRuntimeProviderService, Jo as AppPackageConflict, Jr as PortableRuntimeAcceptanceEvidenceSource, Js as ServiceAppJobWatch, Jt as PortableRuntimeAcceptanceDefinitionView, Ju as isProjectError, K as serializeModelInputTail, Ka as readServiceActionTargetId, Kc as buildContextCompactionTimelineNcpMessage, Ki as isSystemObjectReferenceError, Kl as ProductActivitySink, Kn as BuildAgentRunSendPayloadParams, Ko as AppPackageComponentSourceList, Kr as PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS, Ks as ServiceAppJobTerminalEvent, Kt as PORTABLE_RUNTIME_ACCEPTANCE_REFERENCE_APP_ID, Ku as ProjectManager, L as ExtensionLoadProgress, La as DesktopHostRequest, Lc as CONTEXT_COMPACTION_PART_START, Li as SessionContextCompactionResult, Ll as createQuestionMessage, Ln as startPromptOverNcpExecution, Lo as AppDataLifecycle, Lr as VerificationRecordEntrySurface, Ls as ServiceAppCapabilityProvision, Lt as buildServiceActionId, Lu as ProjectWorkItemPage, M as AgentKernelModule, Ma as DesktopHostCaller, Mc as NextclawNcpRunContextResolveParams, Mi as normalizeLlmUsageModel, Ml as UserQuestionReplyResolution, Mn as DirectPromptDispatchExecution, Mo as AppDataDeleteResult, Mr as evaluatePortableRuntimeAcceptanceArtifact, Ms as ServiceActionInvokeRequest, Mt as ObservationState, Mu as ProjectWorkArtifactLink, N as AgentKernelResources, Na as DesktopHostCapabilityDeclaration, Nc as buildNextclawNcpRunContext, Ni as sanitizeLlmUsage, Nl as UserQuestionResolution, Nn as DirectPromptDispatchParams, No as AppDataDiagnostic, Nr as parsePortableRuntimeAcceptanceEvidenceArtifact, Ns as ServiceActionInvokeResult, Nt as ObservationTarget, Nu as ProjectWorkAttention, O as NextclawUserQuestion, Oa as DesktopApplicationTarget, Oc as resolveSessionChannelContext, Od as ResolvedAgentProfile, Oi as LlmUsageSummary, Ol as ContextCompactionTrigger, On as createTypedKey, Oo as CapabilityGrantRequest, Or as PortableRuntimeAcceptanceEvidenceArtifact, Os as ServiceActionGrant, Ot as ObservationEvent, Ou as ProjectWorkActivity, P as AgentPlatform, Pa as DesktopHostEvent, Pc as createAssetTools, Pi as SessionContextCompactionError, Pl as USER_QUESTION_EXTENSION_TYPE, Pn as DirectPromptDispatchResult, Po as AppDataEntry, Pr as LegacyVerificationRecord, Ps as ServiceActionRisk, Pt as SubscribeEventsInput, Pu as ProjectWorkItem, Q as renderAgentSafetyContext, Qa as PanelAppAgentGenerateObjectResult, Qc as readContextCompactionCheckpoint, Qi as MAX_INBOX_DELIVERY_CONTENT_LENGTH, Ql as PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS, Qn as RUNTIME_INSTANCE_DESKTOP_DATA_DIRECTORY_ENV, Qo as AppPackageDependencyCycle, Qr as LeasedResidentEvent, Qs as ServiceAppModelCapabilitySlot, Qt as PortableRuntimeAcceptanceSurfaceResult, Qu as ProjectSessionBinding, R as ExtensionLoadResult, Ra as DesktopHostResponse, Rc as CONTEXT_COMPACTION_PROJECTION_KIND, Ri as isSessionContextCompactionError, Rl as createQuestionResolutionMessage, Rn as ChannelReplyRouterDispatchParams, Ro as AppDataList, Rr as VerificationRecordError, Rs as ServiceAppCapabilityRequirement, Rt as getServiceActionName, Ru as ProjectWorkListInput, S as NextclawHarnessResources, Sa as DesktopHost, Sc as NodePlatformOptions, Sd as SessionEventReplayer, Si as LlmUsageManagerOptions, Sl as McpToolCallInput, Sn as Key, So as CapabilityGrantListener, Sr as ServiceAppErrorCode, Ss as CapabilityProviderView, St as EventSubscription, Su as CreateProjectWorkItemInput, T as NextclawSessionRunInput, Ta as createDesktopHostError, Tc as readMetadataModel, Td as ProviderModelsDiscoverInput, Ti as LlmUsageStoreOptions, Tl as ContextCompactionPreflightBeginResult, Tn as NcpTool, To as CapabilityGrant, Tr as VerificationRecordService, Ts as PanelServiceActionCaller, Tt as JsonValue, Tu as PROJECT_WORK_STATE_CATEGORIES, U as parseSkillFrontmatter, Ua as createServiceActionGrantRequest, Uc as ContextCompactionTimelineCheckpoint, Ui as SystemObjectReferenceSnapshotSource, Ul as AgentRunStreamOptions, Un as GatewayInboundProcessor, Uo as AppInstalledPermissionState, Ur as VerificationRecordStatus, Us as ServiceAppJobList, Ut as parseServiceAppManifest, Uu as UpdateProjectWorkStateInput, V as SkillFrontmatter, Va as createPanelAppAgentGrantRequest, Vc as CONTEXT_COMPACTION_TIMELINE_KIND, Vi as SystemObjectReferenceManager, Vl as AgentRunReply, Vn as resolveChannelReplyRoute, Vo as AppPackageManager, Vr as VerificationRecordObservation, Vs as ServiceAppJobChunkEvent, Vt as SERVICE_APP_MANIFEST_FILE_NAME, Vu as ProjectWorkSummary, W as stripSkillFrontmatter, Wa as createServiceAppAgentSlotGrantRequest, Wc as NEXTCLAW_TIMELINE_KIND_METADATA_KEY, Wi as createCronJobSystemObjectProvider, Wl as ProductActivityKind, Wn as runGatewayInboundLoop, Wo as AppPackageComponentKind, Wr as PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT, Ws as ServiceAppJobProgressEvent, Wt as readServiceAppManifest, Wu as ProjectError, X as renderAgentBootstrapContext, Xa as PanelAppAgentGenerateObjectInput, Xc as isContextCompactionTimelineMessage, Xi as InboxDeliveryManager, Xl as ConfigManagerRuntimeHooks, Xn as NARP_STDIO_RUNTIME_KIND, Xo as AppPackageDependencyBindingInput, Xr as PortableRuntimeAcceptancePlatform, Xs as ServiceAppManifest, Xt as PortableRuntimeAcceptanceStatusEntry, Xu as PROJECT_TEMPLATE_IDS, Y as BootstrapContextInput, Ya as PanelAppAgentCapability, Yc as isContextCompactionProjectionMessage, Yi as InboxDeliveryErrorCode, Yl as ConfigManagerOptions, Yn as NARP_HTTP_RUNTIME_KIND, Yo as AppPackageDependencyBinding, Yr as PortableRuntimeAcceptanceId, Ys as ServiceAppLifecycle, Yt as PortableRuntimeAcceptanceManager, Yu as CreateProjectInput, Z as truncateContextText, Za as PanelAppAgentGenerateObjectRequest, Zc as isContextWindowSnapshot, Zi as InboxDeliveryManagerOptions, Zl as ConfigMutationResult, Zn as DEFAULT_AGENT_RUNTIME_ENTRY_ID, Zo as AppPackageDependencyCandidate, Zr as ServiceAppRuntimeService, Zs as ServiceAppManifestAction, Zt as PortableRuntimeAcceptanceStatusView, Zu as ProjectRecord, _ as NextclawAgentDefinition, _a as DesktopSessionCaller, _c as AccessPrincipal, _d as SessionSteerQueuedInputResult, _i as PreferenceJsonValue, _l as IKernel, _n as EventBusOptions, _o as getCapabilityGrantKey, _r as NcpAgentSessionJournalStore, _s as AppPackageSecretSlotView, _t as BindContextInput, _u as isProjectWorkError, a as INextclawAgentSessions, aa as WorkspaceRead, ac as ServiceAppResidentEventStatus, ad as SessionMetadataUpdate, ai as ServiceAppJobScope, al as buildSessionRequestCompletionMessage, an as PORTABLE_RUNTIME_ACCEPTANCE_PRESENTATION, ao as PanelAppCapabilityGrantCaller, ar as RuntimeInstallationKind, as as AppPackageList, at as ExtensionRuntimeStatus, au as AgentRuntimeProviderRegistration, b as NextclawHarnessErrorCode, ba as DesktopNodeReplService, bc as AccessSessionState, bd as NcpAgentSessionJournalReplayEvent, bi as McpManager, bl as IRuntimeRegistry, bn as IngressEnvelope, bo as CapabilityGrantStore, br as ServiceAppManager, bs as AppPackageUninstallRollback, bt as EventAdmissionPolicy, bu as ProjectSkillMaterial, c as INextclawRun, ca as LocalConfigStore, cc as ServiceAppRuntimeStatus, cd as SessionSettingsError, ci as PlannedRestartRecoveryManager, cl as dispatchAgentRuntimeSessionRequest, cn as presentPortableRuntimeAcceptanceDefinition, co as PanelAppDeleteResult, cr as LearningLoopRuntimeConfig, cs as AppPackageOperationList, ct as assertObservationPredicate, cu as AgentRuntimeSessionTypeOption, d as LLMResponse, da as InstalledSkillsList, dc as AutomationManager, dd as SessionTokenUsageSummary, di as PreferenceError, dl as SessionRequestManagerOptions, dn as PanelAppAssetTokenService, do as PanelAppErrorCode, dr as ProductFeatureControls, ds as AppPackageOperationView, dt as matchesObservationPredicate, du as normalizeAgentRuntimeSessionTypeIcon, ea as createWorkspaceByteTools, ec as ServiceAppProvides, ed as ProjectTemplateId, ei as ServiceAppResidentEventInboxService, el as readLatestContextCompactionCheckpoint, en as PortableRuntimeAcceptanceIdentityResult, eo as PanelAppAgentSendPayload, er as RUNTIME_INSTANCE_DISTRIBUTION_ENV, es as AppPackageDependencyDiagnosticCode, et as getUiContentParamsBootstrapScript, eu as ProviderModelCatalogManager, f as LLMStreamEvent, fa as SkillInfo, fc as AutomationManagerOptions, fd as SessionTokenUsageTotals, fi as PreferenceErrorCode, fl as AgentRuntimeSessionTypeCatalog, fn as AppEventEmitOptions, fo as PanelAppList, fr as SessionJournalCompactionResult, fs as AppPackageReadiness, ft as parseObservationDuration, fu as resolveAgentRuntimeEntries, g as McpToolCatalogEntry, ga as NextclawApplicationOptions, gc as AccessPasswordStatus, gd as SessionQueuedInput, gi as PreferenceEntry, gl as IContextRegistry, gn as EventBus, go as createCapabilityDeclarationFingerprint, gr as restoreSessionJournalBackup, gs as AppPackageSecretReadiness, gt as ObservationManagerOptions, gu as ProjectWorkErrorCode, h as McpServerRecord, ha as LocalProduct, hc as AccessLoginResult, hd as SessionPendingInput, hi as isPreferenceError, hl as ContextProviderRequest, hn as AppEventKey, ho as capabilityGrantCovers, hr as recoverSessionJournalMaintenance, hs as AppPackageRuntimeHooks, ht as ObservationManager, hu as ProjectWorkError, i as INextclawAgentRegistry, ia as WorkspaceList, ic as ServiceAppResidentEventList, id as SessionMessagePage, ii as ServiceAppJobJournalService, il as AgentRuntimeSessionRequestDispatcherOptions, in as PORTABLE_RUNTIME_ACCEPTANCE_LOCALES, io as PanelAppCapabilityGrant, ir as RuntimeDistribution, is as AppPackageHostTarget, it as listExtensionChannelIds, iu as AgentRuntimeEntry, j as ProviderSpec, ja as DesktopHostAccess, jc as NextclawNcpResolvedRunContext, ji as hasLlmUsageTelemetry, jl as UserQuestionManager, jn as Contribution, jo as AppDataManager, jr as evaluatePortableRuntimeAcceptance, js as ServiceActionInvocationFacts, jt as ObservationRelationshipStatus, ju as ProjectWorkActor, k as NextclawUserQuestionReply, ka as DesktopCapabilityError, kc as syncSessionThinkingPreference, ki as buildLlmUsageSummary, kl as CompactionSummaryProvider, kn as eventKeys, ko as CapabilityGrantResource, kr as PortableRuntimeAcceptanceResult, ks as ServiceActionGrantRequest, kt as ObservationExtensionRuntime, ku as ProjectWorkActivityPage, l as INextclawSession, la as InstalledSkillDetail, lc as ServiceAppTerminalJobStatus, ld as SessionSettingsPatch, li as PlannedRestartRecoveryResult, ll as waitForAgentRuntimeSessionReply, ln as resolvePortableRuntimeAcceptanceLocale, lo as PanelAppEntry, lr as readLearningLoopRuntimeConfig, ls as AppPackageOperationResult, lt as buildObservationEventModelMessage, lu as AgentRuntimeSessionTypeProvider, m as McpServerDefinition, ma as SkillScope, mc as AccessManagerOptions, md as isSessionSettingsError, mi as PreferenceManagerOptions, ml as ContextProvider, mn as AppEventHandler, mo as isPanelAppError, mr as compactSessionJournal, ms as AppPackageReadinessStatus, mt as toBoundedJson, mu as SessionManagerOptions, n as Disposer, na as WorkspaceByteStore, nc as ServiceAppRequirements, nd as CreateAgentRunSessionParams, ni as ServiceAppAiCapabilityService, nl as shouldRefreshContextWindowImmediately, nn as PortableRuntimeAcceptanceUnavailableIdentity, no as PanelAppAgentSendResult, nr as RUNTIME_INSTANCE_PORTABLE_DATA_ROOT_ENV, ns as AppPackageError, nt as resolveLegacyEventType, nu as ChannelManager, o as INextclawContributionRegistry, oa as WorkspaceWrite, oc as ServiceAppResidentEventView, od as SessionModelTokenUsage, oi as PortableRunnerObservation, ol as createAgentRuntimeSessionRequestDispatcher, on as PortableRuntimeAcceptanceLocale, oo as PanelAppClientGrant, or as RuntimeInstanceSnapshot, os as AppPackageOperationAction, ot as ObservationEventAdmissionDecision, ou as AgentRuntimeSessionTypeDescribeParams, p as McpCatalogFilter, pa as SkillManager, pc as AccessManager, pd as isSessionMessageCursorError, pi as PreferenceManager, pl as ContextBlock, pn as AppEventEnvelope, po as isPanelAppAgentCapability, pr as assertSessionJournalTailComplete, ps as AppPackageReadinessRequirement, pt as readJsonPointer, pu as SessionManager, q as composeAgentToolCatalog, qa as readServiceAppSlotTarget, qc as createContextCompactionMessageId, qi as CreateInboxDeliveryInput, ql as ProductActivitySource, qn as buildAgentRunSendPayload, qo as AppPackageComponentView, qr as PortableRuntimeAcceptanceDefinition, qs as ServiceAppJobView, qt as PortableRuntimeAcceptanceContractView, qu as ProjectManagerOptions, r as INextclawAgent, ra as WorkspaceEntry, rc as ServiceAppResidentEventDisposition, rd as SessionMessageCursorError, ri as ServiceAppJobEventSink, rl as ContextCompactionJournalRecoveryService, rn as normalizePortableRuntimeEnvironment, ro as PanelAppBridgeSession, rr as ResolveRuntimeInstanceSnapshotParams, rs as AppPackageErrorCode, rt as toNcpMessages, ru as ConfigPersistence, s as INextclawHarness, sa as LocalAgentProfileStore, sc as ServiceAppResourceRequirement, sd as SessionPersistence, si as PlannedRestartRecovery, sl as createAgentRuntimeSessionRequestSourceNotifier, sn as PortableRuntimeAcceptancePresentation, so as PanelAppContent, sr as resolveRuntimeInstanceSnapshot, ss as AppPackageOperationInput, st as assertObservationJsonValue, su as AgentRuntimeSessionTypeIcon, t as NextclawHarness, ta as LocalWorkspaceStore, tc as ServiceAppRecord, td as AgentRunSession, ti as ServiceAppResidentEventScope, tl as shouldRefreshContextWindowDuringStream, tn as PortableRuntimeAcceptanceIdentityService, to as PanelAppAgentSendRequest, tr as RUNTIME_INSTANCE_INSTALLATION_KIND_ENV, ts as AppPackageDependencyView, tt as injectUiContentParamsBootstrap, tu as ProviderModelCatalogSnapshot, u as INextclawSessionRegistry, ua as InstalledSkillSummary, uc as ServiceAppWitContract, ud as SessionTokenUsageStatus, ui as PlannedRestartRecoveryTicket, ul as SessionRequestManager, un as McpServiceAppRuntimeService, uo as PanelAppError, ur as FeatureControlsService, us as AppPackageOperationStatus, ut as evaluateObservationEventAdmission, uu as describeAgentRuntimeSessionTypes, v as NextclawContributionDescriptor, va as DesktopSessionStateService, vc as AccessRole, vd as UnfinishedNcpAgentRun, vi as PanelAppManager, vl as IMcpRegistry, vn as Ingress, vo as matchesCapabilityGrantFilter, vr as ServiceAppDeleteResult, vs as AppPackageSecretStatus, vt as BuildContextTailInput, vu as ProjectMaterialService, w as NextclawSessionCreateInput, wa as UnavailableDesktopHost, wc as normalizeOptionalString, wd as LlmProviderRuntime, wi as LlmUsageStore, wl as CompactionProfileResolver, wn as NcpMessage, wo as CapabilityGrantRevocationListener, wr as WorkspaceServiceDataOwner, ws as AgentServiceActionCaller, wt as JsonPointer, wu as PROJECT_WORK_ATTENTION_VALUES, x as NextclawHarnessOptions, xa as DesktopHostCapabilityManager, xc as NodePlatform, xd as createNcpAgentSessionSummary, xi as LlmUsageManager, xl as IToolRegistry, xn as IngressHandler, xo as CapabilityGrantLegacyMigrationService, xr as ServiceAppError, xs as AppPackageView, xt as EventDelivery, xu as ProjectWorkManager, y as NextclawHarnessError, ya as DesktopSnapshotOptions, yc as AccessSessionRecord, yd as applyNcpAgentRunLifecycleEvent, yi as PanelAppPreferencesUpdate, yl as IModelRegistry, yn as IngressContext, yo as normalizeCapabilityGrantRequest, yr as ServiceAppList, ys as AppPackageUnavailableDiagnostic, yt as ContextBinding, yu as ProjectAgreementMaterial, z as ExtensionManager, za as DesktopHostStatus, zc as CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, zi as SystemObjectReferenceError, zl as projectUserQuestions, zn as dispatchChannelReplyRoute, zo as AppDataSource, zr as VerificationRecordInput, zs as ServiceAppExternalRemediation, zt as listServiceAppManifestActions, zu as ProjectWorkState } from "./nextclaw-harness.manager-Df5Zagn_.js";
2
+ import { n as getAutomaticUpdateCheckDelay, r as resolveAutomaticUpdateCheckIntervalMs, t as AUTOMATIC_UPDATE_CHECK_INTERVAL_MS } from "./automatic-update-check.utils-C6lQfErN.js";
3
+ 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-C_60CVvw.js";
4
+ export { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, AccessLoginResult, AccessManager, AccessManagerOptions, AccessPasswordStatus, AccessPrincipal, AccessRole, AccessSessionRecord, AccessSessionState, AgentKernelModule, AgentKernelResources, AgentManager, AgentPlatform, AgentProfilePersistence, AgentRunClient, AgentRunReply, AgentRunReplyOptions, AgentRunSession, AgentRunStreamOptions, AgentRuntimeEntry, AgentRuntimeProviderRegistration, AgentRuntimeSessionRequestDispatcherOptions, AgentRuntimeSessionTypeCatalog, AgentRuntimeSessionTypeDescribeParams, AgentRuntimeSessionTypeIcon, AgentRuntimeSessionTypeOption, AgentRuntimeSessionTypeProvider, AgentServiceActionCaller, AppDataDeleteResult, AppDataDiagnostic, AppDataEntry, AppDataError, AppDataErrorCode, AppDataLifecycle, AppDataList, AppDataManager, AppDataSource, AppDocumentGrantMutationResult, AppEventEmitOptions, AppEventEnvelope, AppEventHandler, AppEventKey, AppInstalledPermissionState, AppPackageComponentKind, AppPackageComponentSource, AppPackageComponentSourceList, AppPackageComponentView, AppPackageConflict, AppPackageDependencyBinding, AppPackageDependencyBindingInput, AppPackageDependencyCandidate, AppPackageDependencyCycle, AppPackageDependencyDiagnostic, AppPackageDependencyDiagnosticCode, AppPackageDependencyView, AppPackageError, AppPackageErrorCode, AppPackageHostTarget, AppPackageList, AppPackageManager, AppPackageOperationAction, AppPackageOperationInput, AppPackageOperationList, AppPackageOperationResult, AppPackageOperationStatus, AppPackageOperationView, AppPackageReadiness, AppPackageReadinessRequirement, AppPackageReadinessStatus, AppPackageRuntimeHooks, AppPackageSecretReadiness, AppPackageSecretSlotView, AppPackageSecretStatus, AppPackageUnavailableDiagnostic, AppPackageUninstallRollback, AppPackageView, AssetApi, AutomationManager, AutomationManagerOptions, BindContextInput, BootstrapContextInput, BuildAgentRunSendPayloadParams, BuildContextTailInput, BuiltinNarpRuntimeProviderService, CONTEXT_COMPACTION_CONTINUATION_TEXT, CONTEXT_COMPACTION_PART_START, CONTEXT_COMPACTION_PROJECTION_KIND, CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, CONTEXT_COMPACTION_SYSTEM_PREAMBLE, CONTEXT_COMPACTION_TIMELINE_KIND, CapabilityGrant, CapabilityGrantDecision, CapabilityGrantFilter, CapabilityGrantLegacyMigrationService, CapabilityGrantListener, CapabilityGrantManager, CapabilityGrantRequest, CapabilityGrantResource, CapabilityGrantRevocationListener, CapabilityGrantStore, CapabilityGrantSubject, CapabilityProviderView, ChannelManager, ChannelReplyRouterDispatchParams, CommandRegistry, CompactionProfileResolver, CompactionSummaryProvider, ConfigManager, ConfigManagerOptions, ConfigManagerRuntimeHooks, ConfigMutationResult, ConfigPersistence, ContextBinding, ContextBlock, ContextCompactionJournalRecoveryService, ContextCompactionModelProjection, ContextCompactionPreflightBeginResult, ContextCompactionPreflightResult, ContextCompactionPreflightService, ContextCompactionTimelineCheckpoint, ContextCompactionTrigger, ContextProvider, ContextProviderRequest, Contribution, CreateAgentRunSessionParams, CreateInboxDeliveryInput, CreateProjectInput, CreateProjectWorkItemInput, CreateProjectWorkStateInput, DEFAULT_AGENT_RUNTIME_ENTRY_ID, DEFAULT_SERVICE_ACTION_RISK, DESKTOP_HOST_ACCESS, DESKTOP_HOST_PROTOCOL_VERSION, DesktopApplicationTarget, DesktopCapabilityError, DesktopCapabilityErrorCode, DesktopHost, DesktopHostAccess, DesktopHostCaller, DesktopHostCapabilityDeclaration, DesktopHostCapabilityManager, DesktopHostEvent, DesktopHostEventListener, DesktopHostManifest, DesktopHostMethod, DesktopHostRequest, DesktopHostResponse, DesktopHostStatus, DesktopNodeReplService, DesktopSessionCaller, DesktopSessionStateService, DesktopSnapshotOptions, DirectPromptDispatchExecution, DirectPromptDispatchParams, DirectPromptDispatchResult, Disposer, EventAdmissionPolicy, EventBus, EventBusOptions, EventDelivery, EventSubscription, EventSubscriptionBudget, ExtensionLoadProgress, ExtensionLoadResult, ExtensionManager, ExtensionRuntimeStatus, FeatureControlsService, GatewayInboundLoopRuntime, GatewayInboundProcessor, IContextRegistry, IKernel, IMcpRegistry, IModelRegistry, INextclawAgent, INextclawAgentRegistry, INextclawAgentSessions, INextclawContributionRegistry, INextclawHarness, INextclawRun, INextclawSession, INextclawSessionRegistry, IRuntimeRegistry, IToolRegistry, InboxDeliveryError, InboxDeliveryErrorCode, InboxDeliveryManager, InboxDeliveryManagerOptions, Ingress, IngressContext, IngressEnvelope, IngressHandler, InstallationKind, InstalledSkillDetail, InstalledSkillSummary, InstalledSkillsList, JsonPointer, JsonValue, Key, LLMResponse, LLMStreamEvent, LearningLoopRuntimeConfig, LeasedResidentEvent, LegacyVerificationRecord, LlmProviderManager, LlmProviderRuntime, LlmUsageManager, LlmUsageManagerOptions, LlmUsageRecord, LlmUsageSnapshot, LlmUsageStats, LlmUsageStore, LlmUsageStoreOptions, LlmUsageSummary, LocalAgentProfileStore, LocalConfigStore, LocalProduct, LocalWorkspaceStore, LocalizedTextMap, MAX_INBOX_DELIVERY_CONTENT_LENGTH, McpCatalogFilter, McpManager, McpServerDefinition, McpServerRecord, McpServiceAppRuntimeService, McpToolCallInput, McpToolCatalogEntry, ModelChatInput, NARP_HTTP_RUNTIME_KIND, NARP_STDIO_RUNTIME_KIND, NEXTCLAW_TIMELINE_KIND_METADATA_KEY, NativeAgentRuntimeResources, NcpAgentSessionJournalReplayEvent, NcpAgentSessionJournalStore, NcpEndpointEvent, NcpMessage, NcpTool, NextclawAgentDefinition, NextclawApplicationOptions, NextclawContributionDescriptor, NextclawHarness, NextclawHarnessError, NextclawHarnessErrorCode, NextclawHarnessOptions, NextclawHarnessResources, NextclawKernel, NextclawKernelOptions, NextclawNcpResolvedAgentProfile, NextclawNcpResolvedRunContext, NextclawNcpRunContextResolveParams, NextclawRunStatus, NextclawSessionCreateInput, NextclawSessionRunInput, NextclawTaskInput, NextclawTaskResult, NextclawUserQuestion, NextclawUserQuestionReply, NodePlatform, NodePlatformOptions, ObservationCapabilityDescriptor, ObservationContextTail, ObservationEvent, ObservationEventAdmissionDecision, ObservationExtensionRuntime, ObservationManager, ObservationManagerOptions, ObservationRef, ObservationRelationshipStatus, ObservationState, ObservationTarget, PANEL_APP_AGENT_CAPABILITIES, PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT, PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT_FINGERPRINT, PORTABLE_RUNTIME_ACCEPTANCE_LOCALES, PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS, PORTABLE_RUNTIME_ACCEPTANCE_PRESENTATION, PORTABLE_RUNTIME_ACCEPTANCE_REFERENCE_APP_ID, PROJECT_TEMPLATE_IDS, PROJECT_WORK_ATTENTION_VALUES, PROJECT_WORK_STATE_CATEGORIES, PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS, PanelAppAgentCapability, PanelAppAgentGenerateObjectInput, PanelAppAgentGenerateObjectRequest, PanelAppAgentGenerateObjectResult, PanelAppAgentRunClient, PanelAppAgentSendPayload, PanelAppAgentSendRequest, PanelAppAgentSendResult, PanelAppAssetTokenService, PanelAppBridgeSession, PanelAppCapabilityGrant, PanelAppCapabilityGrantCaller, PanelAppClientGrant, PanelAppContent, PanelAppDeleteResult, PanelAppEntry, PanelAppError, PanelAppErrorCode, PanelAppList, PanelAppManager, PanelAppPreferencesUpdate, PanelServiceActionCaller, PlannedRestartRecovery, PlannedRestartRecoveryManager, PlannedRestartRecoveryResult, PlannedRestartRecoveryTicket, PortableRunnerObservation, PortableRuntimeAcceptanceContractView, PortableRuntimeAcceptanceDefinition, PortableRuntimeAcceptanceDefinitionView, PortableRuntimeAcceptanceEvaluationContext, PortableRuntimeAcceptanceEvidence, PortableRuntimeAcceptanceEvidenceArtifact, PortableRuntimeAcceptanceEvidenceSource, PortableRuntimeAcceptanceId, PortableRuntimeAcceptanceIdentity, PortableRuntimeAcceptanceIdentityResult, PortableRuntimeAcceptanceIdentityService, PortableRuntimeAcceptanceLocale, PortableRuntimeAcceptanceManager, PortableRuntimeAcceptancePlatform, PortableRuntimeAcceptancePresentation, PortableRuntimeAcceptanceResult, PortableRuntimeAcceptanceResultStatus, PortableRuntimeAcceptanceStatusEntry, PortableRuntimeAcceptanceStatusView, PortableRuntimeAcceptanceSurfaceResult, PortableRuntimeAcceptanceUnavailableIdentity, PreferenceEntry, PreferenceError, PreferenceErrorCode, PreferenceJsonValue, PreferenceManager, PreferenceManagerOptions, ProductActivityKind, ProductActivitySignal, ProductActivitySink, ProductActivitySource, ProductFeatureControls, ProjectAgreementMaterial, ProjectError, ProjectErrorCode, ProjectManager, ProjectManagerOptions, ProjectMaterialService, ProjectRecentArtifact, ProjectRecentArtifactPage, ProjectRecord, ProjectSessionBinding, ProjectSkillMaterial, ProjectTemplate, ProjectTemplateId, ProjectWorkActivity, ProjectWorkActivityPage, ProjectWorkActivityType, ProjectWorkActor, ProjectWorkArtifactLink, ProjectWorkAttention, ProjectWorkError, ProjectWorkErrorCode, ProjectWorkItem, ProjectWorkItemDetail, ProjectWorkItemListEntry, ProjectWorkItemPage, ProjectWorkListInput, ProjectWorkManager, ProjectWorkState, ProjectWorkStateCategory, ProjectWorkSummary, ProviderCatalogPlugin, ProviderManagerNcpLLMApi, ProviderModelCatalogEntry, ProviderModelCatalogManager, ProviderModelCatalogSnapshot, ProviderModelsDiscoverInput, ProviderSpec, RUNTIME_INSTANCE_DESKTOP_DATA_DIRECTORY_ENV, RUNTIME_INSTANCE_DESKTOP_LOGS_DIRECTORY_ENV, RUNTIME_INSTANCE_DISTRIBUTION_ENV, RUNTIME_INSTANCE_INSTALLATION_KIND_ENV, RUNTIME_INSTANCE_PORTABLE_DATA_ROOT_ENV, ResidentEventInput, ResolveRuntimeInstanceSnapshotParams, ResolvedAgentProfile, ResolvedDesktopApplicationTarget, RuntimeDistribution, RuntimeInstallationKind, RuntimeInstanceSnapshot, SERVICE_APP_MANIFEST_FILE_NAME, ServiceAction, ServiceActionCaller, ServiceActionGrant, ServiceActionGrantRequest, ServiceActionGrantState, ServiceActionInvocationFacts, ServiceActionInvokeRequest, ServiceActionInvokeResult, ServiceActionRisk, ServiceActionRuntimeState, ServiceAppAgentCapabilitySlot, ServiceAppAiCapabilityService, ServiceAppCapabilityProvision, ServiceAppCapabilityRequirement, ServiceAppDeleteResult, ServiceAppError, ServiceAppErrorCode, ServiceAppExternalRemediation, ServiceAppJobCaller, ServiceAppJobChunkEvent, ServiceAppJobEvent, ServiceAppJobEventSink, ServiceAppJobJournalService, ServiceAppJobList, ServiceAppJobProgressEvent, ServiceAppJobScope, ServiceAppJobStatus, ServiceAppJobTerminalEvent, ServiceAppJobView, ServiceAppJobWatch, ServiceAppLifecycle, ServiceAppList, ServiceAppManager, ServiceAppManifest, ServiceAppManifestAction, ServiceAppModelCapabilitySlot, ServiceAppProtocol, ServiceAppProvides, ServiceAppRecord, ServiceAppRequirements, ServiceAppResidentEventDisposition, ServiceAppResidentEventInboxService, ServiceAppResidentEventList, ServiceAppResidentEventScope, ServiceAppResidentEventStatus, ServiceAppResidentEventView, ServiceAppResourceRequirement, ServiceAppRuntimeService, ServiceAppRuntimeStatus, ServiceAppTerminalJobStatus, ServiceAppWitContract, SessionContextCompactionError, SessionContextCompactionErrorCode, SessionContextCompactionManager, SessionContextCompactionResult, SessionEventReplayer, SessionJournalCompactionResult, SessionManager, SessionManagerOptions, SessionMessageCursorError, SessionMessagePage, SessionMetadataUpdate, SessionModelTokenUsage, SessionPendingInput, SessionPersistence, SessionQueuedInput, SessionRequestManager, SessionRequestManagerOptions, SessionSettingsError, SessionSettingsPatch, SessionSteerQueuedInputResult, SessionTokenUsageStatus, SessionTokenUsageSummary, SessionTokenUsageTotals, SkillFrontmatter, SkillInfo, SkillManager, SkillScope, SubscribeEventsInput, SystemObjectReferenceError, SystemObjectReferenceErrorCode, SystemObjectReferenceManager, SystemObjectReferenceProvider, SystemObjectReferenceSnapshotSource, TypedKey, TypedPredicate, USER_QUESTION_EXTENSION_TYPE, UnavailableDesktopHost, UnfinishedNcpAgentRun, UnsignedUpdateManifest, Unsubscribe, UpdateBlockReason, UpdateHostKind, UpdateManifest, UpdateManifestReader, UpdateProgress, UpdateProjectWorkItemInput, UpdateProjectWorkStateInput, UpdateSnapshot, UpdateStatus, UserQuestionError, UserQuestionManager, UserQuestionPrompt, UserQuestionReplyResolution, UserQuestionResolution, UserQuestionView, VerificationEvidenceRecord, VerificationRecord, VerificationRecordEntrySurface, VerificationRecordError, VerificationRecordInput, VerificationRecordList, VerificationRecordObservation, VerificationRecordRole, VerificationRecordService, VerificationRecordStatus, WorkspaceByteStore, WorkspaceEntry, WorkspaceList, WorkspaceRead, WorkspaceServiceDataOwner, WorkspaceWrite, appendCurrentTimeContextTail, applyNcpAgentRunLifecycleEvent, assertObservationJsonValue, assertObservationPredicate, assertSessionJournalTailComplete, buildAgentRunSendPayload, buildContextCompactionModelProjection, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildNextclawNcpRunContext, buildObservationEventModelMessage, buildServiceActionId, buildSessionRequestCompletionMessage, capabilityGrantCovers, compactSessionJournal, composeAgentToolCatalog, createAgentRuntimeSessionRequestDispatcher, createAgentRuntimeSessionRequestSourceNotifier, createAssetTools, createCapabilityDeclarationFingerprint, createContextCompactionMessageId, createContextWindowSignature, createCronJobSystemObjectProvider, createDesktopHostError, createInboxDeliverySystemObjectProvider, createLlmUsageRecord, createNcpAgentSessionSummary, createPanelAppAgentGrantRequest, createPanelAppClientGrantRequest, createQuestionMessage, createQuestionResolutionMessage, createServiceActionGrantRequest, createServiceAppAgentSlotGrantRequest, createServiceAppModelSlotGrantRequest, createShowContentTools, createTypedKey, createWorkspaceByteTools, describeAgentRuntimeSessionTypes, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, dispatchPromptOverNcpResult, evaluateObservationEventAdmission, evaluatePortableRuntimeAcceptance, evaluatePortableRuntimeAcceptanceArtifact, eventKeys, getAutomaticUpdateCheckDelay, getCapabilityGrantKey, getServiceActionName, getServiceAppManifestPath, getUiContentParamsBootstrapScript, getUnsignedUpdateManifest, hasLlmUsageTelemetry, ingressKeys, injectUiContentParamsBootstrap, isAppDataError, isAppPackageError, isContextCompactionProjectionMessage, isContextCompactionTimelineMessage, isContextWindowSnapshot, isInboxDeliveryError, isPanelAppAgentCapability, isPanelAppError, isPreferenceError, isProjectError, isProjectWorkError, isReplyCapableChannel, isServiceAppError, isSessionContextCompactionError, isSessionMessageCursorError, isSessionSettingsError, isSystemObjectReferenceError, listExtensionChannelIds, listServiceAppManifestActions, matchesCapabilityGrantFilter, matchesObservationPredicate, mergeServiceAppRuntimeActions, normalizeAgentRuntimeSessionTypeIcon, normalizeCapabilityGrantRequest, normalizeLlmUsageModel, normalizeOptionalString, normalizePortableRuntimeEnvironment, parseObservationDuration, parsePortableRuntimeAcceptanceEvidenceArtifact, parseServiceAppManifest, parseSkillFrontmatter, presentPortableRuntimeAcceptanceDefinition, projectUserQuestions, readContextCompactionCheckpoint, readContextWindowEventSessionId, readJsonPointer, readLatestContextCompactionCheckpoint, readLearningLoopRuntimeConfig, readMetadataModel, readMetadataThinking, readServiceActionTargetId, readServiceAppManifest, readServiceAppSlotTarget, recoverSessionJournalMaintenance, renderAgentBootstrapContext, renderAgentSafetyContext, renderSystemExecutionPolicy, resolveAgentRuntimeEntries, resolveAutomaticUpdateCheckIntervalMs, resolveChannelReplyRoute, resolveEffectiveModel, resolveLegacyEventType, resolvePortableRuntimeAcceptanceLocale, resolveRuntimeInstanceSnapshot, resolveSessionChannelContext, restoreSessionJournalBackup, runGatewayInboundLoop, sanitizeLlmUsage, serializeModelInputTail, serializeUnsignedUpdateManifest, shouldRefreshContextWindowDuringStream, shouldRefreshContextWindowImmediately, startPromptOverNcpExecution, stripSkillFrontmatter, syncSessionThinkingPreference, toBoundedJson, toNcpMessages, truncateContextText, waitForAgentRuntimeSessionReply };