itismyskillmarket 1.3.41 → 1.3.42

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.
@@ -581,6 +581,56 @@ var SaitecAdapter = class extends BaseAdapter {
581
581
  }
582
582
  };
583
583
 
584
+ // src/adapters/codex.ts
585
+ import path9 from "path";
586
+ import os9 from "os";
587
+ import fs10 from "fs-extra";
588
+ var CodexAdapter = class extends BaseAdapter {
589
+ id = "codex";
590
+ name = "Codex CLI";
591
+ skillDir = path9.join(os9.homedir(), ".codex", "skills");
592
+ async isAvailable() {
593
+ if (process.env.CODEX_CLI) return true;
594
+ try {
595
+ return await fs10.pathExists(path9.join(os9.homedir(), ".codex"));
596
+ } catch {
597
+ return false;
598
+ }
599
+ }
600
+ async isInstalled(skillId) {
601
+ try {
602
+ return await fs10.pathExists(path9.join(this.skillDir, skillId));
603
+ } catch {
604
+ return false;
605
+ }
606
+ }
607
+ async install(skillId, sourceDir) {
608
+ await fs10.ensureDir(this.skillDir);
609
+ const targetDir = path9.join(this.skillDir, skillId);
610
+ if (await fs10.pathExists(targetDir)) {
611
+ await fs10.remove(targetDir);
612
+ }
613
+ await fs10.copy(sourceDir, targetDir, { recursive: true });
614
+ }
615
+ async uninstall(skillId) {
616
+ const targetDir = path9.join(this.skillDir, skillId);
617
+ if (await fs10.pathExists(targetDir)) {
618
+ await fs10.remove(targetDir);
619
+ }
620
+ }
621
+ async listInstalled() {
622
+ try {
623
+ if (!await fs10.pathExists(this.skillDir)) {
624
+ return [];
625
+ }
626
+ const entries = await fs10.readdir(this.skillDir, { withFileTypes: true });
627
+ return entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name);
628
+ } catch {
629
+ return [];
630
+ }
631
+ }
632
+ };
633
+
584
634
  // src/adapters/registry.ts
585
635
  var adapters = /* @__PURE__ */ new Map();
