@peernova/cuneiform-sf 1.0.2 → 1.0.4-beta.6

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 (38) hide show
  1. package/LICENSE +81 -30
  2. package/README.md +59 -95
  3. package/messages/compatibility.check.md +71 -0
  4. package/messages/cuneiform.access.md +138 -0
  5. package/messages/definition.create.md +511 -0
  6. package/messages/definition.export.md +88 -0
  7. package/messages/definition.get.md +147 -0
  8. package/messages/definition.import.md +65 -0
  9. package/messages/definition.list.md +264 -0
  10. package/messages/definition.purge.md +318 -0
  11. package/messages/definition.update.md +80 -0
  12. package/messages/mcp.serve.md +66 -0
  13. package/messages/object.describe.md +201 -0
  14. package/messages/object.list.md +443 -0
  15. package/messages/org.details.md +386 -0
  16. package/messages/org.reset.md +71 -0
  17. package/messages/profile.md +231 -0
  18. package/messages/profile.request.cancel.md +143 -0
  19. package/messages/profile.request.delete.md +139 -0
  20. package/messages/profile.request.list.md +89 -0
  21. package/messages/summary.purge.md +218 -0
  22. package/messages/summary.reprofile.md +150 -0
  23. package/messages/summary.stop.md +157 -0
  24. package/messages/user.details.md +501 -0
  25. package/oclif.lock +3021 -2224
  26. package/oclif.manifest.json +2 -116
  27. package/package.json +84 -19
  28. package/lib/commands/cuneiform/about.d.ts +0 -13
  29. package/lib/commands/cuneiform/about.js +0 -26
  30. package/lib/commands/cuneiform/about.js.map +0 -1
  31. package/lib/commands/hello/world.d.ts +0 -14
  32. package/lib/commands/hello/world.js +0 -27
  33. package/lib/commands/hello/world.js.map +0 -1
  34. package/lib/index.d.ts +0 -2
  35. package/lib/index.js +0 -2
  36. package/lib/index.js.map +0 -1
  37. package/messages/cuneiform.about.md +0 -19
  38. package/messages/hello.world.md +0 -29
