@uniswap/ai-toolkit-nx-claude 0.5.26 → 0.5.27-next.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.
@@ -95,20 +95,12 @@ async function promptForMissingOptions(options, schemaPath, context = {}, explic
95
95
  continue;
96
96
  }
97
97
  if (property["prompt-when"]) {
98
- const shouldShow = evaluatePromptCondition(
99
- property["prompt-when"],
100
- result
101
- );
98
+ const shouldShow = evaluatePromptCondition(property["prompt-when"], result);
102
99
  if (!shouldShow) {
103
100
  continue;
104
101
  }
105
102
  }
106
- const promptResult = await promptForProperty(
107
- key,
108
- property,
109
- context,
110
- result
111
- );
103
+ const promptResult = await promptForProperty(key, property, context, result);
112
104
  if (promptResult !== void 0) {
113
105
  result[key] = promptResult;
114
106
  if (key === "installMode" && promptResult === "default") {
@@ -149,9 +141,7 @@ async function promptForMissingOptions(options, schemaPath, context = {}, explic
149
141
  }
150
142
  }
151
143
  if (key === "confirmLocalPath" && result.installationType === "local" && promptResult === false) {
152
- throw new Error(
153
- "Installation cancelled - please run from your project root"
154
- );
144
+ throw new Error("Installation cancelled - please run from your project root");
155
145
  }
156
146
  }
157
147
  }
@@ -247,6 +237,27 @@ async function promptForProperty(key, property, context, currentValues) {
247
237
  installationType
248
238
  );
249
239
  }
240
+ if (key === "skills" && context.availableSkills) {
241
+ const installationType = currentValues?.installationType;
242
+ let existingSet;
243
+ let otherLocationSet;
244
+ if (installationType === "global") {
245
+ existingSet = context.globalExistingSkills;
246
+ otherLocationSet = context.localExistingSkills;
247
+ } else if (installationType === "local") {
248
+ existingSet = context.localExistingSkills;
249
+ otherLocationSet = context.globalExistingSkills;
250
+ }
251
+ return await promptMultiSelectWithAll(
252
+ promptMessage,
253
+ context.availableSkills,
254
+ "skills",
255
+ context.skillDescriptions,
256
+ existingSet,
257
+ otherLocationSet,
258
+ installationType
259
+ );
260
+ }
250
261
  if (key === "addons" && context.availableAddons) {
251
262
  return await promptMultiSelectWithAll(
252
263
  promptMessage,
@@ -95,20 +95,12 @@ async function promptForMissingOptions(options, schemaPath, context = {}, explic
95
95
  continue;
96
96
  }
97
97
  if (property["prompt-when"]) {
98
- const shouldShow = evaluatePromptCondition(
99
- property["prompt-when"],
100
- result
101
- );
98
+ const shouldShow = evaluatePromptCondition(property["prompt-when"], result);
102
99
  if (!shouldShow) {
103
100
  continue;
104
101
  }
105
102
  }
106
- const promptResult = await promptForProperty(
107
- key,
108
- property,
109
- context,
110
- result
111
- );
103
+ const promptResult = await promptForProperty(key, property, context, result);
112
104
  if (promptResult !== void 0) {
113
105
  result[key] = promptResult;
114
106
  if (key === "installMode" && promptResult === "default") {
@@ -149,9 +141,7 @@ async function promptForMissingOptions(options, schemaPath, context = {}, explic
149
141
  }
150
142
  }
151
143
  if (key === "confirmLocalPath" && result.installationType === "local" && promptResult === false) {
152
- throw new Error(
153
- "Installation cancelled - please run from your project root"
154
- );
144
+ throw new Error("Installation cancelled - please run from your project root");
155
145
  }
156
146
  }
157
147
  }
@@ -247,6 +237,27 @@ async function promptForProperty(key, property, context, currentValues) {
247
237
  installationType
248
238
  );
249
239
  }
240
+ if (key === "skills" && context.availableSkills) {
241
+ const installationType = currentValues?.installationType;
242
+ let existingSet;
243
+ let otherLocationSet;
244
+ if (installationType === "global") {
245
+ existingSet = context.globalExistingSkills;
246
+ otherLocationSet = context.localExistingSkills;
247
+ } else if (installationType === "local") {
248
+ existingSet = context.localExistingSkills;
249
+ otherLocationSet = context.globalExistingSkills;
250
+ }
251
+ return await promptMultiSelectWithAll(
252
+ promptMessage,
253
+ context.availableSkills,
254
+ "skills",
255
+ context.skillDescriptions,
256
+ existingSet,
257
+ otherLocationSet,
258
+ installationType
259
+ );
260
+ }
250
261
  if (key === "addons" && context.availableAddons) {
251
262
  return await promptMultiSelectWithAll(
252
263
  promptMessage,
@@ -519,20 +519,12 @@ async function promptForMissingOptions(options, schemaPath, context = {}, explic
519
519
  continue;
520
520
  }
521
521
  if (property["prompt-when"]) {
522
- const shouldShow = evaluatePromptCondition(
523
- property["prompt-when"],
524
- result
525
- );
522
+ const shouldShow = evaluatePromptCondition(property["prompt-when"], result);
526
523
  if (!shouldShow) {
527
524
  continue;
528
525
  }
529
526
  }
530
- const promptResult = await promptForProperty(
531
- key,
532
- property,
533
- context,
534
- result
535
- );
527
+ const promptResult = await promptForProperty(key, property, context, result);
536
528
  if (promptResult !== void 0) {
537
529
  result[key] = promptResult;
538
530
  if (key === "installMode" && promptResult === "default") {
@@ -573,9 +565,7 @@ async function promptForMissingOptions(options, schemaPath, context = {}, explic
573
565
  }
574
566
  }
575
567
  if (key === "confirmLocalPath" && result.installationType === "local" && promptResult === false) {
576
- throw new Error(
577
- "Installation cancelled - please run from your project root"
578
- );
568
+ throw new Error("Installation cancelled - please run from your project root");
579
569
  }
580
570
  }
581
571
  }
@@ -671,6 +661,27 @@ async function promptForProperty(key, property, context, currentValues) {
671
661
  installationType
672
662
  );
673
663
  }
664
+ if (key === "skills" && context.availableSkills) {
665
+ const installationType = currentValues?.installationType;
666
+ let existingSet;
667
+ let otherLocationSet;
668
+ if (installationType === "global") {
669
+ existingSet = context.globalExistingSkills;
670
+ otherLocationSet = context.localExistingSkills;
671
+ } else if (installationType === "local") {
672
+ existingSet = context.localExistingSkills;
673
+ otherLocationSet = context.globalExistingSkills;
674
+ }
675
+ return await promptMultiSelectWithAll(
676
+ promptMessage,
677
+ context.availableSkills,
678
+ "skills",
679
+ context.skillDescriptions,
680
+ existingSet,
681
+ otherLocationSet,
682
+ installationType
683
+ );
684
+ }
674
685
  if (key === "addons" && context.availableAddons) {
675
686
  return await promptMultiSelectWithAll(
676
687
  promptMessage,
@@ -95,20 +95,12 @@ async function promptForMissingOptions(options, schemaPath, context = {}, explic
95
95
  continue;
96
96
  }
97
97
  if (property["prompt-when"]) {
98
- const shouldShow = evaluatePromptCondition(
99
- property["prompt-when"],
100
- result
101
- );
98
+ const shouldShow = evaluatePromptCondition(property["prompt-when"], result);
102
99
  if (!shouldShow) {
103
100
  continue;
104
101
  }
105
102
  }
106
- const promptResult = await promptForProperty(
107
- key,
108
- property,
109
- context,
110
- result
111
- );
103
+ const promptResult = await promptForProperty(key, property, context, result);
112
104
  if (promptResult !== void 0) {
113
105
  result[key] = promptResult;
114
106
  if (key === "installMode" && promptResult === "default") {
@@ -149,9 +141,7 @@ async function promptForMissingOptions(options, schemaPath, context = {}, explic
149
141
  }
150
142
  }
151
143
  if (key === "confirmLocalPath" && result.installationType === "local" && promptResult === false) {
152
- throw new Error(
153
- "Installation cancelled - please run from your project root"
154
- );
144
+ throw new Error("Installation cancelled - please run from your project root");
155
145
  }
156
146
  }
157
147
  }
@@ -247,6 +237,27 @@ async function promptForProperty(key, property, context, currentValues) {
247
237
  installationType
248
238
  );
249
239
  }
