forcedotcom/sf-skills / plugins/builder/service-omni/skills/service-omni-supervisor-surface-deploy
service-omni-supervisor-surface-deploy
VerifiedUse to populate the Omni-Channel Supervisor action + tab surface on an existing OmniSupervisorConfig by inserting the standard OmniSupervisorConfigAction and OmniSupervisorConfigTab companion rows via the Data API, idempotent (inserts only the missing types). Requires an OmniSupervisorConfig from service-omni-supervisor-config-deploy. Triggers: give the supervisor the standard action buttons and tabs, add Wallboard/Agents/Queues tabs to Omni Supervisor, configure supervisor actions like Change Queues/Skills. Do not use to create the supervisor configuration itself, create supervisor users, assign the supervisor permission set, or add custom-action / FlexiPage / AWS-dashboard / AI-agent surfaces (those need an external reference and must be set up in Setup).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.9 KB |
| references/api-notes.md | markdown | 3.2 KB |
| scripts/deploy-and-report.shexecutable | script | 12.1 KB |
| scripts/tests/_bootstrap.py | script | 4.0 KB |
| scripts/tests/test_supervisor_surface_contracts.pyexecutable | script | 6.0 KB |
scripts/tests/test_supervisor_surface_contracts.py
View on GitHub#!/usr/bin/env python3
"""Contract tests for service-omni-supervisor-surface-deploy/scripts/deploy-and-report.sh."""
from __future__ import annotations
import json
import sys
import unittest
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent))
from _bootstrap import FakeSf, _FAKE_SF, run # noqa: E402
def _last_json(out: str) -> dict:
dec = json.JSONDecoder()
obj, i, n = None, 0, len(out)
while i < n:
if out[i] in "{[":
try:
cand, end = dec.raw_decode(out, i)
if isinstance(cand, dict):
obj = cand
i = end
continue
except json.JSONDecodeError:
pass
i += 1
assert obj is not None, f"no JSON object found in output:\n{out}"
return obj
def _detect(env=None, args=("org",)):
with FakeSf(_FAKE_SF) as p:
return run(list(args), path_prefix=p, extra_env=env or {})
class InputContractTests(unittest.TestCase):
def test_missing_args_rejected(self):
rc, out = run([], scrub_sf=True)
self.assertEqual(rc, 1, out)
self.assertIn("Usage", out)
def test_bad_config_name_rejected(self):
rc, out = run(["org", "1badname"], scrub_sf=True)
self.assertEqual(rc, 1, out)
self.assertIn("Invalid config_developer_name", out)
def test_reference_required_action_blocked(self):
rc, out = _detect({"SUPERVISOR_ACTIONS": "AllAgents.CustomAction"})
self.assertEqual(rc, 1, out)
v = _last_json(out)
self.assertEqual(v["status"], "blocked", out)
self.assertIn("external reference", v["blocking_issue"], out)
def test_reference_required_tab_blocked(self):
rc, out = _detect({"SUPERVISOR_TABS": "FlexipageType"})
self.assertEqual(rc, 1, out)
v = _last_json(out)
self.assertEqual(v["status"], "blocked", out)
def test_unsupported_type_blocked(self):
rc, out = _detect({"SUPERVISOR_TABS": "NotARealTab"})
self.assertEqual(rc, 1, out)
v = _last_json(out)
self.assertEqual(v["status"], "blocked", out)
self.assertIn("Unsupported tab type", v["blocking_issue"], out)
class SafetyAndResolutionTests(unittest.TestCase):
def test_production_org_blocked(self):
rc, out = _detect({"FAKE_SANDBOX": "false"})
self.assertEqual(rc, 1, out)
v = _last_json(out)
self.assertEqual(v["status"], "blocked", out)
self.assertIn("production", v["blocking_issue"], out)
def test_no_config_blocks_with_pointer(self):
rc, out = _detect({"FAKE_CFG_COUNT": "0"})
self.assertEqual(rc, 1, out)
v = _last_json(out)
self.assertEqual(v["status"], "blocked", out)
self.assertTrue(any(a.get("target_skill") == "service-omni-supervisor-config-deploy"
for a in v["manual_actions"]), out)
def test_multiple_configs_without_name_blocks(self):
rc, out = _detect({"FAKE_CFG_COUNT": "2"})
self.assertEqual(rc, 1, out)
v = _last_json(out)
self.assertEqual(v["status"], "blocked", out)
self.assertIn("Multiple", v["blocking_issue"], out)
class StateModelTests(unittest.TestCase):
def test_created_on_empty_surface(self):
rc, out = _detect({"FAKE_EXIST_ACTIONS": "[]", "FAKE_EXIST_TABS": "[]"})
self.assertEqual(rc, 0, out)
v = _last_json(out)
self.assertEqual(v["status"], "created", out)
self.assertEqual(len(v["actions"]["created"]), 5, out)
self.assertEqual(len(v["tabs"]["created"]), 5, out)
self.assertEqual(v["actions"]["reused"], [], out)
def test_reused_when_all_present(self):
acts = json.dumps(["AllAgents.ChangeQueues", "AllAgents.ChangeSkills",
"AllAgents.ChangeGroups", "AllAgents.AssignLearning",
"QueuesBacklog.ManageQueues"])
tabs = json.dumps(["Wallboard", "Agents", "QueuesBacklog", "AssignedWork", "SkillsBacklog"])
rc, out = _detect({"FAKE_EXIST_ACTIONS": acts, "FAKE_EXIST_TABS": tabs})
self.assertEqual(rc, 0, out)
v = _last_json(out)
self.assertEqual(v["status"], "reused", out)
self.assertEqual(v["actions"]["created"], [], out)
self.assertEqual(v["tabs"]["created"], [], out)
def test_partial_diff_inserts_only_missing(self):
rc, out = _detect({
"FAKE_EXIST_ACTIONS": json.dumps(["AllAgents.ChangeQueues"]),
"FAKE_EXIST_TABS": json.dumps(["Wallboard"]),
})
self.assertEqual(rc, 0, out)
v = _last_json(out)
self.assertEqual(v["status"], "created", out)
self.assertIn("AllAgents.ChangeQueues", v["actions"]["reused"], out)
self.assertNotIn("AllAgents.ChangeQueues", v["actions"]["created"], out)
self.assertEqual(len(v["actions"]["created"]), 4, out)
self.assertEqual(len(v["tabs"]["created"]), 4, out)
def test_plan_only_makes_no_writes(self):
rc, out = _detect({"PLAN_ONLY": "1"})
self.assertEqual(rc, 0, out)
v = _last_json(out)
self.assertEqual(v["status"], "action_needed", out)
self.assertTrue(v["plan_mode"], out)
self.assertEqual(v["actions"]["created"], [], out)
def test_insert_failure_blocks(self):
rc, out = _detect({"FAKE_CREATE_OK": "false"})
self.assertEqual(rc, 1, out)
v = _last_json(out)
self.assertEqual(v["status"], "blocked", out)
self.assertIn("Failed to insert", v["blocking_issue"], out)
def test_custom_tab_set_honored(self):
rc, out = _detect({"SUPERVISOR_TABS": "Wallboard,Reports,Alerts",
"SUPERVISOR_ACTIONS": "AllAgents.ChangeQueues"})
self.assertEqual(rc, 0, out)
v = _last_json(out)
self.assertEqual(v["status"], "created", out)
self.assertEqual(sorted(v["tabs"]["created"]), ["Alerts", "Reports", "Wallboard"], out)
self.assertEqual(v["actions"]["created"], ["AllAgents.ChangeQueues"], out)
if __name__ == "__main__":
unittest.main(verbosity=2)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |