@nextclaw/kernel 0.13.0 → 0.15.0-beta.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 +1588 -200
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7286 -2516
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
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
|
|
3
|
+
import * as _$_nextclaw_core0 from "@nextclaw/core";
|
|
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, 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
|
|
|
@@ -678,7 +679,7 @@ declare class NcpAgentSessionJournalStore {
|
|
|
678
679
|
private sessionPath;
|
|
679
680
|
}
|
|
680
681
|
//#endregion
|
|
681
|
-
//#region src/types/project.types.d.ts
|
|
682
|
+
//#region src/features/projects/types/project.types.d.ts
|
|
682
683
|
declare const PROJECT_TEMPLATE_IDS: readonly ["empty", "knowledge-base"];
|
|
683
684
|
type ProjectTemplateId = (typeof PROJECT_TEMPLATE_IDS)[number];
|
|
684
685
|
type ProjectTemplate = {
|
|
@@ -687,6 +688,7 @@ type ProjectTemplate = {
|
|
|
687
688
|
description: string;
|
|
688
689
|
};
|
|
689
690
|
type ProjectRecord = {
|
|
691
|
+
id: string;
|
|
690
692
|
name: string;
|
|
691
693
|
rootPath: string;
|
|
692
694
|
template?: ProjectTemplateId;
|
|
@@ -699,7 +701,7 @@ type CreateProjectInput = {
|
|
|
699
701
|
template?: ProjectTemplateId;
|
|
700
702
|
};
|
|
701
703
|
//#endregion
|
|
702
|
-
//#region src/managers/project.manager.d.ts
|
|
704
|
+
//#region src/features/projects/managers/project.manager.d.ts
|
|
703
705
|
type ProjectManagerOptions = {
|
|
704
706
|
storePath: string;
|
|
705
707
|
getDefaultWorkspacePath: () => string;
|
|
@@ -715,6 +717,9 @@ declare class ProjectManager {
|
|
|
715
717
|
private readonly store;
|
|
716
718
|
constructor(options: ProjectManagerOptions);
|
|
717
719
|
listProjects: () => Promise<ProjectRecord[]>;
|
|
720
|
+
migrateLegacyProjects: () => Promise<boolean>;
|
|
721
|
+
getProjectById: (projectId: string) => Promise<ProjectRecord | null>;
|
|
722
|
+
getRegisteredProject: (rootPath: unknown) => Promise<ProjectRecord | null>;
|
|
718
723
|
listTemplates: () => ProjectTemplate[];
|
|
719
724
|
createProject: (input: CreateProjectInput) => Promise<ProjectRecord>;
|
|
720
725
|
registerExistingProject: (rootPath: unknown, name?: string) => Promise<ProjectRecord | null>;
|
|
@@ -733,6 +738,185 @@ declare class ProjectManager {
|
|
|
733
738
|
private isMissingFileError;
|
|
734
739
|
}
|
|
735
740
|
//#endregion
|
|
741
|
+
//#region src/features/projects/types/project-observation.types.d.ts
|
|
742
|
+
declare const PROJECT_OBSERVATION_PROTOCOL: "nextclaw.project/v1";
|
|
743
|
+
type ProjectObservationDataQuality = "complete" | "partial" | "unavailable";
|
|
744
|
+
type ProjectObservationEvidenceKind = "project-config" | "file-observation" | "ai-report" | "system-record";
|
|
745
|
+
type ProjectObservationReference = {
|
|
746
|
+
kind: ProjectObservationEvidenceKind;
|
|
747
|
+
label: string;
|
|
748
|
+
observedAt: string;
|
|
749
|
+
projectRelativePath?: string;
|
|
750
|
+
sessionId?: string;
|
|
751
|
+
messageId?: string;
|
|
752
|
+
};
|
|
753
|
+
type ProjectObservationDiagnostic = {
|
|
754
|
+
id: string;
|
|
755
|
+
source: "config" | "files" | "sessions" | "skills";
|
|
756
|
+
level: "info" | "warning" | "error";
|
|
757
|
+
code: string;
|
|
758
|
+
message: string;
|
|
759
|
+
projectRelativePath?: string;
|
|
760
|
+
sessionId?: string;
|
|
761
|
+
messageId?: string;
|
|
762
|
+
};
|
|
763
|
+
type ProjectObservationSourceStatus = {
|
|
764
|
+
id: "config" | "files" | "sessions" | "skills";
|
|
765
|
+
label: string;
|
|
766
|
+
status: "available" | "empty" | "error";
|
|
767
|
+
itemCount: number;
|
|
768
|
+
observedAt: string;
|
|
769
|
+
diagnosticIds: string[];
|
|
770
|
+
};
|
|
771
|
+
type ObservedProjectContextReference = {
|
|
772
|
+
id: string;
|
|
773
|
+
role: string;
|
|
774
|
+
source: string;
|
|
775
|
+
accessible: boolean;
|
|
776
|
+
reference: ProjectObservationReference;
|
|
777
|
+
};
|
|
778
|
+
type ObservedProjectContext = {
|
|
779
|
+
name: string;
|
|
780
|
+
rootPath: string;
|
|
781
|
+
summary?: string;
|
|
782
|
+
context: ObservedProjectContextReference[];
|
|
783
|
+
};
|
|
784
|
+
type ObservedWorkflowStage = {
|
|
785
|
+
id: string;
|
|
786
|
+
label: string;
|
|
787
|
+
};
|
|
788
|
+
type ObservedWorkflow = {
|
|
789
|
+
id: string;
|
|
790
|
+
label: string;
|
|
791
|
+
stages: ObservedWorkflowStage[];
|
|
792
|
+
reference: ProjectObservationReference;
|
|
793
|
+
};
|
|
794
|
+
type ObservedWorkItemSchedule = {
|
|
795
|
+
start?: string;
|
|
796
|
+
end?: string;
|
|
797
|
+
milestone: boolean;
|
|
798
|
+
dependsOn: string[];
|
|
799
|
+
};
|
|
800
|
+
type ObservedWorkItem = {
|
|
801
|
+
id: string;
|
|
802
|
+
name: string;
|
|
803
|
+
status: "active" | "blocked" | "completed" | "cancelled";
|
|
804
|
+
workflowId?: string;
|
|
805
|
+
stageId?: string;
|
|
806
|
+
schedule?: ObservedWorkItemSchedule;
|
|
807
|
+
updatedAt: string;
|
|
808
|
+
reference: ProjectObservationReference;
|
|
809
|
+
};
|
|
810
|
+
type ObservedProjectRun = {
|
|
811
|
+
sessionId: string;
|
|
812
|
+
state: "running" | "completed" | "failed" | "cancelled" | "idle";
|
|
813
|
+
updatedAt: string;
|
|
814
|
+
agentId?: string;
|
|
815
|
+
model?: string;
|
|
816
|
+
label?: string;
|
|
817
|
+
statusText?: string;
|
|
818
|
+
workItemId?: string;
|
|
819
|
+
reference: ProjectObservationReference;
|
|
820
|
+
};
|
|
821
|
+
type ObservedArtifact = {
|
|
822
|
+
id: string;
|
|
823
|
+
path: string;
|
|
824
|
+
categoryId: string;
|
|
825
|
+
categoryLabel: string;
|
|
826
|
+
exists: boolean;
|
|
827
|
+
itemId?: string;
|
|
828
|
+
size?: number;
|
|
829
|
+
fileCreatedAt?: string;
|
|
830
|
+
fileUpdatedAt?: string;
|
|
831
|
+
references: ProjectObservationReference[];
|
|
832
|
+
};
|
|
833
|
+
type ObservedArtifactCategory = {
|
|
834
|
+
id: string;
|
|
835
|
+
label: string;
|
|
836
|
+
};
|
|
837
|
+
type ObservedSignal = {
|
|
838
|
+
id: string;
|
|
839
|
+
itemId?: string;
|
|
840
|
+
status: "open" | "resolved";
|
|
841
|
+
level: "info" | "attention" | "warning";
|
|
842
|
+
message: string;
|
|
843
|
+
updatedAt: string;
|
|
844
|
+
reference: ProjectObservationReference;
|
|
845
|
+
};
|
|
846
|
+
type ObservedRequest = {
|
|
847
|
+
id: string;
|
|
848
|
+
itemId?: string;
|
|
849
|
+
status: "open" | "resolved" | "expired";
|
|
850
|
+
response: "confirm-reject" | "open-session";
|
|
851
|
+
prompt: string;
|
|
852
|
+
updatedAt: string;
|
|
853
|
+
reply?: {
|
|
854
|
+
decision: "confirmed" | "rejected";
|
|
855
|
+
sentAt: string;
|
|
856
|
+
messageId: string;
|
|
857
|
+
};
|
|
858
|
+
reference: ProjectObservationReference;
|
|
859
|
+
};
|
|
860
|
+
type ObservedActivity = {
|
|
861
|
+
id: string;
|
|
862
|
+
kind: "work-item" | "artifact" | "schedule" | "signal" | "request";
|
|
863
|
+
message: string;
|
|
864
|
+
at: string;
|
|
865
|
+
itemId?: string;
|
|
866
|
+
reference: ProjectObservationReference;
|
|
867
|
+
};
|
|
868
|
+
type ObservedSkill = {
|
|
869
|
+
ref: string;
|
|
870
|
+
name: string;
|
|
871
|
+
description?: string;
|
|
872
|
+
source: "project";
|
|
873
|
+
path: string;
|
|
874
|
+
readable: boolean;
|
|
875
|
+
reference: ProjectObservationReference;
|
|
876
|
+
};
|
|
877
|
+
type ProjectObservationSnapshot = {
|
|
878
|
+
asOf: string;
|
|
879
|
+
project: ObservedProjectContext;
|
|
880
|
+
sources: ProjectObservationSourceStatus[];
|
|
881
|
+
workflows: ObservedWorkflow[];
|
|
882
|
+
runs: ObservedProjectRun[];
|
|
883
|
+
workItems: ObservedWorkItem[];
|
|
884
|
+
artifactCategories: ObservedArtifactCategory[];
|
|
885
|
+
artifacts: ObservedArtifact[];
|
|
886
|
+
signals: ObservedSignal[];
|
|
887
|
+
requests: ObservedRequest[];
|
|
888
|
+
activity: ObservedActivity[];
|
|
889
|
+
skills: ObservedSkill[];
|
|
890
|
+
diagnostics: ProjectObservationDiagnostic[];
|
|
891
|
+
dataQuality: ProjectObservationDataQuality;
|
|
892
|
+
};
|
|
893
|
+
declare class ProjectObservationError extends Error {
|
|
894
|
+
readonly code: "PROJECT_NOT_REGISTERED" | "PROJECT_OBSERVATION_INVALID_ROOT";
|
|
895
|
+
constructor(code: "PROJECT_NOT_REGISTERED" | "PROJECT_OBSERVATION_INVALID_ROOT", message: string);
|
|
896
|
+
}
|
|
897
|
+
declare function isProjectObservationError(error: unknown): error is ProjectObservationError;
|
|
898
|
+
//#endregion
|
|
899
|
+
//#region src/features/projects/services/project-observation.service.d.ts
|
|
900
|
+
type ProjectObservationServiceOptions = {
|
|
901
|
+
projectManager: Pick<ProjectManager, "getRegisteredProject">;
|
|
902
|
+
sessionManager: Pick<SessionManager, "listSessions" | "listSessionMessages">;
|
|
903
|
+
workspacePath: string;
|
|
904
|
+
now?: () => Date;
|
|
905
|
+
};
|
|
906
|
+
declare class ProjectObservationService {
|
|
907
|
+
private readonly options;
|
|
908
|
+
private readonly now;
|
|
909
|
+
constructor(options: ProjectObservationServiceOptions);
|
|
910
|
+
observe: (rootPath: string) => Promise<ProjectObservationSnapshot>;
|
|
911
|
+
private readConfig;
|
|
912
|
+
private observeContext;
|
|
913
|
+
private observeArtifacts;
|
|
914
|
+
private observeSessions;
|
|
915
|
+
private addMarkerConflictDiagnostics;
|
|
916
|
+
private observeSkills;
|
|
917
|
+
private createSourceStatus;
|
|
918
|
+
}
|
|
919
|
+
//#endregion
|
|
736
920
|
//#region src/services/session-event-coordinator.service.d.ts
|
|
737
921
|
type PublishSessionEventParams = {
|
|
738
922
|
sessionId: string;
|
|
@@ -1110,6 +1294,297 @@ declare class AutomationManager extends CronService {
|
|
|
1110
1294
|
constructor(options: AutomationManagerOptions);
|
|
1111
1295
|
}
|
|
1112
1296
|
//#endregion
|
|
1297
|
+
//#region src/types/service-app.types.d.ts
|
|
1298
|
+
type ServiceAppProtocol = "mcp" | "wasi-component";
|
|
1299
|
+
type ServiceActionRisk = "read" | "write" | "external" | "dangerous";
|
|
1300
|
+
type ServiceAppRuntimeStatus = "idle" | "starting" | "running" | "failed" | "stopped";
|
|
1301
|
+
type ServiceAppManifestAction = {
|
|
1302
|
+
risk?: ServiceActionRisk;
|
|
1303
|
+
title?: string;
|
|
1304
|
+
description?: string;
|
|
1305
|
+
inputSchema?: Record<string, unknown>;
|
|
1306
|
+
timeoutMs?: number;
|
|
1307
|
+
};
|
|
1308
|
+
type ServiceAppLifecycle = {
|
|
1309
|
+
mode: "action";
|
|
1310
|
+
} | {
|
|
1311
|
+
mode: "resident";
|
|
1312
|
+
eventIntervalMs: number;
|
|
1313
|
+
} | {
|
|
1314
|
+
mode: "provider";
|
|
1315
|
+
};
|
|
1316
|
+
/**
|
|
1317
|
+
* A dependency intentionally kept outside a portable `.napp` artifact.
|
|
1318
|
+
* It never carries credentials, connection strings, or installation commands.
|
|
1319
|
+
*/
|
|
1320
|
+
type ServiceAppExternalRemediation = {
|
|
1321
|
+
kind: "agent-setup";
|
|
1322
|
+
summary: string;
|
|
1323
|
+
requiresUserAction?: boolean;
|
|
1324
|
+
};
|
|
1325
|
+
/**
|
|
1326
|
+
* The versioned WIT surface used by a capability Provider and its Consumers.
|
|
1327
|
+
* A Provider carries an exact semver release; a Consumer carries the range it
|
|
1328
|
+
* accepts. This declaration is static manifest metadata, never a registry.
|
|
1329
|
+
*/
|
|
1330
|
+
type ServiceAppWitContract = {
|
|
1331
|
+
package: string;
|
|
1332
|
+
interface: string;
|
|
1333
|
+
version: string;
|
|
1334
|
+
};
|
|
1335
|
+
type ServiceAppCapabilityRequirement = {
|
|
1336
|
+
id: string;
|
|
1337
|
+
version?: string; /** A Provider Component packaged beside this Consumer. */
|
|
1338
|
+
provider?: string;
|
|
1339
|
+
wit?: ServiceAppWitContract;
|
|
1340
|
+
title?: string;
|
|
1341
|
+
description?: string;
|
|
1342
|
+
remediation?: ServiceAppExternalRemediation;
|
|
1343
|
+
};
|
|
1344
|
+
type ServiceAppResourceRequirement = {
|
|
1345
|
+
binding: string;
|
|
1346
|
+
type: string;
|
|
1347
|
+
required?: boolean;
|
|
1348
|
+
title?: string;
|
|
1349
|
+
description?: string;
|
|
1350
|
+
remediation?: ServiceAppExternalRemediation;
|
|
1351
|
+
};
|
|
1352
|
+
/**
|
|
1353
|
+
* A portable Guest can name a slot but never a provider, model, or Agent.
|
|
1354
|
+
* The Kernel binds the slot through a capability grant after installation.
|
|
1355
|
+
*/
|
|
1356
|
+
type ServiceAppModelCapabilitySlot = {
|
|
1357
|
+
id: string;
|
|
1358
|
+
title: string;
|
|
1359
|
+
description: string;
|
|
1360
|
+
required: boolean;
|
|
1361
|
+
maxTokens?: number;
|
|
1362
|
+
timeoutMs?: number;
|
|
1363
|
+
};
|
|
1364
|
+
type ServiceAppAgentCapabilitySlot = {
|
|
1365
|
+
id: string;
|
|
1366
|
+
title: string;
|
|
1367
|
+
description: string;
|
|
1368
|
+
required: boolean;
|
|
1369
|
+
};
|
|
1370
|
+
type ServiceAppRequirements = {
|
|
1371
|
+
capabilities?: ServiceAppCapabilityRequirement[];
|
|
1372
|
+
resources?: ServiceAppResourceRequirement[];
|
|
1373
|
+
modelSlots?: ServiceAppModelCapabilitySlot[];
|
|
1374
|
+
agentSlots?: ServiceAppAgentCapabilitySlot[];
|
|
1375
|
+
};
|
|
1376
|
+
/**
|
|
1377
|
+
* A stable capability exposed by a Service Provider App. Provider identity is
|
|
1378
|
+
* still the Service id; this declaration only describes what it can satisfy.
|
|
1379
|
+
*/
|
|
1380
|
+
type ServiceAppCapabilityProvision = {
|
|
1381
|
+
id: string;
|
|
1382
|
+
version: string;
|
|
1383
|
+
wit?: ServiceAppWitContract;
|
|
1384
|
+
resourceTypes?: string[];
|
|
1385
|
+
};
|
|
1386
|
+
type ServiceAppProvides = {
|
|
1387
|
+
capabilities?: ServiceAppCapabilityProvision[];
|
|
1388
|
+
};
|
|
1389
|
+
type ServiceAppManifest = {
|
|
1390
|
+
id: string;
|
|
1391
|
+
title: string;
|
|
1392
|
+
description?: string;
|
|
1393
|
+
enabled: boolean;
|
|
1394
|
+
protocol: ServiceAppProtocol;
|
|
1395
|
+
command?: string;
|
|
1396
|
+
args?: string[];
|
|
1397
|
+
componentEntry?: string;
|
|
1398
|
+
providerIds?: string[];
|
|
1399
|
+
lifecycle?: ServiceAppLifecycle;
|
|
1400
|
+
requires?: ServiceAppRequirements;
|
|
1401
|
+
provides?: ServiceAppProvides;
|
|
1402
|
+
actions: Record<string, ServiceAppManifestAction>;
|
|
1403
|
+
};
|
|
1404
|
+
type ServiceAppRecord = {
|
|
1405
|
+
id: string;
|
|
1406
|
+
title: string;
|
|
1407
|
+
description?: string;
|
|
1408
|
+
dirPath: string;
|
|
1409
|
+
manifestPath: string;
|
|
1410
|
+
command?: string;
|
|
1411
|
+
args?: string[];
|
|
1412
|
+
cwd: string;
|
|
1413
|
+
enabled: boolean;
|
|
1414
|
+
protocol: ServiceAppProtocol;
|
|
1415
|
+
status: ServiceAppRuntimeStatus;
|
|
1416
|
+
lastError?: string;
|
|
1417
|
+
lastStartedAt?: string;
|
|
1418
|
+
lastReadyAt?: string;
|
|
1419
|
+
lastFailedAt?: string;
|
|
1420
|
+
sourceKind?: "workspace" | "package";
|
|
1421
|
+
packageId?: string;
|
|
1422
|
+
packageVersion?: string;
|
|
1423
|
+
packageDirectory?: string;
|
|
1424
|
+
dataDirectory?: string;
|
|
1425
|
+
instanceId?: string;
|
|
1426
|
+
storage?: AppStorageContext;
|
|
1427
|
+
isolation?: AppRuntimeIsolation;
|
|
1428
|
+
runtimeProfile?: AppRuntimeProfile;
|
|
1429
|
+
permissions?: AppPermissions;
|
|
1430
|
+
componentPath?: string;
|
|
1431
|
+
providerIds?: string[];
|
|
1432
|
+
lifecycle?: ServiceAppLifecycle;
|
|
1433
|
+
};
|
|
1434
|
+
type ServiceActionGrantState = "granted" | "not-granted" | "not-declared";
|
|
1435
|
+
type ServiceActionRuntimeState = "matched" | "missing" | "undeclared";
|
|
1436
|
+
type ServiceAction = {
|
|
1437
|
+
id: string;
|
|
1438
|
+
appId: string;
|
|
1439
|
+
name: string;
|
|
1440
|
+
title?: string;
|
|
1441
|
+
description?: string;
|
|
1442
|
+
inputSchema?: Record<string, unknown>;
|
|
1443
|
+
risk: ServiceActionRisk;
|
|
1444
|
+
runtimeState?: ServiceActionRuntimeState;
|
|
1445
|
+
grantState?: ServiceActionGrantState;
|
|
1446
|
+
};
|
|
1447
|
+
type PanelServiceActionCaller = {
|
|
1448
|
+
surface: "panel-app";
|
|
1449
|
+
appId: string;
|
|
1450
|
+
};
|
|
1451
|
+
type AgentServiceActionCaller = {
|
|
1452
|
+
surface: "agent";
|
|
1453
|
+
agentId: string;
|
|
1454
|
+
};
|
|
1455
|
+
type ServiceActionCaller = PanelServiceActionCaller | AgentServiceActionCaller;
|
|
1456
|
+
type ServiceActionGrant = {
|
|
1457
|
+
caller: ServiceActionCaller;
|
|
1458
|
+
actionId: string;
|
|
1459
|
+
risk: ServiceActionRisk;
|
|
1460
|
+
grantedAt: string;
|
|
1461
|
+
};
|
|
1462
|
+
type ServiceActionInvokeRequest = {
|
|
1463
|
+
caller: ServiceActionCaller;
|
|
1464
|
+
declaredActions?: string[];
|
|
1465
|
+
input?: Record<string, unknown>;
|
|
1466
|
+
};
|
|
1467
|
+
type ServiceActionInvokeResult = {
|
|
1468
|
+
actionId: string;
|
|
1469
|
+
result: unknown;
|
|
1470
|
+
invocation?: ServiceActionInvocationFacts;
|
|
1471
|
+
};
|
|
1472
|
+
/**
|
|
1473
|
+
* Durable status for an explicitly asynchronous Service App invocation.
|
|
1474
|
+
* Terminal statuses are intentionally irreversible: a retry is a new job
|
|
1475
|
+
* linked through `retryOf`, never a rewrite of the original execution.
|
|
1476
|
+
*/
|
|
1477
|
+
type ServiceAppJobStatus = "queued" | "starting" | "running" | "succeeded" | "cancel-requested" | "cancelled" | "timed-out" | "failed" | "interrupted";
|
|
1478
|
+
type ServiceAppTerminalJobStatus = Extract<ServiceAppJobStatus, "succeeded" | "cancelled" | "timed-out" | "failed" | "interrupted">;
|
|
1479
|
+
type ServiceAppJobCaller = {
|
|
1480
|
+
surface: "panel" | "agent" | "installed-app-cli";
|
|
1481
|
+
id?: string;
|
|
1482
|
+
};
|
|
1483
|
+
type ServiceAppJobView = {
|
|
1484
|
+
id: string;
|
|
1485
|
+
appId: string;
|
|
1486
|
+
instanceId: string;
|
|
1487
|
+
componentId: string;
|
|
1488
|
+
actionName: string;
|
|
1489
|
+
status: ServiceAppJobStatus;
|
|
1490
|
+
createdAt: string;
|
|
1491
|
+
updatedAt: string;
|
|
1492
|
+
startedAt?: string;
|
|
1493
|
+
completedAt?: string;
|
|
1494
|
+
cancelRequestedAt?: string;
|
|
1495
|
+
retryOf?: string;
|
|
1496
|
+
callId: string;
|
|
1497
|
+
traceId: string;
|
|
1498
|
+
caller?: ServiceAppJobCaller;
|
|
1499
|
+
error?: {
|
|
1500
|
+
code?: string;
|
|
1501
|
+
message: string;
|
|
1502
|
+
};
|
|
1503
|
+
};
|
|
1504
|
+
type ServiceAppJobProgressEvent = {
|
|
1505
|
+
type: "progress";
|
|
1506
|
+
current?: number;
|
|
1507
|
+
total?: number;
|
|
1508
|
+
message?: string;
|
|
1509
|
+
};
|
|
1510
|
+
type ServiceAppJobChunkEvent = {
|
|
1511
|
+
type: "stream-chunk";
|
|
1512
|
+
content: string;
|
|
1513
|
+
};
|
|
1514
|
+
type ServiceAppJobTerminalEvent = {
|
|
1515
|
+
type: "terminal";
|
|
1516
|
+
status: ServiceAppTerminalJobStatus;
|
|
1517
|
+
error?: {
|
|
1518
|
+
code?: string;
|
|
1519
|
+
message: string;
|
|
1520
|
+
};
|
|
1521
|
+
};
|
|
1522
|
+
type ServiceAppJobEvent = {
|
|
1523
|
+
sequence: number;
|
|
1524
|
+
timestamp: string;
|
|
1525
|
+
} & (ServiceAppJobProgressEvent | ServiceAppJobChunkEvent | ServiceAppJobTerminalEvent);
|
|
1526
|
+
type ServiceAppJobList = {
|
|
1527
|
+
entries: ServiceAppJobView[];
|
|
1528
|
+
};
|
|
1529
|
+
type ServiceAppJobWatch = {
|
|
1530
|
+
job: ServiceAppJobView;
|
|
1531
|
+
events: ServiceAppJobEvent[]; /** Pass this value back as `afterSequence` to resume without a gap. */
|
|
1532
|
+
cursor: number;
|
|
1533
|
+
};
|
|
1534
|
+
/**
|
|
1535
|
+
* Durable host-owned delivery state for a Resident event. A Resident is a
|
|
1536
|
+
* serial lane, therefore an acknowledged event is the only state permitted
|
|
1537
|
+
* to advance that stream's cursor. Event payload is retained only in the
|
|
1538
|
+
* App instance journal, never in VerificationRecord evidence.
|
|
1539
|
+
*/
|
|
1540
|
+
type ServiceAppResidentEventStatus = "received" | "pending" | "leased" | "acked" | "retry-wait" | "dead-letter";
|
|
1541
|
+
type ServiceAppResidentEventDisposition = {
|
|
1542
|
+
kind: "ack";
|
|
1543
|
+
} | {
|
|
1544
|
+
kind: "retry";
|
|
1545
|
+
delayMs?: number;
|
|
1546
|
+
error?: {
|
|
1547
|
+
code?: string;
|
|
1548
|
+
message?: string;
|
|
1549
|
+
};
|
|
1550
|
+
};
|
|
1551
|
+
type ServiceAppResidentEventView = {
|
|
1552
|
+
id: string;
|
|
1553
|
+
appId: string;
|
|
1554
|
+
instanceId: string;
|
|
1555
|
+
componentId: string;
|
|
1556
|
+
eventId: string;
|
|
1557
|
+
streamKey: string;
|
|
1558
|
+
sequence: number;
|
|
1559
|
+
status: ServiceAppResidentEventStatus;
|
|
1560
|
+
receivedAt: string;
|
|
1561
|
+
updatedAt: string;
|
|
1562
|
+
attempt: number;
|
|
1563
|
+
leaseExpiresAt?: string;
|
|
1564
|
+
nextAttemptAt?: string;
|
|
1565
|
+
ackedAt?: string;
|
|
1566
|
+
deadLetteredAt?: string;
|
|
1567
|
+
lastError?: {
|
|
1568
|
+
code?: string;
|
|
1569
|
+
message: string;
|
|
1570
|
+
};
|
|
1571
|
+
};
|
|
1572
|
+
type ServiceAppResidentEventList = {
|
|
1573
|
+
entries: ServiceAppResidentEventView[];
|
|
1574
|
+
cursors: Record<string, number>;
|
|
1575
|
+
frozen: boolean;
|
|
1576
|
+
};
|
|
1577
|
+
type ServiceActionInvocationFacts = {
|
|
1578
|
+
callId: string;
|
|
1579
|
+
traceId: string;
|
|
1580
|
+
dataVersion: string;
|
|
1581
|
+
verificationRunId: string;
|
|
1582
|
+
};
|
|
1583
|
+
type ServiceActionGrantRequest = {
|
|
1584
|
+
caller: ServiceActionCaller;
|
|
1585
|
+
declaredActions?: string[];
|
|
1586
|
+
};
|
|
1587
|
+
//#endregion
|
|
1113
1588
|
//#region src/types/app-package.types.d.ts
|
|
1114
1589
|
type AppPackageComponentKind = "panel" | "service";
|
|
1115
1590
|
type AppPackageComponentSource = {
|
|
@@ -1135,6 +1610,7 @@ type CapabilityProviderView = {
|
|
|
1135
1610
|
id: string;
|
|
1136
1611
|
version?: string;
|
|
1137
1612
|
resourceTypes?: string[];
|
|
1613
|
+
wit?: ServiceAppWitContract;
|
|
1138
1614
|
}>;
|
|
1139
1615
|
};
|
|
1140
1616
|
type AppPackageUnavailableDiagnostic = {
|
|
@@ -1169,6 +1645,16 @@ type AppPackageReadiness = {
|
|
|
1169
1645
|
status: AppPackageReadinessStatus;
|
|
1170
1646
|
requirements: AppPackageReadinessRequirement[];
|
|
1171
1647
|
};
|
|
1648
|
+
type AppPackageSecretStatus = "bound" | "ready" | "unbound" | "unresolved";
|
|
1649
|
+
type AppPackageSecretSlotView = Pick<AppSecretSlot, "id" | "title" | "description" | "required"> & {
|
|
1650
|
+
status: AppPackageSecretStatus;
|
|
1651
|
+
binding?: AppSecretBinding;
|
|
1652
|
+
errorCode?: "SECRET_BINDING_MISSING" | "SECRET_RESOLUTION_FAILED";
|
|
1653
|
+
};
|
|
1654
|
+
type AppPackageSecretReadiness = {
|
|
1655
|
+
readiness: AppPackageReadiness;
|
|
1656
|
+
slots: AppPackageSecretSlotView[];
|
|
1657
|
+
};
|
|
1172
1658
|
type AppPackageDependencyBinding = {
|
|
1173
1659
|
componentId: string;
|
|
1174
1660
|
requirementKind: "capability" | "resource";
|
|
@@ -1179,11 +1665,25 @@ type AppPackageDependencyCandidate = {
|
|
|
1179
1665
|
requirement: AppPackageReadinessRequirement;
|
|
1180
1666
|
providers: CapabilityProviderView[];
|
|
1181
1667
|
};
|
|
1668
|
+
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";
|
|
1669
|
+
type AppPackageDependencyDiagnostic = {
|
|
1670
|
+
code: AppPackageDependencyDiagnosticCode;
|
|
1671
|
+
componentId: string;
|
|
1672
|
+
requirementKind: "capability" | "resource";
|
|
1673
|
+
requirementId: string;
|
|
1674
|
+
providerId?: string;
|
|
1675
|
+
message: string;
|
|
1676
|
+
};
|
|
1677
|
+
type AppPackageDependencyCycle = {
|
|
1678
|
+
componentId: string;
|
|
1679
|
+
providerIds: string[];
|
|
1680
|
+
};
|
|
1182
1681
|
type AppPackageDependencyView = {
|
|
1183
1682
|
readiness: AppPackageReadiness;
|
|
1184
1683
|
bindings: AppPackageDependencyBinding[];
|
|
1185
1684
|
candidates: AppPackageDependencyCandidate[];
|
|
1186
1685
|
resolvedProviderIds: Record<string, string[]>;
|
|
1686
|
+
diagnostics: AppPackageDependencyDiagnostic[];
|
|
1187
1687
|
};
|
|
1188
1688
|
type AppPackageDependencyBindingInput = {
|
|
1189
1689
|
componentId: string;
|
|
@@ -1211,6 +1711,7 @@ type AppPackageView = {
|
|
|
1211
1711
|
runtimeProfile: AppRuntimeProfile;
|
|
1212
1712
|
isolation: AppRuntimeIsolation;
|
|
1213
1713
|
readiness: AppPackageReadiness;
|
|
1714
|
+
secrets: AppPackageSecretReadiness;
|
|
1214
1715
|
dependencies: AppPackageDependencyView;
|
|
1215
1716
|
};
|
|
1216
1717
|
type AppPackageHostTarget = {
|
|
@@ -1281,7 +1782,7 @@ type AppPackageRuntimeHooks = {
|
|
|
1281
1782
|
beforeDeactivate: (sources: AppPackageComponentSource[]) => Promise<void>;
|
|
1282
1783
|
beforeUninstall: (sources: AppPackageComponentSource[]) => Promise<AppPackageUninstallRollback | void>;
|
|
1283
1784
|
};
|
|
1284
|
-
type AppPackageErrorCode = "APP_PACKAGE_CONFLICT" | "APP_PACKAGE_INCOMPATIBLE" | "APP_PACKAGE_NOT_READY" | "APP_PACKAGE_NOT_FOUND" | "APP_PACKAGE_OPERATION_FAILED";
|
|
1785
|
+
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
1786
|
declare class AppPackageError extends Error {
|
|
1286
1787
|
readonly code: AppPackageErrorCode;
|
|
1287
1788
|
constructor(code: AppPackageErrorCode, message: string);
|
|
@@ -1300,6 +1801,7 @@ declare class AppPackageManager {
|
|
|
1300
1801
|
private readonly dependencyCoordinator;
|
|
1301
1802
|
private readonly runtimeActivationService;
|
|
1302
1803
|
private readonly registryService;
|
|
1804
|
+
private readonly readinessManager;
|
|
1303
1805
|
private runtimeHooks;
|
|
1304
1806
|
private builtInBootstrapPromise;
|
|
1305
1807
|
private builtInDefinitionsPromise;
|
|
@@ -1307,6 +1809,8 @@ declare class AppPackageManager {
|
|
|
1307
1809
|
appHomeDirectory: string;
|
|
1308
1810
|
builtInAppsDirectory?: string;
|
|
1309
1811
|
productVersion?: string;
|
|
1812
|
+
getSecretConfig?: () => Config;
|
|
1813
|
+
secretConfigPath?: string;
|
|
1310
1814
|
});
|
|
1311
1815
|
installRuntimeHooks: (hooks: Partial<AppPackageRuntimeHooks>) => void;
|
|
1312
1816
|
start: () => Promise<void>;
|
|
@@ -1323,6 +1827,13 @@ declare class AppPackageManager {
|
|
|
1323
1827
|
setupDependencies: (appId: string) => Promise<AppPackageDependencyView>;
|
|
1324
1828
|
bindDependency: (appId: string, input: AppPackageDependencyBindingInput) => Promise<AppPackageDependencyView>;
|
|
1325
1829
|
unbindDependency: (appId: string, input: Omit<AppPackageDependencyBindingInput, "providerId">) => Promise<AppPackageDependencyView>;
|
|
1830
|
+
inspectSecrets: (appId: string) => Promise<AppPackageSecretReadiness>;
|
|
1831
|
+
verifySecrets: (appId: string) => Promise<AppPackageSecretReadiness>;
|
|
1832
|
+
bindSecret: (appId: string, input: {
|
|
1833
|
+
slotId: string;
|
|
1834
|
+
binding: AppSecretBinding;
|
|
1835
|
+
}) => Promise<AppPackageSecretReadiness>;
|
|
1836
|
+
unbindSecret: (appId: string, slotId: string) => Promise<AppPackageSecretReadiness>;
|
|
1326
1837
|
listActiveComponentSources: () => Promise<AppPackageComponentSource[]>;
|
|
1327
1838
|
listActiveComponentSourcesWithDiagnostics: () => Promise<AppPackageComponentSourceList>;
|
|
1328
1839
|
listOperations: () => Promise<AppPackageOperationList>;
|
|
@@ -1345,14 +1856,14 @@ declare class AppPackageManager {
|
|
|
1345
1856
|
uninstall: (appId: string, purgeData: boolean) => Promise<AppUninstallResult>;
|
|
1346
1857
|
private ensureBuiltInPackages;
|
|
1347
1858
|
private installBuiltInPackages;
|
|
1348
|
-
private
|
|
1859
|
+
private readListedPackageView;
|
|
1349
1860
|
private resolveSecurity;
|
|
1350
1861
|
private toComponentSources;
|
|
1351
|
-
private assertEngineCompatibility;
|
|
1352
1862
|
private listBuiltInDefinitions;
|
|
1353
1863
|
private isBuiltInAppId;
|
|
1354
1864
|
private executeOperation;
|
|
1355
1865
|
private isMissingFileError;
|
|
1866
|
+
private isTransientUninstallRead;
|
|
1356
1867
|
}
|
|
1357
1868
|
//#endregion
|
|
1358
1869
|
//#region src/types/app-data.types.d.ts
|
|
@@ -1521,152 +2032,6 @@ declare function getCapabilityGrantKey(request: CapabilityGrantRequest): string;
|
|
|
1521
2032
|
declare function capabilityGrantCovers(grant: CapabilityGrant, request: CapabilityGrantRequest): boolean;
|
|
1522
2033
|
declare function matchesCapabilityGrantFilter(grant: CapabilityGrant, filter: CapabilityGrantFilter): boolean;
|
|
1523
2034
|
//#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
2035
|
//#region src/types/panel-app.types.d.ts
|
|
1671
2036
|
type PanelAppEntry = {
|
|
1672
2037
|
id: string;
|
|
@@ -1792,6 +2157,14 @@ declare function createPanelAppClientGrantRequest(appId: string): CapabilityGran
|
|
|
1792
2157
|
declare function createPanelAppAgentGrantRequest(caller: PanelServiceActionCaller, capability: PanelAppAgentCapability): CapabilityGrantRequest;
|
|
1793
2158
|
declare function createServiceActionGrantRequest(caller: ServiceActionCaller, action: ServiceAction): CapabilityGrantRequest;
|
|
1794
2159
|
declare function readServiceActionTargetId(target: unknown): string | null;
|
|
2160
|
+
declare function createServiceAppModelSlotGrantRequest(app: ServiceAppRecord, slot: ServiceAppModelCapabilitySlot, modelId: string): CapabilityGrantRequest;
|
|
2161
|
+
declare function createServiceAppAgentSlotGrantRequest(app: ServiceAppRecord, slot: ServiceAppAgentCapabilitySlot, agentId: string): CapabilityGrantRequest;
|
|
2162
|
+
declare function readServiceAppSlotTarget(target: unknown): {
|
|
2163
|
+
componentId: string;
|
|
2164
|
+
slotId: string;
|
|
2165
|
+
modelId?: string;
|
|
2166
|
+
agentId?: string;
|
|
2167
|
+
} | null;
|
|
1795
2168
|
//#endregion
|
|
1796
2169
|
//#region src/features/desktop-host/types/desktop-host.types.d.ts
|
|
1797
2170
|
declare const DESKTOP_HOST_PROTOCOL_VERSION: 1;
|
|
@@ -2555,6 +2928,398 @@ declare class LlmUsageManager {
|
|
|
2555
2928
|
private readonly toSortedCounts;
|
|
2556
2929
|
}
|
|
2557
2930
|
//#endregion
|
|
2931
|
+
//#region src/types/portable-runtime-acceptance.types.d.ts
|
|
2932
|
+
declare const PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS: readonly ["darwin-arm64", "windows-x64", "linux-x64"];
|
|
2933
|
+
type PortableRuntimeAcceptancePlatform = (typeof PORTABLE_RUNTIME_ACCEPTANCE_PLATFORMS)[number];
|
|
2934
|
+
type PortableRuntimeAcceptanceEvidenceSource = "local" | "ci" | "release";
|
|
2935
|
+
type PortableRuntimeAcceptanceDefinition = {
|
|
2936
|
+
id: string;
|
|
2937
|
+
titleKey: string;
|
|
2938
|
+
descriptionKey: string;
|
|
2939
|
+
checkerKey: string;
|
|
2940
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
2941
|
+
required: boolean;
|
|
2942
|
+
scenarioVersion: string;
|
|
2943
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
2944
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
2945
|
+
};
|
|
2946
|
+
/**
|
|
2947
|
+
* The sole machine-readable registry of portable runtime acceptance criteria.
|
|
2948
|
+
* Product projections and release tooling consume this value; they must not
|
|
2949
|
+
* reconstruct IDs from documents, panels, or test file names.
|
|
2950
|
+
*/
|
|
2951
|
+
declare const PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT: readonly [{
|
|
2952
|
+
titleKey: string;
|
|
2953
|
+
descriptionKey: string;
|
|
2954
|
+
id: "PRT-EXEC-001";
|
|
2955
|
+
checkerKey: string;
|
|
2956
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
2957
|
+
required: boolean;
|
|
2958
|
+
scenarioVersion: string;
|
|
2959
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
2960
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
2961
|
+
}, {
|
|
2962
|
+
titleKey: string;
|
|
2963
|
+
descriptionKey: string;
|
|
2964
|
+
id: "PRT-DATA-001";
|
|
2965
|
+
checkerKey: string;
|
|
2966
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
2967
|
+
required: boolean;
|
|
2968
|
+
scenarioVersion: string;
|
|
2969
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
2970
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
2971
|
+
}, {
|
|
2972
|
+
titleKey: string;
|
|
2973
|
+
descriptionKey: string;
|
|
2974
|
+
id: "PRT-FILE-001";
|
|
2975
|
+
checkerKey: string;
|
|
2976
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
2977
|
+
required: boolean;
|
|
2978
|
+
scenarioVersion: string;
|
|
2979
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
2980
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
2981
|
+
}, {
|
|
2982
|
+
titleKey: string;
|
|
2983
|
+
descriptionKey: string;
|
|
2984
|
+
id: "PRT-NET-001";
|
|
2985
|
+
checkerKey: string;
|
|
2986
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
2987
|
+
required: boolean;
|
|
2988
|
+
scenarioVersion: string;
|
|
2989
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
2990
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
2991
|
+
}, {
|
|
2992
|
+
titleKey: string;
|
|
2993
|
+
descriptionKey: string;
|
|
2994
|
+
id: "PRT-SECRET-001";
|
|
2995
|
+
checkerKey: string;
|
|
2996
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
2997
|
+
required: boolean;
|
|
2998
|
+
scenarioVersion: string;
|
|
2999
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3000
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3001
|
+
}, {
|
|
3002
|
+
titleKey: string;
|
|
3003
|
+
descriptionKey: string;
|
|
3004
|
+
id: "PRT-RES-001";
|
|
3005
|
+
checkerKey: string;
|
|
3006
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3007
|
+
required: boolean;
|
|
3008
|
+
scenarioVersion: string;
|
|
3009
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3010
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3011
|
+
}, {
|
|
3012
|
+
titleKey: string;
|
|
3013
|
+
descriptionKey: string;
|
|
3014
|
+
id: "PRT-EVENT-001";
|
|
3015
|
+
checkerKey: string;
|
|
3016
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3017
|
+
required: boolean;
|
|
3018
|
+
scenarioVersion: string;
|
|
3019
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3020
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3021
|
+
}, {
|
|
3022
|
+
titleKey: string;
|
|
3023
|
+
descriptionKey: string;
|
|
3024
|
+
id: "PRT-TASK-001";
|
|
3025
|
+
checkerKey: string;
|
|
3026
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3027
|
+
required: boolean;
|
|
3028
|
+
scenarioVersion: string;
|
|
3029
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3030
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3031
|
+
}, {
|
|
3032
|
+
titleKey: string;
|
|
3033
|
+
descriptionKey: string;
|
|
3034
|
+
id: "PRT-STREAM-001";
|
|
3035
|
+
checkerKey: string;
|
|
3036
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3037
|
+
required: boolean;
|
|
3038
|
+
scenarioVersion: string;
|
|
3039
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3040
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3041
|
+
}, {
|
|
3042
|
+
titleKey: string;
|
|
3043
|
+
descriptionKey: string;
|
|
3044
|
+
id: "PRT-AGENT-001";
|
|
3045
|
+
checkerKey: string;
|
|
3046
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3047
|
+
required: boolean;
|
|
3048
|
+
scenarioVersion: string;
|
|
3049
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3050
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3051
|
+
}, {
|
|
3052
|
+
titleKey: string;
|
|
3053
|
+
descriptionKey: string;
|
|
3054
|
+
id: "PRT-AI-001";
|
|
3055
|
+
checkerKey: string;
|
|
3056
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3057
|
+
required: boolean;
|
|
3058
|
+
scenarioVersion: string;
|
|
3059
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3060
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3061
|
+
}, {
|
|
3062
|
+
titleKey: string;
|
|
3063
|
+
descriptionKey: string;
|
|
3064
|
+
id: "PRT-COMP-001";
|
|
3065
|
+
checkerKey: string;
|
|
3066
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3067
|
+
required: boolean;
|
|
3068
|
+
scenarioVersion: string;
|
|
3069
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3070
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3071
|
+
}, {
|
|
3072
|
+
titleKey: string;
|
|
3073
|
+
descriptionKey: string;
|
|
3074
|
+
id: "PRT-ENTRY-001";
|
|
3075
|
+
checkerKey: string;
|
|
3076
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3077
|
+
required: boolean;
|
|
3078
|
+
scenarioVersion: string;
|
|
3079
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3080
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3081
|
+
}, {
|
|
3082
|
+
titleKey: string;
|
|
3083
|
+
descriptionKey: string;
|
|
3084
|
+
id: "PRT-LIFE-001";
|
|
3085
|
+
checkerKey: string;
|
|
3086
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3087
|
+
required: boolean;
|
|
3088
|
+
scenarioVersion: string;
|
|
3089
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3090
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3091
|
+
}, {
|
|
3092
|
+
titleKey: string;
|
|
3093
|
+
descriptionKey: string;
|
|
3094
|
+
id: "PRT-BOUND-001";
|
|
3095
|
+
checkerKey: string;
|
|
3096
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3097
|
+
required: boolean;
|
|
3098
|
+
scenarioVersion: string;
|
|
3099
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3100
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3101
|
+
}, {
|
|
3102
|
+
titleKey: string;
|
|
3103
|
+
descriptionKey: string;
|
|
3104
|
+
id: "PRT-PERF-001";
|
|
3105
|
+
checkerKey: string;
|
|
3106
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3107
|
+
required: boolean;
|
|
3108
|
+
scenarioVersion: string;
|
|
3109
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3110
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3111
|
+
}, {
|
|
3112
|
+
titleKey: string;
|
|
3113
|
+
descriptionKey: string;
|
|
3114
|
+
id: "PRT-DX-001";
|
|
3115
|
+
checkerKey: string;
|
|
3116
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3117
|
+
required: boolean;
|
|
3118
|
+
scenarioVersion: string;
|
|
3119
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3120
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3121
|
+
}, {
|
|
3122
|
+
titleKey: string;
|
|
3123
|
+
descriptionKey: string;
|
|
3124
|
+
id: "PRT-DIST-001";
|
|
3125
|
+
checkerKey: string;
|
|
3126
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3127
|
+
required: boolean;
|
|
3128
|
+
scenarioVersion: string;
|
|
3129
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3130
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3131
|
+
}, {
|
|
3132
|
+
titleKey: string;
|
|
3133
|
+
descriptionKey: string;
|
|
3134
|
+
id: "PRT-EVID-001";
|
|
3135
|
+
checkerKey: string;
|
|
3136
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3137
|
+
required: boolean;
|
|
3138
|
+
scenarioVersion: string;
|
|
3139
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3140
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3141
|
+
}, {
|
|
3142
|
+
titleKey: string;
|
|
3143
|
+
descriptionKey: string;
|
|
3144
|
+
id: "PRT-REF-001";
|
|
3145
|
+
checkerKey: string;
|
|
3146
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3147
|
+
required: boolean;
|
|
3148
|
+
scenarioVersion: string;
|
|
3149
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3150
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3151
|
+
}, {
|
|
3152
|
+
titleKey: string;
|
|
3153
|
+
descriptionKey: string;
|
|
3154
|
+
id: "PRT-DOCS-001";
|
|
3155
|
+
checkerKey: string;
|
|
3156
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3157
|
+
required: boolean;
|
|
3158
|
+
scenarioVersion: string;
|
|
3159
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3160
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3161
|
+
}, {
|
|
3162
|
+
titleKey: string;
|
|
3163
|
+
descriptionKey: string;
|
|
3164
|
+
id: "PRT-REL-001";
|
|
3165
|
+
checkerKey: string;
|
|
3166
|
+
category: "execution" | "capability" | "lifecycle" | "entry" | "quality" | "release";
|
|
3167
|
+
required: boolean;
|
|
3168
|
+
scenarioVersion: string;
|
|
3169
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3170
|
+
platforms: readonly PortableRuntimeAcceptancePlatform[];
|
|
3171
|
+
}];
|
|
3172
|
+
type PortableRuntimeAcceptanceId = (typeof PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT)[number]["id"];
|
|
3173
|
+
declare const PORTABLE_RUNTIME_ACCEPTANCE_CONTRACT_FINGERPRINT: string;
|
|
3174
|
+
//#endregion
|
|
3175
|
+
//#region src/types/verification-record.types.d.ts
|
|
3176
|
+
type VerificationRecordStatus = "passed" | "failed" | "blocked" | "not-supported" | "not-run";
|
|
3177
|
+
type VerificationRecordRole = "panel" | "agent" | "cli" | "system";
|
|
3178
|
+
type VerificationRecordEntrySurface = "panel" | "agent" | "installed-app-cli" | "system";
|
|
3179
|
+
type VerificationRecordObservation = {
|
|
3180
|
+
durationMs?: number;
|
|
3181
|
+
runnerPid?: number | null;
|
|
3182
|
+
memory?: {
|
|
3183
|
+
rssBytes: number | null;
|
|
3184
|
+
pssBytes: number | null;
|
|
3185
|
+
} | null;
|
|
3186
|
+
};
|
|
3187
|
+
type VerificationRecordError = {
|
|
3188
|
+
code?: string;
|
|
3189
|
+
message: string;
|
|
3190
|
+
};
|
|
3191
|
+
/**
|
|
3192
|
+
* Immutable, redacted evidence emitted by a real Kernel invocation.
|
|
3193
|
+
* Inputs and outputs are represented by digests only; callers must never use
|
|
3194
|
+
* this record as a storage channel for user content or secrets.
|
|
3195
|
+
*/
|
|
3196
|
+
type VerificationRecord = {
|
|
3197
|
+
evidenceSchemaVersion: 2; /** The producer that generated this versioned evidence. */
|
|
3198
|
+
evidenceSource: PortableRuntimeAcceptanceEvidenceSource;
|
|
3199
|
+
verificationRunId: string;
|
|
3200
|
+
acceptanceId: string;
|
|
3201
|
+
scenarioVersion: string;
|
|
3202
|
+
productVersion: string;
|
|
3203
|
+
runtimeVersion: string;
|
|
3204
|
+
implementationFingerprint: string;
|
|
3205
|
+
status: VerificationRecordStatus;
|
|
3206
|
+
startedAt: string;
|
|
3207
|
+
finishedAt: string;
|
|
3208
|
+
environment: string;
|
|
3209
|
+
appId: string;
|
|
3210
|
+
componentId: string;
|
|
3211
|
+
role: VerificationRecordRole;
|
|
3212
|
+
entrySurface: VerificationRecordEntrySurface;
|
|
3213
|
+
instanceId?: string;
|
|
3214
|
+
actionOrEvent: string;
|
|
3215
|
+
callId: string;
|
|
3216
|
+
traceId: string;
|
|
3217
|
+
capabilityDecisions: string[];
|
|
3218
|
+
inputDigest: string;
|
|
3219
|
+
outputDigest?: string;
|
|
3220
|
+
dataVersion: string;
|
|
3221
|
+
observation?: VerificationRecordObservation;
|
|
3222
|
+
error?: VerificationRecordError;
|
|
3223
|
+
recovery?: string;
|
|
3224
|
+
evidenceRefs: string[];
|
|
3225
|
+
};
|
|
3226
|
+
/**
|
|
3227
|
+
* Historical records are retained for audit but can never satisfy the current
|
|
3228
|
+
* acceptance contract because they predate version/fingerprint evidence.
|
|
3229
|
+
*/
|
|
3230
|
+
type LegacyVerificationRecord = Omit<VerificationRecord, "evidenceSchemaVersion" | "productVersion" | "runtimeVersion" | "implementationFingerprint" | "evidenceSource"> & {
|
|
3231
|
+
evidenceSchemaVersion: 1;
|
|
3232
|
+
};
|
|
3233
|
+
type VerificationEvidenceRecord = VerificationRecord | LegacyVerificationRecord;
|
|
3234
|
+
type VerificationRecordInput = (Omit<VerificationRecord, "evidenceSchemaVersion" | "verificationRunId"> & {
|
|
3235
|
+
verificationRunId?: string;
|
|
3236
|
+
}) | (Omit<LegacyVerificationRecord, "evidenceSchemaVersion" | "verificationRunId"> & {
|
|
3237
|
+
verificationRunId?: string;
|
|
3238
|
+
});
|
|
3239
|
+
type VerificationRecordList = {
|
|
3240
|
+
entries: VerificationEvidenceRecord[];
|
|
3241
|
+
};
|
|
3242
|
+
//#endregion
|
|
3243
|
+
//#region src/utils/portable-runtime-acceptance-evaluator.utils.d.ts
|
|
3244
|
+
type PortableRuntimeAcceptanceEvaluationContext = {
|
|
3245
|
+
appId: string;
|
|
3246
|
+
environment: PortableRuntimeAcceptancePlatform;
|
|
3247
|
+
productVersion: string;
|
|
3248
|
+
runtimeVersion: string;
|
|
3249
|
+
implementationFingerprint: string;
|
|
3250
|
+
contractFingerprint: string;
|
|
3251
|
+
};
|
|
3252
|
+
type PortableRuntimeAcceptanceEvidence = {
|
|
3253
|
+
source: PortableRuntimeAcceptanceEvidenceSource;
|
|
3254
|
+
records: VerificationEvidenceRecord[];
|
|
3255
|
+
};
|
|
3256
|
+
type PortableRuntimeAcceptanceEvidenceArtifact = {
|
|
3257
|
+
schemaVersion: 1;
|
|
3258
|
+
contractFingerprint: string;
|
|
3259
|
+
targets: Array<PortableRuntimeAcceptanceEvaluationContext & {
|
|
3260
|
+
evidence: PortableRuntimeAcceptanceEvidence[];
|
|
3261
|
+
}>;
|
|
3262
|
+
};
|
|
3263
|
+
type PortableRuntimeAcceptanceResultStatus = "current-passed" | "missing" | "stale" | "failed" | "not-applicable";
|
|
3264
|
+
type PortableRuntimeAcceptanceResult = {
|
|
3265
|
+
acceptanceId: string;
|
|
3266
|
+
required: boolean;
|
|
3267
|
+
environment: PortableRuntimeAcceptancePlatform;
|
|
3268
|
+
status: PortableRuntimeAcceptanceResultStatus;
|
|
3269
|
+
latestRecord?: VerificationEvidenceRecord;
|
|
3270
|
+
};
|
|
3271
|
+
declare function evaluatePortableRuntimeAcceptance(input: {
|
|
3272
|
+
context: PortableRuntimeAcceptanceEvaluationContext;
|
|
3273
|
+
evidence: readonly PortableRuntimeAcceptanceEvidence[];
|
|
3274
|
+
definitions?: readonly PortableRuntimeAcceptanceDefinition[];
|
|
3275
|
+
}): PortableRuntimeAcceptanceResult[];
|
|
3276
|
+
declare function evaluatePortableRuntimeAcceptanceArtifact(artifact: PortableRuntimeAcceptanceEvidenceArtifact): PortableRuntimeAcceptanceResult[];
|
|
3277
|
+
declare function parsePortableRuntimeAcceptanceEvidenceArtifact(value: unknown): PortableRuntimeAcceptanceEvidenceArtifact;
|
|
3278
|
+
//#endregion
|
|
3279
|
+
//#region src/services/verification-record.service.d.ts
|
|
3280
|
+
/** Owns durable, redacted evidence. Product surfaces can only read/export it. */
|
|
3281
|
+
declare class VerificationRecordService {
|
|
3282
|
+
private readonly params;
|
|
3283
|
+
private loadPromise;
|
|
3284
|
+
private readonly entries;
|
|
3285
|
+
private mutationQueue;
|
|
3286
|
+
constructor(params: {
|
|
3287
|
+
storePath: string;
|
|
3288
|
+
/**
|
|
3289
|
+
* The Kernel-owned current runtime identity. Generic invocation evidence
|
|
3290
|
+
* obtains its versioned local provenance here; callers never manufacture
|
|
3291
|
+
* a fingerprint from their own observations.
|
|
3292
|
+
*/
|
|
3293
|
+
resolveCurrentIdentity?: (appId: string) => Promise<PortableRuntimeAcceptanceEvaluationContext | undefined>;
|
|
3294
|
+
});
|
|
3295
|
+
record: (input: VerificationRecordInput) => Promise<VerificationEvidenceRecord>;
|
|
3296
|
+
list: (filters?: {
|
|
3297
|
+
acceptanceId?: string;
|
|
3298
|
+
appId?: string;
|
|
3299
|
+
limit?: number;
|
|
3300
|
+
}) => Promise<VerificationRecordList>;
|
|
3301
|
+
export: (filters?: Parameters<VerificationRecordService["list"]>[0]) => Promise<string>;
|
|
3302
|
+
private ensureLoaded;
|
|
3303
|
+
private load;
|
|
3304
|
+
private mutate;
|
|
3305
|
+
private save;
|
|
3306
|
+
private trim;
|
|
3307
|
+
private clone;
|
|
3308
|
+
private parseStore;
|
|
3309
|
+
private normalizeInput;
|
|
3310
|
+
private withCurrentIdentity;
|
|
3311
|
+
private normalizeStoredRecord;
|
|
3312
|
+
private normalizeCurrentRecord;
|
|
3313
|
+
private normalizeLegacyRecord;
|
|
3314
|
+
private normalizeBaseRecord;
|
|
3315
|
+
private isNonEmptyString;
|
|
3316
|
+
private isEvidenceSource;
|
|
3317
|
+
private isObservation;
|
|
3318
|
+
private isMemory;
|
|
3319
|
+
private isError;
|
|
3320
|
+
private isMissing;
|
|
3321
|
+
}
|
|
3322
|
+
//#endregion
|
|
2558
3323
|
//#region src/managers/inbox-delivery.manager.d.ts
|
|
2559
3324
|
declare const MAX_INBOX_DELIVERY_CONTENT_LENGTH: number;
|
|
2560
3325
|
type CreateInboxDeliveryInput = {
|
|
@@ -2777,8 +3542,86 @@ declare class PreferenceManager {
|
|
|
2777
3542
|
private isPlainRecord;
|
|
2778
3543
|
}
|
|
2779
3544
|
//#endregion
|
|
2780
|
-
//#region src/services/
|
|
2781
|
-
type
|
|
3545
|
+
//#region src/services/agent-run-client.service.d.ts
|
|
3546
|
+
type AgentRunReplyOptions = {
|
|
3547
|
+
abortSignal?: AbortSignal;
|
|
3548
|
+
onAssistantDelta?: (delta: string) => void;
|
|
3549
|
+
onEvent?: (event: NcpEndpointEvent$1) => void;
|
|
3550
|
+
missingCompletedMessageError?: string;
|
|
3551
|
+
runErrorMessage?: string;
|
|
3552
|
+
};
|
|
3553
|
+
type AgentRunStreamOptions = {
|
|
3554
|
+
abortSignal?: AbortSignal;
|
|
3555
|
+
onEvent?: (event: NcpEndpointEvent$1) => void;
|
|
3556
|
+
};
|
|
3557
|
+
type AgentRunReply = {
|
|
3558
|
+
handle: NcpRunHandle;
|
|
3559
|
+
text: string;
|
|
3560
|
+
completedMessage: NcpMessage$1;
|
|
3561
|
+
};
|
|
3562
|
+
type AgentRunExecution = {
|
|
3563
|
+
handle: NcpRunHandle;
|
|
3564
|
+
events: AsyncIterable<NcpEndpointEvent$1>;
|
|
3565
|
+
result: Promise<AgentRunReply>;
|
|
3566
|
+
cancel: () => Promise<void>;
|
|
3567
|
+
dispose: () => void;
|
|
3568
|
+
};
|
|
3569
|
+
declare class AgentRunClient {
|
|
3570
|
+
private readonly options;
|
|
3571
|
+
constructor(options: {
|
|
3572
|
+
eventBus: Pick<EventBus$1, "on">;
|
|
3573
|
+
ingress: Pick<Ingress$1, "handle">;
|
|
3574
|
+
});
|
|
3575
|
+
send: (input: AgentRunSendIngressPayload) => Promise<NcpRunHandle>;
|
|
3576
|
+
sendAndWaitForReply: (input: AgentRunSendIngressPayload, options?: AgentRunReplyOptions) => Promise<AgentRunReply>;
|
|
3577
|
+
startRun: (input: AgentRunSendIngressPayload, options?: AgentRunReplyOptions) => Promise<AgentRunExecution>;
|
|
3578
|
+
sendAndStreamEvents: (this: AgentRunClient, input: AgentRunSendIngressPayload, options?: AgentRunStreamOptions) => AsyncGenerator<NcpEndpointEvent$1>;
|
|
3579
|
+
private prepareObserver;
|
|
3580
|
+
private sendWithCorrelation;
|
|
3581
|
+
}
|
|
3582
|
+
//#endregion
|
|
3583
|
+
//#region src/types/portable-service-runner-protocol.types.d.ts
|
|
3584
|
+
type RunnerOperation = "cancel-job" | "deliver-event" | "invoke" | "job-status" | "list-actions" | "start-provider" | "start-resident" | "start-job" | "resolve-host-call" | "stats" | "stop";
|
|
3585
|
+
type PortableRunnerJobEvent = {
|
|
3586
|
+
kind: "job-progress";
|
|
3587
|
+
protocolVersion?: string;
|
|
3588
|
+
jobId: string;
|
|
3589
|
+
sequence: number;
|
|
3590
|
+
current?: number;
|
|
3591
|
+
total?: number;
|
|
3592
|
+
message?: string;
|
|
3593
|
+
} | {
|
|
3594
|
+
kind: "stream-chunk";
|
|
3595
|
+
protocolVersion?: string;
|
|
3596
|
+
jobId: string;
|
|
3597
|
+
sequence: number;
|
|
3598
|
+
content: string;
|
|
3599
|
+
} | {
|
|
3600
|
+
kind: "host-call-request";
|
|
3601
|
+
protocolVersion?: string;
|
|
3602
|
+
hostCallId: string;
|
|
3603
|
+
jobId: string;
|
|
3604
|
+
sequence: number;
|
|
3605
|
+
callId: string;
|
|
3606
|
+
traceId: string;
|
|
3607
|
+
appId: string;
|
|
3608
|
+
capability: string;
|
|
3609
|
+
input: unknown;
|
|
3610
|
+
} | {
|
|
3611
|
+
kind: "job-terminal";
|
|
3612
|
+
protocolVersion?: string;
|
|
3613
|
+
jobId: string;
|
|
3614
|
+
sequence: number;
|
|
3615
|
+
status: "succeeded" | "cancelled" | "timed-out" | "failed" | "interrupted";
|
|
3616
|
+
result?: unknown;
|
|
3617
|
+
error?: {
|
|
3618
|
+
code?: string;
|
|
3619
|
+
message?: string;
|
|
3620
|
+
};
|
|
3621
|
+
};
|
|
3622
|
+
type PortableRunnerHostCallRequest = Extract<PortableRunnerJobEvent, {
|
|
3623
|
+
kind: "host-call-request";
|
|
3624
|
+
}>;
|
|
2782
3625
|
type PortableRunnerObservation = {
|
|
2783
3626
|
operation: RunnerOperation;
|
|
2784
3627
|
appId?: string;
|
|
@@ -2791,6 +3634,239 @@ type PortableRunnerObservation = {
|
|
|
2791
3634
|
logs: string[];
|
|
2792
3635
|
};
|
|
2793
3636
|
//#endregion
|
|
3637
|
+
//#region src/services/service-app-job-journal.service.d.ts
|
|
3638
|
+
type ServiceAppJobScope = {
|
|
3639
|
+
appId: string;
|
|
3640
|
+
instanceId: string;
|
|
3641
|
+
stateDirectory: string;
|
|
3642
|
+
};
|
|
3643
|
+
type ServiceAppJobEventSink = {
|
|
3644
|
+
reportProgress: (input: {
|
|
3645
|
+
current?: number;
|
|
3646
|
+
total?: number;
|
|
3647
|
+
message?: string;
|
|
3648
|
+
}) => Promise<ServiceAppJobEvent | undefined>;
|
|
3649
|
+
emitChunk: (content: string) => Promise<ServiceAppJobEvent>;
|
|
3650
|
+
recordTerminal: (input: {
|
|
3651
|
+
status: ServiceAppTerminalJobStatus;
|
|
3652
|
+
error?: {
|
|
3653
|
+
code?: string;
|
|
3654
|
+
message: string;
|
|
3655
|
+
};
|
|
3656
|
+
}) => Promise<ServiceAppJobView>;
|
|
3657
|
+
};
|
|
3658
|
+
/**
|
|
3659
|
+
* The only durable owner for Service App Job state and stream facts.
|
|
3660
|
+
*
|
|
3661
|
+
* A journal belongs to one installed App instance, so user-visible work never
|
|
3662
|
+
* crosses an App's `stateDirectory`. Verification records deliberately stay
|
|
3663
|
+
* elsewhere and only retain redacted acceptance evidence.
|
|
3664
|
+
*/
|
|
3665
|
+
declare class ServiceAppJobJournalService {
|
|
3666
|
+
private readonly stores;
|
|
3667
|
+
private readonly loadPromises;
|
|
3668
|
+
private readonly mutationQueues;
|
|
3669
|
+
private readonly lastProgressAt;
|
|
3670
|
+
queue: (scope: ServiceAppJobScope, input: {
|
|
3671
|
+
actionName: string;
|
|
3672
|
+
componentId?: string;
|
|
3673
|
+
callId: string;
|
|
3674
|
+
traceId: string;
|
|
3675
|
+
caller?: ServiceAppJobCaller;
|
|
3676
|
+
retryOf?: string;
|
|
3677
|
+
jobId?: string;
|
|
3678
|
+
}) => Promise<ServiceAppJobView>;
|
|
3679
|
+
get: (scope: ServiceAppJobScope, jobId: string) => Promise<ServiceAppJobView>;
|
|
3680
|
+
list: (scope: ServiceAppJobScope) => Promise<ServiceAppJobList>;
|
|
3681
|
+
watch: (scope: ServiceAppJobScope, jobId: string, afterSequence?: number) => Promise<ServiceAppJobWatch>;
|
|
3682
|
+
transition: (scope: ServiceAppJobScope, jobId: string, status: Exclude<ServiceAppJobStatus, ServiceAppTerminalJobStatus>) => Promise<ServiceAppJobView>;
|
|
3683
|
+
requestCancel: (scope: ServiceAppJobScope, jobId: string) => Promise<ServiceAppJobView>;
|
|
3684
|
+
recordTerminal: (scope: ServiceAppJobScope, jobId: string, input: {
|
|
3685
|
+
status: ServiceAppTerminalJobStatus;
|
|
3686
|
+
error?: {
|
|
3687
|
+
code?: string;
|
|
3688
|
+
message: string;
|
|
3689
|
+
};
|
|
3690
|
+
}) => Promise<ServiceAppJobView>;
|
|
3691
|
+
reportProgress: (scope: ServiceAppJobScope, jobId: string, input: {
|
|
3692
|
+
current?: number;
|
|
3693
|
+
total?: number;
|
|
3694
|
+
message?: string;
|
|
3695
|
+
}) => Promise<ServiceAppJobEvent | undefined>;
|
|
3696
|
+
emitChunk: (scope: ServiceAppJobScope, jobId: string, content: string) => Promise<ServiceAppJobEvent>;
|
|
3697
|
+
createEventSink: (scope: ServiceAppJobScope, jobId: string) => ServiceAppJobEventSink;
|
|
3698
|
+
/** Marks durable in-flight work as interrupted after a host restart. */
|
|
3699
|
+
recoverUnfinished: (scopes: readonly ServiceAppJobScope[]) => Promise<void>;
|
|
3700
|
+
private requireJob;
|
|
3701
|
+
private requireJobFromStore;
|
|
3702
|
+
private assertCanTransition;
|
|
3703
|
+
private assertActive;
|
|
3704
|
+
private appendEvent;
|
|
3705
|
+
private ensureLoaded;
|
|
3706
|
+
private load;
|
|
3707
|
+
private mutate;
|
|
3708
|
+
private save;
|
|
3709
|
+
private requireStore;
|
|
3710
|
+
private toView;
|
|
3711
|
+
private cloneEvent;
|
|
3712
|
+
private isTerminal;
|
|
3713
|
+
private eventBytes;
|
|
3714
|
+
private storePath;
|
|
3715
|
+
private jobKey;
|
|
3716
|
+
private isStore;
|
|
3717
|
+
private isJob;
|
|
3718
|
+
private isEvent;
|
|
3719
|
+
private isMissing;
|
|
3720
|
+
}
|
|
3721
|
+
//#endregion
|
|
3722
|
+
//#region src/types/portable-service-app-runtime.types.d.ts
|
|
3723
|
+
type PortableServiceAppHostCall = {
|
|
3724
|
+
app: ServiceAppRecord;
|
|
3725
|
+
manifest: ServiceAppManifest;
|
|
3726
|
+
request: PortableRunnerHostCallRequest;
|
|
3727
|
+
signal: AbortSignal;
|
|
3728
|
+
jobSignal?: AbortSignal;
|
|
3729
|
+
deferTerminal?: (completion: Promise<void>) => void;
|
|
3730
|
+
job?: {
|
|
3731
|
+
jobId: string;
|
|
3732
|
+
eventSink: ServiceAppJobEventSink;
|
|
3733
|
+
callId?: string;
|
|
3734
|
+
traceId?: string;
|
|
3735
|
+
};
|
|
3736
|
+
};
|
|
3737
|
+
type PortableServiceAppHostCallHandler = (call: PortableServiceAppHostCall) => Promise<unknown>;
|
|
3738
|
+
//#endregion
|
|
3739
|
+
//#region src/services/service-app-ai-capability.service.d.ts
|
|
3740
|
+
type ServiceAppAiCapabilityReadiness = {
|
|
3741
|
+
ready: boolean;
|
|
3742
|
+
requiredMissing: Array<{
|
|
3743
|
+
kind: "model" | "agent";
|
|
3744
|
+
slotId: string;
|
|
3745
|
+
}>;
|
|
3746
|
+
bindings: Array<{
|
|
3747
|
+
kind: "model" | "agent";
|
|
3748
|
+
slotId: string;
|
|
3749
|
+
targetId: string;
|
|
3750
|
+
grantedAt: string;
|
|
3751
|
+
}>;
|
|
3752
|
+
};
|
|
3753
|
+
/**
|
|
3754
|
+
* Product authorization owner for portable Service App AI slots. It is
|
|
3755
|
+
* deliberately runner-agnostic: protocol 0.2 can inject these callbacks
|
|
3756
|
+
* without creating a second binding registry or exposing credentials.
|
|
3757
|
+
*/
|
|
3758
|
+
declare class ServiceAppAiCapabilityService {
|
|
3759
|
+
private readonly params;
|
|
3760
|
+
constructor(params: {
|
|
3761
|
+
capabilityGrantManager: CapabilityGrantManager;
|
|
3762
|
+
hasAgent: (agentId: string) => boolean;
|
|
3763
|
+
hasModel: (modelId: string) => boolean;
|
|
3764
|
+
providerManager?: LlmProviderRuntime;
|
|
3765
|
+
llmUsage?: Pick<LlmUsageManager, "observeProviderManager">;
|
|
3766
|
+
agentRunClient?: Pick<AgentRunClient, "startRun">;
|
|
3767
|
+
});
|
|
3768
|
+
inspect: (app: ServiceAppRecord, manifest: ServiceAppManifest) => Promise<ServiceAppAiCapabilityReadiness>;
|
|
3769
|
+
assertReady: (app: ServiceAppRecord, manifest: ServiceAppManifest) => Promise<void>;
|
|
3770
|
+
bindModel: (app: ServiceAppRecord, manifest: ServiceAppManifest, slotId: string, modelId: string) => Promise<ServiceAppAiCapabilityReadiness>;
|
|
3771
|
+
bindAgent: (app: ServiceAppRecord, manifest: ServiceAppManifest, slotId: string, agentId: string) => Promise<ServiceAppAiCapabilityReadiness>;
|
|
3772
|
+
unbind: (app: ServiceAppRecord, manifest: ServiceAppManifest, kind: "model" | "agent", slotId: string) => Promise<ServiceAppAiCapabilityReadiness>;
|
|
3773
|
+
modelComplete: (params: {
|
|
3774
|
+
app: ServiceAppRecord;
|
|
3775
|
+
manifest: ServiceAppManifest;
|
|
3776
|
+
slotId: string;
|
|
3777
|
+
messages: Array<Record<string, unknown>>;
|
|
3778
|
+
maxTokens?: number;
|
|
3779
|
+
signal?: AbortSignal;
|
|
3780
|
+
}) => Promise<_$_nextclaw_core0.LLMResponse>;
|
|
3781
|
+
agentStart: (params: {
|
|
3782
|
+
app: ServiceAppRecord;
|
|
3783
|
+
manifest: ServiceAppManifest;
|
|
3784
|
+
slotId: string;
|
|
3785
|
+
input: AgentRunSendIngressPayload;
|
|
3786
|
+
callId: string;
|
|
3787
|
+
jobId?: string;
|
|
3788
|
+
traceId?: string;
|
|
3789
|
+
signal?: AbortSignal;
|
|
3790
|
+
}) => Promise<AgentRunExecution>;
|
|
3791
|
+
handlePortableHostCall: (call: PortableServiceAppHostCall) => Promise<unknown>;
|
|
3792
|
+
private forwardPortableAgentResult;
|
|
3793
|
+
private listBindings;
|
|
3794
|
+
private requireBoundModel;
|
|
3795
|
+
private requireBoundAgent;
|
|
3796
|
+
private replaceBinding;
|
|
3797
|
+
private requireModelSlot;
|
|
3798
|
+
private requireAgentSlot;
|
|
3799
|
+
private matchesModelGrant;
|
|
3800
|
+
private matchesAgentGrant;
|
|
3801
|
+
private requireProviderRuntime;
|
|
3802
|
+
private clampMaxTokens;
|
|
3803
|
+
private withSlotTimeout;
|
|
3804
|
+
}
|
|
3805
|
+
//#endregion
|
|
3806
|
+
//#region src/services/service-app-resident-event-inbox.service.d.ts
|
|
3807
|
+
type ServiceAppResidentEventScope = {
|
|
3808
|
+
appId: string;
|
|
3809
|
+
instanceId: string;
|
|
3810
|
+
stateDirectory: string;
|
|
3811
|
+
};
|
|
3812
|
+
type ResidentEventInput = {
|
|
3813
|
+
eventId: string;
|
|
3814
|
+
streamKey?: string;
|
|
3815
|
+
payload: Record<string, unknown>;
|
|
3816
|
+
componentId?: string;
|
|
3817
|
+
};
|
|
3818
|
+
type LeasedResidentEvent = ServiceAppResidentEventView & {
|
|
3819
|
+
payload: Record<string, unknown>;
|
|
3820
|
+
};
|
|
3821
|
+
/**
|
|
3822
|
+
* Per installed-App-instance Resident delivery journal. The host owns the
|
|
3823
|
+
* inbox and cursor; the Guest only receives a leased event and returns a
|
|
3824
|
+
* disposition. This deliberately gives at-least-once delivery without
|
|
3825
|
+
* claiming that arbitrary Guest side effects are exactly-once.
|
|
3826
|
+
*/
|
|
3827
|
+
declare class ServiceAppResidentEventInboxService {
|
|
3828
|
+
private readonly stores;
|
|
3829
|
+
private readonly loadPromises;
|
|
3830
|
+
private readonly mutationQueues;
|
|
3831
|
+
enqueue: (scope: ServiceAppResidentEventScope, input: ResidentEventInput) => Promise<ServiceAppResidentEventView>;
|
|
3832
|
+
list: (scope: ServiceAppResidentEventScope, params?: {
|
|
3833
|
+
status?: ServiceAppResidentEventStatus;
|
|
3834
|
+
deadLettersOnly?: boolean;
|
|
3835
|
+
}) => Promise<ServiceAppResidentEventList>;
|
|
3836
|
+
/** Reclaim expired leases then lease one item: one Resident means one lane. */
|
|
3837
|
+
leaseNext: (scope: ServiceAppResidentEventScope, params?: {
|
|
3838
|
+
leaseMs?: number;
|
|
3839
|
+
now?: Date;
|
|
3840
|
+
}) => Promise<LeasedResidentEvent | undefined>;
|
|
3841
|
+
acknowledge: (scope: ServiceAppResidentEventScope, eventId: string) => Promise<ServiceAppResidentEventView>;
|
|
3842
|
+
retry: (scope: ServiceAppResidentEventScope, eventId: string, disposition: Extract<ServiceAppResidentEventDisposition, {
|
|
3843
|
+
kind: "retry";
|
|
3844
|
+
}>) => Promise<ServiceAppResidentEventView>;
|
|
3845
|
+
applyDisposition: (scope: ServiceAppResidentEventScope, eventId: string, disposition: ServiceAppResidentEventDisposition) => Promise<ServiceAppResidentEventView>;
|
|
3846
|
+
replayDeadLetter: (scope: ServiceAppResidentEventScope, eventId: string) => Promise<ServiceAppResidentEventView>;
|
|
3847
|
+
freeze: (scope: ServiceAppResidentEventScope) => Promise<void>;
|
|
3848
|
+
resume: (scope: ServiceAppResidentEventScope) => Promise<void>;
|
|
3849
|
+
private assertEventInput;
|
|
3850
|
+
private retryDelay;
|
|
3851
|
+
private clampLease;
|
|
3852
|
+
private transition;
|
|
3853
|
+
private assertLeased;
|
|
3854
|
+
private requireEvent;
|
|
3855
|
+
private requireEventByEventId;
|
|
3856
|
+
private toView;
|
|
3857
|
+
private toLeased;
|
|
3858
|
+
private ensureLoaded;
|
|
3859
|
+
private load;
|
|
3860
|
+
private mutate;
|
|
3861
|
+
private save;
|
|
3862
|
+
private requireStore;
|
|
3863
|
+
private storePath;
|
|
3864
|
+
private readTime;
|
|
3865
|
+
private isMissing;
|
|
3866
|
+
private isStore;
|
|
3867
|
+
private isEvent;
|
|
3868
|
+
}
|
|
3869
|
+
//#endregion
|
|
2794
3870
|
//#region src/services/service-app-runtime.service.d.ts
|
|
2795
3871
|
type RuntimeCall = {
|
|
2796
3872
|
app: ServiceAppRecord;
|
|
@@ -2802,7 +3878,10 @@ declare class ServiceAppRuntimeService {
|
|
|
2802
3878
|
private readonly protocols;
|
|
2803
3879
|
constructor(params: {
|
|
2804
3880
|
getConfig: () => Config;
|
|
3881
|
+
configPath?: string;
|
|
3882
|
+
appHomeDirectory?: string;
|
|
2805
3883
|
portableServiceRunnerPath?: string;
|
|
3884
|
+
residentInbox?: ServiceAppResidentEventInboxService;
|
|
2806
3885
|
});
|
|
2807
3886
|
getStatus: (appId: string) => {
|
|
2808
3887
|
status: ServiceAppRuntimeStatus;
|
|
@@ -2812,22 +3891,194 @@ declare class ServiceAppRuntimeService {
|
|
|
2812
3891
|
lastFailedAt?: string;
|
|
2813
3892
|
};
|
|
2814
3893
|
getLastObservation: () => PortableRunnerObservation | undefined;
|
|
3894
|
+
/** One kernel-owned callback path for Guest host calls; MCP never receives it. */
|
|
3895
|
+
setPortableHostCallHandler: (handler: PortableServiceAppHostCallHandler | undefined) => void;
|
|
2815
3896
|
start: (call: RuntimeCall) => Promise<void>;
|
|
2816
3897
|
listActions: (call: RuntimeCall) => Promise<ServiceAction[]>;
|
|
2817
3898
|
invokeAction: (call: RuntimeCall & {
|
|
2818
3899
|
actionName: string;
|
|
2819
3900
|
input: Record<string, unknown>;
|
|
3901
|
+
job?: {
|
|
3902
|
+
jobId: string;
|
|
3903
|
+
eventSink: ServiceAppJobEventSink;
|
|
3904
|
+
callId?: string;
|
|
3905
|
+
traceId?: string;
|
|
3906
|
+
};
|
|
2820
3907
|
}) => Promise<unknown>;
|
|
2821
3908
|
stop: (appId: string) => Promise<void>;
|
|
2822
3909
|
restart: (appId: string) => Promise<void>;
|
|
3910
|
+
cancelJob: (params: {
|
|
3911
|
+
appId: string;
|
|
3912
|
+
instanceId: string;
|
|
3913
|
+
jobId: string;
|
|
3914
|
+
}) => Promise<void>;
|
|
3915
|
+
enqueueResidentEvent: (call: RuntimeCall & {
|
|
3916
|
+
eventId: string;
|
|
3917
|
+
streamKey?: string;
|
|
3918
|
+
payload: Record<string, unknown>;
|
|
3919
|
+
}) => Promise<ServiceAppResidentEventView>;
|
|
2823
3920
|
dispose: () => Promise<void>;
|
|
2824
3921
|
}
|
|
2825
3922
|
//#endregion
|
|
3923
|
+
//#region src/managers/service-app-job.manager.d.ts
|
|
3924
|
+
type ServiceAppLookup = (appId: string, materializeStorage?: boolean) => Promise<{
|
|
3925
|
+
manifest: ServiceAppManifest;
|
|
3926
|
+
record: ServiceAppRecord;
|
|
3927
|
+
}>;
|
|
3928
|
+
type JobRuntime = {
|
|
3929
|
+
invokeAction: (params: {
|
|
3930
|
+
app: ServiceAppRecord;
|
|
3931
|
+
manifest: ServiceAppManifest;
|
|
3932
|
+
actionName: string;
|
|
3933
|
+
input: Record<string, unknown>;
|
|
3934
|
+
job: {
|
|
3935
|
+
jobId: string;
|
|
3936
|
+
eventSink: ServiceAppJobEventSink;
|
|
3937
|
+
callId: string;
|
|
3938
|
+
traceId: string;
|
|
3939
|
+
};
|
|
3940
|
+
}) => Promise<unknown>;
|
|
3941
|
+
cancelJob?: (params: {
|
|
3942
|
+
appId: string;
|
|
3943
|
+
instanceId: string;
|
|
3944
|
+
jobId: string;
|
|
3945
|
+
}) => Promise<void>;
|
|
3946
|
+
enqueueResidentEvent?: (params: {
|
|
3947
|
+
app: ServiceAppRecord;
|
|
3948
|
+
manifest: ServiceAppManifest;
|
|
3949
|
+
eventId: string;
|
|
3950
|
+
streamKey?: string;
|
|
3951
|
+
payload: Record<string, unknown>;
|
|
3952
|
+
}) => Promise<ServiceAppResidentEventView>;
|
|
3953
|
+
getLastObservation?: () => PortableRunnerObservation | undefined;
|
|
3954
|
+
};
|
|
3955
|
+
declare class ServiceAppJobManager {
|
|
3956
|
+
private readonly params;
|
|
3957
|
+
constructor(params: {
|
|
3958
|
+
journal: ServiceAppJobJournalService;
|
|
3959
|
+
residentInbox: ServiceAppResidentEventInboxService;
|
|
3960
|
+
runtime: JobRuntime;
|
|
3961
|
+
verificationRecords?: VerificationRecordService;
|
|
3962
|
+
requireServiceApp: ServiceAppLookup;
|
|
3963
|
+
listPackageComponentSources: () => Promise<AppPackageComponentSource[]>;
|
|
3964
|
+
});
|
|
3965
|
+
listVerificationRecords: (filters?: {
|
|
3966
|
+
acceptanceId?: string;
|
|
3967
|
+
appId?: string;
|
|
3968
|
+
limit?: number;
|
|
3969
|
+
}) => Promise<VerificationRecordList>;
|
|
3970
|
+
exportVerificationRecords: (filters?: {
|
|
3971
|
+
acceptanceId?: string;
|
|
3972
|
+
appId?: string;
|
|
3973
|
+
limit?: number;
|
|
3974
|
+
}) => Promise<string>;
|
|
3975
|
+
list: (appId: string, caller?: ServiceAppJobCaller) => Promise<ServiceAppJobList>;
|
|
3976
|
+
get: (appId: string, jobId: string, caller?: ServiceAppJobCaller) => Promise<ServiceAppJobView>;
|
|
3977
|
+
watch: (appId: string, jobId: string, afterSequence?: number, caller?: ServiceAppJobCaller) => Promise<ServiceAppJobWatch>;
|
|
3978
|
+
cancel: (appId: string, jobId: string, caller?: ServiceAppJobCaller) => Promise<ServiceAppJobView>;
|
|
3979
|
+
listResidentInbox: (appId: string, deadLettersOnly?: boolean) => Promise<ServiceAppResidentEventList>;
|
|
3980
|
+
replayResidentDeadLetter: (appId: string, eventId: string) => Promise<ServiceAppResidentEventView>;
|
|
3981
|
+
enqueueResidentEvent: (appId: string, input: ResidentEventInput) => Promise<ServiceAppResidentEventView>;
|
|
3982
|
+
create: (params: {
|
|
3983
|
+
record: ServiceAppRecord;
|
|
3984
|
+
actionName: string;
|
|
3985
|
+
callId: string;
|
|
3986
|
+
traceId: string;
|
|
3987
|
+
caller?: ServiceAppJobCaller;
|
|
3988
|
+
retryOf?: string;
|
|
3989
|
+
jobId?: string;
|
|
3990
|
+
}) => Promise<ServiceAppJobView>;
|
|
3991
|
+
createEventSink: (record: ServiceAppRecord, jobId: string) => ServiceAppJobEventSink;
|
|
3992
|
+
invoke: (params: {
|
|
3993
|
+
actionId: string;
|
|
3994
|
+
actionName: string;
|
|
3995
|
+
record: ServiceAppRecord;
|
|
3996
|
+
manifest: ServiceAppManifest;
|
|
3997
|
+
input: Record<string, unknown>;
|
|
3998
|
+
role: "panel" | "agent" | "cli";
|
|
3999
|
+
entrySurface: "panel" | "agent" | "installed-app-cli";
|
|
4000
|
+
}) => Promise<ServiceActionInvokeResult>;
|
|
4001
|
+
private recordInvocation;
|
|
4002
|
+
private requireJobScope;
|
|
4003
|
+
private requireResidentInboxScope;
|
|
4004
|
+
private requireRecordScope;
|
|
4005
|
+
private isVisible;
|
|
4006
|
+
private assertVisible;
|
|
4007
|
+
}
|
|
4008
|
+
//#endregion
|
|
2826
4009
|
//#region src/services/service-app-record.service.d.ts
|
|
4010
|
+
type ServiceAppStatusReader = {
|
|
4011
|
+
getStatus: (appId: string) => {
|
|
4012
|
+
status: ServiceAppRecord["status"];
|
|
4013
|
+
lastError?: string;
|
|
4014
|
+
lastStartedAt?: string;
|
|
4015
|
+
lastReadyAt?: string;
|
|
4016
|
+
lastFailedAt?: string;
|
|
4017
|
+
};
|
|
4018
|
+
};
|
|
2827
4019
|
type WorkspaceServiceDataOwner = {
|
|
2828
4020
|
id: string;
|
|
2829
4021
|
title: string;
|
|
2830
4022
|
};
|
|
4023
|
+
declare class ServiceAppRecordService {
|
|
4024
|
+
private readonly params;
|
|
4025
|
+
private readonly instanceStorageService;
|
|
4026
|
+
constructor(params: {
|
|
4027
|
+
getWorkspacePath: () => string;
|
|
4028
|
+
runtimeService: ServiceAppStatusReader;
|
|
4029
|
+
listPackageComponentSources?: () => Promise<AppPackageComponentSource[]>;
|
|
4030
|
+
listWorkspaceDirectoryNames?: (serviceAppsPath: string) => Promise<string[]>;
|
|
4031
|
+
});
|
|
4032
|
+
buildWorkspaceRecord: (serviceAppsPath: string, dirName: string) => Promise<ServiceAppRecord | null>;
|
|
4033
|
+
buildPackageRecord: (source: AppPackageComponentSource) => Promise<ServiceAppRecord | null>;
|
|
4034
|
+
require: (appId: string, materializeStorage?: boolean) => Promise<{
|
|
4035
|
+
manifest: ServiceAppManifest;
|
|
4036
|
+
record: ServiceAppRecord;
|
|
4037
|
+
}>;
|
|
4038
|
+
listValid: () => Promise<Array<{
|
|
4039
|
+
manifest: ServiceAppManifest;
|
|
4040
|
+
record: ServiceAppRecord;
|
|
4041
|
+
}>>;
|
|
4042
|
+
listWorkspaceDataOwners: (serviceAppsPath: string, dirNames: string[]) => Promise<WorkspaceServiceDataOwner[]>;
|
|
4043
|
+
materializeWorkspaceStorage: (serviceId: string) => Promise<AppStorageContext>;
|
|
4044
|
+
inspectWorkspaceStorage: (serviceId: string) => Promise<AppStorageContext | undefined>;
|
|
4045
|
+
fromManifest: (dirPath: string, manifest: ServiceAppManifest, packageSource?: AppPackageComponentSource, storage?: AppStorageContext) => ServiceAppRecord;
|
|
4046
|
+
private failedWorkspaceRecord;
|
|
4047
|
+
private failedPackageRecord;
|
|
4048
|
+
private toTitle;
|
|
4049
|
+
private getWorkspaceInstanceDirectory;
|
|
4050
|
+
private pathExists;
|
|
4051
|
+
private isMissingFileError;
|
|
4052
|
+
}
|
|
4053
|
+
//#endregion
|
|
4054
|
+
//#region src/managers/service-app-ai.manager.d.ts
|
|
4055
|
+
declare class ServiceAppAiManager {
|
|
4056
|
+
private readonly params;
|
|
4057
|
+
constructor(params: {
|
|
4058
|
+
capabilities: ServiceAppAiCapabilityService;
|
|
4059
|
+
records: ServiceAppRecordService;
|
|
4060
|
+
});
|
|
4061
|
+
inspect: (appId: string) => Promise<ServiceAppAiCapabilityReadiness>;
|
|
4062
|
+
bindModel: (appId: string, slotId: string, modelId: string) => Promise<ServiceAppAiCapabilityReadiness>;
|
|
4063
|
+
bindAgent: (appId: string, slotId: string, agentId: string) => Promise<ServiceAppAiCapabilityReadiness>;
|
|
4064
|
+
unbind: (appId: string, kind: "model" | "agent", slotId: string) => Promise<ServiceAppAiCapabilityReadiness>;
|
|
4065
|
+
completeModel: (params: {
|
|
4066
|
+
appId: string;
|
|
4067
|
+
slotId: string;
|
|
4068
|
+
messages: Array<Record<string, unknown>>;
|
|
4069
|
+
maxTokens?: number;
|
|
4070
|
+
signal?: AbortSignal;
|
|
4071
|
+
}) => Promise<_$_nextclaw_core0.LLMResponse>;
|
|
4072
|
+
startAgent: (params: {
|
|
4073
|
+
appId: string;
|
|
4074
|
+
slotId: string;
|
|
4075
|
+
input: AgentRunSendIngressPayload;
|
|
4076
|
+
callId: string;
|
|
4077
|
+
jobId?: string;
|
|
4078
|
+
traceId?: string;
|
|
4079
|
+
signal?: AbortSignal;
|
|
4080
|
+
}) => Promise<AgentRunExecution>;
|
|
4081
|
+
}
|
|
2831
4082
|
//#endregion
|
|
2832
4083
|
//#region src/services/service-app-removal.service.d.ts
|
|
2833
4084
|
type ServiceAppRemovalDiagnostic = {
|
|
@@ -2837,7 +4088,7 @@ type ServiceAppRemovalDiagnostic = {
|
|
|
2837
4088
|
};
|
|
2838
4089
|
//#endregion
|
|
2839
4090
|
//#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";
|
|
4091
|
+
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
4092
|
declare class ServiceAppError extends Error {
|
|
2842
4093
|
readonly code: ServiceAppErrorCode;
|
|
2843
4094
|
readonly details?: Record<string, unknown> | undefined;
|
|
@@ -2865,19 +4116,40 @@ declare class ServiceAppManager {
|
|
|
2865
4116
|
private readonly actionGrants;
|
|
2866
4117
|
private readonly packageRuntime;
|
|
2867
4118
|
private readonly lifecycleService;
|
|
4119
|
+
readonly aiCapabilities: ServiceAppAiCapabilityService;
|
|
4120
|
+
private readonly aiManager;
|
|
4121
|
+
private readonly verificationRecords?;
|
|
4122
|
+
private readonly jobJournal;
|
|
4123
|
+
private readonly jobManager;
|
|
4124
|
+
private readonly activationManager;
|
|
4125
|
+
private readonly residentInbox;
|
|
2868
4126
|
private reconciliationDiagnostics;
|
|
2869
4127
|
constructor(params: {
|
|
4128
|
+
appHomeDirectory?: string;
|
|
2870
4129
|
configManager: ConfigManager;
|
|
2871
4130
|
runtimeService?: ServiceAppRuntime;
|
|
2872
4131
|
listPackageComponentSources?: () => Promise<AppPackageComponentSource[]>;
|
|
2873
4132
|
capabilityGrantManager: CapabilityGrantManager;
|
|
2874
4133
|
hasAgent?: (agentId: string) => boolean;
|
|
4134
|
+
providerManager?: LlmProviderRuntime;
|
|
4135
|
+
llmUsage?: Pick<LlmUsageManager, "observeProviderManager">;
|
|
4136
|
+
agentRunClient?: Pick<AgentRunClient, "startRun">;
|
|
2875
4137
|
portableServiceRunnerPath?: string;
|
|
4138
|
+
verificationRecords?: VerificationRecordService;
|
|
4139
|
+
jobJournal?: ServiceAppJobJournalService;
|
|
4140
|
+
residentInbox?: ServiceAppResidentEventInboxService;
|
|
2876
4141
|
});
|
|
2877
4142
|
start: () => Promise<void>;
|
|
2878
4143
|
listServiceApps: () => Promise<ServiceAppList>;
|
|
2879
4144
|
listCapabilityProviders: () => Promise<CapabilityProviderView[]>;
|
|
2880
4145
|
getServiceApp: (appId: string) => Promise<ServiceAppRecord>;
|
|
4146
|
+
inspectServiceAppAiCapabilities: (appId: string) => Promise<ServiceAppAiCapabilityReadiness>;
|
|
4147
|
+
verifyServiceAppAiCapabilities: (appId: string) => Promise<ServiceAppAiCapabilityReadiness>;
|
|
4148
|
+
bindServiceAppModelSlot: (appId: string, slotId: string, modelId: string) => Promise<ServiceAppAiCapabilityReadiness>;
|
|
4149
|
+
bindServiceAppAgentSlot: (appId: string, slotId: string, agentId: string) => Promise<ServiceAppAiCapabilityReadiness>;
|
|
4150
|
+
unbindServiceAppAiSlot: (appId: string, kind: "model" | "agent", slotId: string) => Promise<ServiceAppAiCapabilityReadiness>;
|
|
4151
|
+
completeServiceAppModelSlot: (params: Parameters<ServiceAppAiManager["completeModel"]>[0]) => Promise<_$_nextclaw_core0.LLMResponse>;
|
|
4152
|
+
startServiceAppAgentSlot: (params: Parameters<ServiceAppAiManager["startAgent"]>[0]) => Promise<AgentRunExecution>;
|
|
2881
4153
|
listServiceActions: (params?: {
|
|
2882
4154
|
caller?: ServiceActionCaller;
|
|
2883
4155
|
appId?: string;
|
|
@@ -2885,6 +4157,40 @@ declare class ServiceAppManager {
|
|
|
2885
4157
|
}) => Promise<ServiceAction[]>;
|
|
2886
4158
|
discoverServiceAppActions: (appId: string) => Promise<ServiceAction[]>;
|
|
2887
4159
|
invokeServiceAction: (actionId: string, request: ServiceActionInvokeRequest) => Promise<ServiceActionInvokeResult>;
|
|
4160
|
+
/**
|
|
4161
|
+
* Calls a Service component belonging to an enabled installed package.
|
|
4162
|
+
* This is deliberately separate from source-tree `nextclaw app call`.
|
|
4163
|
+
*/
|
|
4164
|
+
invokeInstalledServiceAction: (appId: string, actionName: string, input?: Record<string, unknown>) => Promise<ServiceActionInvokeResult>;
|
|
4165
|
+
listVerificationRecords: (filters?: {
|
|
4166
|
+
acceptanceId?: string;
|
|
4167
|
+
appId?: string;
|
|
4168
|
+
limit?: number;
|
|
4169
|
+
}) => Promise<VerificationRecordList>;
|
|
4170
|
+
exportVerificationRecords: (filters?: {
|
|
4171
|
+
acceptanceId?: string;
|
|
4172
|
+
appId?: string;
|
|
4173
|
+
limit?: number;
|
|
4174
|
+
}) => Promise<string>;
|
|
4175
|
+
listServiceAppJobs: (appId: string, params?: {
|
|
4176
|
+
caller?: ServiceAppJobCaller;
|
|
4177
|
+
}) => Promise<ServiceAppJobList>;
|
|
4178
|
+
getServiceAppJob: (appId: string, jobId: string, params?: {
|
|
4179
|
+
caller?: ServiceAppJobCaller;
|
|
4180
|
+
}) => Promise<ServiceAppJobView>;
|
|
4181
|
+
watchServiceAppJob: (appId: string, jobId: string, afterSequence?: number, params?: {
|
|
4182
|
+
caller?: ServiceAppJobCaller;
|
|
4183
|
+
}) => Promise<ServiceAppJobWatch>;
|
|
4184
|
+
cancelServiceAppJob: (appId: string, jobId: string, params?: {
|
|
4185
|
+
caller?: ServiceAppJobCaller;
|
|
4186
|
+
}) => Promise<ServiceAppJobView>;
|
|
4187
|
+
listResidentInbox: (appId: string, params?: {
|
|
4188
|
+
deadLettersOnly?: boolean;
|
|
4189
|
+
}) => Promise<ServiceAppResidentEventList>;
|
|
4190
|
+
replayResidentDeadLetter: (appId: string, eventId: string) => Promise<ServiceAppResidentEventView>;
|
|
4191
|
+
enqueueResidentEvent: (appId: string, input: ResidentEventInput) => Promise<ServiceAppResidentEventView>;
|
|
4192
|
+
createServiceAppJob: (params: Parameters<ServiceAppJobManager["create"]>[0]) => Promise<ServiceAppJobView>;
|
|
4193
|
+
createServiceAppJobEventSink: (record: ServiceAppRecord, jobId: string) => ServiceAppJobEventSink;
|
|
2888
4194
|
grantServiceAction: (actionId: string, request: ServiceActionGrantRequest) => Promise<ServiceActionGrant>;
|
|
2889
4195
|
grantServiceActions: (actionIds: readonly string[], request: ServiceActionGrantRequest) => Promise<ServiceActionGrant[]>;
|
|
2890
4196
|
listServiceActionGrants: () => Promise<ServiceActionGrant[]>;
|
|
@@ -2902,9 +4208,9 @@ declare class ServiceAppManager {
|
|
|
2902
4208
|
private withGrantState;
|
|
2903
4209
|
private requireServiceAction;
|
|
2904
4210
|
private requireServiceAppForAction;
|
|
2905
|
-
private
|
|
2906
|
-
private listValidServiceApps;
|
|
4211
|
+
private requireInstalledServiceApp;
|
|
2907
4212
|
private normalizeActionIds;
|
|
4213
|
+
private toJobScope;
|
|
2908
4214
|
private getWorkspacePath;
|
|
2909
4215
|
private getServiceAppsPath;
|
|
2910
4216
|
private getServiceAppLockPath;
|
|
@@ -2912,7 +4218,15 @@ declare class ServiceAppManager {
|
|
|
2912
4218
|
private listServiceAppDirNames;
|
|
2913
4219
|
private isMissingFileError;
|
|
2914
4220
|
}
|
|
2915
|
-
type ServiceAppRuntime = Pick<ServiceAppRuntimeService, "dispose" | "getStatus" | "invokeAction" | "listActions" | "restart" | "stop"> & Pick<Partial<ServiceAppRuntimeService>, "start"
|
|
4221
|
+
type ServiceAppRuntime = Pick<ServiceAppRuntimeService, "dispose" | "getLastObservation" | "getStatus" | "invokeAction" | "listActions" | "restart" | "stop"> & Pick<Partial<ServiceAppRuntimeService>, "start"> & {
|
|
4222
|
+
cancelJob?: (params: {
|
|
4223
|
+
appId: string;
|
|
4224
|
+
instanceId: string;
|
|
4225
|
+
jobId: string;
|
|
4226
|
+
}) => Promise<void>;
|
|
4227
|
+
enqueueResidentEvent?: ServiceAppRuntimeService["enqueueResidentEvent"];
|
|
4228
|
+
setPortableHostCallHandler?: ServiceAppRuntimeService["setPortableHostCallHandler"];
|
|
4229
|
+
}; //# sourceMappingURL=service-app.manager.d.ts.map
|
|
2916
4230
|
//#endregion
|
|
2917
4231
|
//#region src/utils/skill-frontmatter.utils.d.ts
|
|
2918
4232
|
type LocalizedTextMap = Record<string, string>;
|
|
@@ -3046,13 +4360,123 @@ declare class FeatureControlsService {
|
|
|
3046
4360
|
get: () => Promise<ProductFeatureControls>;
|
|
3047
4361
|
}
|
|
3048
4362
|
//#endregion
|
|
4363
|
+
//#region src/utils/portable-runtime-acceptance-presentation.utils.d.ts
|
|
4364
|
+
/**
|
|
4365
|
+
* The only product-language owner for the portable-runtime acceptance
|
|
4366
|
+
* contract. Every surface receives this projection from the Kernel instead of
|
|
4367
|
+
* carrying a parallel list of PRT ids or translations.
|
|
4368
|
+
*/
|
|
4369
|
+
declare const PORTABLE_RUNTIME_ACCEPTANCE_LOCALES: readonly ["zh-CN", "en"];
|
|
4370
|
+
type PortableRuntimeAcceptanceLocale = (typeof PORTABLE_RUNTIME_ACCEPTANCE_LOCALES)[number];
|
|
4371
|
+
type PortableRuntimeAcceptancePresentation = {
|
|
4372
|
+
title: string;
|
|
4373
|
+
description: string;
|
|
4374
|
+
};
|
|
4375
|
+
type PortableRuntimeAcceptancePresentationCatalog = Record<PortableRuntimeAcceptanceLocale, Record<string, string>>;
|
|
4376
|
+
declare const PORTABLE_RUNTIME_ACCEPTANCE_PRESENTATION: PortableRuntimeAcceptancePresentationCatalog;
|
|
4377
|
+
declare function resolvePortableRuntimeAcceptanceLocale(value: unknown): PortableRuntimeAcceptanceLocale;
|
|
4378
|
+
declare function presentPortableRuntimeAcceptanceDefinition(definition: PortableRuntimeAcceptanceDefinition, locale: PortableRuntimeAcceptanceLocale): PortableRuntimeAcceptancePresentation;
|
|
4379
|
+
//#endregion
|
|
4380
|
+
//#region src/services/portable-runtime-acceptance-identity.service.d.ts
|
|
4381
|
+
type PortableRuntimeAcceptanceIdentity = {
|
|
4382
|
+
available: true;
|
|
4383
|
+
context: PortableRuntimeAcceptanceEvaluationContext;
|
|
4384
|
+
runtimeVersionSource: "configured" | "product-version-fallback";
|
|
4385
|
+
runnerFingerprint: string;
|
|
4386
|
+
};
|
|
4387
|
+
type PortableRuntimeAcceptanceUnavailableIdentity = {
|
|
4388
|
+
available: false;
|
|
4389
|
+
reason: string;
|
|
4390
|
+
environment: PortableRuntimeAcceptancePlatform | null;
|
|
4391
|
+
productVersion: string | null;
|
|
4392
|
+
runtimeVersion: string | null;
|
|
4393
|
+
runtimeVersionSource: "configured" | "product-version-fallback" | null;
|
|
4394
|
+
};
|
|
4395
|
+
type PortableRuntimeAcceptanceIdentityResult = PortableRuntimeAcceptanceIdentity | PortableRuntimeAcceptanceUnavailableIdentity;
|
|
4396
|
+
/**
|
|
4397
|
+
* Resolves the identity against which evidence is judged. It deliberately
|
|
4398
|
+
* reads the currently distributed runner rather than deriving identity from a
|
|
4399
|
+
* previous VerificationRecord, so an updated runtime cannot self-certify with
|
|
4400
|
+
* its own old evidence.
|
|
4401
|
+
*/
|
|
4402
|
+
declare class PortableRuntimeAcceptanceIdentityService {
|
|
4403
|
+
private readonly params;
|
|
4404
|
+
private cachedRunner;
|
|
4405
|
+
constructor(params: {
|
|
4406
|
+
productVersion?: string;
|
|
4407
|
+
runtimeVersion?: string;
|
|
4408
|
+
portableServiceRunnerPath?: string;
|
|
4409
|
+
platform?: NodeJS.Platform;
|
|
4410
|
+
arch?: string;
|
|
4411
|
+
});
|
|
4412
|
+
resolve: (appId: string) => Promise<PortableRuntimeAcceptanceIdentityResult>;
|
|
4413
|
+
private fingerprintRunner;
|
|
4414
|
+
}
|
|
4415
|
+
declare function normalizePortableRuntimeEnvironment(platform: NodeJS.Platform, arch: string): PortableRuntimeAcceptancePlatform | null;
|
|
4416
|
+
//#endregion
|
|
4417
|
+
//#region src/services/portable-runtime-acceptance-manager.service.d.ts
|
|
4418
|
+
/** The fixed installed App used for the canonical portable-runtime acceptance matrix. */
|
|
4419
|
+
declare const PORTABLE_RUNTIME_ACCEPTANCE_REFERENCE_APP_ID = "nextclaw.github-issue-watcher";
|
|
4420
|
+
type PortableRuntimeAcceptanceContractView = {
|
|
4421
|
+
contractFingerprint: string;
|
|
4422
|
+
locale: PortableRuntimeAcceptanceLocale;
|
|
4423
|
+
definitions: PortableRuntimeAcceptanceDefinitionView[];
|
|
4424
|
+
};
|
|
4425
|
+
type PortableRuntimeAcceptanceDefinitionView = PortableRuntimeAcceptanceDefinition & {
|
|
4426
|
+
presentation: PortableRuntimeAcceptancePresentation;
|
|
4427
|
+
};
|
|
4428
|
+
/**
|
|
4429
|
+
* The evaluator always has a concrete platform. Product status additionally
|
|
4430
|
+
* represents an unavailable identity, where the host may itself be unknown.
|
|
4431
|
+
*/
|
|
4432
|
+
type PortableRuntimeAcceptanceSurfaceResult = Omit<PortableRuntimeAcceptanceResult, "environment"> & {
|
|
4433
|
+
environment: PortableRuntimeAcceptancePlatform | null;
|
|
4434
|
+
};
|
|
4435
|
+
type PortableRuntimeAcceptanceStatusEntry = PortableRuntimeAcceptanceDefinitionView & {
|
|
4436
|
+
result: PortableRuntimeAcceptanceSurfaceResult;
|
|
4437
|
+
};
|
|
4438
|
+
type PortableRuntimeAcceptanceStatusView = {
|
|
4439
|
+
schemaVersion: 1;
|
|
4440
|
+
contract: PortableRuntimeAcceptanceContractView;
|
|
4441
|
+
appId: string;
|
|
4442
|
+
identity: PortableRuntimeAcceptanceIdentityResult;
|
|
4443
|
+
entries: PortableRuntimeAcceptanceStatusEntry[];
|
|
4444
|
+
summary: Record<PortableRuntimeAcceptanceResultStatus, number>;
|
|
4445
|
+
};
|
|
4446
|
+
/**
|
|
4447
|
+
* Read-only product projection over the single contract registry and durable
|
|
4448
|
+
* records. No Panel, API route, or CLI command computes an acceptance state.
|
|
4449
|
+
*/
|
|
4450
|
+
declare class PortableRuntimeAcceptanceManager {
|
|
4451
|
+
private readonly params;
|
|
4452
|
+
constructor(params: {
|
|
4453
|
+
verificationRecords: VerificationRecordService;
|
|
4454
|
+
identity: PortableRuntimeAcceptanceIdentityService; /** Test-only injection keeps the production source the canonical registry. */
|
|
4455
|
+
definitions?: readonly PortableRuntimeAcceptanceDefinition[];
|
|
4456
|
+
});
|
|
4457
|
+
private get definitions();
|
|
4458
|
+
contract: (locale?: unknown) => PortableRuntimeAcceptanceContractView;
|
|
4459
|
+
status: (params?: {
|
|
4460
|
+
appId?: string;
|
|
4461
|
+
locale?: unknown;
|
|
4462
|
+
}) => Promise<PortableRuntimeAcceptanceStatusView>;
|
|
4463
|
+
export: (params?: {
|
|
4464
|
+
appId?: string;
|
|
4465
|
+
locale?: unknown;
|
|
4466
|
+
}) => Promise<PortableRuntimeAcceptanceStatusView>;
|
|
4467
|
+
private present;
|
|
4468
|
+
private groupEvidence;
|
|
4469
|
+
private unavailableResults;
|
|
4470
|
+
}
|
|
4471
|
+
//#endregion
|
|
3049
4472
|
//#region src/app/nextclaw-kernel.d.ts
|
|
3050
4473
|
type NextclawKernelOptions = {
|
|
3051
4474
|
homeDir?: string;
|
|
3052
4475
|
configPath?: string;
|
|
3053
4476
|
builtInAppsDirectory?: string;
|
|
3054
4477
|
portableServiceRunnerPath?: string;
|
|
3055
|
-
productVersion?: string;
|
|
4478
|
+
productVersion?: string; /** Version of the active runtime bundle; local development falls back to productVersion. */
|
|
4479
|
+
runtimeVersion?: string;
|
|
3056
4480
|
productActivitySink?: ProductActivitySink;
|
|
3057
4481
|
desktopHost?: DesktopHost;
|
|
3058
4482
|
};
|
|
@@ -3096,6 +4520,7 @@ declare class NextclawKernel {
|
|
|
3096
4520
|
readonly panelAppManager: PanelAppManager;
|
|
3097
4521
|
readonly preferenceManager: PreferenceManager;
|
|
3098
4522
|
readonly projectManager: ProjectManager;
|
|
4523
|
+
readonly projectObservation: ProjectObservationService;
|
|
3099
4524
|
readonly serviceAppManager: ServiceAppManager;
|
|
3100
4525
|
readonly extensions: ExtensionManager;
|
|
3101
4526
|
readonly agentRuntimeManager: AgentRuntimeManager;
|
|
@@ -3109,6 +4534,8 @@ declare class NextclawKernel {
|
|
|
3109
4534
|
readonly observations: ObservationManager;
|
|
3110
4535
|
readonly capabilityGrants: CapabilityGrantManager;
|
|
3111
4536
|
readonly featureControls: FeatureControlsService;
|
|
4537
|
+
readonly verificationRecords: VerificationRecordService;
|
|
4538
|
+
readonly portableRuntimeAcceptance: PortableRuntimeAcceptanceManager;
|
|
3112
4539
|
private readonly capabilityGrantLegacyMigration;
|
|
3113
4540
|
private readonly ncpAgentSessionJournalStore;
|
|
3114
4541
|
private readonly contributions;
|
|
@@ -3169,44 +4596,6 @@ type BuildAgentRunSendPayloadParams = {
|
|
|
3169
4596
|
};
|
|
3170
4597
|
declare function buildAgentRunSendPayload(params: BuildAgentRunSendPayloadParams): Promise<AgentRunSendIngressPayload>;
|
|
3171
4598
|
//#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
4599
|
//#region src/features/ncp-dispatch/services/gateway-inbound-processor.service.d.ts
|
|
3211
4600
|
type GatewayInboundLoopRuntime = {
|
|
3212
4601
|
kernel: {
|
|
@@ -3818,7 +5207,6 @@ type NextclawNcpResolvedRunContext = {
|
|
|
3818
5207
|
effectiveWorkspace: string;
|
|
3819
5208
|
profile: NextclawNcpResolvedAgentProfile;
|
|
3820
5209
|
requestMetadata: Record<string, unknown>;
|
|
3821
|
-
requestedSkills: ReturnType<RequestedSkillsMetadataReader["readSelection"]>;
|
|
3822
5210
|
requestedToolNames: string[];
|
|
3823
5211
|
runtimeThinking: ReturnType<typeof resolveThinkingLevel>;
|
|
3824
5212
|
sessionKey: string;
|
|
@@ -3860,5 +5248,5 @@ declare function resolveLegacyEventType(message: SessionMessage): string;
|
|
|
3860
5248
|
declare function getUiContentParamsBootstrapScript(): string;
|
|
3861
5249
|
declare function injectUiContentParamsBootstrap(html: string): string;
|
|
3862
5250
|
//#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 };
|
|
5251
|
+
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, ObservedActivity, ObservedArtifact, ObservedArtifactCategory, ObservedProjectContext, ObservedProjectContextReference, ObservedProjectRun, ObservedRequest, ObservedSignal, ObservedSkill, ObservedWorkItem, ObservedWorkItemSchedule, ObservedWorkflow, ObservedWorkflowStage, 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_OBSERVATION_PROTOCOL, 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, ProjectObservationDataQuality, ProjectObservationDiagnostic, ProjectObservationError, ProjectObservationEvidenceKind, ProjectObservationReference, ProjectObservationService, ProjectObservationSnapshot, ProjectObservationSourceStatus, 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, isProjectObservationError, 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
5252
|
//# sourceMappingURL=index.d.ts.map
|