240
+ if (key === "skills" && context.availableSkills) {
241
+ const installationType = currentValues?.installationType;
242
+ let existingSet;
243
+ let otherLocationSet;
244
+ if (installationType === "global") {
245
+ existingSet = context.globalExistingSkills;
246
+ otherLocationSet = context.localExistingSkills;
247
+ } else if (installationType === "local") {
248
+ existingSet = context.localExistingSkills;
249
+ otherLocationSet = context.globalExistingSkills;
250
+ }
251
+ return await promptMultiSelectWithAll(
252
+ promptMessage,
253
+ context.availableSkills,
254
+ "skills",
255
+ context.skillDescriptions,
256
+ existingSet,
257
+ otherLocationSet,
258
+ installationType
259
+ );
260
+ }
250
261
  if (key === "addons" && context.availableAddons) {
251
262
  return await promptMultiSelectWithAll(
252
263
  promptMessage,
@@ -525,20 +525,12 @@ async function promptForMissingOptions(options, schemaPath, context = {}, explic
525
525
  continue;
526
526
  }
527
527
  if (property["prompt-when"]) {
528
- const shouldShow = evaluatePromptCondition(
529
- property["prompt-when"],
530
- result
531
- );
528
+ const shouldShow = evaluatePromptCondition(property["prompt-when"], result);
532
529
  if (!shouldShow) {
533
530
  continue;
534
531
  }
535
532
  }
536
- const promptResult = await promptForProperty(
537
- key,
538
- property,
539
- context,
540
- result
541
- );
533
+ const promptResult = await promptForProperty(key, property, context, result);
542
534
  if (promptResult !== void 0) {
543
535
  result[key] = promptResult;
544
536
  if (key === "installMode" && promptResult === "default") {
@@ -579,9 +571,7 @@ async function promptForMissingOptions(options, schemaPath, context = {}, explic
579
571
  }
580
572
  }
581
573
  if (key === "confirmLocalPath" && result.installationType === "local" && promptResult === false) {
582
- throw new Error(
583
- "Installation cancelled - please run from your project root"
584
- );
574
+ throw new Error("Installation cancelled - please run from your project root");
585
575
  }
586
576
  }
587
577
  }
@@ -677,6 +667,27 @@ async function promptForProperty(key, property, context, currentValues) {
677
667
  installationType
678
668
  );
679
669
  }
670
+ if (key === "skills" && context.availableSkills) {
671
+ const installationType = currentValues?.installationType;
672
+ let existingSet;
673
+ let otherLocationSet;
674
+ if (installationType === "global") {
675
+ existingSet = context.globalExistingSkills;
676
+ otherLocationSet = context.localExistingSkills;
677
+ } else if (installationType === "local") {
678
+ existingSet = context.localExistingSkills;
679
+ otherLocationSet = context.globalExistingSkills;
680
+ }
681
+ return await promptMultiSelectWithAll(
682
+ promptMessage,
683
+ context.availableSkills,
684
+ "skills",
685
+ context.skillDescriptions,
686
+ existingSet,
687
+ otherLocationSet,
688
+ installationType
689
+ );
690
+ }
680
691
  if (key === "addons" && context.availableAddons) {
681
692
  return await promptMultiSelectWithAll(
682
693
  promptMessage,
package/dist/index.cjs CHANGED
@@ -523,20 +523,12 @@ async function promptForMissingOptions(options, schemaPath, context = {}, explic
523
523
  continue;
524
524
  }
525
525
  if (property["prompt-when"]) {
526
- const shouldShow = evaluatePromptCondition(
527
- property["prompt-when"],
528
- result
529
- );
526
+ const shouldShow = evaluatePromptCondition(property["prompt-when"], result);
530
527
  if (!shouldShow) {
531
528
  continue;
532
529
  }
533
530
  }
534
- const promptResult = await promptForProperty(
535
- key,
536
- property,
537
- context,
538
- result
539
- );
531
+ const promptResult = await promptForProperty(key, property, context, result);
540
532
  if (promptResult !== void 0) {
541
533
  result[key] = promptResult;
542
534
  if (key === "installMode" && promptResult === "default") {
@@ -577,9 +569,7 @@ async function promptForMissingOptions(options, schemaPath, context = {}, explic
577
569
  }
578
570
  }
579
571
  if (key === "confirmLocalPath" && result.installationType === "local" && promptResult === false) {
580
- throw new Error(
581
- "Installation cancelled - please run from your project root"
582
- );
572
+ throw new Error("Installation cancelled - please run from your project root");
583
573
  }
584
574
  }
585
575
  }
@@ -675,6 +665,27 @@ async function promptForProperty(key, property, context, currentValues) {
675
665
  installationType
676
666
  );
677
667
  }
