@adobe-commerce/aio-toolkit 1.0.15 → 1.0.17

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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,77 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.17] - 2026-02-25
9
+
10
+ ### ✨ Features
11
+
12
+ - **feat(publish-event):** Add optional `eventId` parameter to `PublishEvent.execute()`
13
+ - Allows callers to supply custom event IDs for idempotency, correlation, or tracking
14
+ - Falls back to auto-generated UUID when not provided
15
+ - New signature: `execute(providerId, eventCode, payload, eventId?, subject?)`
16
+
17
+ ### ⚠️ Breaking Changes
18
+
19
+ - **BREAKING(publish-event):** Parameter order changed for `PublishEvent.execute()`
20
+ - `subject` has moved from 4th to 5th position
21
+ - When passing subject without custom eventId, use: `execute(providerId, eventCode, payload, undefined, subject)`
22
+ - Previous call: `execute(providerId, eventCode, payload, subject)` → Update to: `execute(providerId, eventCode, payload, undefined, subject)`
23
+
24
+ ---
25
+
26
+ ## [1.0.16] - 2026-02-23
27
+
28
+ ### ✨ Features
29
+
30
+ - **feat(cli):** New Adobe I/O Events Onboarding CLI (`aio-toolkit-onboard-events`)
31
+ - Command-line tool for managing Adobe I/O Events and Commerce event integrations
32
+ - Three sub-commands: `execute`, `cleanup`, and `help`
33
+ - Automated provider, registration, and event subscription management
34
+ - Support for both OAuth 1.0a and IMS authentication
35
+ - Configuration-driven approach using YAML files
36
+ - Comprehensive environment variable validation
37
+ - Structured logging with detailed progress tracking
38
+ - Cleanup command for removing test/development resources
39
+ - Respects dependency order during cleanup (registrations → metadata → providers)
40
+ - 100% test coverage with comprehensive test suites
41
+
42
+ ### 🔧 Refactoring
43
+
44
+ - **refactor(commands):** Framework command architecture refactoring (#132)
45
+ - Abstract command base class for consistent CLI structure
46
+ - Command registry pattern for extensible command management
47
+ - AI-agent friendly base commands (base-apply, base-check)
48
+ - Standardized help command implementation
49
+ - Improved code organization and maintainability
50
+ - Enhanced type safety with TypeScript interfaces
51
+
52
+ - **refactor(helpers):** New helper utilities for CLI commands
53
+ - `ApplicationName` helper for extracting app names from config
54
+ - `AdobeAuthToken` helper for centralized token generation
55
+ - `AdobeCommerceClient` helper for Commerce API integration
56
+ - IO Events authentication and environment helpers
57
+ - Commerce helper utilities following DRY principle
58
+ - 100% test coverage for all helper functions
59
+
60
+ ### 💡 Usage Examples
61
+
62
+ **Execute Adobe I/O Events onboarding**:
63
+ ```bash
64
+ npx aio-toolkit-onboard-events execute
65
+ ```
66
+
67
+ **Cleanup development resources**:
68
+ ```bash
69
+ npx aio-toolkit-onboard-events cleanup
70
+ ```
71
+
72
+ **Display help**:
73
+ ```bash
74
+ npx aio-toolkit-onboard-events help
75
+ ```
76
+
77
+ ---
78
+
8
79
  ## [1.0.15] - 2026-02-09
9
80
 
10
81
  ### ✨ Features
package/README.md CHANGED
@@ -171,12 +171,13 @@ const result = await publishEvent.execute(
171
171
  customerId: 'CUST-789',
172
172
  amount: 199.99,
173
173
  currency: 'USD'
174
- }
174
+ },
175
+ 'eventId'
175
176
  );
176
177
 
177
178
  console.log(`Event published: ${result.eventId}, Status: ${result.status}`);
178
179
 
179
- // Publish an event with subject
180
+ // Publish an event with subject (eventId is optional; pass undefined to use auto-generated ID)
180
181
  const orderResult = await publishEvent.execute(
181
182
  'commerce-provider',
182
183
  'com.adobe.commerce.order.shipped',
@@ -186,6 +187,7 @@ const orderResult = await publishEvent.execute(
186
187
  carrier: 'UPS',
187
188
  estimatedDelivery: '2023-12-05T18:00:00Z'
188
189
  },
190
+ undefined,
189
191
  'orders/ORD-123456'
190
192
  );
191
193
 
@@ -1581,30 +1583,111 @@ The CLI provides the following context files:
1581
1583
  3. **Verification**: Run `check` to ensure contexts are properly configured
1582
1584
  4. **Updates**: Run `apply -f` after toolkit updates to get latest contexts
1583
1585
 
1586
+ #### `aio-toolkit-onboard-events`
1587
+
1588
+ Command-line tool for managing Adobe I/O Events and Commerce event integrations. This CLI automates the process of onboarding event providers, registrations, and subscriptions, as well as cleaning up resources from test/development environments.
1589
+
1590
+ ##### Commands
1591
+
1592
+ ###### `execute`
1593
+ Onboards Adobe I/O Events providers, registrations, and Commerce event subscriptions based on configuration file.
1594
+
1595
+ ```bash
1596
+ # Execute with default config (onboard.config.yaml)
1597
+ npx aio-toolkit-onboard-events execute
1598
+ ```
1599
+
1600
+ **Features:**
1601
+ - ✅ Creates Adobe I/O Events providers with automatic duplicate detection
1602
+ - ✅ Sets up event metadata for custom events
1603
+ - ✅ Configures event registrations with webhook or journal delivery
1604
+ - ✅ Subscribes to Adobe Commerce events (supports both OAuth and IMS authentication)
1605
+ - ✅ Validates environment variables upfront with clear error messages
1606
+ - ✅ Structured logging with detailed progress tracking
1607
+
1608
+ ###### `cleanup`
1609
+ Removes Adobe I/O Events resources and Commerce event subscriptions defined in configuration file.
1610
+
1611
+ ```bash
1612
+ # Cleanup with default config
1613
+ npx aio-toolkit-onboard-events cleanup
1614
+ ```
1615
+
1616
+ **Features:**
1617
+ - 🗑️ Deletes event registrations
1618
+ - 🗑️ Removes event metadata
1619
+ - 🗑️ Deletes event providers
1620
+ - 🗑️ Unsubscribes from Commerce events and removes providers
1621
+ - ⚡ Respects dependency order (registrations → metadata → providers)
1622
+ - 📊 Provides detailed cleanup summary
1623
+
1624
+ ###### `help`
1625
+ Displays help information for the CLI.
1626
+
1627
+ ```bash
1628
+ npx aio-toolkit-onboard-events help
1629
+ ```
1630
+
1631
+ ##### Configuration File
1632
+
1633
+ The CLI uses `onboard.config.yaml` to define resources. Default template:
1634
+
1635
+ ```yaml
1636
+ # Configuration file version
1637
+ version: "1.0"
1638
+
1639
+ # Application metadata
1640
+ application:
1641
+ name: "My App Builder Application"
1642
+ # Description is optional
1643
+ # description: "My App Builder Application for Adobe Commerce"
1644
+
1645
+ # Events configuration
1646
+ events:
1647
+ # Adobe I/O Events configuration
1648
+ io:
1649
+ config: io-events.json # File path to I/O events configuration
1650
+
1651
+ # Adobe Commerce Events configuration
1652
+ commerce:
1653
+ providerKey: commerce
1654
+ config: commerce-events.json # File path to Commerce events configuration
1655
+
1656
+ # Deployment settings
1657
+ deployment:
1658
+ # Instance type: paas | cloud
1659
+ # paas = Adobe Commerce Cloud/On-premise (OAuth)
1660
+ # cloud = Adobe Commerce as Cloud Service (IMS)
1661
+ type: paas
1662
+
1663
+ # Authentication type (optional, auto-detected from type if not specified)
1664
+ # Allowed values: oauth | ims
1665
+ # Auto-detection: paas → oauth, cloud → ims
1666
+ # authType: oauth
1667
+ ```
1668
+
1669
+ ##### Use Cases
1670
+
1671
+ 1. **Development Onboarding**: Run `execute` to quickly set up event integrations
1672
+ 2. **Environment Cleanup**: Run `cleanup` to remove test resources before production deployment
1673
+ 3. **CI/CD Integration**: Automate event configuration in deployment pipelines
1674
+ 4. **Multi-Environment Setup**: Use different config files for dev/staging/production environments
1675
+
1584
1676
  ## Environment Variables
