Loading...
Loading...
Compare original and translation side by side
@InvocableMethod@InvocableMethodactionNameisSuccessoutputValueslightning__objectType<toolApiName>outputValuesc__<responseCLT>@InvocableVariable@InvocableMethod<toolApiName>ResponseGetAccountSummaryResponserenderer.json{!$attrs.outputValues.<field>}@apexClassType/...platform-lightning-type-widget-coordinateplatform-widget-generateplatform-custom-lightning-type-generateplatform-apex-generateBeta cardinality: the invocable-action result is a bulk array (). For the beta release this skill models and renders a single response — the first element ofcontent[]. The CLT envelope models one result object, not thecontent[]wrapper.content[]
actionNameisSuccessoutputValueslightning__objectType<toolApiName>outputValuesc__<responseCLT>@InvocableMethod@InvocableVariable<toolApiName>ResponseGetAccountSummaryResponserenderer.json{!$attrs.outputValues.<field>}@apexClassType/...platform-lightning-type-widget-coordinateplatform-widget-generateplatform-custom-lightning-type-generateplatform-apex-generateBeta版基数限制: invocable-action结果为批量数组()。在Beta版本中,本技能仅建模并渲染单个响应——即content[]的第一个元素。CLT信封仅建模一个结果对象,而非content[]包装器。content[]
platform-lightning-type-widget-coordinateplatform-lightning-type-widget-coordinate| Dimension | agent-action flow ( | this MCP-tool flow |
|---|---|---|
| CLT kind | Apex-backed ( | Object-based ( |
| Number of CLTs | one | two (envelope + response) |
| Field source | | |
| Renderer location | | |
| Renderer binding | flat | nested |
| 维度 | 代理动作流程( | 本MCP工具流程 |
|---|---|---|
| CLT类型 | 基于Apex( | 基于对象( |
| CLT数量 | 1个 | 2个(信封 + 响应) |
| 字段来源 | | 响应类上的 |
| 渲染器位置 | | |
| 渲染器绑定 | 扁平化 | 嵌套式 |
| Phase | Purpose | Output |
|---|---|---|
| 1 — Input selection | Determine the payload source: an invocable action API name (preferred), an Apex Invocable class, or a pasted tool-output JSON sample. | |
| 2 — Payload discovery | Describe the invocable action via the Actions REST API and read its typed | |
| 3 — Build plan | Print the plan in full; proceed unless the next reply explicitly pushes back. | printed plan |
| 4 — Generation | Load and invoke leaf skills: response CLT → envelope CLT → widget → inline default renderer in the envelope CLT. | files written |
| 5 — Validation | Run hard gates (block) and warn gates (advisory). | gate report |
| 6 — Summary | Files, validations, deploy order, preview readiness. | summary |
| 阶段 | 目标 | 输出 |
|---|---|---|
| 1 — 输入选择 | 确定负载来源:invocable action API名称(首选)、Apex Invocable类,或粘贴的工具输出JSON示例。 | |
| 2 — 负载发现 | 通过Actions REST API描述invocable action并读取其类型化的 | |
| 3 — 构建计划 | 完整打印计划;除非下一条回复明确反对,否则继续推进。 | 打印的计划 |
| 4 — 生成 | 加载并调用子技能:响应CLT → 信封CLT → widget → 信封CLT中的内联默认渲染器。 | 生成的文件 |
| 5 — 验证 | 运行强制检查(阻止流程)和警告检查(建议性)。 | 检查报告 |
| 6 — 总结 | 文件列表、验证结果、部署顺序、预览就绪状态。 | 总结报告 |
| Source | Trigger | Phase 2 action |
|---|---|---|
| Prompt gives an invocable action API name — directly, or via an Apex class name that resolves to one — AND an authenticated org is available. Preferred. | Describe the action via the Actions REST API and read its typed |
| No reachable org (or the describe 404s), but a pasted tool-output JSON sample is available. | Parse the |
| Only the Apex class is available (no action name resolvable, no reachable org, no sample) — fallback only, may be stale relative to what's deployed. | Resolve the response class and enumerate |
actionsampleapex| 来源 | 触发条件 | 阶段2操作 |
|---|---|---|
| 提示提供invocable action API名称——直接提供,或通过可解析为该名称的Apex类名称提供——且存在已认证的组织。首选。 | 通过Actions REST API描述动作并读取其类型化的 |
| 无法访问组织(或描述请求返回404),但提供了粘贴的工具输出JSON示例。 | 从示例中解析 |
| 仅能获取Apex类(无法解析动作名称,无法访问组织,无示例)——仅作为备选,可能与已部署内容不一致。 | 解析响应类并枚举 |
actionsampleapexreferences/mcp-tool-output-discovery.mdactionoutputs@InvocableMethodsf api request rest '/services/data/v<APIVER>/actions/custom/apex/<ActionApiName>' -o <org>outputs{ name, label, type, maxOccurs }inputsmaxOccurs > 1typelightning:typeSTRINGIDREFERENCElightning__textTypeINTEGERLONGlightning__integerTypeDOUBLEDECIMALCURRENCYPERCENTlightning__numberTypeBOOLEANlightning__booleanTypeDATEDATETIME"type": null"apexClass": "<OuterClass>$<InnerClass>"typeactionsampleapexapex<pkgDir>/classes/<ClassName>.clsApexClass:<ClassName>@InvocableMethodList<...>List<GetAccountSummaryResponse>GetAccountSummaryResponse@InvocableVariable@InvocableMethodprivatelightning:typeStringIdlightning__textTypeIntegerlightning__integerTypeDecimalDoublelightning__numberTypeBooleanlightning__booleanTypeDatelightning__dateTypeDatetimelightning__dateTimeTypeflightInfo : SearchFlightsAction.FlightactionapexsampleapexsampleoutputValueslightning:typelightning__textTypelightning__integerTypelightning__numberTypelightning__booleanType{"type":"object"}lightning__objectType"@apexClassType/<ns>__<OuterClass>$<InnerClass>""@apexClassType/c__SearchFlightsAction$Flight"platform-custom-lightning-type-generate@InvocableVariable{!$attrs.outputValues.<objectField>.<leaf>}{!$attrs.outputValues.flightInfo.flightId}{!$attrs.outputValues.<objectField>}List<ApexClass>maxOccurs > 1references/two-clt-modeling.mdexamples/nested-object-source-prompt.mdpayloadFields{ name, title, lightning:type }Staleness: do NOT maintain a cross-session cache. Read the local project fresh and re-retrieve from the org per session.
references/mcp-tool-output-discovery.mdactionoutputs@InvocableMethodsf api request rest '/services/data/v<APIVER>/actions/custom/apex/<ActionApiName>' -o <org>outputs{ name, label, type, maxOccurs }inputsmaxOccurs > 1typelightning:typeSTRINGIDREFERENCElightning__textTypeINTEGERLONGlightning__integerTypeDOUBLEDECIMALCURRENCYPERCENTlightning__numberTypeBOOLEANlightning__booleanTypeDATEDATETIME"type": null"apexClass": "<OuterClass>$<InnerClass>"actionsampleapexapex<pkgDir>/classes/<ClassName>.clsApexClass:<ClassName>@InvocableMethodList<...>List<GetAccountSummaryResponse>GetAccountSummaryResponse@InvocableVariable@InvocableMethodprivatelightning:typeStringIdlightning__textTypeIntegerlightning__integerTypeDecimalDoublelightning__numberTypeBooleanlightning__booleanTypeDatelightning__dateTypeDatetimelightning__dateTimeTypeflightInfo : SearchFlightsAction.FlightactionapexsampleapexsampleoutputValueslightning:typelightning__textTypelightning__integerTypelightning__numberTypelightning__booleanType{"type":"object"}lightning__objectType"@apexClassType/<ns>__<OuterClass>$<InnerClass>""@apexClassType/c__SearchFlightsAction$Flight"platform-custom-lightning-type-generate@InvocableVariable{!$attrs.outputValues.<objectField>.<leaf>}{!$attrs.outputValues.flightInfo.flightId}{!$attrs.outputValues.<objectField>}List<ApexClass>maxOccurs > 1references/two-clt-modeling.mdexamples/nested-object-source-prompt.mdpayloadFields{ name, title, lightning:type }时效性:请勿维护跨会话缓存。每次会话都要重新读取本地项目并从组织重新检索内容。
references/build-plan-format.mdPLAN:Properties omitted:actionNameisSuccessisSuccesserrorMessagestatusmessageoutputValuesnostopwaitchange Xuse Y insteadreferences/build-plan-format.mdPLAN:Properties omitted:actionNameisSuccessisSuccesserrorMessagestatusmessageoutputValuesnostopwaitchange Xuse Y insteadplatform-custom-lightning-type-generate<responseCLT><toolApiName>ResponsepropertiespayloadFields@InvocableVariablelightning__objectType"lightning:tags": ["mcp"]platform-custom-lightning-type-generate<toolCLT><toolApiName>"lightning:tags": ["mcp"]actionNamelightning__textTypeisSuccesslightning__booleanTypeoutputValuesc__<responseCLT>messageplatform-widget-generateschema.jsonpayloadFieldsoutputValuesactionNameisSuccessProperties omitted:{!$attrs.<field>}outputValuesplatform-custom-lightning-type-generate/references/widget-rendition.md<pkgDir>/lightningTypes/<toolCLT>/renderer.jsonschema.jsonlightningDesktopGenAi/{
"renderer": {
"componentOverrides": {
"$": {
"definition": "@widget/c/<widgetName>",
"attributes": {
"<payloadField>": "{!$attrs.outputValues.<payloadField>}"
}
}
}
}
}outputValues{!$attrs.outputValues.<payloadField>}renderer.jsonrenderer.jsonc/<component>platform-custom-lightning-type-generate<responseCLT><toolApiName>ResponsepropertiespayloadFields@InvocableVariablelightning__objectType"lightning:tags": ["mcp"]platform-custom-lightning-type-generate<toolCLT><toolApiName>"lightning:tags": ["mcp"]actionNamelightning__textTypeisSuccesslightning__booleanTypeoutputValuesc__<responseCLT>messageplatform-widget-generateschema.jsonpayloadFieldsoutputValuesactionNameisSuccessProperties omitted:{!$attrs.<field>}outputValuesplatform-custom-lightning-type-generate/references/widget-rendition.md<pkgDir>/lightningTypes/<toolCLT>/renderer.jsonschema.jsonlightningDesktopGenAi/{
"renderer": {
"componentOverrides": {
"$": {
"definition": "@widget/c/<widgetName>",
"attributes": {
"<payloadField>": "{!$attrs.outputValues.<payloadField>}"
}
}
}
}
}{!$attrs.outputValues.<payloadField>}outputValuesrenderer.jsonrenderer.jsonc/<component>references/validation-gates.md{!$attrs.X}.uiwidget-meta.xmlplatform-widget-generateclt-reference-integrityoutputValueslightning:type === "c__<responseCLT>"<pkgDir>/lightningTypes/<responseCLT>/schema.json$schemaitemsrenderer-wires-widget<pkgDir>/lightningTypes/<toolCLT>/renderer.jsonlightningDesktopGenAi/componentOverrides["$"].definition === "@widget/c/<widgetName>"{!$attrs.outputValues.<property>}field-tracereferences/validation-gates.md@InvocableVariablejqProperties omitted:passfail (<reason>)warn (<reason>)not runreferences/validation-gates.md{!$attrs.X}.uiwidget-meta.xmlplatform-widget-generateclt-reference-integrityoutputValueslightning:type === "c__<responseCLT>"<pkgDir>/lightningTypes/<responseCLT>/schema.json$schemaitemsrenderer-wires-widget<pkgDir>/lightningTypes/<toolCLT>/renderer.jsonlightningDesktopGenAi/componentOverrides["$"].definition === "@widget/c/<widgetName>"{!$attrs.outputValues.<property>}field-tracereferences/validation-gates.md@InvocableVariablejqProperties omitted:passfail (<reason>)warn (<reason>)not runMCP Tool Widget Build Complete: <widgetName>
FILES GENERATED:
Response CLT:
<pkgDir>/lightningTypes/<responseCLT>/schema.json
Envelope CLT:
<pkgDir>/lightningTypes/<toolCLT>/schema.json
<pkgDir>/lightningTypes/<toolCLT>/renderer.json # default renderer — wires the widget
Widget bundle:
<pkgDir>/uiWidgets/<widgetName>/<widgetName>.json
<pkgDir>/uiWidgets/<widgetName>/schema.json
<pkgDir>/uiWidgets/<widgetName>/<widgetName>.uiwidget-meta.xml
VALIDATIONS:
widget self-validation (platform-widget-generate gates): <pass | fail — see sub-skill report>
clt-reference-integrity (envelope.outputValues → c__<responseCLT>): <pass | fail (<reason>)>
renderer-wires-widget (nested {!$attrs.outputValues.X} bindings): <pass | fail (<reason>)>
field-trace (INVENTED + OMITTED lists printed): <pass | warn (<reason>) | fail (invented: <list>)>MCP工具Widget构建完成:<widgetName>
生成的文件:
响应CLT:
<pkgDir>/lightningTypes/<responseCLT>/schema.json
信封CLT:
<pkgDir>/lightningTypes/<toolCLT>/schema.json
<pkgDir>/lightningTypes/<toolCLT>/renderer.json # 默认渲染器——关联widget
Widget包:
<pkgDir>/uiWidgets/<widgetName>/<widgetName>.json
<pkgDir>/uiWidgets/<widgetName>/schema.json
<pkgDir>/uiWidgets/<widgetName>/<widgetName>.uiwidget-meta.xml
验证结果:
widget自验证(platform-widget-generate检查项):<pass | fail — 请参见子技能报告>
clt-reference-integrity(envelope.outputValues → c__<responseCLT>):<pass | fail (<reason>)>
renderer-wires-widget(嵌套{!$attrs.outputValues.X}绑定):<pass | fail (<reason>)>
field-trace(打印虚构字段+省略字段列表):<pass | warn (<reason>) | fail (虚构字段:<list>)>outputValuesc__<responseCLT>lightning__objectType"lightning:tags": ["mcp"]platform-custom-lightning-type-generate/assets/primitive-types-and-constraints.mdlightningTypes/<toolCLT>/renderer.jsonschema.jsonlightningDesktopGenAi/renderer.json{!$attrs.outputValues.<field>}{!$attrs.<field>}outputValuesactionNameisSuccessisSuccesserrorMessagestatusmessageProperties omitted:@InvocableVariable@InvocableVariableProperties omitted:field-tracecontent[]passnot runBash$(…)<(…)>(…){a,b,c}{1..N}evalexecmkdir -p a && mkdir -p bX=literalactionsf api request restsfa4d_mcp_settings.jsoncurlsample{"type":"object"}@apexClassType/<ns>__<OuterClass>$<InnerClass>{!$attrs.outputValues.<objectField>.<leaf>}references/two-clt-modeling.mdoutputValuesc__<responseCLT>lightning__objectType"lightning:tags": ["mcp"]platform-custom-lightning-type-generate/assets/primitive-types-and-constraints.mdlightningTypes/<toolCLT>/renderer.jsonschema.jsonlightningDesktopGenAi/renderer.json{!$attrs.outputValues.<field>}{!$attrs.<field>}outputValuesactionNameisSuccessisSuccesserrorMessagestatusmessageProperties omitted:@InvocableVariable@InvocableVariableProperties omitted:field-tracecontent[]passnot run$(…)<(…)>(…){a,b,c}{1..N}evalexecmkdir -p a && mkdir -p bX=literalactionsf api request restsfa4d_mcp_settings.jsoncurlsample{"type":"object"}@apexClassType/<ns>__<OuterClass>$<InnerClass>{!$attrs.outputValues.<objectField>.<leaf>}references/two-clt-modeling.md| File | When to read |
|---|---|
| Phase 2 — the three sources ( |
| Phase 4 — how the envelope + response CLTs and the nested renderer binding fit together, with the naming convention and nested-object payload handling. |
| Phase 3 — plan template the model fills before proceeding. |
| Phase 5 — full hard / warn gate table with RUN procedures. |
| Phase 3 — a complete walkthrough starting from an invocable action API name (preferred source). |
| Phase 3 — a complete walkthrough starting from an Apex Invocable class (fallback). |
| Phase 3 — a complete walkthrough starting from a pasted tool-output sample (fallback). |
| Phase 3 — a complete walkthrough where a payload field is itself an Apex-class reference, not a primitive. |
| 文件 | 阅读时机 |
|---|---|
| 阶段2——三个来源(通过Actions REST API描述 |
| 阶段4——信封+响应CLT和嵌套渲染器绑定如何配合工作,包括命名约定和嵌套对象负载处理。 |
| 阶段3——模型在推进前需填充的计划模板。 |
| 阶段5——完整的强制/警告检查项表格及执行流程。 |
| 阶段3——从invocable action API名称开始的完整流程说明(首选来源)。 |
| 阶段3——从Apex Invocable类开始的完整流程说明(备选)。 |
| 阶段3——从粘贴的工具输出示例开始的完整流程说明(备选)。 |
| 阶段3——负载字段为Apex类引用(而非原始类型)的完整流程说明。 |