668
+ if (key === "skills" && context.availableSkills) {
669
+ const installationType = currentValues?.installationType;
670
+ let existingSet;
671
+ let otherLocationSet;
672
+ if (installationType === "global") {
673
+ existingSet = context.globalExistingSkills;
674
+ otherLocationSet = context.localExistingSkills;
675
+ } else if (installationType === "local") {
676
+ existingSet = context.localExistingSkills;
677
+ otherLocationSet = context.globalExistingSkills;
678
+ }
679
+ return await promptMultiSelectWithAll(
680
+ promptMessage,
681
+ context.availableSkills,
682
+ "skills",
683
+ context.skillDescriptions,
684
+ existingSet,
685
+ otherLocationSet,
686
+ installationType
687
+ );
688
+ }
678
689
  if (key === "addons" && context.availableAddons) {
679
690
  return await promptMultiSelectWithAll(
680
691
  promptMessage,
@@ -31,16 +31,21 @@ export interface Schema {
31
31
  export declare function promptForMissingOptions<T extends Record<string, any>>(options: T, schemaPath: string | Schema, context?: {
32
32
  availableCommands?: string[];
33
33
  availableAgents?: string[];
34
+ availableSkills?: string[];
34
35
  availableAddons?: string[];
35
36
  commandDescriptions?: Record<string, string>;
36
37
  agentDescriptions?: Record<string, string>;
38
+ skillDescriptions?: Record<string, string>;
37
39
  addonDescriptions?: Record<string, string>;
38
40
  globalExistingCommands?: Set<string>;
39
41
  globalExistingAgents?: Set<string>;
42
+ globalExistingSkills?: Set<string>;
40
43
  localExistingCommands?: Set<string>;
41
44
  localExistingAgents?: Set<string>;
45
+ localExistingSkills?: Set<string>;
42
46
  availablePackages?: string[];
43
47
  defaultCommands?: string[];
44
48
  defaultAgents?: string[];
49
+ defaultSkills?: string[];
45
50
  }, explicitlyProvidedOptions?: Map<string, any> | Set<string>): Promise<T>;
46
51
  //# sourceMappingURL=prompt-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prompt-utils.d.ts","sourceRoot":"","sources":["../../../../../src/utils/prompt-utils.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACzB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,UAAU,CAAC,EACP,MAAM,GACN;QACE,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,KAAK,CAAC;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACjD,CAAC;IACN,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,MAAM;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,wBAAsB,uBAAuB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzE,OAAO,EAAE,CAAC,EACV,UAAU,EAAE,MAAM,GAAG,MAAM,EAC3B,OAAO,GAAE;IAC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AM,CAAC,CAAC;IACrC,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnC,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnC,qBAAqB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACpC,mBAAmB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAClC,mBAAmB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAElC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE7B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,EACN,yBAAyB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,GACzD,OAAO,CAAC,CAAC,CAAC,CAkKZ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/ai-toolkit-nx-claude",
3
- "version": "0.5.26",
3
+ "version": "0.5.27-next.0",
4
4
  "private": false,
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.cjs",