@theaiplatform/miniapp-sdk 0.0.0 → 0.0.2

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.
@@ -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":{"additionalProperties":false,"description":"A target-specific expose selected for a contribution.","properties":{"expose":{"type":"string"},"runtime":{"$ref":"#/$defs/ExecutionRuntime"}},"required":["expose","runtime"],"type":"object"},"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","host-declarative"],"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"},"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"},"McpOptions":{"additionalProperties":false,"properties":{"protocolVersion":{"type":"string"},"resourceUri":{"type":["string","null"]},"transport":{"type":["string","null"]}},"required":["protocolVersion"],"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"},"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"}]},"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/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":"workflow.node","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":"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/McpOptions"},"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/McpOptions"},"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/McpOptions"},"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/McpOptions"},"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/McpOptions"},"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/McpOptions"},"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"},"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"}},"$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"},"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"}');
12
12
  const MAX_SVG_DEPTH = 64;
13
13
  const MAX_SVG_ELEMENTS = 10000;
14
14
  const MAX_SVG_ATTRIBUTES_PER_ELEMENT = 64;
@@ -233,6 +233,7 @@ const PACKAGE_LOCK_FILE_NAME = 'tap.package.lock.json';
233
233
  const FEDERATION_MANIFEST_FILE_NAME = 'mf-manifest.json';
234
234
  const FEDERATION_STATS_FILE_NAME = 'mf-stats.json';
235
235
  const FEDERATION_REMOTE_ENTRY_FILE_NAME = 'remoteEntry.mjs';
236
+ const MCP_SERVER_EXPOSE_PREFIX = './mcp/';
236
237
  const TAP_FEDERATED_SURFACE_HTML_PATH = 'tap.surface.html';
237
238
  const TAP_FEDERATED_SURFACE_RUNTIME_PATH = 'tap.surface.mjs';
238
239
  const MAX_PACKAGE_ASSETS = 10000;
@@ -444,8 +445,18 @@ const HOST_ACTION_RESPONSE = 'tap-miniapp-host-action-response';
444
445
  const MAX_PENDING_HOST_ACTIONS = 32;
445
446
  const MAX_CHECKPOINT_REFERENCE_CHARS = 512;
446
447
  const MAX_CHECKPOINT_JSON_BYTES = 32 * 1024;
448
+ const MAX_STORAGE_NAMESPACE_CHARS = 128;
449
+ const MAX_STORAGE_KEY_CHARS = 512;
450
+ const MAX_STORAGE_JSON_BYTES = 5 * 1024 * 1024;
451
+ const MAX_PRESENCE_ROOM_CHARS = 256;
452
+ const MAX_PRESENCE_JSON_BYTES = 16 * 1024;
453
+ const MAX_HTTP_REQUEST_JSON_BYTES = 11 * 1024 * 1024;
454
+ const MAX_HTTP_URL_CHARS = 64 * 1024;
455
+ const MAX_CREDENTIAL_REFERENCE_CHARS = 512;
456
+ const PRESENCE_EVENT = 'tap-miniapp-presence-event';
447
457
  const HOST_ACTION_TIMEOUT_MS = 4000;
448
458
  const pendingHostActions = new Map();
459
+ const presenceListeners = new Map();
449
460
  let hostActionSequence = 0;
450
461
  const validCheckpointReference = (reference) =>
451
462
  typeof reference === 'string' &&
@@ -465,6 +476,24 @@ const checkedCheckpointValue = (value) => {
465
476
  }
466
477
  return value;
467
478
  };