586
636
  function registerAdapters() {
@@ -590,12 +640,14 @@ function registerAdapters() {
590
640
  const openclaw = new OpenClawAdapter();
591
641
  const hermes = new HermesAdapter();
592
642
  const saitec = new SaitecAdapter();
643
+ const codex = new CodexAdapter();
593
644
  adapters.set(opencode.id, opencode);
594
645
  adapters.set(claude.id, claude);
595
646
  adapters.set(vscode.id, vscode);
596
647
  adapters.set(openclaw.id, openclaw);
597
648
  adapters.set(hermes.id, hermes);
598
649
  adapters.set(saitec.id, saitec);
650
+ adapters.set(codex.id, codex);
599
651
  }
600
652
  registerAdapters();
601
653
  async function detectPlatforms() {
@@ -617,8 +669,8 @@ function getAdapterByPlatform(platform) {
617
669
  vscode: "vscode",
618
670
  cursor: "opencode",
619
671
  // Cursor uses OpenCode-compatible structure
620
- codex: "opencode",
621
- // Codex uses OpenCode-compatible structure
672
+ codex: "codex",
673
+ // Codex has its own adapter
622
674
  antigravity: "opencode",
623
675
  // Antigravity uses OpenCode-compatible structure
624
676
  openclaw: "openclaw",
@@ -629,8 +681,8 @@ function getAdapterByPlatform(platform) {
629
681
  }
630
682
 
631
683
  // src/commands/install.ts
632
- import fs10 from "fs-extra";
633
- import path9 from "path";
684
+ import fs11 from "fs-extra";
685
+ import path10 from "path";
634
686
  import { exec } from "child_process";
635
687
  import { promisify } from "util";
636
688
  import * as tar from "tar";
@@ -642,11 +694,11 @@ async function installSkill(skillId, version, options) {
642
694
  if (options?.sourceDir) {
643
695
  console.log(`Installing ${skillId} from local source...`);
644
696
  pkgRoot = options.sourceDir;
645
- const pkgJsonPath = path9.join(pkgRoot, "package.json");
697
+ const pkgJsonPath = path10.join(pkgRoot, "package.json");
646
698
  targetVersion = version || "0.0.0";
647
- if (await fs10.pathExists(pkgJsonPath)) {
699
+ if (await fs11.pathExists(pkgJsonPath)) {
648
700
  try {
649
- const pkg = JSON.parse(await fs10.readFile(pkgJsonPath, "utf-8"));
701
+ const pkg = JSON.parse(await fs11.readFile(pkgJsonPath, "utf-8"));
650
702
  if (pkg.version) targetVersion = pkg.version;
651
703
  } catch {
652
704
  }
@@ -663,20 +715,20 @@ async function installSkill(skillId, version, options) {
663
715
  throw new Error(`No version found for ${packageName}`);
664
716
  }
665
717
  const cacheDir = getCacheDir();
666
- const targetDir = path9.join(cacheDir, `${packageName}@${targetVersion}`);
667
- if (!await fs10.pathExists(targetDir)) {
718
+ const targetDir = path10.join(cacheDir, `${packageName}@${targetVersion}`);
719
+ if (!await fs11.pathExists(targetDir)) {
668
720
  console.log("Downloading package...");
669
- await fs10.ensureDir(cacheDir);
721
+ await fs11.ensureDir(cacheDir);
670
722
  try {
671
723
  const { stdout } = await execAsync(
672
724
  `npm pack ${packageName}@${targetVersion} --pack-destination "${cacheDir}"`
673
725
  );
674
726
  const tarballName = stdout.trim();
675
- const tarballPath = path9.join(cacheDir, tarballName);
676
- if (await fs10.pathExists(tarballPath)) {
727
+ const tarballPath = path10.join(cacheDir, tarballName);
728
+ if (await fs11.pathExists(tarballPath)) {
677
729
  await tar.extract({ file: tarballPath, cwd: cacheDir });
678
- await fs10.remove(tarballPath);
679
- await fs10.move(path9.join(cacheDir, "package"), targetDir, { overwrite: true });
730
+ await fs11.remove(tarballPath);
731
+ await fs11.move(path10.join(cacheDir, "package"), targetDir, { overwrite: true });
680
732
  }
681
733
  } catch (err) {
682
734
  throw new Error(`Failed to download package: ${err}`);
@@ -685,29 +737,29 @@ async function installSkill(skillId, version, options) {
685
737
  pkgRoot = targetDir;
686
738
  }
687
739
  const skillsDir = getSkillsDir();
688
- const skillVersionDir = path9.join(skillsDir, `${skillId}@${targetVersion}`);
740
+ const skillVersionDir = path10.join(skillsDir, `${skillId}@${targetVersion}`);
689
741
  console.log("Setting up skill...");
690
- await fs10.ensureDir(skillVersionDir);
691
- if (await fs10.pathExists(path9.join(pkgRoot, "SKILL.md"))) {
692
- await fs10.copy(
693
- path9.join(pkgRoot, "SKILL.md"),
694
- path9.join(skillVersionDir, "SKILL.md")
742
+ await fs11.ensureDir(skillVersionDir);
743
+ if (await fs11.pathExists(path10.join(pkgRoot, "SKILL.md"))) {
744
+ await fs11.copy(
745
+ path10.join(pkgRoot, "SKILL.md"),
746
+ path10.join(skillVersionDir, "SKILL.md")
695
747
  );
696
748
  }
697
- if (await fs10.pathExists(path9.join(pkgRoot, "metadata.json"))) {
698
- await fs10.copy(
699
- path9.join(pkgRoot, "metadata.json"),
700
- path9.join(skillVersionDir, "metadata.json")
749
+ if (await fs11.pathExists(path10.join(pkgRoot, "metadata.json"))) {
750
+ await fs11.copy(
751
+ path10.join(pkgRoot, "metadata.json"),
752
+ path10.join(skillVersionDir, "metadata.json")
701
753
  );
702
754
  }
703
- const skillDir = path9.join(skillsDir, skillId);
704
- await fs10.ensureDir(skillDir);
705
- const latestLink = path9.join(skillDir, LATEST_LINK);
755
+ const skillDir = path10.join(skillsDir, skillId);
756
+ await fs11.ensureDir(skillDir);
757
+ const latestLink = path10.join(skillDir, LATEST_LINK);
706
758
  try {
707
- await fs10.remove(latestLink);
708
- await fs10.symlink(skillVersionDir, latestLink, "junction");
759
+ await fs11.remove(latestLink);
760
+ await fs11.symlink(skillVersionDir, latestLink, "junction");
709
761
  } catch {
710
- await fs10.copy(skillVersionDir, path9.join(skillDir, LATEST_LINK), { overwrite: true });
762
+ await fs11.copy(skillVersionDir, path10.join(skillDir, LATEST_LINK), { overwrite: true });
711
763
  }
712
764
  let targetAdapters = [];
713
765
  if (options?.platforms && options.platforms.length > 0) {
@@ -768,8 +820,8 @@ Installing to ${targetAdapters.length} platform(s)...
768
820
  }
769
821
 
770
822
  // src/commands/uninstall.ts
771
- import fs11 from "fs-extra";
772
- import path10 from "path";
823
+ import fs12 from "fs-extra";
824
+ import path11 from "path";
773
825
  import readline from "readline";
774
826
  async function askConfirmation(message) {
775
827
  const rl = readline.createInterface({
@@ -794,12 +846,12 @@ async function getUninstallPreview(skillId, options) {
794
846
  platformNames = adapters2.map((a) => a.name);
795
847
  }
796
848
  const skillsDir = getSkillsDir();
797
- const localPath = path10.join(skillsDir, skillId);
849
+ const localPath = path11.join(skillsDir, skillId);
798
850
  const platformLinksDir = getPlatformLinksDir();
799
851
  const platformLinks = [];
800
852
  for (const platform of PLATFORMS) {
801
- const linkPath = path10.join(platformLinksDir, platform, "skills", skillId);
802
- if (await fs11.pathExists(linkPath)) {
853
+ const linkPath = path11.join(platformLinksDir, platform, "skills", skillId);
854
+ if (await fs12.pathExists(linkPath)) {
803
855
  platformLinks.push(linkPath);
804
856
  }
805
857
  }
@@ -878,17 +930,17 @@ Uninstalling from ${validAdapters.length} platform(s)...
878
930
  }
879
931
  }
880
932
  const skillsDir = getSkillsDir();
881
- const skillDir = path10.join(skillsDir, skillId);
882
- if (await fs11.pathExists(skillDir)) {
883
- await fs11.remove(skillDir);
933
+ const skillDir = path11.join(skillsDir, skillId);
934
+ if (await fs12.pathExists(skillDir)) {
935
+ await fs12.remove(skillDir);
884
936
  console.log(`\u2705 Removed local files: ${skillDir}`);
885
937
  }
886
938
  const platformLinksDir = getPlatformLinksDir();
887
939
  let removedLinks = 0;
888
940
  for (const platform of PLATFORMS) {
889
- const linkPath = path10.join(platformLinksDir, platform, "skills", skillId);
890
- if (await fs11.pathExists(linkPath)) {
891
- await fs11.remove(linkPath);
941
+ const linkPath = path11.join(platformLinksDir, platform, "skills", skillId);
942
+ if (await fs12.pathExists(linkPath)) {
943
+ await fs12.remove(linkPath);
892
944
  removedLinks++;
893
945
  }
894
946
  }
@@ -1597,9 +1649,9 @@ async function adminAccess(skillId, level) {
1597
1649
  }
1598
1650
 
1599
1651
  // src/commands/config.ts
1600
- import path11 from "path";
1601
- import fs12 from "fs-extra";
1602
- import os9 from "os";
1652
+ import path12 from "path";
1653
+ import fs13 from "fs-extra";
1654
+ import os10 from "os";
1603
1655
  var CONFIG_DEFINITIONS = [
1604
1656
  {
1605
1657
  key: "npmScope",
@@ -1633,13 +1685,13 @@ var CONFIG_DEFINITIONS = [
1633
1685
  }
1634
1686
  ];
1635
1687
  function getConfigPath() {
1636
- return path11.join(os9.homedir(), ".skillmarket", "config.json");
1688
+ return path12.join(os10.homedir(), ".skillmarket", "config.json");
1637
1689
  }
1638
1690
  async function readConfigFile() {
1639
1691
  try {
1640
1692
  const configPath = getConfigPath();
1641
- if (await fs12.pathExists(configPath)) {
1642
- const data = await fs12.readJson(configPath);
1693
+ if (await fs13.pathExists(configPath)) {
1694
+ const data = await fs13.readJson(configPath);
1643
1695
  const valid = {};
1644
1696
  for (const def of CONFIG_DEFINITIONS) {
1645
1697
  if (data[def.key] !== void 0) {
@@ -1654,11 +1706,11 @@ async function readConfigFile() {
1654
1706
  }
1655
1707
  async function writeConfigFile(updates) {
1656
1708
  const configPath = getConfigPath();
1657
- await fs12.ensureDir(path11.dirname(configPath));
1709
+ await fs13.ensureDir(path12.dirname(configPath));
1658
1710
  let existing = {};
1659
1711
  try {
1660
- if (await fs12.pathExists(configPath)) {
1661
- existing = await fs12.readJson(configPath);
1712
+ if (await fs13.pathExists(configPath)) {
1713
+ existing = await fs13.readJson(configPath);
1662
1714
  }
1663
1715
  } catch {
1664
1716
  }
@@ -1668,25 +1720,25 @@ async function writeConfigFile(updates) {
1668
1720
  delete merged[key];
1669
1721
  }
1670
1722
  }
1671
- await fs12.writeJson(configPath, merged, { spaces: 2 });
1723
+ await fs13.writeJson(configPath, merged, { spaces: 2 });
1672
1724
  return merged;
1673
1725
  }
1674
1726
  async function removeConfigKeys(keys) {
1675
1727
  const configPath = getConfigPath();
1676
- if (!await fs12.pathExists(configPath)) return;
1728
+ if (!await fs13.pathExists(configPath)) return;
1677
1729
  try {
1678
- const existing = await fs12.readJson(configPath);
1730
+ const existing = await fs13.readJson(configPath);
1679
1731
  for (const key of keys) {
1680
1732
  delete existing[key];
1681
1733
  }
1682
- await fs12.writeJson(configPath, existing, { spaces: 2 });
1734
+ await fs13.writeJson(configPath, existing, { spaces: 2 });
1683
1735
  } catch {
1684
1736
  }
1685
1737
  }
1686
1738
  async function removeConfigFile() {
1687
1739
  const configPath = getConfigPath();
1688
- if (await fs12.pathExists(configPath)) {
1689
- await fs12.remove(configPath);
1740
+ if (await fs13.pathExists(configPath)) {
1741
+ await fs13.remove(configPath);
1690
1742
  }
1691
1743
  }
1692
1744
  async function getAllConfig() {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  startGuiServer
4
- } from "./chunk-XQ653HCI.js";
4
+ } from "./chunk-76RGF4GX.js";
5
5
  export {
6
6
  startGuiServer
7
7
  };
package/dist/index.js CHANGED
@@ -38,7 +38,7 @@ import {
38
38
  uninstallAll,
39
39
  uninstallSkill,
40
40
  updateSkill
41
- } from "./chunk-XQ653HCI.js";
41
+ } from "./chunk-76RGF4GX.js";
42
42
 
43
43
  // src/cli.ts
44
44
  import { Command } from "commander";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itismyskillmarket",
3
- "version": "1.3.41",
3
+ "version": "1.3.42",
4
4
  "description": "Cross-platform skill manager for AI coding tools",
5
5
  "type": "module",
6
6
  "bin": {