@@ -0,0 +1,147 @@
1
+ # summary
2
+
3
+ Resolve profiling definition keys to their full configuration — see what each definition targets, which method it uses, and what state it is in.
4
+
5
+ # description
6
+
7
+ Definition keys like PD-0001 appear throughout the Cuneiform workflow — in profiling logs, summary reports, error messages, and colleague questions. When a key surfaces in any context, the next step is resolving what that definition targets, what method it uses, and what state it is in. This command retrieves profiling definitions by key and presents them in a nine-column table: key, name, target object, profiling type, category, time category, segment category, profiling status, and last profiled date.
8
+
9
+ Multiple keys are fetched in parallel, so looking up 5 definitions is as fast as looking up 1. The output includes an Org Identity header, a definitions table with section header and count, JSON flag guidance with a copy-paste command, and contextual next steps. Keys that do not match any definition produce warnings (not errors), supporting partial success when retrieving batches.
10
+
11
+ **When to use vs related commands:**
12
+
13
+ - `definition list` — "Show me all definitions" (browse, filter, overview of many)
14
+ - `definition get` — "Show me PD-0001" (targeted lookup of specific definitions by key)
15
+ - `definition export` — "Back up definitions for migration" (portable CSV export, not inspection)
16
+
17
+ **File export:** Use `--output-dir` to save each definition as a separate JSON file for audit artifacts, project documentation, or version control.
18
+
19
+ Read-only. Does not create, modify, or execute definitions. The access gate validates Cuneiform installation and permissions before queries execute.
20
+
21
+ NATURAL LANGUAGE → FLAG MAPPING:
22
+
23
+ "get definition PD-0001" → --keys PD-0001
24
+ "get details for Account Standard" → --keys Account_Standard
25
+ "show me multiple definitions" → --keys PD-0001 --keys PD-0002
26
+ "export definitions to files" → --keys PD-0001 --output-dir ./definitions
27
+ "show definition as JSON" → --keys PD-0001 --json
28
+
29
+ COMMAND SEQUENCE: `definition list` (find keys) → `definition get` (inspect by key) → `profile` (execute profiling) or `definition update` (refine configuration)
30
+
31
+ # flags.target-org.summary
32
+
33
+ Retrieve definitions from this Salesforce org. Specify the org alias or username when you have multiple authenticated orgs.
34
+
35
+ # flags.keys.summary
36
+
37
+ One or more definition keys to retrieve (e.g., `--keys PD-0001`). Repeat the flag for multiple keys: `--keys PD-0001 --keys PD-0002`. Keys are fetched in parallel for efficient batch lookup.
38
+
39
+ # flags.output-dir.summary
40
+
41
+ Save each definition as a separate JSON file in this directory (e.g., `PD-0001.json`). The directory is created if it does not exist. Use this for audit artifacts, project documentation, or version control snapshots.
42
+
43
+ # flags.file-names.summary
44
+
45
+ Override default key-based file names with custom names (must match `--keys` count). Use when you want descriptive names for exported files (e.g., `--file-names account-standard.json`).
46
+
47
+ # flags.format.summary
48
+
49
+ Display format: `table` (nine-column summary, default) or `json` (complete definition record with all fields).
50
+
51
+ # examples
52
+
53
+ - Resolve a definition key from a profiling log or error message:
54
+
55
+ <%= config.bin %> <%= command.id %> --target-org myOrg --keys PD-0001
56
+
57
+ - Verify multiple definitions before executing profiling (fetched in parallel):
58
+
59
+ <%= config.bin %> <%= command.id %> --target-org myOrg --keys PD-0001 --keys PD-0002 --keys PD-0003
60
+
61
+ - Export definitions as JSON files for audit artifacts or project documentation:
62
+
63
+ <%= config.bin %> <%= command.id %> --target-org myOrg --keys PD-0001 --keys PD-0002 --output-dir ./definitions
64
+
65
+ - Export with descriptive file names for engagement deliverables:
66
+
67
+ <%= config.bin %> <%= command.id %> --target-org myOrg --keys PD-0001 --output-dir ./definitions --file-names account-standard.json
68
+
69
+ - View the complete definition record in JSON format:
70
+
71
+ <%= config.bin %> <%= command.id %> --target-org myOrg --keys PD-0001 --json
72
+
73
+ # errors.keyCountMismatch
74
+
75
+ The number of file names (%d) must match the number of keys (%d).
76
+
77
+ # errors.definitionNotFound
78
+
79
+ Definition not found: %s
80
+
81
+ # errors.exportFailed
82
+
83
+ Failed to export definition %s: %s
84
+
85
+ # output.headerTitle
86
+
87
+ Definition Get
88
+
89
+ # output.identity.header
90
+
91
+ Org Identity
92
+
93
+ # output.identity.orgName
94
+
95
+ Org Name
96
+
97
+ # output.identity.orgId
98
+
99
+ Org ID
100
+
101
+ # output.identity.instanceUrl
102
+
103
+ Instance URL
104
+
105
+ # output.identity.orgType
106
+
107
+ Org Type
108
+
109
+ # output.identity.edition
110
+
111
+ Edition
112
+
113
+ # output.identity.namespace
114
+
115
+ Namespace
116
+
117
+ # output.identity.username
118
+
119
+ Username
120
+
121
+ # output.definitions.header
122
+
123
+ Definitions
124
+
125
+ # output.jsonGuidance
126
+
127
+ For a full export of definition data, use the JSON flag:
128
+
129
+ # output.nextSteps.header
130
+
131
+ Next steps:
132
+
133
+ # output.nextSteps.profile
134
+
135
+ Execute profiling for this definition
136
+
137
+ # output.nextSteps.profileMultiple
138
+
139
+ Execute profiling for these definitions
140
+
141
+ # output.nextSteps.definitionList
142
+
143
+ View all definitions in this org
144
+
145
+ # warnings.title
146
+
147
+ Warnings
@@ -0,0 +1,65 @@
1
+ # summary
2
+
3
+ Restore or migrate profiling definitions into a Salesforce org from portable CSV files, with simulation to validate the result before any records are written.
4
+
5
+ # description
6
+
7
+ Profiling definitions capture the scoping decisions that tell Cuneiform what to analyze. When those decisions need to move between environments — sandbox to production, old scratch org to new, or restored after a refresh — this command imports them from CSV files produced by `definition export`.
8
+
9
+ The command reads a source directory containing `pnova__Profiling_Definition__c.csv`, generates a temporary import configuration, and executes the import. Partial failures are surfaced explicitly — if some definitions fail validation while others import successfully, the output identifies which objects failed and why.
10
+
11
+ OPERATION MODES:
12
+
13
+ - **Insert** (default) — Creates new records only. Fails on duplicate Name. Use for clean restores into empty orgs.
14
+ - **Upsert** — Creates new records OR updates existing records matched by the Name external ID. Use when some definitions may already exist in the target org (e.g., incremental deployment to production).
15
+
16
+ WHEN TO USE:
17
+
18
+ - After a sandbox refresh — restore definitions from backup in under a minute
19
+ - For production deployment — import validated definitions from sandbox with simulation as the approval artifact
20
+ - For template provisioning — import a standard definition set into each new engagement org
21
+ - To test safely — simulate first with --simulation to validate the entire pipeline before committing
22
+
23
+ COMMAND SEQUENCE: `definition export` (save definitions to files) → `definition import --simulation` (validate against target) → `definition import` (execute) → `profile` (run profiling with restored definitions)
24
+
25
+ # flags.target-org.summary
26
+
27
+ Salesforce org to import definitions into. The command validates Cuneiform installation before executing the import.
28
+
29
+ # flags.source.summary
30
+
31
+ Directory containing the CSV files to import. Point this at a previous `definition export` output directory or any directory with a `pnova__Profiling_Definition__c.csv` file (e.g., --source ./backup/definitions).
32
+
33
+ # flags.operation.summary
34
+
35
+ How to handle existing definitions: Insert (default) creates new records and fails on duplicate Names; Upsert creates new records and updates existing records matched by Name. Use Insert for clean restores into empty orgs. Use Upsert when some definitions may already exist from earlier iterations.
36
+
37
+ # flags.simulation.summary
38
+
39
+ Validate the import without modifying data. Runs the full import pipeline — parsing, validation, duplicate checking — but skips all writes. Use before production imports to verify the operation would succeed. The simulation output serves as a change approval artifact.
40
+
41
+ # examples
42
+
43
+ - Restore definitions after a sandbox refresh:
44
+
45
+ <%= config.bin %> <%= command.id %> --target-org myOrg --source ./backup/definitions
46
+
47
+ - Validate the import before committing (simulation runs the full pipeline without writing):
48
+
49
+ <%= config.bin %> <%= command.id %> --target-org myOrg --source ./backup/definitions --simulation
50
+
51
+ - Deploy validated definitions to production with Upsert to handle mixed scenarios:
52
+
53
+ <%= config.bin %> <%= command.id %> --target-org prodOrg --source ./release/definitions --operation Upsert
54
+
55
+ - Provision a new engagement org from a standard definition template:
56
+
57
+ <%= config.bin %> <%= command.id %> --target-org newClientOrg --source ./templates/standard-definitions
58
+
59
+ - Output as JSON for scripted verification in CI pipelines:
60
+
61
+ <%= config.bin %> <%= command.id %> --target-org myOrg --source ./backup/definitions --json
62
+
63
+ # warnings.title
64
+
65
+ Warnings
@@ -0,0 +1,264 @@
1
+ # summary
2
+
3
+ Inventory profiling definitions across a Salesforce org — see what has been defined, what method each uses, and where profiling stands — so you know where to focus next.
4
+
5
+ # description
6
+
7
+ The profiling definition inventory is the foundation of any data profiling workflow. Before you can decide what to profile, you need to see what has already been defined, which objects are in scope, and which definitions are active, complete, or stuck. This command retrieves all profiling definitions from a Salesforce org and presents them as a paginated, filterable table with seven columns: definition key, name, target object, profiling method, category, profiling status, and last profiled date.
8
+
9
+ An Org Identity summary box provides org context, and a Summary box shows aggregate counts: total definitions, active, inactive, profiled, and not profiled. Active filters display above the table so you always know which narrowing is in effect. Contextual next steps suggest `definition get`, `definition create`, and `profile` commands with the target org pre-populated.
10
+
11
+ **When to use vs related commands:**
12
+
13
+ - `definition list` — "Show me everything" / "What definitions exist?" / "Which definitions need profiling?" (browse and filter across many)
14
+ - `definition get` — "Show me PD-0001" / "Verify this definition before profiling" (targeted lookup by key)
15
+
16
+ FILTERING — six dimensions narrow results to precisely targeted subsets:
17
+
18
+ --objects Account — Only definitions targeting the Account object
19
+ --status active — Only active definitions (vs inactive or all)
20
+ --method metadata — Only metadata-type definitions (vs historical or comparative)
21
+ --category "Phase 1" — Only definitions in a specific category
22
+ --namespace FinServ — Only definitions for Financial Services Cloud objects
23
+ --pattern Account% — Definitions whose name matches a SOQL LIKE pattern
24
+
25
+ NATURAL LANGUAGE → FLAG MAPPING:
26
+
27
+ "show all definitions" → (no filter flags)
28
+ "definitions for Account" → --objects Account
29
+ "which definitions are active" → --status active
30
+ "metadata definitions only" → --method metadata
31
+ "definitions not yet profiled" → --sort lastProfiledDate
32
+ "only FSC definitions" → --namespace FinServ
33
+
34
+ COMMAND SEQUENCE: `definition create` (build definitions) → `definition list` (review inventory) → `definition get` / `profile` / `definition purge` (act on specific definitions)
35
+
36
+ # flags.target-org.summary
37
+
38
+ Retrieve definitions from this Salesforce org. Specify the org alias or username when you have multiple authenticated orgs.
39
+
40
+ # flags.objects.summary
41
+
42
+ Narrow the inventory to definitions targeting specific objects (comma-separated). For example, `--objects Account,Contact` shows only definitions for Account and Contact.
43
+
44
+ # flags.status.summary
45
+
46
+ Filter by activity status: `active` (currently usable for profiling), `inactive` (disabled), or `all` (both). Defaults to `all`, which gives the broadest view for discovery.
47
+
48
+ # flags.method.summary
49
+
50
+ Filter by profiling method: `metadata`, `historical`, or `comparative`. Use this when reviewing definitions of a single analysis type (e.g., `--method historical` to see only historical definitions).
51
+
52
+ # flags.pattern.summary
53
+
54
+ Filter definitions by name pattern using SOQL LIKE wildcards. Use `%` for multi-character and `_` for single-character wildcards (e.g., `Account%` matches all definitions whose name starts with "Account").
55
+
56
+ # flags.category.summary
57
+
58
+ Filter by the category label assigned during definition creation (e.g., "Phase 1", "Sales Cloud"). Use this to view definitions grouped by engagement phase or functional area.
59
+
60
+ # flags.namespace.summary
61
+
62
+ Filter by the namespace prefix of the target object (e.g., `FinServ` for Financial Services Cloud, `SBQQ` for CPQ). Use this to isolate definitions belonging to a specific managed package.
63
+
64
+ # flags.limit.summary
65
+
66
+ Maximum definitions per page (default: 25, max: 200). Use with `--offset` to paginate through large inventories.
67
+
68
+ # flags.offset.summary
69
+
70
+ Skip this many definitions before returning results. Use with `--limit` for pagination (e.g., `--limit 25 --offset 25` returns the second page).
71
+
72
+ # flags.sort.summary
73
+
74
+ Sort results by: `key` (definition key), `name` (definition name, the default), `objectName` (target object), or `lastProfiledDate` (most recently profiled first).
75
+
76
+ # examples
77
+
78
+ - Inventory all definitions in the org — see the full picture before deciding what to profile next:
79
+
80
+ <%= config.bin %> <%= command.id %> --target-org myOrg
81
+
82
+ - Focus on a specific object — show only definitions targeting Account:
83
+
84
+ <%= config.bin %> <%= command.id %> --target-org myOrg --objects Account
85
+
86
+ - Find active definitions ready for profiling:
87
+
88
+ <%= config.bin %> <%= command.id %> --target-org myOrg --status active
89
+
90
+ - Isolate Financial Services Cloud definitions by namespace:
91
+
92
+ <%= config.bin %> <%= command.id %> --target-org myOrg --namespace FinServ
93
+
94
+ - Page through a large definition inventory (page 3 of 25-per-page):
95
+
96
+ <%= config.bin %> <%= command.id %> --target-org myOrg --limit 25 --offset 50
97
+
98
+ - Export the inventory as JSON for engagement reports or scripting:
99
+
100
+ <%= config.bin %> <%= command.id %> --target-org myOrg --json
101
+
102
+ # errors.queryFailed
103
+
104
+ Failed to query profiling definitions: %s
105
+
106
+ # errors.noTargetOrg
107
+
108
+ Could not determine target org username.
109
+
110
+ # output.title
111
+
112
+ Cuneiform Profiling Definitions for %s (%s)
113
+
114
+ # output.identity.header
115
+
116
+ Org Identity
117
+
118
+ # output.identity.orgName
119
+
120
+ Org Name
121
+
122
+ # output.identity.orgId
123
+
124
+ Org ID
125
+
126
+ # output.identity.instanceUrl
127
+
128
+ Instance URL
129
+
130
+ # output.identity.orgType
131
+
132
+ Org Type
133
+
134
+ # output.identity.edition
135
+
136
+ Edition
137
+
138
+ # output.identity.namespace
139
+
140
+ Namespace
141
+
142
+ # output.identity.username
143
+
144
+ Username
145
+
146
+ # output.definitions.header
147
+
148
+ Definitions
149
+
150
+ # output.summary.header
151
+
152
+ Summary
153
+
154
+ # output.summary.totalDefinitions
155
+
156
+ Total Definitions
157
+
158
+ # output.summary.active
159
+
160
+ Active
161
+
162
+ # output.summary.inactive
163
+
164
+ Inactive
165
+
166
+ # output.summary.profiled
167
+
168
+ Profiled
169
+
170
+ # output.summary.notProfiled
171
+
172
+ Not Profiled
173
+
174
+ # output.noResults.suggestion
175
+
176
+ Try relaxing or removing the most restrictive filters.
177
+
178
+ # output.limitNotice
179
+
180
+ Displaying %s of %s definitions. Use --limit and --offset for pagination.
181
+
182
+ # output.filters.status
183
+
184
+ Status: %s
185
+
186
+ # output.filters.method
187
+
188
+ Method: %s
189
+
190
+ # output.filters.objects
191
+
192
+ Objects: %s
193
+
194
+ # output.filters.pattern
195
+
196
+ Pattern: %s
197
+
198
+ # output.filters.category
199
+
200
+ Category: %s
201
+
202
+ # output.filters.namespace
203
+
204
+ Namespace: %s
205
+
206
+ # table.header.key
207
+
208
+ Key
209
+
210
+ # table.header.name
211
+
212
+ Name
213
+
214
+ # table.header.object
215
+
216
+ Object
217
+
218
+ # table.header.method
219
+
220
+ Method
221
+
222
+ # table.header.category
223
+
224
+ Category
225
+
226
+ # table.header.status
227
+
228
+ Status
229
+
230
+ # table.header.lastProfiled
231
+
232
+ Last Profiled
233
+
234
+ # output.entityType
235
+
236
+ definitions
237
+
238
+ # output.nextSteps.header
239
+
240
+ Next steps:
241
+
242
+ # output.nextSteps.getLabel
243
+
244
+ Get definition details
245
+
246
+ # output.nextSteps.getCommand
247
+
248
+ sf cuneiform definition get --target-org %s --keys %s
249
+
250
+ # output.nextSteps.createLabel
251
+
252
+ Create a profiling definition
253
+
254
+ # output.nextSteps.createCommand
255
+
256
+ sf cuneiform definition create --help
257
+
258
+ # output.nextSteps.profileLabel
259
+
260
+ Execute profiling for a definition
261
+
262
+ # output.nextSteps.profileCommand
263
+
264
+ sf cuneiform profile --target-org %s --keys %s