@salesforce/afv-skills 1.44.0 → 1.46.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.
Files changed (109) hide show
  1. package/package.json +1 -1
  2. package/skills/automation-flow-generate/SKILL.md +11 -5
  3. package/skills/consumer-goods-rtr-datacloud-export-configure/SKILL.md +72 -0
  4. package/skills/consumer-goods-rtr-datacloud-export-configure/references/inputs-and-namespace.md +38 -0
  5. package/skills/consumer-goods-rtr-datacloud-export-configure/references/procedure.md +158 -0
  6. package/skills/consumer-goods-rtr-datacloud-export-configure/scripts/detect-namespace.js +86 -0
  7. package/skills/consumer-goods-rtr-datacloud-export-configure/scripts/render-apex.js +64 -0
  8. package/skills/consumer-goods-rtr-datacloud-export-configure/scripts/resolve-id-by-name.js +47 -0
  9. package/skills/consumer-goods-rtr-datacloud-export-configure/scripts/sf-rest.js +171 -0
  10. package/skills/consumer-goods-rtr-datacloud-export-configure/scripts/soql-escape.js +26 -0
  11. package/skills/consumer-goods-rtr-datacloud-export-configure/scripts/upsert-report-config.apex +51 -0
  12. package/skills/consumer-goods-rtr-datacloud-export-configure/scripts/upsert-system-setting.apex +21 -0
  13. package/skills/consumer-goods-tpe-dashboard-configure/SKILL.md +74 -0
  14. package/skills/consumer-goods-tpe-dashboard-configure/references/phases-1-6.md +112 -0
  15. package/skills/consumer-goods-tpe-dashboard-configure/references/phases-7-12.md +157 -0
  16. package/skills/consumer-goods-tpe-dashboard-configure/scripts/find-failure-reason.js +132 -0
  17. package/skills/consumer-goods-tpe-dashboard-configure/scripts/poll-status.js +116 -0
  18. package/skills/consumer-goods-tpe-dashboard-configure/scripts/render-apex.js +64 -0
  19. package/skills/consumer-goods-tpe-dashboard-configure/scripts/run-data-transform.js +121 -0
  20. package/skills/consumer-goods-tpe-dashboard-configure/scripts/schedule-business-period-export.apex +27 -0
  21. package/skills/consumer-goods-tpe-dashboard-configure/scripts/sf-rest.js +171 -0
  22. package/skills/consumer-goods-tpe-dashboard-configure/scripts/soql-escape.js +25 -0
  23. package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/SKILL.md +141 -0
  24. package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/references/payload-shapes.md +447 -0
  25. package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/references/procedure.md +263 -0
  26. package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/scripts/clone-tpe-dashboards.js +537 -0
  27. package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/scripts/sf-rest.js +195 -0
  28. package/skills/consumer-goods-tpe-datakit-deploy/SKILL.md +157 -0
  29. package/skills/consumer-goods-tpe-datakit-deploy/scripts/detect-namespace.js +86 -0
  30. package/skills/consumer-goods-tpe-datakit-deploy/scripts/download-static-resource.js +151 -0
  31. package/skills/consumer-goods-tpe-datakit-deploy/scripts/extract-crm-field-permissions.js +115 -0
  32. package/skills/consumer-goods-tpe-datakit-deploy/scripts/sf-rest.js +109 -0
  33. package/skills/consumer-goods-tpe-datakit-deploy/scripts/update-field-permissions.js +433 -0
  34. package/skills/dx-code-analyzer-configure/scripts/validate-config.sh +14 -10
  35. package/skills/dx-code-analyzer-run/scripts/apply-fixes.js +45 -4
  36. package/skills/dx-code-analyzer-run/scripts/describe-rule.js +52 -32
  37. package/skills/platform-apex-logs-debug/SKILL.md +7 -7
  38. package/skills/platform-custom-application-generate/SKILL.md +4 -4
  39. package/skills/platform-custom-object-generate/SKILL.md +7 -7
  40. package/skills/platform-custom-tab-generate/SKILL.md +1 -1
  41. package/skills/platform-flexipage-generate/SKILL.md +4 -0
  42. package/skills/platform-list-view-generate/SKILL.md +1 -0
  43. package/skills/platform-soql-query/SKILL.md +8 -8
  44. package/skills/platform-value-set-generate/SKILL.md +2 -2
  45. package/skills/service-catalog-template-coordinate/SKILL.md +263 -0
  46. package/skills/service-catalog-template-coordinate/examples/output-templates.md +44 -0
  47. package/skills/service-catalog-template-coordinate/references/mcp-invocation.md +183 -0
  48. package/skills/service-catalog-template-coordinate/references/operations.md +230 -0
  49. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +243 -0
  50. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/references/cli-invocation.md +205 -0
  51. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/references/helper-contracts.md +236 -0
  52. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/references/permset-topology.md +132 -0
  53. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/scripts/classify-activated-agents.mjs +106 -0
  54. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/scripts/classify-agent-access-state.mjs +113 -0
  55. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/scripts/classify-assignment-state.mjs +99 -0
  56. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/scripts/classify-platform-permset-availability.mjs +155 -0
  57. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/scripts/gate-unified-catalog-tiers.mjs +100 -0
  58. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/scripts/rank-candidate-users.mjs +95 -0
  59. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/scripts/resolve-target-user.mjs +86 -0
  60. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +44 -23
  61. package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +33 -9
  62. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +17 -18
  63. package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +3 -1
  64. package/skills/service-itsm-agentic-setup-configure/SKILL.md +20 -12
  65. package/skills/service-itsm-agentic-setup-configure/examples/output-templates.md +73 -5
  66. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +8 -7
  67. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/cli-invocation.md +45 -33
  68. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/reactivation.md +8 -6
  69. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/workflow-detail.md +10 -10
  70. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/classify-agent-existence.mjs +114 -56
  71. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/classify-preflight.mjs +33 -17
  72. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +9 -3
  73. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +8 -7
  74. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/cli-invocation.md +43 -32
  75. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/reactivation.md +6 -4
  76. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/workflow-detail.md +10 -10
  77. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-agent-existence.mjs +106 -55
  78. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-preflight.mjs +27 -13
  79. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +9 -3
  80. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +159 -161
  81. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone-action.json +51 -0
  82. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone.json +1 -1
  83. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +120 -0
  84. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +28 -5
  85. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +19 -1
  86. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +350 -30
  87. package/skills/service-itsm-channels-coordinate/SKILL.md +80 -213
  88. package/skills/service-itsm-slack-itservice-configure/SKILL.md +363 -0
  89. package/skills/service-itsm-slack-itservice-configure/references/connect-agentforce-to-slack.md +159 -0
  90. package/skills/service-itsm-slack-itservice-configure/references/manage-slack-connection.md +88 -0
  91. package/skills/service-itsm-slack-itservice-configure/references/manage-user-access.md +117 -0
  92. package/skills/service-itsm-slack-itservice-configure/references/record-visibility.md +78 -0
  93. package/skills/service-itsm-slack-itservice-configure/references/site-membership-verification.md +126 -0
  94. package/skills/service-itsm-slack-itservice-configure/scripts/classify-user-access.mjs +167 -0
  95. package/skills/service-itsm-teams-configure/SKILL.md +50 -47
  96. package/skills/service-itsm-teams-configure/references/azure-credential-population.md +42 -28
  97. package/skills/service-itsm-teams-configure/references/gotchas.md +1 -2
  98. package/skills/service-itsm-teams-coordinate/SKILL.md +22 -18
  99. package/skills/service-itsm-teams-coordinate/examples/output-templates.md +12 -9
  100. package/skills/service-itsm-teams-itdesk-configure/SKILL.md +60 -44
  101. package/skills/service-itsm-teams-itservice-configure/SKILL.md +56 -70
  102. package/skills/service-catalog-template-deploy/SKILL.md +0 -310
  103. package/skills/service-catalog-template-deploy/references/cli-invocation.md +0 -258
  104. package/skills/service-catalog-template-deploy/scripts/activate-verify.mjs +0 -164
  105. package/skills/service-catalog-template-deploy/scripts/build-deploy-payload.mjs +0 -94
  106. package/skills/service-catalog-template-deploy/scripts/resolve-template.mjs +0 -331
  107. package/skills/service-catalog-template-search/SKILL.md +0 -212
  108. package/skills/service-catalog-template-search/references/cli-invocation.md +0 -128
  109. package/skills/service-catalog-template-search/scripts/classify-catalog.mjs +0 -205
