@crewx/sdk 0.9.0-rc.125 → 0.9.0-rc.127

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.
@@ -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 declare function resolveAgentAccess(action: McpAppAgentAccessAction, modelActions?: readonly string[]): McpAppAgentAccess;
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
+ }[];
@@ -0,0 +1,2 @@
1
+ export declare function markVerifiedProductAppBundleProvenance<T extends object>(value: T): T;
2
+ export declare function isVerifiedProductAppBundleProvenance(value: unknown): value is object;
@@ -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;
@@ -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, planProductBundleLegacyToolNames, 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
- 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';
23
+ export { MCP_APP_HOST_TOOL_ALLOWLIST, MCP_CORE_TOOL_NAMES, 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, McpCoreToolName, 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,15 @@
1
- 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 } from './types.js';
1
+ import type { WorkspaceAppCandidate } from './discovery.js';
2
+ import type { ProductAppBundlePackageIndex } from './discovery.js';
3
+ 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
4
  export declare const MAX_HTML_LENGTH: number;
3
- export declare function createMcpAppRegistry(): McpAppRegistry;
5
+ export declare function resolveMcpAppFixedResultCall(tool: McpAppToolDescriptor, args: unknown): McpAppFixedResultResolution;
6
+ export declare function buildMcpAppBundleRegistrationInput(candidate: WorkspaceAppCandidate, options?: {
7
+ readonly hostTools?: readonly McpAppBundleHostToolTemplate[];
8
+ }): McpAppDescriptorInput;
9
+ export declare function buildMcpAppBundleAgentActionDescriptors(candidate: WorkspaceAppCandidate): readonly McpAppBundleAgentActionDescriptor[];
10
+ export declare function planProductBundleLegacyToolNames(apps: readonly ProductAppBundlePackageIndex[]): Readonly<Record<string, string>>;
11
+ export declare function makeUiUri(appId: string, entry: string | Uint8Array | readonly number[]): string;
12
+ export declare function createMcpAppRegistry(options?: McpAppRegistryOptions): McpAppRegistry;
4
13
  export declare function createBuiltinMcpAppRegistry(): McpAppRegistry;
5
14
  export declare function registerMcpApp(registry: McpAppRegistry, input: McpAppDescriptorInput): McpAppDescriptor;
6
15
  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: number;
6
- export declare const SKILL_BACKEND_MAX_OUTPUT_BYTES: number;
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;
@@ -1,4 +1,4 @@
1
- import type { JsonObject, UiDefinition, UiDefinitionRef, UiDefinitionDisplayMode, UiDefinitionUsage, UiInstance, UiInstanceStatus, UiActionConfirmation, UiActionHandlerRegistration } from '../ui-instance/types.js';
1
+ import type { JsonObject, UiDefinition, UiDefinitionRef, UiDefinitionDisplayMode, UiDefinitionUsage, UiProjectionPolicy, UiInstance, UiInstanceStatus, UiActionConfirmation, UiActionHandlerRegistration } from '../ui-instance/types.js';
2
2
  import type { AppDiscoveryFileSystem, ProductAppBundleInput, ProductAppBundleProvenance } from './discovery.js';
3
3
  export declare const MCP_APP_RESOURCE_MIME_TYPE: "text/html;profile=mcp-app";
4
4
  export declare const MCP_APP_RESOURCE_URI_PREFIX = "ui://crewx/";
@@ -6,6 +6,8 @@ export type McpAppToolVisibility = 'model' | 'app';
6
6
  export type McpAppTone = 'blue' | 'violet' | 'emerald' | 'amber' | 'rose' | 'sky' | 'slate' | 'indigo';
7
7
  export declare const MCP_APP_HOST_TOOL_ALLOWLIST: readonly ["crewx_app_terminal_connect", "crewx_app_html_viewer_open"];
8
8
  export type McpAppHostToolName = typeof MCP_APP_HOST_TOOL_ALLOWLIST[number];
