@cxtms/cx-schema 1.8.2 → 1.9.1

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/dist/cli.js +14 -11
  2. package/dist/cli.js.map +1 -1
  3. package/package.json +2 -2
  4. package/schemas/workflows/tasks/httpRequest.json +29 -14
  5. package/scripts/postinstall.js +15 -12
  6. package/{.claude/skills/cx-core → skills/cxtms-developer}/SKILL.md +16 -14
  7. package/{.claude/skills/cx-module → skills/cxtms-module-builder}/SKILL.md +10 -10
  8. package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/SKILL.md +17 -17
  9. /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-cli-auth.md +0 -0
  10. /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-accounting.md +0 -0
  11. /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-commodity.md +0 -0
  12. /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-contact.md +0 -0
  13. /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-geography.md +0 -0
  14. /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-job.md +0 -0
  15. /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-notification.md +0 -0
  16. /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-order-sub.md +0 -0
  17. /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-order.md +0 -0
  18. /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-organization.md +0 -0
  19. /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-rate.md +0 -0
  20. /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-shared.md +0 -0
  21. /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-warehouse.md +0 -0
  22. /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-graphql-query.md +0 -0
  23. /package/{.claude/skills/cx-module → skills/cxtms-module-builder}/ref-components-data.md +0 -0
  24. /package/{.claude/skills/cx-module → skills/cxtms-module-builder}/ref-components-display.md +0 -0
  25. /package/{.claude/skills/cx-module → skills/cxtms-module-builder}/ref-components-forms.md +0 -0
  26. /package/{.claude/skills/cx-module → skills/cxtms-module-builder}/ref-components-interactive.md +0 -0
  27. /package/{.claude/skills/cx-module → skills/cxtms-module-builder}/ref-components-layout.md +0 -0
  28. /package/{.claude/skills/cx-module → skills/cxtms-module-builder}/ref-components-specialized.md +0 -0
  29. /package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-accounting.md +0 -0
  30. /package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-communication.md +0 -0
  31. /package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-entity.md +0 -0
  32. /package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-expressions-ncalc.md +0 -0
  33. /package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-expressions-template.md +0 -0
  34. /package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-filetransfer.md +0 -0
  35. /package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-flow.md +0 -0
  36. /package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-other.md +0 -0
  37. /package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-query.md +0 -0
  38. /package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-utilities.md +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cxtms/cx-schema",
3
- "version": "1.8.2",
3
+ "version": "1.9.1",
4
4
  "description": "Schema validation package for CargoXplorer YAML modules",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -32,7 +32,7 @@
32
32
  "schemas",
33
33
  "scripts",
34
34
  "templates",
35
- ".claude"
35
+ "skills"
36
36
  ],
