@nextclaw/kernel 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  import { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, getAutomaticUpdateCheckDelay, resolveAutomaticUpdateCheckIntervalMs } from "./utils/automatic-update-check.utils.js";
2
2
  import { a as getUnsignedUpdateManifest, c as UpdateBlockReason, d as UpdateStatus, i as UpdateManifestReader, l as UpdateProgress, n as UpdateHostKind, o as serializeUnsignedUpdateManifest, r as UpdateManifest, s as InstallationKind, t as UnsignedUpdateManifest, u as UpdateSnapshot } from "./update-manifest.types-CQpbURTE.js";
3
+ import * as _$_nextclaw_core0 from "@nextclaw/core";
3
4
  import { BaseChannel, Config, ContextCompactionCheckpoint, ContextCompactionPhase, ContextCompactionPlan, ContextWindowSnapshot, CreateAgentProfileInput, CreateSessionContextInheritanceInput, CreateSessionInput, CreatedSession, CronService, DiagnosticRuntime, EffectiveAgentProfile, ExtensionChannelBinding, ExtensionDiagnostic, ExtensionRegistry, ExtensionUiMetadata, GatewayController, InboundAttachment, InboundMessage, LLMProvider, LLMResponse, LLMResponse as LLMResponse$1, LLMStreamEvent, LLMStreamEvent as LLMStreamEvent$1, LocalExecutionClaimService, McpServerDefinition, McpServerDefinition as McpServerDefinition$1, MessageBus, ModelThinkingCapability, OutboundMessage, ProviderCatalogPlugin, ProviderCatalogPlugin as ProviderCatalogPlugin$1, ProviderModelDiscoveryResult, ProviderSpec, ProviderSpec as ProviderSpec$1, RequestSessionParams, RequestedSkillsMetadataReader, SearchConfig, SessionMessage, SessionRequestDispatcher, SessionRequestRecord, SessionRequestSourceNotifier, SessionRequestToolResult, SessionSearchService, SkillInfo, SkillInfo as SkillInfo$1, SkillScope, SpawnSessionAndRequestParams, ThinkingLevel, UpdateAgentProfileInput, buildCompressingCompactionCheckpoint, resolveThinkingLevel } from "@nextclaw/core";
4
5
  import { ListMessagesOptions, ListSessionsOptions, NcpAgentConversationStateManager, NcpAgentRuntime, NcpContextTail, NcpEndpointEvent, NcpEndpointEvent as NcpEndpointEvent$1, NcpEventType, NcpInputDelivery, NcpJsonValue, NcpLLMApi, NcpLLMApiInput, NcpLLMApiOptions, NcpMessage, NcpMessage as NcpMessage$1, NcpMessagePart, NcpResolvedInputDelivery, NcpRunHandle, NcpRunTriggerInput, NcpSessionApi, NcpSessionMessagePageInfo, NcpSessionPatch, NcpSessionSummary, NcpTool, NcpTool as NcpTool$1, OpenAIChatChunk, OpenAIChatMessage } from "@nextclaw/ncp";
5
6
  import { LocalAssetStore } from "@nextclaw/ncp-agent-runtime";
6
7
  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";
7
8
  import { AgentSessionRecord, ChatTarget, NcpReplyInput, RuntimeFactoryParams } from "@nextclaw/ncp-toolkit";
8
- import { AppInstallProgressHandler, AppNativeArtifactTarget, AppPermissions, AppPlatformTargetService, AppRollbackResult, AppRuntimeIsolation, AppRuntimeProfile, AppStorageContext, AppStorageUsage, AppUninstallResult, AppUpdateResult } from "@nextclaw/app-runtime";
9
+ import { AppInstallProgressHandler, AppNativeArtifactTarget, AppPermissions, AppPlatformTargetService, AppRollbackResult, AppRuntimeIsolation, AppRuntimeProfile, AppSecretBinding, AppSecretSlot, AppStorageContext, AppStorageUsage, AppUninstallResult, AppUpdateResult } from "@nextclaw/app-runtime";
9
10
  import * as _$_nextclaw_mcp0 from "@nextclaw/mcp";
10
11
  import { McpCatalogFilter, McpCatalogFilter as McpCatalogFilter$1, McpRegistryService, McpServerRecord, McpServerRecord as McpServerRecord$1, McpToolCatalogEntry, McpToolCatalogEntry as McpToolCatalogEntry$1 } from "@nextclaw/mcp";
11
12
 
@@ -1110,6 +1111,297 @@ declare class AutomationManager extends CronService {
1110
1111
  constructor(options: AutomationManagerOptions);
1111
1112
  }
1112
1113
  //#endregion
1114
+ //#region src/types/service-app.types.d.ts
1115
+ type ServiceAppProtocol = "mcp" | "wasi-component";
1116
+ type ServiceActionRisk = "read" | "write" | "external" | "dangerous";
1117
+ type ServiceAppRuntimeStatus = "idle" | "starting" | "running" | "failed" | "stopped";
1118
+ type ServiceAppManifestAction = {
1119
+ risk?: ServiceActionRisk;
1120
+ title?: string;
1121
+ description?: string;
1122
+ inputSchema?: Record<string, unknown>;
1123
+ timeoutMs?: number;
1124
+ };
1125
+ type ServiceAppLifecycle = {
1126
+ mode: "action";
1127
+ } | {
1128
+ mode: "resident";
1129
+ eventIntervalMs: number;
1130
+ } | {
1131
+ mode: "provider";
1132
+ };
1133
+ /**
1134
+ * A dependency intentionally kept outside a portable `.napp` artifact.
1135
+ * It never carries credentials, connection strings, or installation commands.
1136
+ */
1137
+ type ServiceAppExternalRemediation = {
1138
+ kind: "agent-setup";
1139
+ summary: string;
1140
+ requiresUserAction?: boolean;
1141
+ };
1142
+ /**
1143
+ * The versioned WIT surface used by a capability Provider and its Consumers.
1144
+ * A Provider carries an exact semver release; a Consumer carries the range it
1145
+ * accepts. This declaration is static manifest metadata, never a registry.
1146
+ */
1147
+ type ServiceAppWitContract = {
1148
+ package: string;
1149
+ interface: string;
1150
+ version: string;
1151
+ };
1152
+ type ServiceAppCapabilityRequirement = {
1153
+ id: string;
1154
+ version?: string; /** A Provider Component packaged beside this Consumer. */
1155
+ provider?: string;
1156
+ wit?: ServiceAppWitContract;
1157
+ title?: string;
1158
+ description?: string;
1159
+ remediation?: ServiceAppExternalRemediation;
1160
+ };
1161
+ type ServiceAppResourceRequirement = {
1162
+ binding: string;
1163
+ type: string;
1164
+ required?: boolean;
1165
+ title?: string;
1166
+ description?: string;
1167
+ remediation?: ServiceAppExternalRemediation;
1168
+ };
1169
+ /**
1170
+ * A portable Guest can name a slot but never a provider, model, or Agent.
1171
+ * The Kernel binds the slot through a capability grant after installation.
1172
+ */
1173
+ type ServiceAppModelCapabilitySlot = {
1174
+ id: string;
1175
+ title: string;
1176
+ description: string;
1177
+ required: boolean;
1178
+ maxTokens?: number;
1179
+ timeoutMs?: number;
1180
+ };
1181
+ type ServiceAppAgentCapabilitySlot = {
1182
+ id: string;
1183
+ title: string;
1184
+ description: string;
1185
+ required: boolean;
1186
+ };
1187
+ type ServiceAppRequirements = {
1188
+ capabilities?: ServiceAppCapabilityRequirement[];
1189
+ resources?: ServiceAppResourceRequirement[];
1190
+ modelSlots?: ServiceAppModelCapabilitySlot[];
1191
+ agentSlots?: ServiceAppAgentCapabilitySlot[];
1192
+ };
1193
+ /**
1194
+ * A stable capability exposed by a Service Provider App. Provider identity is
1195
+ * still the Service id; this declaration only describes what it can satisfy.
1196
+ */
1197
+ type ServiceAppCapabilityProvision = {
1198
+ id: string;
1199
+ version: string;
1200
+ wit?: ServiceAppWitContract;
1201
+ resourceTypes?: string[];
1202
+ };
1203
+ type ServiceAppProvides = {
1204
+ capabilities?: ServiceAppCapabilityProvision[];
1205
+ };
1206
+ type ServiceAppManifest = {
1207
+ id: string;
1208
+ title: string;
1209
+ description?: string;
1210
+ enabled: boolean;
1211
+ protocol: ServiceAppProtocol;
1212
+ command?: string;
1213
+ args?: string[];
1214
+ componentEntry?: string;
1215
+ providerIds?: string[];
1216
+ lifecycle?: ServiceAppLifecycle;
1217
+ requires?: ServiceAppRequirements;
1218
+ provides?: ServiceAppProvides;
1219
+ actions: Record<string, ServiceAppManifestAction>;
1220
+ };
1221
+ type ServiceAppRecord = {
1222
+ id: string;
1223
+ title: string;
1224
+ description?: string;
1225
+ dirPath: string;
1226
+ manifestPath: string;
1227
+ command?: string;
1228
+ args?: string[];
1229
+ cwd: string;
1230
+ enabled: boolean;
1231
+ protocol: ServiceAppProtocol;
1232
+ status: ServiceAppRuntimeStatus;
1233
+ lastError?: string;
1234
+ lastStartedAt?: string;
1235
+ lastReadyAt?: string;
1236
+ lastFailedAt?: string;
1237
+ sourceKind?: "workspace" | "package";
1238
+ packageId?: string;
1239
+ packageVersion?: string;
1240
+ packageDirectory?: string;
1241
+ dataDirectory?: string;
1242
+ instanceId?: string;
1243
+ storage?: AppStorageContext;
1244
+ isolation?: AppRuntimeIsolation;
1245
+ runtimeProfile?: AppRuntimeProfile;
1246
+ permissions?: AppPermissions;
1247
+ componentPath?: string;
1248
+ providerIds?: string[];
1249
+ lifecycle?: ServiceAppLifecycle;
1250
+ };
1251
+ type ServiceActionGrantState = "granted" | "not-granted" | "not-declared";
1252
+ type ServiceActionRuntimeState = "matched" | "missing" | "undeclared";
1253
+ type ServiceAction = {
1254
+ id: string;
1255
+ appId: string;
1256
+ name: string;
1257
+ title?: string;
1258
+ description?: string;
1259
+ inputSchema?: Record<string, unknown>;
1260
+ risk: ServiceActionRisk;
1261
+ runtimeState?: ServiceActionRuntimeState;
1262
+ grantState?: ServiceActionGrantState;
1263
+ };
1264
+ type PanelServiceActionCaller = {
1265
+ surface: "panel-app";
1266
+ appId: string;
1267
+ };
1268
+ type AgentServiceActionCaller = {
1269
+ surface: "agent";
1270
+ agentId: string;
1271
+ };
1272
+ type ServiceActionCaller = PanelServiceActionCaller | AgentServiceActionCaller;
1273
+ type ServiceActionGrant = {
1274
+ caller: ServiceActionCaller;
1275
+ actionId: string;
1276
+ risk: ServiceActionRisk;
1277
+ grantedAt: string;
1278
+ };
1279
+ type ServiceActionInvokeRequest = {
1280
+ caller: ServiceActionCaller;
1281
+ declaredActions?: string[];
1282
+ input?: Record<string, unknown>;
1283
+ };
1284
+ type ServiceActionInvokeResult = {
1285
+ actionId: string;
1286
+ result: unknown;
1287
+ invocation?: ServiceActionInvocationFacts;
1288
+ };
1289
+ /**
1290
+ * Durable status for an explicitly asynchronous Service App invocation.
1291
+ * Terminal statuses are intentionally irreversible: a retry is a new job
1292
+ * linked through `retryOf`, never a rewrite of the original execution.
1293
+ */
1294
+ type ServiceAppJobStatus = "queued" | "starting" | "running" | "succeeded" | "cancel-requested" | "cancelled" | "timed-out" | "failed" | "interrupted";
1295
+ type ServiceAppTerminalJobStatus = Extract<ServiceAppJobStatus, "succeeded" | "cancelled" | "timed-out" | "failed" | "interrupted">;
1296
+ type ServiceAppJobCaller = {
1297
+ surface: "panel" | "agent" | "installed-app-cli";
1298
+ id?: string;
1299
+ };
1300
+ type ServiceAppJobView = {
1301
+ id: string;
1302
+ appId: string;
1303
+ instanceId: string;
1304
+ componentId: string;
1305
+ actionName: string;
1306
+ status: ServiceAppJobStatus;
1307
+ createdAt: string;
1308
+ updatedAt: string;
1309
+ startedAt?: string;
1310
+ completedAt?: string;
1311
+ cancelRequestedAt?: string;
1312
+ retryOf?: string;
1313
+ callId: string;
1314
+ traceId: string;
1315
+ caller?: ServiceAppJobCaller;
1316
+ error?: {
1317
+ code?: string;
1318
+ message: string;
1319
+ };
1320
+ };
1321
+ type ServiceAppJobProgressEvent = {
1322
+ type: "progress";
1323
+ current?: number;
1324
+ total?: number;
1325
+ message?: string;
1326
+ };
1327
+ type ServiceAppJobChunkEvent = {
1328
+ type: "stream-chunk";
1329
+ content: string;
1330
+ };
1331
+ type ServiceAppJobTerminalEvent = {
1332
+ type: "terminal";
1333
+ status: ServiceAppTerminalJobStatus;
1334
+ error?: {
1335
+ code?: string;
1336
+ message: string;
1337
+ };
1338
+ };
1339
+ type ServiceAppJobEvent = {
1340
+ sequence: number;
1341
+ timestamp: string;
1342
+ } & (ServiceAppJobProgressEvent | ServiceAppJobChunkEvent | ServiceAppJobTerminalEvent);
1343
+ type ServiceAppJobList = {
1344
+ entries: ServiceAppJobView[];
1345
+ };
1346
+ type ServiceAppJobWatch = {
1347
+ job: ServiceAppJobView;
1348
+ events: ServiceAppJobEvent[]; /** Pass this value back as `afterSequence` to resume without a gap. */
1349
+ cursor: number;
1350
+ };
1351
+ /**
1352
+ * Durable host-owned delivery state for a Resident event. A Resident is a
1353
+ * serial lane, therefore an acknowledged event is the only state permitted
1354
+ * to advance that stream's cursor. Event payload is retained only in the
1355
+ * App instance journal, never in VerificationRecord evidence.
1356
+ */
1357
+ type ServiceAppResidentEventStatus = "received" | "pending" | "leased" | "acked" | "retry-wait" | "dead-letter";
1358
+ type ServiceAppResidentEventDisposition = {
1359
+ kind: "ack";
1360
+ } | {
1361
+ kind: "retry";
1362
+ delayMs?: number;
1363
+ error?: {
1364
+ code?: string;
1365
+ message?: string;
1366
+ };
1367
+ };
1368
+ type ServiceAppResidentEventView = {
1369
+ id: string;
1370
+ appId: string;
1371
+ instanceId: string;
1372
+ componentId: string;
1373
+ eventId: string;
1374
+ streamKey: string;
1375
+ sequence: number;
1376
+ status: ServiceAppResidentEventStatus;
1377
+ receivedAt: string;
1378
+ updatedAt: string;
1379
+ attempt: number;
1380
+ leaseExpiresAt?: string;
1381
+ nextAttemptAt?: string;
1382
+ ackedAt?: string;
1383
+ deadLetteredAt?: string;
1384
+ lastError?: {
1385
+ code?: string;
1386
+ message: string;
1387
+ };
1388
+ };
1389
+ type ServiceAppResidentEventList = {
1390
+ entries: ServiceAppResidentEventView[];
1391
+ cursors: Record<string, number>;
1392
+ frozen: boolean;
1393
+ };
1394
+ type ServiceActionInvocationFacts = {
1395
+ callId: string;
1396
+ traceId: string;
1397
+ dataVersion: string;
1398
+ verificationRunId: string;
1399
+ };
1400
+ type ServiceActionGrantRequest = {
1401
+ caller: ServiceActionCaller;
1402
+ declaredActions?: string[];
1403
+ };
1404
+ //#endregion
1113
1405
  //#region src/types/app-package.types.d.ts