9
+ export declare const MCP_CORE_TOOL_NAMES: readonly ["crewx_listWorkspaces", "crewx_queryAgent", "crewx_executeAgent", "crewx_getTaskResult", "crewx_listTasks", "crewx_listAgents", "callBrowser", "openTab", "listTabs", "closeTab"];
10
+ export type McpCoreToolName = typeof MCP_CORE_TOOL_NAMES[number];
9
11
  export interface McpUiResourceCsp {
10
12
  readonly connectDomains?: readonly string[];
11
13
  readonly resourceDomains?: readonly string[];
@@ -23,6 +25,11 @@ export interface McpAppToolCommonInput {
23
25
  export interface McpAppReadToolInput extends McpAppToolCommonInput {
24
26
  readonly kind: 'read';
25
27
  readonly actionId?: never;
28
+ readonly fixedResult?: McpAppFixedResult;
29
+ }
30
+ export interface McpAppFixedResult {
31
+ readonly structuredContent: JsonObject;
32
+ readonly argsPolicy: 'empty-only' | 'ignore';
26
33
  }
27
34
  export interface McpAppSingleActionToolInput extends McpAppToolCommonInput {
28
35
  readonly kind: 'action';
@@ -41,6 +48,8 @@ export type McpAppActionToolDescriptor = (Omit<McpAppSingleActionToolInput, 'act
41
48
  readonly actionIds: readonly string[];
42
49
  });
43
50
  type McpAppToolDescriptorMetadata = {
51
+ readonly appId?: string;
52
+ readonly provenance?: ProductAppBundleProvenance;
44
53
  readonly resourceUri: string;
45
54
  readonly _meta: McpAppToolMetadata;
46
55
  };
@@ -62,6 +71,8 @@ export interface McpAppDescriptorInput {
62
71
  readonly csp?: McpUiResourceCsp;
63
72
  readonly tools: readonly McpAppToolInput[];
64
73
  readonly definition?: UiDefinition;
74
+ readonly provenance?: ProductAppBundleProvenance;
75
+ readonly entryBytes?: Uint8Array | readonly number[];
65
76
  }
66
77
  export interface McpAppResource {
67
78
  readonly uri: string;
@@ -256,8 +267,22 @@ export interface McpAppDescriptor {
256
267
  readonly uiUri: string;
257
268
  readonly html: string;
258
269
  readonly definition?: UiDefinition;
270
+ readonly provenance?: ProductAppBundleProvenance;
259
271
  readonly tools: readonly McpAppToolDescriptor[];
260
272
  }
273
+ export interface McpAppFixedResultCall {
274
+ readonly kind: 'result';
275
+ readonly result: McpAppToolResult;
276
+ }
277
+ export interface McpAppFixedResultInvalidParams {
278
+ readonly kind: 'invalid_params';
279
+ readonly code: 'INVALID_PARAMS';
280
+ readonly message: string;
281
+ }
282
+ export interface McpAppFixedResultUnavailable {
283
+ readonly kind: 'unavailable';
284
+ }
285
+ export type McpAppFixedResultResolution = McpAppFixedResultCall | McpAppFixedResultInvalidParams | McpAppFixedResultUnavailable;
261
286
  export interface McpAppToolResult {
262
287
  readonly content: readonly [{
263
288
  readonly type: 'text';
@@ -329,6 +354,29 @@ export interface McpAppRegistry {
329
354
  resolveMcpAppResource(uri: string): McpAppResource | null;
330
355
  requireMcpAppResource(uri: string): McpAppResource;
331
356
  }
357
+ export interface McpAppRegistryOptions {
358
+ readonly reservedToolNames?: Iterable<string>;
359
+ }
360
+ export interface McpAppBundleHostToolTemplate {
361
+ readonly capability: string;
362
+ readonly description: string;
363
+ readonly inputSchema: McpAppInputSchema;
364
+ readonly textFallback: string;
365
+ }
366
+ export interface McpAppBundleAgentActionDescriptor {
367
+ readonly appId: string;
368
+ readonly provenance: ProductAppBundleProvenance;
369
+ readonly name: string;
370
+ readonly description: string;
371
+ readonly inputSchema: McpAppInputSchema;
372
+ readonly textFallback: string;
373
+ readonly kind: 'action';
374
+ readonly actionId: string;
375
+ readonly access: 'allowed' | 'approval_required' | 'denied';
376
+ readonly visibility: readonly McpAppToolVisibility[];
377
+ readonly resourceUri: string;
378
+ readonly _meta: McpAppToolMetadata;
379
+ }
332
380
  export type CrewxAppCapability = 'screen' | 'skill';
333
381
  export type CrewxAppOrigin = 'local' | 'installed' | 'builtin';
334
382
  export type CrewxAppOwnership = 'mine' | 'external' | 'unknown';
@@ -341,6 +389,7 @@ export interface CrewxAppDefinitionSummary extends UiDefinitionRef {
341
389
  readonly usage: UiDefinitionUsage;
342
390
  readonly detailPanel?: boolean;
343
391
  readonly displayModes?: readonly UiDefinitionDisplayMode[];
392
+ readonly summaryProjection?: UiProjectionPolicy;
344
393
  }
345
394
  export interface CrewxAppDefinitionHashInput {
346
395
  readonly screenHash?: string;