@inizioevoke/veeva-astroclm-core 1.0.5 → 1.0.7

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.
@@ -6,6 +6,7 @@ description: >
6
6
  presentation, or run the veeva-config-manager. Also trigger when the user says things like
7
7
  "set up the config", "create the config file", "initialize the presentation config",
8
8
  "sync the config", "check the config", or "update the slides in the config".
9
+ allowed-tools: AskUserQuestion
9
10
  ---
10
11
 
11
12
  # Veeva Config Manager
@@ -4,28 +4,63 @@ Interactively collect presentation metadata from the user and write a
4
4
  `veeva-config.ts` file to the project root, replicating the flow in
5
5
  `src/apps/veeva-config-manager/create.ts`.
6
6
 
7
+ ## Before you start
8
+
9
+ Check whether `veeva-config.ts` already exists in the project root. If it does, ask the user how to proceed:
10
+ - **Overwrite** — discard the existing file and continue with this skill
11
+ - **Update instead** — stop this skill and run the manage skill (`manage.md`) to sync slides with `src/pages/`
12
+ - **Abort** — stop without making changes
13
+
14
+ Do not proceed with collecting input until the user confirms overwrite.
15
+
16
+ ## Clean input rule
17
+
18
+ Before using any free-text value (product name, presentation name, presentation ID) in the output: `.trim()` and replace runs of two or more spaces with a single space. Do not otherwise transform user input. This rule is referenced from the input-collection and ID-generation steps below.
19
+
7
20
  ## What you need from the user
8
21
 
9
- Gather **all** of the following before writing any files. Ask for them
10
- conversationally, batching related questions into a single message to minimize
11
- round-trips:
22
+ Tell the user that some information is required to generate the config file. Gather **all** of the following before writing any files.
12
23
 