1114
1406
  type AppPackageComponentKind = "panel" | "service";
1115
1407
  type AppPackageComponentSource = {
@@ -1135,6 +1427,7 @@ type CapabilityProviderView = {
1135
1427
  id: string;
1136
1428
  version?: string;
1137
1429
  resourceTypes?: string[];
1430
+ wit?: ServiceAppWitContract;
1138
1431
  }>;
1139
1432
  };
1140
1433
  type AppPackageUnavailableDiagnostic = {
@@ -1169,6 +1462,16 @@ type AppPackageReadiness = {
1169
1462
  status: AppPackageReadinessStatus;
1170
1463
  requirements: AppPackageReadinessRequirement[];
1171
1464
  };
1465
+ type AppPackageSecretStatus = "bound" | "ready" | "unbound" | "unresolved";
1466
+ type AppPackageSecretSlotView = Pick<AppSecretSlot, "id" | "title" | "description" | "required"> & {
1467
+ status: AppPackageSecretStatus;
1468
+ binding?: AppSecretBinding;
1469
+ errorCode?: "SECRET_BINDING_MISSING" | "SECRET_RESOLUTION_FAILED";
1470
+ };
1471
+ type AppPackageSecretReadiness = {
1472
+ readiness: AppPackageReadiness;
1473
+ slots: AppPackageSecretSlotView[];
1474
+ };
1172
1475
  type AppPackageDependencyBinding = {
1173
1476
  componentId: string;
1174
1477
  requirementKind: "capability" | "resource";
@@ -1179,11 +1482,25 @@ type AppPackageDependencyCandidate = {
1179
1482
  requirement: AppPackageReadinessRequirement;
1180
1483
  providers: CapabilityProviderView[];
1181
1484
  };
1485
+ 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";
1486
+ type AppPackageDependencyDiagnostic = {
1487
+ code: AppPackageDependencyDiagnosticCode;
1488
+ componentId: string;
1489
+ requirementKind: "capability" | "resource";
1490
+ requirementId: string;
1491
+ providerId?: string;
1492
+ message: string;
1493
+ };
1494
+ type AppPackageDependencyCycle = {
1495
+ componentId: string;
1496
+ providerIds: string[];
1497
+ };
1182
1498
  type AppPackageDependencyView = {
1183
1499
  readiness: AppPackageReadiness;
1184
1500
  bindings: AppPackageDependencyBinding[];
1185
1501
  candidates: AppPackageDependencyCandidate[];
1186
1502
  resolvedProviderIds: Record<string, string[]>;
1503
+ diagnostics: AppPackageDependencyDiagnostic[];
1187
1504
  };
1188
1505
  type AppPackageDependencyBindingInput = {
1189
1506
  componentId: string;
@@ -1211,6 +1528,7 @@ type AppPackageView = {
1211
1528
  runtimeProfile: AppRuntimeProfile;
1212
1529
  isolation: AppRuntimeIsolation;
1213
1530
  readiness: AppPackageReadiness;
1531
+ secrets: AppPackageSecretReadiness;
1214
1532
  dependencies: AppPackageDependencyView;
1215
1533
  };
1216
1534
  type AppPackageHostTarget = {
@@ -1281,7 +1599,7 @@ type AppPackageRuntimeHooks = {
1281
1599
  beforeDeactivate: (sources: AppPackageComponentSource[]) => Promise<void>;
1282
1600
  beforeUninstall: (sources: AppPackageComponentSource[]) => Promise<AppPackageUninstallRollback | void>;
1283
1601
  };
1284
- type AppPackageErrorCode = "APP_PACKAGE_CONFLICT" | "APP_PACKAGE_INCOMPATIBLE" | "APP_PACKAGE_NOT_READY" | "APP_PACKAGE_NOT_FOUND" | "APP_PACKAGE_OPERATION_FAILED";
1602
+ 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";
1285
1603
  declare class AppPackageError extends Error {
1286
1604
  readonly code: AppPackageErrorCode;
1287
1605
  constructor(code: AppPackageErrorCode, message: string);
@@ -1300,6 +1618,7 @@ declare class AppPackageManager {
1300
1618
  private readonly dependencyCoordinator;
1301
1619
  private readonly runtimeActivationService;
1302
1620
  private readonly registryService;
1621
+ private readonly readinessManager;
1303
1622
  private runtimeHooks;
1304
1623
  private builtInBootstrapPromise;
1305
1624
  private builtInDefinitionsPromise;
@@ -1307,6 +1626,8 @@ declare class AppPackageManager {
1307
1626
  appHomeDirectory: string;
1308
1627
  builtInAppsDirectory?: string;
1309
1628
  productVersion?: string;
1629
+ getSecretConfig?: () => Config;
1630
+ secretConfigPath?: string;
1310
1631
  });
1311
1632
  installRuntimeHooks: (hooks: Partial<AppPackageRuntimeHooks>) => void;
1312
1633
  start: () => Promise<void>;
@@ -1323,6 +1644,13 @@ declare class AppPackageManager {
1323
1644
  setupDependencies: (appId: string) => Promise<AppPackageDependencyView>;
1324
1645
  bindDependency: (appId: string, input: AppPackageDependencyBindingInput) => Promise<AppPackageDependencyView>;
1325
1646
  unbindDependency: (appId: string, input: Omit<AppPackageDependencyBindingInput, "providerId">) => Promise<AppPackageDependencyView>;
1647
+ inspectSecrets: (appId: string) => Promise<AppPackageSecretReadiness>;
1648
+ verifySecrets: (appId: string) => Promise<AppPackageSecretReadiness>;
1649
+ bindSecret: (appId: string, input: {
1650
+ slotId: string;
1651
+ binding: AppSecretBinding;
1652
+ }) => Promise<AppPackageSecretReadiness>;
1653
+ unbindSecret: (appId: string, slotId: string) => Promise<AppPackageSecretReadiness>;
1326
1654
  listActiveComponentSources: () => Promise<AppPackageComponentSource[]>;
1327
1655
  listActiveComponentSourcesWithDiagnostics: () => Promise<AppPackageComponentSourceList>;
1328
1656
  listOperations: () => Promise<AppPackageOperationList>;
@@ -1345,14 +1673,14 @@ declare class AppPackageManager {
1345
1673
  uninstall: (appId: string, purgeData: boolean) => Promise<AppUninstallResult>;
1346
1674
  private ensureBuiltInPackages;
1347
1675
  private installBuiltInPackages;
1348
- private toPackageView;
1676
+ private readListedPackageView;
1349
1677
  private resolveSecurity;
1350
1678
  private toComponentSources;
1351
- private assertEngineCompatibility;
1352
1679
  private listBuiltInDefinitions;
1353
1680
  private isBuiltInAppId;
1354
1681
  private executeOperation;
1355
1682
  private isMissingFileError;
1683
+ private isTransientUninstallRead;
1356
1684
  }
1357
1685
  //#endregion
1358
1686
  //#region src/types/app-data.types.d.ts
@@ -1521,152 +1849,6 @@ declare function getCapabilityGrantKey(request: CapabilityGrantRequest): string;
1521
1849
  declare function capabilityGrantCovers(grant: CapabilityGrant, request: CapabilityGrantRequest): boolean;
1522
1850
  declare function matchesCapabilityGrantFilter(grant: CapabilityGrant, filter: CapabilityGrantFilter): boolean;
1523
1851
  //#endregion
1524
- //#region src/types/service-app.types.d.ts
1525
- type ServiceAppProtocol = "mcp" | "wasi-component";
1526
- type ServiceActionRisk = "read" | "write" | "external" | "dangerous";
1527
- type ServiceAppRuntimeStatus = "idle" | "starting" | "running" | "failed" | "stopped";
1528
- type ServiceAppManifestAction = {
1529
- risk?: ServiceActionRisk;
1530
- title?: string;
1531
- description?: string;
1532
- inputSchema?: Record<string, unknown>;
1533
- timeoutMs?: number;
1534
- };
1535
- type ServiceAppLifecycle = {
1536
- mode: "action";
1537
- } | {
1538
- mode: "resident";
1539
- eventIntervalMs: number;
1540
- } | {
1541
- mode: "provider";
1542
- };
1543
- /**
1544
- * A dependency intentionally kept outside a portable `.napp` artifact.
1545
- * It never carries credentials, connection strings, or installation commands.
1546
- */
1547
- type ServiceAppExternalRemediation = {
1548
- kind: "agent-setup";
1549
- summary: string;
1550
- requiresUserAction?: boolean;
1551
- };
1552
- type ServiceAppCapabilityRequirement = {
1553
- id: string;
1554
- version?: string;
1555
- title?: string;
1556
- description?: string;
1557
- remediation?: ServiceAppExternalRemediation;
1558
- };
1559
- type ServiceAppResourceRequirement = {
1560
- binding: string;
1561
- type: string;
1562
- required?: boolean;
1563
- title?: string;
1564
- description?: string;
1565
- remediation?: ServiceAppExternalRemediation;
1566
- };
1567
- type ServiceAppRequirements = {
1568
- capabilities?: ServiceAppCapabilityRequirement[];
1569
- resources?: ServiceAppResourceRequirement[];
1570
- };
1571
- /**
1572
- * A stable capability exposed by a Service Provider App. Provider identity is
1573
- * still the Service id; this declaration only describes what it can satisfy.
1574
- */
1575
- type ServiceAppCapabilityProvision = {
1576
- id: string;
1577
- version: string;
1578
- resourceTypes?: string[];
1579
- };
1580
- type ServiceAppProvides = {
1581
- capabilities?: ServiceAppCapabilityProvision[];
1582
- };
1583
- type ServiceAppManifest = {
1584
- id: string;
1585
- title: string;
1586
- description?: string;
1587
- enabled: boolean;
1588
- protocol: ServiceAppProtocol;
1589
- command?: string;
1590
- args?: string[];
1591
- componentEntry?: string;
1592
- providerIds?: string[];
1593
- lifecycle?: ServiceAppLifecycle;
1594
- requires?: ServiceAppRequirements;
1595
- provides?: ServiceAppProvides;
1596
- actions: Record<string, ServiceAppManifestAction>;
1597
- };
1598
- type ServiceAppRecord = {
1599
- id: string;
1600
- title: string;
1601
- description?: string;
1602
- dirPath: string;
1603
- manifestPath: string;
1604
- command?: string;
1605
- args?: string[];
1606
- cwd: string;
1607
- enabled: boolean;
1608
- protocol: ServiceAppProtocol;
1609
- status: ServiceAppRuntimeStatus;
1610
- lastError?: string;
1611
- lastStartedAt?: string;
1612
- lastReadyAt?: string;
1613
- lastFailedAt?: string;
1614
- sourceKind?: "workspace" | "package";
1615
- packageId?: string;
1616
- packageVersion?: string;
1617
- packageDirectory?: string;
1618
- dataDirectory?: string;
1619
- instanceId?: string;
1620
- storage?: AppStorageContext;
1621
- isolation?: AppRuntimeIsolation;
1622
- runtimeProfile?: AppRuntimeProfile;
1623
- permissions?: AppPermissions;
1624
- componentPath?: string;
1625
- providerIds?: string[];
1626
- lifecycle?: ServiceAppLifecycle;
1627
- };
1628
- type ServiceActionGrantState = "granted" | "not-granted" | "not-declared";
1629
- type ServiceActionRuntimeState = "matched" | "missing" | "undeclared";
1630
- type ServiceAction = {
1631
- id: string;
1632
- appId: string;
1633
- name: string;
1634
- title?: string;
1635
- description?: string;
1636
- inputSchema?: Record<string, unknown>;
1637
- risk: ServiceActionRisk;
1638
- runtimeState?: ServiceActionRuntimeState;
1639
- grantState?: ServiceActionGrantState;
1640
- };
1641
- type PanelServiceActionCaller = {
1642
- surface: "panel-app";
1643
- appId: string;
1644
- };
1645
- type AgentServiceActionCaller = {
1646
- surface: "agent";
1647
- agentId: string;
1648
- };
1649
- type ServiceActionCaller = PanelServiceActionCaller | AgentServiceActionCaller;
1650
- type ServiceActionGrant = {
1651
- caller: ServiceActionCaller;
1652
- actionId: string;
1653
- risk: ServiceActionRisk;
1654
- grantedAt: string;
1655
- };
1656
- type ServiceActionInvokeRequest = {
1657
- caller: ServiceActionCaller;
1658
- declaredActions?: string[];
1659
- input?: Record<string, unknown>;
1660
- };
1661
- type ServiceActionInvokeResult = {
1662
- actionId: string;
1663
- result: unknown;
1664
- };
1665
- type ServiceActionGrantRequest = {
1666
- caller: ServiceActionCaller;
1667
- declaredActions?: string[];
1668
- };
1669
- //#endregion
1670
1852
  //#region src/types/panel-app.types.d.ts
1671
1853
  type PanelAppEntry = {
1672
1854
  id: string;
@@ -1792,6 +1974,14 @@ declare function createPanelAppClientGrantRequest(appId: string): CapabilityGran
1792
1974
  declare function createPanelAppAgentGrantRequest(caller: PanelServiceActionCaller, capability: PanelAppAgentCapability): CapabilityGrantRequest;
1793
1975
  declare function createServiceActionGrantRequest(caller: ServiceActionCaller, action: ServiceAction): CapabilityGrantRequest;
1794
1976
  declare function readServiceActionTargetId(target: unknown): string | null;
1977
+ declare function createServiceAppModelSlotGrantRequest(app: ServiceAppRecord, slot: ServiceAppModelCapabilitySlot, modelId: string): CapabilityGrantRequest;
1978
+ declare function createServiceAppAgentSlotGrantRequest(app: ServiceAppRecord, slot: ServiceAppAgentCapabilitySlot, agentId: string): CapabilityGrantRequest;
1979
+ declare function readServiceAppSlotTarget(target: unknown): {
1980
+ componentId: string;
1981
+ slotId: string;
1982
+ modelId?: string;
1983
+ agentId?: string;
1984
+ } | null;
1795
1985
  //#endregion
1796
1986
  //#region src/features/desktop-host/types/desktop-host.types.d.ts
1797
1987
  declare const DESKTOP_HOST_PROTOCOL_VERSION: 1;
@@ -2555,6 +2745,398 @@ declare class LlmUsageManager {
2555
2745
  private readonly toSortedCounts;
2556
2746
  }
2557
2747
  //#endregion
2748
+ //#region src/types/portable-runtime-acceptance.types.d.ts
2749
+ declare const PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS: readonly ["darwin-arm64", "windows-x64", "linux-x64"];
2750
+ type PortableRuntimeAcceptancePlatform = (typeof PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS)[number];
2751
+ type PortableRuntimeAcceptanceEvidenceSource = "local" | "ci" | "release";
2752
+ type PortableRuntimeAcceptanceDefinition = {
2753
+ id: string;
2754
+ titleKey: string;
2755
+ descriptionKey: string;
2756
+ checkerKey: string;
2757
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2758
+ required: boolean;
2759
+ scenarioVersion: string;
2760
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2761
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2762
+ };
2763
+ /**
2764
+ * The sole machine-readable registry of portable runtime acceptance criteria.
2765
+ * Product projections and release tooling consume this value; they must not
2766
+ * reconstruct IDs from documents, panels, or test file names.
2767
+ */
2768
+ declare const PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT: readonly [{
2769
+ titleKey: string;
2770
+ descriptionKey: string;
2771
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2772
+ scenarioVersion: string;
2773
+ id: "PRT-EXEC-001";
2774
+ checkerKey: string;
2775
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2776
+ required: boolean;
2777
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2778
+ }, {
2779
+ titleKey: string;
2780
+ descriptionKey: string;
2781
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2782
+ scenarioVersion: string;
2783
+ id: "PRT-DATA-001";
2784
+ checkerKey: string;
2785
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2786
+ required: boolean;
2787
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2788
+ }, {
2789
+ titleKey: string;
2790
+ descriptionKey: string;
2791
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2792
+ scenarioVersion: string;
2793
+ id: "PRT-FILE-001";
2794
+ checkerKey: string;
2795
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2796
+ required: boolean;
2797
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2798
+ }, {
2799
+ titleKey: string;
2800
+ descriptionKey: string;
2801
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2802
+ scenarioVersion: string;
2803
+ id: "PRT-NET-001";
2804
+ checkerKey: string;
2805
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2806
+ required: boolean;
2807
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2808
+ }, {
2809
+ titleKey: string;
2810
+ descriptionKey: string;
2811
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2812
+ scenarioVersion: string;
2813
+ id: "PRT-SECRET-001";
2814
+ checkerKey: string;
2815
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2816
+ required: boolean;
2817
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2818
+ }, {
2819
+ titleKey: string;
2820
+ descriptionKey: string;
2821
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2822
+ scenarioVersion: string;
2823
+ id: "PRT-RES-001";
2824
+ checkerKey: string;
2825
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2826
+ required: boolean;
2827
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2828
+ }, {
2829
+ titleKey: string;
2830
+ descriptionKey: string;
2831
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2832
+ scenarioVersion: string;
2833
+ id: "PRT-EVENT-001";
2834
+ checkerKey: string;
2835
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2836
+ required: boolean;
2837
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2838
+ }, {
2839
+ titleKey: string;
2840
+ descriptionKey: string;
2841
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2842
+ scenarioVersion: string;
2843
+ id: "PRT-TASK-001";
2844
+ checkerKey: string;
2845
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2846
+ required: boolean;
2847
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2848
+ }, {
2849
+ titleKey: string;
2850
+ descriptionKey: string;
2851
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2852
+ scenarioVersion: string;
2853
+ id: "PRT-STREAM-001";
2854
+ checkerKey: string;
2855
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2856
+ required: boolean;
2857
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2858
+ }, {
2859
+ titleKey: string;
2860
+ descriptionKey: string;
2861
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2862
+ scenarioVersion: string;
2863
+ id: "PRT-AGENT-001";
2864
+ checkerKey: string;
2865
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2866
+ required: boolean;
2867
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2868
+ }, {
2869
+ titleKey: string;
2870
+ descriptionKey: string;
2871
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2872
+ scenarioVersion: string;
2873
+ id: "PRT-AI-001";
2874
+ checkerKey: string;
2875
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2876
+ required: boolean;
2877
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2878
+ }, {
2879
+ titleKey: string;
2880
+ descriptionKey: string;
2881
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2882
+ scenarioVersion: string;
2883
+ id: "PRT-COMP-001";
2884
+ checkerKey: string;
2885
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2886
+ required: boolean;
2887
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2888
+ }, {
2889
+ titleKey: string;
2890
+ descriptionKey: string;
2891
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2892
+ scenarioVersion: string;
2893
+ id: "PRT-ENTRY-001";
2894
+ checkerKey: string;
2895
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2896
+ required: boolean;
2897
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2898
+ }, {
2899
+ titleKey: string;
2900
+ descriptionKey: string;
2901
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2902
+ scenarioVersion: string;
2903
+ id: "PRT-LIFE-001";
2904
+ checkerKey: string;
2905
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2906
+ required: boolean;
2907
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2908
+ }, {
2909
+ titleKey: string;
2910
+ descriptionKey: string;
2911
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2912
+ scenarioVersion: string;
2913
+ id: "PRT-BOUND-001";
2914
+ checkerKey: string;
2915
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2916
+ required: boolean;
2917
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2918
+ }, {
2919
+ titleKey: string;
2920
+ descriptionKey: string;
2921
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2922
+ scenarioVersion: string;
2923
+ id: "PRT-PERF-001";
2924
+ checkerKey: string;
2925
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2926
+ required: boolean;
2927
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2928
+ }, {
2929
+ titleKey: string;
2930
+ descriptionKey: string;
2931
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2932
+ scenarioVersion: string;
2933
+ id: "PRT-DX-001";
2934
+ checkerKey: string;
2935
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2936
+ required: boolean;
2937
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2938
+ }, {
2939
+ titleKey: string;
2940
+ descriptionKey: string;
2941
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2942
+ scenarioVersion: string;
2943
+ id: "PRT-DIST-001";
2944
+ checkerKey: string;
2945
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2946
+ required: boolean;
2947
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2948
+ }, {
2949
+ titleKey: string;
2950
+ descriptionKey: string;
2951
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2952
+ scenarioVersion: string;
2953
+ id: "PRT-EVID-001";
2954
+ checkerKey: string;
2955
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2956
+ required: boolean;
2957
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2958
+ }, {
2959
+ titleKey: string;
2960
+ descriptionKey: string;
2961
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2962
+ scenarioVersion: string;
2963
+ id: "PRT-REF-001";
2964
+ checkerKey: string;
2965
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2966
+ required: boolean;
2967
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2968
+ }, {
2969
+ titleKey: string;
2970
+ descriptionKey: string;
2971
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2972
+ scenarioVersion: string;
2973
+ id: "PRT-DOCS-001";
2974
+ checkerKey: string;
2975
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2976
+ required: boolean;
2977
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2978
+ }, {
2979
+ titleKey: string;
2980
+ descriptionKey: string;
2981
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
2982
+ scenarioVersion: string;
2983
+ id: "PRT-REL-001";
2984
+ checkerKey: string;
2985
+ category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
2986
+ required: boolean;
2987
+ platforms: readonly PortableRuntimeAcceptancePlatform[];
2988
+ }];
2989
+ type PortableRuntimeAcceptanceId = (typeof PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT)[number]["id"];
2990
+ declare const PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT_FINGERPRINT: string;
2991
+ //#endregion
2992
+ //#region src/types/verification-record.types.d.ts
2993
+ type VerificationRecordStatus = "passed" | "failed" | "blocked" | "not-supported" | "not-run";
2994
+ type VerificationRecordRole = "panel" | "agent" | "cli" | "system";
2995
+ type VerificationRecordEntrySurface = "panel" | "agent" | "installed-app-cli" | "system";
2996
+ type VerificationRecordObservation = {
2997
+ durationMs?: number;
2998
+ runnerPid?: number | null;
2999
+ memory?: {
3000
+ rssBytes: number | null;
3001
+ pssBytes: number | null;
3002
+ } | null;
3003
+ };
3004
+ type VerificationRecordError = {
3005
+ code?: string;
3006
+ message: string;
3007
+ };
3008
+ /**
3009
+ * Immutable, redacted evidence emitted by a real Kernel invocation.
3010
+ * Inputs and outputs are represented by digests only; callers must never use
3011
+ * this record as a storage channel for user content or secrets.
3012
+ */
3013
+ type VerificationRecord = {
3014
+ evidenceSchemaVersion: 2; /** The producer that generated this versioned evidence. */
3015
+ evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
3016
+ verificationRunId: string;
3017
+ acceptanceId: string;
3018
+ scenarioVersion: string;
3019
+ productVersion: string;
3020
+ runtimeVersion: string;
3021
+ implementationFingerprint: string;
3022
+ status: VerificationRecordStatus;
3023
+ startedAt: string;
3024
+ finishedAt: string;
3025
+ environment: string;
3026
+ appId: string;
3027
+ componentId: string;
3028
+ role: VerificationRecordRole;
3029
+ entrySurface: VerificationRecordEntrySurface;
3030
+ instanceId?: string;
3031
+ actionOrEvent: string;
3032
+ callId: string;
3033
+ traceId: string;
3034
+ capabilityDecisions: string[];
3035
+ inputDigest: string;
3036
+ outputDigest?: string;
3037
+ dataVersion: string;
3038
+ observation?: VerificationRecordObservation;
3039
+ error?: VerificationRecordError;
3040
+ recovery?: string;
3041
+ evidenceRefs: string[];
3042
+ };
3043
+ /**
3044
+ * Historical records are retained for audit but can never satisfy the current
3045
+ * acceptance contract because they predate version/fingerprint evidence.
3046
+ */
3047
+ type LegacyVerificationRecord = Omit<VerificationRecord, "evidenceSchemaVersion" | "productVersion" | "runtimeVersion" | "implementationFingerprint" | "evidenceSource"> & {
3048
+ evidenceSchemaVersion: 1;
3049
+ };
3050
+ type VerificationEvidenceRecord = VerificationRecord | LegacyVerificationRecord;
3051
+ type VerificationRecordInput = (Omit<VerificationRecord, "evidenceSchemaVersion" | "verificationRunId"> & {
3052
+ verificationRunId?: string;
3053
+ }) | (Omit<LegacyVerificationRecord, "evidenceSchemaVersion" | "verificationRunId"> & {
3054
+ verificationRunId?: string;
3055
+ });
3056
+ type VerificationRecordList = {
3057
+ entries: VerificationEvidenceRecord[];
3058
+ };
3059
+ //#endregion
3060
+ //#region src/utils/portable-runtime-acceptance-evaluator.utils.d.ts
3061
+ type PortableRuntimeAcceptanceEvaluationContext = {
3062
+ appId: string;
3063
+ environment: PortableRuntimeAcceptancePlatform;
3064
+ productVersion: string;
3065
+ runtimeVersion: string;
3066
+ implementationFingerprint: string;
3067
+ contractFingerprint: string;
3068
+ };
3069
+ type PortableRuntimeAcceptanceEvidence = {
3070
+ source: PortableRuntimeAcceptanceEvidenceSource;
3071
+ records: VerificationEvidenceRecord[];
3072
+ };
3073
+ type PortableRuntimeAcceptanceEvidenceArtifact = {
3074
+ schemaVersion: 1;
3075
+ contractFingerprint: string;
3076
+ targets: Array<PortableRuntimeAcceptanceEvaluationContext & {
3077
+ evidence: PortableRuntimeAcceptanceEvidence[];
3078
+ }>;
3079
+ };
3080
+ type PortableRuntimeAcceptanceResultStatus = "current-passed" | "missing" | "stale" | "failed" | "not-applicable";
3081
+ type PortableRuntimeAcceptanceResult = {
3082
+ acceptanceId: string;
3083
+ required: boolean;
3084
+ environment: PortableRuntimeAcceptancePlatform;
3085
+ status: PortableRuntimeAcceptanceResultStatus;
3086
+ latestRecord?: VerificationEvidenceRecord;
3087
+ };
3088
+ declare function evaluatePortableRuntimeAcceptance(input: {
3089
+ context: PortableRuntimeAcceptanceEvaluationContext;
3090
+ evidence: readonly PortableRuntimeAcceptanceEvidence[];
3091
+ definitions?: readonly PortableRuntimeAcceptanceDefinition[];
3092
+ }): PortableRuntimeAcceptanceResult[];
3093
+ declare function evaluatePortableRuntimeAcceptanceArtifact(artifact: PortableRuntimeAcceptanceEvidenceArtifact): PortableRuntimeAcceptanceResult[];
3094
+ declare function parsePortableRuntimeAcceptanceEvidenceArtifact(value: unknown): PortableRuntimeAcceptanceEvidenceArtifact;
3095
+ //#endregion
3096
+ //#region src/services/verification-record.service.d.ts
3097
+ /** Owns durable, redacted evidence. Product surfaces can only read/export it. */
3098
+ declare class VerificationRecordService {
3099
+ private readonly params;
3100
+ private loadPromise;
3101
+ private readonly entries;
3102
+ private mutationQueue;
3103
+ constructor(params: {
3104
+ storePath: string;
3105
+ /**
3106
+ * The Kernel-owned current runtime identity. Generic invocation evidence
3107
+ * obtains its versioned local provenance here; callers never manufacture
3108
+ * a fingerprint from their own observations.
3109
+ */
3110
+ resolveCurrentIdentity?: (appId: string) => Promise<PortableRuntimeAcceptanceEvaluationContext | undefined>;
3111
+ });
3112
+ record: (input: VerificationRecordInput) => Promise<VerificationEvidenceRecord>;
3113
+ list: (filters?: {
3114
+ acceptanceId?: string;
3115
+ appId?: string;
3116
+ limit?: number;
3117
+ }) => Promise<VerificationRecordList>;
3118
+ export: (filters?: Parameters<VerificationRecordService["list"]>[0]) => Promise<string>;
3119
+ private ensureLoaded;
3120
+ private load;
3121
+ private mutate;
3122
+ private save;
3123
+ private trim;
3124
+ private clone;
3125
+ private parseStore;
3126
+ private normalizeInput;
3127
+ private withCurrentIdentity;
3128
+ private normalizeStoredRecord;
3129
+ private normalizeCurrentRecord;
3130
+ private normalizeLegacyRecord;
3131
+ private normalizeBaseRecord;
3132
+ private isNonEmptyString;
3133
+ private isEvidenceSource;
3134
+ private isObservation;
3135
+ private isMemory;
3136
+ private isError;
3137
+ private isMissing;
3138
+ }
3139
+ //#endregion
2558
3140
  //#region src/managers/inbox-delivery.manager.d.ts
2559
3141
  declare const MAX_INBOX_DELIVERY_CONTENT_LENGTH: number;
2560
3142
  type CreateInboxDeliveryInput = {
@@ -2777,8 +3359,86 @@ declare class PreferenceManager {
2777
3359
  private isPlainRecord;
2778
3360
  }
2779
3361
  //#endregion
2780
- //#region src/services/portable-service-runner-client.service.d.ts
2781
- type RunnerOperation = "deliver-event" | "invoke" | "list-actions" | "start-provider" | "start-resident" | "stats" | "stop";
3362
+ //#region src/services/agent-run-client.service.d.ts
3363
+ type AgentRunReplyOptions = {
3364
+ abortSignal?: AbortSignal;
3365
+ onAssistantDelta?: (delta: string) => void;
3366
+ onEvent?: (event: NcpEndpointEvent$1) => void;
3367
+ missingCompletedMessageError?: string;
3368
+ runErrorMessage?: string;
3369
+ };
3370
+ type AgentRunStreamOptions = {
3371
+ abortSignal?: AbortSignal;
3372
+ onEvent?: (event: NcpEndpointEvent$1) => void;
3373
+ };
3374
+ type AgentRunReply = {
3375
+ handle: NcpRunHandle;
3376
+ text: string;
3377
+ completedMessage: NcpMessage$1;
3378
+ };
3379
+ type AgentRunExecution = {
3380
+ handle: NcpRunHandle;
3381
+ events: AsyncIterable<NcpEndpointEvent$1>;
3382
+ result: Promise<AgentRunReply>;
3383
+ cancel: () => Promise<void>;
3384
+ dispose: () => void;
3385
+ };
3386
+ declare class AgentRunClient {
3387
+ private readonly options;
3388
+ constructor(options: {
3389
+ eventBus: Pick<EventBus$1, "on">;
3390
+ ingress: Pick<Ingress$1, "handle">;
3391
+ });
3392
+ send: (input: AgentRunSendIngressPayload) => Promise<NcpRunHandle>;
3393
+ sendAndWaitForReply: (input: AgentRunSendIngressPayload, options?: AgentRunReplyOptions) => Promise<AgentRunReply>;
3394
+ startRun: (input: AgentRunSendIngressPayload, options?: AgentRunReplyOptions) => Promise<AgentRunExecution>;
3395
+ sendAndStreamEvents: (this: AgentRunClient, input: AgentRunSendIngressPayload, options?: AgentRunStreamOptions) => AsyncGenerator<NcpEndpointEvent$1>;
3396
+ private prepareObserver;
3397
+ private sendWithCorrelation;
3398
+ }
3399
+ //#endregion
3400
+ //#region src/types/portable-service-runner-protocol.types.d.ts
3401
+ type RunnerOperation = "cancel-job" | "deliver-event" | "invoke" | "job-status" | "list-actions" | "start-provider" | "start-resident" | "start-job" | "resolve-host-call" | "stats" | "stop";
3402
+ type PortableRunnerJobEvent = {
3403
+ kind: "job-progress";
3404
+ protocolVersion?: string;
3405
+ jobId: string;
3406
+ sequence: number;
3407
+ current?: number;
3408
+ total?: number;
3409
+ message?: string;
3410
+ } | {
3411
+ kind: "stream-chunk";
3412
+ protocolVersion?: string;
3413
+ jobId: string;
3414
+ sequence: number;
3415
+ content: string;
3416
+ } | {
3417
+ kind: "host-call-request";
3418
+ protocolVersion?: string;
3419
+ hostCallId: string;
3420
+ jobId: string;
3421
+ sequence: number;
3422
+ callId: string;
3423
+ traceId: string;
3424
+ appId: string;
3425
+ capability: string;
3426
+ input: unknown;
3427
+ } | {
3428
+ kind: "job-terminal";
3429
+ protocolVersion?: string;
3430
+ jobId: string;
3431
+ sequence: number;
3432
+ status: "succeeded" | "cancelled" | "timed-out" | "failed" | "interrupted";
3433
+ result?: unknown;
3434
+ error?: {
3435
+ code?: string;
3436
+ message?: string;
3437
+ };
3438
+ };
3439
+ type PortableRunnerHostCallRequest = Extract<PortableRunnerJobEvent, {
3440
+ kind: "host-call-request";
3441
+ }>;
2782
3442
  type PortableRunnerObservation = {
2783
3443
  operation: RunnerOperation;
2784
3444
  appId?: string;
@@ -2791,6 +3451,239 @@ type PortableRunnerObservation = {
2791
3451
  logs: string[];
2792
3452
  };
2793
3453
  //#endregion
3454
+ //#region src/services/service-app-job-journal.service.d.ts
3455
+ type ServiceAppJobScope = {
3456
+ appId: string;
3457
+ instanceId: string;
3458
+ stateDirectory: string;
3459
+ };
3460
+ type ServiceAppJobEventSink = {
3461
+ reportProgress: (input: {
3462
+ current?: number;
3463
+ total?: number;
3464
+ message?: string;
3465
+ }) => Promise<ServiceAppJobEvent | undefined>;
3466
+ emitChunk: (content: string) => Promise<ServiceAppJobEvent>;
3467
+ recordTerminal: (input: {
3468
+ status: ServiceAppTerminalJobStatus;
3469
+ error?: {
3470
+ code?: string;
3471
+ message: string;
3472
+ };
3473
+ }) => Promise<ServiceAppJobView>;
3474
+ };
3475
+ /**
3476
+ * The only durable owner for Service App Job state and stream facts.
3477
+ *
3478
+ * A journal belongs to one installed App instance, so user-visible work never
3479
+ * crosses an App's `stateDirectory`. Verification records deliberately stay
3480
+ * elsewhere and only retain redacted acceptance evidence.
3481
+ */
3482
+ declare class ServiceAppJobJournalService {
3483
+ private readonly stores;
3484
+ private readonly loadPromises;
3485
+ private readonly mutationQueues;
3486
+ private readonly lastProgressAt;
3487
+ queue: (scope: ServiceAppJobScope, input: {
3488
+ actionName: string;
3489
+ componentId?: string;
3490
+ callId: string;
3491
+ traceId: string;
3492
+ caller?: ServiceAppJobCaller;
3493
+ retryOf?: string;
3494
+ jobId?: string;
3495
+ }) => Promise<ServiceAppJobView>;
3496
+ get: (scope: ServiceAppJobScope, jobId: string) => Promise<ServiceAppJobView>;
3497
+ list: (scope: ServiceAppJobScope) => Promise<ServiceAppJobList>;
3498
+ watch: (scope: ServiceAppJobScope, jobId: string, afterSequence?: number) => Promise<ServiceAppJobWatch>;
3499
+ transition: (scope: ServiceAppJobScope, jobId: string, status: Exclude<ServiceAppJobStatus, ServiceAppTerminalJobStatus>) => Promise<ServiceAppJobView>;
3500
+ requestCancel: (scope: ServiceAppJobScope, jobId: string) => Promise<ServiceAppJobView>;
3501
+ recordTerminal: (scope: ServiceAppJobScope, jobId: string, input: {
3502
+ status: ServiceAppTerminalJobStatus;
3503
+ error?: {
3504
+ code?: string;
3505
+ message: string;
3506
+ };
3507
+ }) => Promise<ServiceAppJobView>;
3508
+ reportProgress: (scope: ServiceAppJobScope, jobId: string, input: {
3509
+ current?: number;
3510
+ total?: number;
3511
+ message?: string;
3512
+ }) => Promise<ServiceAppJobEvent | undefined>;
3513
+ emitChunk: (scope: ServiceAppJobScope, jobId: string, content: string) => Promise<ServiceAppJobEvent>;
3514
+ createEventSink: (scope: ServiceAppJobScope, jobId: string) => ServiceAppJobEventSink;
3515
+ /** Marks durable in-flight work as interrupted after a host restart. */
3516
+ recoverUnfinished: (scopes: readonly ServiceAppJobScope[]) => Promise<void>;
3517
+ private requireJob;
3518
+ private requireJobFromStore;
3519
+ private assertCanTransition;
3520
+ private assertActive;
3521
+ private appendEvent;
3522
+ private ensureLoaded;
3523
+ private load;
3524
+ private mutate;
3525
+ private save;
3526
+ private requireStore;
3527
+ private toView;
3528
+ private cloneEvent;
3529
+ private isTerminal;
3530
+ private eventBytes;
3531
+ private storePath;
3532
+ private jobKey;
3533
+ private isStore;
3534
+ private isJob;
3535
+ private isEvent;
3536
+ private isMissing;
3537
+ }
3538
+ //#endregion
3539
+ //#region src/types/portable-service-app-runtime.types.d.ts
3540
+ type PortableServiceAppHostCall = {
3541
+ app: ServiceAppRecord;
3542
+ manifest: ServiceAppManifest;
3543
+ request: PortableRunnerHostCallRequest;
3544
+ signal: AbortSignal;
3545
+ jobSignal?: AbortSignal;
3546
+ deferTerminal?: (completion: Promise<void>) => void;
3547
+ job?: {
3548
+ jobId: string;
3549
+ eventSink: ServiceAppJobEventSink;
3550
+ callId?: string;
3551
+ traceId?: string;
3552
+ };
3553
+ };
3554
+ type PortableServiceAppHostCallHandler = (call: PortableServiceAppHostCall) => Promise<unknown>;
3555
+ //#endregion
3556
+ //#region src/services/service-app-ai-capability.service.d.ts
3557
+ type ServiceAppAiCapabilityReadiness = {
3558
+ ready: boolean;
3559
+ requiredMissing: Array<{
3560
+ kind: "model" | "agent";
3561
+ slotId: string;
3562
+ }>;
3563
+ bindings: Array<{
3564
+ kind: "model" | "agent";
3565
+ slotId: string;
3566
+ targetId: string;
3567
+ grantedAt: string;
3568
+ }>;
3569
+ };
3570
+ /**
3571
+ * Product authorization owner for portable Service App AI slots. It is
3572
+ * deliberately runner-agnostic: protocol 0.2 can inject these callbacks
3573
+ * without creating a second binding registry or exposing credentials.
3574
+ */
3575
+ declare class ServiceAppAiCapabilityService {
3576
+ private readonly params;
3577
+ constructor(params: {
3578
+ capabilityGrantManager: CapabilityGrantManager;
3579
+ hasAgent: (agentId: string) => boolean;
3580
+ hasModel: (modelId: string) => boolean;
3581
+ providerManager?: LlmProviderRuntime;
3582
+ llmUsage?: Pick<LlmUsageManager, "observeProviderManager">;
3583
+ agentRunClient?: Pick<AgentRunClient, "startRun">;
3584
+ });
3585
+ inspect: (app: ServiceAppRecord, manifest: ServiceAppManifest) => Promise<ServiceAppAiCapabilityReadiness>;
3586
+ assertReady: (app: ServiceAppRecord, manifest: ServiceAppManifest) => Promise<void>;
3587
+ bindModel: (app: ServiceAppRecord, manifest: ServiceAppManifest, slotId: string, modelId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3588
+ bindAgent: (app: ServiceAppRecord, manifest: ServiceAppManifest, slotId: string, agentId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3589
+ unbind: (app: ServiceAppRecord, manifest: ServiceAppManifest, kind: "model" | "agent", slotId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3590
+ modelComplete: (params: {
3591
+ app: ServiceAppRecord;
3592
+ manifest: ServiceAppManifest;
3593
+ slotId: string;
3594
+ messages: Array<Record<string, unknown>>;
3595
+ maxTokens?: number;
3596
+ signal?: AbortSignal;
3597
+ }) => Promise<_$_nextclaw_core0.LLMResponse>;
3598
+ agentStart: (params: {
3599
+ app: ServiceAppRecord;
3600
+ manifest: ServiceAppManifest;
3601
+ slotId: string;
3602
+ input: AgentRunSendIngressPayload;
3603
+ callId: string;
3604
+ jobId?: string;
3605
+ traceId?: string;
3606
+ signal?: AbortSignal;
3607
+ }) => Promise<AgentRunExecution>;
3608
+ handlePortableHostCall: (call: PortableServiceAppHostCall) => Promise<unknown>;
3609
+ private forwardPortableAgentResult;
3610
+ private listBindings;
3611
+ private requireBoundModel;
3612
+ private requireBoundAgent;
3613
+ private replaceBinding;
3614
+ private requireModelSlot;
3615
+ private requireAgentSlot;
3616
+ private matchesModelGrant;
3617
+ private matchesAgentGrant;
3618
+ private requireProviderRuntime;
3619
+ private clampMaxTokens;
3620
+ private withSlotTimeout;
3621
+ }
3622
+ //#endregion
3623
+ //#region src/services/service-app-resident-event-inbox.service.d.ts
3624
+ type ServiceAppResidentEventScope = {
3625
+ appId: string;
3626
+ instanceId: string;
3627
+ stateDirectory: string;
3628
+ };
3629
+ type ResidentEventInput = {
3630
+ eventId: string;
3631
+ streamKey?: string;
3632
+ payload: Record<string, unknown>;
3633
+ componentId?: string;
3634
+ };
3635
+ type LeasedResidentEvent = ServiceAppResidentEventView & {
3636
+ payload: Record<string, unknown>;
3637
+ };
3638
+ /**
3639
+ * Per installed-App-instance Resident delivery journal. The host owns the
3640
+ * inbox and cursor; the Guest only receives a leased event and returns a
3641
+ * disposition. This deliberately gives at-least-once delivery without
3642
+ * claiming that arbitrary Guest side effects are exactly-once.
3643
+ */
3644
+ declare class ServiceAppResidentEventInboxService {
3645
+ private readonly stores;
3646
+ private readonly loadPromises;
3647
+ private readonly mutationQueues;
3648
+ enqueue: (scope: ServiceAppResidentEventScope, input: ResidentEventInput) => Promise<ServiceAppResidentEventView>;
3649
+ list: (scope: ServiceAppResidentEventScope, params?: {
3650
+ status?: ServiceAppResidentEventStatus;
3651
+ deadLettersOnly?: boolean;
3652
+ }) => Promise<ServiceAppResidentEventList>;
3653
+ /** Reclaim expired leases then lease one item: one Resident means one lane. */
3654
+ leaseNext: (scope: ServiceAppResidentEventScope, params?: {
3655
+ leaseMs?: number;
3656
+ now?: Date;
3657
+ }) => Promise<LeasedResidentEvent | undefined>;
3658
+ acknowledge: (scope: ServiceAppResidentEventScope, eventId: string) => Promise<ServiceAppResidentEventView>;
3659
+ retry: (scope: ServiceAppResidentEventScope, eventId: string, disposition: Extract<ServiceAppResidentEventDisposition, {
3660
+ kind: "retry";
3661
+ }>) => Promise<ServiceAppResidentEventView>;
3662
+ applyDisposition: (scope: ServiceAppResidentEventScope, eventId: string, disposition: ServiceAppResidentEventDisposition) => Promise<ServiceAppResidentEventView>;
3663
+ replayDeadLetter: (scope: ServiceAppResidentEventScope, eventId: string) => Promise<ServiceAppResidentEventView>;
3664
+ freeze: (scope: ServiceAppResidentEventScope) => Promise<void>;
3665
+ resume: (scope: ServiceAppResidentEventScope) => Promise<void>;
3666
+ private assertEventInput;
3667
+ private retryDelay;
3668
+ private clampLease;
3669
+ private transition;
3670
+ private assertLeased;
3671
+ private requireEvent;
3672
+ private requireEventByEventId;
3673
+ private toView;
3674
+ private toLeased;
3675
+ private ensureLoaded;
3676
+ private load;
3677
+ private mutate;
3678
+ private save;
3679
+ private requireStore;
3680
+ private storePath;
3681
+ private readTime;
3682
+ private isMissing;
3683
+ private isStore;
3684
+ private isEvent;
3685
+ }
3686
+ //#endregion
2794
3687
  //#region src/services/service-app-runtime.service.d.ts
2795
3688
  type RuntimeCall = {
2796
3689
  app: ServiceAppRecord;
@@ -2802,7 +3695,10 @@ declare class ServiceAppRuntimeService {
2802
3695
  private readonly protocols;
2803
3696
  constructor(params: {
2804
3697
  getConfig: () => Config;
3698
+ configPath?: string;
3699
+ appHomeDirectory?: string;
2805
3700
  portableServiceRunnerPath?: string;
3701
+ residentInbox?: ServiceAppResidentEventInboxService;
2806
3702
  });
2807
3703
  getStatus: (appId: string) => {
2808
3704
  status: ServiceAppRuntimeStatus;
@@ -2812,22 +3708,194 @@ declare class ServiceAppRuntimeService {
2812
3708
  lastFailedAt?: string;
2813
3709
  };
2814
3710
  getLastObservation: () => PortableRunnerObservation | undefined;
3711
+ /** One kernel-owned callback path for Guest host calls; MCP never receives it. */
3712
+ setPortableHostCallHandler: (handler: PortableServiceAppHostCallHandler | undefined) => void;
2815
3713
  start: (call: RuntimeCall) => Promise<void>;
2816
3714
  listActions: (call: RuntimeCall) => Promise<ServiceAction[]>;
2817
3715
  invokeAction: (call: RuntimeCall & {
2818
3716
  actionName: string;
2819
3717
  input: Record<string, unknown>;
3718
+ job?: {
3719
+ jobId: string;
3720
+ eventSink: ServiceAppJobEventSink;
3721
+ callId?: string;
3722
+ traceId?: string;
3723
+ };
2820
3724
  }) => Promise<unknown>;
2821
3725
  stop: (appId: string) => Promise<void>;
2822
3726
  restart: (appId: string) => Promise<void>;
3727
+ cancelJob: (params: {
3728
+ appId: string;
3729
+ instanceId: string;
3730
+ jobId: string;
3731
+ }) => Promise<void>;
3732
+ enqueueResidentEvent: (call: RuntimeCall & {
3733
+ eventId: string;
3734
+ streamKey?: string;
3735
+ payload: Record<string, unknown>;
3736
+ }) => Promise<ServiceAppResidentEventView>;
2823
3737
  dispose: () => Promise<void>;
2824
3738
  }
2825
3739
  //#endregion
3740
+ //#region src/managers/service-app-job.manager.d.ts
3741
+ type ServiceAppLookup = (appId: string, materializeStorage?: boolean) => Promise<{
3742
+ manifest: ServiceAppManifest;
3743
+ record: ServiceAppRecord;
3744
+ }>;
3745
+ type JobRuntime = {
3746
+ invokeAction: (params: {
3747
+ app: ServiceAppRecord;
3748
+ manifest: ServiceAppManifest;
3749
+ actionName: string;
3750
+ input: Record<string, unknown>;
3751
+ job: {
3752
+ jobId: string;
3753
+ eventSink: ServiceAppJobEventSink;
3754
+ callId: string;
3755
+ traceId: string;
3756
+ };
3757
+ }) => Promise<unknown>;
3758
+ cancelJob?: (params: {
3759
+ appId: string;
3760
+ instanceId: string;
3761
+ jobId: string;
3762
+ }) => Promise<void>;
3763
+ enqueueResidentEvent?: (params: {
3764
+ app: ServiceAppRecord;
3765
+ manifest: ServiceAppManifest;
3766
+ eventId: string;
3767
+ streamKey?: string;
3768
+ payload: Record<string, unknown>;
3769
+ }) => Promise<ServiceAppResidentEventView>;
3770
+ getLastObservation?: () => PortableRunnerObservation | undefined;
3771
+ };
3772
+ declare class ServiceAppJobManager {
3773
+ private readonly params;
3774
+ constructor(params: {
3775
+ journal: ServiceAppJobJournalService;
3776
+ residentInbox: ServiceAppResidentEventInboxService;
3777
+ runtime: JobRuntime;
3778
+ verificationRecords?: VerificationRecordService;
3779
+ requireServiceApp: ServiceAppLookup;
3780
+ listPackageComponentSources: () => Promise<AppPackageComponentSource[]>;
3781
+ });
3782
+ listVerificationRecords: (filters?: {
3783
+ acceptanceId?: string;
3784
+ appId?: string;
3785
+ limit?: number;
3786
+ }) => Promise<VerificationRecordList>;
3787
+ exportVerificationRecords: (filters?: {
3788
+ acceptanceId?: string;
3789
+ appId?: string;
3790
+ limit?: number;
3791
+ }) => Promise<string>;
3792
+ list: (appId: string, caller?: ServiceAppJobCaller) => Promise<ServiceAppJobList>;
3793
+ get: (appId: string, jobId: string, caller?: ServiceAppJobCaller) => Promise<ServiceAppJobView>;
3794
+ watch: (appId: string, jobId: string, afterSequence?: number, caller?: ServiceAppJobCaller) => Promise<ServiceAppJobWatch>;
3795
+ cancel: (appId: string, jobId: string, caller?: ServiceAppJobCaller) => Promise<ServiceAppJobView>;
3796
+ listResidentInbox: (appId: string, deadLettersOnly?: boolean) => Promise<ServiceAppResidentEventList>;
3797
+ replayResidentDeadLetter: (appId: string, eventId: string) => Promise<ServiceAppResidentEventView>;
3798
+ enqueueResidentEvent: (appId: string, input: ResidentEventInput) => Promise<ServiceAppResidentEventView>;
3799
+ create: (params: {
3800
+ record: ServiceAppRecord;
3801
+ actionName: string;
3802
+ callId: string;
3803
+ traceId: string;
3804
+ caller?: ServiceAppJobCaller;
3805
+ retryOf?: string;
3806
+ jobId?: string;
3807
+ }) => Promise<ServiceAppJobView>;
3808
+ createEventSink: (record: ServiceAppRecord, jobId: string) => ServiceAppJobEventSink;
3809
+ invoke: (params: {
3810
+ actionId: string;
3811
+ actionName: string;
3812
+ record: ServiceAppRecord;
3813
+ manifest: ServiceAppManifest;
3814
+ input: Record<string, unknown>;
3815
+ role: "panel" | "agent" | "cli";
3816
+ entrySurface: "panel" | "agent" | "installed-app-cli";
3817
+ }) => Promise<ServiceActionInvokeResult>;
3818
+ private recordInvocation;
3819
+ private requireJobScope;
3820
+ private requireResidentInboxScope;
3821
+ private requireRecordScope;
3822
+ private isVisible;
3823
+ private assertVisible;
3824
+ }
3825
+ //#endregion
2826
3826
  //#region src/services/service-app-record.service.d.ts
3827
+ type ServiceAppStatusReader = {
3828
+ getStatus: (appId: string) => {
3829
+ status: ServiceAppRecord["status"];
3830
+ lastError?: string;
3831
+ lastStartedAt?: string;
3832
+ lastReadyAt?: string;
3833
+ lastFailedAt?: string;
3834
+ };
3835
+ };
2827
3836
  type WorkspaceServiceDataOwner = {
2828
3837
  id: string;
2829
3838
  title: string;
2830
3839
  };
3840
+ declare class ServiceAppRecordService {
3841
+ private readonly params;
3842
+ private readonly instanceStorageService;
3843
+ constructor(params: {
3844
+ getWorkspacePath: () => string;
3845
+ runtimeService: ServiceAppStatusReader;
3846
+ listPackageComponentSources?: () => Promise<AppPackageComponentSource[]>;
3847
+ listWorkspaceDirectoryNames?: (serviceAppsPath: string) => Promise<string[]>;
3848
+ });
3849
+ buildWorkspaceRecord: (serviceAppsPath: string, dirName: string) => Promise<ServiceAppRecord | null>;
3850
+ buildPackageRecord: (source: AppPackageComponentSource) => Promise<ServiceAppRecord | null>;
3851
+ require: (appId: string, materializeStorage?: boolean) => Promise<{
3852
+ manifest: ServiceAppManifest;
3853
+ record: ServiceAppRecord;
3854
+ }>;
3855
+ listValid: () => Promise<Array<{
3856
+ manifest: ServiceAppManifest;
3857
+ record: ServiceAppRecord;
3858
+ }>>;
3859
+ listWorkspaceDataOwners: (serviceAppsPath: string, dirNames: string[]) => Promise<WorkspaceServiceDataOwner[]>;
3860
+ materializeWorkspaceStorage: (serviceId: string) => Promise<AppStorageContext>;
3861
+ inspectWorkspaceStorage: (serviceId: string) => Promise<AppStorageContext | undefined>;
3862
+ fromManifest: (dirPath: string, manifest: ServiceAppManifest, packageSource?: AppPackageComponentSource, storage?: AppStorageContext) => ServiceAppRecord;
3863
+ private failedWorkspaceRecord;
3864
+ private failedPackageRecord;
3865
+ private toTitle;
3866
+ private getWorkspaceInstanceDirectory;
3867
+ private pathExists;
3868
+ private isMissingFileError;
3869
+ }
3870
+ //#endregion
3871
+ //#region src/managers/service-app-ai.manager.d.ts
3872
+ declare class ServiceAppAiManager {
3873
+ private readonly params;
3874
+ constructor(params: {
3875
+ capabilities: ServiceAppAiCapabilityService;
3876
+ records: ServiceAppRecordService;
3877
+ });
3878
+ inspect: (appId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3879
+ bindModel: (appId: string, slotId: string, modelId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3880
+ bindAgent: (appId: string, slotId: string, agentId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3881
+ unbind: (appId: string, kind: "model" | "agent", slotId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3882
+ completeModel: (params: {
3883
+ appId: string;
3884
+ slotId: string;
3885
+ messages: Array<Record<string, unknown>>;
3886
+ maxTokens?: number;
3887
+ signal?: AbortSignal;
3888
+ }) => Promise<_$_nextclaw_core0.LLMResponse>;
3889
+ startAgent: (params: {
3890
+ appId: string;
3891
+ slotId: string;
3892
+ input: AgentRunSendIngressPayload;
3893
+ callId: string;
3894
+ jobId?: string;
3895
+ traceId?: string;
3896
+ signal?: AbortSignal;
3897
+ }) => Promise<AgentRunExecution>;
3898
+ }
2831
3899
  //#endregion
2832
3900
  //#region src/services/service-app-removal.service.d.ts
2833
3901
  type ServiceAppRemovalDiagnostic = {
@@ -2837,7 +3905,7 @@ type ServiceAppRemovalDiagnostic = {
2837
3905
  };
2838
3906
  //#endregion
2839
3907
  //#region src/utils/service-app-error.utils.d.ts
2840
- type ServiceAppErrorCode = "AUTHORIZATION_REQUIRED" | "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_NOT_FOUND" | "SERVICE_APP_READ_FAILED" | "SERVICE_APP_RUNTIME_FAILED" | "WASI_ABI_VERSION_MISMATCH" | "WASI_CAPABILITY_DENIED" | "WASI_COMPONENT_FAILED" | "WASI_COMPONENT_TRAP" | "WASI_GUEST_EXPORT_MISSING" | "WASI_INPUT_SCHEMA_MISMATCH";
3908
+ type ServiceAppErrorCode = "AUTHORIZATION_REQUIRED" | "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_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";
2841
3909
  declare class ServiceAppError extends Error {
2842
3910
  readonly code: ServiceAppErrorCode;
2843
3911
  readonly details?: Record<string, unknown> | undefined;
@@ -2865,19 +3933,40 @@ declare class ServiceAppManager {
2865
3933
  private readonly actionGrants;
2866
3934
  private readonly packageRuntime;
2867
3935
  private readonly lifecycleService;
3936
+ readonly aiCapabilities: ServiceAppAiCapabilityService;
3937
+ private readonly aiManager;
3938
+ private readonly verificationRecords?;
3939
+ private readonly jobJournal;
3940
+ private readonly jobManager;
3941
+ private readonly activationManager;
3942
+ private readonly residentInbox;
2868
3943
  private reconciliationDiagnostics;
2869
3944
  constructor(params: {
3945
+ appHomeDirectory?: string;
2870
3946
  configManager: ConfigManager;
2871
3947
  runtimeService?: ServiceAppRuntime;
2872
3948
  listPackageComponentSources?: () => Promise<AppPackageComponentSource[]>;
2873
3949
  capabilityGrantManager: CapabilityGrantManager;
2874
3950
  hasAgent?: (agentId: string) => boolean;
3951
+ providerManager?: LlmProviderRuntime;
3952
+ llmUsage?: Pick<LlmUsageManager, "observeProviderManager">;
3953
+ agentRunClient?: Pick<AgentRunClient, "startRun">;
2875
3954
  portableServiceRunnerPath?: string;
3955
+ verificationRecords?: VerificationRecordService;
3956
+ jobJournal?: ServiceAppJobJournalService;
3957
+ residentInbox?: ServiceAppResidentEventInboxService;
2876
3958
  });
2877
3959
  start: () => Promise<void>;
2878
3960
  listServiceApps: () => Promise<ServiceAppList>;
2879
3961
  listCapabilityProviders: () => Promise<CapabilityProviderView[]>;
2880
3962
  getServiceApp: (appId: string) => Promise<ServiceAppRecord>;
3963
+ inspectServiceAppAiCapabilities: (appId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3964
+ verifyServiceAppAiCapabilities: (appId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3965
+ bindServiceAppModelSlot: (appId: string, slotId: string, modelId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3966
+ bindServiceAppAgentSlot: (appId: string, slotId: string, agentId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3967
+ unbindServiceAppAiSlot: (appId: string, kind: "model" | "agent", slotId: string) => Promise<ServiceAppAiCapabilityReadiness>;
3968
+ completeServiceAppModelSlot: (params: Parameters<ServiceAppAiManager["completeModel"]>[0]) => Promise<_$_nextclaw_core0.LLMResponse>;
3969
+ startServiceAppAgentSlot: (params: Parameters<ServiceAppAiManager["startAgent"]>[0]) => Promise<AgentRunExecution>;
2881
3970
  listServiceActions: (params?: {
2882
3971
  caller?: ServiceActionCaller;
2883
3972
  appId?: string;
@@ -2885,6 +3974,40 @@ declare class ServiceAppManager {
2885
3974
  }) => Promise<ServiceAction[]>;
2886
3975
  discoverServiceAppActions: (appId: string) => Promise<ServiceAction[]>;
2887
3976
  invokeServiceAction: (actionId: string, request: ServiceActionInvokeRequest) => Promise<ServiceActionInvokeResult>;
3977
+ /**
3978
+ * Calls a Service component belonging to an enabled installed package.
3979
+ * This is deliberately separate from source-tree `nextclaw app call`.
3980
+ */
3981
+ invokeInstalledServiceAction: (appId: string, actionName: string, input?: Record<string, unknown>) => Promise<ServiceActionInvokeResult>;
3982
+ listVerificationRecords: (filters?: {
3983
+ acceptanceId?: string;
3984
+ appId?: string;
3985
+ limit?: number;
3986
+ }) => Promise<VerificationRecordList>;
3987
+ exportVerificationRecords: (filters?: {
3988
+ acceptanceId?: string;
3989
+ appId?: string;
3990
+ limit?: number;
3991
+ }) => Promise<string>;
3992
+ listServiceAppJobs: (appId: string, params?: {
3993
+ caller?: ServiceAppJobCaller;
3994
+ }) => Promise<ServiceAppJobList>;
3995
+ getServiceAppJob: (appId: string, jobId: string, params?: {
3996
+ caller?: ServiceAppJobCaller;
3997
+ }) => Promise<ServiceAppJobView>;
3998
+ watchServiceAppJob: (appId: string, jobId: string, afterSequence?: number, params?: {
3999
+ caller?: ServiceAppJobCaller;
4000
+ }) => Promise<ServiceAppJobWatch>;
4001
+ cancelServiceAppJob: (appId: string, jobId: string, params?: {
4002
+ caller?: ServiceAppJobCaller;
4003
+ }) => Promise<ServiceAppJobView>;
4004
+ listResidentInbox: (appId: string, params?: {
4005
+ deadLettersOnly?: boolean;
4006
+ }) => Promise<ServiceAppResidentEventList>;
4007
+ replayResidentDeadLetter: (appId: string, eventId: string) => Promise<ServiceAppResidentEventView>;
4008
+ enqueueResidentEvent: (appId: string, input: ResidentEventInput) => Promise<ServiceAppResidentEventView>;
4009
+ createServiceAppJob: (params: Parameters<ServiceAppJobManager["create"]>[0]) => Promise<ServiceAppJobView>;
4010
+ createServiceAppJobEventSink: (record: ServiceAppRecord, jobId: string) => ServiceAppJobEventSink;
2888
4011
  grantServiceAction: (actionId: string, request: ServiceActionGrantRequest) => Promise<ServiceActionGrant>;
2889
4012
  grantServiceActions: (actionIds: readonly string[], request: ServiceActionGrantRequest) => Promise<ServiceActionGrant[]>;
2890
4013
  listServiceActionGrants: () => Promise<ServiceActionGrant[]>;
@@ -2902,9 +4025,9 @@ declare class ServiceAppManager {
2902
4025
  private withGrantState;
2903
4026
  private requireServiceAction;
2904
4027
  private requireServiceAppForAction;
2905
- private requireServiceApp;
2906
- private listValidServiceApps;
4028
+ private requireInstalledServiceApp;
2907
4029
  private normalizeActionIds;
4030
+ private toJobScope;
2908
4031
  private getWorkspacePath;
2909
4032
  private getServiceAppsPath;
2910
4033
  private getServiceAppLockPath;
@@ -2912,7 +4035,15 @@ declare class ServiceAppManager {
2912
4035
  private listServiceAppDirNames;
2913
4036
  private isMissingFileError;
2914
4037
  }
2915
- type ServiceAppRuntime = Pick<ServiceAppRuntimeService, "dispose" | "getStatus" | "invokeAction" | "listActions" | "restart" | "stop"> & Pick<Partial<ServiceAppRuntimeService>, "start">; //# sourceMappingURL=service-app.manager.d.ts.map
4038
+ type ServiceAppRuntime = Pick<ServiceAppRuntimeService, "dispose" | "getLastObservation" | "getStatus" | "invokeAction" | "listActions" | "restart" | "stop"> & Pick<Partial<ServiceAppRuntimeService>, "start"> & {
4039
+ cancelJob?: (params: {
4040
+ appId: string;
4041
+ instanceId: string;
4042
+ jobId: string;
4043
+ }) => Promise<void>;
4044
+ enqueueResidentEvent?: ServiceAppRuntimeService["enqueueResidentEvent"];
4045
+ setPortableHostCallHandler?: ServiceAppRuntimeService["setPortableHostCallHandler"];
4046
+ }; //# sourceMappingURL=service-app.manager.d.ts.map
2916
4047
  //#endregion
2917
4048
  //#region src/utils/skill-frontmatter.utils.d.ts
2918
4049
  type LocalizedTextMap = Record<string, string>;
@@ -3046,13 +4177,123 @@ declare class FeatureControlsService {
3046
4177
  get: () => Promise<ProductFeatureControls>;
3047
4178
  }
3048
4179
  //#endregion
4180
+ //#region src/utils/portable-runtime-acceptance-presentation.utils.d.ts
4181
+ /**
4182
+ * The only product-language owner for the portable-runtime acceptance
4183
+ * contract. Every surface receives this projection from the Kernel instead of
4184
+ * carrying a parallel list of PRT ids or translations.
4185
+ */
4186
+ declare const PORTABLE_RUNTIME_ACCEPTANCE_LOCALES: readonly ["zh-CN", "en"];
4187
+ type PortableRuntimeAcceptanceLocale = (typeof PORTABLE_RUNTIME_ACCEPTANCE_LOCALES)[number];
4188
+ type PortableRuntimeAcceptancePresentation = {
4189
+ title: string;
4190
+ description: string;
4191
+ };
4192
+ type PortableRuntimeAcceptancePresentationCatalog = Record<PortableRuntimeAcceptanceLocale, Record<string, string>>;
4193
+ declare const PORTABLE_RUNTIME_ACCEPTANCE_PRESENTATION: PortableRuntimeAcceptancePresentationCatalog;
4194
+ declare function resolvePortableRuntimeAcceptanceLocale(value: unknown): PortableRuntimeAcceptanceLocale;
4195
+ declare function presentPortableRuntimeAcceptanceDefinition(definition: PortableRuntimeAcceptanceDefinition, locale: PortableRuntimeAcceptanceLocale): PortableRuntimeAcceptancePresentation;
4196
+ //#endregion
4197
+ //#region src/services/portable-runtime-acceptance-identity.service.d.ts
4198
+ type PortableRuntimeAcceptanceIdentity = {
4199
+ available: true;
4200
+ context: PortableRuntimeAcceptanceEvaluationContext;
4201
+ runtimeVersionSource: "configured" | "product-version-fallback";
4202
+ runnerFingerprint: string;
4203
+ };
4204
+ type PortableRuntimeAcceptanceUnavailableIdentity = {
4205
+ available: false;
4206
+ reason: string;
4207
+ environment: PortableRuntimeAcceptancePlatform | null;
4208
+ productVersion: string | null;
4209
+ runtimeVersion: string | null;
4210
+ runtimeVersionSource: "configured" | "product-version-fallback" | null;
4211
+ };
4212
+ type PortableRuntimeAcceptanceIdentityResult = PortableRuntimeAcceptanceIdentity | PortableRuntimeAcceptanceUnavailableIdentity;
4213
+ /**
4214
+ * Resolves the identity against which evidence is judged. It deliberately
4215
+ * reads the currently distributed runner rather than deriving identity from a
4216
+ * previous VerificationRecord, so an updated runtime cannot self-certify with
4217
+ * its own old evidence.
4218
+ */
4219
+ declare class PortableRuntimeAcceptanceIdentityService {
4220
+ private readonly params;
4221
+ private cachedRunner;
4222
+ constructor(params: {
4223
+ productVersion?: string;
4224
+ runtimeVersion?: string;
4225
+ portableServiceRunnerPath?: string;
4226
+ platform?: NodeJS.Platform;
4227
+ arch?: string;
4228
+ });
4229
+ resolve: (appId: string) => Promise<PortableRuntimeAcceptanceIdentityResult>;
4230
+ private fingerprintRunner;
4231
+ }
4232
+ declare function normalizePortableRuntimeEnvironment(platform: NodeJS.Platform, arch: string): PortableRuntimeAcceptancePlatform | null;
4233
+ //#endregion
4234
+ //#region src/services/portable-runtime-acceptance-manager.service.d.ts
4235
+ /** The fixed installed App used for the canonical portable-runtime acceptance matrix. */
4236
+ declare const PORTABLE_RUNTIME_ACCEPTANCE_REFERENCE_APP_ID = "nextclaw.github-issue-watcher";
4237
+ type PortableRuntimeAcceptanceContractView = {
4238
+ contractFingerprint: string;
4239
+ locale: PortableRuntimeAcceptanceLocale;
4240
+ definitions: PortableRuntimeAcceptanceDefinitionView[];
4241
+ };
4242
+ type PortableRuntimeAcceptanceDefinitionView = PortableRuntimeAcceptanceDefinition & {
4243
+ presentation: PortableRuntimeAcceptancePresentation;
4244
+ };
4245
+ /**
4246
+ * The evaluator always has a concrete platform. Product status additionally
4247
+ * represents an unavailable identity, where the host may itself be unknown.
4248
+ */
4249
+ type PortableRuntimeAcceptanceSurfaceResult = Omit<PortableRuntimeAcceptanceResult, "environment"> & {
4250
+ environment: PortableRuntimeAcceptancePlatform | null;
4251
+ };
4252
+ type PortableRuntimeAcceptanceStatusEntry = PortableRuntimeAcceptanceDefinitionView & {
4253
+ result: PortableRuntimeAcceptanceSurfaceResult;
4254
+ };
4255
+ type PortableRuntimeAcceptanceStatusView = {
4256
+ schemaVersion: 1;
4257
+ contract: PortableRuntimeAcceptanceContractView;
4258
+ appId: string;
4259
+ identity: PortableRuntimeAcceptanceIdentityResult;
4260
+ entries: PortableRuntimeAcceptanceStatusEntry[];
4261
+ summary: Record<PortableRuntimeAcceptanceResultStatus, number>;
4262
+ };
4263
+ /**
4264
+ * Read-only product projection over the single contract registry and durable
4265
+ * records. No Panel, API route, or CLI command computes an acceptance state.
4266
+ */
4267
+ declare class PortableRuntimeAcceptanceManager {
4268
+ private readonly params;
4269
+ constructor(params: {
4270
+ verificationRecords: VerificationRecordService;
4271
+ identity: PortableRuntimeAcceptanceIdentityService; /** Test-only injection keeps the production source the canonical registry. */
4272
+ definitions?: readonly PortableRuntimeAcceptanceDefinition[];
4273
+ });
4274
+ private get definitions();
4275
+ contract: (locale?: unknown) => PortableRuntimeAcceptanceContractView;
4276
+ status: (params?: {
4277
+ appId?: string;
4278
+ locale?: unknown;
4279
+ }) => Promise<PortableRuntimeAcceptanceStatusView>;
4280
+ export: (params?: {
4281
+ appId?: string;
4282
+ locale?: unknown;
4283
+ }) => Promise<PortableRuntimeAcceptanceStatusView>;
4284
+ private present;
4285
+ private groupEvidence;
4286
+ private unavailableResults;
4287
+ }
4288
+ //#endregion
3049
4289
  //#region src/app/nextclaw-kernel.d.ts
3050
4290
  type NextclawKernelOptions = {
3051
4291
  homeDir?: string;
3052
4292
  configPath?: string;
3053
4293
  builtInAppsDirectory?: string;
3054
4294
  portableServiceRunnerPath?: string;
3055
- productVersion?: string;
4295
+ productVersion?: string; /** Version of the active runtime bundle; local development falls back to productVersion. */
4296
+ runtimeVersion?: string;
3056
4297
  productActivitySink?: ProductActivitySink;
3057
4298
  desktopHost?: DesktopHost;
3058
4299
  };
@@ -3109,6 +4350,8 @@ declare class NextclawKernel {
3109
4350
  readonly observations: ObservationManager;
3110
4351
  readonly capabilityGrants: CapabilityGrantManager;
3111
4352
  readonly featureControls: FeatureControlsService;
4353
+ readonly verificationRecords: VerificationRecordService;
4354
+ readonly portableRuntimeAcceptance: PortableRuntimeAcceptanceManager;
3112
4355
  private readonly capabilityGrantLegacyMigration;
3113
4356
  private readonly ncpAgentSessionJournalStore;
3114
4357
  private readonly contributions;
@@ -3169,44 +4412,6 @@ type BuildAgentRunSendPayloadParams = {
3169
4412
  };
3170
4413
  declare function buildAgentRunSendPayload(params: BuildAgentRunSendPayloadParams): Promise<AgentRunSendIngressPayload>;
3171
4414
  //#endregion
3172
- //#region src/services/agent-run-client.service.d.ts
3173
- type AgentRunReplyOptions = {
3174
- abortSignal?: AbortSignal;
3175
- onAssistantDelta?: (delta: string) => void;
3176
- onEvent?: (event: NcpEndpointEvent$1) => void;
3177
- missingCompletedMessageError?: string;
3178
- runErrorMessage?: string;
3179
- };
3180
- type AgentRunStreamOptions = {
3181
- abortSignal?: AbortSignal;
3182
- onEvent?: (event: NcpEndpointEvent$1) => void;
3183
- };
3184
- type AgentRunReply = {
3185
- handle: NcpRunHandle;
3186
- text: string;
3187
- completedMessage: NcpMessage$1;
3188
- };
3189
- type AgentRunExecution = {
3190
- handle: NcpRunHandle;
3191
- events: AsyncIterable<NcpEndpointEvent$1>;
3192
- result: Promise<AgentRunReply>;
3193
- cancel: () => Promise<void>;
3194
- dispose: () => void;
3195
- };
3196
- declare class AgentRunClient {
3197
- private readonly options;
3198
- constructor(options: {
3199
- eventBus: Pick<EventBus$1, "on">;
3200
- ingress: Pick<Ingress$1, "handle">;
3201
- });
3202
- send: (input: AgentRunSendIngressPayload) => Promise<NcpRunHandle>;
3203
- sendAndWaitForReply: (input: AgentRunSendIngressPayload, options?: AgentRunReplyOptions) => Promise<AgentRunReply>;
3204
- startRun: (input: AgentRunSendIngressPayload, options?: AgentRunReplyOptions) => Promise<AgentRunExecution>;
3205
- sendAndStreamEvents: (this: AgentRunClient, input: AgentRunSendIngressPayload, options?: AgentRunStreamOptions) => AsyncGenerator<NcpEndpointEvent$1>;
3206
- private prepareObserver;
3207
- private sendWithCorrelation;
3208
- }
3209
- //#endregion
3210
4415
  //#region src/features/ncp-dispatch/services/gateway-inbound-processor.service.d.ts
3211
4416
  type GatewayInboundLoopRuntime = {
3212
4417
  kernel: {
@@ -3860,5 +5065,5 @@ declare function resolveLegacyEventType(message: SessionMessage): string;
3860
5065
  declare function getUiContentParamsBootstrapScript(): string;
3861
5066
  declare function injectUiContentParamsBootstrap(html: string): string;
3862
5067
  //#endregion
3863
- 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 AppEventEmitOptions, type AppEventEnvelope, type AppEventHandler, type AppEventKey, AppPackageComponentKind, AppPackageComponentSource, AppPackageComponentSourceList, AppPackageComponentView, AppPackageConflict, AppPackageDependencyBinding, AppPackageDependencyBindingInput, AppPackageDependencyCandidate, AppPackageDependencyView, AppPackageError, AppPackageErrorCode, AppPackageHostTarget, AppPackageList, AppPackageManager, AppPackageOperationAction, AppPackageOperationInput, AppPackageOperationList, AppPackageOperationResult, AppPackageOperationStatus, AppPackageOperationView, AppPackageReadiness, AppPackageReadinessRequirement, AppPackageReadinessStatus, AppPackageRuntimeHooks, AppPackageUnavailableDiagnostic, AppPackageUninstallRollback, AppPackageView, type AssetApi, AutomationManager, AutomationManagerOptions, BindContextInput, type BuildAgentRunSendPayloadParams, BuildContextTailInput, BuiltinNarpRuntimeProviderService, CONTEXT_COMPACTION_CONTINUATION_TEXT, CONTEXT_COMPACTION_PROJECTION_KIND, CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, CONTEXT_COMPACTION_SYSTEM_PREAMBLE, CONTEXT_COMPACTION_TIMELINE_KIND, CapabilityGrant, CapabilityGrantDecision, CapabilityGrantFilter, CapabilityGrantLegacyMigrationService, CapabilityGrantListener, CapabilityGrantManager, CapabilityGrantRequest, CapabilityGrantResource, CapabilityGrantRevocationListener, CapabilityGrantStore, CapabilityGrantSubject, CapabilityProviderView, ChannelManager, ChannelReplyRouterDispatchParams, CommandRegistry, ConfigManager, ConfigManagerOptions, ConfigManagerRuntimeHooks, ConfigMutationResult, ContextBinding, type ContextBlock, ContextCompactionJournalRecoveryService, ContextCompactionModelProjection, ContextCompactionPreflightBeginResult, ContextCompactionPreflightResult, ContextCompactionPreflightService, ContextCompactionTimelineCheckpoint, ContextCompactionTrigger, type ContextProvider, type ContextProviderRequest, Contribution, CreateAgentRunSessionParams, CreateInboxDeliveryInput, CreateProjectInput, 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, LlmProviderManager, LlmProviderRuntime, LlmUsageManager, LlmUsageManagerOptions, LlmUsageRecord, LlmUsageSnapshot, LlmUsageStats, LlmUsageStore, LlmUsageStoreOptions, LlmUsageSummary, LocalizedTextMap, MAX_INBOX_DELIVERY_CONTENT_LENGTH, type McpCatalogFilter, McpManager, type McpServerDefinition, type McpServerRecord, McpServiceAppRuntimeService, type McpToolCallInput, type McpToolCatalogEntry, type ModelChatInput, NARP_HTTP_RUNTIME_KIND, NARP_STDIO_RUNTIME_KIND, NEXTCLAW_TIMELINE_KIND_METADATA_KEY, NcpAgentSessionJournalStore, type NcpEndpointEvent, type NcpMessage, type NcpTool, type NextclawAgentDefinition, type NextclawContributionDescriptor, NextclawHarness, NextclawHarnessError, type NextclawHarnessErrorCode, type NextclawHarnessOptions, NextclawKernel, NextclawKernelOptions, NextclawNcpResolvedAgentProfile, NextclawNcpResolvedRunContext, NextclawNcpRunContextResolveParams, type NextclawRunStatus, type NextclawSessionCreateInput, type NextclawSessionRunInput, type NextclawTaskInput, type NextclawTaskResult, ObservationCapabilityDescriptor, ObservationContextTail, ObservationEvent, ObservationEventAdmissionDecision, ObservationExtensionRuntime, ObservationManager, ObservationManagerOptions, ObservationRef, ObservationRelationshipStatus, ObservationState, ObservationTarget, PANEL_APP_AGENT_CAPABILITIES, PROJECT_TEMPLATE_IDS, PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS, PanelAppAgentCapability, PanelAppAgentGenerateObjectInput, PanelAppAgentGenerateObjectRequest, PanelAppAgentGenerateObjectResult, PanelAppAgentRunClient, PanelAppAgentSendPayload, PanelAppAgentSendRequest, PanelAppAgentSendResult, PanelAppAssetTokenService, PanelAppBridgeSession, PanelAppCapabilityGrant, PanelAppCapabilityGrantCaller, PanelAppClientGrant, PanelAppContent, PanelAppDeleteResult, PanelAppEntry, PanelAppError, PanelAppErrorCode, PanelAppList, PanelAppManager, type PanelAppPreferencesUpdate, PanelServiceActionCaller, type PortableRunnerObservation, PreferenceEntry, PreferenceError, PreferenceErrorCode, PreferenceJsonValue, PreferenceManager, PreferenceManagerOptions, ProductActivityKind, ProductActivitySignal, ProductActivitySink, ProductActivitySource, type ProductFeatureControls, ProjectError, ProjectErrorCode, ProjectManager, ProjectManagerOptions, ProjectRecord, ProjectTemplate, ProjectTemplateId, type ProviderCatalogPlugin, ProviderManagerNcpLLMApi, ProviderModelCatalogEntry, ProviderModelCatalogManager, ProviderModelCatalogSnapshot, ProviderModelsDiscoverInput, type ProviderSpec, ResolvedAgentProfile, ResolvedDesktopApplicationTarget, SERVICE_APP_MANIFEST_FILE_NAME, ServiceAction, ServiceActionCaller, ServiceActionGrant, ServiceActionGrantRequest, ServiceActionGrantState, ServiceActionInvokeRequest, ServiceActionInvokeResult, ServiceActionRisk, ServiceActionRuntimeState, ServiceAppCapabilityProvision, ServiceAppCapabilityRequirement, ServiceAppDeleteResult, ServiceAppError, type ServiceAppErrorCode, ServiceAppExternalRemediation, ServiceAppLifecycle, ServiceAppList, ServiceAppManager, ServiceAppManifest, ServiceAppManifestAction, ServiceAppProtocol, ServiceAppProvides, ServiceAppRecord, ServiceAppRequirements, ServiceAppResourceRequirement, ServiceAppRuntimeService, ServiceAppRuntimeStatus, SessionContextCompactionError, SessionContextCompactionErrorCode, SessionContextCompactionManager, SessionContextCompactionResult, SessionManager, SessionManagerOptions, SessionMessageCursorError, SessionMessagePage, SessionModelTokenUsage, type SessionPendingInput, type SessionQueuedInput, SessionRequestManager, SessionRequestManagerOptions, SessionSettingsError, SessionSettingsPatch, type SessionSteerQueuedInputResult, SessionTokenUsageStatus, SessionTokenUsageSummary, SessionTokenUsageTotals, SkillFrontmatter, type SkillInfo, SkillManager, type SkillScope, SubscribeEventsInput, SystemObjectReferenceError, SystemObjectReferenceErrorCode, SystemObjectReferenceManager, SystemObjectReferenceProvider, SystemObjectReferenceSnapshotSource, type TypedKey, TypedPredicate, UnavailableDesktopHost, UnsignedUpdateManifest, type Unsubscribe, UpdateBlockReason, UpdateHostKind, UpdateManifest, UpdateManifestReader, UpdateProgress, UpdateSnapshot, UpdateStatus, type WorkspaceServiceDataOwner, assertObservationJsonValue, assertObservationPredicate, buildAgentRunSendPayload, buildContextCompactionModelProjection, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildNextclawNcpRunContext, buildObservationEventModelMessage, buildServiceActionId, buildSessionRequestCompletionMessage, capabilityGrantCovers, createAgentRuntimeSessionRequestDispatcher, createAgentRuntimeSessionRequestSourceNotifier, createAssetTools, createCapabilityDeclarationFingerprint, createContextCompactionMessageId, createContextWindowSignature, createCronJobSystemObjectProvider, createDesktopHostError, createInboxDeliverySystemObjectProvider, createLlmUsageRecord, createPanelAppAgentGrantRequest, createPanelAppClientGrantRequest, createServiceActionGrantRequest, createTypedKey, describeAgentRuntimeSessionTypes, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, dispatchPromptOverNcpResult, evaluateObservationEventAdmission, eventKeys, getAutomaticUpdateCheckDelay, getCapabilityGrantKey, getServiceActionName, getServiceAppManifestPath, getUiContentParamsBootstrapScript, getUnsignedUpdateManifest, hasLlmUsageTelemetry, ingressKeys, injectUiContentParamsBootstrap, isAppDataError, isAppPackageError, isContextCompactionProjectionMessage, isContextCompactionTimelineMessage, isContextWindowSnapshot, isInboxDeliveryError, isPanelAppAgentCapability, isPanelAppError, isPreferenceError, isProjectError, isReplyCapableChannel, isServiceAppError, isSessionContextCompactionError, isSessionMessageCursorError, isSessionSettingsError, isSystemObjectReferenceError, listExtensionChannelIds, listServiceAppManifestActions, matchesCapabilityGrantFilter, matchesObservationPredicate, mergeServiceAppRuntimeActions, normalizeAgentRuntimeSessionTypeIcon, normalizeCapabilityGrantRequest, normalizeLlmUsageModel, normalizeOptionalString, parseObservationDuration, parseServiceAppManifest, parseSkillFrontmatter, readContextCompactionCheckpoint, readContextWindowEventSessionId, readJsonPointer, readLatestContextCompactionCheckpoint, readLearningLoopRuntimeConfig, readMetadataModel, readMetadataThinking, readServiceActionTargetId, readServiceAppManifest, resolveAgentRuntimeEntries, resolveAutomaticUpdateCheckIntervalMs, resolveChannelReplyRoute, resolveEffectiveModel, resolveLegacyEventType, resolveSessionChannelContext, runGatewayInboundLoop, runNextclawTask, sanitizeLlmUsage, serializeContextTail, serializeUnsignedUpdateManifest, shouldRefreshContextWindowDuringStream, shouldRefreshContextWindowImmediately, startPromptOverNcpExecution, stripSkillFrontmatter, syncSessionThinkingPreference, toBoundedJson, toNcpMessages, waitForAgentRuntimeSessionReply };
5068
+ 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 AppEventEmitOptions, type AppEventEnvelope, type AppEventHandler, type AppEventKey, 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_PROJECTION_KIND, CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, CONTEXT_COMPACTION_SYSTEM_PREAMBLE, CONTEXT_COMPACTION_TIMELINE_KIND, CapabilityGrant, CapabilityGrantDecision, CapabilityGrantFilter, CapabilityGrantLegacyMigrationService, CapabilityGrantListener, CapabilityGrantManager, CapabilityGrantRequest, CapabilityGrantResource, CapabilityGrantRevocationListener, CapabilityGrantStore, CapabilityGrantSubject, CapabilityProviderView, ChannelManager, ChannelReplyRouterDispatchParams, CommandRegistry, ConfigManager, ConfigManagerOptions, ConfigManagerRuntimeHooks, ConfigMutationResult, ContextBinding, type ContextBlock, ContextCompactionJournalRecoveryService, ContextCompactionModelProjection, ContextCompactionPreflightBeginResult, ContextCompactionPreflightResult, ContextCompactionPreflightService, ContextCompactionTimelineCheckpoint, ContextCompactionTrigger, type ContextProvider, type ContextProviderRequest, Contribution, CreateAgentRunSessionParams, CreateInboxDeliveryInput, CreateProjectInput, 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, LocalizedTextMap, MAX_INBOX_DELIVERY_CONTENT_LENGTH, type McpCatalogFilter, McpManager, type McpServerDefinition, type McpServerRecord, McpServiceAppRuntimeService, type McpToolCallInput, type McpToolCatalogEntry, type ModelChatInput, NARP_HTTP_RUNTIME_KIND, NARP_STDIO_RUNTIME_KIND, NEXTCLAW_TIMELINE_KIND_METADATA_KEY, NcpAgentSessionJournalStore, type NcpEndpointEvent, type NcpMessage, type NcpTool, type NextclawAgentDefinition, type NextclawContributionDescriptor, NextclawHarness, NextclawHarnessError, type NextclawHarnessErrorCode, type NextclawHarnessOptions, NextclawKernel, NextclawKernelOptions, NextclawNcpResolvedAgentProfile, NextclawNcpResolvedRunContext, NextclawNcpRunContextResolveParams, type NextclawRunStatus, type NextclawSessionCreateInput, type NextclawSessionRunInput, type NextclawTaskInput, type NextclawTaskResult, ObservationCapabilityDescriptor, ObservationContextTail, ObservationEvent, ObservationEventAdmissionDecision, ObservationExtensionRuntime, ObservationManager, ObservationManagerOptions, ObservationRef, ObservationRelationshipStatus, ObservationState, ObservationTarget, PANEL_APP_AGENT_CAPABILITIES, PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT, PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT_FINGERPRINT, PORTABLE_RUNTIME_ACCEPTANCE_LOCALES, PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS, PORTABLE_RUNTIME_ACCEPTANCE_PRESENTATION, PORTABLE_RUNTIME_ACCEPTANCE_REFERENCE_APP_ID, PROJECT_TEMPLATE_IDS, 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, 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, ProjectError, ProjectErrorCode, ProjectManager, ProjectManagerOptions, ProjectRecord, ProjectTemplate, ProjectTemplateId, type ProviderCatalogPlugin, ProviderManagerNcpLLMApi, ProviderModelCatalogEntry, ProviderModelCatalogManager, ProviderModelCatalogSnapshot, ProviderModelsDiscoverInput, type ProviderSpec, type ResidentEventInput, ResolvedAgentProfile, ResolvedDesktopApplicationTarget, SERVICE_APP_MANIFEST_FILE_NAME, ServiceAction, ServiceActionCaller, ServiceActionGrant, ServiceActionGrantRequest, ServiceActionGrantState, ServiceActionInvocationFacts, ServiceActionInvokeRequest, ServiceActionInvokeResult, ServiceActionRisk, ServiceActionRuntimeState, ServiceAppAgentCapabilitySlot, ServiceAppAiCapabilityService, ServiceAppCapabilityProvision, ServiceAppCapabilityRequirement, ServiceAppDeleteResult, ServiceAppError, type ServiceAppErrorCode, ServiceAppExternalRemediation, ServiceAppJobCaller, ServiceAppJobChunkEvent, ServiceAppJobEvent, type ServiceAppJobEventSink, ServiceAppJobJournalService, ServiceAppJobList, ServiceAppJobProgressEvent, type ServiceAppJobScope, ServiceAppJobStatus, ServiceAppJobTerminalEvent, ServiceAppJobView, ServiceAppJobWatch, ServiceAppLifecycle, ServiceAppList, ServiceAppManager, ServiceAppManifest, ServiceAppManifestAction, ServiceAppModelCapabilitySlot, ServiceAppProtocol, ServiceAppProvides, ServiceAppRecord, ServiceAppRequirements, ServiceAppResidentEventDisposition, ServiceAppResidentEventInboxService, ServiceAppResidentEventList, type ServiceAppResidentEventScope, ServiceAppResidentEventStatus, ServiceAppResidentEventView, ServiceAppResourceRequirement, ServiceAppRuntimeService, ServiceAppRuntimeStatus, ServiceAppTerminalJobStatus, ServiceAppWitContract, SessionContextCompactionError, SessionContextCompactionErrorCode, SessionContextCompactionManager, SessionContextCompactionResult, SessionManager, SessionManagerOptions, SessionMessageCursorError, SessionMessagePage, SessionModelTokenUsage, type SessionPendingInput, type SessionQueuedInput, SessionRequestManager, SessionRequestManagerOptions, SessionSettingsError, SessionSettingsPatch, type SessionSteerQueuedInputResult, SessionTokenUsageStatus, SessionTokenUsageSummary, SessionTokenUsageTotals, SkillFrontmatter, type SkillInfo, SkillManager, type SkillScope, SubscribeEventsInput, SystemObjectReferenceError, SystemObjectReferenceErrorCode, SystemObjectReferenceManager, SystemObjectReferenceProvider, SystemObjectReferenceSnapshotSource, type TypedKey, TypedPredicate, UnavailableDesktopHost, UnsignedUpdateManifest, type Unsubscribe, UpdateBlockReason, UpdateHostKind, UpdateManifest, UpdateManifestReader, UpdateProgress, UpdateSnapshot, UpdateStatus, VerificationEvidenceRecord, VerificationRecord, VerificationRecordEntrySurface, VerificationRecordError, VerificationRecordInput, VerificationRecordList, VerificationRecordObservation, VerificationRecordRole, VerificationRecordService, VerificationRecordStatus, type WorkspaceServiceDataOwner, assertObservationJsonValue, assertObservationPredicate, buildAgentRunSendPayload, buildContextCompactionModelProjection, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildNextclawNcpRunContext, buildObservationEventModelMessage, buildServiceActionId, buildSessionRequestCompletionMessage, capabilityGrantCovers, createAgentRuntimeSessionRequestDispatcher, createAgentRuntimeSessionRequestSourceNotifier, createAssetTools, createCapabilityDeclarationFingerprint, createContextCompactionMessageId, createContextWindowSignature, createCronJobSystemObjectProvider, createDesktopHostError, createInboxDeliverySystemObjectProvider, createLlmUsageRecord, createPanelAppAgentGrantRequest, createPanelAppClientGrantRequest, createServiceActionGrantRequest, createServiceAppAgentSlotGrantRequest, createServiceAppModelSlotGrantRequest, createTypedKey, describeAgentRuntimeSessionTypes, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, dispatchPromptOverNcpResult, evaluateObservationEventAdmission, evaluatePortableRuntimeAcceptance, evaluatePortableRuntimeAcceptanceArtifact, eventKeys, getAutomaticUpdateCheckDelay, getCapabilityGrantKey, getServiceActionName, getServiceAppManifestPath, getUiContentParamsBootstrapScript, getUnsignedUpdateManifest, hasLlmUsageTelemetry, ingressKeys, injectUiContentParamsBootstrap, isAppDataError, isAppPackageError, isContextCompactionProjectionMessage, isContextCompactionTimelineMessage, isContextWindowSnapshot, isInboxDeliveryError, isPanelAppAgentCapability, isPanelAppError, isPreferenceError, isProjectError, isReplyCapableChannel, isServiceAppError, isSessionContextCompactionError, isSessionMessageCursorError, isSessionSettingsError, isSystemObjectReferenceError, listExtensionChannelIds, listServiceAppManifestActions, matchesCapabilityGrantFilter, matchesObservationPredicate, mergeServiceAppRuntimeActions, normalizeAgentRuntimeSessionTypeIcon, normalizeCapabilityGrantRequest, normalizeLlmUsageModel, normalizeOptionalString, normalizePortableRuntimeEnvironment, parseObservationDuration, parsePortableRuntimeAcceptanceEvidenceArtifact, parseServiceAppManifest, parseSkillFrontmatter, presentPortableRuntimeAcceptanceDefinition, readContextCompactionCheckpoint, readContextWindowEventSessionId, readJsonPointer, readLatestContextCompactionCheckpoint, readLearningLoopRuntimeConfig, readMetadataModel, readMetadataThinking, readServiceActionTargetId, readServiceAppManifest, readServiceAppSlotTarget, resolveAgentRuntimeEntries, resolveAutomaticUpdateCheckIntervalMs, resolveChannelReplyRoute, resolveEffectiveModel, resolveLegacyEventType, resolvePortableRuntimeAcceptanceLocale, resolveSessionChannelContext, runGatewayInboundLoop, runNextclawTask, sanitizeLlmUsage, serializeContextTail, serializeUnsignedUpdateManifest, shouldRefreshContextWindowDuringStream, shouldRefreshContextWindowImmediately, startPromptOverNcpExecution, stripSkillFrontmatter, syncSessionThinkingPreference, toBoundedJson, toNcpMessages, waitForAgentRuntimeSessionReply };
3864
5069
  //# sourceMappingURL=index.d.ts.map