Loading...
Loading...
Compare original and translation side by side
AiAuthoringBundleDefVersf/connect/service-itsm/createAgentagentScriptPOST /nextgen-authoring/bundlesPOST /nextgen-authoring/bundle-versions/{id}/publishPOST /nextgen-authoring/bundle-versions/{id}/activatesf api request restsf data queryGET /connect/service-itsm/agent-templates?agentType=AgentforceEmployeeAgentIT Service Employeesvc_emp_intelligence__data[]agentScriptconfig.developer_nameconfig.agent_labelmasterLabelreferences/specialized-templates.mdBashclassify-preflight.mjsclassify-agent-existence.mjsbuild-create-body.mjsagentScriptrender-report.mjs<masterLabel>IT Service Employeesvc_emp_intelligence__ItEmployeeAssistancereferences/specialized-templates.mdmasterLabeldeveloperNameid__AskUserQuestioniddata[]svc_emp_intelligence__svc_itsm_intelligence__*service-itsm-agentic-setup-fulfiller-agent-configure<masterLabel>classify-preflight.mjsbuild-create-body.mjsservice-cloud-requestor-agentservice-cloud-it-service-employee-agent403 FUNCTIONALITY_NOT_ENABLEDservice-itsm-agentic-setup-agentforce-studio-validateAiAuthoringBundleDefVersf/connect/service-itsm/createAgentagentScriptPOST /nextgen-authoring/bundlesPOST /nextgen-authoring/bundle-versions/{id}/publishPOST /nextgen-authoring/bundle-versions/{id}/activatesf api request restsf data queryGET /connect/service-itsm/agent-templates?agentType=AgentforceEmployeeAgentIT Service Employeesvc_emp_intelligence__data[]agentScriptconfig.developer_nameconfig.agent_labelmasterLabelreferences/specialized-templates.mdBashclassify-preflight.mjsclassify-agent-existence.mjsbuild-create-body.mjsagentScriptrender-report.mjs<masterLabel>IT Service Employeesvc_emp_intelligence__ItEmployeeAssistancereferences/specialized-templates.mdmasterLabel__developerNameAskUserQuestiondata[]svc_emp_intelligence__svc_itsm_intelligence__*service-itsm-agentic-setup-fulfiller-agent-configure<masterLabel>classify-preflight.mjsbuild-create-body.mjsservice-cloud-requestor-agentservice-cloud-it-service-employee-agent403 FUNCTIONALITY_NOT_ENABLEDservice-itsm-agentic-setup-agentforce-studio-validateagent-templatesreferences/specialized-templates.mdsvc_emp_intelligence__createBundleWithVersionpublishactivatesfservice-itsm-agentic-setup-fulfiller-agent-configureservice-itsm-agentic-setup-agentforce-studio-validatecreateAgentdata[]svc_emp_intelligence__agent-templatesreferences/specialized-templates.mdsvc_emp_intelligence__createBundleWithVersionpublishactivatesfservice-itsm-agentic-setup-fulfiller-agent-configureservice-itsm-agentic-setup-agentforce-studio-validatecreateAgentdata[]svc_emp_intelligence__sf401403404sfsf org display -o <alias>--target-org <alias>agent-templatesservice-itsm-agentic-setup-agentforce-studio-validateemployeenodesf401403404sfsf org display -o <alias>--target-org <alias>agent-templatesservice-itsm-agentic-setup-agentforce-studio-validatenode| Concern | Command | Notes |
|---|---|---|
| Studio access (precondition read) | | |
| List agent templates + Agent Script (read) | | |
| Enumerate existing agent + latest version status (read) | | Keyed PRIMARILY on the template's |
| Create the NGA bundle (write) | | Body built by |
| Publish the bundle version (write) | | Returns |
| Activate the bundle version (write) | | Empty response on success; agent is now live and NGA-native |
| Activate an existing inactive version (write) | | Reactivation path only (Phase 2b) — skips create/publish |
| Verify agent is live (read) | | |
references/cli-invocation.mdreferences/reactivation.mdreferences/error-taxonomy.mdNever extract the access token. Use/sf api request restdirectly — they use the CLI's stored session for the target org. Do not pull thesf data queryout ofaccessTokenand hand-build an HTTP request with it; that bypasses the CLI session and leaks a bearer token into shell context.sf org display
rule.--jsontakessf data query(results come back in a--jsonenvelope — that's what the classifier expects)..result.records[]does not — omitsf api request restthere; its raw stdout body is already JSON.--json
| 关注点 | 命令 | 说明 |
|---|---|---|
| Studio访问权限(前置条件读取) | | |
| 列出Agent模板及Agent脚本(读取) | | 必须指定 |
| 枚举现有Agent及最新版本状态(读取) | | 主要基于模板的 |
| 创建NGA包(写入) | | 请求体由 |
| 发布包版本(写入) | | 返回 |
| 激活包版本(写入) | | 成功时返回空响应;此时Agent已生效且为NGA原生Agent |
| 激活现有未激活版本(写入) | | 仅用于重新激活流程(第2b阶段)——跳过创建/发布步骤 |
| 验证Agent是否生效(读取) | | |
references/cli-invocation.mdreferences/reactivation.mdreferences/error-taxonomy.md请勿提取访问令牌。直接使用/sf api request rest——它们会使用CLI中存储的目标组织会话。请勿从sf data query中提取sf org display并手动构建HTTP请求;这会绕过CLI会话,并将Bearer令牌泄露到shell环境中。accessToken
规则。--json必须添加sf data query参数(结果会封装在--json中——这是分类器所需的格式)。.result.records[]无需添加该参数;其标准输出本身就是JSON格式。sf api request rest
| Field | Default |
|---|---|
| Target org | Default org ( |
Template ( | |
| Developer name | Broad: |
| Label | Broad: |
| Confirm the write | REQUIRED — present resolved template + developerName + label, then require "yes" via |
<masterLabel><developerName><label><masterLabel>agent-templates.data[]botDefinitionId<developerName><label>createBundleWithVersionapiNamelabelconfig.developer_nameconfig.agent_labelbotDefinitionIdpublishedBotId<developerName>botDefinitionIdagent-templatesBotDefinition<developerName>BotDefinition WHERE Id='<botDefinitionId>' OR DeveloperName='<developerName>'ORbotDefinitionIdBotDefinitionBotVersion.StatusActiveInactiveIT_Service_EmployeeIT_Service_Employee_AgentbotDefinitionIdbotDefinitionIdtemplateNamedeveloperNameDeveloperNameDUPLICATE_VALUE| 字段 | 默认值 |
|---|---|
| 目标组织 | 默认组织( |
模板( | |
| 开发者名称 | 通用模板: |
| 标签 | 通用模板: |
| 确认写入操作 | 必填——展示已确定的模板、开发者名称和标签,然后通过 |
<masterLabel><developerName><label><masterLabel>agent-templates.data[]botDefinitionId<developerName><label>createBundleWithVersionapiNamelabelconfig.developer_nameconfig.agent_labelbotDefinitionIdpublishedBotId<developerName>botDefinitionIdagent-templatesBotDefinition<developerName>BotDefinition WHERE Id='<botDefinitionId>' OR DeveloperName='<developerName>'ORbotDefinitionIdBotDefinitionBotVersion.StatusIT_Service_EmployeeIT_Service_Employee_AgentbotDefinitionIdbotDefinitionIdtemplateNamedeveloperNameDeveloperNameDUPLICATE_VALUE<alias><developerName><label>references/workflow-detail.mdsfnode${SCRATCH_DIR}SCRATCH_DIR="$(node "<skill_dir>/scripts/create-scratch-dir.mjs" "${outputDir:-}")"${TMPDIR}/tmp${outputDir}${outputDir}${SCRATCH_DIR}${outputDir}/report.mdagent-templatesagentType=AgentforceEmployeeAgentscripts/classify-preflight.mjs "<masterLabel>"<masterLabel>"IT Service Employee"masterLabeltemplate.botDefinitionId<developerName>verdictREADYNOT-READYAskUserQuestionservice-itsm-agentic-setup-agentforce-studio-validateERRORstudio.signal="CANNOT-CONFIRM"botDefinitionId<developerName>template.botDefinitionIdBotDefinition WHERE Id='<botDefinitionId>' OR DeveloperName='<developerName>'BotVersionsneedsActivationORexists:falseWHERE DeveloperName='<developerName>'botDefinitionIdscripts/classify-agent-existence.mjs ${SCRATCH_DIR}/bot-existing.json "<botDefinitionId-or-empty>" "<developerName>"exists:falseexists:trueneedsActivation:falseexists:trueneedsActivation:truebotDefinitionIdIT_Service_EmployeeIT_Service_Employee_AgentdeveloperNameDUPLICATE_VALUEAskUserQuestion<developerName>POST /connect/bot-versions/<latestVersionId>/activation{"status":"Active"}${outputDir}render-report.mjsverdict:"PENDING CONFIRMATION"AskUserQuestionverdict:"DECLINED"reasonscripts/build-create-body.mjs ${SCRATCH_DIR}/agent-templates.json "<masterLabel>" "<developerName>" "<label>" ${SCRATCH_DIR}/create-bundle-body.jsonagentScriptconfig.developer_nameconfig.agent_label<masterLabel>POST /nextgen-authoring/bundles --body @${SCRATCH_DIR}/create-bundle-body.jsonidbundleVersionIdbundleId403 FUNCTIONALITY_NOT_ENABLED404POST /nextgen-authoring/bundle-versions/<bundleVersionId>/publish --body '{}'{ lastPublishedOn, publishedBotId, publishedBotVersionId }BotDefinitionBotVersionPOST /nextgen-authoring/bundle-versions/<bundleVersionId>/activate --body '{}'BotDefinition WHERE Id='<id>'BotVersions<id>publishedBotIdbotDefinitionIdagentIdBotDefinition.IdbotDefinitionIdmatchedBy:"developerName"WHERE Id=''exists:true, count:1, latestVersionStatus:"Active"BotDefinitionidrender-report.mjs${outputDir}${outputDir}/report.md<alias><developerName><label>references/workflow-detail.mdsfnode${SCRATCH_DIR}SCRATCH_DIR="$(node "<skill_dir>/scripts/create-scratch-dir.mjs" "${outputDir:-}")"${TMPDIR}/tmp${outputDir}${outputDir}${SCRATCH_DIR}${outputDir}/report.mdagent-templatesagentType=AgentforceEmployeeAgentscripts/classify-preflight.mjs "<masterLabel>"<masterLabel>"IT Service Employee"masterLabeltemplate.botDefinitionId<developerName>verdictREADYNOT-READYAskUserQuestionservice-itsm-agentic-setup-agentforce-studio-validateERRORstudio.signal="CANNOT-CONFIRM"botDefinitionId<developerName>template.botDefinitionIdBotDefinition WHERE Id='<botDefinitionId>' OR DeveloperName='<developerName>'BotVersionsneedsActivationORexists:falseWHERE DeveloperName='<developerName>'botDefinitionIdscripts/classify-agent-existence.mjs ${SCRATCH_DIR}/bot-existing.json "<botDefinitionId-or-empty>" "<developerName>"exists:falseexists:trueneedsActivation:falseexists:trueneedsActivation:truebotDefinitionIdIT_Service_EmployeeIT_Service_Employee_AgentdeveloperNameDUPLICATE_VALUEAskUserQuestion<developerName>POST /connect/bot-versions/<latestVersionId>/activation{"status":"Active"}${outputDir}render-report.mjsverdict"PENDING CONFIRMATION"AskUserQuestionverdict"DECLINED"scripts/build-create-body.mjs ${SCRATCH_DIR}/agent-templates.json "<masterLabel>" "<developerName>" "<label>" ${SCRATCH_DIR}/create-bundle-body.jsonagentScriptconfig.developer_nameconfig.agent_label<masterLabel>POST /nextgen-authoring/bundles --body @${SCRATCH_DIR}/create-bundle-body.jsonidbundleVersionIdbundleId403 FUNCTIONALITY_NOT_ENABLED404POST /nextgen-authoring/bundle-versions/<bundleVersionId>/publish --body '{}'{ lastPublishedOn, publishedBotId, publishedBotVersionId }BotDefinitionBotVersionPOST /nextgen-authoring/bundle-versions/<bundleVersionId>/activate --body '{}'BotDefinition WHERE Id='<id>'BotVersions<id>publishedBotIdbotDefinitionIdagentIdBotDefinition.IdbotDefinitionIdmatchedBy:"developerName"WHERE Id=''exists:true, count:1, latestVersionStatus:"Active"render-report.mjsBotDefinitionid${outputDir}${outputDir}/report.md| Constraint | Rationale |
|---|---|
All calls go through | Leaks a bearer token into shell context; the CLI's stored session is the correct surface |
Idempotency + verify reads key PRIMARILY on the template's | |
Preflight, idempotency, bundle-body construction, and report rendering all live in | JSON parsing + |
Three-call sequence: | Platform enforces DRAFT → published → active; response-body / empty-body / |
Resolve | Label-similar pairs exist; other namespaces belong to other flows ( |
Enumerate | Subquery is what distinguishes Active/Inactive; the server rejects a duplicate |
| REQUIRED confirm-to-write checkpoint before create sequence or reactivation call | Both change live org state — explicit user approval required |
On | Enablement is a Setup-UI/admin action; |
| Report exact CLI response text on any error | Enables support to diagnose failures |
| 约束 | 理由 |
|---|---|
所有调用均通过 | 避免将Bearer令牌泄露到shell环境中;CLI存储的会话是正确的操作入口 |
幂等性和验证读取主要基于模板的 | |
预检、幂等性检查、包请求体构建和报告渲染均通过 | JSON解析 + |
三步调用流程: | 平台要求必须遵循草稿→已发布→已激活的流程;响应体/空响应/ |
在第1阶段前确定 | 存在标签相似的模板对;其他命名空间的模板属于其他流程( |
枚举 | 子查询是区分Active/Inactive的关键;服务器会在发布时拒绝重复的 |
| 必填的写入确认检查点,位于创建流程或重新激活调用之前 | 两种操作都会修改组织的实时状态——需要用户明确批准 |
当 | 功能启用属于Setup-UI/管理员操作; |
| 任何错误均报告精确的CLI响应文本 | 便于支持人员诊断故障 |
<masterLabel>references/specialized-templates.mddata[]svc_emp_intelligence__idclassify-preflight.mjsbotDefinitionIdBotDefinition WHERE Id='<botDefinitionId>' OR DeveloperName='<developerName>'ORbotDefinitionIdBotVersion.StatusneedsActivation:truebuild-create-body.mjs--body @<file>developerNamelabelbundleVersionIdidPOST /connect/bot-versions/<id>/activationcreateAgentBotDefinitionBotDefinition<masterLabel>references/specialized-templates.mddata[]svc_emp_intelligence__classify-preflight.mjsbotDefinitionIdBotDefinition WHERE Id='<botDefinitionId>' OR DeveloperName='<developerName>'ORbotDefinitionIdBotVersion.StatusneedsActivation:truebuild-create-body.mjs--body @<file>developerNamelabelbundleVersionIdidPOST /connect/bot-versions/<id>/activationcreateAgentBotDefinitionBotDefinitionscripts/render-report.mjs${outputDir}/report.mdreferences/report-format.mdCREATED | ALREADY-CREATED | ACTIVATED | PENDING CONFIRMATION | DECLINED | FAILED${outputDir}scripts/render-report.mjs${outputDir}/report.mdreferences/report-format.mdCREATED | ALREADY-CREATED | ACTIVATED | PENDING CONFIRMATION | DECLINED | FAILED${outputDir}references/specialized-templates.mdidreferences/workflow-detail.mdsfnodereferences/cli-invocation.mdreferences/reactivation.mdreferences/report-format.mdreferences/error-taxonomy.mdreferences/specialized-templates.mdreferences/workflow-detail.mdsfnodereferences/cli-invocation.mdreferences/reactivation.mdreferences/report-format.mdreferences/error-taxonomy.md