37
37
  "dependencies": {
38
38
  "ajv": "^8.12.0",
@@ -66,21 +66,27 @@
66
66
  "body": {
67
67
  "description": "Request body (can be string or object)"
68
68
  },
69
- "timeout": {
70
- "type": "integer",
71
- "description": "Request timeout in milliseconds"
72
- },
73
- "retry": {
69
+ "retryOptions": {
74
70
  "type": "object",
75
71
  "properties": {
76
- "count": {
77
- "type": "integer"
72
+ "limit": {
73
+ "type": "integer",
74
+ "description": "Number of retry attempts"
78
75
  },
79
- "delay": {
80
- "type": "integer"
76
+ "codes": {
77
+ "type": "array",
78
+ "items": {
79
+ "type": "integer"
80
+ },
81
+ "description": "HTTP status codes that trigger a retry (e.g. [429, 502, 503])"
81
82
  }
82
83
  },
83
- "description": "Retry configuration"
84
+ "description": "Retry configuration with exponential backoff"
85
+ },
86
+ "circuitBreaker": {
87
+ "type": "boolean",
88
+ "default": true,
89
+ "description": "Enable circuit breaker for the target host (default: true). When open, serves stale cache or throws."
84
90
  },
85
91
  "responseContentType": {
86
92
  "type": "string",
@@ -112,14 +118,23 @@
112
118
  "cache": {
113
119
  "type": "object",
114
120
  "properties": {
115
- "key": {
116
- "type": "string"
121
+ "enabled": {
122
+ "type": "boolean",
123
+ "default": true,
124
+ "description": "Enable response caching"
117
125
  },
118
126
  "duration": {
119
- "type": "string"
127
+ "type": "string",
128
+ "default": "1h",
129
+ "description": "Cache duration (e.g. '30s', '5m', '1h', '2d', 'EndOfDay', 'EndOfDay|America/Chicago')"
130
+ },
131
+ "useSlidingExpiration": {
132
+ "type": "boolean",
133
+ "default": false,
134
+ "description": "Use sliding expiration instead of absolute"
120
135
  }
121
136
  },
122
- "description": "Response caching configuration"
137
+ "description": "Response caching configuration. Cache key is auto-generated from url + method + headers + body."
123
138
  }
124
139
  },
125
140
  "required": ["url", "method"],
@@ -150,9 +150,9 @@ function main() {
150
150
  createValidationScript(projectRoot);
151
151
 
152
152
  // Copy Claude Code skills (clean existing first to remove stale files)
153
- const skillNames = ['cx-core', 'cx-module', 'cx-workflow'];
153
+ const skillNames = ['cxtms-developer', 'cxtms-module-builder', 'cxtms-workflow-builder'];
154
154
  for (const skillName of skillNames) {
155
- const skillSource = path.join(__dirname, '..', '.claude', 'skills', skillName);
155
+ const skillSource = path.join(__dirname, '..', 'skills', skillName);
156
156
  if (fs.existsSync(skillSource)) {
157
157
  const skillDest = path.join(projectRoot, '.claude', 'skills', skillName);
158
158
  console.log(`Installing ${skillName} skill...`);
@@ -169,14 +169,17 @@ function main() {
169
169
  }
170
170
  }
171
171
 
172
- // Remove old cx-build skill if it exists
173
- const oldSkillDest = path.join(projectRoot, '.claude', 'skills', 'cx-build');
174
- if (fs.existsSync(oldSkillDest)) {
175
- try {
176
- fs.rmSync(oldSkillDest, { recursive: true });
177
- console.log('Removed deprecated cx-build skill.');
178
- } catch (error) {
179
- // Ignore cleanup errors
172
+ // Remove deprecated skills
173
+ const deprecatedSkills = ['cx-build', 'cx-core', 'cx-module', 'cx-workflow'];
174
+ for (const oldSkill of deprecatedSkills) {
175
+ const oldSkillDest = path.join(projectRoot, '.claude', 'skills', oldSkill);
176
+ if (fs.existsSync(oldSkillDest)) {
177
+ try {
178
+ fs.rmSync(oldSkillDest, { recursive: true });
179
+ console.log(`Removed deprecated ${oldSkill} skill.`);
180
+ } catch (error) {
181
+ // Ignore cleanup errors
182
+ }
180
183
  }
181
184
  }
182
185
 
@@ -184,8 +187,8 @@ function main() {
184
187
  console.log('\nUsage:');
185
188
  console.log(' npx cxtms modules/your-module.yaml');
186
189
  console.log(' node .cx-schema/validate.js modules/your-module.yaml');
187
- console.log(' /cx-module <description> (Claude Code skill - UI modules)');
188
- console.log(' /cx-workflow <description> (Claude Code skill - workflows)');
190
+ console.log(' /cxtms-module-builder <description> (Claude Code skill - UI modules)');
191
+ console.log(' /cxtms-workflow-builder <description> (Claude Code skill - workflows)');
189
192
  }
190
193
 
191
194
  // Only run if this is not being installed as a dependency of cx-schema-validator itself
@@ -1,10 +1,12 @@
1
1
  ---
2
- name: cx-core
3
- description: Shared CargoXplorer entity field reference — domain entities, field names, enums, and customValues patterns
2
+ name: cxtms-developer
3
+ description: >
4
+ Shared CargoXplorer domain reference — entity fields, enums, customValues, GraphQL queries, and CLI auth.
5
+ Use when the user asks about CX entity fields, enums, customValues, entity relationships, or needs domain reference for Orders, Contacts, Commodities, Jobs, Charges, or other CX entities.
4
6
  argument-hint: <entity name or question about fields>
5
7
  ---
6
8
 
7
- Shared domain reference for CargoXplorer entities. Used by `cx-workflow` and `cx-module` skills for entity field names, types, navigation properties, enums, and customValues extension patterns.
9
+ Shared domain reference for CargoXplorer entities. Used by `cxtms-workflow-builder` and `cxtms-module-builder` skills for entity field names, types, navigation properties, enums, and customValues extension patterns.
8
10
 
9
11
  ## Feature File Layout
10
12
 
@@ -27,32 +29,32 @@ Use `--feature <feature_name>` with `cx-cli create` to automatically place files
27
29
 
28
30
  ### Primary Entities
29
31
 
30
- !cat .claude/skills/cx-core/ref-entity-order.md
31
- !cat .claude/skills/cx-core/ref-entity-contact.md
32
- !cat .claude/skills/cx-core/ref-entity-commodity.md
33
- !cat .claude/skills/cx-core/ref-entity-accounting.md
32
+ !cat skills/cxtms-developer/ref-entity-order.md
33
+ !cat skills/cxtms-developer/ref-entity-contact.md
34
+ !cat skills/cxtms-developer/ref-entity-commodity.md
35
+ !cat skills/cxtms-developer/ref-entity-accounting.md
34
36
 
35
37
  ### Order Sub-Entities & Related
36
38
 
37
- !cat .claude/skills/cx-core/ref-entity-order-sub.md
38
- !cat .claude/skills/cx-core/ref-entity-job.md
39
+ !cat skills/cxtms-developer/ref-entity-order-sub.md
40
+ !cat skills/cxtms-developer/ref-entity-job.md
39
41
 
40
42
  ### Pricing & Accounting Lookups
41
43
 
42
- !cat .claude/skills/cx-core/ref-entity-rate.md
44
+ !cat skills/cxtms-developer/ref-entity-rate.md
43
45
 
44
46
  ### Shared & Lookup Entities
45
47
 
46
- !cat .claude/skills/cx-core/ref-entity-shared.md
47
- !cat .claude/skills/cx-core/ref-entity-geography.md
48
+ !cat skills/cxtms-developer/ref-entity-shared.md
49
+ !cat skills/cxtms-developer/ref-entity-geography.md
48
50
 
49
51
  ### Warehouse & Inventory
50
52
 
51
- !cat .claude/skills/cx-core/ref-entity-warehouse.md
53
+ !cat skills/cxtms-developer/ref-entity-warehouse.md
52
54
 
53
55
  ### Notifications
54
56
 
55
- !cat .claude/skills/cx-core/ref-entity-notification.md
57
+ !cat skills/cxtms-developer/ref-entity-notification.md
56
58
 
57
59
  | Category | Entities | Reference |
58
60
  |----------|----------|-----------|
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: cx-module
2
+ name: cxtms-module-builder
3
3
  description: >
4
4
  Works with CXTMS app module YAML files — creates, modifies, fixes, validates, and deploys UI screens, forms, grids, and routes.
5
5
  Use when the user asks to create, modify, or fix a module YAML file, references *-module.yaml files, or asks about UI components/forms/grids/routes in a CX project.
@@ -160,9 +160,9 @@ When the target file doesn't exist, a new module is created with:
160
160
 
161
161
  **Read these files only when needed for the current task.** Do not load all references upfront.
162
162
 
163
- ### Entity Field Reference (cx-core)
163
+ ### Entity Field Reference (cxtms-developer)
164
164
 
165
- !cat .claude/skills/cx-core/SKILL.md
165
+ !cat skills/cxtms-developer/SKILL.md
166
166
 
167
167
  ### Component Directory
168
168
 
@@ -170,12 +170,12 @@ Read the relevant category ref file when building specific component types:
170
170
 
171
171
  | Category | Components | File |
172
172
  |----------|-----------|------|
173
- | **Layout & Structure** | `layout`, `row`, `col`, `header`, `tabs`, `toolbar`, `card`, `line`, `slot` | `.claude/skills/cx-module/ref-components-layout.md` |
174
- | **Forms & Input** | `form`, `field`, `field-collection`, `barcodeScanner` | `.claude/skills/cx-module/ref-components-forms.md` |
175
- | **Data Display** | `dataGrid`, `text`, `markup`, `badge`, `icon`, `image`, `photo`, `summary`, `diff`, `viewer`, `embed` | `.claude/skills/cx-module/ref-components-display.md` |
176
- | **Interactive & Nav** | `button`, `dropdown`, `menuButton`, `link`, `redirect`, `navbar`, `navbarItem`, `navbarLink`, `navDropdown` | `.claude/skills/cx-module/ref-components-interactive.md` |
177
- | **Data & Collections** | `collection`, `list`, `listItem`, `datasource`, `script` | `.claude/skills/cx-module/ref-components-data.md` |
178
- | **Specialized** | `calendar`, `notes`, `dashboard`, `dashboard-widget`, `widget`, `timeline`, `timeline-grid`, `oauth2` | `.claude/skills/cx-module/ref-components-specialized.md` |
173
+ | **Layout & Structure** | `layout`, `row`, `col`, `header`, `tabs`, `toolbar`, `card`, `line`, `slot` | `skills/cxtms-module-builder/ref-components-layout.md` |
174
+ | **Forms & Input** | `form`, `field`, `field-collection`, `barcodeScanner` | `skills/cxtms-module-builder/ref-components-forms.md` |
175
+ | **Data Display** | `dataGrid`, `text`, `markup`, `badge`, `icon`, `image`, `photo`, `summary`, `diff`, `viewer`, `embed` | `skills/cxtms-module-builder/ref-components-display.md` |
176
+ | **Interactive & Nav** | `button`, `dropdown`, `menuButton`, `link`, `redirect`, `navbar`, `navbarItem`, `navbarLink`, `navDropdown` | `skills/cxtms-module-builder/ref-components-interactive.md` |
177
+ | **Data & Collections** | `collection`, `list`, `listItem`, `datasource`, `script` | `skills/cxtms-module-builder/ref-components-data.md` |
178
+ | **Specialized** | `calendar`, `notes`, `dashboard`, `dashboard-widget`, `widget`, `timeline`, `timeline-grid`, `oauth2` | `skills/cxtms-module-builder/ref-components-specialized.md` |
179
179
 
180
180
  ### Templates
181
181
 
@@ -409,7 +409,7 @@ Reusable select components (e.g., `Countries/Select`, `Ports/Select`) follow thi
409
409
 
410
410
  ## Server Module Commands
411
411
 
412
- Deploy, undeploy, and release commands are listed in the CLI section at the top of this file. For authentication setup (login, PAT tokens, org management): see [cx-core/ref-cli-auth.md](.claude/skills/cx-core/ref-cli-auth.md)
412
+ Deploy, undeploy, and release commands are listed in the CLI section at the top of this file. For authentication setup (login, PAT tokens, org management): see [cxtms-developer/ref-cli-auth.md](skills/cxtms-developer/ref-cli-auth.md)
413
413
 
414
414
  ### Releasing App to GitHub
415
415
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: cx-workflow
2
+ name: cxtms-workflow-builder
3
3
  description: >
4
4
  Works with CXTMS workflow YAML files — creates, modifies, fixes, validates, and deploys standard process and Flow state machine workflows.
5
5
  Use when the user asks to create, modify, or fix a workflow YAML file, references workflow/*.yaml files, or asks about workflow tasks/triggers/activities in a CX project.
@@ -75,7 +75,7 @@ npx cxtms create workflow <name> --template <template>
75
75
 
76
76
  **All templates** include workflow-level `events` (`onWorkflowStarted`, `onWorkflowExecuted`, `onWorkflowFailed`) and activity-level `events` (`onActivityStarted`, `onActivityCompleted`, `onActivityFailed`) with Log steps. Replace/extend these with notification tasks (Email/Send, HttpRequest, Workflow/Execute) as needed.
77
77
 
78
- **Flow workflows** — scaffold with `basic` then set `workflowType: Flow`, remove `activities`/`triggers`, add `entity`, `states`, `transitions`, `aggregations`. Load Flow reference: `!cat .claude/skills/cx-workflow/ref-flow.md`
78
+ **Flow workflows** — scaffold with `basic` then set `workflowType: Flow`, remove `activities`/`triggers`, add `entity`, `states`, `transitions`, `aggregations`. Load Flow reference: `!cat skills/cxtms-workflow-builder/ref-flow.md`
79
79
 
80
80
  ### Step 4: Validate
81
81
 
@@ -191,8 +191,8 @@ events: # Workflow-level event handlers
191
191
 
192
192
  ## Variable References (quick summary)
193
193
 
194
- For template expressions and value directives: see [ref-expressions-template.md](.claude/skills/cx-workflow/ref-expressions-template.md)
195
- For NCalc conditions and functions: see [ref-expressions-ncalc.md](.claude/skills/cx-workflow/ref-expressions-ncalc.md)
194
+ For template expressions and value directives: see [ref-expressions-template.md](skills/cxtms-workflow-builder/ref-expressions-template.md)
195
+ For NCalc conditions and functions: see [ref-expressions-ncalc.md](skills/cxtms-workflow-builder/ref-expressions-ncalc.md)
196
196
 
197
197
  **`{{ path }}`** — in step inputs. Single `{{ }}` returns raw object. Multiple returns string interpolation.
198
198
  **`[variable]`** — in conditions and `expression:` directives. NCalc syntax.
@@ -279,25 +279,25 @@ Implicit variable: `iteration` (zero-based).
279
279
 
280
280
  | Category | Tasks | Load Reference |
281
281
  |----------|-------|----------------|
282
- | Utilities | SetVariable, Log, Error, HttpRequest, Map, Template, Import, Export, CsvParse, UnzipFile | `!cat .claude/skills/cx-workflow/ref-utilities.md` |
283
- | Query & Workflow | Query/GraphQL, Validation, Workflow/Execute | `!cat .claude/skills/cx-workflow/ref-query.md` |
284
- | Entity CRUD | Order, Contact, Commodity, Job, Charge, Discount, Inventory, Movement, Transmission | `!cat .claude/skills/cx-workflow/ref-entity.md` |
285
- | Communication | Email/Send, Document/Render, Attachment, PdfDocument/Merge | `!cat .claude/skills/cx-workflow/ref-communication.md` |
286
- | File Transfer | Connect, Disconnect, ListFiles, Download, Upload, Move, Delete | `!cat .claude/skills/cx-workflow/ref-filetransfer.md` |
287
- | Accounting | AccountingTransaction, Payment, Number/Generate, SequenceNumber | `!cat .claude/skills/cx-workflow/ref-accounting.md` |
288
- | Other | User, Auth, Caching, X12/Parse, EDIFACT, Flow/Transition, Notes, AppModule, ActionEvent | `!cat .claude/skills/cx-workflow/ref-other.md` |
282
+ | Utilities | SetVariable, Log, Error, HttpRequest, Map, Template, Import, Export, CsvParse, UnzipFile | `!cat skills/cxtms-workflow-builder/ref-utilities.md` |
283
+ | Query & Workflow | Query/GraphQL, Validation, Workflow/Execute | `!cat skills/cxtms-workflow-builder/ref-query.md` |
284
+ | Entity CRUD | Order, Contact, Commodity, Job, Charge, Discount, Inventory, Movement, Transmission | `!cat skills/cxtms-workflow-builder/ref-entity.md` |
285
+ | Communication | Email/Send, Document/Render, Attachment, PdfDocument/Merge | `!cat skills/cxtms-workflow-builder/ref-communication.md` |
286
+ | File Transfer | Connect, Disconnect, ListFiles, Download, Upload, Move, Delete | `!cat skills/cxtms-workflow-builder/ref-filetransfer.md` |
287
+ | Accounting | AccountingTransaction, Payment, Number/Generate, SequenceNumber | `!cat skills/cxtms-workflow-builder/ref-accounting.md` |
288
+ | Other | User, Auth, Caching, X12/Parse, EDIFACT, Flow/Transition, Notes, AppModule, ActionEvent | `!cat skills/cxtms-workflow-builder/ref-other.md` |
289
289
 
290
- ## Entity Field Reference (cx-core)
290
+ ## Entity Field Reference (cxtms-developer)
291
291
 
292
- !cat .claude/skills/cx-core/SKILL.md
292
+ !cat skills/cxtms-developer/SKILL.md
293
293
 
294
294
  ## Additional References (load on demand)
295
295
 
296
296
  | Reference | Load |
297
297
  |-----------|------|
298
- | Template Expressions & Value Directives | `!cat .claude/skills/cx-workflow/ref-expressions-template.md` |
299
- | NCalc Expressions & Functions | `!cat .claude/skills/cx-workflow/ref-expressions-ncalc.md` |
300
- | Flow Workflows (state machines) | `!cat .claude/skills/cx-workflow/ref-flow.md` |
298
+ | Template Expressions & Value Directives | `!cat skills/cxtms-workflow-builder/ref-expressions-template.md` |
299
+ | NCalc Expressions & Functions | `!cat skills/cxtms-workflow-builder/ref-expressions-ncalc.md` |
300
+ | Flow Workflows (state machines) | `!cat skills/cxtms-workflow-builder/ref-flow.md` |
301
301
 
302
302
  ## Dynamic Schema Access (load on demand)
303
303
 
@@ -320,7 +320,7 @@ Implicit variable: `iteration` (zero-based).
320
320
 
321
321
  ## Server Workflow Commands
322
322
 
323
- Deploy, undeploy, and release commands are listed in the CLI section at the top of this file. For authentication setup (login, PAT tokens, org management): see [cx-core/ref-cli-auth.md](.claude/skills/cx-core/ref-cli-auth.md)
323
+ Deploy, undeploy, and release commands are listed in the CLI section at the top of this file. For authentication setup (login, PAT tokens, org management): see [cxtms-developer/ref-cli-auth.md](skills/cxtms-developer/ref-cli-auth.md)
324
324
 
325
325
  ### Releasing App to GitHub
326
326