@crewx/sdk 0.9.0-rc.16 → 0.9.0-rc.160
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/README.md +1 -1
- package/dist/account/auth-client.d.ts +61 -0
- package/dist/account/auth-json-v2.d.ts +1 -0
- package/dist/account/auth-json.d.ts +30 -0
- package/dist/account/config.d.ts +37 -0
- package/dist/account/env-bootstrap.d.ts +11 -0
- package/dist/account/errors.d.ts +24 -0
- package/dist/account/index.d.ts +12 -0
- package/dist/account/index.js +2 -0
- package/dist/account/session-manager.d.ts +47 -0
- package/dist/activity-log/builder.d.ts +59 -6
- package/dist/agent/agent-list-view.d.ts +19 -0
- package/dist/app/app.d.ts +148 -0
- package/dist/app/backend-env.d.ts +3 -0
- package/dist/app/content-media-types.d.ts +2 -0
- package/dist/app/context.d.ts +2 -0
- package/dist/app/entry.d.ts +7 -0
- package/dist/app/frame.d.ts +55 -0
- package/dist/app/index.d.ts +10 -0
- package/dist/app/index.js +10 -0
- package/dist/app/protocol.d.ts +9 -0
- package/dist/app/runtime.d.ts +21 -0
- package/dist/app/tool-mode.d.ts +3 -0
- package/dist/boxing/box.types.d.ts +4 -0
- package/dist/config/canonicalize-agent-options.d.ts +18 -0
- package/dist/config/default-agent-models.d.ts +11 -0
- package/dist/config/global-settings.d.ts +33 -0
- package/dist/config/migrate-grok-mode.d.ts +6 -0
- package/dist/config/model-compat.d.ts +31 -0
- package/dist/config/models.generated.d.ts +37 -0
- package/dist/config/models.remote.d.ts +1 -0
- package/dist/config/overdrive.d.ts +7 -0
- package/dist/config/pricing.d.ts +6 -3
- package/dist/config/pricing.generated.d.ts +4 -0
- package/dist/config/pricing.types.d.ts +4 -0
- package/dist/config/timeout.config.d.ts +4 -0
- package/dist/config/wi-boards.d.ts +19 -0
- package/dist/context-budget/continuity.d.ts +63 -0
- package/dist/context-budget/index.d.ts +142 -0
- package/dist/conversation/index.d.ts +1 -1
- package/dist/conversation/sqlite-provider.d.ts +6 -3
- package/dist/conversation/to-template-messages.d.ts +9 -0
- package/dist/conversation/types.d.ts +58 -1
- package/dist/desktop/command-runner.d.ts +4 -0
- package/dist/desktop/default-adapters.d.ts +4 -0
- package/dist/desktop/global-install.d.ts +19 -0
- package/dist/desktop/index.d.ts +3 -0
- package/dist/desktop/index.js +3 -0
- package/dist/desktop/install.d.ts +5 -0
- package/dist/desktop/lnk.d.ts +22 -0
- package/dist/desktop/manifest.d.ts +21 -0
- package/dist/desktop/types.d.ts +67 -0
- package/dist/desktop/version.d.ts +1 -0
- package/dist/desktop/windows-paths.d.ts +21 -0
- package/dist/desktop/wrapper.d.ts +18 -0
- package/dist/esm/account/index.js +2 -0
- package/dist/esm/app/index.js +10 -0
- package/dist/esm/desktop/index.js +3 -0
- package/dist/esm/index.js +1126 -224
- package/dist/esm/node/index.js +2 -0
- package/dist/esm/plugins/index.js +496 -214
- package/dist/esm/process/index.js +1 -0
- package/dist/esm/publish/index.js +2 -0
- package/dist/esm/repository/index.js +608 -211
- package/dist/esm/skills/index.js +2 -0
- package/dist/esm/testing/index.js +1 -1
- package/dist/events/types.d.ts +16 -0
- package/dist/facade/Crewx.d.ts +61 -5
- package/dist/facade/task-ticket.d.ts +14 -0
- package/dist/highlight/thread-highlight-prompt.d.ts +2 -0
- package/dist/highlight/thread-highlighter.d.ts +326 -0
- package/dist/index.browser.d.ts +19 -1
- package/dist/index.browser.js +6 -2
- package/dist/index.d.ts +131 -17
- package/dist/index.js +1128 -226
- package/dist/internal/console-decoder.d.ts +38 -0
- package/dist/internal/windows-spawn.d.ts +10 -0
- package/dist/layout/types.d.ts +18 -1
- package/dist/lifecycle/process-lease.d.ts +80 -0
- package/dist/lifecycle/process-owner.d.ts +20 -0
- package/dist/lifecycle/task-heartbeat.d.ts +41 -0
- package/dist/lifecycle/task-stop.d.ts +82 -0
- package/dist/lifecycle/update-admission.d.ts +45 -0
- package/dist/local-server/base-url.d.ts +18 -0
- package/dist/local-server/index.d.ts +8 -0
- package/dist/local-server/opencode.d.ts +8 -0
- package/dist/local-server/probe.d.ts +3 -0
- package/dist/local-server/runtime.d.ts +26 -0
- package/dist/local-server/types.d.ts +43 -0
- package/dist/mcp-app/agent-access.d.ts +26 -0
- package/dist/mcp-app/app-handoff.d.ts +109 -0
- package/dist/mcp-app/apps-context.d.ts +32 -0
- package/dist/mcp-app/bundle-provenance.d.ts +3 -0
- package/dist/mcp-app/candidate-registration.d.ts +4 -0
- package/dist/mcp-app/card-handler.d.ts +7 -0
- package/dist/mcp-app/catalog.d.ts +7 -0
- package/dist/mcp-app/content-channel.d.ts +86 -0
- package/dist/mcp-app/content-declarations.d.ts +31 -0
- package/dist/mcp-app/dev-checks.d.ts +29 -0
- package/dist/mcp-app/diagnostic-reason.d.ts +3 -0
- package/dist/mcp-app/discovery.d.ts +161 -0
- package/dist/mcp-app/errors.d.ts +7 -0
- package/dist/mcp-app/index.d.ts +37 -0
- package/dist/mcp-app/installed-app-ref.d.ts +25 -0
- package/dist/mcp-app/model-context.d.ts +29 -0
- package/dist/mcp-app/node-app-discovery-fs.d.ts +23 -0
- package/dist/mcp-app/product-bundle-assets.d.ts +27 -0
- package/dist/mcp-app/product-bundle-loader.d.ts +53 -0
- package/dist/mcp-app/projection.d.ts +14 -0
- package/dist/mcp-app/prompt-cards.d.ts +28 -0
- package/dist/mcp-app/registry.d.ts +28 -0
- package/dist/mcp-app/skill-backend.d.ts +132 -0
- package/dist/mcp-app/state-set.d.ts +9 -0
- package/dist/mcp-app/types.d.ts +488 -0
- package/dist/mcp-app/workspace-app-assets.d.ts +42 -0
- package/dist/mcp-app/workspace-app-scan-cache.d.ts +27 -0
- package/dist/mcp-app/workspace-snapshot.d.ts +72 -0
- package/dist/migrations/0011_far_black_tarantula.sql +1 -0
- package/dist/migrations/0012_blue_turbo.sql +23 -0
- package/dist/migrations/0013_hesitant_adam_destine.sql +15 -0
- package/dist/migrations/0014_organic_mongu.sql +73 -0
- package/dist/migrations/0015_panoramic_gorilla_man.sql +71 -0
- package/dist/migrations/0016_fuzzy_hemingway.sql +14 -0
- package/dist/migrations/0017_project_stage_sdk_migration.sql +29 -0
- package/dist/migrations/0018_bored_jackal.sql +33 -0
- package/dist/migrations/0019_backfill_task_thread_ids.sql +74 -0
- package/dist/migrations/0020_useful_iron_lad.sql +55 -0
- package/dist/migrations/0021_dashing_peter_quill.sql +51 -0
- package/dist/migrations/0022_wandering_bucky.sql +1 -0
- package/dist/migrations/0023_red_payback.sql +1 -0
- package/dist/migrations/0024_storage_metadata.sql +262 -0
- package/dist/migrations/0025_task_heartbeat.sql +8 -0
- package/dist/migrations/0025_thread_app_instance_ledger.sql +2 -0
- package/dist/migrations/0026_mcp_action_source.sql +47 -0
- package/dist/migrations/0027_task_stop_scope_cleanup.sql +5 -0
- package/dist/migrations/0027_ui_instance_active_unique.sql +2 -0
- package/dist/migrations/0029_nice_rhino.sql +1 -0
- package/dist/migrations/0031_petite_arclight.sql +6 -0
- package/dist/migrations/0032_ui_instance_opened_by.sql +1 -0
- package/dist/migrations/0033_thread_creator_boundary_guard.sql +38 -0
- package/dist/migrations/0034_keen_fallen_one.sql +36 -0
- package/dist/migrations/0035_request_log_daily.sql +11 -0
- package/dist/migrations/0036_ui_definition_archive.sql +8 -0
- package/dist/migrations/0037_ui_instance_agent_open_request.sql +1 -0
- package/dist/migrations/0038_task_rating.sql +3 -0
- package/dist/migrations/0039_aspiring_purifiers.sql +9 -0
- package/dist/migrations/0040_task_provider_inputs.sql +53 -0
- package/dist/migrations/meta/0011_snapshot.json +1342 -0
- package/dist/migrations/meta/0012_snapshot.json +1494 -0
- package/dist/migrations/meta/0013_snapshot.json +1592 -0
- package/dist/migrations/meta/0014_snapshot.json +1975 -0
- package/dist/migrations/meta/0015_snapshot.json +2315 -0
- package/dist/migrations/meta/0016_snapshot.json +2419 -0
- package/dist/migrations/meta/0017_snapshot.json +2419 -0
- package/dist/migrations/meta/0018_snapshot.json +2570 -0
- package/dist/migrations/meta/0020_snapshot.json +2895 -0
- package/dist/migrations/meta/0021_snapshot.json +3031 -0
- package/dist/migrations/meta/0022_snapshot.json +3039 -0
- package/dist/migrations/meta/0023_snapshot.json +3047 -0
- package/dist/migrations/meta/0029_snapshot.json +3206 -0
- package/dist/migrations/meta/0031_snapshot.json +3251 -0
- package/dist/migrations/meta/0034_snapshot.json +3473 -0
- package/dist/migrations/meta/0035_snapshot.json +3547 -0
- package/dist/migrations/meta/0036_snapshot.json +3591 -0
- package/dist/migrations/meta/0037_snapshot.json +3598 -0
- package/dist/migrations/meta/0038_snapshot.json +3626 -0
- package/dist/migrations/meta/0039_snapshot.json +3684 -0
- package/dist/migrations/meta/0040_snapshot.json +3759 -0
- package/dist/migrations/meta/_journal.json +210 -0
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.js +2 -0
- package/dist/paths.d.ts +1 -0
- package/dist/plugin/types.d.ts +1 -0
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +496 -214
- package/dist/plugins/sqlite-tracing.d.ts +46 -0
- package/dist/process/index.d.ts +2 -0
- package/dist/process/index.js +1 -0
- package/dist/process/process-control.d.ts +41 -0
- package/dist/prompt/tag-names.d.ts +22 -0
- package/dist/provider/acp/connection.d.ts +6 -0
- package/dist/provider/acp/meta.d.ts +11 -0
- package/dist/provider/bridge.d.ts +7 -1
- package/dist/provider/classify-task-error.d.ts +2 -0
- package/dist/provider/cli/adapter.types.d.ts +14 -2
- package/dist/provider/cli/adapters/agent-call.util.d.ts +1 -1
- package/dist/provider/cli/adapters/cli-knob.util.d.ts +7 -0
- package/dist/provider/cli/adapters/codex-item.d.ts +1 -0
- package/dist/provider/cli/adapters/event-timestamp.util.d.ts +1 -0
- package/dist/provider/cli/adapters/grok.d.ts +2 -0
- package/dist/provider/cli/adapters/index.d.ts +5 -0
- package/dist/provider/cli/index.d.ts +3 -2
- package/dist/provider/cli/meta.d.ts +5 -0
- package/dist/provider/cli/protocol-envelope.d.ts +3 -0
- package/dist/provider/errors.d.ts +5 -1
- package/dist/provider/idle-watchdog.d.ts +19 -0
- package/dist/provider/models.d.ts +17 -12
- package/dist/provider/order.d.ts +1 -1
- package/dist/provider/parse-usage.d.ts +6 -0
- package/dist/provider/provider-selection.d.ts +8 -0
- package/dist/provider/redact-technical-message.d.ts +1 -0
- package/dist/provider/task-error.types.d.ts +17 -0
- package/dist/publish/constants.d.ts +6 -0
- package/dist/publish/errors.d.ts +7 -0
- package/dist/publish/index.d.ts +50 -0
- package/dist/publish/index.js +2 -0
- package/dist/publish/manifest.d.ts +47 -0
- package/dist/publish/marketplace-api.constants.d.ts +1 -0
- package/dist/publish/pack.d.ts +6 -0
- package/dist/publish/scan.d.ts +10 -0
- package/dist/publish/secrets.d.ts +6 -0
- package/dist/publish/upload.d.ts +19 -0
- package/dist/remote/execution-profile.d.ts +9 -0
- package/dist/remote/index.d.ts +1 -0
- package/dist/remote/types.d.ts +28 -0
- package/dist/repository/agent-send-history.repository.d.ts +23 -0
- package/dist/repository/agent-suggestion.repository.d.ts +34 -0
- package/dist/repository/base-sqlite-repository.d.ts +1 -0
- package/dist/repository/common-code.repository.d.ts +45 -0
- package/dist/repository/db.d.ts +12 -1
- package/dist/repository/index.d.ts +49 -6
- package/dist/repository/index.js +608 -211
- package/dist/repository/logs-db.d.ts +12 -0
- package/dist/repository/notification.repository.d.ts +58 -0
- package/dist/repository/project.repository.d.ts +90 -0
- package/dist/repository/request-log-mover.d.ts +70 -0
- package/dist/repository/request-log.repository.d.ts +7 -3
- package/dist/repository/storage-metadata.repository.d.ts +64 -0
- package/dist/repository/task-log-migration.d.ts +74 -0
- package/dist/repository/task-log.repository.d.ts +44 -0
- package/dist/repository/task-status.d.ts +21 -0
- package/dist/repository/task.repository.d.ts +300 -7
- package/dist/repository/thread-history.repository.d.ts +193 -0
- package/dist/repository/thread-origin-verdict.d.ts +27 -0
- package/dist/repository/thread-title.types.d.ts +29 -0
- package/dist/repository/thread.repository.d.ts +118 -7
- package/dist/repository/usage-backfill.d.ts +62 -0
- package/dist/repository/usage-from-logs.d.ts +21 -0
- package/dist/repository/workspace.repository.d.ts +3 -0
- package/dist/schema/agent-send-history.d.ts +85 -0
- package/dist/schema/agent-suggestions.d.ts +199 -0
- package/dist/schema/common-codes.d.ts +216 -0
- package/dist/schema/index.d.ts +15 -0
- package/dist/schema/notifications.d.ts +303 -0
- package/dist/schema/projects.d.ts +610 -0
- package/dist/schema/request-log-daily.d.ts +151 -0
- package/dist/schema/storage-metadata.d.ts +181 -0
- package/dist/schema/task-log-events.d.ts +119 -0
- package/dist/schema/task-provider-inputs.d.ts +100 -0
- package/dist/schema/tasks.d.ts +1058 -1
- package/dist/schema/thread-creator-unverified.d.ts +45 -0
- package/dist/schema/thread-history.d.ts +734 -0
- package/dist/schema/threads.d.ts +59 -0
- package/dist/schema/ui-action-receipts.d.ts +358 -0
- package/dist/schema/ui-definition-archive.d.ts +63 -0
- package/dist/schema/ui-instance-repins.d.ts +222 -0
- package/dist/schema/ui-instances.d.ts +324 -0
- package/dist/schema/workspaces.d.ts +17 -0
- package/dist/skills/index.d.ts +15 -0
- package/dist/skills/index.js +2 -0
- package/dist/skills/types.d.ts +18 -0
- package/dist/task-log/anchor-child-tasks.d.ts +7 -0
- package/dist/task-log/delegation-trailer.d.ts +34 -0
- package/dist/template/engine.d.ts +2 -2
- package/dist/template/helpers/exec.browser.d.ts +4 -3
- package/dist/template/helpers/exec.d.ts +4 -3
- package/dist/template/helpers/format-conversation.d.ts +1 -0
- package/dist/template/types.d.ts +20 -0
- package/dist/testing/index.js +1 -1
- package/dist/types/index.d.ts +1578 -3
- package/dist/types/task-log.types.d.ts +3 -0
- package/dist/ui-card/index.d.ts +2 -0
- package/dist/ui-card/legacy-card-parser.d.ts +11 -0
- package/dist/ui-instance/definition.d.ts +6 -0
- package/dist/ui-instance/errors.d.ts +18 -0
- package/dist/ui-instance/index.d.ts +11 -0
- package/dist/ui-instance/json.d.ts +19 -0
- package/dist/ui-instance/lineage.d.ts +24 -0
- package/dist/ui-instance/runtime.d.ts +19 -0
- package/dist/ui-instance/store.d.ts +213 -0
- package/dist/ui-instance/types.d.ts +329 -0
- package/dist/ui-plugin/app-manifest.d.ts +64 -0
- package/dist/ui-plugin/csp.d.ts +28 -0
- package/dist/ui-plugin/index.d.ts +6 -0
- package/dist/ui-plugin/limits.d.ts +27 -0
- package/dist/ui-plugin/manifest.d.ts +3 -0
- package/dist/ui-plugin/types.d.ts +203 -0
- package/dist/ui-plugin/validator.d.ts +18 -0
- package/dist/utils/crewx-executable.d.ts +76 -0
- package/dist/utils/crewx-home.d.ts +1 -0
- package/dist/utils/env-defaults.d.ts +3 -0
- package/dist/utils/id.d.ts +1 -1
- package/dist/utils/local-identity.d.ts +2 -0
- package/dist/utils/runner-env.d.ts +3 -0
- package/dist/utils/timestamp.d.ts +1 -0
- package/dist/utils/workspace.d.ts +1 -0
- package/dist/wi/create.d.ts +48 -0
- package/dist/wi/select.d.ts +20 -0
- package/package.json +57 -3
- package/templates/agents/default.yaml +303 -128
- package/templates/documents/crewx-manual.md +138 -138
- package/templates/documents/crewx-quick-guide.md +8 -7
- package/templates/workflows/wi-default-flow.yaml +65 -0
- package/templates/workflows/wi-plan-flow.yaml +140 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { McpAppLayoutSnapshot, McpAppStateDescriptor } from './types.js';
|
|
2
|
+
import type { McpAppModelContext } from './model-context.js';
|
|
3
|
+
export interface McpAppsContext {
|
|
4
|
+
readonly rendered: string;
|
|
5
|
+
readonly guidanceRendered?: string;
|
|
6
|
+
readonly available?: ReadonlyArray<{
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly description: string;
|
|
10
|
+
readonly agent: 'direct' | 'approval' | 'none';
|
|
11
|
+
readonly usage?: 'card' | 'window';
|
|
12
|
+
}>;
|
|
13
|
+
readonly availableRendered?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface McpAppsContextOptions {
|
|
16
|
+
readonly cli?: string;
|
|
17
|
+
readonly available?: McpAppsContext['available'];
|
|
18
|
+
readonly appLayoutSnapshot?: McpAppLayoutSnapshot;
|
|
19
|
+
}
|
|
20
|
+
export declare const MCP_APPS_AVAILABLE_MAX_BYTES: number;
|
|
21
|
+
export declare function buildMcpAppsContext(descriptors: readonly McpAppStateDescriptor[] | undefined, modelContext?: McpAppModelContext, optionsOrAvailable?: McpAppsContextOptions | McpAppsContext['available']): McpAppsContext | undefined;
|
|
22
|
+
export declare function attachAvailableApps(context: McpAppsContext | undefined, available: McpAppsContext['available'], cli?: string): McpAppsContext | undefined;
|
|
23
|
+
export interface RunningInstructionApps {
|
|
24
|
+
readonly guidanceRendered?: string;
|
|
25
|
+
readonly rendered?: string;
|
|
26
|
+
readonly omittedCount: number;
|
|
27
|
+
}
|
|
28
|
+
export declare function buildRunningInstructionApps(descriptors: readonly McpAppStateDescriptor[] | undefined, options?: {
|
|
29
|
+
readonly cli?: string;
|
|
30
|
+
readonly modelContext?: McpAppModelContext;
|
|
31
|
+
readonly appLayoutSnapshot?: McpAppLayoutSnapshot;
|
|
32
|
+
}): RunningInstructionApps;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function markVerifiedProductAppBundleProvenance<T extends object>(value: T, executableRelativePath?: string): T;
|
|
2
|
+
export declare function isVerifiedProductAppBundleProvenance(value: unknown): value is object;
|
|
3
|
+
export declare function getVerifiedProductAppBundleExecutable(value: unknown): string | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WorkspaceAppCandidate } from './discovery.js';
|
|
2
|
+
import type { McpAppLocalRegistration } from './types.js';
|
|
3
|
+
export declare function buildWorkspaceCandidateRegistration(candidate: WorkspaceAppCandidate): McpAppLocalRegistration;
|
|
4
|
+
export declare function validateWorkspaceCandidateRegistration(candidate: WorkspaceAppCandidate): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const MCP_APP_CARD_HANDLERS: readonly ["card.secret-env"];
|
|
2
|
+
export type McpAppCardHandler = (typeof MCP_APP_CARD_HANDLERS)[number];
|
|
3
|
+
export declare function isMcpAppCardHandler(handler: unknown): handler is McpAppCardHandler;
|
|
4
|
+
export declare function isMcpAppCardAction(usage: string | undefined, backend: {
|
|
5
|
+
readonly type: string;
|
|
6
|
+
readonly handler?: unknown;
|
|
7
|
+
} | undefined): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CrewxAppCatalogOptions, CrewxAppCatalogResult, CrewxAppDefinitionHashInput } from './types.js';
|
|
2
|
+
export declare function hashCrewxAppDefinition(input: CrewxAppDefinitionHashInput): string;
|
|
3
|
+
export declare const hashAppDefinition: typeof hashCrewxAppDefinition;
|
|
4
|
+
export declare function discoverWorkspaceAppCatalog(workspaceRoot: string, options?: CrewxAppCatalogOptions): Promise<CrewxAppCatalogResult>;
|
|
5
|
+
export declare const listWorkspaceApps: typeof discoverWorkspaceAppCatalog;
|
|
6
|
+
export declare const createWorkspaceAppCatalog: typeof discoverWorkspaceAppCatalog;
|
|
7
|
+
export type { CrewxAppDefinitionHashInput, CrewxAppCatalogOptions, CrewxAppCatalogResult, } from './types.js';
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { UI_CONTENT_MAX_BYTES, UI_CONTENT_MAX_LINES, UI_CONTENT_MEDIA_TYPES, countContentLines, sha256Content } from '../app/protocol.js';
|
|
2
|
+
import { isUiContentMediaType, isValidUiAppInstanceId } from './content-declarations.js';
|
|
3
|
+
import type { UiContentMediaType } from './content-declarations.js';
|
|
4
|
+
export { UI_CONTENT_MAX_BYTES, UI_CONTENT_MAX_LINES, UI_CONTENT_MEDIA_TYPES, countContentLines, isUiContentMediaType, isValidUiAppInstanceId, sha256Content, };
|
|
5
|
+
export type { UiContentMediaType };
|
|
6
|
+
export declare const UI_CONTENT_TICKET_TTL_MS = 120000;
|
|
7
|
+
export declare const UI_CONTENT_OUTPUT_TTL_MS = 120000;
|
|
8
|
+
export declare const UI_CONTENT_MAX_MEMORY_BYTES: number;
|
|
9
|
+
export declare const UI_CONTENT_ERROR_CODES: readonly ["CONTENT_SOURCE_UNSUPPORTED", "CONTENT_REQUIRED", "CONTENT_EXPIRED", "CONTENT_BINDING_MISMATCH", "CONTENT_DIGEST_MISMATCH", "CONTENT_TOO_LARGE", "CONTENT_ENCODING_INVALID", "CONTENT_BUSY", "IDENTITY_UNAVAILABLE", "EXEC_OUTPUT_INVALID"];
|
|
10
|
+
export type UiContentErrorCode = (typeof UI_CONTENT_ERROR_CODES)[number];
|
|
11
|
+
export interface UiContentInputDeclaration {
|
|
12
|
+
readonly mediaType: UiContentMediaType;
|
|
13
|
+
readonly required?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface UiContentOutputDeclaration {
|
|
16
|
+
readonly mediaType: UiContentMediaType;
|
|
17
|
+
readonly range?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface UiActionContentDeclaration {
|
|
20
|
+
readonly in?: UiContentInputDeclaration;
|
|
21
|
+
readonly out?: UiContentOutputDeclaration;
|
|
22
|
+
}
|
|
23
|
+
export interface UiContentRangeRequest {
|
|
24
|
+
readonly startLine: number;
|
|
25
|
+
readonly lineCount: number;
|
|
26
|
+
}
|
|
27
|
+
export interface UiContentRange extends UiContentRangeRequest {
|
|
28
|
+
readonly totalLines: number;
|
|
29
|
+
}
|
|
30
|
+
export interface ContentFrame {
|
|
31
|
+
readonly bytes: Uint8Array;
|
|
32
|
+
readonly sha256: string;
|
|
33
|
+
readonly lines: number;
|
|
34
|
+
readonly mediaType: UiContentMediaType;
|
|
35
|
+
readonly range?: UiContentRange;
|
|
36
|
+
readonly complete?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface UiContentBinding {
|
|
39
|
+
readonly workspaceId: string;
|
|
40
|
+
readonly threadId: string;
|
|
41
|
+
readonly instanceId: string;
|
|
42
|
+
readonly actionId: string;
|
|
43
|
+
readonly requestId: string;
|
|
44
|
+
}
|
|
45
|
+
export interface UiContentInputTicket {
|
|
46
|
+
readonly ticket: string;
|
|
47
|
+
readonly binding: UiContentBinding;
|
|
48
|
+
readonly sha256: string;
|
|
49
|
+
readonly bytes: number;
|
|
50
|
+
readonly lines: number;
|
|
51
|
+
readonly mediaType: UiContentMediaType;
|
|
52
|
+
readonly expiresAt: number;
|
|
53
|
+
}
|
|
54
|
+
export interface UiContentChannelPort {
|
|
55
|
+
putInput(ticket: UiContentInputTicket, frame: ContentFrame): void;
|
|
56
|
+
lookupInput(ticket: string, now: number): UiContentInputTicket | null;
|
|
57
|
+
consumeInput(ticket: string, now: number): ContentFrame | null;
|
|
58
|
+
reserveOutput(binding: UiContentBinding, now: number): boolean;
|
|
59
|
+
releaseOutput(binding: UiContentBinding): void;
|
|
60
|
+
putOutput(binding: UiContentBinding, frame: ContentFrame, now: number): void;
|
|
61
|
+
readOutput(binding: UiContentBinding, now: number): ContentFrame | null;
|
|
62
|
+
}
|
|
63
|
+
export declare class UiContentChannelError extends Error {
|
|
64
|
+
readonly code: UiContentErrorCode;
|
|
65
|
+
readonly name = "UiContentChannelError";
|
|
66
|
+
constructor(code: UiContentErrorCode);
|
|
67
|
+
}
|
|
68
|
+
export declare function decodeContentUtf8(bytes: Uint8Array): string;
|
|
69
|
+
export declare function validateContentBytes(value: unknown, mediaType: unknown): {
|
|
70
|
+
readonly bytes: Uint8Array;
|
|
71
|
+
readonly sha256: string;
|
|
72
|
+
readonly lines: number;
|
|
73
|
+
};
|
|
74
|
+
export interface ValidateContentFrameOptions {
|
|
75
|
+
readonly direction: 'in' | 'out';
|
|
76
|
+
readonly mediaType: UiContentMediaType;
|
|
77
|
+
readonly expectedSha256?: string;
|
|
78
|
+
readonly expectedBytes?: number;
|
|
79
|
+
readonly expectedLines?: number;
|
|
80
|
+
readonly requestedRange?: UiContentRangeRequest;
|
|
81
|
+
}
|
|
82
|
+
export declare function validateContentFrame(value: unknown, options: ValidateContentFrameOptions): ContentFrame;
|
|
83
|
+
export declare function isUiContentDeclaration(value: unknown): value is UiActionContentDeclaration;
|
|
84
|
+
export declare function isUiContentRangeRequest(value: unknown): value is UiContentRangeRequest;
|
|
85
|
+
export declare function contentBindingMatches(left: UiContentBinding, right: UiContentBinding): boolean;
|
|
86
|
+
export declare function isValidUiThreadIdentity(value: unknown): value is string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { UI_CONTENT_MEDIA_TYPES } from '../app/content-media-types.js';
|
|
2
|
+
import type { UiContentMediaType } from '../app/content-media-types.js';
|
|
3
|
+
import type { UiDefinition, UiDefinitionRef } from '../ui-instance/types.js';
|
|
4
|
+
export { UI_CONTENT_MEDIA_TYPES };
|
|
5
|
+
export type { UiContentMediaType };
|
|
6
|
+
export interface McpAppContentActionDeclaration {
|
|
7
|
+
readonly actionId: string;
|
|
8
|
+
readonly in?: {
|
|
9
|
+
readonly mediaType: UiContentMediaType;
|
|
10
|
+
readonly required: boolean;
|
|
11
|
+
};
|
|
12
|
+
readonly out?: {
|
|
13
|
+
readonly mediaType: UiContentMediaType;
|
|
14
|
+
readonly range: boolean;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface McpAppContentActions {
|
|
18
|
+
readonly schemaVersion: 1;
|
|
19
|
+
readonly instanceId: string;
|
|
20
|
+
readonly definition: {
|
|
21
|
+
readonly id: string;
|
|
22
|
+
readonly version: number;
|
|
23
|
+
readonly hash: string;
|
|
24
|
+
};
|
|
25
|
+
readonly actions: readonly McpAppContentActionDeclaration[];
|
|
26
|
+
}
|
|
27
|
+
export declare function isUiContentMediaType(value: unknown): value is UiContentMediaType;
|
|
28
|
+
export declare function isValidUiAppInstanceId(value: unknown): value is string;
|
|
29
|
+
export declare function buildMcpAppContentActions(instanceId: string, definition: UiDefinition): McpAppContentActions | undefined;
|
|
30
|
+
export declare function isMcpAppContentActions(value: unknown): value is McpAppContentActions;
|
|
31
|
+
export declare function contentActionsMatch(value: unknown, instanceId: string, definitionRef: UiDefinitionRef): boolean;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type AppDevCheckItem = {
|
|
2
|
+
readonly rule: 'manifest' | 'external_resource' | 'output_unsafe_string' | 'output_invalid' | 'output_size' | 'call_duration';
|
|
3
|
+
readonly severity: 'error' | 'warning' | 'ok';
|
|
4
|
+
readonly code: string;
|
|
5
|
+
readonly where: string;
|
|
6
|
+
readonly detail?: Record<string, string | number>;
|
|
7
|
+
};
|
|
8
|
+
export type ExternalResourceKind = 'script' | 'style' | 'image' | 'font' | 'media' | 'frame' | 'object' | 'form' | 'navigation' | 'css' | 'script_network';
|
|
9
|
+
export interface ExternalResourceFinding {
|
|
10
|
+
readonly line: number;
|
|
11
|
+
readonly column: number;
|
|
12
|
+
readonly url: string;
|
|
13
|
+
readonly directive: string;
|
|
14
|
+
readonly kind: ExternalResourceKind;
|
|
15
|
+
}
|
|
16
|
+
export interface InspectSkillBackendOutputOptions {
|
|
17
|
+
readonly actionId: string;
|
|
18
|
+
readonly dataPaths?: readonly string[];
|
|
19
|
+
readonly resultProjectionAllow?: readonly string[];
|
|
20
|
+
readonly durationMs?: number;
|
|
21
|
+
readonly timedOut?: boolean;
|
|
22
|
+
readonly contentFramed?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface ScanExternalResourcesOptions {
|
|
25
|
+
readonly csp: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function inspectSkillBackendOutput(stdoutText: string, options: InspectSkillBackendOutputOptions): AppDevCheckItem[];
|
|
28
|
+
export declare function scanExternalResources(html: string, options: ScanExternalResourcesOptions): ExternalResourceFinding[];
|
|
29
|
+
export declare function externalResourceCheckItems(entryRelativePath: string, findings: readonly ExternalResourceFinding[]): AppDevCheckItem[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AppManifestFileName, AppManifestReason } from '../ui-plugin/app-manifest.js';
|
|
2
|
+
export declare function projectAppManifestReason(value: unknown): AppManifestReason | undefined;
|
|
3
|
+
export declare function projectAppManifestFiles(value: unknown): readonly AppManifestFileName[] | undefined;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import type { UiDefinitionLineageEntry } from '../ui-instance/lineage.js';
|
|
2
|
+
import type { JsonObject, JsonValue, UiDefinition } from '../ui-instance/types.js';
|
|
3
|
+
import type { AppManifestFileName, AppManifestReason } from '../ui-plugin/index.js';
|
|
4
|
+
import type { UiPluginHandlerMetadata, UiPluginManifestV2, UiPluginNormalizedManifestV2 } from '../ui-plugin/types.js';
|
|
5
|
+
import { createWorkspaceAppScanCache, type WorkspaceAppScanCache, type WorkspaceAppScanRootIdentity } from './workspace-app-scan-cache.js';
|
|
6
|
+
import { AppDiscoveryFsError, NodeAppDiscoveryFs, NodeAppDiscoveryFsAdapter, defaultAppDiscoveryFs, defaultNodeAppDiscoveryFs, type AppDiscoveryFsErrorCode } from './node-app-discovery-fs.js';
|
|
7
|
+
import type { McpAppRegistry } from './types.js';
|
|
8
|
+
import type { ProductAppBundleFileHash, ProductAppBundleInput, ProductAppBundleProvenance as LoadedProductAppBundleProvenance } from './product-bundle-loader.js';
|
|
9
|
+
export type { ProductAppBundleDefinitionIdentity, ProductAppBundleFileHash, ProductAppBundleIndex, ProductAppBundleInput, ProductAppBundlePackageIndex, ProductAppBundleReservations, } from './product-bundle-loader.js';
|
|
10
|
+
export { productAppBundleReservations } from './product-bundle-loader.js';
|
|
11
|
+
export type WorkspaceAppSource = 'apps' | 'skills';
|
|
12
|
+
export declare function isWorkspacePackage(source: WorkspaceAppSource, relativePath: string): boolean;
|
|
13
|
+
export type WorkspaceAppDiscoverySource = WorkspaceAppSource | 'bundled';
|
|
14
|
+
export interface ProductAppBundleProvenance extends LoadedProductAppBundleProvenance {
|
|
15
|
+
readonly appId: string;
|
|
16
|
+
readonly definitionId: string;
|
|
17
|
+
readonly version: number;
|
|
18
|
+
readonly definitionHash: string;
|
|
19
|
+
readonly files: readonly ProductAppBundleFileHash[];
|
|
20
|
+
}
|
|
21
|
+
export type WorkspaceAppDiscoveryIncompleteReason = 'time_limit';
|
|
22
|
+
export type WorkspaceAppDiagnosticCode = 'MANIFEST_MISSING' | 'MANIFEST_INVALID' | 'MANIFEST_DUAL_MISMATCH' | 'ENTRY_INVALID' | 'INITIAL_STATE_INVALID' | 'DUPLICATE_ID' | 'RESERVED_ID' | 'BUNDLE_INTEGRITY' | 'LINEAGE_INVALID' | 'LINEAGE_STALE' | 'PATH_ESCAPED' | 'LIMIT_EXCEEDED' | 'DISCOVERY_TIME_LIMIT' | 'ASSET_CATALOG_INVALID' | 'EXEC_DENIED';
|
|
23
|
+
export interface WorkspaceAppDiagnostic {
|
|
24
|
+
readonly code: WorkspaceAppDiagnosticCode;
|
|
25
|
+
readonly pluginId?: string;
|
|
26
|
+
readonly source: WorkspaceAppDiscoverySource;
|
|
27
|
+
readonly relativePath: string;
|
|
28
|
+
readonly reason?: AppManifestReason;
|
|
29
|
+
readonly files?: readonly AppManifestFileName[];
|
|
30
|
+
}
|
|
31
|
+
export interface ProductAppBundleSnapshotMetadata {
|
|
32
|
+
readonly indexHash?: string;
|
|
33
|
+
readonly candidates?: readonly WorkspaceAppCandidate[];
|
|
34
|
+
readonly diagnostics: readonly WorkspaceAppDiagnostic[];
|
|
35
|
+
readonly reservedAppIds: readonly string[];
|
|
36
|
+
readonly reservedDefinitionIds: readonly string[];
|
|
37
|
+
}
|
|
38
|
+
export type McpAppDiscoveryDiagnostic = WorkspaceAppDiagnostic;
|
|
39
|
+
export type AppDiscoveryDiagnostic = WorkspaceAppDiagnostic;
|
|
40
|
+
export type AppDiscoveryDirectoryEntryKind = 'file' | 'directory' | 'symlink' | 'other';
|
|
41
|
+
export interface AppDiscoveryDirectoryEntry {
|
|
42
|
+
readonly name: string;
|
|
43
|
+
readonly kind: AppDiscoveryDirectoryEntryKind;
|
|
44
|
+
}
|
|
45
|
+
export interface AppDiscoveryFileFingerprint {
|
|
46
|
+
readonly dev: bigint;
|
|
47
|
+
readonly ino: bigint;
|
|
48
|
+
readonly size: bigint;
|
|
49
|
+
readonly mtimeNs: bigint;
|
|
50
|
+
readonly ctimeNs: bigint;
|
|
51
|
+
readonly candidateRealPath: string;
|
|
52
|
+
}
|
|
53
|
+
export interface AppDiscoveryRootIdentity extends WorkspaceAppScanRootIdentity {
|
|
54
|
+
}
|
|
55
|
+
export type AppDiscoveryDirectoryListing = readonly AppDiscoveryDirectoryEntry[] | readonly string[];
|
|
56
|
+
export type AppDiscoveryBytes = Uint8Array | ArrayBuffer | readonly number[];
|
|
57
|
+
export type AppDiscoveryMaybePromise<T> = T | PromiseLike<T>;
|
|
58
|
+
export interface AppDiscoveryFileSystem {
|
|
59
|
+
readonly listDirectory?: (root: string, relativePath: string) => AppDiscoveryMaybePromise<AppDiscoveryDirectoryListing>;
|
|
60
|
+
readonly readDirectory?: (root: string, relativePath: string) => AppDiscoveryMaybePromise<AppDiscoveryDirectoryListing>;
|
|
61
|
+
readonly readdir?: (root: string, relativePath: string) => AppDiscoveryMaybePromise<AppDiscoveryDirectoryListing>;
|
|
62
|
+
readonly readVerifiedFile?: (root: string, relativePath: string, byteLimit: number) => AppDiscoveryMaybePromise<AppDiscoveryBytes>;
|
|
63
|
+
readonly readFileVerified?: (root: string, relativePath: string, byteLimit: number) => AppDiscoveryMaybePromise<AppDiscoveryBytes>;
|
|
64
|
+
readonly fingerprintVerifiedFile?: (root: string, relativePath: string, byteLimit: number) => AppDiscoveryMaybePromise<AppDiscoveryFileFingerprint>;
|
|
65
|
+
readonly getRootIdentity?: (root: string) => AppDiscoveryMaybePromise<AppDiscoveryRootIdentity>;
|
|
66
|
+
}
|
|
67
|
+
export interface WorkspaceAppReservedCatalog {
|
|
68
|
+
readonly appIds?: Iterable<string>;
|
|
69
|
+
readonly definitionIds?: Iterable<string>;
|
|
70
|
+
readonly toolNames?: Iterable<string>;
|
|
71
|
+
}
|
|
72
|
+
export type WorkspaceAppBuiltinCatalog = Pick<McpAppRegistry, 'listMcpApps' | 'listMcpAppTools'>;
|
|
73
|
+
export interface WorkspaceAppDiscoveryOptions {
|
|
74
|
+
readonly filesystem?: AppDiscoveryFileSystem;
|
|
75
|
+
readonly fileSystem?: AppDiscoveryFileSystem;
|
|
76
|
+
readonly fs?: AppDiscoveryFileSystem;
|
|
77
|
+
readonly clock?: () => number;
|
|
78
|
+
readonly reserved?: WorkspaceAppReservedCatalog;
|
|
79
|
+
readonly builtin?: WorkspaceAppReservedCatalog;
|
|
80
|
+
readonly builtins?: WorkspaceAppReservedCatalog | WorkspaceAppBuiltinCatalog;
|
|
81
|
+
readonly builtinCatalog?: WorkspaceAppBuiltinCatalog;
|
|
82
|
+
readonly reservedAppIds?: Iterable<string>;
|
|
83
|
+
readonly reservedDefinitionIds?: Iterable<string>;
|
|
84
|
+
readonly reservedToolNames?: Iterable<string>;
|
|
85
|
+
readonly productBundle?: ProductAppBundleInput;
|
|
86
|
+
readonly productBundleReservationMetadata?: ProductAppBundleSnapshotMetadata;
|
|
87
|
+
readonly scanCache?: WorkspaceAppScanCache;
|
|
88
|
+
}
|
|
89
|
+
export interface WorkspaceAppToolNames {
|
|
90
|
+
readonly read: string;
|
|
91
|
+
readonly action?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface WorkspaceAppResourceSnapshot {
|
|
94
|
+
readonly provenance?: ProductAppBundleProvenance;
|
|
95
|
+
readonly entry: {
|
|
96
|
+
readonly path: 'ui/index.html';
|
|
97
|
+
readonly hash: string;
|
|
98
|
+
readonly bytes: readonly number[];
|
|
99
|
+
};
|
|
100
|
+
readonly initialState?: {
|
|
101
|
+
readonly path: 'ui/state.json';
|
|
102
|
+
readonly hash: string;
|
|
103
|
+
readonly bytes: readonly number[];
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
interface WorkspaceAppCandidateBase {
|
|
107
|
+
readonly appId: string;
|
|
108
|
+
readonly pluginId: string;
|
|
109
|
+
readonly definitionId: string;
|
|
110
|
+
readonly version: number;
|
|
111
|
+
readonly releaseVersion?: string;
|
|
112
|
+
readonly manifestFile?: AppManifestFileName;
|
|
113
|
+
readonly mcpb?: Readonly<Record<string, JsonValue>>;
|
|
114
|
+
readonly relativePath: string;
|
|
115
|
+
readonly manifest: UiPluginManifestV2;
|
|
116
|
+
readonly normalized: UiPluginNormalizedManifestV2;
|
|
117
|
+
readonly name: string;
|
|
118
|
+
readonly description: string;
|
|
119
|
+
readonly icon?: string;
|
|
120
|
+
readonly tone?: UiPluginManifestV2['tone'];
|
|
121
|
+
readonly definition: UiDefinition;
|
|
122
|
+
readonly handlers: Readonly<Record<string, UiPluginHandlerMetadata>>;
|
|
123
|
+
readonly resources: WorkspaceAppResourceSnapshot;
|
|
124
|
+
readonly html: string;
|
|
125
|
+
readonly entryBytes: readonly number[];
|
|
126
|
+
readonly entryHash: string;
|
|
127
|
+
readonly initialState: JsonObject;
|
|
128
|
+
readonly initialStateBytes?: readonly number[];
|
|
129
|
+
readonly initialStateHash?: string;
|
|
130
|
+
readonly sourceHash: string;
|
|
131
|
+
readonly toolNames: WorkspaceAppToolNames;
|
|
132
|
+
}
|
|
133
|
+
export type WorkspaceAppCandidate = WorkspaceAppCandidateBase & ({
|
|
134
|
+
readonly source: WorkspaceAppSource;
|
|
135
|
+
readonly provenance?: never;
|
|
136
|
+
readonly lineage?: never;
|
|
137
|
+
} | {
|
|
138
|
+
readonly source?: never;
|
|
139
|
+
readonly provenance: ProductAppBundleProvenance;
|
|
140
|
+
readonly lineage: readonly UiDefinitionLineageEntry[];
|
|
141
|
+
});
|
|
142
|
+
export interface WorkspaceAppDiscoveryResult {
|
|
143
|
+
readonly apps: readonly WorkspaceAppCandidate[];
|
|
144
|
+
readonly diagnostics: readonly WorkspaceAppDiagnostic[];
|
|
145
|
+
readonly complete: boolean;
|
|
146
|
+
readonly incompleteReason?: WorkspaceAppDiscoveryIncompleteReason;
|
|
147
|
+
readonly productBundleIndexHash?: string;
|
|
148
|
+
readonly productBundleSnapshotMetadata?: ProductAppBundleSnapshotMetadata;
|
|
149
|
+
readonly candidates?: readonly WorkspaceAppCandidate[];
|
|
150
|
+
}
|
|
151
|
+
export declare const WORKSPACE_APP_TOOL_PREFIX = "crewx_local_app_";
|
|
152
|
+
export declare const LOCAL_APP_TOOL_PREFIX = "crewx_local_app_";
|
|
153
|
+
export declare const MCP_APP_WORKSPACE_TOOL_PREFIX = "crewx_local_app_";
|
|
154
|
+
export declare function deriveWorkspaceAppToolNames(pluginId: string): WorkspaceAppToolNames;
|
|
155
|
+
export declare function deriveWorkspaceAppToolName(pluginId: string, kind?: 'read' | 'action'): string;
|
|
156
|
+
export declare function discoverWorkspaceApps(workspaceRoot: string, fs?: AppDiscoveryFileSystem, options?: WorkspaceAppDiscoveryOptions): Promise<WorkspaceAppDiscoveryResult>;
|
|
157
|
+
export declare function discoverWorkspaceApps(workspaceRoot: string, options?: WorkspaceAppDiscoveryOptions): Promise<WorkspaceAppDiscoveryResult>;
|
|
158
|
+
export declare const discoverWorkspaceAppCandidates: typeof discoverWorkspaceApps;
|
|
159
|
+
export declare const scanWorkspaceApps: typeof discoverWorkspaceApps;
|
|
160
|
+
export { AppDiscoveryFsError, NodeAppDiscoveryFs, NodeAppDiscoveryFsAdapter, defaultAppDiscoveryFs, defaultNodeAppDiscoveryFs, createWorkspaceAppScanCache, };
|
|
161
|
+
export type { AppDiscoveryFsErrorCode, WorkspaceAppScanCache, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type McpAppContractErrorCode = 'APP_ID_INVALID' | 'APP_ID_CONFLICT' | 'TOOL_ID_INVALID' | 'TOOL_ID_CONFLICT' | 'RESOURCE_URI_INVALID' | 'RESOURCE_NOT_FOUND' | 'HTML_INVALID' | 'TOOL_INVALID' | 'STATE_INVALID' | 'STATE_PROJECTION_INVALID' | 'BUTTON_INVALID' | 'SERIALIZATION_INVALID';
|
|
2
|
+
export declare class McpAppContractError extends Error {
|
|
3
|
+
readonly code: McpAppContractErrorCode;
|
|
4
|
+
readonly name = "McpAppContractError";
|
|
5
|
+
constructor(code: McpAppContractErrorCode, message?: string);
|
|
6
|
+
}
|
|
7
|
+
export declare function rejectMcpApp(code: McpAppContractErrorCode, message?: string): never;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type { McpAppContractErrorCode } from './errors.js';
|
|
2
|
+
export { McpAppContractError } from './errors.js';
|
|
3
|
+
export { INSTALLED_APP_ENTRY, InstalledAppRefError, buildInstalledAppRef, validateInstalledAppRef, } from './installed-app-ref.js';
|
|
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, makeUiUri, buildMcpAppBundleRegistrationInput, buildMcpAppBundleAgentActionDescriptors, planProductBundleLegacyToolNames, resolveMcpAppFixedResultCall, } from './registry.js';
|
|
6
|
+
export { AppDiscoveryFsError, NodeAppDiscoveryFs, NodeAppDiscoveryFsAdapter, defaultAppDiscoveryFs, defaultNodeAppDiscoveryFs, createWorkspaceAppScanCache, deriveWorkspaceAppToolName, deriveWorkspaceAppToolNames, discoverWorkspaceAppCandidates, discoverWorkspaceApps, LOCAL_APP_TOOL_PREFIX, MCP_APP_WORKSPACE_TOOL_PREFIX, productAppBundleReservations, scanWorkspaceApps, WORKSPACE_APP_TOOL_PREFIX, } from './discovery.js';
|
|
7
|
+
export { loadProductAppBundleAssets } from './product-bundle-assets.js';
|
|
8
|
+
export type { ProductAppBundleAsset, ProductAppBundleAssetCatalog, ProductAppBundleAssetLoadOptions, } from './product-bundle-assets.js';
|
|
9
|
+
export type { WorkspaceAppAsset, WorkspaceAppAssetCatalog, WorkspaceAppAssetDescriptorV1, WorkspaceAppAssetLocator, } from './workspace-app-assets.js';
|
|
10
|
+
export type { AppDiscoveryBytes, AppDiscoveryDiagnostic, AppDiscoveryDirectoryEntry, AppDiscoveryDirectoryEntryKind, AppDiscoveryDirectoryListing, AppDiscoveryFileSystem, AppDiscoveryFileFingerprint, AppDiscoveryFsErrorCode, AppDiscoveryMaybePromise, AppDiscoveryRootIdentity, WorkspaceAppDiscoveryOptions as AppDiscoveryOptions, McpAppDiscoveryDiagnostic, WorkspaceAppBuiltinCatalog, WorkspaceAppCandidate, WorkspaceAppDiscoveryIncompleteReason, WorkspaceAppDiscoveryOptions, WorkspaceAppDiscoveryResult, WorkspaceAppDiagnostic, WorkspaceAppDiagnosticCode, WorkspaceAppDiscoverySource, WorkspaceAppResourceSnapshot, WorkspaceAppScanCache, WorkspaceAppReservedCatalog, WorkspaceAppSource, WorkspaceAppToolNames, ProductAppBundleDefinitionIdentity, ProductAppBundleFileHash, ProductAppBundleIndex, ProductAppBundleInput, ProductAppBundlePackageIndex, ProductAppBundleReservations, ProductAppBundleProvenance, ProductAppBundleSnapshotMetadata, } from './discovery.js';
|
|
11
|
+
export { createWorkspaceAppCatalog, discoverWorkspaceAppCatalog, hashAppDefinition, hashCrewxAppDefinition, listWorkspaceApps, } from './catalog.js';
|
|
12
|
+
export type { CrewxAppBuiltinCatalog, CrewxAppCapability, CrewxAppCatalogOptions, CrewxAppCatalogResult, CrewxAppDefinitionHashInput, CrewxAppDefinitionSummary, CrewxAppDiagnostic, CrewxAppDiagnosticCode, CrewxAppDiagnosticSource, CrewxAppInstalledProjection, CrewxAppLocalDefinitionRef, CrewxAppOrigin, CrewxAppOwnership, CrewxAppShareability, CrewxAppSharingAvailability, CrewxAppSummary, } from './types.js';
|
|
13
|
+
export { MCP_APP_PROJECTION_MAX_BYTES, buildMcpAppStateDescriptor, buildMcpAppStateProjections, createMcpAppToolResult, projectMcpAppSummaryState, serializeMcpAppStateJson, serializeMcpAppStateXml, } from './projection.js';
|
|
14
|
+
export { attachAvailableApps, buildMcpAppsContext } from './apps-context.js';
|
|
15
|
+
export type { McpAppsContext, McpAppsContextOptions } from './apps-context.js';
|
|
16
|
+
export { UI_CONTENT_ERROR_CODES, UI_CONTENT_MAX_BYTES, UI_CONTENT_MAX_LINES, UI_CONTENT_MAX_MEMORY_BYTES, UI_CONTENT_MEDIA_TYPES, UI_CONTENT_OUTPUT_TTL_MS, UI_CONTENT_TICKET_TTL_MS, UiContentChannelError, contentBindingMatches, countContentLines, decodeContentUtf8, isUiContentDeclaration, isUiContentMediaType, isUiContentRangeRequest, isValidUiAppInstanceId, isValidUiThreadIdentity, sha256Content, validateContentBytes, validateContentFrame, } from './content-channel.js';
|
|
17
|
+
export type { ContentFrame, UiActionContentDeclaration, UiContentBinding, UiContentChannelPort, UiContentErrorCode, UiContentInputDeclaration, UiContentInputTicket, UiContentMediaType, UiContentOutputDeclaration, UiContentRange, UiContentRangeRequest, ValidateContentFrameOptions, } from './content-channel.js';
|
|
18
|
+
export { buildMcpAppContentActions, contentActionsMatch, isMcpAppContentActions, } from './content-declarations.js';
|
|
19
|
+
export type { McpAppContentActionDeclaration, McpAppContentActions, } from './content-declarations.js';
|
|
20
|
+
export { CREWX_OPEN_APP_CAPABILITY, CREWX_OPEN_APP_CAPABILITY_VERSION, CREWX_OPEN_APP_MAX_JSON_DEPTH, CREWX_OPEN_APP_MAX_PARAMS_BYTES, CREWX_OPEN_APP_METHOD, CREWX_OPEN_APP_STATUS_METHOD, CREWX_OPEN_APP_SUCCESS_STATUSES, CrewxOpenAppError, UI_APP_OPEN_CAUSE_CODES, UI_APP_OPEN_ERROR_CODES, canonicalCrewxOpenAppPayload, createCrewxOpenAppCapabilityDeclaration, createCrewxOpenAppErrorResult, createCrewxOpenAppRequestId, createCrewxOpenAppSuccessResult, decideCrewxOpenAppOpen, decideCrewxOpenAppStatus, isSameCrewxOpenAppSourceBinding, parseCrewxOpenAppCapabilityDeclaration, parseCrewxOpenAppRequest, parseCrewxOpenAppResult, parseCrewxOpenAppStatusRequest, resolveCrewxOpenAppActionOutcome, } from './app-handoff.js';
|
|
21
|
+
export type { CrewxOpenAppAction, CrewxOpenAppActionOutcome, CrewxOpenAppCapabilityDeclaration, CrewxOpenAppDecisionInput, CrewxOpenAppErrorResult, CrewxOpenAppIdempotencyDecision, CrewxOpenAppLedgerLookup, CrewxOpenAppLedgerRecord, CrewxOpenAppReceiptLookup, CrewxOpenAppRequest, CrewxOpenAppResult, CrewxOpenAppSourceBinding, CrewxOpenAppStatusRequest, CrewxOpenAppSuccessResult, CrewxOpenAppSuccessStatus, UiAppOpenCauseCode, UiAppOpenErrorCode, } from './app-handoff.js';
|
|
22
|
+
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';
|
|
23
|
+
export type { McpAppModelContext, McpAppModelContextInput } from './model-context.js';
|
|
24
|
+
export { resolveAgentAccess, listMcpAppAgentActions } from './agent-access.js';
|
|
25
|
+
export type { McpAppAgentAccess, McpAppAgentAccessAction, McpAppVerifiedBundleAccessContext } from './agent-access.js';
|
|
26
|
+
export { MCP_APP_CARD_HANDLERS, isMcpAppCardHandler, isMcpAppCardAction } from './card-handler.js';
|
|
27
|
+
export type { McpAppCardHandler } from './card-handler.js';
|
|
28
|
+
export { buildStateSetHandler, createStateSetHandler, } from './state-set.js';
|
|
29
|
+
export type { StateSetHandlerBuildInput } from './state-set.js';
|
|
30
|
+
export { SKILL_BACKEND_DEFAULT_TIMEOUT_MS, SKILL_BACKEND_INHERITED_ENV_ALLOWLIST, SKILL_BACKEND_CONTENT_SCHEMA_VERSION, SKILL_BACKEND_MAX_INPUT_BYTES, SKILL_BACKEND_MAX_OUTPUT_BYTES, SKILL_BACKEND_SCHEMA_VERSION, buildSkillBackendChildEnvironment, buildSkillBackendHandler, buildVerifiedBundleSkillBackendHandler, } from './skill-backend.js';
|
|
31
|
+
export type { SkillBackendChildEnvironment, SkillBackendExecutionPort, SkillBackendExecutionRequest, SkillBackendExecutionResponse, SkillBackendHandlerBuildInput, SkillBackendInfrastructureErrorCode, SkillBackendPayload, VerifiedBundleSkillBackendBuildInput, VerifiedBundleSkillRunnerPort, VerifiedBundleSkillSpawnRequest, SkillBackendPayloadV1, SkillBackendPayloadV2, SkillBackendContentInputHeader, SkillBackendContentOutputHeader, } from './skill-backend.js';
|
|
32
|
+
export { externalResourceCheckItems, inspectSkillBackendOutput, scanExternalResources, } from './dev-checks.js';
|
|
33
|
+
export type { AppDevCheckItem, ExternalResourceFinding, ExternalResourceKind, InspectSkillBackendOutputOptions, ScanExternalResourcesOptions, } from './dev-checks.js';
|
|
34
|
+
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';
|
|
35
|
+
export type { McpAppActionDispatcherToolInput, McpAppActionToolDescriptor, McpAppActionToolInput, McpAppButtonDescriptor, McpAppButtonInput, McpAppDescriptor, McpAppDescriptorInput, McpAppInputSchema, McpAppTone, McpUiResourceCsp, McpAppRegistry, McpAppResource, McpAppServerStateInput, McpAppStateDescriptor, McpAppStateProjections, McpAppHostToolInput, McpAppLayoutSnapshot, McpAppPromptResult, McpAppPromptStatus, McpAppWindowState, McpAppStateView, McpAppHostToolName, McpCoreToolName, McpAppReadToolInput, McpAppSingleActionToolInput, McpAppToolCommonInput, McpAppToolDescriptor, McpAppFixedResult, McpAppFixedResultCall, McpAppFixedResultInvalidParams, McpAppFixedResultResolution, McpAppFixedResultUnavailable, McpAppToolInput, McpAppToolMetadata, McpAppToolRegistration, McpAppToolResult, McpAppToolVisibility, McpAppInstanceResourceBinding, McpAppMcpResourceBinding, McpAppResourceBinding, McpAppLocalResource, McpAppLocalRegistrationInput, McpAppLocalReadToolDescriptor, McpAppLocalActionToolDescriptor, McpAppLocalSingleActionToolDescriptor, McpAppLocalHostToolDescriptor, McpAppLocalToolDiagnostic, McpAppLocalToolDescriptor, McpAppLocalRegistration, McpAppBuiltinRegistration, McpAppResolvedRegistration, McpAppLocalLauncher, McpAppBuiltinLauncher, McpAppLauncher, WorkspaceAppLauncher, WorkspaceAppResolvedRegistration, McpAppWorkspaceRegistry, WorkspaceAppRegistry, McpAppWorkspaceRegistryInput, McpAppRegistryOptions, McpAppBundleHostToolTemplate, McpAppBundleAgentActionDescriptor, } from './types.js';
|
|
36
|
+
export { buildWorkspaceAppSnapshot, discoverWorkspaceAppSnapshot, reconfirmWorkspaceAppSnapshot, } from './workspace-snapshot.js';
|
|
37
|
+
export type { WorkspaceAppSnapshot, WorkspaceAppSnapshotBuildOptions, WorkspaceAppSnapshotOptions, WorkspaceAppSnapshotReconfirmResult, WorkspaceAppSnapshotResource, WorkspaceAppSnapshotInitialState, WorkspaceAppInitialState, } from './workspace-snapshot.js';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { UiDefinition, UiDefinitionRef } from '../ui-instance/types.js';
|
|
2
|
+
export declare const INSTALLED_APP_ENTRY: "ui/index.html";
|
|
3
|
+
export type InstalledAppRefErrorCode = 'APP_ID_INVALID' | 'DEFINITION_REF_INVALID' | 'ENTRY_DUPLICATE' | 'ENTRY_PATH_INVALID' | 'ENTRY_MISSING' | 'ENTRY_HASH_INVALID' | 'INSTALLED_APP_REF_INVALID';
|
|
4
|
+
export declare class InstalledAppRefError extends Error {
|
|
5
|
+
readonly code: InstalledAppRefErrorCode;
|
|
6
|
+
readonly name = "InstalledAppRefError";
|
|
7
|
+
constructor(code: InstalledAppRefErrorCode, message?: string);
|
|
8
|
+
}
|
|
9
|
+
export interface InstalledAppRef {
|
|
10
|
+
readonly appId: string;
|
|
11
|
+
readonly definition: UiDefinitionRef;
|
|
12
|
+
readonly entry: typeof INSTALLED_APP_ENTRY;
|
|
13
|
+
readonly entryHash: string;
|
|
14
|
+
}
|
|
15
|
+
export interface InstalledAppPackageFile {
|
|
16
|
+
readonly path: string;
|
|
17
|
+
readonly sha256: string;
|
|
18
|
+
}
|
|
19
|
+
export interface BuildInstalledAppRefInput {
|
|
20
|
+
readonly appId: string;
|
|
21
|
+
readonly definition: UiDefinition;
|
|
22
|
+
readonly packageFiles: readonly InstalledAppPackageFile[];
|
|
23
|
+
}
|
|
24
|
+
export declare function validateInstalledAppRef(value: unknown): InstalledAppRef;
|
|
25
|
+
export declare function buildInstalledAppRef(input: BuildInstalledAppRefInput): InstalledAppRef;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { JsonObject } from '../ui-instance/types.js';
|
|
2
|
+
export declare const MCP_APP_MODEL_CONTEXT_MAX_BYTES: number;
|
|
3
|
+
export declare const MCP_APP_MODEL_CONTEXT_MAX_STRING_LENGTH = 2048;
|
|
4
|
+
export declare const MCP_APP_MODEL_CONTEXT_MAX_ARRAY_LENGTH = 200;
|
|
5
|
+
export declare const MCP_APP_MODEL_CONTEXT_MAX_DEPTH = 8;
|
|
6
|
+
export declare const MCP_APP_ACTION_RESULT_MAX_BYTES = 2097152;
|
|
7
|
+
export interface McpAppModelContextInput {
|
|
8
|
+
readonly instanceId: string;
|
|
9
|
+
readonly definitionHash: string;
|
|
10
|
+
readonly revision: number;
|
|
11
|
+
readonly content?: unknown;
|
|
12
|
+
readonly structuredContent?: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface McpAppModelContext {
|
|
15
|
+
readonly instanceId: string;
|
|
16
|
+
readonly definitionHash: string;
|
|
17
|
+
readonly revision: number;
|
|
18
|
+
readonly content?: readonly {
|
|
19
|
+
readonly type: 'text';
|
|
20
|
+
readonly text: string;
|
|
21
|
+
}[];
|
|
22
|
+
readonly structuredContent?: JsonObject;
|
|
23
|
+
}
|
|
24
|
+
export declare function sanitizeMcpAppActionResult(value: unknown): JsonObject;
|
|
25
|
+
export declare function prepareMcpAppActionResult(value: unknown, selectedAllow: readonly string[]): JsonObject;
|
|
26
|
+
export declare function sanitizeMcpAppModelContext(value: unknown): McpAppModelContext;
|
|
27
|
+
export declare function serializeMcpAppModelContextXml(context: McpAppModelContext, options?: {
|
|
28
|
+
readonly stale?: boolean;
|
|
29
|
+
}): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AppDiscoveryFileFingerprint, AppDiscoveryRootIdentity } from './discovery.js';
|
|
2
|
+
export type AppDiscoveryFsErrorCode = 'NOT_FOUND' | 'READ_DENIED' | 'LIMIT_EXCEEDED' | 'PATH_ESCAPED' | 'IDENTITY_CHANGED' | 'TOCTOU' | 'UNSUPPORTED';
|
|
3
|
+
export declare class AppDiscoveryFsError extends Error {
|
|
4
|
+
readonly code: AppDiscoveryFsErrorCode;
|
|
5
|
+
readonly name = "AppDiscoveryFsError";
|
|
6
|
+
constructor(code: AppDiscoveryFsErrorCode);
|
|
7
|
+
}
|
|
8
|
+
export interface NodeAppDiscoveryDirectoryEntry {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly kind: 'file' | 'directory' | 'symlink' | 'other';
|
|
11
|
+
}
|
|
12
|
+
export declare class NodeAppDiscoveryFs {
|
|
13
|
+
getRootIdentity(root: string): Promise<AppDiscoveryRootIdentity>;
|
|
14
|
+
listDirectory(root: string, relativePath: string): Promise<readonly NodeAppDiscoveryDirectoryEntry[]>;
|
|
15
|
+
readdir(root: string, relativePath: string): Promise<readonly NodeAppDiscoveryDirectoryEntry[]>;
|
|
16
|
+
readDirectory(root: string, relativePath: string): Promise<readonly NodeAppDiscoveryDirectoryEntry[]>;
|
|
17
|
+
readVerifiedFile(root: string, relativePath: string, byteLimit: number): Promise<Uint8Array>;
|
|
18
|
+
fingerprintVerifiedFile(root: string, relativePath: string, byteLimit: number): Promise<AppDiscoveryFileFingerprint>;
|
|
19
|
+
readFileVerified(root: string, relativePath: string, byteLimit: number): Promise<Uint8Array>;
|
|
20
|
+
}
|
|
21
|
+
export declare const defaultAppDiscoveryFs: NodeAppDiscoveryFs;
|
|
22
|
+
export declare const defaultNodeAppDiscoveryFs: NodeAppDiscoveryFs;
|
|
23
|
+
export declare const NodeAppDiscoveryFsAdapter: typeof NodeAppDiscoveryFs;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ProductAppBundleInput } from './product-bundle-loader.js';
|
|
2
|
+
import type { AppDiscoveryFileSystem, WorkspaceAppDiagnostic } from './discovery.js';
|
|
3
|
+
import type { ProductAppBundleProvenance } from './product-bundle-loader.js';
|
|
4
|
+
export declare const MCP_APP_ASSET_MAX_FILE_BYTES: number;
|
|
5
|
+
export declare const MCP_APP_ASSET_MAX_TOTAL_BYTES: number;
|
|
6
|
+
export declare const MCP_APP_ASSET_MAX_LOCATORS = 128;
|
|
7
|
+
export declare function isCanonicalMcpAppAssetFilename(filename: string): boolean;
|
|
8
|
+
export declare function mcpAppAssetContentType(filename: string): string | undefined;
|
|
9
|
+
export interface ProductAppBundleAsset {
|
|
10
|
+
readonly sha256: string;
|
|
11
|
+
readonly filename: string;
|
|
12
|
+
readonly contentType: string;
|
|
13
|
+
readonly byteLength: number;
|
|
14
|
+
readonly provenance: ProductAppBundleProvenance;
|
|
15
|
+
bytes(): Uint8Array;
|
|
16
|
+
}
|
|
17
|
+
export interface ProductAppBundleAssetCatalog {
|
|
18
|
+
readonly indexHash?: string;
|
|
19
|
+
readonly complete: boolean;
|
|
20
|
+
readonly diagnostics: readonly WorkspaceAppDiagnostic[];
|
|
21
|
+
get(sha256: string, filename: string): ProductAppBundleAsset | undefined;
|
|
22
|
+
}
|
|
23
|
+
export interface ProductAppBundleAssetLoadOptions {
|
|
24
|
+
readonly filesystem?: AppDiscoveryFileSystem;
|
|
25
|
+
readonly clock?: () => number;
|
|
26
|
+
}
|
|
27
|
+
export declare function loadProductAppBundleAssets(input: ProductAppBundleInput, options?: ProductAppBundleAssetLoadOptions): Promise<ProductAppBundleAssetCatalog>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { UiDefinitionLineageEntry } from '../ui-instance/lineage.js';
|
|
2
|
+
import type { AppDiscoveryFileSystem, WorkspaceAppDiagnostic, WorkspaceAppDiagnosticCode } from './discovery.js';
|
|
3
|
+
export interface ProductAppBundleReservations {
|
|
4
|
+
readonly appIds: readonly string[];
|
|
5
|
+
readonly definitionIds: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
export interface ProductAppBundleInput {
|
|
8
|
+
readonly root: string | null;
|
|
9
|
+
readonly expectedIndexHash: string;
|
|
10
|
+
readonly reservedIds: ProductAppBundleReservations;
|
|
11
|
+
}
|
|
12
|
+
export interface ProductAppBundleProvenance {
|
|
13
|
+
readonly kind: 'bundled';
|
|
14
|
+
readonly launcher: boolean;
|
|
15
|
+
readonly indexHash: string;
|
|
16
|
+
readonly packageDir: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ProductAppBundleFileHash {
|
|
19
|
+
readonly path: string;
|
|
20
|
+
readonly sha256: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ProductAppBundleDefinitionIdentity {
|
|
23
|
+
readonly id: string;
|
|
24
|
+
readonly version: number;
|
|
25
|
+
readonly hash: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ProductAppBundlePackageIndex {
|
|
28
|
+
readonly packageDir: string;
|
|
29
|
+
readonly launcher?: false;
|
|
30
|
+
readonly appId: string;
|
|
31
|
+
readonly definition: ProductAppBundleDefinitionIdentity;
|
|
32
|
+
readonly lineage: readonly UiDefinitionLineageEntry[];
|
|
33
|
+
readonly files: readonly ProductAppBundleFileHash[];
|
|
34
|
+
}
|
|
35
|
+
export interface ProductAppBundleIndex {
|
|
36
|
+
readonly version: 1;
|
|
37
|
+
readonly packages: readonly ProductAppBundlePackageIndex[];
|
|
38
|
+
}
|
|
39
|
+
export interface LoadedProductBundlePackage {
|
|
40
|
+
readonly indexEntry: ProductAppBundlePackageIndex;
|
|
41
|
+
readonly lineage?: readonly UiDefinitionLineageEntry[];
|
|
42
|
+
readonly files?: ReadonlyMap<string, Uint8Array>;
|
|
43
|
+
readonly failureCode?: WorkspaceAppDiagnosticCode;
|
|
44
|
+
}
|
|
45
|
+
export interface LoadedProductBundle {
|
|
46
|
+
readonly indexHash?: string;
|
|
47
|
+
readonly packages: readonly LoadedProductBundlePackage[];
|
|
48
|
+
readonly diagnostics: readonly WorkspaceAppDiagnostic[];
|
|
49
|
+
readonly incomplete: boolean;
|
|
50
|
+
readonly reservedIds: ProductAppBundleReservations;
|
|
51
|
+
}
|
|
52
|
+
export declare function productAppBundleReservations(packages: readonly ProductAppBundlePackageIndex[]): ProductAppBundleReservations;
|
|
53
|
+
export declare function loadProductBundle(input: ProductAppBundleInput | undefined, fs: AppDiscoveryFileSystem, startedAt: number, clock: () => number): Promise<LoadedProductBundle>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { JsonObject, UiDefinition } from '../ui-instance/types.js';
|
|
2
|
+
import type { McpAppServerStateInput, McpAppStateDescriptor, McpAppStateProjections, McpAppToolDescriptor, McpAppToolResult } from './types.js';
|
|
3
|
+
export declare const MCP_APP_PROJECTION_MAX_BYTES: number;
|
|
4
|
+
export declare const SENSITIVE_KEY: RegExp;
|
|
5
|
+
export declare function projectMcpAppActionResult(result: unknown, selectedAllow: readonly string[]): JsonObject;
|
|
6
|
+
export declare function projectMcpAppSummaryState(state: unknown, definition: UiDefinition): JsonObject;
|
|
7
|
+
export declare function buildMcpAppStateDescriptor(input: McpAppServerStateInput): McpAppStateDescriptor;
|
|
8
|
+
export declare function serializeMcpAppStateJson(descriptor: McpAppStateDescriptor, dataPaths?: readonly string[]): string;
|
|
9
|
+
export declare function serializeMcpAppStateXml(descriptor: McpAppStateDescriptor): string;
|
|
10
|
+
export declare function buildMcpAppStateProjections(input: McpAppServerStateInput): McpAppStateProjections;
|
|
11
|
+
export declare function createMcpAppToolResult(tool: Pick<McpAppToolDescriptor, 'textFallback'>, options?: {
|
|
12
|
+
structuredContent?: JsonObject;
|
|
13
|
+
meta?: JsonObject;
|
|
14
|
+
}): McpAppToolResult;
|