@theaiplatform/miniapp-sdk 0.0.1 → 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.
- package/README.md +45 -1
- package/THIRD_PARTY_NOTICES.md +3 -1
- package/config-schema.json +543 -30
- package/dist/config.d.ts +4 -1
- package/dist/index.d.ts +103 -2
- package/dist/index.js +1 -0
- package/dist/mcp.d.ts +27 -0
- package/dist/mcp.js +4 -0
- package/dist/rspack/css-entry-loader.cjs +1 -1
- package/dist/rspack/html-loader.cjs +1 -1
- package/dist/rspack/index.js +133 -5
- package/dist/sdk.d.ts +84 -1
- package/dist/surface.d.ts +1 -1
- package/dist/ui/styles.css +67 -0
- package/dist/ui/tailwind.css +1 -0
- package/dist/ui/wasm.d.ts +660 -0
- package/dist/ui/wasm.js +2714 -0
- package/dist/ui.d.ts +160 -0
- package/dist/ui.js +200 -7
- package/dist/web.d.ts +84 -1
- package/examples/wasm-ui/Cargo.lock +248 -0
- package/examples/wasm-ui/Cargo.toml +18 -0
- package/examples/wasm-ui/README.md +19 -0
- package/examples/wasm-ui/src/lib.rs +190 -0
- package/package.json +17 -2
- package/ui-components.json +6 -1
package/dist/rspack/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import * as __rspack_external_node_path_806ed179 from "node:path";
|
|
|
8
8
|
import * as __rspack_external_node_url_3991086a from "node:url";
|
|
9
9
|
import * as __rspack_external_saxes from "saxes";
|
|
10
10
|
import * as __rspack_external_node_util_ac04460e from "node:util";
|
|
11
|
-
var config_schema_namespaceObject = /*#__PURE__*/ JSON.parse('{"$defs":{"ActorKind":{"enum":["human","specialist"],"type":"string"},"AuthorizationBinding":{"additionalProperties":false,"properties":{"allOf":{"items":{"type":"string"},"type":"array"},"effects":{"items":{"$ref":"#/$defs/RuntimeEffect"},"type":"array"}},"type":"object"},"AutonomyLevel":{"enum":["listen","plan","do"],"type":"string"},"BrowserExtensionOptions":{"additionalProperties":false,"properties":{"manifest":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"},"restartRequired":{"default":false,"type":"boolean"}},"required":["manifest"],"type":"object"},"ChatBlockOptions":{"additionalProperties":false,"properties":{"accessibilityLabel":{"type":"string"},"fallbackFormat":{"$ref":"#/$defs/FallbackFormat"},"payloadSchema":{"type":"string"},"protocol":{"$ref":"#/$defs/ChatBlockProtocol"}},"required":["protocol","payloadSchema","fallbackFormat","accessibilityLabel"],"type":"object"},"ChatBlockProtocol":{"enum":["tap-primitives-v1","tap-federated-view-v1","isolated-html-v1","mcp-app-2026-01-26"],"type":"string"},"CommandOptions":{"additionalProperties":false,"properties":{"inputSchema":{"type":["string","null"]},"label":{"type":"string"},"placements":{"items":{"type":"string"},"type":"array"}},"required":["label"],"type":"object"},"CompositionOptions":{"additionalProperties":false,"properties":{"childPackageIds":{"items":{"type":"string"},"type":"array"},"contributionIds":{"items":{"type":"string"},"type":"array"}},"type":"object"},"ConsentPolicy":{"enum":["none","once","channel","reusable","fresh-decision"],"type":"string"},"ContributionScope":{"enum":["user","workspace","channel","conversation","project","resource"],"type":"string"},"ContributionTarget":{"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;
|
|
@@ -449,6 +450,9 @@ const MAX_STORAGE_KEY_CHARS = 512;
|
|
|
449
450
|
const MAX_STORAGE_JSON_BYTES = 5 * 1024 * 1024;
|
|
450
451
|
const MAX_PRESENCE_ROOM_CHARS = 256;
|
|
451
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;
|
|
452
456
|
const PRESENCE_EVENT = 'tap-miniapp-presence-event';
|
|
453
457
|
const HOST_ACTION_TIMEOUT_MS = 4000;
|
|
454
458
|
const pendingHostActions = new Map();
|
|
@@ -497,7 +501,7 @@ const requestHostAction = (action, payload, timeoutMs = HOST_ACTION_TIMEOUT_MS)
|
|
|
497
501
|
const requestId = 'tap-host-action-' + (++hostActionSequence) + '-' +
|
|
498
502
|
(globalThis.crypto?.randomUUID?.() ?? Date.now().toString(36));
|
|
499
503
|
return new Promise((resolve, reject) => {
|
|
500
|
-
const timeout = setTimeout(() => {
|
|
504
|
+
const timeout = timeoutMs === null ? null : setTimeout(() => {
|
|
501
505
|
pendingHostActions.delete(requestId);
|
|
502
506
|
reject(new Error('The miniapp host action timed out.'));
|
|
503
507
|
}, timeoutMs);
|
|
@@ -717,6 +721,105 @@ const presence = Object.freeze({
|
|
|
717
721
|
};
|
|
718
722
|
},
|
|
719
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
|
+
});
|
|
720
823
|
const channels = Object.freeze({
|
|
721
824
|
create(options) {
|
|
722
825
|
requireOptionString(options?.name, 'app.channels.create name');
|
|
@@ -993,11 +1096,13 @@ const miniappSdk = Object.freeze({
|
|
|
993
1096
|
chat: miniappChat,
|
|
994
1097
|
storage,
|
|
995
1098
|
presence,
|
|
1099
|
+
http,
|
|
1100
|
+
credentials,
|
|
996
1101
|
auth: platformAuth,
|
|
997
1102
|
vfs: platformVfs,
|
|
998
1103
|
specialist: platformSpecialist,
|
|
999
1104
|
hasEditorView: true,
|
|
1000
|
-
hasHostHttpRequest:
|
|
1105
|
+
hasHostHttpRequest: true,
|
|
1001
1106
|
});
|
|
1002
1107
|
Object.defineProperty(globalThis, Symbol.for('tap.internal.v1'), {
|
|
1003
1108
|
configurable: false,
|
|
@@ -1144,7 +1249,7 @@ const onHostMessage = async (event) => {
|
|
|
1144
1249
|
const pending = pendingHostActions.get(requestId);
|
|
1145
1250
|
if (!pending) return;
|
|
1146
1251
|
pendingHostActions.delete(requestId);
|
|
1147
|
-
clearTimeout(pending.timeout);
|
|
1252
|
+
if (pending.timeout !== null) clearTimeout(pending.timeout);
|
|
1148
1253
|
if (message.ok === true) {
|
|
1149
1254
|
pending.resolve(message.result);
|
|
1150
1255
|
} else {
|
|
@@ -1261,7 +1366,7 @@ window.addEventListener('pagehide', () => {
|
|
|
1261
1366
|
hostAuthorityListeners.clear();
|
|
1262
1367
|
presenceListeners.clear();
|
|
1263
1368
|
for (const pending of pendingHostActions.values()) {
|
|
1264
|
-
clearTimeout(pending.timeout);
|
|
1369
|
+
if (pending.timeout !== null) clearTimeout(pending.timeout);
|
|
1265
1370
|
pending.reject(new Error('The mini app document was removed.'));
|
|
1266
1371
|
}
|
|
1267
1372
|
pendingHostActions.clear();
|
|
@@ -1285,6 +1390,10 @@ const getSchemaValidator = async ()=>{
|
|
|
1285
1390
|
type: 'string',
|
|
1286
1391
|
validate: isUrl
|
|
1287
1392
|
});
|
|
1393
|
+
ajv.addFormat('uint8', {
|
|
1394
|
+
type: 'number',
|
|
1395
|
+
validate: (value)=>Number.isInteger(value) && value >= 0 && value <= 255
|
|
1396
|
+
});
|
|
1288
1397
|
ajv.addFormat('uint16', {
|
|
1289
1398
|
type: 'number',
|
|
1290
1399
|
validate: (value)=>Number.isInteger(value) && value >= 0 && value <= 65535
|
|
@@ -2196,6 +2305,24 @@ const federationExposeKeys = (options)=>{
|
|
|
2196
2305
|
if (!isRecord(options.exposes)) return [];
|
|
2197
2306
|
return Object.keys(options.exposes).sort();
|
|
2198
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
|
+
};
|
|
2199
2326
|
const packageBuildProfile = (packageTarget)=>{
|
|
2200
2327
|
switch(packageTarget){
|
|
2201
2328
|
case 'quickjs':
|
|
@@ -2331,6 +2458,7 @@ const validateQuickJsCompilation = (compilation, exposeAssetNames)=>{
|
|
|
2331
2458
|
const validateFederationDescriptorTarget = (descriptor, packageTarget, federation)=>{
|
|
2332
2459
|
const target = descriptor.targets[packageTarget];
|
|
2333
2460
|
if (!target) throw new Error(`TAP package descriptor does not declare the ${packageTarget} target.`);
|
|
2461
|
+
validateMcpServerFederationBinding(descriptor, packageTarget);
|
|
2334
2462
|
if (target.remoteName !== federation.name) throw new Error(`TAP package target remoteName "${target.remoteName}" does not match Module Federation name "${String(federation.name)}".`);
|
|
2335
2463
|
const configuredLibraryType = 'object' == typeof federation.library && null !== federation.library ? String(federation.library.type) : 'module';
|
|
2336
2464
|
if (target.libraryType !== configuredLibraryType) throw new Error(`TAP package target libraryType "${target.libraryType}" does not match Module Federation library type "${configuredLibraryType}".`);
|