@theaiplatform/miniapp-sdk 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -6
- package/THIRD_PARTY_NOTICES.md +18 -18
- package/config-schema.json +1 -26
- package/dist/index.d.ts +116 -26
- package/dist/rspack/index.js +559 -44
- package/dist/sdk.d.ts +116 -26
- package/dist/ui/wasm.js +5 -3
- package/dist/ui.js +5 -3
- package/dist/web.d.ts +116 -26
- package/package.json +18 -18
package/dist/rspack/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import * as __rspack_external_node_path_806ed179 from "node:path";
|
|
|
8
8
|
import * as __rspack_external_node_url_3991086a from "node:url";
|
|
9
9
|
import * as __rspack_external_saxes from "saxes";
|
|
10
10
|
import * as __rspack_external_node_util_ac04460e from "node:util";
|
|
11
|
-
var config_schema_namespaceObject = /*#__PURE__*/ JSON.parse('{"$defs":{"ActorKind":{"enum":["human","specialist"],"type":"string"},"AuthorizationBinding":{"additionalProperties":false,"properties":{"allOf":{"items":{"type":"string"},"type":"array"},"effects":{"items":{"$ref":"#/$defs/RuntimeEffect"},"type":"array"}},"type":"object"},"AutonomyLevel":{"enum":["listen","plan","do"],"type":"string"},"BrowserExtensionOptions":{"additionalProperties":false,"properties":{"manifest":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"},"restartRequired":{"default":false,"type":"boolean"}},"required":["manifest"],"type":"object"},"ChatBlockOptions":{"additionalProperties":false,"properties":{"accessibilityLabel":{"type":"string"},"fallbackFormat":{"$ref":"#/$defs/FallbackFormat"},"payloadSchema":{"type":"string"},"protocol":{"$ref":"#/$defs/ChatBlockProtocol"}},"required":["protocol","payloadSchema","fallbackFormat","accessibilityLabel"],"type":"object"},"ChatBlockProtocol":{"enum":["tap-primitives-v1","tap-federated-view-v1","isolated-html-v1","mcp-app-2026-01-26"],"type":"string"},"CommandOptions":{"additionalProperties":false,"properties":{"inputSchema":{"type":["string","null"]},"label":{"type":"string"},"placements":{"items":{"type":"string"},"type":"array"}},"required":["label"],"type":"object"},"CompositionOptions":{"additionalProperties":false,"properties":{"childPackageIds":{"items":{"type":"string"},"type":"array"},"contributionIds":{"items":{"type":"string"},"type":"array"}},"type":"object"},"ConsentPolicy":{"enum":["none","once","channel","reusable","fresh-decision"],"type":"string"},"ContributionScope":{"enum":["user","workspace","channel","conversation","project","resource"],"type":"string"},"ContributionTarget":{"anyOf":[{"$ref":"#/$defs/ModuleContributionTarget"},{"$ref":"#/$defs/HostDeclarativeContributionTarget"}],"description":"A target-specific execution binding selected for a contribution.\\n\\nExecutable package modules select one immutable Federation expose. Host-\\ndeclarative contributions are materialized by TAP and therefore select the\\nhost runtime without inventing a module expose."},"DeclarativeOptions":{"additionalProperties":false,"properties":{"schema":{"type":"string"}},"required":["schema"],"type":"object"},"EventDelivery":{"enum":["ephemeral","durable"],"type":"string"},"ExecutableOptions":{"additionalProperties":false,"properties":{"effects":{"items":{"$ref":"#/$defs/RuntimeEffect"},"type":"array"},"inputSchema":{"type":["string","null"]},"outputSchema":{"type":["string","null"]},"timeoutMs":{"format":"uint64","minimum":0,"type":["integer","null"]}},"type":"object"},"ExecutionRuntime":{"enum":["webview","quickjs","worker","node","workflow-host"],"type":"string"},"FallbackFormat":{"enum":["text","markdown"],"type":"string"},"FederationExpose":{"additionalProperties":false,"description":"One exposed module in the locked Federation graph.","properties":{"integrity":{"type":"string"},"runtime":{"$ref":"#/$defs/ExecutionRuntime"}},"required":["integrity","runtime"],"type":"object"},"FederationLibraryType":{"enum":["module","script","commonjs-module"],"type":"string"},"FederationTarget":{"additionalProperties":false,"description":"One target-specific Module Federation remote container.","properties":{"assetLock":{"description":"Relative path to the build-generated content-addressed asset graph lock.","type":"string"},"assetLockIntegrity":{"description":"SHA-256 integrity of the canonical asset-lock bytes.","type":"string"},"exposes":{"additionalProperties":{"$ref":"#/$defs/FederationExpose"},"type":"object"},"libraryType":{"$ref":"#/$defs/FederationLibraryType"},"manifest":{"type":["string","null"]},"manifestIntegrity":{"type":["string","null"]},"remoteEntry":{"type":"string"},"remoteEntryIntegrity":{"type":"string"},"remoteName":{"type":"string"}},"required":["remoteName","remoteEntry","remoteEntryIntegrity","assetLock","assetLockIntegrity","libraryType","exposes"],"type":"object"},"HostDeclarativeContributionTarget":{"additionalProperties":false,"description":"A contribution whose declarative configuration TAP materializes directly.","properties":{"runtime":{"$ref":"#/$defs/HostDeclarativeRuntime"}},"required":["runtime"],"type":"object"},"HostDeclarativeRuntime":{"description":"The only runtime accepted by an expose-free contribution target binding.","enum":["host-declarative"],"type":"string"},"InstancePolicy":{"enum":["per-mount","per-conversation","per-channel","per-workspace","singleton"],"type":"string"},"KnowledgeOptions":{"additionalProperties":false,"properties":{"materialization":{"type":["string","null"]},"schema":{"type":"string"}},"required":["schema"],"type":"object"},"LifecycleScope":{"enum":["installation","realm","contribution","mount"],"type":"string"},"McpAppOptions":{"additionalProperties":false,"description":"One sandboxed MCP App bound to exact tool and UI resource contributions.","properties":{"protocolVersion":{"type":"string"},"resourceContributionId":{"type":"string"},"serverContributionId":{"type":"string"},"toolContributionId":{"type":"string"}},"required":["serverContributionId","toolContributionId","resourceContributionId","protocolVersion"],"type":"object"},"McpConsumerPolicy":{"additionalProperties":false,"description":"Publisher-declared upper bound on who may consume an MCP server.\\n\\nBoth lists default empty. Installation policy may select or remove entries,\\nbut cannot authorize consumers outside this signed maximum.","properties":{"contributionIds":{"description":"Exact same-package contribution identities eligible to receive access.","items":{"type":"string"},"type":"array"},"externalConsumers":{"description":"External platform consumer classes eligible for narrower host grants.","items":{"$ref":"#/$defs/McpExternalConsumerClass"},"type":"array"}},"type":"object"},"McpExternalConsumerClass":{"description":"Closed external consumer classes a publisher may include in its maximum.","enum":["selected-miniapps","selected-specialists","chat","workflows","platform"],"type":"string"},"McpHttpCredentialRequirement":{"additionalProperties":false,"description":"One host-held credential injected into a declared Streamable HTTP header.\\n\\nDescriptors name requirements and destinations only. Credential values are\\nresolved from host-owned secret storage after installation consent.","properties":{"header":{"type":"string"},"id":{"type":"string"}},"required":["id","header"],"type":"object"},"McpPromptOptions":{"additionalProperties":false,"description":"One MCP prompt promoted from its owning server\'s live catalog.","properties":{"promptName":{"type":"string"},"serverContributionId":{"type":"string"}},"required":["serverContributionId","promptName"],"type":"object"},"McpResourceOptions":{"additionalProperties":false,"description":"One exact MCP resource promoted from its owning server\'s live catalog.","properties":{"mimeType":{"type":["string","null"]},"serverContributionId":{"type":"string"},"uri":{"type":"string"}},"required":["serverContributionId","uri"],"type":"object"},"McpResourceTemplateOptions":{"additionalProperties":false,"description":"One MCP resource template promoted from its owning server\'s live catalog.","properties":{"mimeType":{"type":["string","null"]},"serverContributionId":{"type":"string"},"uriTemplate":{"type":"string"}},"required":["serverContributionId","uriTemplate"],"type":"object"},"McpServerImplementation":{"description":"Mutually exclusive ways TAP can activate a declared MCP server.","oneOf":[{"additionalProperties":false,"description":"Load the server adapter from the contribution\'s verified Federation expose.","properties":{"type":{"const":"package-runtime","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"description":"Spawn a reviewed local process and communicate over stdio.","properties":{"args":{"items":{"type":"string"},"type":"array"},"command":{"type":"string"},"credentialRequirements":{"items":{"$ref":"#/$defs/McpStdioCredentialRequirement"},"type":"array"},"type":{"const":"stdio","type":"string"}},"required":["type","command"],"type":"object"},{"additionalProperties":false,"description":"Connect to an HTTPS MCP endpoint using Streamable HTTP.","properties":{"credentialRequirements":{"items":{"$ref":"#/$defs/McpHttpCredentialRequirement"},"type":"array"},"type":{"const":"streamable-http","type":"string"},"url":{"type":"string"}},"required":["type","url"],"type":"object"}]},"McpServerOptions":{"additionalProperties":false,"description":"One package-declared MCP server and its maximum consumer audience.","properties":{"consumerPolicy":{"$ref":"#/$defs/McpConsumerPolicy","default":{}},"implementation":{"$ref":"#/$defs/McpServerImplementation"},"protocolVersion":{"type":"string"}},"required":["protocolVersion","implementation"],"type":"object"},"McpStdioCredentialRequirement":{"additionalProperties":false,"description":"One host-held credential injected into a declared stdio environment slot.\\n\\nDescriptors name requirements and destinations only. Credential values are\\nresolved from host-owned secret storage after installation consent.","properties":{"environmentVariable":{"type":"string"},"id":{"type":"string"}},"required":["id","environmentVariable"],"type":"object"},"McpToolOptions":{"additionalProperties":false,"description":"One MCP tool promoted from its owning server\'s live catalog.","properties":{"effects":{"items":{"$ref":"#/$defs/RuntimeEffect"},"type":"array"},"inputSchema":{"type":["string","null"]},"outputSchema":{"type":["string","null"]},"serverContributionId":{"type":"string"},"timeoutMs":{"format":"uint64","minimum":0,"type":["integer","null"]},"toolName":{"type":"string"}},"required":["serverContributionId","toolName"],"type":"object"},"MiniAppBundleManifest":{"additionalProperties":false,"description":"Manifest for a single TAP miniapp bundle.","properties":{"$schema":{"description":"Optional JSON Schema reference for editor support.","type":["string","null"]},"description":{"description":"Short human-readable summary of the miniapp.","minLength":1,"type":"string"},"entry":{"$ref":"#/$defs/MiniAppSource","description":"Entry file, package specifier, or URL for the miniapp config."},"icon":{"description":"Lucide-compatible icon name shown by host UI surfaces.","minLength":1,"type":["string","null"]},"name":{"description":"Display name for the miniapp.","minLength":1,"type":"string"},"runtime":{"$ref":"#/$defs/TapRuntime","description":"TAP miniapp runtime version."},"version":{"description":"Miniapp version.","minLength":1,"type":"string"}},"required":["name","description","version","runtime","entry"],"title":"Tap Miniapp Bundle Manifest","type":"object"},"MiniAppCategory":{"description":"Closed Marketplace discovery taxonomy for descriptor-backed miniapps.","enum":["productivity","developer-tools","creativity","communication","data-and-analytics","business","education","media-and-entertainment","utilities","other"],"type":"string"},"MiniAppReferencesManifest":{"additionalProperties":false,"description":"Manifest that references built TAP miniapp manifests.","properties":{"$schema":{"description":"Optional JSON Schema reference for editor support.","type":["string","null"]},"references":{"description":"References to built TAP miniapp manifests.\\n\\nString shorthand remains available for local and mutable development sources. An\\nimmutable remote collection uses the object form (`{ \\"url\\": ..., \\"hash\\": ... }`) so\\nevery child manifest carries its own SHA-256 integrity boundary.","items":{"$ref":"#/$defs/MiniAppSource"},"minItems":1,"type":"array"}},"required":["references"],"title":"Tap Miniapp References Manifest","type":"object"},"MiniAppSource":{"description":"Absolute URL or local path. Bundle entry paths are resolved relative to the manifest that declares them.","oneOf":[{"additionalProperties":false,"properties":{"Path":{"additionalProperties":false,"properties":{"path":{"minLength":1,"type":"string"}},"required":["path"],"type":"object"}},"required":["Path"],"type":"object"},{"additionalProperties":false,"properties":{"Url":{"additionalProperties":false,"properties":{"hash":{"description":"Expected SHA-256 hex digest for the remote source bytes.","type":["string","null"]},"url":{"format":"uri","type":"string"}},"required":["url"],"type":"object"}},"required":["Url"],"type":"object"},{"description":"Absolute URL or local path. Bundle entry paths are resolved relative to the manifest that declares them.","minLength":1,"type":"string"},{"additionalProperties":false,"properties":{"hash":{"description":"Expected SHA-256 hex digest for the remote source bytes.","type":["string","null"]},"url":{"format":"uri","type":"string"}},"required":["url"],"type":"object"}]},"ModuleContributionTarget":{"additionalProperties":false,"description":"A contribution implemented by one module in the locked Federation graph.","properties":{"expose":{"type":"string"},"runtime":{"$ref":"#/$defs/ExecutionRuntime"}},"required":["expose","runtime"],"type":"object"},"PackageCompatibility":{"additionalProperties":false,"description":"Host and SDK compatibility checked before remote loading.","properties":{"tapHost":{"type":"string"},"tapSdk":{"type":"string"}},"required":["tapSdk","tapHost"],"type":"object"},"PackageContribution":{"description":"Strict contribution union covering the initial TAP extension catalog.","oneOf":[{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"ui.surface","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/UiSurfaceOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"ui.renderer","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/RendererOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"chat.block","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/ChatBlockOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"action.command","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/CommandOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"prompt","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/ExecutableOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"skill","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/ExecutableOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"tool","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/ExecutableOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"specialist","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/ExecutableOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"task.type","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/TaskOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"task.attribute","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/TaskOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"task.view","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/TaskOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"task.action","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/TaskOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"task.template","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/TaskOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"workflow","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/WorkflowOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"workflow.node","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/WorkflowNodeOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"automation.trigger","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/ExecutableOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"mcp.server","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/McpServerOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"mcp.tool","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/McpToolOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"mcp.prompt","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/McpPromptOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"mcp.resource","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/McpResourceOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"mcp.resource-template","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/McpResourceTemplateOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"mcp.app","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/McpAppOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"miniapp","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/CompositionOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"integration.connector","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/CompositionOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"browser.extension","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/BrowserExtensionOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"knowledge.plot-template","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/KnowledgeOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"knowledge.source-provider","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/KnowledgeOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"knowledge.enricher","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/KnowledgeOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"knowledge.retriever","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/KnowledgeOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"provider.adapter","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/ExecutableOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"template","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/DeclarativeOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"permission.catalog","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/PermissionCatalogOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"}]},"PackageDependency":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"optional":{"default":false,"type":"boolean"},"packageId":{"type":"string"},"version":{"type":"string"}},"required":["alias","packageId","version"],"type":"object"},"PackageEventCatalog":{"additionalProperties":false,"description":"Package-defined published and consumed events.","properties":{"publishes":{"items":{"$ref":"#/$defs/PublishedEvent"},"type":"array"},"subscribes":{"items":{"$ref":"#/$defs/SubscribedEvent"},"type":"array"}},"type":"object"},"PackageIdentity":{"additionalProperties":false,"description":"Immutable identity carried by a package descriptor.","properties":{"namespace":{"type":"string"},"organizationId":{"type":["string","null"]},"packageId":{"type":"string"},"parentPackageId":{"type":["string","null"]},"publisherId":{"type":"string"},"slug":{"type":"string"}},"required":["packageId","publisherId","namespace","slug"],"type":"object"},"PackageLifecyclePolicy":{"additionalProperties":false,"properties":{"checkpoint":{"$ref":"#/$defs/PersistencePolicy","default":"none"},"checkpointSchema":{"type":["string","null"]},"lifecycleExpose":{"type":["string","null"]}},"type":"object"},"PackagePermissionAction":{"additionalProperties":false,"properties":{"autonomyCeiling":{"$ref":"#/$defs/AutonomyLevel"},"consent":{"$ref":"#/$defs/ConsentPolicy"},"delegatedActors":{"items":{"$ref":"#/$defs/ActorKind"},"type":"array"},"directActors":{"items":{"$ref":"#/$defs/ActorKind"},"type":"array"},"id":{"type":"string"},"resource":{"type":"string"},"risk":{"$ref":"#/$defs/PermissionRisk"},"scopes":{"items":{"$ref":"#/$defs/ContributionScope"},"type":"array"}},"required":["id","resource","scopes","directActors","delegatedActors","autonomyCeiling","consent","risk"],"type":"object"},"PackagePermissionLevel":{"additionalProperties":false,"properties":{"actions":{"items":{"type":"string"},"type":"array"},"assignableTo":{"items":{"$ref":"#/$defs/ActorKind"},"type":"array"},"id":{"type":"string"},"includes":{"items":{"type":"string"},"type":"array"}},"required":["id","assignableTo"],"type":"object"},"PackagePresentation":{"additionalProperties":false,"description":"Package presentation metadata and content-addressed visual assets.","properties":{"assets":{"items":{"$ref":"#/$defs/PresentationAsset"},"type":"array"},"categories":{"description":"Ordered Marketplace discovery categories. Existing private/manual\\npackages may omit categories; published listings validate their own\\ndiscovery requirements before accepting a release.","items":{"$ref":"#/$defs/MiniAppCategory"},"maxItems":3,"type":"array","uniqueItems":true},"description":{"type":"string"},"iconAssets":{"default":[],"description":"Ordered parent-package icon candidates. Empty inherits every app-icon\\nfor backwards compatibility; collection packages should select their\\nparent artwork explicitly so child surfaces cannot replace it.","items":{"type":"string"},"type":"array"},"name":{"type":"string"}},"required":["name","description"],"type":"object"},"PermissionCatalogOptions":{"additionalProperties":false,"description":"A signed package-local permission catalog. These are definitions, never grants.","properties":{"actions":{"items":{"$ref":"#/$defs/PackagePermissionAction"},"type":"array"},"levels":{"items":{"$ref":"#/$defs/PackagePermissionLevel"},"type":"array"},"roleRecommendations":{"items":{"$ref":"#/$defs/RoleRecommendation"},"type":"array"}},"type":"object"},"PermissionRisk":{"enum":["read","write","consequential","financial"],"type":"string"},"PersistencePolicy":{"enum":["none","checkpoint","retained"],"type":"string"},"PresentationAsset":{"additionalProperties":false,"description":"A PNG or SVG package, publisher, or organization presentation asset.","properties":{"integrity":{"type":"string"},"mediaType":{"$ref":"#/$defs/PresentationAssetMediaType"},"path":{"type":"string"},"role":{"$ref":"#/$defs/PresentationAssetRole"},"sizes":{"items":{"type":"string"},"type":"array"},"theme":{"$ref":"#/$defs/PresentationAssetTheme","default":"any"}},"required":["role","mediaType","path","integrity"],"type":"object"},"PresentationAssetMediaType":{"enum":["image/png","image/svg+xml"],"type":"string"},"PresentationAssetRole":{"enum":["app-icon","publisher-icon","organization-icon","marketplace-card","wordmark"],"type":"string"},"PresentationAssetTheme":{"enum":["any","light","dark"],"type":"string"},"PublishedEvent":{"additionalProperties":false,"properties":{"delivery":{"$ref":"#/$defs/EventDelivery"},"name":{"type":"string"},"schema":{"type":"string"},"schemaVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"visibility":{"$ref":"#/$defs/ContributionScope"}},"required":["name","schema","schemaVersion","visibility","delivery"],"type":"object"},"ReleaseIdentity":{"additionalProperties":false,"description":"Immutable release identity carried by a package descriptor.","properties":{"contentDigest":{"type":"string"},"releaseId":{"type":"string"},"version":{"type":"string"}},"required":["releaseId","version","contentDigest"],"type":"object"},"RendererOptions":{"additionalProperties":false,"properties":{"payloadSchema":{"type":["string","null"]},"protocol":{"type":"string"}},"required":["protocol"],"type":"object"},"RoleRecommendation":{"additionalProperties":false,"properties":{"actor":{"$ref":"#/$defs/ActorKind"},"level":{"type":"string"},"workspaceRole":{"type":"string"}},"required":["actor","workspaceRole","level"],"type":"object"},"RuntimeEffect":{"additionalProperties":false,"properties":{"kind":{"type":"string"},"resources":{"items":{"type":"string"},"type":"array"}},"required":["kind"],"type":"object"},"SubscribedEvent":{"additionalProperties":false,"properties":{"dependency":{"type":["string","null"]},"event":{"type":"string"},"versions":{"items":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"type":"array"}},"required":["event","versions"],"type":"object"},"TapPackageDescriptorV1":{"additionalProperties":false,"description":"Versioned package descriptor inspected before a remote entry is evaluated.","properties":{"$schema":{"description":"Optional JSON Schema reference for editor validation and completion.","type":["string","null"]},"compatibility":{"$ref":"#/$defs/PackageCompatibility","description":"Host and SDK compatibility requirements."},"contributions":{"description":"Statically declared contributions. Code cannot add undeclared contributions at runtime.","items":{"$ref":"#/$defs/PackageContribution"},"type":"array"},"dependencies":{"description":"Package dependencies and optional collection children.","items":{"$ref":"#/$defs/PackageDependency"},"type":"array"},"descriptorVersion":{"description":"Descriptor schema version. Version 1 is the first Federation package contract.","format":"uint16","maximum":1,"minimum":1,"type":"integer"},"events":{"$ref":"#/$defs/PackageEventCatalog","default":{},"description":"Statically declared package event catalog."},"lifecycle":{"$ref":"#/$defs/PackageLifecyclePolicy","default":{"checkpoint":"none"},"description":"Package lifecycle and checkpoint policy."},"package":{"$ref":"#/$defs/PackageIdentity","description":"Immutable package, publisher, namespace, and collection identity."},"presentation":{"$ref":"#/$defs/PackagePresentation","description":"Marketplace and host presentation metadata."},"release":{"$ref":"#/$defs/ReleaseIdentity","description":"Immutable release identity and content digest."},"targets":{"additionalProperties":false,"description":"Target-specific Module Federation containers.","properties":{"desktop":{"$ref":"#/$defs/FederationTarget"},"mobile":{"$ref":"#/$defs/FederationTarget"},"node":{"$ref":"#/$defs/FederationTarget"},"quickjs":{"$ref":"#/$defs/FederationTarget"},"worker":{"$ref":"#/$defs/FederationTarget"},"workflow-host":{"$ref":"#/$defs/FederationTarget"}},"type":"object"}},"required":["descriptorVersion","package","release","presentation","compatibility","targets","contributions"],"type":"object"},"TapRuntime":{"description":"Supported TAP miniapp runtime versions.","enum":[0,1],"type":"integer"},"TaskOptions":{"additionalProperties":false,"properties":{"canonicalStatuses":{"additionalProperties":{"type":"string"},"type":"object"},"migrationExpose":{"type":["string","null"]},"schema":{"type":"string"}},"required":["schema"],"type":"object"},"UiPlacement":{"enum":["workspace-left","channel-apps","chat-right","route","settings","dialog","standalone-window"],"type":"string"},"UiSurfaceOptions":{"additionalProperties":false,"properties":{"description":{"type":["string","null"]},"displayName":{"description":"Surface-specific label. Packages with multiple mini apps must not rely\\non the package-wide Marketplace name for every navigation entry.","type":["string","null"]},"iconAssets":{"default":[],"description":"Ordered package presentation assets eligible for this contribution.\\nEmpty inherits the package-level `presentation.iconAssets` selection.","items":{"type":"string"},"type":"array"},"instancePolicy":{"$ref":"#/$defs/InstancePolicy","default":"per-mount"},"persistence":{"$ref":"#/$defs/PersistencePolicy","default":"none"},"placement":{"$ref":"#/$defs/UiPlacement"},"scope":{"$ref":"#/$defs/ContributionScope"}},"required":["placement","scope"],"type":"object"},"WorkflowCancellationPolicy":{"description":"Cancellation behavior supported by package-provided workflows.","enum":["host-managed"],"type":"string"},"WorkflowCheckpointPolicy":{"description":"Checkpoint behavior supported by the package-contribution ABI.","enum":["none"],"type":"string"},"WorkflowExecutionSemantics":{"additionalProperties":false,"description":"Fixed v1 execution semantics for one immutable package workflow.","properties":{"cancellation":{"$ref":"#/$defs/WorkflowCancellationPolicy"},"checkpoint":{"$ref":"#/$defs/WorkflowCheckpointPolicy"},"retry":{"$ref":"#/$defs/WorkflowRetryPolicy"},"rollback":{"$ref":"#/$defs/WorkflowRollbackPolicy"},"upgrade":{"$ref":"#/$defs/WorkflowUpgradePolicy"}},"required":["retry","cancellation","checkpoint","upgrade","rollback"],"type":"object"},"WorkflowHostPort":{"description":"Narrow host port a package-provided workflow node may request.","enum":["fs","proc","http","clock","crypto","store","source"],"type":"string"},"WorkflowNodeCancellationPolicy":{"description":"Cancellation behavior supported by one package-provided node attempt.","enum":["not-supported"],"type":"string"},"WorkflowNodeEffect":{"description":"Side-effect classification for a package-provided workflow node.","enum":["pure","read","write","exec"],"type":"string"},"WorkflowNodeExecutionSemantics":{"additionalProperties":false,"description":"Fixed v1 execution semantics for one package-provided workflow node.","properties":{"cancellation":{"$ref":"#/$defs/WorkflowNodeCancellationPolicy"},"checkpoint":{"$ref":"#/$defs/WorkflowCheckpointPolicy"},"idempotency":{"$ref":"#/$defs/WorkflowNodeIdempotency"},"maxAttempts":{"format":"uint8","maximum":1,"minimum":1,"type":"integer"},"rollback":{"$ref":"#/$defs/WorkflowRollbackPolicy"},"upgrade":{"$ref":"#/$defs/WorkflowUpgradePolicy"}},"required":["maxAttempts","idempotency","cancellation","checkpoint","upgrade","rollback"],"type":"object"},"WorkflowNodeIdempotency":{"description":"Idempotency claim for the one attempt allowed by the v1 node ABI.","enum":["idempotent","non-idempotent"],"type":"string"},"WorkflowNodeOptions":{"additionalProperties":false,"description":"Exact descriptor options for a canonical `ze-workflows` contributed node.","properties":{"config":{"$ref":"#/$defs/WorkflowSchemaReference"},"effect":{"$ref":"#/$defs/WorkflowNodeEffect"},"execution":{"$ref":"#/$defs/WorkflowNodeExecutionSemantics"},"exportName":{"type":"string"},"inputs":{"items":{"$ref":"#/$defs/WorkflowPort"},"type":"array"},"nodeKind":{"type":"string"},"outcomes":{"items":{"type":"string"},"type":"array"},"outputs":{"items":{"$ref":"#/$defs/WorkflowPort"},"type":"array"},"requires":{"items":{"$ref":"#/$defs/WorkflowHostPort"},"type":"array"}},"required":["nodeKind","exportName","config","inputs","outputs","outcomes","effect","requires","execution"],"type":"object"},"WorkflowOptions":{"additionalProperties":false,"description":"Exact descriptor options for a canonical `ze-workflows` workflow.\\n\\nThe module expose and runtime remain in [`ContributionBase::targets`]; the\\npackage host combines that verified target with these inert declarations to\\nbuild the release-scoped `ze-workflows` catalog.","properties":{"exportName":{"type":"string"},"inputs":{"items":{"$ref":"#/$defs/WorkflowPort"},"type":"array"},"lifecycle":{"$ref":"#/$defs/WorkflowExecutionSemantics"},"manifest":{"$ref":"#/$defs/WorkflowSchemaReference"},"outputs":{"items":{"$ref":"#/$defs/WorkflowPort"},"type":"array"},"workflowId":{"type":"string"}},"required":["workflowId","exportName","manifest","inputs","outputs","lifecycle"],"type":"object"},"WorkflowPort":{"additionalProperties":false,"description":"One named, schema-bound workflow input or output port.","properties":{"name":{"type":"string"},"required":{"type":"boolean"},"schema":{"$ref":"#/$defs/WorkflowSchemaReference"}},"required":["name","schema","required"],"type":"object"},"WorkflowRetryPolicy":{"description":"Retry behavior supported by package-provided workflow definitions.","enum":["none"],"type":"string"},"WorkflowRollbackPolicy":{"description":"Rollback ownership for package-provided workflows and nodes.","enum":["host-managed"],"type":"string"},"WorkflowSchemaReference":{"additionalProperties":false,"description":"Exact schema identity admitted by the canonical `ze-workflows` package ABI.\\n\\n`id` is the release-relative schema asset path and `integrity` is the SRI of\\nthe canonical JSON document. The target\'s [`PackageAssetLockV1`] separately\\nbinds the raw file bytes; the package host verifies both identities before\\nit evaluates the workflow-host export.","properties":{"id":{"type":"string"},"integrity":{"type":"string"}},"required":["id","integrity"],"type":"object"},"WorkflowUpgradePolicy":{"description":"Upgrade behavior supported by immutable package workflow definitions.","enum":["restart"],"type":"string"}},"$id":"https://tap.local/schemas/manifest.tap.schema.json","$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"$ref":"#/$defs/TapPackageDescriptorV1","description":"A static TAP package descriptor, validated before its remote code is evaluated."},{"$ref":"#/$defs/MiniAppBundleManifest","description":"A single miniapp bundle with its runtime entrypoint."},{"$ref":"#/$defs/MiniAppReferencesManifest","description":"A collection manifest that points at built miniapp manifests."}],"description":"Manifest for a Tap miniapp bundle or a collection of built miniapps.","title":"Tap Miniapp Manifest"}');
|
|
11
|
+
var config_schema_namespaceObject = /*#__PURE__*/ JSON.parse('{"$defs":{"ActorKind":{"enum":["human","specialist"],"type":"string"},"AuthorizationBinding":{"additionalProperties":false,"properties":{"allOf":{"items":{"type":"string"},"type":"array"},"effects":{"items":{"$ref":"#/$defs/RuntimeEffect"},"type":"array"}},"type":"object"},"AutonomyLevel":{"enum":["listen","plan","do"],"type":"string"},"BrowserExtensionOptions":{"additionalProperties":false,"properties":{"manifest":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"},"restartRequired":{"default":false,"type":"boolean"}},"required":["manifest"],"type":"object"},"ChatBlockOptions":{"additionalProperties":false,"properties":{"accessibilityLabel":{"type":"string"},"fallbackFormat":{"$ref":"#/$defs/FallbackFormat"},"payloadSchema":{"type":"string"},"protocol":{"$ref":"#/$defs/ChatBlockProtocol"}},"required":["protocol","payloadSchema","fallbackFormat","accessibilityLabel"],"type":"object"},"ChatBlockProtocol":{"enum":["tap-primitives-v1","tap-federated-view-v1","isolated-html-v1","mcp-app-2026-01-26"],"type":"string"},"CommandOptions":{"additionalProperties":false,"properties":{"inputSchema":{"type":["string","null"]},"label":{"type":"string"},"placements":{"items":{"type":"string"},"type":"array"}},"required":["label"],"type":"object"},"CompositionOptions":{"additionalProperties":false,"properties":{"childPackageIds":{"items":{"type":"string"},"type":"array"},"contributionIds":{"items":{"type":"string"},"type":"array"}},"type":"object"},"ConsentPolicy":{"enum":["none","once","channel","reusable","fresh-decision"],"type":"string"},"ContributionScope":{"enum":["user","workspace","channel","conversation","project","resource"],"type":"string"},"ContributionTarget":{"anyOf":[{"$ref":"#/$defs/ModuleContributionTarget"},{"$ref":"#/$defs/HostDeclarativeContributionTarget"}],"description":"A target-specific execution binding selected for a contribution.\\n\\nExecutable package modules select one immutable Federation expose. Host-\\ndeclarative contributions are materialized by TAP and therefore select the\\nhost runtime without inventing a module expose."},"DeclarativeOptions":{"additionalProperties":false,"properties":{"schema":{"type":"string"}},"required":["schema"],"type":"object"},"EventDelivery":{"enum":["ephemeral","durable"],"type":"string"},"ExecutableOptions":{"additionalProperties":false,"properties":{"effects":{"items":{"$ref":"#/$defs/RuntimeEffect"},"type":"array"},"inputSchema":{"type":["string","null"]},"outputSchema":{"type":["string","null"]},"timeoutMs":{"format":"uint64","minimum":0,"type":["integer","null"]}},"type":"object"},"ExecutionRuntime":{"enum":["webview","quickjs","worker","node","workflow-host"],"type":"string"},"FallbackFormat":{"enum":["text","markdown"],"type":"string"},"FederationExpose":{"additionalProperties":false,"description":"One exposed module in the locked Federation graph.","properties":{"integrity":{"type":"string"},"runtime":{"$ref":"#/$defs/ExecutionRuntime"}},"required":["integrity","runtime"],"type":"object"},"FederationLibraryType":{"enum":["module","script","commonjs-module"],"type":"string"},"FederationTarget":{"additionalProperties":false,"description":"One target-specific Module Federation remote container.","properties":{"assetLock":{"description":"Relative path to the build-generated content-addressed asset graph lock.","type":"string"},"assetLockIntegrity":{"description":"SHA-256 integrity of the canonical asset-lock bytes.","type":"string"},"exposes":{"additionalProperties":{"$ref":"#/$defs/FederationExpose"},"type":"object"},"libraryType":{"$ref":"#/$defs/FederationLibraryType"},"manifest":{"type":["string","null"]},"manifestIntegrity":{"type":["string","null"]},"remoteEntry":{"type":"string"},"remoteEntryIntegrity":{"type":"string"},"remoteName":{"type":"string"}},"required":["remoteName","remoteEntry","remoteEntryIntegrity","assetLock","assetLockIntegrity","libraryType","exposes"],"type":"object"},"HostDeclarativeContributionTarget":{"additionalProperties":false,"description":"A contribution whose declarative configuration TAP materializes directly.","properties":{"runtime":{"$ref":"#/$defs/HostDeclarativeRuntime"}},"required":["runtime"],"type":"object"},"HostDeclarativeRuntime":{"description":"The only runtime accepted by an expose-free contribution target binding.","enum":["host-declarative"],"type":"string"},"InstancePolicy":{"enum":["per-mount","per-conversation","per-channel","per-workspace","singleton"],"type":"string"},"KnowledgeOptions":{"additionalProperties":false,"properties":{"materialization":{"type":["string","null"]},"schema":{"type":"string"}},"required":["schema"],"type":"object"},"LifecycleScope":{"enum":["installation","realm","contribution","mount"],"type":"string"},"McpAppOptions":{"additionalProperties":false,"description":"One sandboxed MCP App bound to exact tool and UI resource contributions.","properties":{"protocolVersion":{"type":"string"},"resourceContributionId":{"type":"string"},"serverContributionId":{"type":"string"},"toolContributionId":{"type":"string"}},"required":["serverContributionId","toolContributionId","resourceContributionId","protocolVersion"],"type":"object"},"McpConsumerPolicy":{"additionalProperties":false,"description":"Publisher-declared upper bound on who may consume an MCP server.\\n\\nBoth lists default empty. Installation policy may select or remove entries,\\nbut cannot authorize consumers outside this signed maximum.","properties":{"contributionIds":{"description":"Exact same-package contribution identities eligible to receive access.","items":{"type":"string"},"type":"array"},"externalConsumers":{"description":"External platform consumer classes eligible for narrower host grants.","items":{"$ref":"#/$defs/McpExternalConsumerClass"},"type":"array"}},"type":"object"},"McpExternalConsumerClass":{"description":"Closed external consumer classes a publisher may include in its maximum.","enum":["selected-miniapps","selected-specialists","chat","workflows","platform"],"type":"string"},"McpHttpCredentialRequirement":{"additionalProperties":false,"description":"One host-held credential injected into a declared Streamable HTTP header.\\n\\nDescriptors name requirements and destinations only. Credential values are\\nresolved from host-owned secret storage after installation consent.","properties":{"header":{"type":"string"},"id":{"type":"string"}},"required":["id","header"],"type":"object"},"McpPromptOptions":{"additionalProperties":false,"description":"One MCP prompt promoted from its owning server\'s live catalog.","properties":{"promptName":{"type":"string"},"serverContributionId":{"type":"string"}},"required":["serverContributionId","promptName"],"type":"object"},"McpResourceOptions":{"additionalProperties":false,"description":"One exact MCP resource promoted from its owning server\'s live catalog.","properties":{"mimeType":{"type":["string","null"]},"serverContributionId":{"type":"string"},"uri":{"type":"string"}},"required":["serverContributionId","uri"],"type":"object"},"McpResourceTemplateOptions":{"additionalProperties":false,"description":"One MCP resource template promoted from its owning server\'s live catalog.","properties":{"mimeType":{"type":["string","null"]},"serverContributionId":{"type":"string"},"uriTemplate":{"type":"string"}},"required":["serverContributionId","uriTemplate"],"type":"object"},"McpServerImplementation":{"description":"Mutually exclusive ways TAP can activate a declared MCP server.","oneOf":[{"additionalProperties":false,"description":"Load the server adapter from the contribution\'s verified Federation expose.","properties":{"type":{"const":"package-runtime","type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"description":"Spawn a reviewed local process and communicate over stdio.","properties":{"args":{"items":{"type":"string"},"type":"array"},"command":{"type":"string"},"credentialRequirements":{"items":{"$ref":"#/$defs/McpStdioCredentialRequirement"},"type":"array"},"type":{"const":"stdio","type":"string"}},"required":["type","command"],"type":"object"},{"additionalProperties":false,"description":"Connect to an HTTPS MCP endpoint using Streamable HTTP.","properties":{"credentialRequirements":{"items":{"$ref":"#/$defs/McpHttpCredentialRequirement"},"type":"array"},"type":{"const":"streamable-http","type":"string"},"url":{"type":"string"}},"required":["type","url"],"type":"object"}]},"McpServerOptions":{"additionalProperties":false,"description":"One package-declared MCP server and its maximum consumer audience.","properties":{"consumerPolicy":{"$ref":"#/$defs/McpConsumerPolicy","default":{}},"implementation":{"$ref":"#/$defs/McpServerImplementation"},"protocolVersion":{"type":"string"}},"required":["protocolVersion","implementation"],"type":"object"},"McpStdioCredentialRequirement":{"additionalProperties":false,"description":"One host-held credential injected into a declared stdio environment slot.\\n\\nDescriptors name requirements and destinations only. Credential values are\\nresolved from host-owned secret storage after installation consent.","properties":{"environmentVariable":{"type":"string"},"id":{"type":"string"}},"required":["id","environmentVariable"],"type":"object"},"McpToolOptions":{"additionalProperties":false,"description":"One MCP tool promoted from its owning server\'s live catalog.","properties":{"effects":{"items":{"$ref":"#/$defs/RuntimeEffect"},"type":"array"},"inputSchema":{"type":["string","null"]},"outputSchema":{"type":["string","null"]},"serverContributionId":{"type":"string"},"timeoutMs":{"format":"uint64","minimum":0,"type":["integer","null"]},"toolName":{"type":"string"}},"required":["serverContributionId","toolName"],"type":"object"},"MiniAppBundleManifest":{"additionalProperties":false,"description":"Manifest for a single TAP miniapp bundle.","properties":{"$schema":{"description":"Optional JSON Schema reference for editor support.","type":["string","null"]},"description":{"description":"Short human-readable summary of the miniapp.","minLength":1,"type":"string"},"entry":{"$ref":"#/$defs/MiniAppSource","description":"Entry file, package specifier, or URL for the miniapp config."},"icon":{"description":"Lucide-compatible icon name shown by host UI surfaces.","minLength":1,"type":["string","null"]},"name":{"description":"Display name for the miniapp.","minLength":1,"type":"string"},"runtime":{"$ref":"#/$defs/TapRuntime","description":"TAP miniapp runtime version."},"version":{"description":"Miniapp version.","minLength":1,"type":"string"}},"required":["name","description","version","runtime","entry"],"title":"Tap Miniapp Bundle Manifest","type":"object"},"MiniAppCategory":{"description":"Closed Marketplace discovery taxonomy for descriptor-backed miniapps.","enum":["productivity","developer-tools","creativity","communication","data-and-analytics","business","education","media-and-entertainment","utilities","other"],"type":"string"},"MiniAppSource":{"description":"Absolute URL or local path. Bundle entry paths are resolved relative to the manifest that declares them.","oneOf":[{"additionalProperties":false,"properties":{"Path":{"additionalProperties":false,"properties":{"path":{"minLength":1,"type":"string"}},"required":["path"],"type":"object"}},"required":["Path"],"type":"object"},{"additionalProperties":false,"properties":{"Url":{"additionalProperties":false,"properties":{"hash":{"description":"Expected SHA-256 hex digest for the remote source bytes.","type":["string","null"]},"url":{"format":"uri","type":"string"}},"required":["url"],"type":"object"}},"required":["Url"],"type":"object"},{"description":"Absolute URL or local path. Bundle entry paths are resolved relative to the manifest that declares them.","minLength":1,"type":"string"},{"additionalProperties":false,"properties":{"hash":{"description":"Expected SHA-256 hex digest for the remote source bytes.","type":["string","null"]},"url":{"format":"uri","type":"string"}},"required":["url"],"type":"object"}]},"ModuleContributionTarget":{"additionalProperties":false,"description":"A contribution implemented by one module in the locked Federation graph.","properties":{"expose":{"type":"string"},"runtime":{"$ref":"#/$defs/ExecutionRuntime"}},"required":["expose","runtime"],"type":"object"},"PackageCompatibility":{"additionalProperties":false,"description":"Host and SDK compatibility checked before remote loading.","properties":{"tapHost":{"type":"string"},"tapSdk":{"type":"string"}},"required":["tapSdk","tapHost"],"type":"object"},"PackageContribution":{"description":"Strict contribution union covering the initial TAP extension catalog.","oneOf":[{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"ui.surface","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/UiSurfaceOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"ui.renderer","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/RendererOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"chat.block","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/ChatBlockOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"action.command","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/CommandOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"prompt","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/ExecutableOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"skill","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/ExecutableOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"tool","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/ExecutableOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"specialist","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/ExecutableOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"task.type","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/TaskOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"task.attribute","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/TaskOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"task.view","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/TaskOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"task.action","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/TaskOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"task.template","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/TaskOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"workflow","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/WorkflowOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"workflow.node","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/WorkflowNodeOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"automation.trigger","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/ExecutableOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"mcp.server","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/McpServerOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"mcp.tool","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/McpToolOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"mcp.prompt","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/McpPromptOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"mcp.resource","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/McpResourceOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"mcp.resource-template","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/McpResourceTemplateOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"mcp.app","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/McpAppOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"miniapp","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/CompositionOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"integration.connector","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/CompositionOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"browser.extension","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/BrowserExtensionOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"knowledge.plot-template","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/KnowledgeOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"knowledge.source-provider","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/KnowledgeOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"knowledge.enricher","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/KnowledgeOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"knowledge.retriever","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/KnowledgeOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"provider.adapter","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/ExecutableOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"template","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/DeclarativeOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"},{"additionalProperties":false,"description":"Fields shared by every package contribution.","properties":{"apiVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"authorization":{"$ref":"#/$defs/AuthorizationBinding","default":{}},"id":{"type":"string"},"kind":{"const":"permission.catalog","type":"string"},"lifecycleScope":{"$ref":"#/$defs/LifecycleScope","default":"mount"},"options":{"$ref":"#/$defs/PermissionCatalogOptions"},"publishes":{"items":{"type":"string"},"type":"array"},"subscribes":{"items":{"type":"string"},"type":"array"},"targets":{"additionalProperties":false,"properties":{"desktop":{"$ref":"#/$defs/ContributionTarget"},"mobile":{"$ref":"#/$defs/ContributionTarget"},"node":{"$ref":"#/$defs/ContributionTarget"},"quickjs":{"$ref":"#/$defs/ContributionTarget"},"worker":{"$ref":"#/$defs/ContributionTarget"},"workflow-host":{"$ref":"#/$defs/ContributionTarget"}},"type":"object"}},"required":["kind","id","apiVersion","options"],"type":"object"}]},"PackageDependency":{"additionalProperties":false,"properties":{"alias":{"type":"string"},"optional":{"default":false,"type":"boolean"},"packageId":{"type":"string"},"version":{"type":"string"}},"required":["alias","packageId","version"],"type":"object"},"PackageEventCatalog":{"additionalProperties":false,"description":"Package-defined published and consumed events.","properties":{"publishes":{"items":{"$ref":"#/$defs/PublishedEvent"},"type":"array"},"subscribes":{"items":{"$ref":"#/$defs/SubscribedEvent"},"type":"array"}},"type":"object"},"PackageIdentity":{"additionalProperties":false,"description":"Immutable identity carried by a package descriptor.","properties":{"namespace":{"type":"string"},"organizationId":{"type":["string","null"]},"packageId":{"type":"string"},"parentPackageId":{"type":["string","null"]},"publisherId":{"type":"string"},"slug":{"type":"string"}},"required":["packageId","publisherId","namespace","slug"],"type":"object"},"PackageLifecyclePolicy":{"additionalProperties":false,"properties":{"checkpoint":{"$ref":"#/$defs/PersistencePolicy","default":"none"},"checkpointSchema":{"type":["string","null"]},"lifecycleExpose":{"type":["string","null"]}},"type":"object"},"PackagePermissionAction":{"additionalProperties":false,"properties":{"autonomyCeiling":{"$ref":"#/$defs/AutonomyLevel"},"consent":{"$ref":"#/$defs/ConsentPolicy"},"delegatedActors":{"items":{"$ref":"#/$defs/ActorKind"},"type":"array"},"directActors":{"items":{"$ref":"#/$defs/ActorKind"},"type":"array"},"id":{"type":"string"},"resource":{"type":"string"},"risk":{"$ref":"#/$defs/PermissionRisk"},"scopes":{"items":{"$ref":"#/$defs/ContributionScope"},"type":"array"}},"required":["id","resource","scopes","directActors","delegatedActors","autonomyCeiling","consent","risk"],"type":"object"},"PackagePermissionLevel":{"additionalProperties":false,"properties":{"actions":{"items":{"type":"string"},"type":"array"},"assignableTo":{"items":{"$ref":"#/$defs/ActorKind"},"type":"array"},"id":{"type":"string"},"includes":{"items":{"type":"string"},"type":"array"}},"required":["id","assignableTo"],"type":"object"},"PackagePresentation":{"additionalProperties":false,"description":"Package presentation metadata and content-addressed visual assets.","properties":{"assets":{"items":{"$ref":"#/$defs/PresentationAsset"},"type":"array"},"categories":{"description":"Ordered Marketplace discovery categories. Existing private/manual\\npackages may omit categories; published listings validate their own\\ndiscovery requirements before accepting a release.","items":{"$ref":"#/$defs/MiniAppCategory"},"maxItems":3,"type":"array","uniqueItems":true},"description":{"type":"string"},"iconAssets":{"default":[],"description":"Ordered parent-package icon candidates. Empty inherits every app-icon\\nfor backwards compatibility; collection packages should select their\\nparent artwork explicitly so child surfaces cannot replace it.","items":{"type":"string"},"type":"array"},"name":{"type":"string"}},"required":["name","description"],"type":"object"},"PermissionCatalogOptions":{"additionalProperties":false,"description":"A signed package-local permission catalog. These are definitions, never grants.","properties":{"actions":{"items":{"$ref":"#/$defs/PackagePermissionAction"},"type":"array"},"levels":{"items":{"$ref":"#/$defs/PackagePermissionLevel"},"type":"array"},"roleRecommendations":{"items":{"$ref":"#/$defs/RoleRecommendation"},"type":"array"}},"type":"object"},"PermissionRisk":{"enum":["read","write","consequential","financial"],"type":"string"},"PersistencePolicy":{"enum":["none","checkpoint","retained"],"type":"string"},"PresentationAsset":{"additionalProperties":false,"description":"A PNG or SVG package, publisher, or organization presentation asset.","properties":{"integrity":{"type":"string"},"mediaType":{"$ref":"#/$defs/PresentationAssetMediaType"},"path":{"type":"string"},"role":{"$ref":"#/$defs/PresentationAssetRole"},"sizes":{"items":{"type":"string"},"type":"array"},"theme":{"$ref":"#/$defs/PresentationAssetTheme","default":"any"}},"required":["role","mediaType","path","integrity"],"type":"object"},"PresentationAssetMediaType":{"enum":["image/png","image/svg+xml"],"type":"string"},"PresentationAssetRole":{"enum":["app-icon","publisher-icon","organization-icon","marketplace-card","wordmark"],"type":"string"},"PresentationAssetTheme":{"enum":["any","light","dark"],"type":"string"},"PublishedEvent":{"additionalProperties":false,"properties":{"delivery":{"$ref":"#/$defs/EventDelivery"},"name":{"type":"string"},"schema":{"type":"string"},"schemaVersion":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"visibility":{"$ref":"#/$defs/ContributionScope"}},"required":["name","schema","schemaVersion","visibility","delivery"],"type":"object"},"ReleaseIdentity":{"additionalProperties":false,"description":"Immutable release identity carried by a package descriptor.","properties":{"contentDigest":{"type":"string"},"releaseId":{"type":"string"},"version":{"type":"string"}},"required":["releaseId","version","contentDigest"],"type":"object"},"RendererOptions":{"additionalProperties":false,"properties":{"payloadSchema":{"type":["string","null"]},"protocol":{"type":"string"}},"required":["protocol"],"type":"object"},"RoleRecommendation":{"additionalProperties":false,"properties":{"actor":{"$ref":"#/$defs/ActorKind"},"level":{"type":"string"},"workspaceRole":{"type":"string"}},"required":["actor","workspaceRole","level"],"type":"object"},"RuntimeEffect":{"additionalProperties":false,"properties":{"kind":{"type":"string"},"resources":{"items":{"type":"string"},"type":"array"}},"required":["kind"],"type":"object"},"SubscribedEvent":{"additionalProperties":false,"properties":{"dependency":{"type":["string","null"]},"event":{"type":"string"},"versions":{"items":{"format":"uint16","maximum":65535,"minimum":0,"type":"integer"},"type":"array"}},"required":["event","versions"],"type":"object"},"TapPackageDescriptorV1":{"additionalProperties":false,"description":"Versioned package descriptor inspected before a remote entry is evaluated.","properties":{"$schema":{"description":"Optional JSON Schema reference for editor validation and completion.","type":["string","null"]},"compatibility":{"$ref":"#/$defs/PackageCompatibility","description":"Host and SDK compatibility requirements."},"contributions":{"description":"Statically declared contributions. Code cannot add undeclared contributions at runtime.","items":{"$ref":"#/$defs/PackageContribution"},"type":"array"},"dependencies":{"description":"Package dependencies and optional collection children.","items":{"$ref":"#/$defs/PackageDependency"},"type":"array"},"descriptorVersion":{"description":"Descriptor schema version. Version 1 is the first Federation package contract.","format":"uint16","maximum":1,"minimum":1,"type":"integer"},"events":{"$ref":"#/$defs/PackageEventCatalog","default":{},"description":"Statically declared package event catalog."},"lifecycle":{"$ref":"#/$defs/PackageLifecyclePolicy","default":{"checkpoint":"none"},"description":"Package lifecycle and checkpoint policy."},"package":{"$ref":"#/$defs/PackageIdentity","description":"Immutable package, publisher, namespace, and collection identity."},"presentation":{"$ref":"#/$defs/PackagePresentation","description":"Marketplace and host presentation metadata."},"release":{"$ref":"#/$defs/ReleaseIdentity","description":"Immutable release identity and content digest."},"targets":{"additionalProperties":false,"description":"Target-specific Module Federation containers.","properties":{"desktop":{"$ref":"#/$defs/FederationTarget"},"mobile":{"$ref":"#/$defs/FederationTarget"},"node":{"$ref":"#/$defs/FederationTarget"},"quickjs":{"$ref":"#/$defs/FederationTarget"},"worker":{"$ref":"#/$defs/FederationTarget"},"workflow-host":{"$ref":"#/$defs/FederationTarget"}},"type":"object"}},"required":["descriptorVersion","package","release","presentation","compatibility","targets","contributions"],"type":"object"},"TapRuntime":{"description":"Supported TAP miniapp runtime versions.","enum":[0,1],"type":"integer"},"TaskOptions":{"additionalProperties":false,"properties":{"canonicalStatuses":{"additionalProperties":{"type":"string"},"type":"object"},"migrationExpose":{"type":["string","null"]},"schema":{"type":"string"}},"required":["schema"],"type":"object"},"UiPlacement":{"enum":["workspace-left","channel-apps","chat-right","route","settings","dialog","standalone-window"],"type":"string"},"UiSurfaceOptions":{"additionalProperties":false,"properties":{"description":{"type":["string","null"]},"displayName":{"description":"Surface-specific label. Packages with multiple mini apps must not rely\\non the package-wide Marketplace name for every navigation entry.","type":["string","null"]},"iconAssets":{"default":[],"description":"Ordered package presentation assets eligible for this contribution.\\nEmpty inherits the package-level `presentation.iconAssets` selection.","items":{"type":"string"},"type":"array"},"instancePolicy":{"$ref":"#/$defs/InstancePolicy","default":"per-mount"},"persistence":{"$ref":"#/$defs/PersistencePolicy","default":"none"},"placement":{"$ref":"#/$defs/UiPlacement"},"scope":{"$ref":"#/$defs/ContributionScope"}},"required":["placement","scope"],"type":"object"},"WorkflowCancellationPolicy":{"description":"Cancellation behavior supported by package-provided workflows.","enum":["host-managed"],"type":"string"},"WorkflowCheckpointPolicy":{"description":"Checkpoint behavior supported by the package-contribution ABI.","enum":["none"],"type":"string"},"WorkflowExecutionSemantics":{"additionalProperties":false,"description":"Fixed v1 execution semantics for one immutable package workflow.","properties":{"cancellation":{"$ref":"#/$defs/WorkflowCancellationPolicy"},"checkpoint":{"$ref":"#/$defs/WorkflowCheckpointPolicy"},"retry":{"$ref":"#/$defs/WorkflowRetryPolicy"},"rollback":{"$ref":"#/$defs/WorkflowRollbackPolicy"},"upgrade":{"$ref":"#/$defs/WorkflowUpgradePolicy"}},"required":["retry","cancellation","checkpoint","upgrade","rollback"],"type":"object"},"WorkflowHostPort":{"description":"Narrow host port a package-provided workflow node may request.","enum":["fs","proc","http","clock","crypto","store","source"],"type":"string"},"WorkflowNodeCancellationPolicy":{"description":"Cancellation behavior supported by one package-provided node attempt.","enum":["not-supported"],"type":"string"},"WorkflowNodeEffect":{"description":"Side-effect classification for a package-provided workflow node.","enum":["pure","read","write","exec"],"type":"string"},"WorkflowNodeExecutionSemantics":{"additionalProperties":false,"description":"Fixed v1 execution semantics for one package-provided workflow node.","properties":{"cancellation":{"$ref":"#/$defs/WorkflowNodeCancellationPolicy"},"checkpoint":{"$ref":"#/$defs/WorkflowCheckpointPolicy"},"idempotency":{"$ref":"#/$defs/WorkflowNodeIdempotency"},"maxAttempts":{"format":"uint8","maximum":1,"minimum":1,"type":"integer"},"rollback":{"$ref":"#/$defs/WorkflowRollbackPolicy"},"upgrade":{"$ref":"#/$defs/WorkflowUpgradePolicy"}},"required":["maxAttempts","idempotency","cancellation","checkpoint","upgrade","rollback"],"type":"object"},"WorkflowNodeIdempotency":{"description":"Idempotency claim for the one attempt allowed by the v1 node ABI.","enum":["idempotent","non-idempotent"],"type":"string"},"WorkflowNodeOptions":{"additionalProperties":false,"description":"Exact descriptor options for a canonical `ze-workflows` contributed node.","properties":{"config":{"$ref":"#/$defs/WorkflowSchemaReference"},"effect":{"$ref":"#/$defs/WorkflowNodeEffect"},"execution":{"$ref":"#/$defs/WorkflowNodeExecutionSemantics"},"exportName":{"type":"string"},"inputs":{"items":{"$ref":"#/$defs/WorkflowPort"},"type":"array"},"nodeKind":{"type":"string"},"outcomes":{"items":{"type":"string"},"type":"array"},"outputs":{"items":{"$ref":"#/$defs/WorkflowPort"},"type":"array"},"requires":{"items":{"$ref":"#/$defs/WorkflowHostPort"},"type":"array"}},"required":["nodeKind","exportName","config","inputs","outputs","outcomes","effect","requires","execution"],"type":"object"},"WorkflowOptions":{"additionalProperties":false,"description":"Exact descriptor options for a canonical `ze-workflows` workflow.\\n\\nThe module expose and runtime remain in [`ContributionBase::targets`]; the\\npackage host combines that verified target with these inert declarations to\\nbuild the release-scoped `ze-workflows` catalog.","properties":{"exportName":{"type":"string"},"inputs":{"items":{"$ref":"#/$defs/WorkflowPort"},"type":"array"},"lifecycle":{"$ref":"#/$defs/WorkflowExecutionSemantics"},"manifest":{"$ref":"#/$defs/WorkflowSchemaReference"},"outputs":{"items":{"$ref":"#/$defs/WorkflowPort"},"type":"array"},"workflowId":{"type":"string"}},"required":["workflowId","exportName","manifest","inputs","outputs","lifecycle"],"type":"object"},"WorkflowPort":{"additionalProperties":false,"description":"One named, schema-bound workflow input or output port.","properties":{"name":{"type":"string"},"required":{"type":"boolean"},"schema":{"$ref":"#/$defs/WorkflowSchemaReference"}},"required":["name","schema","required"],"type":"object"},"WorkflowRetryPolicy":{"description":"Retry behavior supported by package-provided workflow definitions.","enum":["none"],"type":"string"},"WorkflowRollbackPolicy":{"description":"Rollback ownership for package-provided workflows and nodes.","enum":["host-managed"],"type":"string"},"WorkflowSchemaReference":{"additionalProperties":false,"description":"Exact schema identity admitted by the canonical `ze-workflows` package ABI.\\n\\n`id` is the release-relative schema asset path and `integrity` is the SRI of\\nthe canonical JSON document. The target\'s [`PackageAssetLockV1`] separately\\nbinds the raw file bytes; the package host verifies both identities before\\nit evaluates the workflow-host export.","properties":{"id":{"type":"string"},"integrity":{"type":"string"}},"required":["id","integrity"],"type":"object"},"WorkflowUpgradePolicy":{"description":"Upgrade behavior supported by immutable package workflow definitions.","enum":["restart"],"type":"string"}},"$id":"https://tap.local/schemas/manifest.tap.schema.json","$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"$ref":"#/$defs/TapPackageDescriptorV1","description":"A static TAP package descriptor, validated before its remote code is evaluated."},{"$ref":"#/$defs/MiniAppBundleManifest","description":"A single miniapp bundle with its runtime entrypoint."}],"description":"Manifest for one Tap package or legacy miniapp bundle.","title":"Tap Miniapp Manifest"}');
|
|
12
12
|
const MAX_SVG_DEPTH = 64;
|
|
13
13
|
const MAX_SVG_ELEMENTS = 10000;
|
|
14
14
|
const MAX_SVG_ATTRIBUTES_PER_ELEMENT = 64;
|
|
@@ -458,13 +458,26 @@ const MAX_HTTP_REQUEST_JSON_BYTES = 11 * 1024 * 1024;
|
|
|
458
458
|
const MAX_HTTP_URL_CHARS = 64 * 1024;
|
|
459
459
|
const MAX_CREDENTIAL_REFERENCE_CHARS = 512;
|
|
460
460
|
const MAX_RECEIPT_JOB_KEY_CHARS = 128;
|
|
461
|
+
const MAX_RECEIPT_PRINTER_NAME_CHARS = 512;
|
|
461
462
|
const MAX_RECEIPT_LINES = 200;
|
|
462
463
|
const MAX_RECEIPT_LINE_CHARS = 512;
|
|
463
464
|
const MAX_RECEIPT_TOTAL_CHARS = 32768;
|
|
465
|
+
const TERMINAL_GET_CAPABILITIES_ACTION = 'tap.platform.terminal.v1.get-capabilities';
|
|
466
|
+
const TERMINAL_OPEN_ACTION = 'tap.platform.terminal.v1.open';
|
|
467
|
+
const TERMINAL_PROFILES = new Set(['workspace-shell', 'neovim']);
|
|
468
|
+
const MAX_TERMINAL_WRITE_BYTES = 64 * 1024;
|
|
469
|
+
const MAX_PENDING_TERMINAL_COMMANDS = 32;
|
|
470
|
+
const TERMINAL_OUTPUT_HIGH_WATER_MARK = 256 * 1024;
|
|
471
|
+
const MAX_TERMINAL_DIMENSION = 10000;
|
|
472
|
+
const TERMINAL_OPEN_TIMEOUT_MS = 15000;
|
|
473
|
+
const TERMINAL_LATE_RESPONSE_GRACE_MS = 15000;
|
|
474
|
+
const MAX_LATE_TERMINAL_OPEN_COMPENSATIONS = MAX_PENDING_HOST_ACTIONS;
|
|
464
475
|
const PRESENCE_EVENT = 'tap-miniapp-presence-event';
|
|
465
476
|
const HOST_ACTION_TIMEOUT_MS = 4000;
|
|
466
477
|
const pendingHostActions = new Map();
|
|
478
|
+
const lateTerminalOpenCompensations = new Map();
|
|
467
479
|
const presenceListeners = new Map();
|
|
480
|
+
const terminalSessions = new Set();
|
|
468
481
|
let hostActionSequence = 0;
|
|
469
482
|
const validCheckpointReference = (reference) =>
|
|
470
483
|
typeof reference === 'string' &&
|
|
@@ -502,7 +515,25 @@ const checkedPlatformJson = (value, maximumBytes, label) => {
|
|
|
502
515
|
}
|
|
503
516
|
return value;
|
|
504
517
|
};
|
|
505
|
-
const
|
|
518
|
+
const retainLateTerminalOpenCompensation = (requestId, compensate) => {
|
|
519
|
+
if (lateTerminalOpenCompensations.size >= MAX_LATE_TERMINAL_OPEN_COMPENSATIONS) {
|
|
520
|
+
const oldest = lateTerminalOpenCompensations.entries().next().value;
|
|
521
|
+
if (oldest) {
|
|
522
|
+
clearTimeout(oldest[1].timeout);
|
|
523
|
+
lateTerminalOpenCompensations.delete(oldest[0]);
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
const timeout = setTimeout(() => {
|
|
527
|
+
lateTerminalOpenCompensations.delete(requestId);
|
|
528
|
+
}, TERMINAL_LATE_RESPONSE_GRACE_MS);
|
|
529
|
+
lateTerminalOpenCompensations.set(requestId, { compensate, timeout });
|
|
530
|
+
};
|
|
531
|
+
const requestHostAction = (
|
|
532
|
+
action,
|
|
533
|
+
payload,
|
|
534
|
+
timeoutMs = HOST_ACTION_TIMEOUT_MS,
|
|
535
|
+
onLateSuccess = undefined,
|
|
536
|
+
) => {
|
|
506
537
|
if (pendingHostActions.size >= MAX_PENDING_HOST_ACTIONS) {
|
|
507
538
|
return Promise.reject(new Error('Too many miniapp host actions are pending.'));
|
|
508
539
|
}
|
|
@@ -510,10 +541,21 @@ const requestHostAction = (action, payload, timeoutMs = HOST_ACTION_TIMEOUT_MS)
|
|
|
510
541
|
(globalThis.crypto?.randomUUID?.() ?? Date.now().toString(36));
|
|
511
542
|
return new Promise((resolve, reject) => {
|
|
512
543
|
const timeout = timeoutMs === null ? null : setTimeout(() => {
|
|
544
|
+
const pending = pendingHostActions.get(requestId);
|
|
545
|
+
if (!pending) return;
|
|
546
|
+
pending.timeout = null;
|
|
513
547
|
pendingHostActions.delete(requestId);
|
|
514
|
-
reject(new Error('The miniapp host action timed out.'));
|
|
548
|
+
pending.reject(new Error('The miniapp host action timed out.'));
|
|
549
|
+
if (typeof pending.onLateSuccess === 'function') {
|
|
550
|
+
retainLateTerminalOpenCompensation(requestId, pending.onLateSuccess);
|
|
551
|
+
}
|
|
515
552
|
}, timeoutMs);
|
|
516
|
-
pendingHostActions.set(requestId, {
|
|
553
|
+
pendingHostActions.set(requestId, {
|
|
554
|
+
resolve,
|
|
555
|
+
reject,
|
|
556
|
+
timeout,
|
|
557
|
+
onLateSuccess,
|
|
558
|
+
});
|
|
517
559
|
postHost({
|
|
518
560
|
type: HOST_ACTION_REQUEST,
|
|
519
561
|
id: requestId,
|
|
@@ -652,10 +694,16 @@ const projectResultFields = (value, fields, label) => {
|
|
|
652
694
|
}
|
|
653
695
|
return Object.freeze(projected);
|
|
654
696
|
};
|
|
655
|
-
const invokeSdkHostAction = (
|
|
697
|
+
const invokeSdkHostAction = (
|
|
698
|
+
action,
|
|
699
|
+
options,
|
|
700
|
+
label,
|
|
701
|
+
timeoutMs = HOST_ACTION_TIMEOUT_MS,
|
|
702
|
+
onLateSuccess = undefined,
|
|
703
|
+
) =>
|
|
656
704
|
requestHostAction(action, {
|
|
657
705
|
options: requireOptionsObject(options, label),
|
|
658
|
-
}, timeoutMs);
|
|
706
|
+
}, timeoutMs, onLateSuccess);
|
|
659
707
|
const checkedStorageAddress = (options, label) => {
|
|
660
708
|
requireOptionsObject(options, label);
|
|
661
709
|
if (!validPlatformPartition(options.namespace, MAX_STORAGE_NAMESPACE_CHARS)) {
|
|
@@ -782,6 +830,12 @@ const http = Object.freeze({
|
|
|
782
830
|
!validPlatformPartition(options.credentialRef, MAX_CREDENTIAL_REFERENCE_CHARS)) {
|
|
783
831
|
throw new Error('app.http.request credentialRef is invalid.');
|
|
784
832
|
}
|
|
833
|
+
if (options.auth !== undefined && options.auth !== 'github') {
|
|
834
|
+
throw new Error('app.http.request auth is invalid.');
|
|
835
|
+
}
|
|
836
|
+
if (options.credentialRef !== undefined && options.auth !== undefined) {
|
|
837
|
+
throw new Error('app.http.request accepts either credentialRef or auth, not both.');
|
|
838
|
+
}
|
|
785
839
|
return invokeSdkHostAction(
|
|
786
840
|
'tap.platform.http.request',
|
|
787
841
|
{
|
|
@@ -789,6 +843,7 @@ const http = Object.freeze({
|
|
|
789
843
|
...(options.credentialRef === undefined
|
|
790
844
|
? {}
|
|
791
845
|
: { credentialRef: options.credentialRef }),
|
|
846
|
+
...(options.auth === undefined ? {} : { auth: options.auth }),
|
|
792
847
|
},
|
|
793
848
|
'app.http.request',
|
|
794
849
|
null,
|
|
@@ -873,31 +928,78 @@ const checkedReceiptDocument = (document) => {
|
|
|
873
928
|
}
|
|
874
929
|
return document;
|
|
875
930
|
};
|
|
931
|
+
const checkedPrinterSelection = (selection, operation) => {
|
|
932
|
+
requireOptionsObject(selection, operation + ' selection');
|
|
933
|
+
if (Object.keys(selection).some((key) => !new Set(['printerName', 'profile']).has(key)) ||
|
|
934
|
+
!validPlatformPartition(selection.printerName, MAX_RECEIPT_PRINTER_NAME_CHARS) ||
|
|
935
|
+
!new Set(['receipt-58mm', 'receipt-80mm']).has(selection.profile)) {
|
|
936
|
+
throw new Error(operation + ' selection is invalid.');
|
|
937
|
+
}
|
|
938
|
+
return selection;
|
|
939
|
+
};
|
|
876
940
|
const printing = Object.freeze({
|
|
877
|
-
|
|
941
|
+
listPrinters() {
|
|
878
942
|
return invokeSdkHostAction(
|
|
879
|
-
'tap.platform.printing.receipt.
|
|
943
|
+
'tap.platform.printing.receipt.v2.list-printers',
|
|
880
944
|
{},
|
|
945
|
+
'app.printing.listPrinters',
|
|
946
|
+
30000,
|
|
947
|
+
).then((value) => {
|
|
948
|
+
if (!value || typeof value !== 'object' || Array.isArray(value) ||
|
|
949
|
+
!Array.isArray(value.printers) || !Array.isArray(value.paperProfiles)) {
|
|
950
|
+
throw new Error('app.printing.listPrinters returned an invalid result.');
|
|
951
|
+
}
|
|
952
|
+
const printers = value.printers.map((printer) => {
|
|
953
|
+
if (!printer || typeof printer !== 'object' || Array.isArray(printer) ||
|
|
954
|
+
Object.keys(printer).some((key) => !new Set(['name', 'isDefault']).has(key)) ||
|
|
955
|
+
!validPlatformPartition(printer.name, MAX_RECEIPT_PRINTER_NAME_CHARS) ||
|
|
956
|
+
typeof printer.isDefault !== 'boolean') {
|
|
957
|
+
throw new Error('app.printing.listPrinters returned an invalid printer.');
|
|
958
|
+
}
|
|
959
|
+
return projectResultFields(printer, ['name', 'isDefault'], 'app.printing.listPrinters');
|
|
960
|
+
});
|
|
961
|
+
const paperProfiles = value.paperProfiles.map((profile) => {
|
|
962
|
+
const expected = profile?.id === 'receipt-58mm' ? [58, 32]
|
|
963
|
+
: profile?.id === 'receipt-80mm' ? [80, 48] : null;
|
|
964
|
+
if (!profile || typeof profile !== 'object' || Array.isArray(profile) || !expected ||
|
|
965
|
+
Object.keys(profile).some((key) => !new Set(['id', 'widthMm', 'columns']).has(key)) ||
|
|
966
|
+
profile.widthMm !== expected[0] || profile.columns !== expected[1]) {
|
|
967
|
+
throw new Error('app.printing.listPrinters returned an invalid paper profile.');
|
|
968
|
+
}
|
|
969
|
+
return projectResultFields(
|
|
970
|
+
profile,
|
|
971
|
+
['id', 'widthMm', 'columns'],
|
|
972
|
+
'app.printing.listPrinters',
|
|
973
|
+
);
|
|
974
|
+
});
|
|
975
|
+
return { printers, paperProfiles };
|
|
976
|
+
});
|
|
977
|
+
},
|
|
978
|
+
getStatus(selection) {
|
|
979
|
+
checkedPrinterSelection(selection, 'app.printing.getStatus');
|
|
980
|
+
return invokeSdkHostAction(
|
|
981
|
+
'tap.platform.printing.receipt.v2.status',
|
|
982
|
+
selection,
|
|
881
983
|
'app.printing.getStatus',
|
|
882
984
|
30000,
|
|
883
985
|
).then((value) => {
|
|
884
986
|
if (!value || typeof value !== 'object' || Array.isArray(value) ||
|
|
885
|
-
!new Set(['
|
|
886
|
-
!new Set([null, 'receipt-58mm', 'receipt-80mm']).has(value.profile)) {
|
|
987
|
+
!new Set(['ready', 'unavailable']).has(value.availability)) {
|
|
887
988
|
throw new Error('app.printing.getStatus returned an invalid result.');
|
|
888
989
|
}
|
|
889
|
-
return projectResultFields(value, ['availability'
|
|
990
|
+
return projectResultFields(value, ['availability'], 'app.printing.getStatus');
|
|
890
991
|
});
|
|
891
992
|
},
|
|
892
993
|
submit(options) {
|
|
893
994
|
requireOptionsObject(options, 'app.printing.submit');
|
|
894
|
-
if (Object.keys(options).some((key) => !new Set(['jobKey', 'document']).has(key)) ||
|
|
995
|
+
if (Object.keys(options).some((key) => !new Set(['jobKey', 'selection', 'document']).has(key)) ||
|
|
895
996
|
!validPlatformPartition(options.jobKey, MAX_RECEIPT_JOB_KEY_CHARS)) {
|
|
896
997
|
throw new Error('app.printing.submit jobKey is invalid.');
|
|
897
998
|
}
|
|
999
|
+
checkedPrinterSelection(options.selection, 'app.printing.submit');
|
|
898
1000
|
checkedReceiptDocument(options.document);
|
|
899
1001
|
return invokeSdkHostAction(
|
|
900
|
-
'tap.platform.printing.receipt.submit',
|
|
1002
|
+
'tap.platform.printing.receipt.v2.submit',
|
|
901
1003
|
options,
|
|
902
1004
|
'app.printing.submit',
|
|
903
1005
|
// Physical output cannot be cancelled when an SDK timer expires. Keep
|
|
@@ -917,6 +1019,431 @@ const printing = Object.freeze({
|
|
|
917
1019
|
});
|
|
918
1020
|
},
|
|
919
1021
|
});
|
|
1022
|
+
const exactTerminalFields = (value, fields) =>
|
|
1023
|
+
value && typeof value === 'object' && !Array.isArray(value) &&
|
|
1024
|
+
Object.keys(value).every((key) => fields.has(key)) &&
|
|
1025
|
+
[...fields].every((key) => Object.prototype.hasOwnProperty.call(value, key));
|
|
1026
|
+
const checkedTerminalInteger = (value, label, maximum = Number.MAX_SAFE_INTEGER) => {
|
|
1027
|
+
if (!Number.isSafeInteger(value) || value < 1 || value > maximum) {
|
|
1028
|
+
throw new Error(label + ' must be a positive bounded integer.');
|
|
1029
|
+
}
|
|
1030
|
+
return value;
|
|
1031
|
+
};
|
|
1032
|
+
const projectTerminalLimits = (value, includeSessionLimit, label) => {
|
|
1033
|
+
const fields = new Set([
|
|
1034
|
+
'maxWriteBytes', 'maxOutputBytesInFlight', 'maxCols', 'maxRows',
|
|
1035
|
+
...(includeSessionLimit ? ['maxSessionsPerDocument'] : []),
|
|
1036
|
+
]);
|
|
1037
|
+
if (!exactTerminalFields(value, fields)) {
|
|
1038
|
+
throw new Error(label + ' returned invalid limits.');
|
|
1039
|
+
}
|
|
1040
|
+
const limits = {
|
|
1041
|
+
...(includeSessionLimit
|
|
1042
|
+
? { maxSessionsPerDocument: checkedTerminalInteger(
|
|
1043
|
+
value.maxSessionsPerDocument,
|
|
1044
|
+
label + ' maxSessionsPerDocument',
|
|
1045
|
+
) }
|
|
1046
|
+
: {}),
|
|
1047
|
+
maxWriteBytes: Math.min(
|
|
1048
|
+
checkedTerminalInteger(value.maxWriteBytes, label + ' maxWriteBytes'),
|
|
1049
|
+
MAX_TERMINAL_WRITE_BYTES,
|
|
1050
|
+
),
|
|
1051
|
+
maxOutputBytesInFlight: Math.min(
|
|
1052
|
+
checkedTerminalInteger(
|
|
1053
|
+
value.maxOutputBytesInFlight,
|
|
1054
|
+
label + ' maxOutputBytesInFlight',
|
|
1055
|
+
),
|
|
1056
|
+
TERMINAL_OUTPUT_HIGH_WATER_MARK,
|
|
1057
|
+
),
|
|
1058
|
+
maxCols: checkedTerminalInteger(
|
|
1059
|
+
value.maxCols,
|
|
1060
|
+
label + ' maxCols',
|
|
1061
|
+
MAX_TERMINAL_DIMENSION,
|
|
1062
|
+
),
|
|
1063
|
+
maxRows: checkedTerminalInteger(
|
|
1064
|
+
value.maxRows,
|
|
1065
|
+
label + ' maxRows',
|
|
1066
|
+
MAX_TERMINAL_DIMENSION,
|
|
1067
|
+
),
|
|
1068
|
+
};
|
|
1069
|
+
return Object.freeze(limits);
|
|
1070
|
+
};
|
|
1071
|
+
const projectTerminalCapabilities = (value) => {
|
|
1072
|
+
if (!exactTerminalFields(value, new Set(['profiles', 'limits'])) ||
|
|
1073
|
+
!Array.isArray(value.profiles) || value.profiles.length !== TERMINAL_PROFILES.size) {
|
|
1074
|
+
throw new Error('app.terminal.v1.getCapabilities returned an invalid result.');
|
|
1075
|
+
}
|
|
1076
|
+
const seenProfiles = new Set();
|
|
1077
|
+
const profiles = value.profiles.map((profile) => {
|
|
1078
|
+
if (!exactTerminalFields(
|
|
1079
|
+
profile,
|
|
1080
|
+
new Set(['id', 'available', 'unavailableReason']),
|
|
1081
|
+
) ||
|
|
1082
|
+
!TERMINAL_PROFILES.has(profile.id) || seenProfiles.has(profile.id) ||
|
|
1083
|
+
typeof profile.available !== 'boolean' ||
|
|
1084
|
+
(profile.unavailableReason !== null &&
|
|
1085
|
+
(typeof profile.unavailableReason !== 'string' ||
|
|
1086
|
+
profile.unavailableReason.length > 1024))) {
|
|
1087
|
+
throw new Error('app.terminal.v1.getCapabilities returned an invalid profile.');
|
|
1088
|
+
}
|
|
1089
|
+
seenProfiles.add(profile.id);
|
|
1090
|
+
return Object.freeze({
|
|
1091
|
+
id: profile.id,
|
|
1092
|
+
available: profile.available,
|
|
1093
|
+
unavailableReason: profile.unavailableReason,
|
|
1094
|
+
});
|
|
1095
|
+
});
|
|
1096
|
+
return Object.freeze({
|
|
1097
|
+
profiles: Object.freeze(profiles),
|
|
1098
|
+
limits: projectTerminalLimits(
|
|
1099
|
+
value.limits,
|
|
1100
|
+
true,
|
|
1101
|
+
'app.terminal.v1.getCapabilities',
|
|
1102
|
+
),
|
|
1103
|
+
});
|
|
1104
|
+
};
|
|
1105
|
+
const checkedTerminalSize = (options, limits, label) => {
|
|
1106
|
+
requireOptionsObject(options, label);
|
|
1107
|
+
if (Object.keys(options).some((key) => !new Set(['cols', 'rows']).has(key))) {
|
|
1108
|
+
throw new Error(label + ' contains an unsupported option.');
|
|
1109
|
+
}
|
|
1110
|
+
checkedTerminalInteger(options.cols, label + ' cols', limits.maxCols);
|
|
1111
|
+
checkedTerminalInteger(options.rows, label + ' rows', limits.maxRows);
|
|
1112
|
+
return options;
|
|
1113
|
+
};
|
|
1114
|
+
const createTerminalSession = (value, requestedProfile) => {
|
|
1115
|
+
const resultFields = new Set(['id', 'profile', 'limits', 'port']);
|
|
1116
|
+
if (!exactTerminalFields(value, resultFields) ||
|
|
1117
|
+
!validPlatformPartition(value.id, 512) ||
|
|
1118
|
+
value.profile !== requestedProfile ||
|
|
1119
|
+
typeof MessagePort !== 'function' || !(value.port instanceof MessagePort)) {
|
|
1120
|
+
try { value?.port?.close?.(); } catch { /* invalid transferred port */ }
|
|
1121
|
+
throw new Error('app.terminal.v1.open returned an invalid session.');
|
|
1122
|
+
}
|
|
1123
|
+
const limits = projectTerminalLimits(value.limits, false, 'app.terminal.v1.open');
|
|
1124
|
+
const port = value.port;
|
|
1125
|
+
const pending = new Map();
|
|
1126
|
+
let state = 'open';
|
|
1127
|
+
let commandSequence = 0;
|
|
1128
|
+
let requestSequence = 0;
|
|
1129
|
+
let expectedEventSequence = 1;
|
|
1130
|
+
let outputCreditAvailable = 0;
|
|
1131
|
+
let streamController;
|
|
1132
|
+
let streamCancelled = false;
|
|
1133
|
+
let closePromise;
|
|
1134
|
+
let terminate;
|
|
1135
|
+
|
|
1136
|
+
const nextCommandIdentity = () => {
|
|
1137
|
+
if (commandSequence >= Number.MAX_SAFE_INTEGER || requestSequence >= Number.MAX_SAFE_INTEGER) {
|
|
1138
|
+
throw new Error('The terminal command sequence was exhausted.');
|
|
1139
|
+
}
|
|
1140
|
+
commandSequence += 1;
|
|
1141
|
+
requestSequence += 1;
|
|
1142
|
+
return {
|
|
1143
|
+
requestId: 'tap-terminal-command-' + requestSequence + '-' +
|
|
1144
|
+
(globalThis.crypto?.randomUUID?.() ?? Date.now().toString(36)),
|
|
1145
|
+
sequence: commandSequence,
|
|
1146
|
+
};
|
|
1147
|
+
};
|
|
1148
|
+
const detachPort = () => {
|
|
1149
|
+
port.onmessage = null;
|
|
1150
|
+
port.onmessageerror = null;
|
|
1151
|
+
try { port.close(); } catch { /* already closed */ }
|
|
1152
|
+
};
|
|
1153
|
+
const settlePending = (error, resolveClose) => {
|
|
1154
|
+
for (const entry of pending.values()) {
|
|
1155
|
+
if (resolveClose && entry.kind === 'close') entry.resolve();
|
|
1156
|
+
else entry.reject(error);
|
|
1157
|
+
}
|
|
1158
|
+
pending.clear();
|
|
1159
|
+
};
|
|
1160
|
+
const bestEffortClose = () => {
|
|
1161
|
+
if (state !== 'open') return;
|
|
1162
|
+
try {
|
|
1163
|
+
const identity = nextCommandIdentity();
|
|
1164
|
+
port.postMessage({ type: 'close', ...identity });
|
|
1165
|
+
} catch { /* host lifecycle cleanup remains authoritative */ }
|
|
1166
|
+
};
|
|
1167
|
+
const finishWithoutExit = (error, notifyHost = true) => {
|
|
1168
|
+
if (state === 'ended') return;
|
|
1169
|
+
if (notifyHost) bestEffortClose();
|
|
1170
|
+
state = 'ended';
|
|
1171
|
+
terminalSessions.delete(terminate);
|
|
1172
|
+
settlePending(error, false);
|
|
1173
|
+
if (!streamCancelled && streamController) {
|
|
1174
|
+
try { streamController.error(error); } catch { /* stream already settled */ }
|
|
1175
|
+
}
|
|
1176
|
+
detachPort();
|
|
1177
|
+
};
|
|
1178
|
+
const protocolFailure = (message) => {
|
|
1179
|
+
finishWithoutExit(new Error(message));
|
|
1180
|
+
};
|
|
1181
|
+
const grantOutputCredit = () => {
|
|
1182
|
+
if (state === 'ended' || streamCancelled || !streamController) return;
|
|
1183
|
+
const desiredSize = streamController.desiredSize;
|
|
1184
|
+
if (typeof desiredSize !== 'number' || desiredSize <= 0) return;
|
|
1185
|
+
const queuedBytes = Math.max(
|
|
1186
|
+
0,
|
|
1187
|
+
TERMINAL_OUTPUT_HIGH_WATER_MARK - desiredSize,
|
|
1188
|
+
);
|
|
1189
|
+
const grant = Math.floor(Math.min(
|
|
1190
|
+
limits.maxOutputBytesInFlight - queuedBytes - outputCreditAvailable,
|
|
1191
|
+
desiredSize - outputCreditAvailable,
|
|
1192
|
+
));
|
|
1193
|
+
if (grant <= 0) return;
|
|
1194
|
+
outputCreditAvailable += grant;
|
|
1195
|
+
try {
|
|
1196
|
+
port.postMessage({ type: 'credit', bytes: grant });
|
|
1197
|
+
} catch {
|
|
1198
|
+
protocolFailure('The terminal output credit could not be delivered.');
|
|
1199
|
+
}
|
|
1200
|
+
};
|
|
1201
|
+
const finishWithExit = (event) => {
|
|
1202
|
+
if (state === 'ended') return;
|
|
1203
|
+
state = 'ended';
|
|
1204
|
+
terminalSessions.delete(terminate);
|
|
1205
|
+
settlePending(new Error('The terminal session exited.'), true);
|
|
1206
|
+
if (!streamCancelled && streamController) {
|
|
1207
|
+
try {
|
|
1208
|
+
streamController.enqueue(Object.freeze(event));
|
|
1209
|
+
streamController.close();
|
|
1210
|
+
} catch { /* stream consumer already detached */ }
|
|
1211
|
+
}
|
|
1212
|
+
detachPort();
|
|
1213
|
+
};
|
|
1214
|
+
const onPortMessage = (event) => {
|
|
1215
|
+
if (state === 'ended') return;
|
|
1216
|
+
const message = event.data;
|
|
1217
|
+
if (!message || typeof message !== 'object' || Array.isArray(message)) {
|
|
1218
|
+
protocolFailure('The terminal host sent an invalid protocol message.');
|
|
1219
|
+
return;
|
|
1220
|
+
}
|
|
1221
|
+
if (message.type === 'data') {
|
|
1222
|
+
if (!exactTerminalFields(message, new Set(['type', 'sequence', 'data'])) ||
|
|
1223
|
+
message.sequence !== expectedEventSequence ||
|
|
1224
|
+
!(message.data instanceof ArrayBuffer) || message.data.byteLength < 1 ||
|
|
1225
|
+
message.data.byteLength > outputCreditAvailable) {
|
|
1226
|
+
protocolFailure('The terminal host violated ordered output credit.');
|
|
1227
|
+
return;
|
|
1228
|
+
}
|
|
1229
|
+
expectedEventSequence += 1;
|
|
1230
|
+
outputCreditAvailable -= message.data.byteLength;
|
|
1231
|
+
if (!streamCancelled && streamController) {
|
|
1232
|
+
try {
|
|
1233
|
+
streamController.enqueue(Object.freeze({
|
|
1234
|
+
type: 'data',
|
|
1235
|
+
sequence: message.sequence,
|
|
1236
|
+
data: new Uint8Array(message.data),
|
|
1237
|
+
}));
|
|
1238
|
+
} catch {
|
|
1239
|
+
protocolFailure('The terminal output stream could not accept data.');
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
return;
|
|
1243
|
+
}
|
|
1244
|
+
if (message.type === 'exit') {
|
|
1245
|
+
if (!exactTerminalFields(
|
|
1246
|
+
message,
|
|
1247
|
+
new Set(['type', 'sequence', 'code', 'signal', 'reason']),
|
|
1248
|
+
) ||
|
|
1249
|
+
message.sequence !== expectedEventSequence ||
|
|
1250
|
+
(message.code !== null && !Number.isInteger(message.code)) ||
|
|
1251
|
+
(message.signal !== null &&
|
|
1252
|
+
(typeof message.signal !== 'string' || message.signal.length > 128)) ||
|
|
1253
|
+
!new Set(['exited', 'closed', 'revoked', 'error']).has(message.reason)) {
|
|
1254
|
+
protocolFailure('The terminal host sent an invalid exit event.');
|
|
1255
|
+
return;
|
|
1256
|
+
}
|
|
1257
|
+
expectedEventSequence += 1;
|
|
1258
|
+
finishWithExit({
|
|
1259
|
+
type: 'exit',
|
|
1260
|
+
sequence: message.sequence,
|
|
1261
|
+
code: message.code,
|
|
1262
|
+
signal: message.signal,
|
|
1263
|
+
reason: message.reason,
|
|
1264
|
+
});
|
|
1265
|
+
return;
|
|
1266
|
+
}
|
|
1267
|
+
if (message.type === 'ack') {
|
|
1268
|
+
if (!exactTerminalFields(message, new Set(['type', 'requestId'])) ||
|
|
1269
|
+
typeof message.requestId !== 'string') {
|
|
1270
|
+
protocolFailure('The terminal host sent an invalid acknowledgement.');
|
|
1271
|
+
return;
|
|
1272
|
+
}
|
|
1273
|
+
const entry = pending.get(message.requestId);
|
|
1274
|
+
if (!entry) {
|
|
1275
|
+
protocolFailure('The terminal host acknowledged an unknown request.');
|
|
1276
|
+
return;
|
|
1277
|
+
}
|
|
1278
|
+
pending.delete(message.requestId);
|
|
1279
|
+
entry.resolve();
|
|
1280
|
+
return;
|
|
1281
|
+
}
|
|
1282
|
+
if (message.type === 'error') {
|
|
1283
|
+
const fields = message.requestId === undefined
|
|
1284
|
+
? new Set(['type', 'message'])
|
|
1285
|
+
: new Set(['type', 'requestId', 'message']);
|
|
1286
|
+
if (!exactTerminalFields(message, fields) ||
|
|
1287
|
+
typeof message.message !== 'string' || !message.message ||
|
|
1288
|
+
message.message.length > 1024 ||
|
|
1289
|
+
(message.requestId !== undefined && typeof message.requestId !== 'string')) {
|
|
1290
|
+
protocolFailure('The terminal host sent an invalid error.');
|
|
1291
|
+
return;
|
|
1292
|
+
}
|
|
1293
|
+
const error = new Error(message.message);
|
|
1294
|
+
if (message.requestId === undefined) {
|
|
1295
|
+
finishWithoutExit(error);
|
|
1296
|
+
return;
|
|
1297
|
+
}
|
|
1298
|
+
const entry = pending.get(message.requestId);
|
|
1299
|
+
if (!entry) {
|
|
1300
|
+
protocolFailure('The terminal host rejected an unknown request.');
|
|
1301
|
+
return;
|
|
1302
|
+
}
|
|
1303
|
+
pending.delete(message.requestId);
|
|
1304
|
+
entry.reject(error);
|
|
1305
|
+
if (entry.kind === 'close') finishWithoutExit(error, false);
|
|
1306
|
+
return;
|
|
1307
|
+
}
|
|
1308
|
+
protocolFailure('The terminal host sent an unsupported protocol message.');
|
|
1309
|
+
};
|
|
1310
|
+
const sendCommand = (kind, fields = {}, transfer = undefined) => {
|
|
1311
|
+
if (state !== 'open') {
|
|
1312
|
+
return Promise.reject(new Error('The terminal session is not open.'));
|
|
1313
|
+
}
|
|
1314
|
+
const pendingLimit = kind === 'close'
|
|
1315
|
+
? MAX_PENDING_TERMINAL_COMMANDS
|
|
1316
|
+
: MAX_PENDING_TERMINAL_COMMANDS - 1;
|
|
1317
|
+
if (pending.size >= pendingLimit) {
|
|
1318
|
+
return Promise.reject(new Error('Too many terminal commands are pending.'));
|
|
1319
|
+
}
|
|
1320
|
+
let identity;
|
|
1321
|
+
try {
|
|
1322
|
+
identity = nextCommandIdentity();
|
|
1323
|
+
} catch (error) {
|
|
1324
|
+
finishWithoutExit(error instanceof Error ? error : new Error('The terminal command failed.'));
|
|
1325
|
+
return Promise.reject(error);
|
|
1326
|
+
}
|
|
1327
|
+
return new Promise((resolve, reject) => {
|
|
1328
|
+
pending.set(identity.requestId, { kind, resolve, reject });
|
|
1329
|
+
try {
|
|
1330
|
+
const message = { type: kind, ...identity, ...fields };
|
|
1331
|
+
if (transfer) port.postMessage(message, [transfer]);
|
|
1332
|
+
else port.postMessage(message);
|
|
1333
|
+
} catch (error) {
|
|
1334
|
+
pending.delete(identity.requestId);
|
|
1335
|
+
reject(error);
|
|
1336
|
+
finishWithoutExit(
|
|
1337
|
+
error instanceof Error ? error : new Error('The terminal command failed.'),
|
|
1338
|
+
);
|
|
1339
|
+
}
|
|
1340
|
+
});
|
|
1341
|
+
};
|
|
1342
|
+
const close = () => {
|
|
1343
|
+
if (closePromise) return closePromise;
|
|
1344
|
+
if (state === 'ended') return Promise.resolve();
|
|
1345
|
+
closePromise = sendCommand('close');
|
|
1346
|
+
if (state !== 'ended') state = 'closing';
|
|
1347
|
+
return closePromise;
|
|
1348
|
+
};
|
|
1349
|
+
terminate = () => {
|
|
1350
|
+
finishWithoutExit(new Error('The mini app document was removed.'));
|
|
1351
|
+
};
|
|
1352
|
+
const events = new ReadableStream({
|
|
1353
|
+
start(controller) {
|
|
1354
|
+
streamController = controller;
|
|
1355
|
+
},
|
|
1356
|
+
pull() {
|
|
1357
|
+
grantOutputCredit();
|
|
1358
|
+
},
|
|
1359
|
+
cancel() {
|
|
1360
|
+
streamCancelled = true;
|
|
1361
|
+
void close();
|
|
1362
|
+
},
|
|
1363
|
+
}, {
|
|
1364
|
+
highWaterMark: TERMINAL_OUTPUT_HIGH_WATER_MARK,
|
|
1365
|
+
size: (event) => event.type === 'data' ? event.data.byteLength : 0,
|
|
1366
|
+
});
|
|
1367
|
+
port.onmessage = onPortMessage;
|
|
1368
|
+
port.onmessageerror = () => {
|
|
1369
|
+
protocolFailure('The terminal host sent an unreadable protocol message.');
|
|
1370
|
+
};
|
|
1371
|
+
port.start();
|
|
1372
|
+
terminalSessions.add(terminate);
|
|
1373
|
+
grantOutputCredit();
|
|
1374
|
+
if (state === 'ended') {
|
|
1375
|
+
throw new Error('The terminal session data plane could not be opened.');
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
return Object.freeze({
|
|
1379
|
+
id: value.id,
|
|
1380
|
+
profile: value.profile,
|
|
1381
|
+
events,
|
|
1382
|
+
write(data) {
|
|
1383
|
+
if (!(data instanceof Uint8Array) || data.byteLength < 1 ||
|
|
1384
|
+
data.byteLength > limits.maxWriteBytes ||
|
|
1385
|
+
data.byteLength > MAX_TERMINAL_WRITE_BYTES) {
|
|
1386
|
+
return Promise.reject(new Error('Terminal writes must be bounded Uint8Array data.'));
|
|
1387
|
+
}
|
|
1388
|
+
const copy = new Uint8Array(data.byteLength);
|
|
1389
|
+
copy.set(data);
|
|
1390
|
+
return sendCommand('write', { data: copy.buffer }, copy.buffer);
|
|
1391
|
+
},
|
|
1392
|
+
resize(options) {
|
|
1393
|
+
try {
|
|
1394
|
+
checkedTerminalSize(options, limits, 'app.terminal.v1 session.resize');
|
|
1395
|
+
} catch (error) {
|
|
1396
|
+
return Promise.reject(error);
|
|
1397
|
+
}
|
|
1398
|
+
return sendCommand('resize', { cols: options.cols, rows: options.rows });
|
|
1399
|
+
},
|
|
1400
|
+
close,
|
|
1401
|
+
});
|
|
1402
|
+
};
|
|
1403
|
+
const terminalV1 = Object.freeze({
|
|
1404
|
+
getCapabilities() {
|
|
1405
|
+
return invokeSdkHostAction(
|
|
1406
|
+
TERMINAL_GET_CAPABILITIES_ACTION,
|
|
1407
|
+
{},
|
|
1408
|
+
'app.terminal.v1.getCapabilities',
|
|
1409
|
+
).then(projectTerminalCapabilities);
|
|
1410
|
+
},
|
|
1411
|
+
open(options) {
|
|
1412
|
+
requireOptionsObject(options, 'app.terminal.v1.open');
|
|
1413
|
+
if (Object.keys(options).some(
|
|
1414
|
+
(key) => !new Set(['profile', 'cols', 'rows']).has(key),
|
|
1415
|
+
) || !TERMINAL_PROFILES.has(options.profile)) {
|
|
1416
|
+
return Promise.reject(new Error('app.terminal.v1.open options are invalid.'));
|
|
1417
|
+
}
|
|
1418
|
+
try {
|
|
1419
|
+
checkedTerminalSize(
|
|
1420
|
+
{ cols: options.cols, rows: options.rows },
|
|
1421
|
+
{ maxCols: MAX_TERMINAL_DIMENSION, maxRows: MAX_TERMINAL_DIMENSION },
|
|
1422
|
+
'app.terminal.v1.open',
|
|
1423
|
+
);
|
|
1424
|
+
} catch (error) {
|
|
1425
|
+
return Promise.reject(error);
|
|
1426
|
+
}
|
|
1427
|
+
if (disposed) {
|
|
1428
|
+
return Promise.reject(new Error('The mini app document was removed.'));
|
|
1429
|
+
}
|
|
1430
|
+
return invokeSdkHostAction(
|
|
1431
|
+
TERMINAL_OPEN_ACTION,
|
|
1432
|
+
{ profile: options.profile, cols: options.cols, rows: options.rows },
|
|
1433
|
+
'app.terminal.v1.open',
|
|
1434
|
+
TERMINAL_OPEN_TIMEOUT_MS,
|
|
1435
|
+
(value) => {
|
|
1436
|
+
try {
|
|
1437
|
+
const session = createTerminalSession(value, options.profile);
|
|
1438
|
+
void session.close().catch(() => undefined);
|
|
1439
|
+
} catch {
|
|
1440
|
+
// createTerminalSession closes any invalid transferred port.
|
|
1441
|
+
}
|
|
1442
|
+
},
|
|
1443
|
+
).then((value) => createTerminalSession(value, options.profile));
|
|
1444
|
+
},
|
|
1445
|
+
});
|
|
1446
|
+
const terminal = Object.freeze({ v1: terminalV1 });
|
|
920
1447
|
const channels = Object.freeze({
|
|
921
1448
|
create(options) {
|
|
922
1449
|
requireOptionString(options?.name, 'app.channels.create name');
|
|
@@ -930,33 +1457,6 @@ const channels = Object.freeze({
|
|
|
930
1457
|
requireOptionString(options?.content, 'app.channels.sendMessage content');
|
|
931
1458
|
return invokeSdkHostAction('sendChannelMessage', options, 'app.channels.sendMessage');
|
|
932
1459
|
},
|
|
933
|
-
sendSpecialistMessage(options) {
|
|
934
|
-
requireOptionString(
|
|
935
|
-
options?.channelId,
|
|
936
|
-
'app.channels.sendSpecialistMessage channelId',
|
|
937
|
-
);
|
|
938
|
-
requireOptionString(
|
|
939
|
-
options?.specialistId,
|
|
940
|
-
'app.channels.sendSpecialistMessage specialistId',
|
|
941
|
-
);
|
|
942
|
-
requireOptionString(
|
|
943
|
-
options?.projectId,
|
|
944
|
-
'app.channels.sendSpecialistMessage projectId',
|
|
945
|
-
);
|
|
946
|
-
requireOptionString(
|
|
947
|
-
options?.clientMessageId,
|
|
948
|
-
'app.channels.sendSpecialistMessage clientMessageId',
|
|
949
|
-
);
|
|
950
|
-
requireOptionString(
|
|
951
|
-
options?.body,
|
|
952
|
-
'app.channels.sendSpecialistMessage body',
|
|
953
|
-
);
|
|
954
|
-
return invokeSdkHostAction(
|
|
955
|
-
'sendSpecialistChannelMessage',
|
|
956
|
-
options,
|
|
957
|
-
'app.channels.sendSpecialistMessage',
|
|
958
|
-
);
|
|
959
|
-
},
|
|
960
1460
|
getAccess(options) {
|
|
961
1461
|
requireOptionString(options?.channelId, 'app.channels.getAccess channelId');
|
|
962
1462
|
return invokeSdkHostAction('getChannelAccess', options, 'app.channels.getAccess');
|
|
@@ -1195,7 +1695,7 @@ const miniappSdk = Object.freeze({
|
|
|
1195
1695
|
presence,
|
|
1196
1696
|
http,
|
|
1197
1697
|
credentials,
|
|
1198
|
-
...(packageTarget === 'desktop' ? { printing } : {}),
|
|
1698
|
+
...(packageTarget === 'desktop' ? { printing, terminal } : {}),
|
|
1199
1699
|
auth: platformAuth,
|
|
1200
1700
|
vfs: platformVfs,
|
|
1201
1701
|
specialist: platformSpecialist,
|
|
@@ -1345,7 +1845,16 @@ const onHostMessage = async (event) => {
|
|
|
1345
1845
|
if (message.type === HOST_ACTION_RESPONSE) {
|
|
1346
1846
|
const requestId = typeof message.id === 'string' ? message.id : '';
|
|
1347
1847
|
const pending = pendingHostActions.get(requestId);
|
|
1348
|
-
if (!pending)
|
|
1848
|
+
if (!pending) {
|
|
1849
|
+
const late = lateTerminalOpenCompensations.get(requestId);
|
|
1850
|
+
if (!late) return;
|
|
1851
|
+
lateTerminalOpenCompensations.delete(requestId);
|
|
1852
|
+
clearTimeout(late.timeout);
|
|
1853
|
+
if (message.ok === true) {
|
|
1854
|
+
try { late.compensate(message.result); } catch { /* isolated cleanup */ }
|
|
1855
|
+
}
|
|
1856
|
+
return;
|
|
1857
|
+
}
|
|
1349
1858
|
pendingHostActions.delete(requestId);
|
|
1350
1859
|
if (pending.timeout !== null) clearTimeout(pending.timeout);
|
|
1351
1860
|
if (message.ok === true) {
|
|
@@ -1463,11 +1972,17 @@ window.addEventListener('pagehide', () => {
|
|
|
1463
1972
|
eventListeners.clear();
|
|
1464
1973
|
hostAuthorityListeners.clear();
|
|
1465
1974
|
presenceListeners.clear();
|
|
1975
|
+
for (const terminate of [...terminalSessions]) terminate();
|
|
1976
|
+
terminalSessions.clear();
|
|
1466
1977
|
for (const pending of pendingHostActions.values()) {
|
|
1467
1978
|
if (pending.timeout !== null) clearTimeout(pending.timeout);
|
|
1468
1979
|
pending.reject(new Error('The mini app document was removed.'));
|
|
1469
1980
|
}
|
|
1470
1981
|
pendingHostActions.clear();
|
|
1982
|
+
for (const late of lateTerminalOpenCompensations.values()) {
|
|
1983
|
+
clearTimeout(late.timeout);
|
|
1984
|
+
}
|
|
1985
|
+
lateTerminalOpenCompensations.clear();
|
|
1471
1986
|
try { void unmountSurface(); } catch { /* page teardown is best-effort */ }
|
|
1472
1987
|
}, { once: true });
|
|
1473
1988
|
`;
|
|
@@ -1586,13 +2101,13 @@ const parseManifest = async (manifestPath, contents)=>{
|
|
|
1586
2101
|
throw error;
|
|
1587
2102
|
}
|
|
1588
2103
|
const validate = await getSchemaValidator();
|
|
1589
|
-
if (!validate(manifest)) throw new Error(`${manifestPath} does not match the TAP manifest schema.\nUse a descriptorVersion: 1 TAP package descriptor, a legacy miniapp manifest with name/description/version/runtime/entry
|
|
2104
|
+
if (!validate(manifest)) throw new Error(`${manifestPath} does not match the TAP manifest schema.\nUse a descriptorVersion: 1 TAP package descriptor, a legacy miniapp manifest with name/description/version/runtime/entry.\n` + formatManifestErrors(validate.errors ?? []));
|
|
1590
2105
|
return manifest;
|
|
1591
2106
|
};
|
|
1592
2107
|
const readManifest = async (manifestPath)=>parseManifest(manifestPath, await __rspack_external_node_fs_promises_3b710708["default"].readFile(manifestPath));
|
|
1593
2108
|
const readBundleManifest = async (manifestPath)=>{
|
|
1594
2109
|
const manifest = await readManifest(manifestPath);
|
|
1595
|
-
if (!isBundleManifest(manifest)) throw new Error(`${manifestPath} is a
|
|
2110
|
+
if (!isBundleManifest(manifest)) throw new Error(`${manifestPath} is a TAP package descriptor, but this build requires a legacy miniapp manifest with an "entry" field.`);
|
|
1596
2111
|
return manifest;
|
|
1597
2112
|
};
|
|
1598
2113
|
const readPackageManifest = async (manifestPath)=>{
|