@nextclaw/kernel 0.10.2 → 0.11.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,9 +1,9 @@
1
1
  import { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, getAutomaticUpdateCheckDelay, resolveAutomaticUpdateCheckIntervalMs } from "./utils/automatic-update-check.utils.js";
2
2
  import { a as getUnsignedUpdateManifest, c as UpdateBlockReason, d as UpdateStatus, i as UpdateManifestReader, l as UpdateProgress, n as UpdateHostKind, o as serializeUnsignedUpdateManifest, r as UpdateManifest, s as InstallationKind, t as UnsignedUpdateManifest, u as UpdateSnapshot } from "./update-manifest.types-CQpbURTE.js";
3
- import { BaseChannel, Config, ContextCompactionCheckpoint, ContextCompactionPhase, ContextCompactionPlan, ContextWindowSnapshot, CreateAgentProfileInput, CreateSessionContextInheritanceInput, CreateSessionInput, CreatedSession, CronService, DiagnosticRuntime, EffectiveAgentProfile, ExtensionChannelBinding, ExtensionDiagnostic, ExtensionRegistry, ExtensionUiMetadata, GatewayController, InboundAttachment, InboundMessage, LLMProvider, LLMResponse, LLMResponse as LLMResponse$1, LLMStreamEvent, LLMStreamEvent as LLMStreamEvent$1, McpServerDefinition, McpServerDefinition as McpServerDefinition$1, MessageBus, ModelThinkingCapability, OutboundMessage, ProviderCatalogPlugin, ProviderCatalogPlugin as ProviderCatalogPlugin$1, ProviderModelDiscoveryResult, ProviderSpec, ProviderSpec as ProviderSpec$1, RequestSessionParams, RequestedSkillsMetadataReader, SearchConfig, SessionMessage, SessionRequestDispatcher, SessionRequestRecord, SessionRequestToolResult, SessionSearchService, SkillInfo, SkillInfo as SkillInfo$1, SkillScope, SpawnSessionAndRequestParams, ThinkingLevel, UpdateAgentProfileInput, buildCompressingCompactionCheckpoint, resolveThinkingLevel } from "@nextclaw/core";
3
+ import { BaseChannel, Config, ContextCompactionCheckpoint, ContextCompactionPhase, ContextCompactionPlan, ContextWindowSnapshot, CreateAgentProfileInput, CreateSessionContextInheritanceInput, CreateSessionInput, CreatedSession, CronService, DiagnosticRuntime, EffectiveAgentProfile, ExtensionChannelBinding, ExtensionDiagnostic, ExtensionRegistry, ExtensionUiMetadata, GatewayController, InboundAttachment, InboundMessage, LLMProvider, LLMResponse, LLMResponse as LLMResponse$1, LLMStreamEvent, LLMStreamEvent as LLMStreamEvent$1, 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, SessionRequestToolResult, SessionSearchService, SkillInfo, SkillInfo as SkillInfo$1, SkillScope, SpawnSessionAndRequestParams, ThinkingLevel, UpdateAgentProfileInput, buildCompressingCompactionCheckpoint, resolveThinkingLevel } from "@nextclaw/core";
4
4
  import { ListMessagesOptions, ListSessionsOptions, NcpAgentConversationStateManager, NcpAgentRuntime, NcpContextTail, NcpEndpointEvent, NcpEndpointEvent as NcpEndpointEvent$1, NcpEventType, NcpInputDelivery, NcpJsonValue, NcpLLMApi, NcpLLMApiInput, NcpLLMApiOptions, NcpMessage, NcpMessage as NcpMessage$1, NcpMessagePart, NcpResolvedInputDelivery, NcpRunHandle, NcpRunTriggerInput, NcpSessionApi, NcpSessionMessagePageInfo, NcpSessionPatch, NcpSessionSummary, NcpTool, NcpTool as NcpTool$1, OpenAIChatChunk, OpenAIChatMessage } from "@nextclaw/ncp";
5
- import { AgentRunSendIngressPayload, AppEventEmitOptions, AppEventEnvelope, AppEventHandler, AppEventKey, Contribution as Contribution$1, Disposer, Disposer as Disposer$1, EventBus, EventBus as EventBus$1, EventBusOptions, InboxDelivery, InboxDeliveryContentType, InboxDeliveryListView, InboxDeliverySource, InboxDeliveryStateAction, Ingress, Ingress as Ingress$1, IngressContext, IngressEnvelope, IngressHandler, Key, RuntimeModelSelectionMode, SystemObjectReferenceGroupDescriptor, SystemObjectReferenceItem, SystemObjectReferenceListView, SystemObjectResolvedReference, TypedKey, Unsubscribe, Unsubscribe as Unsubscribe$1, createTypedKey, eventKeys, ingressKeys } from "@nextclaw/shared";
6
5
  import { LocalAssetStore } from "@nextclaw/ncp-agent-runtime";
6
+ 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
7
  import { AgentSessionRecord, ChatTarget, NcpReplyInput, RuntimeFactoryParams } from "@nextclaw/ncp-toolkit";
8
8
  import { AppInstallProgressHandler, AppNativeArtifactTarget, AppPlatformTargetService, AppRollbackResult, AppRuntimeIsolation, AppRuntimeProfile, AppStorageContext, AppStorageUsage, AppUninstallResult, AppUpdateResult } from "@nextclaw/app-runtime";
9
9
  import * as _$_nextclaw_mcp0 from "@nextclaw/mcp";
@@ -331,8 +331,9 @@ declare class ConfigManager {
331
331
  }
332
332
  //#endregion
333
333
  //#region src/managers/agent.manager.d.ts
