@mastra/client-js 1.51.3-alpha.0 → 1.52.0-alpha.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.
@@ -3,7 +3,7 @@ name: mastra-client-js
3
3
  description: Documentation for @mastra/client-js. Use when working with @mastra/client-js APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/client-js"
6
- version: "1.51.3-alpha.0"
6
+ version: "1.52.0-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.51.3-alpha.0",
2
+ "version": "1.52.0-alpha.1",
3
3
  "package": "@mastra/client-js",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -5592,6 +5592,7 @@ var WorkspaceSkillResource = class extends BaseResource {
5592
5592
  * - Filesystem operations (read, write, list, delete, mkdir, stat)
5593
5593
  * - Search operations (search, index)
5594
5594
  * - Skills operations (list, get, search, references)
5595
+ * - skills.sh registry operations (search, popular, preview, install, remove, update)
5595
5596
  */
5596
5597
  var Workspace = class extends BaseResource {
5597
5598
  workspaceId;
@@ -5746,6 +5747,72 @@ var Workspace = class extends BaseResource {
5746
5747
  getSkill(skillName, skillPath) {
5747
5748
  return new WorkspaceSkillResource(this.options, this.workspaceId, skillName, skillPath);
5748
5749
  }
5750
+ skillsShQuery(params) {
5751
+ const searchParams = new URLSearchParams();
5752
+ for (const [key, value] of Object.entries(params)) if (value !== void 0) searchParams.set(key, String(value));
5753
+ const query = searchParams.toString();
5754
+ return query ? `?${query}` : "";
5755
+ }
5756
+ /**
5757
+ * Searches the skills.sh registry
5758
+ * @param params - Search query and optional result limit
5759
+ * @returns Promise containing matching skills
5760
+ */
5761
+ searchSkillsSh(params) {
5762
+ return this.request(`${this.basePath}/skills-sh/search${this.skillsShQuery(params)}`);
5763
+ }
5764
+ /**
5765
+ * Lists popular skills from the skills.sh registry
5766
+ * @param params - Optional pagination
5767
+ * @returns Promise containing popular skills
5768
+ */
5769
+ listPopularSkillsSh(params = {}) {
5770
+ return this.request(`${this.basePath}/skills-sh/popular${this.skillsShQuery(params)}`);
5771
+ }
5772
+ /**
5773
+ * Fetches the SKILL.md of a skills.sh skill without installing it
5774
+ * @param params - GitHub owner, repo and skill path
5775
+ * @returns Promise containing the SKILL.md content
5776
+ */
5777
+ previewSkillsSh(params) {
5778
+ return this.request(`${this.basePath}/skills-sh/preview${this.skillsShQuery(params)}`);
5779
+ }
5780
+ /**
5781
+ * Installs a skills.sh skill into the workspace filesystem
5782
+ * @param params - GitHub owner, repo, skill name and optional mount
5783
+ * @returns Promise containing the installed path and files written
5784
+ */
5785
+ installSkillsSh(params) {
5786
+ return this.request(`${this.basePath}/skills-sh/install`, {
5787
+ method: "POST",
5788
+ body: params,
5789
+ retries: 0
5790
+ });
5791
+ }
5792
+ /**
5793
+ * Removes an installed skills.sh skill from the workspace
5794
+ * @param params - Name of the skill to remove
5795
+ * @returns Promise containing the removed path
5796
+ */
5797
+ removeSkillsSh(params) {
5798
+ return this.request(`${this.basePath}/skills-sh/remove`, {
5799
+ method: "POST",
5800
+ body: params,
5801
+ retries: 0
5802
+ });
5803
+ }
5804
+ /**
5805
+ * Re-fetches installed skills.sh skills from GitHub
5806
+ * @param params - Optional skill name; omit to update all
5807
+ * @returns Promise containing per-skill update results
5808
+ */
5809
+ updateSkillsSh(params = {}) {
5810
+ return this.request(`${this.basePath}/skills-sh/update`, {
5811
+ method: "POST",
5812
+ body: params,
5813
+ retries: 0
5814
+ });
5815
+ }
5749
5816
  };
5750
5817
  //#endregion
5751
5818
  //#region src/resources/stored-skill.ts