13
- | Field | Options / constraints |
14
- |---|---|
15
- | **Product name** | Free text, required |
16
- | **Presentation name** | Free text, required |
17
- | **Presentation ID** | Free text; default = presentation name lowercased, non-alphanumeric `_` |
18
- | **IVA dimensions** | `1024 × 768`, `1366 × 1024` *(default)*, `1376 × 1032` |
19
- | **iOS resolution** | `Default For Device` *(default)*, `Scale To Fit`, `Scale To 1024x768` |
20
- | **Disabled actions** | Multi-select, none required: History Buttons, Navigation Bar, Pinch to Exit, Reactions, Rotation Lock, Swipe, Zoom |
21
- | **CRM target** | `Salesforce` *(default)*, `Vault` |
24
+ Ask the free-text questions one at a time (steps 1–2). The predefined-option questions in step 3 are batched into a single `AskUserQuestion` call — that's intentional, since `AskUserQuestion` natively supports multiple questions per call.
25
+
26
+ Apply the [Clean input rule](#clean-input-rule) to every free-text value as you receive it.
27
+
28
+ 1. Ask for the `Product name` and `Presentation name` (one at a time).
29
+ 2. Ask for the `Presentation ID`. Suggest a value derived from the cleaned `Presentation name`: lowercased, with any non-alphanumeric character replaced by `_`. Ask the user to confirm or enter a new value.
30
+ 3. Call `AskUserQuestion` with one call containing the following questions in order. Set `multiSelect: true` only on **Disable**; the other three are single-select.
31
+ - **Dimensions**
32
+ - Question: Select the IVA dimensions
33
+ - Options: `1024 × 768`, `1366 × 1024` *(default)*, `1376 × 1032`
34
+ - **Resolution**
35
+ - Question: Select the iOS resolution
36
+ - Options: `Default For Device` *(default)*, `Scale To Fit`, `Scale To 1024x768`
37
+ - **Disable**
38
+ - Question: Select any Veeva features to disable globally (multi-select)
39
+ - Options: `History Buttons`, `Navigation Bar`, `Pinch to Exit`, `Reactions`, `Rotation Lock`, `Swipe`, `Zoom`
40
+ - **Platform**
41
+ - Question: Select the target Veeva platform
42
+ - Options: `Salesforce` *(default)*, `Vault`
43
+
44
+ For the **Dimensions** answer, split the selected option on `×` and trim each side to get the numeric width and height (e.g. `1366 × 1024` → width `1366`, height `1024`).
45
+
46
+ ### Preferred collection strategy
47
+
48
+ 1. **Try `AskUserQuestion` first** for all fields with predefined options.
49
+
50
+ 2. **Fall back to conversational** for any field if `AskUserQuestion` is
51
+ unavailable or the call fails. List the options in a numbered list so the user can reply with a number rather than the full option text.
52
+
53
+ ### Exceptions
54
+
55
+ If `Other` is selected for `Dimensions`, `Resolution`, `Disable`, or `Platform`, reject the response and re-prompt the user asking them to choose only from the defined values.
22
56
 
23
57
  ## Generating IDs
24
58
 
25
59
  You will need two kinds of random IDs. Implement them inline with JavaScript/TypeScript logic or generate them yourself:
26
60
 
27
- - **External ID prefix**: First 3 chars of `product` (uppercased) + `_` + an 8-char alphanumeric random string (uppercase A–Z, 0–9).
61
+ - **External ID prefix**: First 3 chars of `product` (uppercased) + `_` + an 8-char alphanumeric random string (uppercase A–Z, 0–9). If the cleaned product name is shorter than 3 chars, right-pad with `_` to reach 3 chars before uppercasing.
28
62
  Example: product `Velorixin` → `VEL_3K9BW12X`
63
+ Example: product `Ox` → `OX__3K9BW12X`
29
64
  - **Per-slide ID**: An independent 8-char alphanumeric random string for each slide, unique within the set.
30
65
 
31
66
  To generate an 8-char random-ish ID in a bash snippet you can run:
@@ -36,11 +71,7 @@ Or generate them yourself — just make them look like `3K9BW12X` (8 uppercase a
36
71
 
37
72
  ## Discovering slides
38
73
 
39
- Read all `.astro` files in `src/pages/`:
40
-
41
- ```bash
42
- ls src/pages/*.astro 2>/dev/null
43
- ```
74
+ Use the Glob tool with the pattern `src/pages/*.astro` to list all slide pages. (Glob is platform-agnostic — prefer it over `ls`, which is unreliable on Windows.)
44
75
 
45
76
  For each file `some-page-name.astro`:
46
77
  - `path` = filename without `.astro` extension (e.g. `some-page-name`)
@@ -49,8 +80,7 @@ For each file `some-page-name.astro`:
49
80
 
50
81
  ## Output format
51
82
 
52
- Write `veeva-config.ts` to the **project root** using exactly this template
53
- (replace all `##...##` tokens with the collected/generated values):
83
+ Write `veeva-config.ts` to the **project root** using exactly this template. Replace every `##...##` token with the collected/generated value, but **leave all `${...}` template-literal expressions exactly as written** — those are TypeScript that runs at runtime, not placeholders for you to substitute. Do not modify the imports, the function signature, or the `binderFields` block.
54
84
 
55
85
  ```ts
56
86
  import type { IVeevaClmBinderFields, IVeevaConfig, VeevaEnv } from "@inizioevoke/veeva-astroclm-core/types";
@@ -143,11 +173,6 @@ export default function ({ veevaEnv = 'client', isTraining = false }: IVeevaConf
143
173
  }]
144
174
  ```
145
175
 
146
- ## "Clean input" rule
147
-
148
- Before using any free-text value in the output: `.trim()` and replace runs of
149
- two or more spaces with a single space. Do not otherwise transform user input.
150
-
151
176
  ## After writing the file
152
177
 
153
178
  Tell the user where the file was written (`veeva-config.ts` in the project
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inizioevoke/veeva-astroclm-core",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",