334
- type ResolvedAgentProfile = EffectiveAgentProfile & {
334
+ type ResolvedAgentProfile = Omit<EffectiveAgentProfile, "maxToolIterations"> & {
335
335
  contextTokens: number;
336
+ maxToolIterations: number;
336
337
  model: string;
337
338
  reservedContextTokens: number;
338
339
  };
@@ -409,6 +410,7 @@ type AgentRunSpec = {
409
410
  agentId: string;
410
411
  model: string;
411
412
  requestedModel: string | null;
413
+ maxToolIterations: number;
412
414
  maxTokens?: number;
413
415
  thinkingEffort?: ThinkingEffort | null;
414
416
  correlationId?: string;
@@ -470,7 +472,7 @@ declare class AgentContextWindowManager {
470
472
  private readonly toolProviderManager;
471
473
  private readonly runInputBudgetBySession;
472
474
  private readonly preflightService;
473
- constructor(agentManager: AgentManager, contextProviderManager: ContextProviderManager, toolProviderManager: ToolProviderManager);
475
+ constructor(agentManager: AgentManager, contextProviderManager: ContextProviderManager, toolProviderManager: ToolProviderManager, assetStore?: LocalAssetStore | null);
474
476
  resolveRunSurface: (request: AgentRunRequest) => Promise<AgentRunSurface>;
475
477
  forgetSession: (sessionId: string) => void;
476
478
  previewSession: (params: {
@@ -506,7 +508,7 @@ type AgentRunContextCompactionInput = {
506
508
  };
507
509
  declare class AgentRunContextCompactionManager {
508
510
  private readonly preflightService;
509
- constructor(agentManager: AgentManager, providerManager: LlmProviderRuntime);
511
+ constructor(agentManager: AgentManager, providerManager: LlmProviderRuntime, assetStore?: LocalAssetStore | null);
510
512
  runPreflight: (input: AgentRunContextCompactionInput) => AsyncIterable<NcpEndpointEvent$1>;
511
513
  runManual: (input: AgentRunContextCompactionInput) => Promise<readonly NcpEndpointEvent$1[]>;
512
514
  private run;
@@ -639,6 +641,14 @@ declare class NcpAgentSessionJournalStore {
639
641
  listSessionSummaries: (options?: {
640
642
  limit?: number;
641
643
  }) => Promise<NcpSessionSummary[]>;
644
+ listSessionSummaryPage: (options: {
645
+ page: number;
646
+ pageSize: number;
647
+ query?: string;
648
+ }) => Promise<{
649
+ sessions: NcpSessionSummary[];
650
+ total: number;
651
+ }>;
642
652
  getSessionSummary: (sessionId: string) => Promise<NcpSessionSummary | null>;
643
653
  listUnfinishedRuns: () => Promise<UnfinishedNcpAgentRun[]>;
644
654
  listSessionMessages: (sessionId: string) => Promise<NcpMessage$1[]>;
@@ -761,6 +771,14 @@ declare class SessionManager implements NcpSessionApi {
761
771
  deleteSession: (sessionId: string) => Promise<void>;
762
772
  getSessionRecord: (sessionId: string) => Promise<AgentSessionRecord | null>;
763
773
  listSessions: (options?: ListSessionsOptions) => Promise<NcpSessionSummary[]>;
774
+ listSessionPage: (options: {
775
+ page: number;
776
+ pageSize: number;
777
+ query?: string;
778
+ }) => Promise<{
779
+ sessions: NcpSessionSummary[];
780
+ total: number;
781
+ }>;
764
782
  listSessionMessages: (sessionId: string, options?: ListMessagesOptions) => Promise<NcpMessage$1[]>;
765
783
  getSessionTokenUsage: (sessionId: string) => Promise<SessionTokenUsageSummary | null>;
766
784
  listSessionMessagePage: (sessionId: string, options: {
@@ -957,6 +975,7 @@ declare class AgentRunRequestManager {
957
975
  private readonly sessionManager;
958
976
  private readonly sessionRunManager;
959
977
  private readonly diagnostics?;
978
+ private readonly executionClaims?;
960
979
  readonly cleanups: Array<() => void>;
961
980
  private readonly observedSessionRuns;
962
981
  private readonly sessionCommandManager;
@@ -964,7 +983,7 @@ declare class AgentRunRequestManager {
964
983
  private readonly runtimeRuns;
965
984
  readonly pendingInputs: AgentRunInputDeliveryService;
966
985
  private started;
967
- constructor(agentRuntimeManager: AgentRuntimeManager, agentManager: AgentManager, configManager: ConfigManager, agentContextWindowManager: AgentContextWindowManager, eventBus: EventBus$1, ingress: Ingress$1, sessionManager: SessionManager, sessionRunManager: SessionRunManager, diagnostics?: Pick<DiagnosticRuntime, "record"> | undefined);
986
+ constructor(agentRuntimeManager: AgentRuntimeManager, agentManager: AgentManager, configManager: ConfigManager, agentContextWindowManager: AgentContextWindowManager, eventBus: EventBus$1, ingress: Ingress$1, sessionManager: SessionManager, sessionRunManager: SessionRunManager, diagnostics?: Pick<DiagnosticRuntime, "record"> | undefined, executionClaims?: LocalExecutionClaimService | undefined);
968
987
  start: () => void;
969
988
  dispose: () => void;
970
989
  private handleSendRequest;
@@ -975,7 +994,10 @@ declare class AgentRunRequestManager {
975
994
  private send;
976
995
  private sendOnce;
977
996
  private startQueuedRun;
997
+ private resolveQueuedRunSpec;
998
+ private claimSessionExecutionOrFail;
978
999
  private startRuntimeRun;
1000
+ private releaseExecutionClaim;
979
1001
  private publishRunStartupFailure;
980
1002
  private startNextQueuedRun;
981
1003
  private observeSessionRun;
@@ -1095,6 +1117,14 @@ type AppPackageComponentSource = {
1095
1117
  runtimeProfile: AppRuntimeProfile;
1096
1118
  isolation: AppRuntimeIsolation;
1097
1119
  };
1120
+ type AppPackageUnavailableDiagnostic = {
1121
+ appId: string;
1122
+ message: string;
1123
+ };
1124
+ type AppPackageComponentSourceList = {
1125
+ sources: AppPackageComponentSource[];
1126
+ unavailablePackages: AppPackageUnavailableDiagnostic[];
1127
+ };
1098
1128
  type AppPackageComponentView = AppPackageComponentSource & {
1099
1129
  title?: string;
1100
1130
  description?: string;
@@ -1182,10 +1212,11 @@ type AppPackageConflict = {
1182
1212
  componentKind: AppPackageComponentKind;
1183
1213
  conflictingSource: string;
1184
1214
  };
1215
+ type AppPackageUninstallRollback = () => Promise<void>;
1185
1216
  type AppPackageRuntimeHooks = {
1186
1217
  assertCanActivate: (sources: AppPackageComponentSource[]) => Promise<void>;
1187
1218
  beforeDeactivate: (sources: AppPackageComponentSource[]) => Promise<void>;
1188
- beforeUninstall: (sources: AppPackageComponentSource[]) => Promise<void>;
1219
+ beforeUninstall: (sources: AppPackageComponentSource[]) => Promise<AppPackageUninstallRollback | void>;
1189
1220
  };
1190
1221
  type AppPackageErrorCode = "APP_PACKAGE_CONFLICT" | "APP_PACKAGE_INCOMPATIBLE" | "APP_PACKAGE_NOT_FOUND" | "APP_PACKAGE_OPERATION_FAILED";
1191
1222
  declare class AppPackageError extends Error {
@@ -1224,6 +1255,7 @@ declare class AppPackageManager {
1224
1255
  }>>;
1225
1256
  getPackage: (appId: string) => Promise<AppPackageView>;
1226
1257
  listActiveComponentSources: () => Promise<AppPackageComponentSource[]>;
1258
+ listActiveComponentSourcesWithDiagnostics: () => Promise<AppPackageComponentSourceList>;
1227
1259
  listOperations: () => Promise<AppPackageOperationList>;
1228
1260
  startOperation: (input: AppPackageOperationInput) => Promise<AppPackageOperationView>;
1229
1261
  install: (source: string, registryUrl?: string, onProgress?: AppInstallProgressHandler) => Promise<AppPackageView>;
@@ -1315,20 +1347,570 @@ declare class AppDataManager {
1315
1347
  }>>;
1316
1348
  listWorkspaceDataOwners: () => Promise<WorkspaceDataOwner[]>;
1317
1349
  });
1318
- start: () => Promise<void>;
1319
- list: () => Promise<AppDataList>;
1320
- deleteRetained: (dataId: string, confirmAppId: string) => Promise<AppDataDeleteResult>;
1321
- private deletePackageData;
1322
- private deleteWorkspaceData;
1323
- private toEntry;
1324
- private createDataId;
1325
- private parseDataId;
1326
- private isPackageActive;
1327
- private isWorkspaceServiceActive;
1328
- private getWorkspaceInstancesRoot;
1329
- private workspaceScope;
1330
- private rethrowMissing;
1331
- private isMissingFileError;
1350
+ start: () => Promise<void>;
1351
+ list: () => Promise<AppDataList>;
1352
+ deleteRetained: (dataId: string, confirmAppId: string) => Promise<AppDataDeleteResult>;
1353
+ private deletePackageData;
1354
+ private deleteWorkspaceData;
1355
+ private toEntry;
1356
+ private createDataId;
1357
+ private parseDataId;
1358
+ private isPackageActive;
1359
+ private isWorkspaceServiceActive;
1360
+ private getWorkspaceInstancesRoot;
1361
+ private workspaceScope;
1362
+ private rethrowMissing;
1363
+ private isMissingFileError;
1364
+ }
1365
+ //#endregion
1366
+ //#region src/features/capability-grants/types/capability-grant.types.d.ts
1367
+ type CapabilityGrantSubject = {
1368
+ type: string;
1369
+ id: string;
1370
+ };
1371
+ type CapabilityGrantResource = {
1372
+ type: string;
1373
+ target: unknown;
1374
+ };
1375
+ type CapabilityGrantRequest = {
1376
+ subject: CapabilityGrantSubject;
1377
+ resource: CapabilityGrantResource;
1378
+ access: string[];
1379
+ declarationFingerprint: string;
1380
+ };
1381
+ type CapabilityGrant = CapabilityGrantRequest & {
1382
+ grantedAt: string;
1383
+ lastUsedAt?: string;
1384
+ };
1385
+ type CapabilityGrantFilter = {
1386
+ subject?: Partial<CapabilityGrantSubject>;
1387
+ resourceType?: string;
1388
+ target?: unknown;
1389
+ access?: string[];
1390
+ };
1391
+ type CapabilityGrantDecision = {
1392
+ granted: true;
1393
+ grant: CapabilityGrant;
1394
+ } | {
1395
+ granted: false;
1396
+ reason: "authorization_required";
1397
+ };
1398
+ //#endregion
1399
+ //#region src/features/capability-grants/managers/capability-grant.manager.d.ts
1400
+ type CapabilityGrantListener = (grants: CapabilityGrant[]) => void | Promise<void>;
1401
+ type CapabilityGrantRevocationListener = CapabilityGrantListener;
1402
+ declare class CapabilityGrantManager {
1403
+ private readonly store;
1404
+ private readonly grantListeners;
1405
+ private readonly revocationListeners;
1406
+ constructor(storePath: string);
1407
+ check: (request: CapabilityGrantRequest) => Promise<CapabilityGrantDecision>;
1408
+ require: (request: CapabilityGrantRequest) => Promise<CapabilityGrant>;
1409
+ grant: (request: CapabilityGrantRequest, grantedAt?: string) => Promise<CapabilityGrant>;
1410
+ list: (filter?: CapabilityGrantFilter) => Promise<CapabilityGrant[]>;
1411
+ revoke: (filter: CapabilityGrantFilter) => Promise<CapabilityGrant[]>;
1412
+ revokeMatching: (matches: (grant: CapabilityGrant) => boolean) => Promise<CapabilityGrant[]>;
1413
+ import: (grants: CapabilityGrant[]) => Promise<void>;
1414
+ replace: (grants: CapabilityGrant[]) => Promise<void>;
1415
+ onGranted: (listener: CapabilityGrantListener) => (() => void);
1416
+ onRevoked: (listener: CapabilityGrantRevocationListener) => (() => void);
1417
+ }
1418
+ //#endregion
1419
+ //#region src/features/capability-grants/services/capability-grant-legacy-migration.service.d.ts
1420
+ declare class CapabilityGrantLegacyMigrationService {
1421
+ private readonly params;
1422
+ private readonly sources;
1423
+ constructor(params: {
1424
+ capabilityGrantManager: CapabilityGrantManager;
1425
+ markerPath: string;
1426
+ validateGrant: (grant: CapabilityGrant) => Promise<boolean>;
1427
+ workspacePath: string;
1428
+ });
1429
+ migrate: () => Promise<void>;
1430
+ private readSources;
1431
+ private assertImported;
1432
+ private restore;
1433
+ }
1434
+ //#endregion
1435
+ //#region src/features/capability-grants/stores/capability-grant.store.d.ts
1436
+ declare class CapabilityGrantStore {
1437
+ private readonly storePath;
1438
+ private writeQueue;
1439
+ constructor(storePath: string);
1440
+ read: () => Promise<CapabilityGrant[]>;
1441
+ replace: (grants: CapabilityGrant[]) => Promise<void>;
1442
+ mutateGrants: (update: (grants: CapabilityGrant[]) => CapabilityGrant[]) => Promise<CapabilityGrant[]>;
1443
+ private mutate;
1444
+ private load;
1445
+ private save;
1446
+ }
1447
+ //#endregion
1448
+ //#region src/features/capability-grants/utils/capability-grant.utils.d.ts
1449
+ declare function normalizeCapabilityGrantRequest(request: CapabilityGrantRequest): CapabilityGrantRequest;
1450
+ declare function createCapabilityDeclarationFingerprint(value: unknown): string;
1451
+ declare function getCapabilityGrantKey(request: CapabilityGrantRequest): string;
1452
+ declare function capabilityGrantCovers(grant: CapabilityGrant, request: CapabilityGrantRequest): boolean;
1453
+ declare function matchesCapabilityGrantFilter(grant: CapabilityGrant, filter: CapabilityGrantFilter): boolean;
1454
+ //#endregion
1455
+ //#region src/types/service-app.types.d.ts
1456
+ type ServiceAppProtocol = "mcp";
1457
+ type ServiceActionRisk = "read" | "write" | "external" | "dangerous";
1458
+ type ServiceAppRuntimeStatus = "idle" | "starting" | "running" | "failed" | "stopped";
1459
+ type ServiceAppManifestAction = {
1460
+ risk?: ServiceActionRisk;
1461
+ title?: string;
1462
+ description?: string;
1463
+ inputSchema?: Record<string, unknown>;
1464
+ };
1465
+ type ServiceAppManifest = {
1466
+ id: string;
1467
+ title: string;
1468
+ description?: string;
1469
+ enabled: boolean;
1470
+ protocol: ServiceAppProtocol;
1471
+ command: string;
1472
+ args: string[];
1473
+ actions: Record<string, ServiceAppManifestAction>;
1474
+ };
1475
+ type ServiceAppRecord = {
1476
+ id: string;
1477
+ title: string;
1478
+ description?: string;
1479
+ dirPath: string;
1480
+ manifestPath: string;
1481
+ command?: string;
1482
+ args?: string[];
1483
+ cwd: string;
1484
+ enabled: boolean;
1485
+ protocol: ServiceAppProtocol;
1486
+ status: ServiceAppRuntimeStatus;
1487
+ lastError?: string;
1488
+ lastStartedAt?: string;
1489
+ lastReadyAt?: string;
1490
+ lastFailedAt?: string;
1491
+ sourceKind?: "workspace" | "package";
1492
+ packageId?: string;
1493
+ packageVersion?: string;
1494
+ packageDirectory?: string;
1495
+ dataDirectory?: string;
1496
+ instanceId?: string;
1497
+ storage?: AppStorageContext;
1498
+ isolation?: AppRuntimeIsolation;
1499
+ };
1500
+ type ServiceActionGrantState = "granted" | "not-granted" | "not-declared";
1501
+ type ServiceActionRuntimeState = "matched" | "missing" | "undeclared";
1502
+ type ServiceAction = {
1503
+ id: string;
1504
+ appId: string;
1505
+ name: string;
1506
+ title?: string;
1507
+ description?: string;
1508
+ inputSchema?: Record<string, unknown>;
1509
+ risk: ServiceActionRisk;
1510
+ runtimeState?: ServiceActionRuntimeState;
1511
+ grantState?: ServiceActionGrantState;
1512
+ };
1513
+ type ServiceActionCaller = {
1514
+ surface: "panel-app";
1515
+ appId: string;
1516
+ };
1517
+ type ServiceActionGrant = {
1518
+ caller: ServiceActionCaller;
1519
+ actionId: string;
1520
+ risk: ServiceActionRisk;
1521
+ grantedAt: string;
1522
+ };
1523
+ type ServiceActionInvokeRequest = {
1524
+ caller: ServiceActionCaller;
1525
+ declaredActions: string[];
1526
+ input?: Record<string, unknown>;
1527
+ };
1528
+ type ServiceActionInvokeResult = {
1529
+ actionId: string;
1530
+ result: unknown;
1531
+ };
1532
+ type ServiceActionGrantRequest = {
1533
+ caller: ServiceActionCaller;
1534
+ declaredActions: string[];
1535
+ };
1536
+ //#endregion
1537
+ //#region src/types/panel-app.types.d.ts
1538
+ type PanelAppEntry = {
1539
+ id: string;
1540
+ appId: string;
1541
+ fileName: string;
1542
+ kind: "single-file" | "folder";
1543
+ title: string;
1544
+ description?: string;
1545
+ icon?: string;
1546
+ contentPath: string;
1547
+ createdAt: string;
1548
+ updatedAt: string;
1549
+ sizeBytes: number;
1550
+ favorite: boolean;
1551
+ mainSidebar: boolean;
1552
+ mainSidebarOrder?: number;
1553
+ clientDeclared: boolean;
1554
+ clientGranted: boolean;
1555
+ lastOpenedAt?: string;
1556
+ openCount: number;
1557
+ sourceKind: "workspace" | "package";
1558
+ packageId?: string;
1559
+ packageVersion?: string;
1560
+ };
1561
+ type PanelAppList = {
1562
+ workspacePath: string;
1563
+ panelsPath: string;
1564
+ entries: PanelAppEntry[];
1565
+ unavailablePackages: Array<{
1566
+ appId: string;
1567
+ message: string;
1568
+ }>;
1569
+ };
1570
+ type PanelAppContent = {
1571
+ id: string;
1572
+ appId: string;
1573
+ fileName: string;
1574
+ html: string;
1575
+ contentType: "text/html; charset=utf-8";
1576
+ capabilities: string[];
1577
+ clientDeclared: boolean;
1578
+ clientGranted: boolean;
1579
+ serviceActions: string[];
1580
+ };
1581
+ type PanelAppDeleteResult = {
1582
+ deleted: true;
1583
+ fileName: string;
1584
+ id: string;
1585
+ };
1586
+ type PanelAppBridgeSession = {
1587
+ id: string;
1588
+ token: string;
1589
+ appId: string;
1590
+ caller: ServiceActionCaller;
1591
+ declaredCapabilities: string[];
1592
+ declaredActions: string[];
1593
+ clientDeclared: boolean;
1594
+ createdAt: string;
1595
+ expiresAt: string;
1596
+ };
1597
+ type PanelAppErrorCode = "AGENT_OBJECT_REQUEST_FAILED" | "AGENT_OBJECT_RESULT_NOT_SUBMITTED" | "AGENT_OBJECT_RESULT_SCHEMA_INVALID" | "AGENT_OBJECT_RESULT_TIMEOUT" | "AUTHORIZATION_REQUIRED" | "PANEL_APP_AGENT_REQUEST_INVALID" | "PANEL_APP_ASSET_TOKEN_EXPIRED" | "PANEL_APP_ASSET_TOKEN_INVALID" | "PANEL_APP_BRIDGE_SESSION_NOT_FOUND" | "PANEL_APP_CAPABILITY_NOT_DECLARED" | "PANEL_APP_CLIENT_NOT_DECLARED" | "PANEL_APP_INVALID_ASSET_PATH" | "PANEL_APP_INVALID_ID" | "PANEL_APP_INVALID_SOURCE_PATH" | "PANEL_APP_MANIFEST_INVALID" | "PANEL_APP_MANAGED_SOURCE" | "PANEL_APP_NOT_FOUND" | "PANEL_APP_READ_FAILED";
1598
+ declare class PanelAppError extends Error {
1599
+ readonly code: PanelAppErrorCode;
1600
+ constructor(code: PanelAppErrorCode, message: string);
1601
+ }
1602
+ declare function isPanelAppError(error: unknown): error is PanelAppError;
1603
+ declare const PANEL_APP_AGENT_CAPABILITIES: readonly ["agent:send", "agent:generateObject"];
1604
+ type PanelAppAgentCapability = typeof PANEL_APP_AGENT_CAPABILITIES[number];
1605
+ declare function isPanelAppAgentCapability(value: unknown): value is PanelAppAgentCapability;
1606
+ type PanelAppClientGrant = {
1607
+ appId: string;
1608
+ grantedAt: string;
1609
+ };
1610
+ type PanelAppCapabilityGrantCaller = {
1611
+ surface: "panel-app";
1612
+ appId: string;
1613
+ };
1614
+ type PanelAppCapabilityGrant = {
1615
+ caller: PanelAppCapabilityGrantCaller;
1616
+ capability: PanelAppAgentCapability;
1617
+ grantedAt: string;
1618
+ };
1619
+ type PanelAppAgentSendPayload = {
1620
+ sessionId?: string;
1621
+ peerId?: string;
1622
+ content: NcpMessagePart[];
1623
+ message?: never;
1624
+ metadata?: Record<string, unknown>;
1625
+ } | {
1626
+ sessionId?: string;
1627
+ peerId?: string;
1628
+ message: NcpMessage$1 | (Omit<NcpMessage$1, "sessionId"> & {
1629
+ sessionId?: string;
1630
+ });
1631
+ content?: never;
1632
+ metadata?: Record<string, unknown>;
1633
+ };
1634
+ type PanelAppAgentSendRequest = {
1635
+ payload: PanelAppAgentSendPayload;
1636
+ };
1637
+ type PanelAppAgentSendResult = NcpRunHandle;
1638
+ type PanelAppAgentRunClient = {
1639
+ send: (input: AgentRunSendIngressPayload) => Promise<NcpRunHandle>;
1640
+ sendAndStreamEvents: (input: AgentRunSendIngressPayload) => AsyncGenerator<NcpEndpointEvent$1>;
1641
+ };
1642
+ type PanelAppAgentGenerateObjectInput = {
1643
+ peerId: string;
1644
+ prompt: string;
1645
+ context?: unknown;
1646
+ schema: Record<string, unknown>;
1647
+ title?: string;
1648
+ timeoutMs?: number;
1649
+ };
1650
+ type PanelAppAgentGenerateObjectRequest = {
1651
+ input: PanelAppAgentGenerateObjectInput;
1652
+ };
1653
+ type PanelAppAgentGenerateObjectResult = {
1654
+ result: unknown;
1655
+ };
1656
+ //#endregion
1657
+ //#region src/features/capability-grants/utils/capability-grant-resource.utils.d.ts
1658
+ declare function createPanelAppClientGrantRequest(appId: string): CapabilityGrantRequest;
1659
+ declare function createPanelAppAgentGrantRequest(caller: ServiceActionCaller, capability: PanelAppAgentCapability): CapabilityGrantRequest;
1660
+ declare function createServiceActionGrantRequest(caller: ServiceActionCaller, action: ServiceAction): CapabilityGrantRequest;
1661
+ declare function readServiceActionTargetId(target: unknown): string | null;
1662
+ //#endregion
1663
+ //#region src/features/desktop-host/types/desktop-host.types.d.ts
1664
+ declare const DESKTOP_HOST_PROTOCOL_VERSION: 1;
1665
+ declare const DESKTOP_HOST_ACCESS: readonly ["ui.read", "ui.observe", "ui.write", "screen.capture-window", "input.keyboard", "input.pointer"];
1666
+ type DesktopHostAccess = typeof DESKTOP_HOST_ACCESS[number];
1667
+ type DesktopApplicationTarget = {
1668
+ applicationId: string;
1669
+ };
1670
+ type ResolvedDesktopApplicationTarget = {
1671
+ platform: "darwin";
1672
+ applicationId: string;
1673
+ bundleId: string;
1674
+ } | {
1675
+ platform: "win32";
1676
+ applicationId: string;
1677
+ appUserModelId?: string;
1678
+ executableIdentity?: string;
1679
+ } | {
1680
+ platform: "linux";
1681
+ applicationId: string;
1682
+ desktopFileId?: string;
1683
+ executableIdentity?: string;
1684
+ };
1685
+ type DesktopHostCaller = {
1686
+ extensionId?: string;
1687
+ agentId?: string;
1688
+ sessionId?: string;
1689
+ agentRunId?: string;
1690
+ subscriptionId?: string;
1691
+ };
1692
+ type DesktopHostMethod = "host.hello" | "host.status" | "host.application.resolve" | "host.permissions.get" | "host.permissions.request" | "host.permissions.openSettings" | "host.ui.snapshot" | "host.ui.action" | "host.ui.observe" | "host.ui.unobserve" | "host.screen.captureWindow" | "host.input.click" | "host.input.typeText" | "host.input.pressKey";
1693
+ type DesktopHostRequest = {
1694
+ protocolVersion: typeof DESKTOP_HOST_PROTOCOL_VERSION;
1695
+ requestId: string;
1696
+ token: string;
1697
+ method: DesktopHostMethod;
1698
+ caller: DesktopHostCaller;
1699
+ payload: unknown;
1700
+ };
1701
+ type DesktopHostResponse = {
1702
+ protocolVersion: typeof DESKTOP_HOST_PROTOCOL_VERSION;
1703
+ requestId: string;
1704
+ ok: boolean;
1705
+ result?: unknown;
1706
+ error?: DesktopCapabilityError;
1707
+ };
1708
+ type DesktopHostEvent = {
1709
+ protocolVersion: typeof DESKTOP_HOST_PROTOCOL_VERSION;
1710
+ type: "host.event";
1711
+ watchId: string;
1712
+ event: unknown;
1713
+ };
1714
+ type DesktopHostStatus = {
1715
+ online: boolean;
1716
+ platform?: NodeJS.Platform;
1717
+ protocolVersion?: number;
1718
+ supportedAccess: DesktopHostAccess[];
1719
+ supportedOperations: DesktopHostMethod[];
1720
+ permissions: {
1721
+ accessibility: "granted" | "not_granted" | "not_supported" | "unknown";
1722
+ screenCapture: "granted" | "not_granted" | "not_supported" | "unknown";
1723
+ };
1724
+ };
1725
+ type DesktopCapabilityErrorCode = "desktop_host_unavailable" | "desktop_host_protocol_mismatch" | "unsupported_platform" | "permission_not_granted" | "capability_not_declared" | "authorization_required" | "authorization_denied" | "target_not_running" | "window_not_found" | "element_not_found" | "stale_target" | "operation_not_supported" | "payload_limit_exceeded" | "host_operation_failed";
1726
+ type DesktopCapabilityError = {
1727
+ code: DesktopCapabilityErrorCode;
1728
+ message: string;
1729
+ recovery?: {
1730
+ action: "open_settings" | "start_desktop" | "show_authorization" | "refresh_target" | "update_desktop";
1731
+ };
1732
+ request?: unknown;
1733
+ };
1734
+ type DesktopHostCapabilityDeclaration = {
1735
+ access: DesktopHostAccess[];
1736
+ };
1737
+ type DesktopHostManifest = {
1738
+ id: string;
1739
+ contributes?: {
1740
+ hostCapabilities?: {
1741
+ desktopAutomation?: DesktopHostCapabilityDeclaration;
1742
+ };
1743
+ };
1744
+ };
1745
+ //#endregion
1746
+ //#region src/features/desktop-host/services/desktop-host.service.d.ts
1747
+ type DesktopHostEventListener = (event: DesktopHostEvent) => void;
1748
+ /**
1749
+ * The Kernel-facing boundary for the local desktop host. A runtime host owns
1750
+ * its platform implementation; the Kernel owns grants and caller identity.
1751
+ */
1752
+ type DesktopHost = {
1753
+ status: () => Promise<DesktopHostStatus>;
1754
+ invoke: <T>(method: DesktopHostMethod, payload: Record<string, unknown>, caller: DesktopHostCaller) => Promise<T>;
1755
+ onEvent: (listener: DesktopHostEventListener) => () => void;
1756
+ dispose: () => Promise<void>;
1757
+ };
1758
+ declare function createDesktopHostError(error: DesktopCapabilityError): Error;
1759
+ /** Used by short-lived Kernel entry points which do not own a local host. */
1760
+ declare class UnavailableDesktopHost implements DesktopHost {
1761
+ status: () => Promise<DesktopHostStatus>;
1762
+ invoke: <T>() => Promise<T>;
1763
+ onEvent: () => (() => void);
1764
+ dispose: () => Promise<void>;
1765
+ }
1766
+ //#endregion
1767
+ //#region src/features/desktop-host/managers/desktop-host-capability.manager.d.ts
1768
+ declare class DesktopHostCapabilityManager {
1769
+ private readonly options;
1770
+ private readonly watches;
1771
+ private readonly removeEventListener;
1772
+ private readonly removeGrantListener;
1773
+ private readonly removeRevocationListener;
1774
+ constructor(options: {
1775
+ capabilityGrantManager: CapabilityGrantManager;
1776
+ host: DesktopHost;
1777
+ findManifest: (extensionId: string) => DesktopHostManifest;
1778
+ hasAgent?: (agentId: string) => boolean;
1779
+ onAuthorizationRequired?: (input: {
1780
+ applicationId: string;
1781
+ caller: DesktopHostCaller;
1782
+ request: CapabilityGrantRequest;
1783
+ }) => void;
1784
+ onEvent?: (input: {
1785
+ extensionId: string;
1786
+ generation: string;
1787
+ watchId: string;
1788
+ event: unknown;
1789
+ }) => void;
1790
+ onObservationAuthorizationRevoked?: (input: {
1791
+ extensionId: string;
1792
+ subscriptionId: string;
1793
+ }) => Promise<void>;
1794
+ onObservationAuthorizationGranted?: (input: {
1795
+ extensionId: string;
1796
+ }) => Promise<void>;
1797
+ });
1798
+ status: () => Promise<DesktopHostStatus>;
1799
+ getPermissions: () => Promise<DesktopHostStatus["permissions"]>;
1800
+ requestPermissions: () => Promise<DesktopHostStatus["permissions"]>;
1801
+ openPermissionSettings: () => Promise<{
1802
+ opened: boolean;
1803
+ }>;
1804
+ grantAccess: (request: CapabilityGrantRequest) => Promise<CapabilityGrant>;
1805
+ invoke: <T>(input: {
1806
+ extensionId: string;
1807
+ generation: string;
1808
+ method: DesktopHostMethod;
1809
+ payload: Record<string, unknown>;
1810
+ caller?: Omit<DesktopHostCaller, "extensionId">;
1811
+ }) => Promise<T>;
1812
+ private invokeUnscopedExtensionMethod;
1813
+ invokeAgent: <T>(input: {
1814
+ agentId: string;
1815
+ sessionId: string;
1816
+ agentRunId?: string;
1817
+ source?: "legacy-tool" | "desktop";
1818
+ method: "host.status" | "host.ui.snapshot" | "host.screen.captureWindow" | "host.ui.action" | "host.input.click" | "host.input.typeText" | "host.input.pressKey";
1819
+ payload: Record<string, unknown>;
1820
+ }) => Promise<T>;
1821
+ releaseExtensionWatches: (extensionId: string, generation?: string) => Promise<void>;
1822
+ private validateGrantRequest;
1823
+ private removeWatch;
1824
+ private requireGrant;
1825
+ private requireAgentGrant;
1826
+ private requireKnownAgent;
1827
+ stop: () => Promise<void>;
1828
+ dispose: () => Promise<void>;
1829
+ private releaseAllWatches;
1830
+ }
1831
+ //#endregion
1832
+ //#region src/features/desktop-host/services/desktop-node-repl.service.d.ts
1833
+ /**
1834
+ * Codex-style code entry point: a session-scoped REPL worker receives a small
1835
+ * desktop SDK and no host Node.js capabilities. The SDK still delegates every
1836
+ * operation to the normal state, grant, and audit owners.
1837
+ */
1838
+ declare class DesktopNodeReplService {
1839
+ private readonly sessionState;
1840
+ private readonly workers;
1841
+ constructor(sessionState: DesktopSessionStateService);
1842
+ execute: (input: DesktopSessionCaller & {
1843
+ code: unknown;
1844
+ signal?: AbortSignal;
1845
+ }) => Promise<unknown>;
1846
+ dispose: () => void;
1847
+ private getOrCreateWorker;
1848
+ private handleWorkerMessage;
1849
+ private invokeDesktop;
1850
+ private resolve;
1851
+ private reject;
1852
+ private scheduleIdleStop;
1853
+ private stopWorker;
1854
+ }
1855
+ //#endregion
1856
+ //#region src/features/desktop-host/services/desktop-session-state.service.d.ts
1857
+ type DesktopSessionCaller = {
1858
+ agentId: string;
1859
+ sessionId: string;
1860
+ agentRunId?: string;
1861
+ };
1862
+ type DesktopSnapshotOptions = {
1863
+ target: {
1864
+ applicationId: string;
1865
+ };
1866
+ source?: "accessibility" | "screen" | "both";
1867
+ detail?: "low" | "high";
1868
+ maxDepth?: number;
1869
+ maxNodes?: number;
1870
+ };
1871
+ /** Owns short-lived AX element references for one Agent session. */
1872
+ declare class DesktopSessionStateService {
1873
+ private readonly manager;
1874
+ private readonly statesBySession;
1875
+ constructor(manager: DesktopHostCapabilityManager);
1876
+ snapshot: (caller: DesktopSessionCaller, options: DesktopSnapshotOptions) => Promise<unknown>;
1877
+ setValue: (caller: DesktopSessionCaller, input: {
1878
+ target: {
1879
+ applicationId: string;
1880
+ };
1881
+ stateId: string;
1882
+ elementIndex: number;
1883
+ value: string;
1884
+ }) => Promise<unknown>;
1885
+ click: (caller: DesktopSessionCaller, input: {
1886
+ target: {
1887
+ applicationId: string;
1888
+ };
1889
+ stateId: string;
1890
+ elementIndex?: number;
1891
+ coordinate?: {
1892
+ x: number;
1893
+ y: number;
1894
+ };
1895
+ }) => Promise<unknown>;
1896
+ typeText: (caller: DesktopSessionCaller, input: {
1897
+ target: {
1898
+ applicationId: string;
1899
+ };
1900
+ stateId: string;
1901
+ text: string;
1902
+ }) => Promise<unknown>;
1903
+ pressKey: (caller: DesktopSessionCaller, input: {
1904
+ target: {
1905
+ applicationId: string;
1906
+ };
1907
+ stateId: string;
1908
+ key: string;
1909
+ modifiers?: string[];
1910
+ }) => Promise<unknown>;
1911
+ private perform;
1912
+ private remember;
1913
+ private sessionStates;
1332
1914
  }
1333
1915
  //#endregion
1334
1916
  //#region src/features/observation/types/observation.types.d.ts
@@ -1533,6 +2115,13 @@ declare class ObservationManager {
1533
2115
  }>;
1534
2116
  onExtensionObservationRuntimeExited: (extensionId: string) => void;
1535
2117
  onExtensionObservationRuntimeReady: (extensionId: string) => Promise<void>;
2118
+ onDesktopObservationAuthorizationRevoked: (input: {
2119
+ extensionId: string;
2120
+ subscriptionId: string;
2121
+ }) => Promise<void>;
2122
+ onDesktopObservationAuthorizationGranted: (input: {
2123
+ extensionId: string;
2124
+ }) => Promise<void>;
1536
2125
  buildContextTail: (input: BuildContextTailInput) => Promise<ObservationContextTail | undefined>;
1537
2126
  discoverObservations: (input?: {
1538
2127
  query?: string;
@@ -1609,6 +2198,11 @@ type ExtensionManifest = {
1609
2198
  replay?: "supported" | "unsupported";
1610
2199
  };
1611
2200
  };
2201
+ hostCapabilities?: {
2202
+ desktopAutomation?: {
2203
+ access: Array<"ui.read" | "ui.observe" | "ui.write" | "screen.capture-window" | "input.keyboard" | "input.pointer">;
2204
+ };
2205
+ };
1612
2206
  channels?: Array<{
1613
2207
  id: string;
1614
2208
  name?: string;
@@ -1688,6 +2282,9 @@ type ExtensionManagerOptions = {
1688
2282
  messageBus: Pick<MessageBus, "publishInbound">;
1689
2283
  sessionManager: SessionManager;
1690
2284
  observations: ObservationManager;
2285
+ capabilityGrantManager: CapabilityGrantManager;
2286
+ desktopHost: DesktopHost;
2287
+ hasAgent: (agentId: string) => boolean;
1691
2288
  };
1692
2289
  type ExtensionLoadParams = {
1693
2290
  config?: Config;
@@ -1711,9 +2308,11 @@ declare class ExtensionManager {
1711
2308
  endpoint: string | null;
1712
2309
  }) => Promise<void>;
1713
2310
  stop: () => Promise<void>;
2311
+ dispose: () => Promise<void>;
1714
2312
  getExtensionRegistry: () => ExtensionRegistry;
1715
2313
  getChannelBindings: () => ExtensionChannelBinding[];
1716
2314
  getUiMetadata: () => ExtensionUiMetadata[];
2315
+ getDesktopHost: () => DesktopHostCapabilityManager;
1717
2316
  getRuntimeStatus: () => ExtensionRuntimeStatus[];
1718
2317
  getManifests: () => ExtensionManifest[];
1719
2318
  authenticateEventStreamCredential: (input: {
@@ -1946,206 +2545,6 @@ type PanelAppPreferencesUpdate = {
1946
2545
  mainSidebar?: boolean;
1947
2546
  };
1948
2547
  //#endregion
1949
- //#region src/stores/panel-app-client-grant.store.d.ts
1950
- type PanelAppClientGrant = {
1951
- appId: string;
1952
- grantedAt: string;
1953
- };
1954
- //#endregion
1955
- //#region src/types/service-app.types.d.ts
1956
- type ServiceAppProtocol = "mcp";
1957
- type ServiceActionRisk = "read" | "write" | "external" | "dangerous";
1958
- type ServiceAppRuntimeStatus = "idle" | "starting" | "running" | "failed" | "stopped";
1959
- type ServiceAppManifestAction = {
1960
- risk?: ServiceActionRisk;
1961
- title?: string;
1962
- description?: string;
1963
- inputSchema?: Record<string, unknown>;
1964
- };
1965
- type ServiceAppManifest = {
1966
- id: string;
1967
- title: string;
1968
- description?: string;
1969
- enabled: boolean;
1970
- protocol: ServiceAppProtocol;
1971
- command: string;
1972
- args: string[];
1973
- actions: Record<string, ServiceAppManifestAction>;
1974
- };
1975
- type ServiceAppRecord = {
1976
- id: string;
1977
- title: string;
1978
- description?: string;
1979
- dirPath: string;
1980
- manifestPath: string;
1981
- command?: string;
1982
- args?: string[];
1983
- cwd: string;
1984
- enabled: boolean;
1985
- protocol: ServiceAppProtocol;
1986
- status: ServiceAppRuntimeStatus;
1987
- lastError?: string;
1988
- lastStartedAt?: string;
1989
- lastReadyAt?: string;
1990
- lastFailedAt?: string;
1991
- sourceKind?: "workspace" | "package";
1992
- packageId?: string;
1993
- packageVersion?: string;
1994
- packageDirectory?: string;
1995
- dataDirectory?: string;
1996
- instanceId?: string;
1997
- storage?: AppStorageContext;
1998
- isolation?: AppRuntimeIsolation;
1999
- };
2000
- type ServiceActionGrantState = "granted" | "not-granted" | "not-declared";
2001
- type ServiceActionRuntimeState = "matched" | "missing" | "undeclared";
2002
- type ServiceAction = {
2003
- id: string;
2004
- appId: string;
2005
- name: string;
2006
- title?: string;
2007
- description?: string;
2008
- inputSchema?: Record<string, unknown>;
2009
- risk: ServiceActionRisk;
2010
- runtimeState?: ServiceActionRuntimeState;
2011
- grantState?: ServiceActionGrantState;
2012
- };
2013
- type ServiceActionCaller = {
2014
- surface: "panel-app";
2015
- appId: string;
2016
- };
2017
- type ServiceActionGrant = {
2018
- caller: ServiceActionCaller;
2019
- actionId: string;
2020
- risk: ServiceActionRisk;
2021
- grantedAt: string;
2022
- };
2023
- type ServiceActionInvokeRequest = {
2024
- caller: ServiceActionCaller;
2025
- declaredActions: string[];
2026
- input?: Record<string, unknown>;
2027
- };
2028
- type ServiceActionInvokeResult = {
2029
- actionId: string;
2030
- result: unknown;
2031
- };
2032
- type ServiceActionGrantRequest = {
2033
- caller: ServiceActionCaller;
2034
- declaredActions: string[];
2035
- };
2036
- //#endregion
2037
- //#region src/types/panel-app.types.d.ts
2038
- type PanelAppEntry = {
2039
- id: string;
2040
- appId: string;
2041
- fileName: string;
2042
- kind: "single-file" | "folder";
2043
- title: string;
2044
- description?: string;
2045
- icon?: string;
2046
- contentPath: string;
2047
- createdAt: string;
2048
- updatedAt: string;
2049
- sizeBytes: number;
2050
- favorite: boolean;
2051
- mainSidebar: boolean;
2052
- mainSidebarOrder?: number;
2053
- clientDeclared: boolean;
2054
- clientGranted: boolean;
2055
- lastOpenedAt?: string;
2056
- openCount: number;
2057
- sourceKind: "workspace" | "package";
2058
- packageId?: string;
2059
- packageVersion?: string;
2060
- };
2061
- type PanelAppList = {
2062
- workspacePath: string;
2063
- panelsPath: string;
2064
- entries: PanelAppEntry[];
2065
- };
2066
- type PanelAppContent = {
2067
- id: string;
2068
- appId: string;
2069
- fileName: string;
2070
- html: string;
2071
- contentType: "text/html; charset=utf-8";
2072
- capabilities: string[];
2073
- clientDeclared: boolean;
2074
- clientGranted: boolean;
2075
- serviceActions: string[];
2076
- };
2077
- type PanelAppDeleteResult = {
2078
- deleted: true;
2079
- fileName: string;
2080
- id: string;
2081
- };
2082
- type PanelAppBridgeSession = {
2083
- id: string;
2084
- token: string;
2085
- appId: string;
2086
- caller: ServiceActionCaller;
2087
- declaredCapabilities: string[];
2088
- declaredActions: string[];
2089
- clientDeclared: boolean;
2090
- createdAt: string;
2091
- expiresAt: string;
2092
- };
2093
- type PanelAppErrorCode = "AGENT_OBJECT_REQUEST_FAILED" | "AGENT_OBJECT_RESULT_NOT_SUBMITTED" | "AGENT_OBJECT_RESULT_SCHEMA_INVALID" | "AGENT_OBJECT_RESULT_TIMEOUT" | "AUTHORIZATION_REQUIRED" | "PANEL_APP_AGENT_REQUEST_INVALID" | "PANEL_APP_ASSET_TOKEN_EXPIRED" | "PANEL_APP_ASSET_TOKEN_INVALID" | "PANEL_APP_BRIDGE_SESSION_NOT_FOUND" | "PANEL_APP_CAPABILITY_NOT_DECLARED" | "PANEL_APP_CLIENT_NOT_DECLARED" | "PANEL_APP_INVALID_ASSET_PATH" | "PANEL_APP_INVALID_ID" | "PANEL_APP_INVALID_SOURCE_PATH" | "PANEL_APP_MANIFEST_INVALID" | "PANEL_APP_MANAGED_SOURCE" | "PANEL_APP_NOT_FOUND" | "PANEL_APP_READ_FAILED";
2094
- declare class PanelAppError extends Error {
2095
- readonly code: PanelAppErrorCode;
2096
- constructor(code: PanelAppErrorCode, message: string);
2097
- }
2098
- declare function isPanelAppError(error: unknown): error is PanelAppError;
2099
- declare const PANEL_APP_AGENT_CAPABILITIES: readonly ["agent:send", "agent:generateObject"];
2100
- type PanelAppAgentCapability = typeof PANEL_APP_AGENT_CAPABILITIES[number];
2101
- declare function isPanelAppAgentCapability(value: unknown): value is PanelAppAgentCapability;
2102
- type PanelAppCapabilityGrantCaller = {
2103
- surface: "panel-app";
2104
- appId: string;
2105
- };
2106
- type PanelAppCapabilityGrant = {
2107
- caller: PanelAppCapabilityGrantCaller;
2108
- capability: PanelAppAgentCapability;
2109
- grantedAt: string;
2110
- };
2111
- type PanelAppAgentSendPayload = {
2112
- sessionId?: string;
2113
- peerId?: string;
2114
- content: NcpMessagePart[];
2115
- message?: never;
2116
- metadata?: Record<string, unknown>;
2117
- } | {
2118
- sessionId?: string;
2119
- peerId?: string;
2120
- message: NcpMessage$1 | (Omit<NcpMessage$1, "sessionId"> & {
2121
- sessionId?: string;
2122
- });
2123
- content?: never;
2124
- metadata?: Record<string, unknown>;
2125
- };
2126
- type PanelAppAgentSendRequest = {
2127
- payload: PanelAppAgentSendPayload;
2128
- };
2129
- type PanelAppAgentSendResult = NcpRunHandle;
2130
- type PanelAppAgentRunClient = {
2131
- send: (input: AgentRunSendIngressPayload) => Promise<NcpRunHandle>;
2132
- sendAndStreamEvents: (input: AgentRunSendIngressPayload) => AsyncGenerator<NcpEndpointEvent$1>;
2133
- };
2134
- type PanelAppAgentGenerateObjectInput = {
2135
- peerId: string;
2136
- prompt: string;
2137
- context?: unknown;
2138
- schema: Record<string, unknown>;
2139
- title?: string;
2140
- timeoutMs?: number;
2141
- };
2142
- type PanelAppAgentGenerateObjectRequest = {
2143
- input: PanelAppAgentGenerateObjectInput;
2144
- };
2145
- type PanelAppAgentGenerateObjectResult = {
2146
- result: unknown;
2147
- };
2148
- //#endregion
2149
2548
  //#region src/utils/panel-app-source.utils.d.ts
2150
2549
  type PanelAppAssetContentType = "application/javascript; charset=utf-8" | "application/json; charset=utf-8" | "application/octet-stream" | "image/png" | "image/svg+xml; charset=utf-8" | "image/webp" | "text/css; charset=utf-8" | "text/plain; charset=utf-8";
2151
2550
  type PanelAppAsset = {
@@ -2163,12 +2562,15 @@ declare class PanelAppManager {
2163
2562
  private readonly sourceService;
2164
2563
  private readonly packageStateManager;
2165
2564
  private readonly entryPresenter;
2565
+ private readonly removalService;
2166
2566
  constructor(params: {
2167
2567
  agentRunClient?: PanelAppAgentRunClient;
2168
2568
  configManager: ConfigManager;
2169
2569
  eventBus?: EventBus$1;
2170
2570
  ingress?: Ingress$1;
2171
2571
  listPackageComponentSources?: () => Promise<AppPackageComponentSource[]>;
2572
+ listPackageComponentDiagnostics?: () => Promise<AppPackageUnavailableDiagnostic[]>;
2573
+ capabilityGrantManager: CapabilityGrantManager;
2172
2574
  });
2173
2575
  listPanelApps: () => Promise<PanelAppList>;
2174
2576
  getPanelAppContent: (id: string, sourcePath?: string) => Promise<PanelAppContent>;
@@ -2186,6 +2588,7 @@ declare class PanelAppManager {
2186
2588
  }) => Promise<PanelAppBridgeSession>;
2187
2589
  grantPanelAppClient: (appId: string) => Promise<PanelAppClientGrant>;
2188
2590
  revokePanelAppClient: (appId: string) => Promise<void>;
2591
+ matchesCapabilityGrant: (grant: CapabilityGrant) => Promise<boolean>;
2189
2592
  resolvePanelAppBridgeSession: (token: string) => PanelAppBridgeSession;
2190
2593
  deletePanelAppBridgeSession: (token: string) => void;
2191
2594
  sendAgentMessage: (bridgeSessionToken: string, payload: PanelAppAgentSendPayload) => Promise<PanelAppAgentSendResult>;
@@ -2198,14 +2601,14 @@ declare class PanelAppManager {
2198
2601
  private getPanelsPath;
2199
2602
  private createAssetBaseHref;
2200
2603
  private createStateStore;
2201
- private createCapabilityGrantStore;
2202
- private createClientGrantStore;
2203
2604
  private resolvePanelAppFileName;
2204
2605
  assertCanActivatePackageComponents: (components: AppPackageComponentSource[]) => Promise<void>;
2205
2606
  deactivatePackageComponents: (components: AppPackageComponentSource[]) => void;
2206
- removePackageComponentState: (components: AppPackageComponentSource[]) => Promise<void>;
2607
+ preparePackageComponentDeactivation: (components: AppPackageComponentSource[]) => (() => Promise<void>);
2608
+ removePackageComponentState: (components: AppPackageComponentSource[]) => Promise<() => Promise<void>>;
2207
2609
  private deleteExpiredBridgeSessions;
2208
2610
  private deleteBridgeSessionsByPanelAppId;
2611
+ private suspendBridgeSessionsByPanelAppId;
2209
2612
  private isPanelAppClientGranted;
2210
2613
  private isMissingFileError;
2211
2614
  }
@@ -2275,6 +2678,7 @@ declare class McpServiceAppRuntimeService {
2275
2678
  actionName: string;
2276
2679
  input: Record<string, unknown>;
2277
2680
  }) => Promise<unknown>;
2681
+ stop: (appId: string) => Promise<void>;
2278
2682
  restart: (appId: string) => Promise<void>;
2279
2683
  dispose: () => Promise<void>;
2280
2684
  private toMcpServerRecord;
@@ -2320,11 +2724,14 @@ declare class ServiceAppManager {
2320
2724
  private readonly removalService;
2321
2725
  private readonly runtimeService;
2322
2726
  private readonly recordService;
2727
+ private readonly actionGrants;
2728
+ private readonly packageRuntime;
2323
2729
  private reconciliationDiagnostics;
2324
2730
  constructor(params: {
2325
2731
  configManager: ConfigManager;
2326
2732
  runtimeService?: ServiceAppRuntime;
2327
2733
  listPackageComponentSources?: () => Promise<AppPackageComponentSource[]>;
2734
+ capabilityGrantManager: CapabilityGrantManager;
2328
2735
  });
2329
2736
  start: () => Promise<void>;
2330
2737
  listServiceApps: () => Promise<ServiceAppList>;
@@ -2340,13 +2747,15 @@ declare class ServiceAppManager {
2340
2747
  grantServiceActions: (actionIds: readonly string[], request: ServiceActionGrantRequest) => Promise<ServiceActionGrant[]>;
2341
2748
  listServiceActionGrants: () => Promise<ServiceActionGrant[]>;
2342
2749
  revokeServiceAction: (caller: ServiceActionCaller, actionId: string) => Promise<void>;
2750
+ matchesCapabilityGrant: (grant: CapabilityGrant) => Promise<boolean>;
2343
2751
  restartServiceApp: (appId: string) => Promise<ServiceAppRecord>;
2344
2752
  listWorkspaceDataOwners: () => Promise<WorkspaceServiceDataOwner[]>;
2345
2753
  deleteServiceApp: (appId: string, purgeData?: boolean) => Promise<ServiceAppDeleteResult>;
2346
2754
  dispose: () => Promise<void>;
2347
2755
  assertCanActivatePackageComponents: (components: AppPackageComponentSource[]) => Promise<void>;
2348
2756
  deactivatePackageComponents: (components: AppPackageComponentSource[]) => Promise<void>;
2349
- removePackageComponentGrants: (components: AppPackageComponentSource[]) => Promise<void>;
2757
+ preparePackageComponentDeactivation: (components: AppPackageComponentSource[]) => Promise<() => Promise<void>>;
2758
+ removePackageComponentGrants: (components: AppPackageComponentSource[]) => Promise<() => Promise<void>>;
2350
2759
  private withGrantState;
2351
2760
  private requireServiceAction;
2352
2761
  private requireServiceAppForAction;
@@ -2358,12 +2767,11 @@ declare class ServiceAppManager {
2358
2767
  private getWorkspacePath;
2359
2768
  private getServiceAppsPath;
2360
2769
  private getServiceAppLockPath;
2361
- private createGrantStore;
2362
2770
  private listPackageComponentSources;
2363
2771
  private listServiceAppDirNames;
2364
2772
  private isMissingFileError;
2365
2773
  }
2366
- type ServiceAppRuntime = Pick<McpServiceAppRuntimeService, "dispose" | "getStatus" | "invokeAction" | "listActions" | "restart">; //# sourceMappingURL=service-app.manager.d.ts.map
2774
+ type ServiceAppRuntime = Pick<McpServiceAppRuntimeService, "dispose" | "getStatus" | "invokeAction" | "listActions" | "restart" | "stop">; //# sourceMappingURL=service-app.manager.d.ts.map
2367
2775
  //#endregion
2368
2776
  //#region src/utils/skill-frontmatter.utils.d.ts
2369
2777
  type LocalizedTextMap = Record<string, string>;
@@ -2474,6 +2882,20 @@ declare function dispatchAgentRuntimeSessionRequest(input: {
2474
2882
  }): Promise<void>;
2475
2883
  declare function createAgentRuntimeSessionRequestDispatcher(options: AgentRuntimeSessionRequestDispatcherOptions): SessionRequestDispatcher;
2476
2884
  //#endregion
2885
+ //#region src/features/feature-controls/types/feature-controls.types.d.ts
2886
+ type ProductFeatureControls = {
2887
+ desktopAutomation: {
2888
+ available: boolean;
2889
+ };
2890
+ };
2891
+ //#endregion
2892
+ //#region src/features/feature-controls/services/feature-controls.service.d.ts
2893
+ declare class FeatureControlsService {
2894
+ private readonly desktopHost;
2895
+ constructor(desktopHost: DesktopHost);
2896
+ get: () => Promise<ProductFeatureControls>;
2897
+ }
2898
+ //#endregion
2477
2899
  //#region src/app/nextclaw-kernel.d.ts
2478
2900
  type NextclawKernelOptions = {
2479
2901
  homeDir?: string;
@@ -2481,6 +2903,7 @@ type NextclawKernelOptions = {
2481
2903
  builtInAppsDirectory?: string;
2482
2904
  productVersion?: string;
2483
2905
  productActivitySink?: ProductActivitySink;
2906
+ desktopHost?: DesktopHost;
2484
2907
  };
2485
2908
  type NextclawKernelRuntimeControl<TGatewayInput, TUiInput, TStartInput> = {
2486
2909
  gateway: (input: TGatewayInput) => Promise<void>;
@@ -2533,12 +2956,14 @@ declare class NextclawKernel {
2533
2956
  readonly toolProviderManager: ToolProviderManager;
2534
2957
  readonly agentRunRequestManager: AgentRunRequestManager;
2535
2958
  readonly observations: ObservationManager;
2959
+ readonly capabilityGrants: CapabilityGrantManager;
2960
+ readonly featureControls: FeatureControlsService;
2961
+ private readonly capabilityGrantLegacyMigration;
2536
2962
  private readonly ncpAgentSessionJournalStore;
2537
2963
  private readonly contributions;
2538
2964
  private gatewayController;
2539
2965
  constructor(options?: NextclawKernelOptions);
2540
- private createContributions;
2541
- private installAppPackageRuntimeHooks;
2966
+ private createCapabilityGrantLegacyMigration;
2542
2967
  listSessionTypes: (params?: AgentRuntimeSessionTypeDescribeParams) => Promise<{
2543
2968
  defaultType: string;
2544
2969
  options: AgentRuntimeSessionTypeOption[];
@@ -3091,10 +3516,11 @@ type ContextCompactionPendingWork = {
3091
3516
  };
3092
3517
  declare class ContextCompactionPreflightService {
3093
3518
  private readonly agentManager;
3519
+ private readonly assetStore;
3094
3520
  private readonly compactionService;
3095
3521
  private readonly contextWindowBudgetService;
3096
3522
  private readonly summaryGenerationService;
3097
- constructor(agentManager: AgentManager, providerManager?: LlmProviderRuntime);
3523
+ constructor(agentManager: AgentManager, providerManager?: LlmProviderRuntime, assetStore?: LocalAssetStore | null);
3098
3524
  preview: (params: {
3099
3525
  completeInputBudget?: boolean;
3100
3526
  contextBlocks?: readonly string[];
@@ -3240,5 +3666,5 @@ declare function resolveLegacyEventType(message: SessionMessage): string;
3240
3666
  declare function getUiContentParamsBootstrapScript(): string;
3241
3667
  declare function injectUiContentParamsBootstrap(html: string): string;
3242
3668
  //#endregion
3243
- export { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, AccessLoginResult, AccessManager, AccessManagerOptions, AccessPasswordStatus, AccessPrincipal, AccessRole, AccessSessionRecord, AccessSessionState, AgentManager, AgentManagerOptions, AgentRunClient, type AgentRunReply, type AgentRunReplyOptions, AgentRunSession, type AgentRunStreamOptions, type AgentRuntimeEntry, type AgentRuntimeProviderRegistration, AgentRuntimeSessionRequestDispatcherOptions, type AgentRuntimeSessionTypeCatalog, type AgentRuntimeSessionTypeDescribeParams, AgentRuntimeSessionTypeIcon, type AgentRuntimeSessionTypeOption, AgentRuntimeSessionTypeProvider, AppDataDeleteResult, AppDataDiagnostic, AppDataEntry, AppDataError, AppDataErrorCode, AppDataLifecycle, AppDataList, AppDataManager, AppDataSource, type AppEventEmitOptions, type AppEventEnvelope, type AppEventHandler, type AppEventKey, AppPackageComponentKind, AppPackageComponentSource, AppPackageComponentView, AppPackageConflict, AppPackageError, AppPackageErrorCode, AppPackageHostTarget, AppPackageList, AppPackageManager, AppPackageOperationAction, AppPackageOperationInput, AppPackageOperationList, AppPackageOperationResult, AppPackageOperationStatus, AppPackageOperationView, AppPackageRuntimeHooks, AppPackageView, type AssetApi, AutomationManager, AutomationManagerOptions, BindContextInput, type BuildAgentRunSendPayloadParams, BuildContextTailInput, BuiltinNarpRuntimeProviderService, CONTEXT_COMPACTION_CONTINUATION_TEXT, CONTEXT_COMPACTION_PROJECTION_KIND, CONTEXT_COMPACTION_PROJECTION_METADATA_KEY, CONTEXT_COMPACTION_SYSTEM_PREAMBLE, CONTEXT_COMPACTION_TIMELINE_KIND, ChannelManager, ChannelReplyRouterDispatchParams, CommandRegistry, ConfigManager, ConfigManagerOptions, ConfigManagerRuntimeHooks, ConfigMutationResult, ContextBinding, type ContextBlock, ContextCompactionJournalRecoveryService, ContextCompactionModelProjection, ContextCompactionPreflightBeginResult, ContextCompactionPreflightResult, ContextCompactionPreflightService, ContextCompactionTimelineCheckpoint, ContextCompactionTrigger, type ContextProvider, type ContextProviderRequest, Contribution, CreateAgentRunSessionParams, CreateInboxDeliveryInput, CreateProjectInput, DEFAULT_AGENT_RUNTIME_ENTRY_ID, DEFAULT_SERVICE_ACTION_RISK, DirectPromptDispatchExecution, DirectPromptDispatchParams, DirectPromptDispatchResult, type Disposer, EventAdmissionPolicy, EventBus, type EventBusOptions, EventDelivery, EventSubscription, EventSubscriptionBudget, ExtensionLoadProgress, ExtensionLoadResult, ExtensionManager, type ExtensionRuntimeStatus, GatewayInboundLoopRuntime, GatewayInboundProcessor, type IContextRegistry, type IKernel, type IMcpRegistry, type IModelRegistry, type INextclawAgent, type INextclawAgentRegistry, type INextclawAgentSessions, type INextclawContributionRegistry, type INextclawHarness, type INextclawRun, type INextclawSession, type INextclawSessionRegistry, type IRuntimeRegistry, type IToolRegistry, InboxDeliveryError, InboxDeliveryErrorCode, InboxDeliveryManager, InboxDeliveryManagerOptions, Ingress, type IngressContext, type IngressEnvelope, type IngressHandler, InstallationKind, InstalledSkillDetail, InstalledSkillSummary, InstalledSkillsList, JsonPointer, JsonValue, type Key, type LLMResponse, type LLMStreamEvent, type LearningLoopRuntimeConfig, LlmProviderManager, LlmProviderRuntime, LlmUsageManager, LlmUsageManagerOptions, LlmUsageRecord, LlmUsageSnapshot, LlmUsageStats, LlmUsageStore, LlmUsageStoreOptions, LlmUsageSummary, LocalizedTextMap, MAX_INBOX_DELIVERY_CONTENT_LENGTH, type McpCatalogFilter, McpManager, type McpServerDefinition, type McpServerRecord, McpServiceAppRuntimeService, type McpToolCallInput, type McpToolCatalogEntry, type ModelChatInput, NARP_HTTP_RUNTIME_KIND, NARP_STDIO_RUNTIME_KIND, NEXTCLAW_TIMELINE_KIND_METADATA_KEY, NcpAgentSessionJournalStore, type NcpEndpointEvent, type NcpMessage, type NcpTool, type NextclawAgentDefinition, type NextclawContributionDescriptor, NextclawHarness, NextclawHarnessError, type NextclawHarnessErrorCode, type NextclawHarnessOptions, NextclawKernel, NextclawKernelOptions, NextclawNcpResolvedAgentProfile, NextclawNcpResolvedRunContext, NextclawNcpRunContextResolveParams, type NextclawRunStatus, type NextclawSessionCreateInput, type NextclawSessionRunInput, type NextclawTaskInput, type NextclawTaskResult, ObservationCapabilityDescriptor, ObservationContextTail, ObservationEvent, ObservationEventAdmissionDecision, ObservationExtensionRuntime, ObservationManager, ObservationManagerOptions, ObservationRef, ObservationRelationshipStatus, ObservationState, ObservationTarget, PANEL_APP_AGENT_CAPABILITIES, PROJECT_TEMPLATE_IDS, PROVIDER_MODEL_CATALOG_REFRESH_INTERVAL_MS, PanelAppAgentCapability, PanelAppAgentGenerateObjectInput, PanelAppAgentGenerateObjectRequest, PanelAppAgentGenerateObjectResult, PanelAppAgentRunClient, PanelAppAgentSendPayload, PanelAppAgentSendRequest, PanelAppAgentSendResult, PanelAppAssetTokenService, PanelAppBridgeSession, PanelAppCapabilityGrant, PanelAppCapabilityGrantCaller, type PanelAppClientGrant, PanelAppContent, PanelAppDeleteResult, PanelAppEntry, PanelAppError, PanelAppErrorCode, PanelAppList, PanelAppManager, type PanelAppPreferencesUpdate, PreferenceEntry, PreferenceError, PreferenceErrorCode, PreferenceJsonValue, PreferenceManager, PreferenceManagerOptions, ProductActivityKind, ProductActivitySignal, ProductActivitySink, ProductActivitySource, ProjectError, ProjectErrorCode, ProjectManager, ProjectManagerOptions, ProjectRecord, ProjectTemplate, ProjectTemplateId, type ProviderCatalogPlugin, ProviderManagerNcpLLMApi, ProviderModelCatalogEntry, ProviderModelCatalogManager, ProviderModelCatalogSnapshot, ProviderModelsDiscoverInput, type ProviderSpec, ResolvedAgentProfile, SERVICE_APP_MANIFEST_FILE_NAME, ServiceAction, ServiceActionCaller, ServiceActionGrant, ServiceActionGrantRequest, ServiceActionGrantState, ServiceActionInvokeRequest, ServiceActionInvokeResult, ServiceActionRisk, ServiceActionRuntimeState, ServiceAppDeleteResult, ServiceAppError, type ServiceAppErrorCode, ServiceAppList, ServiceAppManager, ServiceAppManifest, ServiceAppManifestAction, ServiceAppProtocol, ServiceAppRecord, ServiceAppRuntimeStatus, SessionContextCompactionError, SessionContextCompactionErrorCode, SessionContextCompactionManager, SessionContextCompactionResult, SessionManager, SessionManagerOptions, SessionMessageCursorError, SessionMessagePage, SessionModelTokenUsage, type SessionPendingInput, type SessionQueuedInput, SessionRequestManager, SessionRequestManagerOptions, SessionSettingsError, SessionSettingsPatch, type SessionSteerQueuedInputResult, SessionTokenUsageStatus, SessionTokenUsageSummary, SessionTokenUsageTotals, SkillFrontmatter, type SkillInfo, SkillManager, type SkillScope, SubscribeEventsInput, SystemObjectReferenceError, SystemObjectReferenceErrorCode, SystemObjectReferenceManager, SystemObjectReferenceProvider, SystemObjectReferenceSnapshotSource, type TypedKey, TypedPredicate, UnsignedUpdateManifest, type Unsubscribe, UpdateBlockReason, UpdateHostKind, UpdateManifest, UpdateManifestReader, UpdateProgress, UpdateSnapshot, UpdateStatus, type WorkspaceServiceDataOwner, assertObservationJsonValue, assertObservationPredicate, buildAgentRunSendPayload, buildContextCompactionModelProjection, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildNextclawNcpRunContext, buildObservationEventModelMessage, buildServiceActionId, createAgentRuntimeSessionRequestDispatcher, createAssetTools, createContextCompactionMessageId, createContextWindowSignature, createCronJobSystemObjectProvider, createInboxDeliverySystemObjectProvider, createLlmUsageRecord, createTypedKey, describeAgentRuntimeSessionTypes, dispatchAgentRuntimeSessionRequest, dispatchChannelReplyRoute, dispatchPromptOverNcp, dispatchPromptOverNcpResult, evaluateObservationEventAdmission, eventKeys, getAutomaticUpdateCheckDelay, getServiceActionName, getServiceAppManifestPath, getUiContentParamsBootstrapScript, getUnsignedUpdateManifest, hasLlmUsageTelemetry, ingressKeys, injectUiContentParamsBootstrap, isAppDataError, isAppPackageError, isContextCompactionProjectionMessage, isContextCompactionTimelineMessage, isContextWindowSnapshot, isInboxDeliveryError, isPanelAppAgentCapability, isPanelAppError, isPreferenceError, isProjectError, isReplyCapableChannel, isServiceAppError, isSessionContextCompactionError, isSessionMessageCursorError, isSessionSettingsError, isSystemObjectReferenceError, listExtensionChannelIds, listServiceAppManifestActions, matchesObservationPredicate, mergeServiceAppRuntimeActions, normalizeAgentRuntimeSessionTypeIcon, normalizeLlmUsageModel, normalizeOptionalString, parseObservationDuration, parseServiceAppManifest, parseSkillFrontmatter, readContextCompactionCheckpoint, readContextWindowEventSessionId, readJsonPointer, readLatestContextCompactionCheckpoint, readLearningLoopRuntimeConfig, readMetadataModel, readMetadataThinking, readServiceAppManifest, resolveAgentRuntimeEntries, resolveAutomaticUpdateCheckIntervalMs, resolveChannelReplyRoute, resolveEffectiveModel, resolveLegacyEventType, resolveSessionChannelContext, runGatewayInboundLoop, runNextclawTask, sanitizeLlmUsage, serializeContextTail, serializeUnsignedUpdateManifest, shouldRefreshContextWindowDuringStream, shouldRefreshContextWindowImmediately, startPromptOverNcpExecution, stripSkillFrontmatter, syncSessionThinkingPreference, toBoundedJson, toNcpMessages, waitForAgentRuntimeSessionReply };
3669
+ export { AUTOMATIC_UPDATE_CHECK_INTERVAL_MS, AccessLoginResult, AccessManager, AccessManagerOptions, AccessPasswordStatus, AccessPrincipal, AccessRole, AccessSessionRecord, AccessSessionState, AgentManager, AgentManagerOptions, AgentRunClient, type AgentRunReply, type AgentRunReplyOptions, AgentRunSession, type AgentRunStreamOptions, type AgentRuntimeEntry, type AgentRuntimeProviderRegistration, AgentRuntimeSessionRequestDispatcherOptions, type AgentRuntimeSessionTypeCatalog, type AgentRuntimeSessionTypeDescribeParams, AgentRuntimeSessionTypeIcon, type AgentRuntimeSessionTypeOption, AgentRuntimeSessionTypeProvider, AppDataDeleteResult, AppDataDiagnostic, AppDataEntry, AppDataError, AppDataErrorCode, AppDataLifecycle, AppDataList, AppDataManager, AppDataSource, type AppEventEmitOptions, type AppEventEnvelope, type AppEventHandler, type AppEventKey, AppPackageComponentKind, AppPackageComponentSource, AppPackageComponentSourceList, AppPackageComponentView, AppPackageConflict, AppPackageError, AppPackageErrorCode, AppPackageHostTarget, AppPackageList, AppPackageManager, AppPackageOperationAction, AppPackageOperationInput, AppPackageOperationList, AppPackageOperationResult, AppPackageOperationStatus, AppPackageOperationView, 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, 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, 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, ServiceAppDeleteResult, ServiceAppError, type ServiceAppErrorCode, ServiceAppList, ServiceAppManager, ServiceAppManifest, ServiceAppManifestAction, ServiceAppProtocol, ServiceAppRecord, ServiceAppRuntimeStatus, SessionContextCompactionError, SessionContextCompactionErrorCode, SessionContextCompactionManager, SessionContextCompactionResult, SessionManager, SessionManagerOptions, SessionMessageCursorError, SessionMessagePage, SessionModelTokenUsage, type SessionPendingInput, type SessionQueuedInput, SessionRequestManager, SessionRequestManagerOptions, SessionSettingsError, SessionSettingsPatch, type SessionSteerQueuedInputResult, SessionTokenUsageStatus, SessionTokenUsageSummary, SessionTokenUsageTotals, SkillFrontmatter, type SkillInfo, SkillManager, type SkillScope, SubscribeEventsInput, SystemObjectReferenceError, SystemObjectReferenceErrorCode, SystemObjectReferenceManager, SystemObjectReferenceProvider, SystemObjectReferenceSnapshotSource, type TypedKey, TypedPredicate, UnavailableDesktopHost, UnsignedUpdateManifest, type Unsubscribe, UpdateBlockReason, UpdateHostKind, UpdateManifest, UpdateManifestReader, UpdateProgress, UpdateSnapshot, UpdateStatus, type WorkspaceServiceDataOwner, assertObservationJsonValue, assertObservationPredicate, buildAgentRunSendPayload, buildContextCompactionModelProjection, buildContextCompactionTimelineNcpMessage, buildLlmUsageSummary, buildLocalizedTextMap, buildNextclawNcpRunContext, buildObservationEventModelMessage, buildServiceActionId, capabilityGrantCovers, createAgentRuntimeSessionRequestDispatcher, 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 };
3244
3670
  //# sourceMappingURL=index.d.ts.map