479
+ const validPlatformPartition = (value, maximumLength) =>
480
+ typeof value === 'string' &&
481
+ value.length > 0 &&
482
+ value.trim() === value &&
483
+ Array.from(value).length <= maximumLength &&
484
+ !/[\u0000-\u001f\u007f-\u009f]/u.test(value);
485
+ const checkedPlatformJson = (value, maximumBytes, label) => {
486
+ let encoded;
487
+ try {
488
+ encoded = JSON.stringify(value);
489
+ } catch {
490
+ throw new Error(label + ' must be JSON serializable.');
491
+ }
492
+ if (encoded === undefined || new TextEncoder().encode(encoded).byteLength > maximumBytes) {
493
+ throw new Error(label + ' exceeds the allowed size.');
494
+ }
495
+ return value;
496
+ };
468
497
  const requestHostAction = (action, payload, timeoutMs = HOST_ACTION_TIMEOUT_MS) => {
469
498
  if (pendingHostActions.size >= MAX_PENDING_HOST_ACTIONS) {
470
499
  return Promise.reject(new Error('Too many miniapp host actions are pending.'));
@@ -472,7 +501,7 @@ const requestHostAction = (action, payload, timeoutMs = HOST_ACTION_TIMEOUT_MS)
472
501
  const requestId = 'tap-host-action-' + (++hostActionSequence) + '-' +
473
502
  (globalThis.crypto?.randomUUID?.() ?? Date.now().toString(36));
474
503
  return new Promise((resolve, reject) => {
475
- const timeout = setTimeout(() => {
504
+ const timeout = timeoutMs === null ? null : setTimeout(() => {
476
505
  pendingHostActions.delete(requestId);
477
506
  reject(new Error('The miniapp host action timed out.'));
478
507
  }, timeoutMs);
@@ -619,6 +648,178 @@ const invokeSdkHostAction = (action, options, label, timeoutMs = HOST_ACTION_TIM
619
648
  requestHostAction(action, {
620
649
  options: requireOptionsObject(options, label),
621
650
  }, timeoutMs);
651
+ const checkedStorageAddress = (options, label) => {
652
+ requireOptionsObject(options, label);
653
+ if (!validPlatformPartition(options.namespace, MAX_STORAGE_NAMESPACE_CHARS)) {
654
+ throw new Error(label + ' requires a valid namespace.');
655
+ }
656
+ if (!validPlatformPartition(options.key, MAX_STORAGE_KEY_CHARS)) {
657
+ throw new Error(label + ' requires a valid key.');
658
+ }
659
+ return options;
660
+ };
661
+ const storage = Object.freeze({
662
+ get(options) {
663
+ checkedStorageAddress(options, 'app.storage.get');
664
+ return invokeSdkHostAction('tap.platform.storage.get', options, 'app.storage.get');
665
+ },
666
+ set(options) {
667
+ checkedStorageAddress(options, 'app.storage.set');
668
+ if (options.expectedRevision !== null &&
669
+ (!Number.isInteger(options.expectedRevision) || options.expectedRevision < 1)) {
670
+ throw new Error('app.storage.set expectedRevision must be null or a positive integer.');
671
+ }
672
+ checkedPlatformJson(options.value, MAX_STORAGE_JSON_BYTES, 'app.storage.set value');
673
+ return invokeSdkHostAction('tap.platform.storage.set', options, 'app.storage.set', 12000);
674
+ },
675
+ delete(options) {
676
+ checkedStorageAddress(options, 'app.storage.delete');
677
+ if (!Number.isInteger(options.expectedRevision) || options.expectedRevision < 1) {
678
+ throw new Error('app.storage.delete expectedRevision must be a positive integer.');
679
+ }
680
+ return invokeSdkHostAction('tap.platform.storage.delete', options, 'app.storage.delete');
681
+ },
682
+ });
683
+ const checkedPresenceAddress = (options, label) => {
684
+ requireOptionsObject(options, label);
685
+ if (!validPlatformPartition(options.namespace, MAX_STORAGE_NAMESPACE_CHARS)) {
686
+ throw new Error(label + ' requires a valid namespace.');
687
+ }
688
+ if (!validPlatformPartition(options.room, MAX_PRESENCE_ROOM_CHARS)) {
689
+ throw new Error(label + ' requires a valid room.');
690
+ }
691
+ return options;
692
+ };
693
+ const presenceKey = (options) => options.namespace + '\u0000' + options.room;
694
+ const presence = Object.freeze({
695
+ join(options) {
696
+ checkedPresenceAddress(options, 'app.presence.join');
697
+ checkedPlatformJson(options.state, MAX_PRESENCE_JSON_BYTES, 'app.presence.join state');
698
+ return invokeSdkHostAction('tap.platform.presence.join', options, 'app.presence.join');
699
+ },
700
+ update(options) {
701
+ checkedPresenceAddress(options, 'app.presence.update');
702
+ checkedPlatformJson(options.state, MAX_PRESENCE_JSON_BYTES, 'app.presence.update state');
703
+ return invokeSdkHostAction('tap.platform.presence.update', options, 'app.presence.update');
704
+ },
705
+ leave(options) {
706
+ checkedPresenceAddress(options, 'app.presence.leave');
707
+ return invokeSdkHostAction('tap.platform.presence.leave', options, 'app.presence.leave');
708
+ },
709
+ subscribe(options, listener) {
710
+ checkedPresenceAddress(options, 'app.presence.subscribe');
711
+ if (typeof listener !== 'function') {
712
+ throw new Error('app.presence.subscribe requires a listener.');
713
+ }
714
+ const key = presenceKey(options);
715
+ const listeners = presenceListeners.get(key) ?? new Set();
716
+ listeners.add(listener);
717
+ presenceListeners.set(key, listeners);
718
+ return () => {
719
+ listeners.delete(listener);
720
+ if (listeners.size === 0) presenceListeners.delete(key);
721
+ };
722
+ },
723
+ });
724
+ const checkedHttpRequest = (input) => {
725
+ requireOptionsObject(input, 'app.http.request input');
726
+ requireOptionString(input.method, 'app.http.request method');
727
+ requireOptionString(input.url, 'app.http.request url');
728
+ if (input.url.length > MAX_HTTP_URL_CHARS) {
729
+ throw new Error('app.http.request URL exceeds the allowed size.');
730
+ }
731
+ let url;
732
+ try {
733
+ url = new URL(input.url);
734
+ } catch {
735
+ throw new Error('app.http.request requires a valid URL.');
736
+ }
737
+ if ((url.protocol !== 'http:' && url.protocol !== 'https:') ||
738
+ !url.hostname || url.username || url.password) {
739
+ throw new Error('app.http.request URL is not allowed.');
740
+ }
741
+ checkedPlatformJson(input, MAX_HTTP_REQUEST_JSON_BYTES, 'app.http.request input');
742
+ return input;
743
+ };
744
+ const projectHttpResponse = (value) => {
745
+ const nullableString = (entry) => entry === null || typeof entry === 'string';
746
+ if (!value || typeof value !== 'object' || Array.isArray(value) ||
747
+ typeof value.finalUrl !== 'string' || typeof value.statusText !== 'string' ||
748
+ !Number.isInteger(value.status) || value.status < 100 || value.status > 599 ||
749
+ !Array.isArray(value.headers) || !value.headers.every((header) =>
750
+ header && typeof header === 'object' && !Array.isArray(header) &&
751
+ typeof header.name === 'string' && typeof header.value === 'string') ||
752
+ !nullableString(value.bodyText) || !nullableString(value.bodyBase64) ||
753
+ (value.bodyKind !== 'text' && value.bodyKind !== 'binary') ||
754
+ typeof value.bodyTruncated !== 'boolean' ||
755
+ !Number.isSafeInteger(value.sizeBytes) || value.sizeBytes < 0 ||
756
+ !Number.isSafeInteger(value.elapsedMs) || value.elapsedMs < 0 ||
757
+ !nullableString(value.contentType)) {
758
+ throw new Error('app.http.request returned an invalid response.');
759
+ }
760
+ return projectResultFields(
761
+ value,
762
+ [
763
+ 'finalUrl', 'status', 'statusText', 'headers', 'bodyText', 'bodyBase64',
764
+ 'bodyKind', 'bodyTruncated', 'sizeBytes', 'elapsedMs', 'contentType',
765
+ ],
766
+ 'app.http.request',
767
+ );
768
+ };
769
+ const http = Object.freeze({
770
+ request(input, options = {}) {
771
+ checkedHttpRequest(input);
772
+ requireOptionsObject(options, 'app.http.request options');
773
+ if (options.credentialRef !== undefined &&
774
+ !validPlatformPartition(options.credentialRef, MAX_CREDENTIAL_REFERENCE_CHARS)) {
775
+ throw new Error('app.http.request credentialRef is invalid.');
776
+ }
777
+ return invokeSdkHostAction(
778
+ 'tap.platform.http.request',
779
+ {
780
+ input,
781
+ ...(options.credentialRef === undefined
782
+ ? {}
783
+ : { credentialRef: options.credentialRef }),
784
+ },
785
+ 'app.http.request',
786
+ null,
787
+ ).then(projectHttpResponse);
788
+ },
789
+ });
790
+ const credentials = Object.freeze({
791
+ listHttp() {
792
+ return invokeSdkHostAction(
793
+ 'tap.platform.credentials.list-http',
794
+ {},
795
+ 'app.credentials.listHttp',
796
+ 5000,
797
+ ).then((value) => {
798
+ if (!Array.isArray(value)) {
799
+ throw new Error('app.credentials.listHttp returned an invalid result.');
800
+ }
801
+ const credentialTypes = new Set([
802
+ 'http_bearer', 'http_basic', 'http_header_auth', 'http_api_key',
803
+ ]);
804
+ return value.map((credential) => {
805
+ if (!credential || typeof credential !== 'object' || Array.isArray(credential) ||
806
+ !validPlatformPartition(credential.id, MAX_CREDENTIAL_REFERENCE_CHARS) ||
807
+ !credentialTypes.has(credential.credentialType) ||
808
+ typeof credential.displayName !== 'string' ||
809
+ !credential.metadataFields || typeof credential.metadataFields !== 'object' ||
810
+ Array.isArray(credential.metadataFields) ||
811
+ !Object.values(credential.metadataFields).every((field) => typeof field === 'string')) {
812
+ throw new Error('app.credentials.listHttp returned an invalid credential.');
813
+ }
814
+ return projectResultFields(
815
+ credential,
816
+ ['id', 'credentialType', 'displayName', 'metadataFields'],
817
+ 'app.credentials.listHttp',
818
+ );
819
+ });
820
+ });
821
+ },
822
+ });
622
823
  const channels = Object.freeze({
623
824
  create(options) {
624
825
  requireOptionString(options?.name, 'app.channels.create name');
@@ -893,11 +1094,15 @@ const miniappSdk = Object.freeze({
893
1094
  workflows,
894
1095
  navigation,
895
1096
  chat: miniappChat,
1097
+ storage,
1098
+ presence,
1099
+ http,
1100
+ credentials,
896
1101
  auth: platformAuth,
897
1102
  vfs: platformVfs,
898
1103
  specialist: platformSpecialist,
899
1104
  hasEditorView: true,
900
- hasHostHttpRequest: false,
1105
+ hasHostHttpRequest: true,
901
1106
  });
902
1107
  Object.defineProperty(globalThis, Symbol.for('tap.internal.v1'), {
903
1108
  configurable: false,
@@ -1021,12 +1226,30 @@ const onHostMessage = async (event) => {
1021
1226
  }
1022
1227
  return;
1023
1228
  }
1229
+ if (
1230
+ message.type === PRESENCE_EVENT &&
1231
+ validPlatformPartition(message.namespace, MAX_STORAGE_NAMESPACE_CHARS) &&
1232
+ validPlatformPartition(message.room, MAX_PRESENCE_ROOM_CHARS) &&
1233
+ typeof message.selfParticipantId === 'string' &&
1234
+ Array.isArray(message.participants)
1235
+ ) {
1236
+ const snapshot = Object.freeze({
1237
+ namespace: message.namespace,
1238
+ room: message.room,
1239
+ selfParticipantId: message.selfParticipantId,
1240
+ participants: message.participants,
1241
+ });
1242
+ for (const listener of presenceListeners.get(presenceKey(snapshot)) ?? []) {
1243
+ try { await listener(snapshot); } catch { /* isolate observer failures */ }
1244
+ }
1245
+ return;
1246
+ }
1024
1247
  if (message.type === HOST_ACTION_RESPONSE) {
1025
1248
  const requestId = typeof message.id === 'string' ? message.id : '';
1026
1249
  const pending = pendingHostActions.get(requestId);
1027
1250
  if (!pending) return;
1028
1251
  pendingHostActions.delete(requestId);
1029
- clearTimeout(pending.timeout);
1252
+ if (pending.timeout !== null) clearTimeout(pending.timeout);
1030
1253
  if (message.ok === true) {
1031
1254
  pending.resolve(message.result);
1032
1255
  } else {
@@ -1141,8 +1364,9 @@ window.addEventListener('pagehide', () => {
1141
1364
  window.removeEventListener('message', onHostMessage);
1142
1365
  eventListeners.clear();
1143
1366
  hostAuthorityListeners.clear();
1367
+ presenceListeners.clear();
1144
1368
  for (const pending of pendingHostActions.values()) {
1145
- clearTimeout(pending.timeout);
1369
+ if (pending.timeout !== null) clearTimeout(pending.timeout);
1146
1370
  pending.reject(new Error('The mini app document was removed.'));
1147
1371
  }
1148
1372
  pendingHostActions.clear();
@@ -1166,6 +1390,10 @@ const getSchemaValidator = async ()=>{
1166
1390
  type: 'string',
1167
1391
  validate: isUrl
1168
1392
  });
1393
+ ajv.addFormat('uint8', {
1394
+ type: 'number',
1395
+ validate: (value)=>Number.isInteger(value) && value >= 0 && value <= 255
1396
+ });
1169
1397
  ajv.addFormat('uint16', {
1170
1398
  type: 'number',
1171
1399
  validate: (value)=>Number.isInteger(value) && value >= 0 && value <= 65535
@@ -2077,6 +2305,24 @@ const federationExposeKeys = (options)=>{
2077
2305
  if (!isRecord(options.exposes)) return [];
2078
2306
  return Object.keys(options.exposes).sort();
2079
2307
  };
2308
+ const validateMcpServerFederationBinding = (descriptor, packageTarget)=>{
2309
+ for (const contribution of descriptor.contributions ?? []){
2310
+ if ('mcp.server' !== contribution.kind) continue;
2311
+ const selectedTarget = contribution.targets?.[packageTarget];
2312
+ if (!selectedTarget) continue;
2313
+ const implementationType = contribution.options?.implementation?.type;
2314
+ if ('package-runtime' === implementationType) {
2315
+ const expectedExpose = `${MCP_SERVER_EXPOSE_PREFIX}${contribution.id}`;
2316
+ if (!('expose' in selectedTarget)) throw new Error(`TAP package-runtime mcp.server contribution "${contribution.id}" must select a Federation module with server-specific expose "${expectedExpose}" on target ${packageTarget}.`);
2317
+ if (selectedTarget.expose !== expectedExpose) throw new Error(`TAP package-runtime mcp.server contribution "${contribution.id}" must select server-specific expose "${expectedExpose}" on target ${packageTarget}, received "${selectedTarget.expose}".`);
2318
+ const verifiedExpose = descriptor.targets[packageTarget]?.exposes[expectedExpose];
2319
+ if (!verifiedExpose) throw new Error(`TAP package-runtime mcp.server contribution "${contribution.id}" selects expose "${expectedExpose}" that is absent from the ${packageTarget} target graph.`);
2320
+ if (verifiedExpose.runtime !== selectedTarget.runtime) throw new Error(`TAP package-runtime mcp.server contribution "${contribution.id}" runtime "${selectedTarget.runtime}" does not match expose "${expectedExpose}" runtime "${verifiedExpose.runtime}" on target ${packageTarget}.`);
2321
+ continue;
2322
+ }
2323
+ if (('stdio' === implementationType || 'streamable-http' === implementationType) && 'expose' in selectedTarget) throw new Error(`TAP ${implementationType} mcp.server contribution "${contribution.id}" must select an expose-free host-declarative binding on target ${packageTarget}, received Federation expose "${selectedTarget.expose}".`);
2324
+ }
2325
+ };
2080
2326
  const packageBuildProfile = (packageTarget)=>{
2081
2327
  switch(packageTarget){
2082
2328
  case 'quickjs':
@@ -2212,6 +2458,7 @@ const validateQuickJsCompilation = (compilation, exposeAssetNames)=>{
2212
2458
  const validateFederationDescriptorTarget = (descriptor, packageTarget, federation)=>{
2213
2459
  const target = descriptor.targets[packageTarget];
2214
2460
  if (!target) throw new Error(`TAP package descriptor does not declare the ${packageTarget} target.`);
2461
+ validateMcpServerFederationBinding(descriptor, packageTarget);
2215
2462
  if (target.remoteName !== federation.name) throw new Error(`TAP package target remoteName "${target.remoteName}" does not match Module Federation name "${String(federation.name)}".`);
2216
2463
  const configuredLibraryType = 'object' == typeof federation.library && null !== federation.library ? String(federation.library.type) : 'module';
2217
2464
  if (target.libraryType !== configuredLibraryType) throw new Error(`TAP package target libraryType "${target.libraryType}" does not match Module Federation library type "${configuredLibraryType}".`);