1585
1677
 
1586
1678
  Common environment variables used across components:
1587
1679
 
1588
1680
  ```bash
1589
- # Adobe commerce credentials
1590
- COMMERCE_BASE_URL=commerce-base-url
1591
- COMMERCE_CONSUMER_KEY=commerce-consumer-key
1592
- COMMERCE_CONSUMER_SECRET=commerce-consumer-secret
1593
- COMMERCE_ACCESS_TOKEN=commerce-access-token
1594
- COMMERCE_ACCESS_TOKEN_SECRET=commerce-access-token-secret
1595
- # Environment from DIST file
1596
- OAUTH_BASE_URL=https://ims-na1.adobelogin.com/ims/token/
1597
- IO_MANAGEMENT_BASE_URL=https://api.adobe.io/events/
1598
- # OAuth configs
1681
+ # Adobe I/O Events OAuth (Required for aio-toolkit-onboard-events)
1599
1682
  # The following values can be copied from the Credential details page in AppBuilder under Organization > Project > Workspace > OAuth Server-to-Server
1600
1683
  OAUTH_CLIENT_ID=client-id
1601
1684
  OAUTH_CLIENT_SECRET=client-secret
1602
1685
  OAUTH_TECHNICAL_ACCOUNT_ID=technical-account-id
1603
1686
  OAUTH_TECHNICAL_ACCOUNT_EMAIL=technical-account-email
1604
1687
  OAUTH_ORG_ID=org-id
1605
- OAUTH_SCOPES=scopes
1606
- # OAUTH_HOST=<string>
1607
- # Workspace configs
1688
+ OAUTH_SCOPES=openid, AdobeID, adobeio_api
1689
+
1690
+ # Adobe I/O Workspace (Required for aio-toolkit-onboard-events)
1608
1691
  # The following values can be copied from the JSON downloadable in AppBuilder from Organization > Project > Workspace
1609
1692
  # IO_CONSUMER corresponds to project.org.id
1610
1693
  # IO_PROJECT_ID corresponds to project.id
@@ -1612,6 +1695,36 @@ OAUTH_SCOPES=scopes
1612
1695
  IO_CONSUMER_ID=consumer-id
1613
1696
  IO_PROJECT_ID=project-id
1614
1697
  IO_WORKSPACE_ID=workspace-id
1698
+
1699
+ # Workspace Configuration (Required for aio-toolkit-onboard-events)
1700
+ IO_WORKSPACE_CONFIG=path/to/onboard.config.yaml
1701
+
1702
+ # Adobe Commerce Base Configuration (Required for Commerce events)
1703
+ COMMERCE_BASE_URL=https://your-commerce-store.com
1704
+ COMMERCE_ADOBE_IO_EVENTS_MERCHANT_ID=merchant-id
1705
+ COMMERCE_ADOBE_IO_EVENTS_ENVIRONMENT_ID=environment-id
1706
+
1707
+ # Commerce OAuth 1.0a Authentication (Use when authType is "oauth1a")
1708
+ COMMERCE_OAUTH_CONSUMER_KEY=consumer-key
1709
+ COMMERCE_OAUTH_CONSUMER_SECRET=consumer-secret
1710
+ COMMERCE_OAUTH_ACCESS_TOKEN=access-token
1711
+ COMMERCE_OAUTH_ACCESS_TOKEN_SECRET=access-token-secret
1712
+
1713
+ # Commerce IMS Authentication (Use when authType is "ims")
1714
+ COMMERCE_IMS_CLIENT_ID=client-id
1715
+ COMMERCE_IMS_CLIENT_SECRET=client-secret
1716
+ COMMERCE_IMS_TECHNICAL_ACCOUNT_ID=tech-account-id
1717
+ COMMERCE_IMS_TECHNICAL_ACCOUNT_EMAIL=tech-email
1718
+ COMMERCE_IMS_ORG_ID=org-id
1719
+ COMMERCE_IMS_SCOPES=openid, AdobeID, adobeio_api
1720
+
1721
+ # Legacy Environment Variables (Still supported for backward compatibility)
1722
+ OAUTH_BASE_URL=https://ims-na1.adobelogin.com/ims/token/
1723
+ IO_MANAGEMENT_BASE_URL=https://api.adobe.io/events/
1724
+ COMMERCE_CONSUMER_KEY=commerce-consumer-key
1725
+ COMMERCE_CONSUMER_SECRET=commerce-consumer-secret
1726
+ COMMERCE_ACCESS_TOKEN=commerce-access-token
1727
+ COMMERCE_ACCESS_TOKEN_SECRET=commerce-access-token-secret
1615
1728
  ```