@@ -1,205 +0,0 @@
1
- #!/usr/bin/env node
2
- // Deterministic catalog fetch-outcome classifier (authoring standard A9).
3
- //
4
- // Parsing the get-all-templates GET output — reading the HTTP status, telling
5
- // 200 / 403 (FUNCTIONALITY_NOT_ENABLED) / 404 (NOT_FOUND) / empty apart, and
6
- // extracting the template array — is a FIXED algorithm. Leaving it in prose
7
- // invites inconsistent status handling and (worse) fabricating a catalog when
8
- // the read failed. This script returns a structured outcome; the read-only
9
- // skill runs only the GET and reports what this classifier says. It performs
10
- // NO writes and NO self-heal (that is the deploy skill's job).
11
- //
12
- // Usage:
13
- // node classify-catalog.mjs <get-i-output.json>
14
- //
15
- // <get-i-output.json> is a FILE PATH holding the raw stdout of:
16
- // sf api request rest '.../service-process/get-all-templates' --method GET -i --target-org <alias>
17
- //
18
- // Prints { httpStatus, access, catalogFetched, outcome, count, templates } to
19
- // stdout. `templates` is the parsed array (for ranking) on the 200 branch, [] otherwise.
20
- // Exit 0 whenever the input was readable; exit 2 on bad args / unreadable input.
21
-
22
- import { readFileSync, writeSync } from 'node:fs';
23
-
24
- const [inputPath] = process.argv.slice(2);
25
- if (!inputPath) {
26
- process.stderr.write('usage: node classify-catalog.mjs <get-i-output.json>\n');
27
- process.exit(2);
28
- }
29
-
30
- let raw;
31
- try {
32
- raw = readFileSync(inputPath, 'utf8');
33
- } catch {
34
- process.stderr.write(`classify-catalog: cannot read ${inputPath}\n`);
35
- process.exit(2);
36
- }
37
-
38
- const clean = raw.replace(/\x1b\[[0-9;]*m/g, '');
39
- const statusMatch = clean.match(/^HTTP\/[\d.]+\s+(\d{3})/m);
40
- const httpStatus = statusMatch ? parseInt(statusMatch[1], 10) : null;
41
-
42
- function extractBody(text) {
43
- const idx = text.search(/^[[{]/m);
44
- return idx === -1 ? '' : text.slice(idx);
45
- }
46
-
47
- // The live catalog embeds raw control chars inside description strings, which
48
- // spec-compliant JSON.parse rejects — escape bare control chars inside string
49
- // literals before a fallback parse.
50
- function sanitizeControlChars(text) {
51
- let out = '';
52
- let inString = false;
53
- let escaped = false;
54
- for (const ch of text) {
55
- const code = ch.charCodeAt(0);
56
- if (inString) {
57
- if (escaped) { out += ch; escaped = false; continue; }
58
- if (ch === '\\') { out += ch; escaped = true; continue; }
59
- if (ch === '"') { out += ch; inString = false; continue; }
60
- if (code < 0x20) { out += '\\u' + code.toString(16).padStart(4, '0'); continue; }
61
- out += ch;
62
- } else {
63
- if (ch === '"') inString = true;
64
- out += ch;
65
- }
66
- }
67
- return out;
68
- }
69
-
70
- function parseBody(text) {
71
- const body = extractBody(text);
72
- if (!body) return null;
73
- try {
74
- return JSON.parse(body);
75
- } catch {
76
- try {
77
- return JSON.parse(sanitizeControlChars(body));
78
- } catch {
79
- return null;
80
- }
81
- }
82
- }
83
-
84
- function emit(obj) {
85
- // Synchronous write to fd 1 — a plain process.stdout.write() followed by
86
- // process.exit(0) truncates large payloads (the OK branch carries all ~144
87
- // templates, > 64KB) because exit races the async pipe drain.
88
- writeSync(1, JSON.stringify(obj, null, 2) + '\n');
89
- process.exit(0);
90
- }
91
-
92
- const isFunctionalityNotEnabled = /FUNCTIONALITY_NOT_ENABLED/.test(clean);
93
- const isNotFound = /NOT_FOUND/.test(clean);
94
- const parsed = parseBody(clean);
95
-
96
- if (httpStatus === 403 || (httpStatus === null && isFunctionalityNotEnabled && !parsed)) {
97
- emit({
98
- httpStatus,
99
- access: false,
100
- catalogFetched: false,
101
- outcome: 'NO_ACCESS',
102
- count: 0,
103
- templates: [],
104
- note: 'Current user lacks Unified Catalog access (403 FUNCTIONALITY_NOT_ENABLED). Read-only skill: report the remediation (assign UnifiedCatalogAdminPsl + UnifiedCatalogAdmin) and stop. Do NOT fabricate a catalog.',
105
- });
106
- }
107
-
108
- if (httpStatus === 404 || (isNotFound && !parsed)) {
109
- emit({
110
- httpStatus,
111
- access: false,
112
- catalogFetched: false,
113
- outcome: 'ROUTE_UNAVAILABLE',
114
- count: 0,
115
- templates: [],
116
- note: 'Route below its minimum API version (needs v65.0+; this skill targets v67.0). Report and stop.',
117
- });
118
- }
119
-
120
- // ---- any other explicit non-200 status (401 / 429 / 500 / 502 / …) ----------
121
- // A parseable JSON error body (Salesforce errors are `[{errorCode,message}]`)
122
- // must NOT be reported as an empty catalog: an outage/auth/rate-limit failure is
123
- // a real error, not "no templates exist". 403/404 are handled above; a null
124
- // status (caller omitted -i) still falls through to body-shape detection.
125
- if (httpStatus !== null && httpStatus !== 200) {
126
- emit({
127
- httpStatus,
128
- access: false,
129
- catalogFetched: false,
130
- outcome: 'UNAVAILABLE',
131
- count: 0,
132
- templates: [],
133
- note: `Catalog GET returned HTTP ${httpStatus} — an API, auth, or transport failure, not an empty catalog. Report the failure and stop; do not tell the user there are no templates.`,
134
- });
135
- }
136
-
137
- if (!parsed) {
138
- emit({
139
- httpStatus,
140
- access: httpStatus === 200,
141
- catalogFetched: false,
142
- outcome: 'UNPARSEABLE',
143
- count: 0,
144
- templates: [],
145
- note: 'Could not parse a catalog body from the GET output.',
146
- });
147
- }
148
-
149
- // ---- pull the template array from a catalog-SHAPED body ---------------------
150
- // Accept only the canonical wrapper, the alternate wrapper, or a bare array whose
151
- // entries look like templates (a string `name`). A parseable non-catalog body —
152
- // e.g. an error array `[{errorCode,message}]` returned without a status line — is
153
- // NOT catalog-shaped and must not be counted as templates or reported as empty.
154
- const wrapperArray =
155
- (Array.isArray(parsed.serviceProcessTemplateOutputRepresentation) && parsed.serviceProcessTemplateOutputRepresentation) ||
156
- (Array.isArray(parsed.serviceProcessTemplates) && parsed.serviceProcessTemplates) ||
157
- null;
158
- // Require length > 0: an EMPTY bare array vacuously passes `.every()`, so a
159
- // null-status `[]` (caller omitted -i) would look catalog-shaped and be reported
160
- // as EMPTY — a definitive "no templates" — when the read may have failed. A
161
- // genuinely-empty 200 catalog still reaches EMPTY below via the httpStatus===200
162
- // path; only the unconfirmed null-status `[]` is downgraded to UNPARSEABLE.
163
- const bareCatalog =
164
- Array.isArray(parsed) && parsed.length > 0 && parsed.every((t) => t && typeof t === 'object' && typeof t.name === 'string')
165
- ? parsed
166
- : null;
167
- const catalogShaped = wrapperArray !== null || bareCatalog !== null;
168
-
169
- // Parseable, but neither a 200 nor a catalog-shaped body (only reachable when the
170
- // caller omitted -i so httpStatus is null): treat as unparseable/failed, not empty.
171
- if (!catalogShaped && httpStatus !== 200) {
172
- emit({
173
- httpStatus,
174
- access: false,
175
- catalogFetched: false,
176
- outcome: 'UNPARSEABLE',
177
- count: 0,
178
- templates: [],
179
- note: 'The GET body is not a recognizable catalog response (and carried no HTTP 200 status) — report the failure and stop; do not report an empty catalog.',
180
- });
181
- }
182
-
183
- const templates = wrapperArray || bareCatalog || [];
184
-
185
- if (templates.length === 0) {
186
- emit({
187
- httpStatus: httpStatus ?? 200,
188
- access: true,
189
- catalogFetched: true,
190
- outcome: 'EMPTY',
191
- count: 0,
192
- templates: [],
193
- note: 'Catalog returned an empty array — report that no templates are available. Do NOT invent any.',
194
- });
195
- }
196
-
197
- emit({
198
- httpStatus: httpStatus ?? 200,
199
- access: true,
200
- catalogFetched: true,
201
- outcome: 'OK',
202
- count: templates.length,
203
- templates,
204
- note: 'Rank these templates against the business need using name/description/scopeAndUseCases/whatIsIncluded. Never rank over remembered templates.',
205
- });