@salesforce/afv-skills 1.58.0 → 1.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/agentforce-architecture-analyze/SKILL.md +66 -17
- package/skills/agentforce-architecture-analyze/assets/cli/show_access_token.yaml +4 -7
- package/skills/agentforce-architecture-analyze/references/contract.json +1 -1
- package/skills/agentforce-architecture-analyze/scripts/emit_env.py +2 -2
- package/skills/agentforce-architecture-analyze/scripts/main.py +40 -44
- package/skills/agentforce-architecture-analyze/scripts/rest_client.py +11 -3
- package/skills/agentforce-architecture-analyze/scripts/sf_cli.py +77 -10
- package/skills/agentforce-architecture-analyze/scripts/tests/test_end_to_end_fixture.py +1 -0
- package/skills/agentforce-architecture-analyze/scripts/tests/test_flow_children_inflation.py +1 -0
- package/skills/agentforce-architecture-analyze/scripts/tests/test_main_pipeline.py +53 -2
- package/skills/agentforce-architecture-analyze/scripts/tests/test_resolve_creds.py +184 -36
- package/skills/agentforce-architecture-analyze/scripts/tests/test_rest_client.py +17 -0
- package/skills/agentforce-architecture-analyze/scripts/tests/test_sf_cli.py +165 -11
- package/skills/agentforce-architecture-analyze/scripts/tests/test_skill_md_pipeline_block.py +319 -0
- package/skills/agentforce-bot-upgrade/SKILL.md +3 -1
- package/skills/agentforce-d360-analyze/SKILL.md +28 -10
- package/skills/agentforce-d360-analyze/scripts/dc.py +200 -50
- package/skills/agentforce-d360-analyze/scripts/discover_sessions.py +10 -6
- package/skills/agentforce-d360-analyze/scripts/fetch_dc.py +22 -6
- package/skills/agentforce-d360-analyze/scripts/resolve_session.py +21 -13
- package/skills/agentforce-d360-analyze/scripts/tests/test_dc_and_resolve_session.py +298 -76
- package/skills/agentforce-d360-analyze/scripts/tests/test_default_target_org.py +432 -0
- package/skills/agentforce-d360-analyze/scripts/tests/test_discover_sessions.py +1 -1
- package/skills/agentforce-d360-analyze/scripts/tests/test_resolve_session_main.py +9 -3
- package/skills/agentforce-d360-analyze/scripts/tests/test_skill_md_prefix_block.py +176 -0
- package/skills/agentforce-generate/SKILL.md +21 -1
- package/skills/agentforce-generate/references/known-issues.md +51 -1
- package/skills/agentforce-generate/references/legacy-nga-regression-eval.md +547 -0
- package/skills/agentforce-generate/references/upgrade-legacy-agent-to-agentscript.md +577 -0
- package/skills/agentforce-generate/scripts/upgrade-legacy-nga-analyze.py +404 -0
- package/skills/agentforce-generate/scripts/upgrade-legacy-nga-run-trials.sh +58 -0
- package/skills/agentforce-persona-generate/SKILL.md +505 -0
- package/skills/agentforce-persona-generate/assets/checklist-template.md +100 -0
- package/skills/agentforce-persona-generate/assets/persona-encoding-template.md +252 -0
- package/skills/agentforce-persona-generate/assets/persona-template.md +229 -0
- package/skills/agentforce-persona-generate/assets/sample-dialog-template.md +50 -0
- package/skills/agentforce-persona-generate/assets/workshop-outline-template.md +97 -0
- package/skills/agentforce-persona-generate/examples/concierge-persona.md +189 -0
- package/skills/agentforce-persona-generate/examples/concierge-sample-dialog.md +70 -0
- package/skills/agentforce-persona-generate/examples/drover-persona.md +194 -0
- package/skills/agentforce-persona-generate/examples/drover-sample-dialog.md +62 -0
- package/skills/agentforce-persona-generate/examples/steady-hand-persona.md +188 -0
- package/skills/agentforce-persona-generate/examples/steady-hand-sample-dialog.md +68 -0
- package/skills/agentforce-persona-generate/examples/yt-persona.md +195 -0
- package/skills/agentforce-persona-generate/examples/yt-sample-dialog.md +66 -0
- package/skills/agentforce-persona-generate/references/attributions.md +36 -0
- package/skills/agentforce-persona-generate/references/interaction-design-notes.md +30 -0
- package/skills/agentforce-persona-generate/references/persona-encoding-guide.md +566 -0
- package/skills/agentforce-persona-generate/references/persona-framework.md +796 -0
- package/skills/agentforce-persona-generate/references/refinement-mappings.md +31 -0
- package/skills/agentforce-persona-generate/references/scoring-rubric.md +58 -0
- package/skills/agentforce-persona-generate/references/voice-catalog.json +2327 -0
- package/skills/agentforce-persona-generate/references/workshop-question-policy.md +90 -0
- package/skills/agentforce-persona-generate/references/workshop-scenario-seeds.md +119 -0
- package/skills/agentforce-persona-generate/scripts/parse_agent_yaml.py +223 -0
- package/skills/consumer-goods-accruals-datakit-deploy/SKILL.md +17 -27
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/setup.js +7 -17
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/00-check-prerequisites.js +47 -63
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/01-download-static-resource.js +10 -13
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/02-replace-org-id.js +46 -46
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/03-deploy-metadata.js +4 -21
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/06-create-dataspace.js +58 -82
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/07-deploy-accruals-reports.js +16 -315
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/08-deploy-ui.js +9 -24
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/09-completion.js +44 -44
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/utils.js +11 -63
- package/skills/consumer-goods-rtr-datacloud-export-configure/SKILL.md +2 -1
- package/skills/consumer-goods-tpe-dashboard-configure/SKILL.md +2 -1
- package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/SKILL.md +2 -1
- package/skills/consumer-goods-tpe-datakit-deploy/SKILL.md +2 -1
- package/skills/data360-schema-get/SKILL.md +3 -3
- package/skills/design-systems-slds-validate/references/report-format.md +1 -1
- package/skills/dx-app-analytics-query/SKILL.md +8 -8
- package/skills/dx-org-manage/SKILL.md +1 -0
- package/skills/dx-org-shape-manage/SKILL.md +1 -0
- package/skills/dx-org-snapshot-manage/SKILL.md +172 -0
- package/skills/dx-org-snapshot-manage/examples/create_error_output.json +16 -0
- package/skills/dx-org-snapshot-manage/examples/create_success_output.json +19 -0
- package/skills/dx-org-snapshot-manage/examples/delete_output.json +9 -0
- package/skills/dx-org-snapshot-manage/examples/get_output.json +19 -0
- package/skills/dx-org-snapshot-manage/examples/list_output.json +36 -0
- package/skills/dx-org-snapshot-manage/references/cli_flags.md +179 -0
- package/skills/dx-org-snapshot-manage/references/snapshot_usage.md +55 -0
- package/skills/dx-org-trial-expiration-check/SKILL.md +1 -1
- package/skills/dx-org-trial-expiration-check/scripts/check_expiration.sh +2 -2
- package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +7 -5
- package/skills/education-cloud-student-recruitment-agent-configure/references/prerequisites.md +11 -11
- package/skills/experience-content-media-image-generate/SKILL.md +83 -0
- package/skills/experience-content-media-image-generate/scripts/download-image.sh +84 -0
- package/skills/experience-ui-bundle-app-coordinate/SKILL.md +12 -12
- package/skills/experience-ui-bundle-app-coordinate/references/phase-completion-validation.md +3 -3
- package/skills/experience-ui-bundle-app-coordinate/references/phase-execution-pattern.md +9 -7
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-dangling-refs.mjs +132 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-hosting-target.mjs +62 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-1-complete.mjs +71 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-4-complete.mjs +95 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-6-ready.mjs +78 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-prerequisites.mjs +21 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-sfdx-project.mjs +28 -0
- package/skills/experience-ui-bundle-custom-app-generate/SKILL.md +3 -1
- package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.mjs +40 -0
- package/skills/experience-ui-bundle-frontend-generate/SKILL.md +7 -5
- package/skills/experience-ui-bundle-frontend-generate/scripts/check-preconditions.mjs +70 -0
- package/skills/experience-ui-bundle-frontend-generate/scripts/resolve-ui-bundle.mjs +76 -0
- package/skills/experience-ui-bundle-frontend-generate/scripts/verify-rules.mjs +115 -0
- package/skills/experience-ui-bundle-metadata-generate/SKILL.md +7 -3
- package/skills/experience-ui-bundle-metadata-generate/references/angular-metadata-generate.md +1 -1
- package/skills/experience-ui-bundle-metadata-generate/references/react-metadata-generate.md +1 -1
- package/skills/experience-ui-bundle-metadata-generate/scripts/check-api-version.mjs +43 -0
- package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.mjs +131 -0
- package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.mjs +152 -0
- package/skills/experience-ui-bundle-mfa-configure/references/branding.md +10 -6
- package/skills/external-diagram-mermaid-generate/SKILL.md +12 -12
- package/skills/field-service-data-capture-migrate/references/component-mapping.md +1 -1
- package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +1 -2
- package/skills/field-service-data-capture-migrate/references/known-deploy-errors.md +1 -0
- package/skills/field-service-data-capture-migrate/references/transformer-rules.md +1 -1
- package/skills/field-service-data-capture-migrate/scripts/transform_flow.py +12 -1
- package/skills/field-service-data-capture-migrate/scripts/vendor/build_flow.py +4 -1
- package/skills/field-service-setup-orchestrator-get/SKILL.md +0 -1
- package/skills/insurance-brokerage-agency-billing-configure/SKILL.md +233 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/accounting-setup.md +117 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/billing-rules-config.md +237 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/billing-settings.md +271 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/demo-policy-config.md +138 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/org-defaults.md +64 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/permissions-config.md +226 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/prerequisites.md +142 -0
- package/skills/life-sciences-fieldsalesrep-coordinate/SKILL.md +3 -2
- package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-execution-state-and-recovery.md +3 -3
- package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-overview.md +68 -45
- package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-visit-creation-data.md +17 -18
- package/skills/life-sciences-kam-coordinate/references/stage-5-data-and-plan-templates-overview.md +16 -3
- package/skills/life-sciences-kam-coordinate/references/stage-5-data-creation-data.md +16 -13
- package/skills/marketing-message-test/SKILL.md +194 -0
- package/skills/marketing-message-test/references/api-contract.md +333 -0
- package/skills/omnistudio-callable-apex-generate/SKILL.md +3 -3
- package/skills/omnistudio-datamapper-generate/SKILL.md +6 -6
- package/skills/omnistudio-datapacks-deploy/SKILL.md +11 -11
- package/skills/omnistudio-dependencies-analyze/SKILL.md +5 -5
- package/skills/omnistudio-epc-catalog-generate/SKILL.md +6 -6
- package/skills/omnistudio-flexcard-generate/SKILL.md +6 -6
- package/skills/omnistudio-integration-procedure-generate/SKILL.md +6 -6
- package/skills/omnistudio-omniscript-generate/SKILL.md +6 -5
- package/skills/platform-apex-logs-debug/SKILL.md +1 -0
- package/skills/platform-metadata-deploy/SKILL.md +1 -0
- package/skills/platform-models-api-configure/SKILL.md +5 -5
- package/skills/platform-soql-query/SKILL.md +1 -0
- package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +17 -6
- package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +107 -192
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone-action.json +6 -6
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +49 -20
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +4 -4
- package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +224 -290
- package/skills/service-itsm-agentic-setup-incident-sla-configure/references/workflow.md +295 -0
- package/skills/service-itsm-incident-priority-configure/SKILL.md +1 -1
- package/skills/service-itsm-slack-itservice-configure/SKILL.md +2 -1
- package/skills/service-itsm-slack-itservice-configure/references/manage-slack-connection.md +2 -2
- package/skills/service-omni-channel-setup-coordinate/SKILL.md +20 -13
- package/skills/service-omni-channel-setup-coordinate/scripts/integration-driver.sh +5 -55
- package/skills/service-omni-channel-setup-coordinate/scripts/tests/test_omni_contracts.py +0 -38
- package/skills/service-omni-command-center-analyze/SKILL.md +2 -3
- package/skills/service-omni-command-center-analyze/scripts/analyze.sh +3 -3
- package/skills/tableau-next-asset-create/README.md +65 -0
- package/skills/tableau-next-asset-create/SKILL.md +409 -0
- package/skills/tableau-next-asset-create/references/admin-users.md +149 -0
- package/skills/tableau-next-asset-create/references/ai-readiness.md +355 -0
- package/skills/tableau-next-asset-create/references/alerts.md +111 -0
- package/skills/tableau-next-asset-create/references/build-workflow.md +819 -0
- package/skills/tableau-next-asset-create/references/dashboard-authoring.md +302 -0
- package/skills/tableau-next-asset-create/references/dashboard-design-principles.md +352 -0
- package/skills/tableau-next-asset-create/references/data-transform-gotchas.md +210 -0
- package/skills/tableau-next-asset-create/references/data-understanding.md +387 -0
- package/skills/tableau-next-asset-create/references/deep-reference-index.md +74 -0
- package/skills/tableau-next-asset-create/references/destructive-operations.md +62 -0
- package/skills/tableau-next-asset-create/references/edit-dashboard.md +273 -0
- package/skills/tableau-next-asset-create/references/edit-visualization.md +529 -0
- package/skills/tableau-next-asset-create/references/empty-source-handling.md +104 -0
- package/skills/tableau-next-asset-create/references/ingest-and-metric-gotchas.md +638 -0
- package/skills/tableau-next-asset-create/references/insight-bundle.md +69 -0
- package/skills/tableau-next-asset-create/references/large-flat-file-handling.md +331 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/_envelope.json +54 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/_shared-widget-fields.json +122 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/add_page.json +29 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/delete_page.json +27 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/discard_dashboard.json +11 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/move_widget.json +30 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/move_widget_to_page.json +30 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/place_widget_on_page.json +30 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/remove_widget_from_dashboard.json +16 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/remove_widget_from_page.json +26 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/rename_page.json +28 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/save_dashboard.json +18 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/undo.json +11 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_button_widget.json +69 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_container_widget.json +88 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_filter_widget.json +146 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_metric_widget.json +78 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_navigation_widget.json +80 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_parameter_widget.json +160 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_text_widget.json +103 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_visualization_widget.json +68 -0
- package/skills/tableau-next-asset-create/references/sdm-tool-reference.md +721 -0
- package/skills/tableau-next-asset-create/references/semantic-query-and-enrichment.md +355 -0
- package/skills/tableau-next-asset-create/references/shared-gates.md +322 -0
- package/skills/tableau-next-asset-create/references/sharing-and-promotion.md +306 -0
- package/skills/tableau-next-asset-create/references/tasks/ai-readiness-audit.md +51 -0
- package/skills/tableau-next-asset-create/references/tasks/analyze-data.md +48 -0
- package/skills/tableau-next-asset-create/references/tasks/build-dashboard.md +66 -0
- package/skills/tableau-next-asset-create/references/tasks/build-end-to-end.md +73 -0
- package/skills/tableau-next-asset-create/references/tasks/create-data-transform.md +51 -0
- package/skills/tableau-next-asset-create/references/tasks/create-viz.md +58 -0
- package/skills/tableau-next-asset-create/references/tasks/edit-dashboard.md +80 -0
- package/skills/tableau-next-asset-create/references/tasks/edit-sdm.md +106 -0
- package/skills/tableau-next-asset-create/references/tasks/edit-viz.md +40 -0
- package/skills/tableau-next-asset-create/references/tasks/enrich-model.md +68 -0
- package/skills/tableau-next-asset-create/references/tasks/ingest-flat-file.md +68 -0
- package/skills/tableau-next-asset-create/references/tasks/manage-alert.md +35 -0
- package/skills/tableau-next-asset-create/references/tasks/profile-dataset.md +47 -0
- package/skills/tableau-next-asset-create/references/tasks/promote-or-reuse.md +46 -0
- package/skills/tableau-next-asset-create/references/tasks/provision-user.md +39 -0
- package/skills/tableau-next-asset-create/references/tasks/query-model.md +92 -0
- package/skills/tableau-next-asset-create/references/tasks/review-verified-questions.md +42 -0
- package/skills/tableau-next-asset-create/references/tasks/share-asset.md +37 -0
- package/skills/tableau-next-asset-create/references/verified-questions.md +125 -0
- package/skills/tableau-next-asset-create/references/viz-authoring.md +992 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-dangling-refs.sh +0 -42
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-hosting-target.sh +0 -26
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-1-complete.sh +0 -35
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-4-complete.sh +0 -47
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-6-ready.sh +0 -33
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-prerequisites.sh +0 -20
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-sfdx-project.sh +0 -15
- package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.sh +0 -30
- package/skills/experience-ui-bundle-frontend-generate/scripts/check-preconditions.sh +0 -37
- package/skills/experience-ui-bundle-frontend-generate/scripts/resolve-ui-bundle.sh +0 -66
- package/skills/experience-ui-bundle-frontend-generate/scripts/verify-rules.sh +0 -58
- package/skills/experience-ui-bundle-metadata-generate/scripts/check-api-version.sh +0 -30
- package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.sh +0 -73
- package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.sh +0 -118
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +0 -102
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
"""Run SKILL.md's "## Pipeline invocation" bash block under bash and zsh.
|
|
2
|
+
|
|
3
|
+
The block is the contract the agent executes verbatim, so these tests extract
|
|
4
|
+
it from SKILL.md (no copy to drift) and run it under ``env -i`` against:
|
|
5
|
+
|
|
6
|
+
* a stub SKILL_ROOT whose scripts/main.py records its argv, emit_result.py
|
|
7
|
+
prints a RESULT marker, and _shared/fs_guard.py always passes;
|
|
8
|
+
* a stub ``sf`` on PATH that answers ``config get target-org --json`` with a
|
|
9
|
+
canned payload (or fails).
|
|
10
|
+
|
|
11
|
+
Scenarios: ARGUMENTS unset with ARG_AGENT preset (default org used), flags in
|
|
12
|
+
ARGUMENTS, flags overriding preset ARG_*, nothing resolvable (usage, no
|
|
13
|
+
pipeline run), and SKILL_ROOT discovery when the scripts are staged under
|
|
14
|
+
``<candidate>/artifacts/`` (the ADK eval staging layout).
|
|
15
|
+
"""
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import json
|
|
19
|
+
import os
|
|
20
|
+
import re
|
|
21
|
+
import shutil
|
|
22
|
+
import stat
|
|
23
|
+
import subprocess
|
|
24
|
+
import sys
|
|
25
|
+
import tempfile
|
|
26
|
+
import unittest
|
|
27
|
+
from pathlib import Path
|
|
28
|
+
|
|
29
|
+
_SKILL_NAME = "agentforce-architecture-analyze"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _find_skill_md() -> Path:
|
|
33
|
+
# contributed-skills: <skill>/scripts/tests/ -> <skill>/SKILL.md
|
|
34
|
+
# outputs/unified-sors: <skill>/artifacts/scripts/tests/ -> <skill>/SKILL.md
|
|
35
|
+
for parent in Path(__file__).resolve().parents:
|
|
36
|
+
candidate = parent / "SKILL.md"
|
|
37
|
+
if candidate.is_file():
|
|
38
|
+
return candidate
|
|
39
|
+
raise FileNotFoundError("SKILL.md not found above " + __file__)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _extract_pipeline_block(skill_md: str) -> str:
|
|
43
|
+
section = skill_md.split("## Pipeline invocation", 1)[1]
|
|
44
|
+
match = re.search(r"```bash\n(.*?)\n```", section, re.S)
|
|
45
|
+
if match is None:
|
|
46
|
+
raise ValueError("no ```bash block under '## Pipeline invocation'")
|
|
47
|
+
return match.group(1) + "\n"
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _write_exec(path: Path, text: str) -> None:
|
|
51
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
52
|
+
path.write_text(text)
|
|
53
|
+
path.chmod(path.stat().st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
_RECORDER = """\
|
|
57
|
+
import json, os, sys
|
|
58
|
+
with open({record!r}, "a") as fh:
|
|
59
|
+
fh.write(json.dumps({{"script": {name!r}, "path": os.path.realpath(__file__),
|
|
60
|
+
"argv": sys.argv[1:]}}) + "\\n")
|
|
61
|
+
{tail}
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
_SF_STUB = """#!/bin/sh
|
|
65
|
+
# Canned `sf config get target-org --json`; behaviour chosen by SF_STUB_MODE.
|
|
66
|
+
if [ "$1 $2 $3" != "config get target-org" ]; then
|
|
67
|
+
echo "unexpected sf call: $*" >&2; exit 3
|
|
68
|
+
fi
|
|
69
|
+
case "${SF_STUB_MODE:-set}" in
|
|
70
|
+
set) cat <<'JSON'
|
|
71
|
+
{
|
|
72
|
+
"status": 0,
|
|
73
|
+
"result": [
|
|
74
|
+
{
|
|
75
|
+
"name": "target-org",
|
|
76
|
+
"location": "Local",
|
|
77
|
+
"value": "default-org",
|
|
78
|
+
"success": true
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"warnings": []
|
|
82
|
+
}
|
|
83
|
+
JSON
|
|
84
|
+
;;
|
|
85
|
+
unset) printf '%s\\n' '{"status":0,"result":[{"name":"target-org","success":true}],"warnings":[]}' ;;
|
|
86
|
+
fail) echo '{"status":1,"name":"Error"}'; exit 1 ;;
|
|
87
|
+
esac
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class PipelineBlockTest(unittest.TestCase):
|
|
92
|
+
SHELLS = [s for s in ("bash", "zsh") if shutil.which(s)]
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def setUpClass(cls) -> None:
|
|
96
|
+
cls.block = _extract_pipeline_block(_find_skill_md().read_text())
|
|
97
|
+
|
|
98
|
+
def setUp(self) -> None:
|
|
99
|
+
self.tmp = Path(tempfile.mkdtemp(prefix="arch-block-test-"))
|
|
100
|
+
self.addCleanup(shutil.rmtree, self.tmp, True)
|
|
101
|
+
self.record = self.tmp / "calls.jsonl"
|
|
102
|
+
self.root = self.tmp / "skill"
|
|
103
|
+
self._make_stub_scripts(self.root)
|
|
104
|
+
self.bin = self.tmp / "bin"
|
|
105
|
+
_write_exec(self.bin / "sf", _SF_STUB)
|
|
106
|
+
(self.bin / "python3").symlink_to(sys.executable)
|
|
107
|
+
self.script = self.tmp / "block.sh"
|
|
108
|
+
self.script.write_text(self.block)
|
|
109
|
+
self.home = self.tmp / "home"
|
|
110
|
+
self.home.mkdir()
|
|
111
|
+
|
|
112
|
+
# -- helpers ---------------------------------------------------------
|
|
113
|
+
|
|
114
|
+
def _make_stub_scripts(self, root: Path) -> Path:
|
|
115
|
+
"""Recorder stubs for main.py / emit_result.py / _shared/fs_guard.py
|
|
116
|
+
under ``root/scripts``; returns that scripts dir."""
|
|
117
|
+
scripts = root / "scripts"
|
|
118
|
+
(scripts / "_shared").mkdir(parents=True)
|
|
119
|
+
(scripts / "main.py").write_text(
|
|
120
|
+
_RECORDER.format(record=str(self.record), name="main", tail="")
|
|
121
|
+
)
|
|
122
|
+
(scripts / "emit_result.py").write_text(
|
|
123
|
+
_RECORDER.format(
|
|
124
|
+
record=str(self.record), name="emit",
|
|
125
|
+
tail='print("=== RESULT ===")',
|
|
126
|
+
)
|
|
127
|
+
)
|
|
128
|
+
(scripts / "_shared" / "fs_guard.py").write_text(
|
|
129
|
+
_RECORDER.format(record=str(self.record), name="fs_guard", tail="")
|
|
130
|
+
)
|
|
131
|
+
return scripts
|
|
132
|
+
|
|
133
|
+
def _run(self, shell: str, extra_env: dict[str, str], with_sf: bool = True,
|
|
134
|
+
skill_root: str | None = None):
|
|
135
|
+
if self.record.exists():
|
|
136
|
+
self.record.unlink()
|
|
137
|
+
bin_dir = self.bin
|
|
138
|
+
if not with_sf:
|
|
139
|
+
bin_dir = self.tmp / "bin-nosf"
|
|
140
|
+
bin_dir.mkdir(exist_ok=True)
|
|
141
|
+
if not (bin_dir / "python3").exists():
|
|
142
|
+
(bin_dir / "python3").symlink_to(sys.executable)
|
|
143
|
+
env = {
|
|
144
|
+
"PATH": f"{bin_dir}:/usr/bin:/bin",
|
|
145
|
+
"HOME": str(self.home),
|
|
146
|
+
**extra_env,
|
|
147
|
+
}
|
|
148
|
+
if skill_root is None:
|
|
149
|
+
env["SKILL_ROOT"] = str(self.root)
|
|
150
|
+
elif skill_root:
|
|
151
|
+
env["SKILL_ROOT"] = skill_root
|
|
152
|
+
# skill_root="" → SKILL_ROOT unset, so the install-root probe runs.
|
|
153
|
+
cmd = ["env", "-i", *(f"{k}={v}" for k, v in env.items()),
|
|
154
|
+
shell, str(self.script)]
|
|
155
|
+
proc = subprocess.run(cmd, capture_output=True, text=True, timeout=60)
|
|
156
|
+
calls = []
|
|
157
|
+
if self.record.exists():
|
|
158
|
+
calls = [json.loads(l) for l in self.record.read_text().splitlines()]
|
|
159
|
+
for call in calls:
|
|
160
|
+
if call["script"] == "main" and "--work-dir" in call["argv"]:
|
|
161
|
+
wd = call["argv"][call["argv"].index("--work-dir") + 1]
|
|
162
|
+
shutil.rmtree(wd, ignore_errors=True)
|
|
163
|
+
return proc, calls
|
|
164
|
+
|
|
165
|
+
def _main_argv(self, calls):
|
|
166
|
+
mains = [c["argv"] for c in calls if c["script"] == "main"]
|
|
167
|
+
self.assertEqual(len(mains), 1, calls)
|
|
168
|
+
return mains[0]
|
|
169
|
+
|
|
170
|
+
def _opt(self, argv, flag):
|
|
171
|
+
self.assertIn(flag, argv)
|
|
172
|
+
return argv[argv.index(flag) + 1]
|
|
173
|
+
|
|
174
|
+
# -- scenarios -------------------------------------------------------
|
|
175
|
+
|
|
176
|
+
def test_shells_available(self) -> None:
|
|
177
|
+
self.assertIn("bash", self.SHELLS)
|
|
178
|
+
|
|
179
|
+
def test_a_arguments_unset_preset_agent_uses_default_org(self) -> None:
|
|
180
|
+
for shell in self.SHELLS:
|
|
181
|
+
with self.subTest(shell=shell):
|
|
182
|
+
proc, calls = self._run(shell, {"ARG_AGENT": "Support_Agent"})
|
|
183
|
+
self.assertEqual(proc.returncode, 0, proc.stderr)
|
|
184
|
+
argv = self._main_argv(calls)
|
|
185
|
+
self.assertEqual(self._opt(argv, "--org-alias"), "default-org")
|
|
186
|
+
self.assertEqual(self._opt(argv, "--agent"), "Support_Agent")
|
|
187
|
+
self.assertTrue(proc.stdout.rstrip().endswith("=== RESULT ==="))
|
|
188
|
+
|
|
189
|
+
def test_b_flags_in_arguments(self) -> None:
|
|
190
|
+
for shell in self.SHELLS:
|
|
191
|
+
with self.subTest(shell=shell):
|
|
192
|
+
proc, calls = self._run(
|
|
193
|
+
shell, {"ARGUMENTS": "--org o1 --agent a1 --version=v3 --force"}
|
|
194
|
+
)
|
|
195
|
+
self.assertEqual(proc.returncode, 0, proc.stderr)
|
|
196
|
+
argv = self._main_argv(calls)
|
|
197
|
+
self.assertEqual(self._opt(argv, "--org-alias"), "o1")
|
|
198
|
+
self.assertEqual(self._opt(argv, "--agent"), "a1")
|
|
199
|
+
self.assertEqual(self._opt(argv, "--version"), "v3")
|
|
200
|
+
self.assertIn("--force", argv)
|
|
201
|
+
|
|
202
|
+
def test_c_flags_override_preset_env(self) -> None:
|
|
203
|
+
for shell in self.SHELLS:
|
|
204
|
+
with self.subTest(shell=shell):
|
|
205
|
+
proc, calls = self._run(shell, {
|
|
206
|
+
"ARGUMENTS": "document * the agent --org=o2 --agent a2",
|
|
207
|
+
"ARG_ORG": "env-org",
|
|
208
|
+
"ARG_AGENT": "EnvAgent",
|
|
209
|
+
})
|
|
210
|
+
self.assertEqual(proc.returncode, 0, proc.stderr)
|
|
211
|
+
argv = self._main_argv(calls)
|
|
212
|
+
self.assertEqual(self._opt(argv, "--org-alias"), "o2")
|
|
213
|
+
self.assertEqual(self._opt(argv, "--agent"), "a2")
|
|
214
|
+
|
|
215
|
+
def test_preset_org_skips_default_lookup(self) -> None:
|
|
216
|
+
for shell in self.SHELLS:
|
|
217
|
+
with self.subTest(shell=shell):
|
|
218
|
+
proc, calls = self._run(shell, {
|
|
219
|
+
"ARG_ORG": "env-org", "ARG_AGENT": "EnvAgent",
|
|
220
|
+
"SF_STUB_MODE": "fail",
|
|
221
|
+
})
|
|
222
|
+
self.assertEqual(proc.returncode, 0, proc.stderr)
|
|
223
|
+
argv = self._main_argv(calls)
|
|
224
|
+
self.assertEqual(self._opt(argv, "--org-alias"), "env-org")
|
|
225
|
+
|
|
226
|
+
def test_d_nothing_resolvable_prints_usage(self) -> None:
|
|
227
|
+
cases = [
|
|
228
|
+
("unset", {"SF_STUB_MODE": "unset"}, True),
|
|
229
|
+
("sf-fails", {"SF_STUB_MODE": "fail"}, True),
|
|
230
|
+
("no-sf", {}, False),
|
|
231
|
+
("agent-only-no-default", {"SF_STUB_MODE": "unset", "ARG_AGENT": "A"}, True),
|
|
232
|
+
]
|
|
233
|
+
for shell in self.SHELLS:
|
|
234
|
+
for label, env, with_sf in cases:
|
|
235
|
+
with self.subTest(shell=shell, case=label):
|
|
236
|
+
proc, calls = self._run(shell, env, with_sf=with_sf)
|
|
237
|
+
self.assertNotEqual(proc.returncode, 0)
|
|
238
|
+
self.assertIn("Which agent should I document", proc.stderr)
|
|
239
|
+
self.assertEqual(
|
|
240
|
+
[c for c in calls if c["script"] == "main"], []
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
# -- SKILL_ROOT discovery: ADK eval artifacts/ staging layout ----------
|
|
244
|
+
|
|
245
|
+
def _assert_all_from(self, calls, scripts_dir: Path) -> None:
|
|
246
|
+
"""main, emit_result and fs_guard all ran from ``scripts_dir``."""
|
|
247
|
+
real = scripts_dir.resolve()
|
|
248
|
+
self.assertEqual({c["script"] for c in calls}, {"main", "emit", "fs_guard"})
|
|
249
|
+
for call in calls:
|
|
250
|
+
self.assertTrue(
|
|
251
|
+
Path(call["path"]).is_relative_to(real), (call["path"], real)
|
|
252
|
+
)
|
|
253
|
+
|
|
254
|
+
def test_e_scripts_only_under_artifacts_of_exported_root(self) -> None:
|
|
255
|
+
staged = self.tmp / "staged" / _SKILL_NAME
|
|
256
|
+
scripts = self._make_stub_scripts(staged / "artifacts")
|
|
257
|
+
(staged / "SKILL.md").write_text("# staged\n")
|
|
258
|
+
for shell in self.SHELLS:
|
|
259
|
+
with self.subTest(shell=shell):
|
|
260
|
+
proc, calls = self._run(
|
|
261
|
+
shell, {"ARG_AGENT": "A", "ARG_ORG": "o"},
|
|
262
|
+
skill_root=str(staged),
|
|
263
|
+
)
|
|
264
|
+
self.assertEqual(proc.returncode, 0, proc.stderr)
|
|
265
|
+
self._assert_all_from(calls, scripts)
|
|
266
|
+
self._main_argv(calls)
|
|
267
|
+
|
|
268
|
+
def test_f_artifacts_found_via_install_root_probe(self) -> None:
|
|
269
|
+
# SKILL_ROOT unset: the candidate comes from the $HOME/.claude/skills probe.
|
|
270
|
+
staged = self.home / ".claude" / "skills" / _SKILL_NAME
|
|
271
|
+
scripts = self._make_stub_scripts(staged / "artifacts")
|
|
272
|
+
for shell in self.SHELLS:
|
|
273
|
+
with self.subTest(shell=shell):
|
|
274
|
+
proc, calls = self._run(
|
|
275
|
+
shell, {"ARG_AGENT": "A", "ARG_ORG": "o"}, skill_root="",
|
|
276
|
+
)
|
|
277
|
+
self.assertEqual(proc.returncode, 0, proc.stderr)
|
|
278
|
+
self._assert_all_from(calls, scripts)
|
|
279
|
+
|
|
280
|
+
def test_g_candidate_root_preferred_over_its_artifacts(self) -> None:
|
|
281
|
+
root_scripts = self.root / "scripts"
|
|
282
|
+
self._make_stub_scripts(self.root / "artifacts")
|
|
283
|
+
for shell in self.SHELLS:
|
|
284
|
+
with self.subTest(shell=shell):
|
|
285
|
+
proc, calls = self._run(shell, {"ARG_AGENT": "A", "ARG_ORG": "o"})
|
|
286
|
+
self.assertEqual(proc.returncode, 0, proc.stderr)
|
|
287
|
+
self._assert_all_from(calls, root_scripts)
|
|
288
|
+
|
|
289
|
+
def test_h_earlier_candidate_artifacts_beats_later_candidate_root(self) -> None:
|
|
290
|
+
# Candidate order is unchanged: exported SKILL_ROOT (artifacts layout)
|
|
291
|
+
# wins over a later install root that has scripts/ at its top level.
|
|
292
|
+
staged = self.tmp / "staged" / _SKILL_NAME
|
|
293
|
+
scripts = self._make_stub_scripts(staged / "artifacts")
|
|
294
|
+
self._make_stub_scripts(self.home / ".claude" / "skills" / _SKILL_NAME)
|
|
295
|
+
for shell in self.SHELLS:
|
|
296
|
+
with self.subTest(shell=shell):
|
|
297
|
+
proc, calls = self._run(
|
|
298
|
+
shell, {"ARG_AGENT": "A", "ARG_ORG": "o"},
|
|
299
|
+
skill_root=str(staged),
|
|
300
|
+
)
|
|
301
|
+
self.assertEqual(proc.returncode, 0, proc.stderr)
|
|
302
|
+
self._assert_all_from(calls, scripts)
|
|
303
|
+
|
|
304
|
+
def test_i_no_scripts_anywhere_reports_guard_message(self) -> None:
|
|
305
|
+
empty = self.tmp / "empty" / _SKILL_NAME
|
|
306
|
+
(empty / "artifacts").mkdir(parents=True)
|
|
307
|
+
for shell in self.SHELLS:
|
|
308
|
+
with self.subTest(shell=shell):
|
|
309
|
+
proc, calls = self._run(
|
|
310
|
+
shell, {"ARG_AGENT": "A", "ARG_ORG": "o"},
|
|
311
|
+
skill_root=str(empty),
|
|
312
|
+
)
|
|
313
|
+
self.assertEqual(proc.returncode, 1)
|
|
314
|
+
self.assertIn(f"{_SKILL_NAME}: scripts not found", proc.stderr)
|
|
315
|
+
self.assertEqual(calls, [])
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
if __name__ == "__main__":
|
|
319
|
+
unittest.main()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentforce-bot-upgrade
|
|
3
|
-
description: "Use this skill to Upgrade Einstein Bots into Agentforce agents end-to-end in a single pass, orchestrating per-bot Agent Spec generation, planner reconciliation across bots, agentforce-generate authoring, and post-conversion .agent enhancements. TRIGGER when: user asks to migrate, upgrade, or convert one or more Einstein Bots to Agentforce; runs a multi-bot bot-to-agent upgrade; needs Einstein Bot metadata turned into Agent Spec handoffs and generated .agent agents; convert bots to agents; upgrade my service bots; move bots to Agentforce. DO NOT TRIGGER when: user already has an approved Agent Spec and only wants direct .agent authoring, deploy, test, or observe flows; the request is unrelated to Einstein Bot migration."
|
|
3
|
+
description: "Use this skill to Upgrade Einstein Bots into Agentforce agents end-to-end in a single pass, orchestrating per-bot Agent Spec generation, planner reconciliation across bots, agentforce-generate authoring, and post-conversion .agent enhancements. TRIGGER when: user asks to migrate, upgrade, or convert one or more Einstein Bots (BotDefinition/BotVersion chatbots) to Agentforce agents; runs a multi-bot bot-to-agent upgrade; needs Einstein Bot metadata turned into Agent Spec handoffs and generated .agent agents; convert bots to agents; upgrade my service bots; move bots to Agentforce. DO NOT TRIGGER when: user already has an approved Agent Spec and only wants direct .agent authoring, deploy, test, or observe flows; user wants to migrate or upgrade an EXISTING Agentforce agent from a legacy GenAiPlannerBundle to an NGA aiAuthoringBundle (that is agentforce-generate's 'Migrate a Legacy Agent to Agent Script' flow, not an Einstein Bot upgrade); the request is unrelated to Einstein Bot migration."
|
|
4
4
|
argument-hint: "[--mode <online|offline>] [--org-alias <org-alias> --bots <bot1:v1,bot2:v2,...> | --offline-dir <offline-dir> [--bots <bot1,bot2,...>]] [--interactive <true|false>]"
|
|
5
5
|
metadata:
|
|
6
6
|
version: "1.0"
|
|
@@ -25,6 +25,8 @@ Run a multi-bot upgrade-and-handoff cycle:
|
|
|
25
25
|
4. `/agentforce-generate` per Agent Spec (parallelizable)
|
|
26
26
|
5. Post-conversion enhancement pass per generated Agent Script (parallelizable)
|
|
27
27
|
|
|
28
|
+
**Scope — this skill only converts Einstein Bots** (`BotDefinition`/`BotVersion` chatbots) into new Agentforce agents. It does NOT migrate an existing Agentforce agent from a legacy `GenAiPlannerBundle` to an NGA `aiAuthoringBundle` — for that, use the **agentforce-generate** skill's "Migrate a Legacy Agent to Agent Script" flow.
|
|
29
|
+
|
|
28
30
|
## Inputs
|
|
29
31
|
|
|
30
32
|
Inputs:
|
|
@@ -48,13 +48,27 @@ Artifacts always land under `~/.vibe/data/agentforce-d360-analyze/<org_id15>/<ag
|
|
|
48
48
|
|
|
49
49
|
## Resolving the script prefix
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
skill
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
`<SKILL_DIR>` = the absolute path to **this skill's own directory** (the folder holding this
|
|
52
|
+
`SKILL.md`); resolve it from the skill path in context and substitute it below. Runtimes
|
|
53
|
+
install skills in different places (`~/.claude/skills/`, `~/.vibe/skills/`, a plugin cache, a
|
|
54
|
+
project `.claude/skills/`), so the block also probes the known install roots at runtime and
|
|
55
|
+
uses the first that actually contains this skill's scripts. An exported `SKILL_ROOT` wins.
|
|
55
56
|
|
|
56
57
|
```bash
|
|
57
|
-
|
|
58
|
+
_skill=agentforce-d360-analyze
|
|
59
|
+
for _c in "${SKILL_ROOT:-}" "<SKILL_DIR>" \
|
|
60
|
+
"${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT/skills/$_skill}" \
|
|
61
|
+
"${VIBES_SKILLS_DIR:+$VIBES_SKILLS_DIR/$_skill}" \
|
|
62
|
+
"$HOME/.claude/skills/$_skill" "$PWD/.claude/skills/$_skill" \
|
|
63
|
+
"${PLUGIN_ROOT:-$HOME/.vibe/skills}/$_skill"; do
|
|
64
|
+
[ -n "$_c" ] || continue
|
|
65
|
+
# Some stagers (ADK eval) nest the bundled files under <skill>/artifacts/.
|
|
66
|
+
for _r in "$_c" "$_c/artifacts"; do
|
|
67
|
+
[ -f "$_r/scripts/fetch_dc.py" ] && { SKILL_ROOT="$_r"; break 2; }
|
|
68
|
+
done
|
|
69
|
+
done
|
|
70
|
+
[ -f "${SKILL_ROOT:-}/scripts/fetch_dc.py" ] || { echo "$_skill: scripts not found — set SKILL_ROOT to this skill's directory" >&2; exit 1; }
|
|
71
|
+
prefix="$SKILL_ROOT/scripts"
|
|
58
72
|
```
|
|
59
73
|
|
|
60
74
|
Every subsequent invocation in this doc uses `"$prefix/..."`.
|
|
@@ -64,10 +78,12 @@ Every subsequent invocation in this doc uses `"$prefix/..."`.
|
|
|
64
78
|
When the user doesn't have a session id, run `discover_sessions.py` against the STDM session DMO. Prints a numbered picker; user picks one; proceed with the chosen UUID.
|
|
65
79
|
|
|
66
80
|
```bash
|
|
67
|
-
python3 "$prefix/discover_sessions.py" --org <alias> [filters...]
|
|
81
|
+
python3 "$prefix/discover_sessions.py" [--org <alias>] [filters...]
|
|
68
82
|
```
|
|
69
83
|
|
|
70
|
-
|
|
84
|
+
**`--org` is optional.** "My org", "our org", or no alias at all means the sf CLI default target org — omit `--org` and the script uses `sf config get target-org`. Pass `--org <alias>` only when the user names an alias. If no default is set the script exits with "no --org given and no default target org set"; relay its `sf config set target-org <alias>` hint and ask the user for an alias.
|
|
85
|
+
|
|
86
|
+
**Filters** (all optional): `--since <expr>` (default last 24h; accepts "last 2 hours", "today", ISO dates), `--agent <api-name>`, `--channel <Messaging|Builder|Voice>`, `--outcome <USER_ENDED|ESCALATED|TRANSFERRED|TIMEOUT|NOT_SET>`, `--grep <substring>` (conversation text), `--tz <IANA>`, `--limit <N>` (default 20).
|
|
71
87
|
|
|
72
88
|
**Output**: markdown table with `#`, `UUID`, `Start (UTC)`, `Agent`, `Channel`, `Duration`, `Outcome`. User replies with a number; proceed with that UUID.
|
|
73
89
|
|
|
@@ -79,14 +95,16 @@ assemble_dc.py → dc._session_tree.json (pure in-
|
|
|
79
95
|
render_dc.py → dc._session_summary.md (human summary, multi-section)
|
|
80
96
|
```
|
|
81
97
|
|
|
82
|
-
Each stage is independently runnable. `fetch_dc.py --session <sid> --org <alias
|
|
98
|
+
Each stage is independently runnable. `fetch_dc.py --session <sid> [--org <alias>]` chains all three by default.
|
|
83
99
|
|
|
84
100
|
### Invocation
|
|
85
101
|
|
|
86
102
|
```bash
|
|
87
|
-
python3 "$prefix/fetch_dc.py" --session <session-id-or-messaging-id> --org <alias>
|
|
103
|
+
python3 "$prefix/fetch_dc.py" --session <session-id-or-messaging-id> [--org <alias>]
|
|
88
104
|
```
|
|
89
105
|
|
|
106
|
+
`--org` is optional here too: without it (the user said "my org" or named no alias) the CLI default target org is used. With no default set, `fetch_dc.py` reports `DC_ACCESS_DENIED` with reason `no_org` (exit 10 when headless) — ask the user for an alias and re-run with `--org <alias>`.
|
|
107
|
+
|
|
90
108
|
Flags: `--verbose` for per-DMO row counts; `--no-assemble` / `--no-render` to stop early. All entry scripts (`fetch_dc.py`, `assemble_dc.py`, `render_dc.py`, `resolve_session.py`, `discover_sessions.py`) accept `--data-dir <path>` and `--cache-dir <path>` to override the default `~/.vibe/{data,cache}/agentforce-d360-analyze/` roots — pass these when the host runtime needs artifacts under a different distribution layout.
|
|
91
109
|
|
|
92
110
|
### Output artifacts
|
|
@@ -134,7 +152,7 @@ If the user's question is about *why a particular topic or action was or wasn't
|
|
|
134
152
|
|
|
135
153
|
| Tool | Required |
|
|
136
154
|
|---|---|
|
|
137
|
-
| `sf` CLI (authenticated against the target org) | yes — `sf org login web --alias <alias
|
|
155
|
+
| `sf` CLI (authenticated against the target org) | yes — `sf org login web --alias <alias>`, and the CLI must provide `sf org auth show-access-token` (startup preflight enforces this) |
|
|
138
156
|
| Data Cloud enabled on the target org | yes — the STDM + GenAI DMOs must have materialized for the session |
|
|
139
157
|
| Python 3.10+ | yes — pipeline scripts |
|
|
140
158
|
|