@crewx/sdk 0.9.0-rc.125 → 0.9.0-rc.126
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/esm/index.js +188 -188
- package/dist/esm/publish/index.js +2 -2
- package/dist/index.browser.js +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +192 -192
- package/dist/mcp-app/agent-access.d.ts +12 -1
- package/dist/mcp-app/bundle-provenance.d.ts +2 -0
- package/dist/mcp-app/discovery.d.ts +5 -0
- package/dist/mcp-app/index.d.ts +7 -7
- package/dist/mcp-app/projection.d.ts +2 -1
- package/dist/mcp-app/registry.d.ts +9 -2
- package/dist/mcp-app/skill-backend.d.ts +39 -3
- package/dist/mcp-app/types.d.ts +46 -0
- package/dist/publish/index.js +2 -2
- package/dist/ui-instance/types.d.ts +18 -0
- package/package.json +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { UiActionConfirmation } from '../ui-instance/types.js';
|
|
2
|
+
import type { UiDefinition } from '../ui-instance/types.js';
|
|
3
|
+
import type { ProductAppBundleProvenance } from './discovery.js';
|
|
2
4
|
export type McpAppAgentAccess = 'allowed' | 'approval_required' | 'denied';
|
|
3
5
|
export interface McpAppAgentAccessAction {
|
|
4
6
|
readonly actionId: string;
|
|
@@ -11,4 +13,13 @@ export interface McpAppAgentAccessAction {
|
|
|
11
13
|
readonly command?: readonly string[];
|
|
12
14
|
};
|
|
13
15
|
}
|
|
14
|
-
export
|
|
16
|
+
export interface McpAppVerifiedBundleAccessContext {
|
|
17
|
+
readonly appId: string;
|
|
18
|
+
readonly definition: UiDefinition;
|
|
19
|
+
readonly provenance: ProductAppBundleProvenance;
|
|
20
|
+
}
|
|
21
|
+
export declare function resolveAgentAccess(action: McpAppAgentAccessAction, modelActions?: readonly string[], bundle?: McpAppVerifiedBundleAccessContext): McpAppAgentAccess;
|
|
22
|
+
export declare function listMcpAppAgentActions(actions: readonly McpAppAgentAccessAction[], modelActions?: readonly string[], bundle?: McpAppVerifiedBundleAccessContext): readonly {
|
|
23
|
+
readonly actionId: string;
|
|
24
|
+
readonly access: McpAppAgentAccess;
|
|
25
|
+
}[];
|
|
@@ -13,6 +13,11 @@ export interface ProductAppBundleProvenance {
|
|
|
13
13
|
readonly kind: 'bundled';
|
|
14
14
|
readonly indexHash: string;
|
|
15
15
|
readonly packageDir: string;
|
|
16
|
+
readonly appId: string;
|
|
17
|
+
readonly definitionId: string;
|
|
18
|
+
readonly version: number;
|
|
19
|
+
readonly definitionHash: string;
|
|
20
|
+
readonly files: readonly ProductAppBundleFileHash[];
|
|
16
21
|
}
|
|
17
22
|
export interface ProductAppBundleFileHash {
|
|
18
23
|
readonly path: string;
|
package/dist/mcp-app/index.d.ts
CHANGED
|
@@ -2,25 +2,25 @@ export type { McpAppContractErrorCode } from './errors.js';
|
|
|
2
2
|
export { McpAppContractError } from './errors.js';
|
|
3
3
|
export { INSTALLED_APP_ENTRY, InstalledAppRefError, buildInstalledAppRef, validateInstalledAppRef, } from './installed-app-ref.js';
|
|
4
4
|
export type { BuildInstalledAppRefInput, InstalledAppPackageFile, InstalledAppRef, InstalledAppRefErrorCode, } from './installed-app-ref.js';
|
|
5
|
-
export { MAX_HTML_LENGTH, createMcpAppRegistry, createBuiltinMcpAppRegistry, buildMcpAppLocalRegistration, createMcpAppLocalRegistration, registerLocalMcpApp, createMcpAppWorkspaceRegistry, createWorkspaceAppRegistry, createWorkspaceMcpAppRegistry, registerMcpApp, resolveMcpAppResource, resolveLocalMcpAppResource, requireMcpAppResource, toMcpAppToolRegistration, } from './registry.js';
|
|
5
|
+
export { MAX_HTML_LENGTH, createMcpAppRegistry, createBuiltinMcpAppRegistry, buildMcpAppLocalRegistration, createMcpAppLocalRegistration, registerLocalMcpApp, createMcpAppWorkspaceRegistry, createWorkspaceAppRegistry, createWorkspaceMcpAppRegistry, registerMcpApp, resolveMcpAppResource, resolveLocalMcpAppResource, requireMcpAppResource, toMcpAppToolRegistration, makeUiUri, buildMcpAppBundleRegistrationInput, buildMcpAppBundleAgentActionDescriptors, resolveMcpAppFixedResultCall, } from './registry.js';
|
|
6
6
|
export { AppDiscoveryFsError, NodeAppDiscoveryFs, NodeAppDiscoveryFsAdapter, defaultAppDiscoveryFs, defaultNodeAppDiscoveryFs, deriveWorkspaceAppToolName, deriveWorkspaceAppToolNames, discoverWorkspaceAppCandidates, discoverWorkspaceApps, LOCAL_APP_TOOL_PREFIX, MCP_APP_WORKSPACE_TOOL_PREFIX, scanWorkspaceApps, WORKSPACE_APP_TOOL_PREFIX, } from './discovery.js';
|
|
7
7
|
export type { AppDiscoveryBytes, AppDiscoveryDiagnostic, AppDiscoveryDirectoryEntry, AppDiscoveryDirectoryEntryKind, AppDiscoveryDirectoryListing, AppDiscoveryFileSystem, AppDiscoveryFsErrorCode, AppDiscoveryMaybePromise, WorkspaceAppDiscoveryOptions as AppDiscoveryOptions, McpAppDiscoveryDiagnostic, WorkspaceAppBuiltinCatalog, WorkspaceAppCandidate, WorkspaceAppDiscoveryIncompleteReason, WorkspaceAppDiscoveryOptions, WorkspaceAppDiscoveryResult, WorkspaceAppDiagnostic, WorkspaceAppDiagnosticCode, WorkspaceAppDiscoverySource, WorkspaceAppResourceSnapshot, WorkspaceAppReservedCatalog, WorkspaceAppSource, WorkspaceAppToolNames, ProductAppBundleDefinitionIdentity, ProductAppBundleFileHash, ProductAppBundleIndex, ProductAppBundleInput, ProductAppBundlePackageIndex, ProductAppBundleProvenance, } from './discovery.js';
|
|
8
8
|
export { createWorkspaceAppCatalog, discoverWorkspaceAppCatalog, hashAppDefinition, hashCrewxAppDefinition, listWorkspaceApps, } from './catalog.js';
|
|
9
9
|
export type { CrewxAppBuiltinCatalog, CrewxAppCapability, CrewxAppCatalogOptions, CrewxAppCatalogResult, CrewxAppDefinitionHashInput, CrewxAppDefinitionSummary, CrewxAppDiagnostic, CrewxAppDiagnosticCode, CrewxAppDiagnosticSource, CrewxAppInstalledProjection, CrewxAppLocalDefinitionRef, CrewxAppOrigin, CrewxAppOwnership, CrewxAppShareability, CrewxAppSharingAvailability, CrewxAppSummary, } from './types.js';
|
|
10
|
-
export { MCP_APP_PROJECTION_MAX_BYTES, buildMcpAppStateDescriptor, buildMcpAppStateProjections, buildTerminalMcpAppStateDescriptor, buildTerminalMcpAppStateProjections, createMcpAppToolResult, serializeMcpAppStateJson, serializeMcpAppStateXml, } from './projection.js';
|
|
10
|
+
export { MCP_APP_PROJECTION_MAX_BYTES, buildMcpAppStateDescriptor, buildMcpAppStateProjections, buildTerminalMcpAppStateDescriptor, buildTerminalMcpAppStateProjections, createMcpAppToolResult, projectMcpAppSummaryState, serializeMcpAppStateJson, serializeMcpAppStateXml, } from './projection.js';
|
|
11
11
|
export { buildMcpAppsContext } from './apps-context.js';
|
|
12
12
|
export type { McpAppsContext } from './apps-context.js';
|
|
13
13
|
export { MCP_APP_MODEL_CONTEXT_MAX_ARRAY_LENGTH, MCP_APP_MODEL_CONTEXT_MAX_BYTES, MCP_APP_MODEL_CONTEXT_MAX_DEPTH, MCP_APP_MODEL_CONTEXT_MAX_STRING_LENGTH, sanitizeMcpAppModelContext, serializeMcpAppModelContextXml, } from './model-context.js';
|
|
14
14
|
export type { McpAppModelContext, McpAppModelContextInput } from './model-context.js';
|
|
15
|
-
export { resolveAgentAccess } from './agent-access.js';
|
|
16
|
-
export type { McpAppAgentAccess, McpAppAgentAccessAction } from './agent-access.js';
|
|
15
|
+
export { resolveAgentAccess, listMcpAppAgentActions } from './agent-access.js';
|
|
16
|
+
export type { McpAppAgentAccess, McpAppAgentAccessAction, McpAppVerifiedBundleAccessContext } from './agent-access.js';
|
|
17
17
|
export { buildStateSetHandler, createStateSetHandler, } from './state-set.js';
|
|
18
18
|
export type { StateSetHandlerBuildInput } from './state-set.js';
|
|
19
|
-
export { SKILL_BACKEND_DEFAULT_TIMEOUT_MS, SKILL_BACKEND_MAX_INPUT_BYTES, SKILL_BACKEND_MAX_OUTPUT_BYTES, SKILL_BACKEND_SCHEMA_VERSION, buildSkillBackendHandler, } from './skill-backend.js';
|
|
20
|
-
export type { SkillBackendExecutionPort, SkillBackendExecutionRequest, SkillBackendExecutionResponse, SkillBackendHandlerBuildInput, SkillBackendInfrastructureErrorCode, SkillBackendPayload, } from './skill-backend.js';
|
|
19
|
+
export { SKILL_BACKEND_DEFAULT_TIMEOUT_MS, SKILL_BACKEND_INHERITED_ENV_ALLOWLIST, SKILL_BACKEND_MAX_INPUT_BYTES, SKILL_BACKEND_MAX_OUTPUT_BYTES, SKILL_BACKEND_SCHEMA_VERSION, buildSkillBackendChildEnvironment, buildSkillBackendHandler, buildVerifiedBundleSkillBackendHandler, } from './skill-backend.js';
|
|
20
|
+
export type { SkillBackendChildEnvironment, SkillBackendExecutionPort, SkillBackendExecutionRequest, SkillBackendExecutionResponse, SkillBackendHandlerBuildInput, SkillBackendInfrastructureErrorCode, SkillBackendPayload, VerifiedBundleSkillBackendBuildInput, VerifiedBundleSkillRunnerPort, VerifiedBundleSkillSpawnRequest, } from './skill-backend.js';
|
|
21
21
|
export { externalResourceCheckItems, inspectSkillBackendOutput, scanExternalResources, } from './dev-checks.js';
|
|
22
22
|
export type { AppDevCheckItem, ExternalResourceFinding, ExternalResourceKind, InspectSkillBackendOutputOptions, ScanExternalResourcesOptions, } from './dev-checks.js';
|
|
23
23
|
export { MCP_APP_HOST_TOOL_ALLOWLIST, MCP_APP_LOCAL_RESOURCE_MIME_TYPE, MCP_APP_RESOURCE_MIME_TYPE, MCP_APP_RESOURCE_URI_PREFIX, } from './types.js';
|
|
24
|
-
export type { McpAppActionDispatcherToolInput, McpAppActionToolDescriptor, McpAppActionToolInput, McpAppButtonDescriptor, McpAppButtonInput, McpAppDescriptor, McpAppDescriptorInput, McpAppInputSchema, McpAppTone, McpUiResourceCsp, McpAppRegistry, McpAppResource, McpAppServerStateInput, McpAppStateDescriptor, McpAppStateProjections, McpAppHostToolInput, McpAppHostToolName, McpAppReadToolInput, McpAppSingleActionToolInput, McpAppToolCommonInput, McpAppToolDescriptor, McpAppToolInput, McpAppToolMetadata, McpAppToolRegistration, McpAppToolResult, McpAppToolVisibility, McpAppInstanceResourceBinding, McpAppMcpResourceBinding, McpAppResourceBinding, McpAppLocalResource, McpAppLocalRegistrationInput, McpAppLocalReadToolDescriptor, McpAppLocalActionToolDescriptor, McpAppLocalSingleActionToolDescriptor, McpAppLocalToolDiagnostic, McpAppLocalToolDescriptor, McpAppLocalRegistration, McpAppBuiltinRegistration, McpAppResolvedRegistration, McpAppLocalLauncher, McpAppBuiltinLauncher, McpAppLauncher, WorkspaceAppLauncher, WorkspaceAppResolvedRegistration, McpAppWorkspaceRegistry, WorkspaceAppRegistry, McpAppWorkspaceRegistryInput, } from './types.js';
|
|
24
|
+
export type { McpAppActionDispatcherToolInput, McpAppActionToolDescriptor, McpAppActionToolInput, McpAppButtonDescriptor, McpAppButtonInput, McpAppDescriptor, McpAppDescriptorInput, McpAppInputSchema, McpAppTone, McpUiResourceCsp, McpAppRegistry, McpAppResource, McpAppServerStateInput, McpAppStateDescriptor, McpAppStateProjections, McpAppHostToolInput, McpAppHostToolName, McpAppReadToolInput, McpAppSingleActionToolInput, McpAppToolCommonInput, McpAppToolDescriptor, McpAppFixedResult, McpAppFixedResultCall, McpAppFixedResultInvalidParams, McpAppFixedResultResolution, McpAppFixedResultUnavailable, McpAppToolInput, McpAppToolMetadata, McpAppToolRegistration, McpAppToolResult, McpAppToolVisibility, McpAppInstanceResourceBinding, McpAppMcpResourceBinding, McpAppResourceBinding, McpAppLocalResource, McpAppLocalRegistrationInput, McpAppLocalReadToolDescriptor, McpAppLocalActionToolDescriptor, McpAppLocalSingleActionToolDescriptor, McpAppLocalToolDiagnostic, McpAppLocalToolDescriptor, McpAppLocalRegistration, McpAppBuiltinRegistration, McpAppResolvedRegistration, McpAppLocalLauncher, McpAppBuiltinLauncher, McpAppLauncher, WorkspaceAppLauncher, WorkspaceAppResolvedRegistration, McpAppWorkspaceRegistry, WorkspaceAppRegistry, McpAppWorkspaceRegistryInput, McpAppRegistryOptions, McpAppBundleHostToolTemplate, McpAppBundleAgentActionDescriptor, } from './types.js';
|
|
25
25
|
export { buildWorkspaceAppSnapshot, discoverWorkspaceAppSnapshot, reconfirmWorkspaceAppSnapshot, } from './workspace-snapshot.js';
|
|
26
26
|
export type { WorkspaceAppSnapshot, WorkspaceAppSnapshotBuildOptions, WorkspaceAppSnapshotOptions, WorkspaceAppSnapshotReconfirmResult, WorkspaceAppSnapshotResource, WorkspaceAppSnapshotInitialState, WorkspaceAppInitialState, } from './workspace-snapshot.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { JsonObject } from '../ui-instance/types.js';
|
|
1
|
+
import type { JsonObject, UiDefinition } from '../ui-instance/types.js';
|
|
2
2
|
import type { McpAppServerStateInput, McpAppStateDescriptor, McpAppStateProjections, McpAppToolDescriptor, McpAppToolResult } from './types.js';
|
|
3
3
|
export declare const MCP_APP_PROJECTION_MAX_BYTES: number;
|
|
4
4
|
export declare const SENSITIVE_KEY: RegExp;
|
|
5
|
+
export declare function projectMcpAppSummaryState(state: unknown, definition: UiDefinition): JsonObject;
|
|
5
6
|
export declare function buildMcpAppStateDescriptor(input: McpAppServerStateInput): McpAppStateDescriptor;
|
|
6
7
|
export declare function buildTerminalMcpAppStateDescriptor(input: McpAppServerStateInput): McpAppStateDescriptor;
|
|
7
8
|
export declare function serializeMcpAppStateJson(descriptor: McpAppStateDescriptor, dataPaths?: readonly string[]): string;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { WorkspaceAppCandidate } from './discovery.js';
|
|
2
|
+
import { type McpAppDescriptor, type McpAppDescriptorInput, type McpAppInputSchema, type McpAppLocalRegistration, type McpAppLocalRegistrationInput, type McpAppLocalResource, type McpAppRegistry, type McpAppResource, type McpAppWorkspaceRegistry, type McpAppWorkspaceRegistryInput, type McpAppToolDescriptor, type McpAppToolRegistration, type McpAppRegistryOptions, type McpAppBundleHostToolTemplate, type McpAppFixedResultResolution, type McpAppBundleAgentActionDescriptor } from './types.js';
|
|
2
3
|
export declare const MAX_HTML_LENGTH: number;
|
|
3
|
-
export declare function
|
|
4
|
+
export declare function resolveMcpAppFixedResultCall(tool: McpAppToolDescriptor, args: unknown): McpAppFixedResultResolution;
|
|
5
|
+
export declare function buildMcpAppBundleRegistrationInput(candidate: WorkspaceAppCandidate, options?: {
|
|
6
|
+
readonly hostTools?: readonly McpAppBundleHostToolTemplate[];
|
|
7
|
+
}): McpAppDescriptorInput;
|
|
8
|
+
export declare function buildMcpAppBundleAgentActionDescriptors(candidate: WorkspaceAppCandidate): readonly McpAppBundleAgentActionDescriptor[];
|
|
9
|
+
export declare function makeUiUri(appId: string, entry: string | Uint8Array | readonly number[]): string;
|
|
10
|
+
export declare function createMcpAppRegistry(options?: McpAppRegistryOptions): McpAppRegistry;
|
|
4
11
|
export declare function createBuiltinMcpAppRegistry(): McpAppRegistry;
|
|
5
12
|
export declare function registerMcpApp(registry: McpAppRegistry, input: McpAppDescriptorInput): McpAppDescriptor;
|
|
6
13
|
export declare function resolveMcpAppResource(registry: McpAppRegistry, uri: string): McpAppResource | null;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { JsonObject, UiExternalActionHandlerRegistration } from '../ui-instance/types.js';
|
|
2
2
|
import type { UiPluginNormalizedManifestV2 } from '../ui-plugin/types.js';
|
|
3
|
-
import type { WorkspaceAppSource } from './discovery.js';
|
|
3
|
+
import type { WorkspaceAppCandidate, WorkspaceAppSource } from './discovery.js';
|
|
4
4
|
export declare const SKILL_BACKEND_SCHEMA_VERSION: 1;
|
|
5
|
-
export declare const SKILL_BACKEND_MAX_INPUT_BYTES
|
|
6
|
-
export declare const SKILL_BACKEND_MAX_OUTPUT_BYTES
|
|
5
|
+
export declare const SKILL_BACKEND_MAX_INPUT_BYTES = 524288;
|
|
6
|
+
export declare const SKILL_BACKEND_MAX_OUTPUT_BYTES = 524288;
|
|
7
7
|
export declare const SKILL_BACKEND_DEFAULT_TIMEOUT_MS = 15000;
|
|
8
|
+
export declare const SKILL_BACKEND_INHERITED_ENV_ALLOWLIST: readonly ["CREWX_HOME", "CREWX_DB", "XDG_CONFIG_HOME"];
|
|
8
9
|
export type SkillBackendInfrastructureErrorCode = 'EXEC_DENIED' | 'EXEC_TIMEOUT' | 'EXEC_OUTPUT_INVALID' | 'EXECUTION_FAILED' | 'ACTION_IN_FLIGHT' | 'INPUT_INVALID';
|
|
9
10
|
export interface SkillBackendPayload {
|
|
10
11
|
readonly schemaVersion: typeof SKILL_BACKEND_SCHEMA_VERSION;
|
|
@@ -23,6 +24,8 @@ export type SkillBackendExecutionResponse = {
|
|
|
23
24
|
};
|
|
24
25
|
export interface SkillBackendExecutionRequest {
|
|
25
26
|
readonly requestId?: string;
|
|
27
|
+
readonly reservationNowMs?: number;
|
|
28
|
+
readonly actorKind?: 'user' | 'agent';
|
|
26
29
|
readonly instanceId: string;
|
|
27
30
|
readonly appId: string;
|
|
28
31
|
readonly definitionId: string;
|
|
@@ -37,6 +40,38 @@ export interface SkillBackendExecutionRequest {
|
|
|
37
40
|
export interface SkillBackendExecutionPort {
|
|
38
41
|
execute(request: SkillBackendExecutionRequest): PromiseLike<SkillBackendExecutionResponse>;
|
|
39
42
|
}
|
|
43
|
+
export interface SkillBackendChildEnvironment {
|
|
44
|
+
readonly CREWX_APP_REQUEST_ID: string;
|
|
45
|
+
readonly CREWX_APP_NOW_MS: string;
|
|
46
|
+
readonly CREWX_APP_ACTOR_KIND: 'user' | 'agent';
|
|
47
|
+
}
|
|
48
|
+
export declare function buildSkillBackendChildEnvironment(request: Pick<SkillBackendExecutionRequest, 'requestId' | 'reservationNowMs' | 'actorKind'>): SkillBackendChildEnvironment;
|
|
49
|
+
export interface VerifiedBundleSkillSpawnRequest {
|
|
50
|
+
readonly appId: string;
|
|
51
|
+
readonly packageDir: string;
|
|
52
|
+
readonly packageCwd: string;
|
|
53
|
+
readonly executableRelativePath: string;
|
|
54
|
+
readonly command: readonly string[];
|
|
55
|
+
readonly payload: SkillBackendPayload;
|
|
56
|
+
readonly childEnvironment: SkillBackendChildEnvironment;
|
|
57
|
+
readonly inheritedEnvAllowlist: typeof SKILL_BACKEND_INHERITED_ENV_ALLOWLIST;
|
|
58
|
+
readonly requestId: string;
|
|
59
|
+
}
|
|
60
|
+
export interface VerifiedBundleSkillRunnerPort {
|
|
61
|
+
hashExecutable(input: {
|
|
62
|
+
readonly packageCwd: string;
|
|
63
|
+
readonly executableRelativePath: string;
|
|
64
|
+
}): PromiseLike<string>;
|
|
65
|
+
spawn(input: VerifiedBundleSkillSpawnRequest): PromiseLike<SkillBackendExecutionResponse>;
|
|
66
|
+
}
|
|
67
|
+
export interface VerifiedBundleSkillBackendBuildInput {
|
|
68
|
+
readonly normalized: UiPluginNormalizedManifestV2;
|
|
69
|
+
readonly actionId: string;
|
|
70
|
+
readonly candidate: WorkspaceAppCandidate;
|
|
71
|
+
readonly packageCwd: string;
|
|
72
|
+
readonly executableRelativePath: string;
|
|
73
|
+
readonly runner: VerifiedBundleSkillRunnerPort;
|
|
74
|
+
}
|
|
40
75
|
export interface SkillBackendHandlerBuildInput {
|
|
41
76
|
readonly normalized: UiPluginNormalizedManifestV2;
|
|
42
77
|
readonly actionId: string;
|
|
@@ -47,3 +82,4 @@ export interface SkillBackendHandlerBuildInput {
|
|
|
47
82
|
}
|
|
48
83
|
export declare function buildSkillBackendHandler(normalized: UiPluginNormalizedManifestV2, actionId: string, source: WorkspaceAppSource, relativePath: string, execute: SkillBackendExecutionPort): UiExternalActionHandlerRegistration | undefined;
|
|
49
84
|
export declare function buildSkillBackendHandler(input: SkillBackendHandlerBuildInput): UiExternalActionHandlerRegistration | undefined;
|
|
85
|
+
export declare function buildVerifiedBundleSkillBackendHandler(input: VerifiedBundleSkillBackendBuildInput): UiExternalActionHandlerRegistration | undefined;
|
package/dist/mcp-app/types.d.ts
CHANGED
|
@@ -23,6 +23,11 @@ export interface McpAppToolCommonInput {
|
|
|
23
23
|
export interface McpAppReadToolInput extends McpAppToolCommonInput {
|
|
24
24
|
readonly kind: 'read';
|
|
25
25
|
readonly actionId?: never;
|
|
26
|
+
readonly fixedResult?: McpAppFixedResult;
|
|
27
|
+
}
|
|
28
|
+
export interface McpAppFixedResult {
|
|
29
|
+
readonly structuredContent: JsonObject;
|
|
30
|
+
readonly argsPolicy: 'empty-only' | 'ignore';
|
|
26
31
|
}
|
|
27
32
|
export interface McpAppSingleActionToolInput extends McpAppToolCommonInput {
|
|
28
33
|
readonly kind: 'action';
|
|
@@ -41,6 +46,8 @@ export type McpAppActionToolDescriptor = (Omit<McpAppSingleActionToolInput, 'act
|
|
|
41
46
|
readonly actionIds: readonly string[];
|
|
42
47
|
});
|
|
43
48
|
type McpAppToolDescriptorMetadata = {
|
|
49
|
+
readonly appId?: string;
|
|
50
|
+
readonly provenance?: ProductAppBundleProvenance;
|
|
44
51
|
readonly resourceUri: string;
|
|
45
52
|
readonly _meta: McpAppToolMetadata;
|
|
46
53
|
};
|
|
@@ -62,6 +69,8 @@ export interface McpAppDescriptorInput {
|
|
|
62
69
|
readonly csp?: McpUiResourceCsp;
|
|
63
70
|
readonly tools: readonly McpAppToolInput[];
|
|
64
71
|
readonly definition?: UiDefinition;
|
|
72
|
+
readonly provenance?: ProductAppBundleProvenance;
|
|
73
|
+
readonly entryBytes?: Uint8Array | readonly number[];
|
|
65
74
|
}
|
|
66
75
|
export interface McpAppResource {
|
|
67
76
|
readonly uri: string;
|
|
@@ -256,8 +265,22 @@ export interface McpAppDescriptor {
|
|
|
256
265
|
readonly uiUri: string;
|
|
257
266
|
readonly html: string;
|
|
258
267
|
readonly definition?: UiDefinition;
|
|
268
|
+
readonly provenance?: ProductAppBundleProvenance;
|
|
259
269
|
readonly tools: readonly McpAppToolDescriptor[];
|
|
260
270
|
}
|
|
271
|
+
export interface McpAppFixedResultCall {
|
|
272
|
+
readonly kind: 'result';
|
|
273
|
+
readonly result: McpAppToolResult;
|
|
274
|
+
}
|
|
275
|
+
export interface McpAppFixedResultInvalidParams {
|
|
276
|
+
readonly kind: 'invalid_params';
|
|
277
|
+
readonly code: 'INVALID_PARAMS';
|
|
278
|
+
readonly message: string;
|
|
279
|
+
}
|
|
280
|
+
export interface McpAppFixedResultUnavailable {
|
|
281
|
+
readonly kind: 'unavailable';
|
|
282
|
+
}
|
|
283
|
+
export type McpAppFixedResultResolution = McpAppFixedResultCall | McpAppFixedResultInvalidParams | McpAppFixedResultUnavailable;
|
|
261
284
|
export interface McpAppToolResult {
|
|
262
285
|
readonly content: readonly [{
|
|
263
286
|
readonly type: 'text';
|
|
@@ -329,6 +352,29 @@ export interface McpAppRegistry {
|
|
|
329
352
|
resolveMcpAppResource(uri: string): McpAppResource | null;
|
|
330
353
|
requireMcpAppResource(uri: string): McpAppResource;
|
|
331
354
|
}
|
|
355
|
+
export interface McpAppRegistryOptions {
|
|
356
|
+
readonly reservedToolNames?: Iterable<string>;
|
|
357
|
+
}
|
|
358
|
+
export interface McpAppBundleHostToolTemplate {
|
|
359
|
+
readonly capability: string;
|
|
360
|
+
readonly description: string;
|
|
361
|
+
readonly inputSchema: McpAppInputSchema;
|
|
362
|
+
readonly textFallback: string;
|
|
363
|
+
}
|
|
364
|
+
export interface McpAppBundleAgentActionDescriptor {
|
|
365
|
+
readonly appId: string;
|
|
366
|
+
readonly provenance: ProductAppBundleProvenance;
|
|
367
|
+
readonly name: string;
|
|
368
|
+
readonly description: string;
|
|
369
|
+
readonly inputSchema: McpAppInputSchema;
|
|
370
|
+
readonly textFallback: string;
|
|
371
|
+
readonly kind: 'action';
|
|
372
|
+
readonly actionId: string;
|
|
373
|
+
readonly access: 'allowed' | 'approval_required' | 'denied';
|
|
374
|
+
readonly visibility: readonly McpAppToolVisibility[];
|
|
375
|
+
readonly resourceUri: string;
|
|
376
|
+
readonly _meta: McpAppToolMetadata;
|
|
377
|
+
}
|
|
332
378
|
export type CrewxAppCapability = 'screen' | 'skill';
|
|
333
379
|
export type CrewxAppOrigin = 'local' | 'installed' | 'builtin';
|
|
334
380
|
export type CrewxAppOwnership = 'mine' | 'external' | 'unknown';
|