@mastra/client-js 1.51.3-alpha.0 → 1.52.0-alpha.2
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/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-harness-signals.md +15 -1
- package/dist/index.cjs +67 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +67 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/workspace.d.ts +39 -1
- package/dist/resources/workspace.d.ts.map +1 -1
- package/dist/route-types.generated.d.ts +488 -438
- package/dist/route-types.generated.d.ts.map +1 -1
- package/dist/types.d.ts +30 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -5568,6 +5568,7 @@ var WorkspaceSkillResource = class extends BaseResource {
|
|
|
5568
5568
|
* - Filesystem operations (read, write, list, delete, mkdir, stat)
|
|
5569
5569
|
* - Search operations (search, index)
|
|
5570
5570
|
* - Skills operations (list, get, search, references)
|
|
5571
|
+
* - skills.sh registry operations (search, popular, preview, install, remove, update)
|
|
5571
5572
|
*/
|
|
5572
5573
|
var Workspace = class extends BaseResource {
|
|
5573
5574
|
workspaceId;
|
|
@@ -5722,6 +5723,72 @@ var Workspace = class extends BaseResource {
|
|
|
5722
5723
|
getSkill(skillName, skillPath) {
|
|
5723
5724
|
return new WorkspaceSkillResource(this.options, this.workspaceId, skillName, skillPath);
|
|
5724
5725
|
}
|
|
5726
|
+
skillsShQuery(params) {
|
|
5727
|
+
const searchParams = new URLSearchParams();
|
|
5728
|
+
for (const [key, value] of Object.entries(params)) if (value !== void 0) searchParams.set(key, String(value));
|
|
5729
|
+
const query = searchParams.toString();
|
|
5730
|
+
return query ? `?${query}` : "";
|
|
5731
|
+
}
|
|
5732
|
+
/**
|
|
5733
|
+
* Searches the skills.sh registry
|
|
5734
|
+
* @param params - Search query and optional result limit
|
|
5735
|
+
* @returns Promise containing matching skills
|
|
5736
|
+
*/
|
|
5737
|
+
searchSkillsSh(params) {
|
|
5738
|
+
return this.request(`${this.basePath}/skills-sh/search${this.skillsShQuery(params)}`);
|
|
5739
|
+
}
|
|
5740
|
+
/**
|
|
5741
|
+
* Lists popular skills from the skills.sh registry
|
|
5742
|
+
* @param params - Optional pagination
|
|
5743
|
+
* @returns Promise containing popular skills
|
|
5744
|
+
*/
|
|
5745
|
+
listPopularSkillsSh(params = {}) {
|
|
5746
|
+
return this.request(`${this.basePath}/skills-sh/popular${this.skillsShQuery(params)}`);
|
|
5747
|
+
}
|
|
5748
|
+
/**
|
|
5749
|
+
* Fetches the SKILL.md of a skills.sh skill without installing it
|
|
5750
|
+
* @param params - GitHub owner, repo and skill path
|
|
5751
|
+
* @returns Promise containing the SKILL.md content
|
|
5752
|
+
*/
|
|
5753
|
+
previewSkillsSh(params) {
|
|
5754
|
+
return this.request(`${this.basePath}/skills-sh/preview${this.skillsShQuery(params)}`);
|
|
5755
|
+
}
|
|
5756
|
+
/**
|
|
5757
|
+
* Installs a skills.sh skill into the workspace filesystem
|
|
5758
|
+
* @param params - GitHub owner, repo, skill name and optional mount
|
|
5759
|
+
* @returns Promise containing the installed path and files written
|
|
5760
|
+
*/
|
|
5761
|
+
installSkillsSh(params) {
|
|
5762
|
+
return this.request(`${this.basePath}/skills-sh/install`, {
|
|
5763
|
+
method: "POST",
|
|
5764
|
+
body: params,
|
|
5765
|
+
retries: 0
|
|
5766
|
+
});
|
|
5767
|
+
}
|
|
5768
|
+
/**
|
|
5769
|
+
* Removes an installed skills.sh skill from the workspace
|
|
5770
|
+
* @param params - Name of the skill to remove
|
|
5771
|
+
* @returns Promise containing the removed path
|
|
5772
|
+
*/
|
|
5773
|
+
removeSkillsSh(params) {
|
|
5774
|
+
return this.request(`${this.basePath}/skills-sh/remove`, {
|
|
5775
|
+
method: "POST",
|
|
5776
|
+
body: params,
|
|
5777
|
+
retries: 0
|
|
5778
|
+
});
|
|
5779
|
+
}
|
|
5780
|
+
/**
|
|
5781
|
+
* Re-fetches installed skills.sh skills from GitHub
|
|
5782
|
+
* @param params - Optional skill name; omit to update all
|
|
5783
|
+
* @returns Promise containing per-skill update results
|
|
5784
|
+
*/
|
|
5785
|
+
updateSkillsSh(params = {}) {
|
|
5786
|
+
return this.request(`${this.basePath}/skills-sh/update`, {
|
|
5787
|
+
method: "POST",
|
|
5788
|
+
body: params,
|
|
5789
|
+
retries: 0
|
|
5790
|
+
});
|
|
5791
|
+
}
|
|
5725
5792
|
};
|
|
5726
5793
|
//#endregion
|
|
5727
5794
|
//#region src/resources/stored-skill.ts
|