1616
1729
 
1617
1730
  ## License
@@ -32,12 +32,54 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
32
32
  ));
33
33
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
34
 
35
- // src/commands/framework/command/base-context-help/index.ts
36
- var _BaseContextHelp, BaseContextHelp;
37
- var init_base_context_help = __esm({
38
- "src/commands/framework/command/base-context-help/index.ts"() {
35
+ // src/commands/framework/command/abstract/index.ts
36
+ var _CommandAbstract, CommandAbstract;
37
+ var init_abstract = __esm({
38
+ "src/commands/framework/command/abstract/index.ts"() {
39
39
  "use strict";
40
- _BaseContextHelp = class _BaseContextHelp {
40
+ _CommandAbstract = class _CommandAbstract {
41
+ /**
42
+ * Method to get the name of the command
43
+ * @returns {string} The name of the command
44
+ */
45
+ static getName() {
46
+ throw new Error("getName() must be implemented by subclass");
47
+ }
48
+ /**
49
+ * Method to get the description of the command
50
+ * @returns {string} The description of the command
51
+ */
52
+ static getDescription() {
53
+ throw new Error("getDescription() must be implemented by subclass");
54
+ }
55
+ /**
56
+ * Method to execute the command
57
+ * @param {...any} args - Command arguments
58
+ * @returns {Promise<CommandResult>} The execution result
59
+ */
60
+ static execute(...args2) {
61
+ throw new Error(`execute() must be implemented by subclass: ${args2.join(", ")}`);
62
+ }
63
+ };
64
+ __name(_CommandAbstract, "CommandAbstract");
65
+ CommandAbstract = _CommandAbstract;
66
+ }
67
+ });
68
+
69
+ // src/commands/framework/command/base-help/index.ts
70
+ var _BaseHelpCommand, BaseHelpCommand;
71
+ var init_base_help = __esm({
72
+ "src/commands/framework/command/base-help/index.ts"() {
73
+ "use strict";
74
+ init_abstract();
75
+ _BaseHelpCommand = class _BaseHelpCommand extends CommandAbstract {
76
+ /**
77
+ * Method to get the description of the command
78
+ * @returns {string} The description of the command
79
+ */
80
+ static getName() {
81
+ return this.NAME;
82
+ }
41
83
  /**
42
84
  * Static method to get the commands - must be implemented by subclasses
43
85
  *
@@ -55,11 +97,11 @@ var init_base_context_help = __esm({
55
97
  throw new Error("getCommands() must be implemented by subclass");
56
98
  }
57
99
  /**
58
- * Static execute method that returns the help text
59
- *
60
- * @returns {CommandResult} The command result with help text
100
+ * Method to execute the command
101
+ * @param {...any} _args - Command arguments (unused)
102
+ * @returns {Promise<CommandResult>} The execution result
61
103
  */
62
- static execute() {
104
+ static execute(..._args) {
63
105
  const helpText = [
64
106
  this.getUsageSection(),
65
107
  this.getCommandsSection(),
@@ -116,20 +158,16 @@ For more information, visit:
116
158
  `;
117
159
  }
118
160
  };
119
- __name(_BaseContextHelp, "BaseContextHelp");
161
+ __name(_BaseHelpCommand, "BaseHelpCommand");
120
162
  /**
121
163
  * Static command name
122
164
  */
123
- _BaseContextHelp.NAME = "help";
124
- /**
125
- * Static command description
126
- */
127
- _BaseContextHelp.DESCRIPTION = "Show help for the rules commands";
165
+ _BaseHelpCommand.NAME = "help";
128
166
  /**
129
167
  * Static repository URL
130
168
  */
131
- _BaseContextHelp.repositoryUrl = "https://github.com/adobe-commerce/aio-toolkit";
132
- BaseContextHelp = _BaseContextHelp;
169
+ _BaseHelpCommand.repositoryUrl = "https://github.com/adobe-commerce/aio-toolkit";
170
+ BaseHelpCommand = _BaseHelpCommand;
133
171
  }
134
172
  });
135
173
 
@@ -138,8 +176,8 @@ var _CursorContextHelp, CursorContextHelp;
138
176
  var init_help = __esm({
139
177
  "src/commands/cursor-context/lib/help/index.ts"() {
140
178
  "use strict";
141
- init_base_context_help();
142
- _CursorContextHelp = class _CursorContextHelp extends BaseContextHelp {
179
+ init_base_help();
180
+ _CursorContextHelp = class _CursorContextHelp extends BaseHelpCommand {
143
181
  /**
144
182
  * Get the CLI name
145
183
  * This is used to display the correct help text for the CLI.
@@ -149,6 +187,13 @@ var init_help = __esm({
149
187
  static getCliName() {
150
188
  return "aio-toolkit-cursor-context";
151
189
  }
190
+ /**
191
+ * Method to get the description of the command
192
+ * @returns {string} The description of the command
193
+ */
194
+ static getDescription() {
195
+ return this.DESCRIPTION;
196
+ }
152
197
  /**
153
198
  * Get commands dynamically to avoid circular dependency
154
199
  * This will be populated when CursorRules is initialized
@@ -161,6 +206,10 @@ var init_help = __esm({
161
206
  }
162
207
  };
163
208
  __name(_CursorContextHelp, "CursorContextHelp");
209
+ /**
210
+ * Static command description
211
+ */
212
+ _CursorContextHelp.DESCRIPTION = "Show help for the rules commands";
164
213
  CursorContextHelp = _CursorContextHelp;
165
214
  }
166
215
  });
@@ -550,14 +599,22 @@ var init_helpers = __esm({
550
599
  }
551
600
  });
552
601
 
553
- // src/commands/framework/command/base-context-check/index.ts
554
- var path4, _BaseContextCheck, BaseContextCheck;
555
- var init_base_context_check = __esm({
556
- "src/commands/framework/command/base-context-check/index.ts"() {
602
+ // src/commands/framework/command/ai-agent/base-check/index.ts
603
+ var path4, _AIAgentBaseCheck, AIAgentBaseCheck;
604
+ var init_base_check = __esm({
605
+ "src/commands/framework/command/ai-agent/base-check/index.ts"() {
557
606
  "use strict";
558
607
  path4 = __toESM(require("path"));
559
608
  init_helpers();
560
- _BaseContextCheck = class _BaseContextCheck {
609
+ init_abstract();
610
+ _AIAgentBaseCheck = class _AIAgentBaseCheck extends CommandAbstract {
611
+ /**
612
+ * Method to get the description of the command
613
+ * @returns {string} The description of the command
614
+ */
615
+ static getName() {
616
+ return this.NAME;
617
+ }
561
618
  /**
562
619
  * Get the directory paths to check
563
620
  * This is used to check if the context directories exist.
@@ -649,16 +706,12 @@ ${dir}:`);
649
706
  };
650
707
  }
651
708
  };
652
- __name(_BaseContextCheck, "BaseContextCheck");
709
+ __name(_AIAgentBaseCheck, "AIAgentBaseCheck");
653
710
  /**
654
711
  * Static command name
655
712
  */
656
- _BaseContextCheck.NAME = "check";
657
- /**
658
- * Static command description
659
- */
660
- _BaseContextCheck.DESCRIPTION = "Check contexts are applied to the project";
661
- BaseContextCheck = _BaseContextCheck;
713
+ _AIAgentBaseCheck.NAME = "check";
714
+ AIAgentBaseCheck = _AIAgentBaseCheck;
662
715
  }
663
716
  });
664
717
 
@@ -668,8 +721,15 @@ var init_check = __esm({
668
721
  "src/commands/cursor-context/lib/check/index.ts"() {
669
722
  "use strict";
670
723
  path5 = __toESM(require("path"));
671
- init_base_context_check();
672
- _CursorContextCheck = class _CursorContextCheck extends BaseContextCheck {
724
+ init_base_check();
725
+ _CursorContextCheck = class _CursorContextCheck extends AIAgentBaseCheck {
726
+ /**
727
+ * Method to get the description of the command
728
+ * @returns {string} The description of the command
729
+ */
730
+ static getDescription() {
731
+ return this.DESCRIPTION;
732
+ }
673
733
  /**
674
734
  * Get the directory paths to check
675
735
  * This is used to check if the context directories exist.
@@ -681,20 +741,32 @@ var init_check = __esm({
681
741
  }
682
742
  };
683
743
  __name(_CursorContextCheck, "CursorContextCheck");
744
+ /**
745
+ * Static command description
746
+ */
747
+ _CursorContextCheck.DESCRIPTION = "Check cursor context applied to the project";
684
748
  CursorContextCheck = _CursorContextCheck;
685
749
  }
686
750
  });
687
751
 
688
- // src/commands/framework/command/base-rule-apply/index.ts
689
- var fs6, path6, _BaseRuleApply, BaseRuleApply;
690
- var init_base_rule_apply = __esm({
691
- "src/commands/framework/command/base-rule-apply/index.ts"() {
752
+ // src/commands/framework/command/ai-agent/base-apply/index.ts
753
+ var fs6, path6, _AIAgentBaseApply, AIAgentBaseApply;
754
+ var init_base_apply = __esm({
755
+ "src/commands/framework/command/ai-agent/base-apply/index.ts"() {
692
756
  "use strict";
693
757
  fs6 = __toESM(require("fs"));
694
758
  path6 = __toESM(require("path"));
695
759
  init_format_messages();
696
760
  init_helpers();
697
- _BaseRuleApply = class _BaseRuleApply {
761
+ init_abstract();
762
+ _AIAgentBaseApply = class _AIAgentBaseApply extends CommandAbstract {
763
+ /**
764
+ * Method to get the description of the command
765
+ * @returns {string} The description of the command
766
+ */
767
+ static getName() {
768
+ return this.NAME;
769
+ }
698
770
  /**
699
771
  * Get the copy directories configuration
700
772
  * @returns {Record<string, { from: string; to: string }>} Object with directory pairs to copy
@@ -939,27 +1011,30 @@ ${dirKey.toUpperCase()}:`);
939
1011
  }
940
1012
  }
941
1013
  };
942
- __name(_BaseRuleApply, "BaseRuleApply");
1014
+ __name(_AIAgentBaseApply, "AIAgentBaseApply");
943
1015
  /**
944
1016
  * Static command name
945
1017
  */
946
- _BaseRuleApply.NAME = "apply";
947
- /**
948
- * Static command description
949
- */
950
- _BaseRuleApply.DESCRIPTION = "Apply contexts to your project (use --force or -f to overwrite existing)";
951
- BaseRuleApply = _BaseRuleApply;
1018
+ _AIAgentBaseApply.NAME = "apply";
1019
+ AIAgentBaseApply = _AIAgentBaseApply;
952
1020
  }
953
1021
  });
954
1022
 
955
1023
  // src/commands/cursor-context/lib/apply/index.ts
956
- var path7, _CursorRuleApply, CursorRuleApply;
1024
+ var path7, _CursorContextApply, CursorContextApply;
957
1025
  var init_apply = __esm({
958
1026
  "src/commands/cursor-context/lib/apply/index.ts"() {
959
1027
  "use strict";
960
1028
  path7 = __toESM(require("path"));
961
- init_base_rule_apply();
962
- _CursorRuleApply = class _CursorRuleApply extends BaseRuleApply {
1029
+ init_base_apply();
1030
+ _CursorContextApply = class _CursorContextApply extends AIAgentBaseApply {
1031
+ /**
1032
+ * Method to get the description of the command
1033
+ * @returns {string} The description of the command
1034
+ */
1035
+ static getDescription() {
1036
+ return this.DESCRIPTION;
1037
+ }
963
1038
  /**
964
1039
  * Enable IDE detection for Cursor-specific contexts
965
1040
  * @returns {boolean} True to enable IDE detection
@@ -984,17 +1059,21 @@ var init_apply = __esm({
984
1059
  };
985
1060
  }
986
1061
  };
987
- __name(_CursorRuleApply, "CursorRuleApply");
988
- CursorRuleApply = _CursorRuleApply;
1062
+ __name(_CursorContextApply, "CursorContextApply");
1063
+ /**
1064
+ * Static command description
1065
+ */
1066
+ _CursorContextApply.DESCRIPTION = "Apply contexts to your project (use --force or -f to overwrite existing)";
1067
+ CursorContextApply = _CursorContextApply;
989
1068
  }
990
1069
  });
991
1070
 
992
- // src/commands/framework/command/base-rules/index.ts
993
- var _BaseRules, BaseRules;
994
- var init_base_rules = __esm({
995
- "src/commands/framework/command/base-rules/index.ts"() {
1071
+ // src/commands/framework/command/registry/index.ts
1072
+ var _CommandRegistry, CommandRegistry;
1073
+ var init_registry = __esm({
1074
+ "src/commands/framework/command/registry/index.ts"() {
996
1075
  "use strict";
997
- _BaseRules = class _BaseRules {
1076
+ _CommandRegistry = class _CommandRegistry {
998
1077
  /**
999
1078
  * Static method to get the commands - must be implemented by subclasses
1000
1079
  *
@@ -1021,8 +1100,8 @@ var init_base_rules = __esm({
1021
1100
  return await command2.execute(...args2);
1022
1101
  }
1023
1102
  };
1024
- __name(_BaseRules, "BaseRules");
1025
- BaseRules = _BaseRules;
1103
+ __name(_CommandRegistry, "CommandRegistry");
1104
+ CommandRegistry = _CommandRegistry;
1026
1105
  }
1027
1106
  });
1028
1107
 
@@ -1038,8 +1117,8 @@ var init_lib = __esm({
1038
1117
  init_help();
1039
1118
  init_check();
1040
1119
  init_apply();
1041
- init_base_rules();
1042
- _CursorRules = class _CursorRules extends BaseRules {
1120
+ init_registry();
1121
+ _CursorRules = class _CursorRules extends CommandRegistry {
1043
1122
  /**
1044
1123
  * Static commands array
1045
1124
  *
@@ -1048,19 +1127,19 @@ var init_lib = __esm({
1048
1127
  static getCommands() {
1049
1128
  return [
1050
1129
  {
1051
- name: CursorContextHelp.NAME,
1052
- description: CursorContextHelp.DESCRIPTION,
1130
+ name: CursorContextHelp.getName(),
1131
+ description: CursorContextHelp.getDescription(),
1053
1132
  execute: CursorContextHelp.execute.bind(CursorContextHelp)
1054
1133
  },
1055
1134
  {
1056
- name: CursorContextCheck.NAME,
1057
- description: CursorContextCheck.DESCRIPTION,
1135
+ name: CursorContextCheck.getName(),
1136
+ description: CursorContextCheck.getDescription(),
1058
1137
  execute: CursorContextCheck.execute.bind(CursorContextCheck)
1059
1138
  },
1060
1139
  {
1061
- name: CursorRuleApply.NAME,
1062
- description: CursorRuleApply.DESCRIPTION,
1063
- execute: CursorRuleApply.execute.bind(CursorRuleApply)
1140
+ name: CursorContextApply.getName(),
1141
+ description: CursorContextApply.getDescription(),
1142
+ execute: CursorContextApply.execute.bind(CursorContextApply)
1064
1143
  }
1065
1144
  ];
1066
1145
  }