@aexol/opencode-wizard 0.3.11 → 0.3.13

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/README.md CHANGED
@@ -24,6 +24,7 @@ npm run typecheck
24
24
  npm run test
25
25
  npm run build
26
26
  npm run release:check
27
+ npm pack --dry-run
27
28
  ```
28
29
 
29
30
  ## Published package usage
@@ -81,4 +82,6 @@ Editors can import external artifacts without writing project files via `opencod
81
82
  3. If you are following the repo release-tag convention, create Git tag `plugin-opencode-wizard-v<version>`.
82
83
  4. Push the release commit/tag so GitLab can run the shared npm public publish job.
83
84
 
84
- The CI publish job comes from `ci/templates/node/npm-publish-public.yml`, stays manual on the repo `deploy` stage, runs from `plugin/opencode-wizard` via `APP_ROOT`, builds the package with `npm run build --if-present`, deletes the inherited `@aexol` GitLab registry override, and then publishes `@aexol/opencode-wizard` with `npm publish --access public --registry https://registry.npmjs.org/`.
85
+ The CI publish job comes from `ci/templates/node/npm-publish-public.yml`, stays manual on the repo `deploy` stage, runs from `plugin/opencode-wizard` via `APP_ROOT`, runs `npm run release:check` including `npm pack --dry-run`, deletes the inherited `@aexol` GitLab registry override, packs the exact release tarball with `npm pack`, and publishes that tarball with `npm publish --provenance --access public --registry https://registry.npmjs.org/ ./*.tgz`.
86
+
87
+ GitLab provides a `SIGSTORE_ID_TOKEN` (`aud: sigstore`) for npm provenance, and the packed `*.tgz` is retained as a 30-day job artifact. The current flow still requires the existing `NPM_AUTH_TOKEN`; npm trusted publishing for GitLab would be the stronger future option once configured because it can remove the long-lived npm token. After release, `npm audit signatures` from a throwaway install is an optional registry verification check.
@@ -1,9 +1,9 @@
1
- export declare const PUBLISHED_SKILLS_CATALOG_QUERY = "\n query PluginPublishedSkills($input: PublishedSkillsDeliveryInput!) {\n pluginPublishedSkills(input: $input) {\n workspace {\n id\n slug\n name\n repositoryUrl\n defaultBranch\n status\n }\n directoryPath\n skills {\n \n assignmentSource\n assignmentType\n scopePath\n includeChildren\n \n skill {\n id\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n tags {\n id\n slug\n label\n description\n facet {\n id\n slug\n label\n description\n }\n }\n }\n skillVersion {\n id\n version\n title\n summary\n status\n }\n publishedArtifact {\n id\n frontmatterName\n frontmatterDescription\n checksum\n publishedAt\n fileCount\n }\n\n\n }\n catalogSkills {\n \n skill {\n id\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n tags {\n id\n slug\n label\n description\n facet {\n id\n slug\n label\n description\n }\n }\n }\n skillVersion {\n id\n version\n title\n summary\n status\n }\n publishedArtifact {\n id\n frontmatterName\n frontmatterDescription\n checksum\n publishedAt\n fileCount\n }\n\n }\n userPreferences {\n scopeKey\n userKey\n ignoredSkills {\n \n assignmentSource\n assignmentType\n scopePath\n includeChildren\n \n skill {\n id\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n tags {\n id\n slug\n label\n description\n facet {\n id\n slug\n label\n description\n }\n }\n }\n skillVersion {\n id\n version\n title\n summary\n status\n }\n publishedArtifact {\n id\n frontmatterName\n frontmatterDescription\n checksum\n publishedAt\n fileCount\n }\n\n\n }\n }\n }\n }\n";
2
- export declare const SET_PUBLISHED_SKILL_PREFERENCE_MUTATION = "\n mutation SetPublishedSkillPreference($input: SetPublishedSkillPreferenceInput!) {\n setPublishedSkillPreference(input: $input) {\n scopeKey\n userKey\n ignoredSkills {\n \n assignmentSource\n assignmentType\n scopePath\n includeChildren\n \n skill {\n id\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n tags {\n id\n slug\n label\n description\n facet {\n id\n slug\n label\n description\n }\n }\n }\n skillVersion {\n id\n version\n title\n summary\n status\n }\n publishedArtifact {\n id\n frontmatterName\n frontmatterDescription\n checksum\n publishedAt\n fileCount\n }\n\n\n }\n }\n }\n";
1
+ export declare const PUBLISHED_SKILLS_CATALOG_QUERY = "\n query PluginPublishedSkills($input: PublishedSkillsDeliveryInput!) {\n pluginPublishedSkills(input: $input) {\n workspace {\n id\n slug\n name\n repositoryUrl\n defaultBranch\n status\n }\n directoryPath\n skills {\n \n assignmentSource\n assignmentType\n scopePath\n includeChildren\n relevance\n recommendationReason\n \n skill {\n id\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n tags {\n id\n slug\n label\n description\n facet {\n id\n slug\n label\n description\n }\n }\n }\n skillVersion {\n id\n version\n title\n summary\n status\n }\n publishedArtifact {\n id\n frontmatterName\n frontmatterDescription\n checksum\n publishedAt\n fileCount\n }\n\n\n }\n catalogSkills {\n \n relevance\n recommendationReason\n \n skill {\n id\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n tags {\n id\n slug\n label\n description\n facet {\n id\n slug\n label\n description\n }\n }\n }\n skillVersion {\n id\n version\n title\n summary\n status\n }\n publishedArtifact {\n id\n frontmatterName\n frontmatterDescription\n checksum\n publishedAt\n fileCount\n }\n\n\n }\n userPreferences {\n scopeKey\n userKey\n ignoredSkills {\n \n assignmentSource\n assignmentType\n scopePath\n includeChildren\n relevance\n recommendationReason\n \n skill {\n id\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n tags {\n id\n slug\n label\n description\n facet {\n id\n slug\n label\n description\n }\n }\n }\n skillVersion {\n id\n version\n title\n summary\n status\n }\n publishedArtifact {\n id\n frontmatterName\n frontmatterDescription\n checksum\n publishedAt\n fileCount\n }\n\n\n }\n }\n }\n }\n";
2
+ export declare const SET_PUBLISHED_SKILL_PREFERENCE_MUTATION = "\n mutation SetPublishedSkillPreference($input: SetPublishedSkillPreferenceInput!) {\n setPublishedSkillPreference(input: $input) {\n scopeKey\n userKey\n ignoredSkills {\n \n assignmentSource\n assignmentType\n scopePath\n includeChildren\n relevance\n recommendationReason\n \n skill {\n id\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n tags {\n id\n slug\n label\n description\n facet {\n id\n slug\n label\n description\n }\n }\n }\n skillVersion {\n id\n version\n title\n summary\n status\n }\n publishedArtifact {\n id\n frontmatterName\n frontmatterDescription\n checksum\n publishedAt\n fileCount\n }\n\n\n }\n }\n }\n";
3
3
  export declare const PUBLISHED_SKILL_DETAIL_QUERY = "\n query PluginPublishedSkillVersionArtifact($input: PublishedSkillArtifactDetailInput!) {\n pluginPublishedSkillVersionArtifact(input: $input) {\n id\n frontmatterName\n frontmatterDescription\n markdownBody\n renderedContent\n checksum\n publishedAt\n fileCount\n files {\n id\n relativePath\n contentType\n content\n checksum\n size\n sortOrder\n }\n }\n }\n";
4
- export declare const WIZARD_ARTIFACTS_CATALOG_QUERY = "\n query PluginWizardArtifacts($input: WizardArtifactsDeliveryInput!) {\n pluginWizardArtifacts(input: $input) {\n artifactKind\n workspace {\n id\n slug\n name\n repositoryUrl\n defaultBranch\n status\n }\n directoryPath\n artifacts {\n \n assignmentSource\n assignmentType\n scopePath\n includeChildren\n \n artifact {\n id\n kind\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n }\n artifactVersion {\n id\n version\n title\n summary\n status\n frontmatterName\n frontmatterDescription\n checksum\n revision\n updatedAtCursor\n canonicalFilePath\n publishedAt\n fileCount\n }\n\n\n }\n catalogArtifacts {\n \n artifact {\n id\n kind\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n }\n artifactVersion {\n id\n version\n title\n summary\n status\n frontmatterName\n frontmatterDescription\n checksum\n revision\n updatedAtCursor\n canonicalFilePath\n publishedAt\n fileCount\n }\n\n }\n artifactPreferences {\n scopeKey\n userKey\n ignoredArtifacts {\n \n assignmentSource\n assignmentType\n scopePath\n includeChildren\n \n artifact {\n id\n kind\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n }\n artifactVersion {\n id\n version\n title\n summary\n status\n frontmatterName\n frontmatterDescription\n checksum\n revision\n updatedAtCursor\n canonicalFilePath\n publishedAt\n fileCount\n }\n\n\n }\n }\n unsupportedReason\n message\n }\n }\n";
4
+ export declare const WIZARD_ARTIFACTS_CATALOG_QUERY = "\n query PluginWizardArtifacts($input: WizardArtifactsDeliveryInput!) {\n pluginWizardArtifacts(input: $input) {\n artifactKind\n workspace {\n id\n slug\n name\n repositoryUrl\n defaultBranch\n status\n }\n directoryPath\n artifacts {\n \n assignmentSource\n assignmentType\n scopePath\n includeChildren\n relevance\n recommendationReason\n \n artifact {\n id\n kind\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n }\n artifactVersion {\n id\n version\n title\n summary\n status\n frontmatterName\n frontmatterDescription\n checksum\n revision\n updatedAtCursor\n canonicalFilePath\n publishedAt\n fileCount\n }\n\n\n }\n catalogArtifacts {\n \n relevance\n recommendationReason\n \n artifact {\n id\n kind\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n }\n artifactVersion {\n id\n version\n title\n summary\n status\n frontmatterName\n frontmatterDescription\n checksum\n revision\n updatedAtCursor\n canonicalFilePath\n publishedAt\n fileCount\n }\n\n\n }\n artifactPreferences {\n scopeKey\n userKey\n ignoredArtifacts {\n \n assignmentSource\n assignmentType\n scopePath\n includeChildren\n relevance\n recommendationReason\n \n artifact {\n id\n kind\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n }\n artifactVersion {\n id\n version\n title\n summary\n status\n frontmatterName\n frontmatterDescription\n checksum\n revision\n updatedAtCursor\n canonicalFilePath\n publishedAt\n fileCount\n }\n\n\n }\n }\n unsupportedReason\n message\n }\n }\n";
5
5
  export declare const WIZARD_ARTIFACT_DETAIL_QUERY = "\n query PluginWizardArtifactVersion($input: WizardArtifactDetailInput!) {\n pluginWizardArtifactVersion(input: $input) {\n id\n artifact {\n id\n kind\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n }\n version\n title\n summary\n status\n frontmatterName\n frontmatterDescription\n markdownBody\n renderedContent\n checksum\n revision\n updatedAtCursor\n canonicalFilePath\n publishedAt\n fileCount\n files {\n id\n relativePath\n contentType\n content\n checksum\n size\n sortOrder\n }\n }\n }\n";
6
6
  export declare const CURRENT_USER_ROLE_QUERY = "\n query PluginCurrentUserRole {\n user {\n me {\n _id\n email\n role\n }\n }\n }\n";
7
- export declare const SET_WIZARD_ARTIFACT_PREFERENCE_MUTATION = "\n mutation SetWizardArtifactPreference($input: SetWizardArtifactPreferenceInput!) {\n setWizardArtifactPreference(input: $input) {\n scopeKey\n userKey\n ignoredArtifacts {\n \n assignmentSource\n assignmentType\n scopePath\n includeChildren\n \n artifact {\n id\n kind\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n }\n artifactVersion {\n id\n version\n title\n summary\n status\n frontmatterName\n frontmatterDescription\n checksum\n revision\n updatedAtCursor\n canonicalFilePath\n publishedAt\n fileCount\n }\n\n\n }\n }\n }\n";
7
+ export declare const SET_WIZARD_ARTIFACT_PREFERENCE_MUTATION = "\n mutation SetWizardArtifactPreference($input: SetWizardArtifactPreferenceInput!) {\n setWizardArtifactPreference(input: $input) {\n scopeKey\n userKey\n ignoredArtifacts {\n \n assignmentSource\n assignmentType\n scopePath\n includeChildren\n relevance\n recommendationReason\n \n artifact {\n id\n kind\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n }\n artifactVersion {\n id\n version\n title\n summary\n status\n frontmatterName\n frontmatterDescription\n checksum\n revision\n updatedAtCursor\n canonicalFilePath\n publishedAt\n fileCount\n }\n\n\n }\n }\n }\n";
8
8
  export declare const CREATE_OR_UPDATE_SKILL_FROM_MARKDOWN_MUTATION = "\n mutation CreateOrUpdateSkillFromMarkdown($markdownContent: String!) {\n admin {\n createOrUpdateSkillFromMarkdown(markdownContent: $markdownContent) {\n success\n skillSlug\n skillVersionId\n artifactSlug\n artifactVersionId\n errors\n }\n }\n }\n";
9
9
  export declare const IMPORT_WIZARD_ARTIFACT_SNAPSHOT_MUTATION = "\n mutation ImportWizardArtifactSnapshot($input: ImportWizardArtifactSnapshotInput!) {\n importWizardArtifactSnapshot(input: $input) {\n success\n skillSlug\n skillVersionId\n artifactSlug\n artifactVersionId\n errors\n }\n }\n";
@@ -41,6 +41,13 @@ const PUBLISHED_SKILL_ASSIGNMENT_FIELDS = `
41
41
  assignmentType
42
42
  scopePath
43
43
  includeChildren
44
+ relevance
45
+ recommendationReason
46
+ ${PUBLISHED_SKILL_CORE_FIELDS}
47
+ `;
48
+ const PUBLISHED_SKILL_INSTALLABLE_FIELDS = `
49
+ relevance
50
+ recommendationReason
44
51
  ${PUBLISHED_SKILL_CORE_FIELDS}
45
52
  `;
46
53
  export const PUBLISHED_SKILLS_CATALOG_QUERY = `
@@ -59,7 +66,7 @@ export const PUBLISHED_SKILLS_CATALOG_QUERY = `
59
66
  ${PUBLISHED_SKILL_ASSIGNMENT_FIELDS}
60
67
  }
61
68
  catalogSkills {
62
- ${PUBLISHED_SKILL_CORE_FIELDS}
69
+ ${PUBLISHED_SKILL_INSTALLABLE_FIELDS}
63
70
  }
64
71
  userPreferences {
65
72
  scopeKey
@@ -137,6 +144,13 @@ const WIZARD_ARTIFACT_ASSIGNMENT_FIELDS = `
137
144
  assignmentType
138
145
  scopePath
139
146
  includeChildren
147
+ relevance
148
+ recommendationReason
149
+ ${WIZARD_ARTIFACT_CORE_FIELDS}
150
+ `;
151
+ const WIZARD_ARTIFACT_INSTALLABLE_FIELDS = `
152
+ relevance
153
+ recommendationReason
140
154
  ${WIZARD_ARTIFACT_CORE_FIELDS}
141
155
  `;
142
156
  export const WIZARD_ARTIFACTS_CATALOG_QUERY = `
@@ -156,7 +170,7 @@ export const WIZARD_ARTIFACTS_CATALOG_QUERY = `
156
170
  ${WIZARD_ARTIFACT_ASSIGNMENT_FIELDS}
157
171
  }
158
172
  catalogArtifacts {
159
- ${WIZARD_ARTIFACT_CORE_FIELDS}
173
+ ${WIZARD_ARTIFACT_INSTALLABLE_FIELDS}
160
174
  }
161
175
  artifactPreferences {
162
176
  scopeKey
@@ -1 +1 @@
1
- {"version":3,"names":["PUBLISHED_SKILL_CORE_FIELDS","PUBLISHED_SKILL_ASSIGNMENT_FIELDS","PUBLISHED_SKILLS_CATALOG_QUERY","SET_PUBLISHED_SKILL_PREFERENCE_MUTATION","PUBLISHED_SKILL_DETAIL_QUERY","WIZARD_ARTIFACT_CORE_FIELDS","WIZARD_ARTIFACT_ASSIGNMENT_FIELDS","WIZARD_ARTIFACTS_CATALOG_QUERY","WIZARD_ARTIFACT_DETAIL_QUERY","CURRENT_USER_ROLE_QUERY","SET_WIZARD_ARTIFACT_PREFERENCE_MUTATION","CREATE_OR_UPDATE_SKILL_FROM_MARKDOWN_MUTATION","IMPORT_WIZARD_ARTIFACT_SNAPSHOT_MUTATION"],"sources":["../src/graphql-operations.ts"],"sourcesContent":["const PUBLISHED_SKILL_CORE_FIELDS = `\n skill {\n id\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n tags {\n id\n slug\n label\n description\n facet {\n id\n slug\n label\n description\n }\n }\n }\n skillVersion {\n id\n version\n title\n summary\n status\n }\n publishedArtifact {\n id\n frontmatterName\n frontmatterDescription\n checksum\n publishedAt\n fileCount\n }\n`;\n\nconst PUBLISHED_SKILL_ASSIGNMENT_FIELDS = `\n assignmentSource\n assignmentType\n scopePath\n includeChildren\n ${PUBLISHED_SKILL_CORE_FIELDS}\n`;\n\nexport const PUBLISHED_SKILLS_CATALOG_QUERY = `\n query PluginPublishedSkills($input: PublishedSkillsDeliveryInput!) {\n pluginPublishedSkills(input: $input) {\n workspace {\n id\n slug\n name\n repositoryUrl\n defaultBranch\n status\n }\n directoryPath\n skills {\n ${PUBLISHED_SKILL_ASSIGNMENT_FIELDS}\n }\n catalogSkills {\n ${PUBLISHED_SKILL_CORE_FIELDS}\n }\n userPreferences {\n scopeKey\n userKey\n ignoredSkills {\n ${PUBLISHED_SKILL_ASSIGNMENT_FIELDS}\n }\n }\n }\n }\n`;\n\nexport const SET_PUBLISHED_SKILL_PREFERENCE_MUTATION = `\n mutation SetPublishedSkillPreference($input: SetPublishedSkillPreferenceInput!) {\n setPublishedSkillPreference(input: $input) {\n scopeKey\n userKey\n ignoredSkills {\n ${PUBLISHED_SKILL_ASSIGNMENT_FIELDS}\n }\n }\n }\n`;\n\nexport const PUBLISHED_SKILL_DETAIL_QUERY = `\n query PluginPublishedSkillVersionArtifact($input: PublishedSkillArtifactDetailInput!) {\n pluginPublishedSkillVersionArtifact(input: $input) {\n id\n frontmatterName\n frontmatterDescription\n markdownBody\n renderedContent\n checksum\n publishedAt\n fileCount\n files {\n id\n relativePath\n contentType\n content\n checksum\n size\n sortOrder\n }\n }\n }\n`;\n\nconst WIZARD_ARTIFACT_CORE_FIELDS = `\n artifact {\n id\n kind\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n }\n artifactVersion {\n id\n version\n title\n summary\n status\n frontmatterName\n frontmatterDescription\n checksum\n revision\n updatedAtCursor\n canonicalFilePath\n publishedAt\n fileCount\n }\n`;\n\nconst WIZARD_ARTIFACT_ASSIGNMENT_FIELDS = `\n assignmentSource\n assignmentType\n scopePath\n includeChildren\n ${WIZARD_ARTIFACT_CORE_FIELDS}\n`;\n\nexport const WIZARD_ARTIFACTS_CATALOG_QUERY = `\n query PluginWizardArtifacts($input: WizardArtifactsDeliveryInput!) {\n pluginWizardArtifacts(input: $input) {\n artifactKind\n workspace {\n id\n slug\n name\n repositoryUrl\n defaultBranch\n status\n }\n directoryPath\n artifacts {\n ${WIZARD_ARTIFACT_ASSIGNMENT_FIELDS}\n }\n catalogArtifacts {\n ${WIZARD_ARTIFACT_CORE_FIELDS}\n }\n artifactPreferences {\n scopeKey\n userKey\n ignoredArtifacts {\n ${WIZARD_ARTIFACT_ASSIGNMENT_FIELDS}\n }\n }\n unsupportedReason\n message\n }\n }\n`;\n\nexport const WIZARD_ARTIFACT_DETAIL_QUERY = `\n query PluginWizardArtifactVersion($input: WizardArtifactDetailInput!) {\n pluginWizardArtifactVersion(input: $input) {\n id\n artifact {\n id\n kind\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n }\n version\n title\n summary\n status\n frontmatterName\n frontmatterDescription\n markdownBody\n renderedContent\n checksum\n revision\n updatedAtCursor\n canonicalFilePath\n publishedAt\n fileCount\n files {\n id\n relativePath\n contentType\n content\n checksum\n size\n sortOrder\n }\n }\n }\n`;\n\nexport const CURRENT_USER_ROLE_QUERY = `\n query PluginCurrentUserRole {\n user {\n me {\n _id\n email\n role\n }\n }\n }\n`;\n\nexport const SET_WIZARD_ARTIFACT_PREFERENCE_MUTATION = `\n mutation SetWizardArtifactPreference($input: SetWizardArtifactPreferenceInput!) {\n setWizardArtifactPreference(input: $input) {\n scopeKey\n userKey\n ignoredArtifacts {\n ${WIZARD_ARTIFACT_ASSIGNMENT_FIELDS}\n }\n }\n }\n`;\n\nexport const CREATE_OR_UPDATE_SKILL_FROM_MARKDOWN_MUTATION = `\n mutation CreateOrUpdateSkillFromMarkdown($markdownContent: String!) {\n admin {\n createOrUpdateSkillFromMarkdown(markdownContent: $markdownContent) {\n success\n skillSlug\n skillVersionId\n artifactSlug\n artifactVersionId\n errors\n }\n }\n }\n`;\n\nexport const IMPORT_WIZARD_ARTIFACT_SNAPSHOT_MUTATION = `\n mutation ImportWizardArtifactSnapshot($input: ImportWizardArtifactSnapshotInput!) {\n importWizardArtifactSnapshot(input: $input) {\n success\n skillSlug\n skillVersionId\n artifactSlug\n artifactVersionId\n errors\n }\n }\n`;\n"],"mappings":"AAAA,MAAMA,2BAA2B,GAAG;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMC,iCAAiC,GAAG;AAC1C;AACA;AACA;AACA;AACA,IAAID,2BAA2B;AAC/B,CAAC;AAED,OAAO,MAAME,8BAA8B,GAAG;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAUD,iCAAiC;AAC3C;AACA;AACA,UAAUD,2BAA2B;AACrC;AACA;AACA;AACA;AACA;AACA,YAAYC,iCAAiC;AAC7C;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAME,uCAAuC,GAAG;AACvD;AACA;AACA;AACA;AACA;AACA,UAAUF,iCAAiC;AAC3C;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMG,4BAA4B,GAAG;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMC,2BAA2B,GAAG;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMC,iCAAiC,GAAG;AAC1C;AACA;AACA;AACA;AACA,IAAID,2BAA2B;AAC/B,CAAC;AAED,OAAO,MAAME,8BAA8B,GAAG;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAUD,iCAAiC;AAC3C;AACA;AACA,UAAUD,2BAA2B;AACrC;AACA;AACA;AACA;AACA;AACA,YAAYC,iCAAiC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAME,4BAA4B,GAAG;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,uBAAuB,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,uCAAuC,GAAG;AACvD;AACA;AACA;AACA;AACA;AACA,UAAUJ,iCAAiC;AAC3C;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMK,6CAA6C,GAAG;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,wCAAwC,GAAG;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["PUBLISHED_SKILL_CORE_FIELDS","PUBLISHED_SKILL_ASSIGNMENT_FIELDS","PUBLISHED_SKILL_INSTALLABLE_FIELDS","PUBLISHED_SKILLS_CATALOG_QUERY","SET_PUBLISHED_SKILL_PREFERENCE_MUTATION","PUBLISHED_SKILL_DETAIL_QUERY","WIZARD_ARTIFACT_CORE_FIELDS","WIZARD_ARTIFACT_ASSIGNMENT_FIELDS","WIZARD_ARTIFACT_INSTALLABLE_FIELDS","WIZARD_ARTIFACTS_CATALOG_QUERY","WIZARD_ARTIFACT_DETAIL_QUERY","CURRENT_USER_ROLE_QUERY","SET_WIZARD_ARTIFACT_PREFERENCE_MUTATION","CREATE_OR_UPDATE_SKILL_FROM_MARKDOWN_MUTATION","IMPORT_WIZARD_ARTIFACT_SNAPSHOT_MUTATION"],"sources":["../src/graphql-operations.ts"],"sourcesContent":["const PUBLISHED_SKILL_CORE_FIELDS = `\n skill {\n id\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n tags {\n id\n slug\n label\n description\n facet {\n id\n slug\n label\n description\n }\n }\n }\n skillVersion {\n id\n version\n title\n summary\n status\n }\n publishedArtifact {\n id\n frontmatterName\n frontmatterDescription\n checksum\n publishedAt\n fileCount\n }\n`;\n\nconst PUBLISHED_SKILL_ASSIGNMENT_FIELDS = `\n assignmentSource\n assignmentType\n scopePath\n includeChildren\n relevance\n recommendationReason\n ${PUBLISHED_SKILL_CORE_FIELDS}\n`;\n\nconst PUBLISHED_SKILL_INSTALLABLE_FIELDS = `\n relevance\n recommendationReason\n ${PUBLISHED_SKILL_CORE_FIELDS}\n`;\n\nexport const PUBLISHED_SKILLS_CATALOG_QUERY = `\n query PluginPublishedSkills($input: PublishedSkillsDeliveryInput!) {\n pluginPublishedSkills(input: $input) {\n workspace {\n id\n slug\n name\n repositoryUrl\n defaultBranch\n status\n }\n directoryPath\n skills {\n ${PUBLISHED_SKILL_ASSIGNMENT_FIELDS}\n }\n catalogSkills {\n ${PUBLISHED_SKILL_INSTALLABLE_FIELDS}\n }\n userPreferences {\n scopeKey\n userKey\n ignoredSkills {\n ${PUBLISHED_SKILL_ASSIGNMENT_FIELDS}\n }\n }\n }\n }\n`;\n\nexport const SET_PUBLISHED_SKILL_PREFERENCE_MUTATION = `\n mutation SetPublishedSkillPreference($input: SetPublishedSkillPreferenceInput!) {\n setPublishedSkillPreference(input: $input) {\n scopeKey\n userKey\n ignoredSkills {\n ${PUBLISHED_SKILL_ASSIGNMENT_FIELDS}\n }\n }\n }\n`;\n\nexport const PUBLISHED_SKILL_DETAIL_QUERY = `\n query PluginPublishedSkillVersionArtifact($input: PublishedSkillArtifactDetailInput!) {\n pluginPublishedSkillVersionArtifact(input: $input) {\n id\n frontmatterName\n frontmatterDescription\n markdownBody\n renderedContent\n checksum\n publishedAt\n fileCount\n files {\n id\n relativePath\n contentType\n content\n checksum\n size\n sortOrder\n }\n }\n }\n`;\n\nconst WIZARD_ARTIFACT_CORE_FIELDS = `\n artifact {\n id\n kind\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n }\n artifactVersion {\n id\n version\n title\n summary\n status\n frontmatterName\n frontmatterDescription\n checksum\n revision\n updatedAtCursor\n canonicalFilePath\n publishedAt\n fileCount\n }\n`;\n\nconst WIZARD_ARTIFACT_ASSIGNMENT_FIELDS = `\n assignmentSource\n assignmentType\n scopePath\n includeChildren\n relevance\n recommendationReason\n ${WIZARD_ARTIFACT_CORE_FIELDS}\n`;\n\nconst WIZARD_ARTIFACT_INSTALLABLE_FIELDS = `\n relevance\n recommendationReason\n ${WIZARD_ARTIFACT_CORE_FIELDS}\n`;\n\nexport const WIZARD_ARTIFACTS_CATALOG_QUERY = `\n query PluginWizardArtifacts($input: WizardArtifactsDeliveryInput!) {\n pluginWizardArtifacts(input: $input) {\n artifactKind\n workspace {\n id\n slug\n name\n repositoryUrl\n defaultBranch\n status\n }\n directoryPath\n artifacts {\n ${WIZARD_ARTIFACT_ASSIGNMENT_FIELDS}\n }\n catalogArtifacts {\n ${WIZARD_ARTIFACT_INSTALLABLE_FIELDS}\n }\n artifactPreferences {\n scopeKey\n userKey\n ignoredArtifacts {\n ${WIZARD_ARTIFACT_ASSIGNMENT_FIELDS}\n }\n }\n unsupportedReason\n message\n }\n }\n`;\n\nexport const WIZARD_ARTIFACT_DETAIL_QUERY = `\n query PluginWizardArtifactVersion($input: WizardArtifactDetailInput!) {\n pluginWizardArtifactVersion(input: $input) {\n id\n artifact {\n id\n kind\n slug\n name\n summary\n whenToUse\n status\n installPolicy\n }\n version\n title\n summary\n status\n frontmatterName\n frontmatterDescription\n markdownBody\n renderedContent\n checksum\n revision\n updatedAtCursor\n canonicalFilePath\n publishedAt\n fileCount\n files {\n id\n relativePath\n contentType\n content\n checksum\n size\n sortOrder\n }\n }\n }\n`;\n\nexport const CURRENT_USER_ROLE_QUERY = `\n query PluginCurrentUserRole {\n user {\n me {\n _id\n email\n role\n }\n }\n }\n`;\n\nexport const SET_WIZARD_ARTIFACT_PREFERENCE_MUTATION = `\n mutation SetWizardArtifactPreference($input: SetWizardArtifactPreferenceInput!) {\n setWizardArtifactPreference(input: $input) {\n scopeKey\n userKey\n ignoredArtifacts {\n ${WIZARD_ARTIFACT_ASSIGNMENT_FIELDS}\n }\n }\n }\n`;\n\nexport const CREATE_OR_UPDATE_SKILL_FROM_MARKDOWN_MUTATION = `\n mutation CreateOrUpdateSkillFromMarkdown($markdownContent: String!) {\n admin {\n createOrUpdateSkillFromMarkdown(markdownContent: $markdownContent) {\n success\n skillSlug\n skillVersionId\n artifactSlug\n artifactVersionId\n errors\n }\n }\n }\n`;\n\nexport const IMPORT_WIZARD_ARTIFACT_SNAPSHOT_MUTATION = `\n mutation ImportWizardArtifactSnapshot($input: ImportWizardArtifactSnapshotInput!) {\n importWizardArtifactSnapshot(input: $input) {\n success\n skillSlug\n skillVersionId\n artifactSlug\n artifactVersionId\n errors\n }\n }\n`;\n"],"mappings":"AAAA,MAAMA,2BAA2B,GAAG;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMC,iCAAiC,GAAG;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,IAAID,2BAA2B;AAC/B,CAAC;AAED,MAAME,kCAAkC,GAAG;AAC3C;AACA;AACA,IAAIF,2BAA2B;AAC/B,CAAC;AAED,OAAO,MAAMG,8BAA8B,GAAG;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAUF,iCAAiC;AAC3C;AACA;AACA,UAAUC,kCAAkC;AAC5C;AACA;AACA;AACA;AACA;AACA,YAAYD,iCAAiC;AAC7C;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMG,uCAAuC,GAAG;AACvD;AACA;AACA;AACA;AACA;AACA,UAAUH,iCAAiC;AAC3C;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMI,4BAA4B,GAAG;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMC,2BAA2B,GAAG;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMC,iCAAiC,GAAG;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,IAAID,2BAA2B;AAC/B,CAAC;AAED,MAAME,kCAAkC,GAAG;AAC3C;AACA;AACA,IAAIF,2BAA2B;AAC/B,CAAC;AAED,OAAO,MAAMG,8BAA8B,GAAG;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAUF,iCAAiC;AAC3C;AACA;AACA,UAAUC,kCAAkC;AAC5C;AACA;AACA;AACA;AACA;AACA,YAAYD,iCAAiC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMG,4BAA4B,GAAG;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,uBAAuB,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,uCAAuC,GAAG;AACvD;AACA;AACA;AACA;AACA;AACA,UAAUL,iCAAiC;AAC3C;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMM,6CAA6C,GAAG;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,wCAAwC,GAAG;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -3,12 +3,14 @@ export type PublishedSkillFetchArgs = {
3
3
  skills?: string;
4
4
  directory?: string;
5
5
  refresh?: boolean;
6
+ recommendationContext?: string;
6
7
  };
7
8
  export type WizardArtifactKind = 'SKILL' | 'DESIGN_DOC';
8
9
  export type WizardArtifactCatalogFetchArgs = {
9
10
  artifactKind?: string;
10
11
  directory?: string;
11
12
  refresh?: boolean;
13
+ recommendationContext?: string;
12
14
  };
13
15
  export type WizardArtifactFetchArgs = {
14
16
  artifactKind?: string;
@@ -16,6 +18,7 @@ export type WizardArtifactFetchArgs = {
16
18
  artifacts?: string;
17
19
  directory?: string;
18
20
  refresh?: boolean;
21
+ recommendationContext?: string;
19
22
  };
20
23
  export type PluginStatusArgs = {
21
24
  directory?: string;
@@ -11,7 +11,8 @@ export const createPublishedSkillToolDefinitions = (tool, handlers) => ({
11
11
  args: {
12
12
  artifactKind: tool.schema.string().optional().describe('Wizard artifact kind to catalog: SKILL or DESIGN_DOC; defaults to SKILL'),
13
13
  directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),
14
- refresh: tool.schema.boolean().optional().describe('Bypass the local plugin cache for this request')
14
+ refresh: tool.schema.boolean().optional().describe('Bypass the local plugin cache for this request'),
15
+ recommendationContext: tool.schema.string().optional().describe('Optional metadata-only relevance/ranking context for catalog recommendations; fetched artifact bodies/files remain the authority.')
15
16
  },
16
17
  async execute(args, context) {
17
18
  return handlers.fetchWizardArtifactCatalog(args, context);
@@ -24,7 +25,8 @@ export const createPublishedSkillToolDefinitions = (tool, handlers) => ({
24
25
  artifact: tool.schema.string().optional().describe('Single artifact identifier; for SKILL this is a skill slug, artifact name, or skill name'),
25
26
  artifacts: tool.schema.string().optional().describe('One or more comma-separated or newline-separated artifact identifiers'),
26
27
  directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),
27
- refresh: tool.schema.boolean().optional().describe('Bypass the local plugin cache for this request')
28
+ refresh: tool.schema.boolean().optional().describe('Bypass the local plugin cache for this request'),
29
+ recommendationContext: tool.schema.string().optional().describe('Optional metadata-only relevance/ranking context for artifact discovery and suggestions; fetched bodies/files remain the authority.')
28
30
  },
29
31
  async execute(args, context) {
30
32
  return handlers.fetchWizardArtifacts(args, context);
@@ -36,7 +38,7 @@ export const createPublishedSkillToolDefinitions = (tool, handlers) => ({
36
38
  artifactKind: tool.schema.string().optional().describe('Wizard artifact kind to update: SKILL or DESIGN_DOC; defaults to SKILL'),
37
39
  artifact: tool.schema.string().describe('Artifact identifier; for SKILL this is the published skill slug'),
38
40
  action: tool.schema.string().describe('Preference action: install, uninstall, ignore, or unignore'),
39
- preferenceScope: tool.schema.string().optional().describe('Preference scope for the action: project or global; defaults to project'),
41
+ preferenceScope: tool.schema.string().optional().describe('Preference scope for the action: project/workspace or global; defaults to project'),
40
42
  directory: tool.schema.string().optional().describe('Optional absolute or relative directory override')
41
43
  },
42
44
  async execute(args, context) {
@@ -49,7 +51,8 @@ export const createPublishedSkillToolDefinitions = (tool, handlers) => ({
49
51
  skill: tool.schema.string().optional().describe('Single skill slug, artifact name, or skill name; backward-compatible with comma/newline-delimited lists'),
50
52
  skills: tool.schema.string().optional().describe('One or more comma-separated or newline-separated skill slugs, artifact names, or skill names'),
51
53
  directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),
52
- refresh: tool.schema.boolean().optional().describe('Bypass the local plugin cache for this request')
54
+ refresh: tool.schema.boolean().optional().describe('Bypass the local plugin cache for this request'),
55
+ recommendationContext: tool.schema.string().optional().describe('Optional metadata-only relevance/ranking context for skill recommendations; fetched SKILL.md bodies remain the authority.')
53
56
  },
54
57
  async execute(args, context) {
55
58
  return handlers.fetchPublishedSkills(args, context);
@@ -60,7 +63,7 @@ export const createPublishedSkillToolDefinitions = (tool, handlers) => ({
60
63
  args: {
61
64
  skill: tool.schema.string().describe('Published skill slug, artifact name, or skill name to update'),
62
65
  action: tool.schema.string().describe('Preference action: install, uninstall, ignore, or unignore'),
63
- preferenceScope: tool.schema.string().optional().describe('Preference scope for the action: project or global; defaults to project'),
66
+ preferenceScope: tool.schema.string().optional().describe('Preference scope for the action: project/workspace or global; defaults to project'),
64
67
  directory: tool.schema.string().optional().describe('Optional absolute or relative directory override')
65
68
  },
66
69
  async execute(args, context) {
@@ -1 +1 @@
1
- {"version":3,"names":["AVAILABLE_PUBLISHED_SKILL_TOOLS","SHARED_PUBLISHED_SKILL_TOOLS","slice","resolveAvailableTools","role","createPublishedSkillToolDefinitions","tool","handlers","sharedTools","opencode_wizard_catalog_fetch","description","args","artifactKind","schema","string","optional","describe","directory","refresh","boolean","execute","context","fetchWizardArtifactCatalog","opencode_wizard_artifact_fetch","artifact","artifacts","fetchWizardArtifacts","opencode_wizard_artifact_preference_set","action","preferenceScope","updateWizardArtifactPreference","opencode_wizard_published_skills_fetch","skill","skills","fetchPublishedSkills","opencode_wizard_published_skill_preference_set","updatePublishedSkillPreference","opencode_wizard_status","getStatus","editorOnlyTools","opencode_wizard_editor_create_or_update_skill","markdownContent","createOrUpdateEditorSkill","opencode_wizard_editor_publish_skill","skillSlug","publishEditorSkill","opencode_wizard_artifact_import","source","slug","name","summary","importWizardArtifact"],"sources":["../src/plugin-tools.ts"],"sourcesContent":["export type PublishedSkillFetchArgs = {\n skill?: string;\n skills?: string;\n directory?: string;\n refresh?: boolean;\n};\n\nexport type WizardArtifactKind = 'SKILL' | 'DESIGN_DOC';\n\nexport type WizardArtifactCatalogFetchArgs = {\n artifactKind?: string;\n directory?: string;\n refresh?: boolean;\n};\n\nexport type WizardArtifactFetchArgs = {\n artifactKind?: string;\n artifact?: string;\n artifacts?: string;\n directory?: string;\n refresh?: boolean;\n};\n\nexport type PluginStatusArgs = {\n directory?: string;\n};\n\nexport type PublishedSkillPreferenceArgs = {\n skill: string;\n action: string;\n preferenceScope?: string;\n directory?: string;\n};\n\nexport type WizardArtifactPreferenceArgs = {\n artifactKind?: string;\n artifact: string;\n action: string;\n preferenceScope?: string;\n directory?: string;\n};\n\nexport type EditorPublishSkillArgs = {\n skillSlug: string;\n directory?: string;\n};\n\nexport type EditorCreateOrUpdateSkillArgs = {\n markdownContent: string;\n directory?: string;\n};\n\nexport type WizardArtifactImportArgs = {\n artifactKind?: string;\n source: string;\n slug?: string;\n skill?: string;\n name?: string;\n summary?: string;\n directory?: string;\n};\n\ntype ToolSchemaValue<TSelf> = {\n optional: () => TSelf;\n describe: (description: string) => TSelf;\n};\n\ntype ToolSchema = {\n string: () => ToolSchemaValue<ToolSchemaValue<unknown>>;\n boolean: () => ToolSchemaValue<ToolSchemaValue<unknown>>;\n};\n\nexport type ToolExecuteContext = {\n directory: string;\n abort: AbortSignal;\n metadata: (payload: { title: string; metadata: Record<string, string> }) => void;\n};\n\ntype ToolDefinition<TArgs extends object> = {\n description: string;\n args: { [K in keyof TArgs]-?: unknown };\n execute: (args: TArgs, context: ToolExecuteContext) => Promise<unknown>;\n};\n\nexport type ToolFactory = (<TArgs extends object>(definition: ToolDefinition<TArgs>) => unknown) & {\n schema: ToolSchema;\n};\n\ntype PublishedSkillToolHandlers = {\n fetchPublishedSkills: (args: PublishedSkillFetchArgs, context: ToolExecuteContext) => Promise<unknown>;\n fetchWizardArtifactCatalog: (args: WizardArtifactCatalogFetchArgs, context: ToolExecuteContext) => Promise<unknown>;\n fetchWizardArtifacts: (args: WizardArtifactFetchArgs, context: ToolExecuteContext) => Promise<unknown>;\n updatePublishedSkillPreference: (args: PublishedSkillPreferenceArgs, context: ToolExecuteContext) => Promise<unknown>;\n updateWizardArtifactPreference: (args: WizardArtifactPreferenceArgs, context: ToolExecuteContext) => Promise<unknown>;\n getStatus: (args: PluginStatusArgs, context: ToolExecuteContext) => Promise<unknown>;\n createOrUpdateEditorSkill: (args: EditorCreateOrUpdateSkillArgs, context: ToolExecuteContext) => Promise<unknown>;\n publishEditorSkill: (args: EditorPublishSkillArgs, context: ToolExecuteContext) => Promise<unknown>;\n importWizardArtifact: (args: WizardArtifactImportArgs, context: ToolExecuteContext) => Promise<unknown>;\n};\n\nexport const AVAILABLE_PUBLISHED_SKILL_TOOLS = [\n 'opencode_wizard_catalog_fetch',\n 'opencode_wizard_artifact_fetch',\n 'opencode_wizard_artifact_preference_set',\n 'opencode_wizard_published_skills_fetch',\n 'opencode_wizard_published_skill_preference_set',\n 'opencode_wizard_status',\n 'opencode_wizard_editor_create_or_update_skill',\n 'opencode_wizard_editor_publish_skill',\n 'opencode_wizard_artifact_import',\n];\n\nconst SHARED_PUBLISHED_SKILL_TOOLS = AVAILABLE_PUBLISHED_SKILL_TOOLS.slice(0, 6);\n\nexport const resolveAvailableTools = (role: string | null | undefined): string[] => {\n if (role === 'EDITOR') return [...AVAILABLE_PUBLISHED_SKILL_TOOLS];\n return [...SHARED_PUBLISHED_SKILL_TOOLS];\n};\n\nexport const createPublishedSkillToolDefinitions = (\n tool: ToolFactory,\n handlers: PublishedSkillToolHandlers,\n) => ({\n sharedTools: {\n opencode_wizard_catalog_fetch: tool<WizardArtifactCatalogFetchArgs>({\n description:\n 'Always-available canonical wizard artifact catalog tool. Supports artifactKind SKILL and DESIGN_DOC; catalog metadata is candidate discovery only, and bodies/files should be fetched before using a matching wizard artifact as guidance.',\n args: {\n artifactKind: tool.schema\n .string()\n .optional()\n .describe('Wizard artifact kind to catalog: SKILL or DESIGN_DOC; defaults to SKILL'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n refresh: tool.schema.boolean().optional().describe('Bypass the local plugin cache for this request'),\n },\n async execute(args, context) {\n return handlers.fetchWizardArtifactCatalog(args, context);\n },\n }),\n opencode_wizard_artifact_fetch: tool<WizardArtifactFetchArgs>({\n description:\n 'Always-available canonical wizard artifact detail tool. Supports artifactKind SKILL and DESIGN_DOC; fetched backend-authorized bodies/files are the reference content when a matching effective artifact is used.',\n args: {\n artifactKind: tool.schema\n .string()\n .optional()\n .describe('Wizard artifact kind to fetch: SKILL or DESIGN_DOC; defaults to SKILL'),\n artifact: tool.schema\n .string()\n .optional()\n .describe('Single artifact identifier; for SKILL this is a skill slug, artifact name, or skill name'),\n artifacts: tool.schema\n .string()\n .optional()\n .describe('One or more comma-separated or newline-separated artifact identifiers'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n refresh: tool.schema.boolean().optional().describe('Bypass the local plugin cache for this request'),\n },\n async execute(args, context) {\n return handlers.fetchWizardArtifacts(args, context);\n },\n }),\n opencode_wizard_artifact_preference_set: tool<WizardArtifactPreferenceArgs>({\n description:\n 'Always-available canonical wizard artifact preference tool. Supports SKILL and DESIGN_DOC install/uninstall/ignore/unignore through server-backed artifact preference APIs.',\n args: {\n artifactKind: tool.schema\n .string()\n .optional()\n .describe('Wizard artifact kind to update: SKILL or DESIGN_DOC; defaults to SKILL'),\n artifact: tool.schema.string().describe('Artifact identifier; for SKILL this is the published skill slug'),\n action: tool.schema\n .string()\n .describe('Preference action: install, uninstall, ignore, or unignore'),\n preferenceScope: tool.schema\n .string()\n .optional()\n .describe('Preference scope for the action: project or global; defaults to project'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n },\n async execute(args, context) {\n return handlers.updateWizardArtifactPreference(args, context);\n },\n }),\n opencode_wizard_published_skills_fetch: tool<PublishedSkillFetchArgs>({\n description:\n 'Always-available tool to fetch one or multiple wizard-published SKILL.md bodies/details for the current scope. When a backend-published wizard-listed skill matches the task, use the fetched body as reference guidance; catalog/status metadata only identifies candidates. Use this for wizard-listed/private/scoped/backend-published skill slugs instead of the native OpenCode skill tool; auth/catalog failures are returned in tool output. Prefer `skills` for multiple identifiers, call with no args to discover/bootstrap auth, and pass `refresh: true` before clearing plugin/OpenCode caches',\n args: {\n skill: tool.schema\n .string()\n .optional()\n .describe(\n 'Single skill slug, artifact name, or skill name; backward-compatible with comma/newline-delimited lists',\n ),\n skills: tool.schema\n .string()\n .optional()\n .describe('One or more comma-separated or newline-separated skill slugs, artifact names, or skill names'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n refresh: tool.schema.boolean().optional().describe('Bypass the local plugin cache for this request'),\n },\n async execute(args, context) {\n return handlers.fetchPublishedSkills(args, context);\n },\n }),\n opencode_wizard_published_skill_preference_set: tool<PublishedSkillPreferenceArgs>({\n description:\n 'Always-available tool to install, uninstall, ignore, or unignore a backend-published wizard skill for non-TUI workflows using the same shared server-backed preference API as the TUI overlay; auth/catalog failures are returned in tool output',\n args: {\n skill: tool.schema.string().describe('Published skill slug, artifact name, or skill name to update'),\n action: tool.schema\n .string()\n .describe('Preference action: install, uninstall, ignore, or unignore'),\n preferenceScope: tool.schema\n .string()\n .optional()\n .describe('Preference scope for the action: project or global; defaults to project'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n },\n async execute(args, context) {\n return handlers.updatePublishedSkillPreference(args, context);\n },\n }),\n opencode_wizard_status: tool<PluginStatusArgs>({\n description:\n 'Always-available tool to report opencode-wizard plugin status, bootstrap auth when missing, and return safe auth/catalog/source/cache/workspace metadata without exposing tokens; fetch matching wizard skill bodies before using them as guidance',\n args: {\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n },\n async execute(args, context) {\n return handlers.getStatus(args, context);\n },\n }),\n },\n editorOnlyTools: {\n opencode_wizard_editor_create_or_update_skill: tool<EditorCreateOrUpdateSkillArgs>({\n description:\n 'Canonical EDITOR-only skill creation/update tool. Sends direct SKILL.md markdown content to the backend createOrUpdateSkillFromMarkdown mutation without requiring a local .opencode/skills seed file first.',\n args: {\n markdownContent: tool.schema\n .string()\n .describe('Complete SKILL.md markdown content, including frontmatter when the backend skill contract requires it'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n },\n async execute(args, context) {\n return handlers.createOrUpdateEditorSkill(args, context);\n },\n }),\n opencode_wizard_editor_publish_skill: tool<EditorPublishSkillArgs>({\n description:\n 'Read skill markdown files from .opencode/skills/ and publish them to the backend via the createOrUpdateSkillFromMarkdown mutation. Requires EDITOR role.',\n args: {\n skillSlug: tool.schema\n .string()\n .describe('Skill slug matching a directory under .opencode/skills/'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n },\n async execute(args, context) {\n return handlers.publishEditorSkill(args, context);\n },\n }),\n opencode_wizard_artifact_import: tool<WizardArtifactImportArgs>({\n description:\n 'Editor-only import tool for external wizard artifacts. Supports SKILL from GitHub/raw SKILL.md sources and DESIGN_DOC from direct URLs or command-like inputs such as `npx getdesign@latest add bmw-m`. Imported backend artifacts become the plugin runtime authority; no project files are written.',\n args: {\n artifactKind: tool.schema\n .string()\n .optional()\n .describe('Wizard artifact kind to import: SKILL or DESIGN_DOC; inferred from source when omitted'),\n source: tool.schema\n .string()\n .describe('Direct URL or command-like input, e.g. `https://github.com/vercel-labs/skills --skill find-skills` or `npx getdesign@latest add bmw-m`'),\n slug: tool.schema.string().optional().describe('Artifact slug; required for DESIGN_DOC unless inferable'),\n skill: tool.schema.string().optional().describe('Skill directory/name for SKILL repo imports'),\n name: tool.schema.string().optional().describe('Optional display name override'),\n summary: tool.schema.string().optional().describe('Optional summary/description override'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n },\n async execute(args, context) {\n return handlers.importWizardArtifact(args, context);\n },\n }),\n },\n});\n"],"mappings":"AAoGA,OAAO,MAAMA,+BAA+B,GAAG,CAC7C,+BAA+B,EAC/B,gCAAgC,EAChC,yCAAyC,EACzC,wCAAwC,EACxC,gDAAgD,EAChD,wBAAwB,EACxB,+CAA+C,EAC/C,sCAAsC,EACtC,iCAAiC,CAClC;AAED,MAAMC,4BAA4B,GAAGD,+BAA+B,CAACE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;AAEhF,OAAO,MAAMC,qBAAqB,GAAIC,IAA+B,IAAe;EAClF,IAAIA,IAAI,KAAK,QAAQ,EAAE,OAAO,CAAC,GAAGJ,+BAA+B,CAAC;EAClE,OAAO,CAAC,GAAGC,4BAA4B,CAAC;AAC1C,CAAC;AAED,OAAO,MAAMI,mCAAmC,GAAGA,CACjDC,IAAiB,EACjBC,QAAoC,MAChC;EACJC,WAAW,EAAE;IACXC,6BAA6B,EAAEH,IAAI,CAAiC;MAClEI,WAAW,EACT,4OAA4O;MAC9OC,IAAI,EAAE;QACJC,YAAY,EAAEN,IAAI,CAACO,MAAM,CACtBC,MAAM,CAAC,CAAC,CACRC,QAAQ,CAAC,CAAC,CACVC,QAAQ,CAAC,yEAAyE,CAAC;QACtFC,SAAS,EAAEX,IAAI,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,kDAAkD,CAAC;QACvGE,OAAO,EAAEZ,IAAI,CAACO,MAAM,CAACM,OAAO,CAAC,CAAC,CAACJ,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,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gB,KAAK,EAAE1B,IAAI,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,6CAA6C,CAAC;QAC9FiC,IAAI,EAAE3C,IAAI,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,gCAAgC,CAAC;QAChFkC,OAAO,EAAE5C,IAAI,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,uCAAuC,CAAC;QAC1FC,SAAS,EAAEX,IAAI,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,kDAAkD;MACxG,CAAC;MACD,MAAMI,OAAOA,CAACT,IAAI,EAAEU,OAAO,EAAE;QAC3B,OAAOd,QAAQ,CAAC4C,oBAAoB,CAACxC,IAAI,EAAEU,OAAO,CAAC;MACrD;IACF,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["AVAILABLE_PUBLISHED_SKILL_TOOLS","SHARED_PUBLISHED_SKILL_TOOLS","slice","resolveAvailableTools","role","createPublishedSkillToolDefinitions","tool","handlers","sharedTools","opencode_wizard_catalog_fetch","description","args","artifactKind","schema","string","optional","describe","directory","refresh","boolean","recommendationContext","execute","context","fetchWizardArtifactCatalog","opencode_wizard_artifact_fetch","artifact","artifacts","fetchWizardArtifacts","opencode_wizard_artifact_preference_set","action","preferenceScope","updateWizardArtifactPreference","opencode_wizard_published_skills_fetch","skill","skills","fetchPublishedSkills","opencode_wizard_published_skill_preference_set","updatePublishedSkillPreference","opencode_wizard_status","getStatus","editorOnlyTools","opencode_wizard_editor_create_or_update_skill","markdownContent","createOrUpdateEditorSkill","opencode_wizard_editor_publish_skill","skillSlug","publishEditorSkill","opencode_wizard_artifact_import","source","slug","name","summary","importWizardArtifact"],"sources":["../src/plugin-tools.ts"],"sourcesContent":["export type PublishedSkillFetchArgs = {\n skill?: string;\n skills?: string;\n directory?: string;\n refresh?: boolean;\n recommendationContext?: string;\n};\n\nexport type WizardArtifactKind = 'SKILL' | 'DESIGN_DOC';\n\nexport type WizardArtifactCatalogFetchArgs = {\n artifactKind?: string;\n directory?: string;\n refresh?: boolean;\n recommendationContext?: string;\n};\n\nexport type WizardArtifactFetchArgs = {\n artifactKind?: string;\n artifact?: string;\n artifacts?: string;\n directory?: string;\n refresh?: boolean;\n recommendationContext?: string;\n};\n\nexport type PluginStatusArgs = {\n directory?: string;\n};\n\nexport type PublishedSkillPreferenceArgs = {\n skill: string;\n action: string;\n preferenceScope?: string;\n directory?: string;\n};\n\nexport type WizardArtifactPreferenceArgs = {\n artifactKind?: string;\n artifact: string;\n action: string;\n preferenceScope?: string;\n directory?: string;\n};\n\nexport type EditorPublishSkillArgs = {\n skillSlug: string;\n directory?: string;\n};\n\nexport type EditorCreateOrUpdateSkillArgs = {\n markdownContent: string;\n directory?: string;\n};\n\nexport type WizardArtifactImportArgs = {\n artifactKind?: string;\n source: string;\n slug?: string;\n skill?: string;\n name?: string;\n summary?: string;\n directory?: string;\n};\n\ntype ToolSchemaValue<TSelf> = {\n optional: () => TSelf;\n describe: (description: string) => TSelf;\n};\n\ntype ToolSchema = {\n string: () => ToolSchemaValue<ToolSchemaValue<unknown>>;\n boolean: () => ToolSchemaValue<ToolSchemaValue<unknown>>;\n};\n\nexport type ToolExecuteContext = {\n directory: string;\n abort: AbortSignal;\n metadata: (payload: { title: string; metadata: Record<string, string> }) => void;\n};\n\ntype ToolDefinition<TArgs extends object> = {\n description: string;\n args: { [K in keyof TArgs]-?: unknown };\n execute: (args: TArgs, context: ToolExecuteContext) => Promise<unknown>;\n};\n\nexport type ToolFactory = (<TArgs extends object>(definition: ToolDefinition<TArgs>) => unknown) & {\n schema: ToolSchema;\n};\n\ntype PublishedSkillToolHandlers = {\n fetchPublishedSkills: (args: PublishedSkillFetchArgs, context: ToolExecuteContext) => Promise<unknown>;\n fetchWizardArtifactCatalog: (args: WizardArtifactCatalogFetchArgs, context: ToolExecuteContext) => Promise<unknown>;\n fetchWizardArtifacts: (args: WizardArtifactFetchArgs, context: ToolExecuteContext) => Promise<unknown>;\n updatePublishedSkillPreference: (args: PublishedSkillPreferenceArgs, context: ToolExecuteContext) => Promise<unknown>;\n updateWizardArtifactPreference: (args: WizardArtifactPreferenceArgs, context: ToolExecuteContext) => Promise<unknown>;\n getStatus: (args: PluginStatusArgs, context: ToolExecuteContext) => Promise<unknown>;\n createOrUpdateEditorSkill: (args: EditorCreateOrUpdateSkillArgs, context: ToolExecuteContext) => Promise<unknown>;\n publishEditorSkill: (args: EditorPublishSkillArgs, context: ToolExecuteContext) => Promise<unknown>;\n importWizardArtifact: (args: WizardArtifactImportArgs, context: ToolExecuteContext) => Promise<unknown>;\n};\n\nexport const AVAILABLE_PUBLISHED_SKILL_TOOLS = [\n 'opencode_wizard_catalog_fetch',\n 'opencode_wizard_artifact_fetch',\n 'opencode_wizard_artifact_preference_set',\n 'opencode_wizard_published_skills_fetch',\n 'opencode_wizard_published_skill_preference_set',\n 'opencode_wizard_status',\n 'opencode_wizard_editor_create_or_update_skill',\n 'opencode_wizard_editor_publish_skill',\n 'opencode_wizard_artifact_import',\n];\n\nconst SHARED_PUBLISHED_SKILL_TOOLS = AVAILABLE_PUBLISHED_SKILL_TOOLS.slice(0, 6);\n\nexport const resolveAvailableTools = (role: string | null | undefined): string[] => {\n if (role === 'EDITOR') return [...AVAILABLE_PUBLISHED_SKILL_TOOLS];\n return [...SHARED_PUBLISHED_SKILL_TOOLS];\n};\n\nexport const createPublishedSkillToolDefinitions = (\n tool: ToolFactory,\n handlers: PublishedSkillToolHandlers,\n) => ({\n sharedTools: {\n opencode_wizard_catalog_fetch: tool<WizardArtifactCatalogFetchArgs>({\n description:\n 'Always-available canonical wizard artifact catalog tool. Supports artifactKind SKILL and DESIGN_DOC; catalog metadata is candidate discovery only, and bodies/files should be fetched before using a matching wizard artifact as guidance.',\n args: {\n artifactKind: tool.schema\n .string()\n .optional()\n .describe('Wizard artifact kind to catalog: SKILL or DESIGN_DOC; defaults to SKILL'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n refresh: tool.schema.boolean().optional().describe('Bypass the local plugin cache for this request'),\n recommendationContext: tool.schema\n .string()\n .optional()\n .describe(\n 'Optional metadata-only relevance/ranking context for catalog recommendations; fetched artifact bodies/files remain the authority.',\n ),\n },\n async execute(args, context) {\n return handlers.fetchWizardArtifactCatalog(args, context);\n },\n }),\n opencode_wizard_artifact_fetch: tool<WizardArtifactFetchArgs>({\n description:\n 'Always-available canonical wizard artifact detail tool. Supports artifactKind SKILL and DESIGN_DOC; fetched backend-authorized bodies/files are the reference content when a matching effective artifact is used.',\n args: {\n artifactKind: tool.schema\n .string()\n .optional()\n .describe('Wizard artifact kind to fetch: SKILL or DESIGN_DOC; defaults to SKILL'),\n artifact: tool.schema\n .string()\n .optional()\n .describe('Single artifact identifier; for SKILL this is a skill slug, artifact name, or skill name'),\n artifacts: tool.schema\n .string()\n .optional()\n .describe('One or more comma-separated or newline-separated artifact identifiers'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n refresh: tool.schema.boolean().optional().describe('Bypass the local plugin cache for this request'),\n recommendationContext: tool.schema\n .string()\n .optional()\n .describe(\n 'Optional metadata-only relevance/ranking context for artifact discovery and suggestions; fetched bodies/files remain the authority.',\n ),\n },\n async execute(args, context) {\n return handlers.fetchWizardArtifacts(args, context);\n },\n }),\n opencode_wizard_artifact_preference_set: tool<WizardArtifactPreferenceArgs>({\n description:\n 'Always-available canonical wizard artifact preference tool. Supports SKILL and DESIGN_DOC install/uninstall/ignore/unignore through server-backed artifact preference APIs.',\n args: {\n artifactKind: tool.schema\n .string()\n .optional()\n .describe('Wizard artifact kind to update: SKILL or DESIGN_DOC; defaults to SKILL'),\n artifact: tool.schema.string().describe('Artifact identifier; for SKILL this is the published skill slug'),\n action: tool.schema\n .string()\n .describe('Preference action: install, uninstall, ignore, or unignore'),\n preferenceScope: tool.schema\n .string()\n .optional()\n .describe('Preference scope for the action: project/workspace or global; defaults to project'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n },\n async execute(args, context) {\n return handlers.updateWizardArtifactPreference(args, context);\n },\n }),\n opencode_wizard_published_skills_fetch: tool<PublishedSkillFetchArgs>({\n description:\n 'Always-available tool to fetch one or multiple wizard-published SKILL.md bodies/details for the current scope. When a backend-published wizard-listed skill matches the task, use the fetched body as reference guidance; catalog/status metadata only identifies candidates. Use this for wizard-listed/private/scoped/backend-published skill slugs instead of the native OpenCode skill tool; auth/catalog failures are returned in tool output. Prefer `skills` for multiple identifiers, call with no args to discover/bootstrap auth, and pass `refresh: true` before clearing plugin/OpenCode caches',\n args: {\n skill: tool.schema\n .string()\n .optional()\n .describe(\n 'Single skill slug, artifact name, or skill name; backward-compatible with comma/newline-delimited lists',\n ),\n skills: tool.schema\n .string()\n .optional()\n .describe('One or more comma-separated or newline-separated skill slugs, artifact names, or skill names'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n refresh: tool.schema.boolean().optional().describe('Bypass the local plugin cache for this request'),\n recommendationContext: tool.schema\n .string()\n .optional()\n .describe(\n 'Optional metadata-only relevance/ranking context for skill recommendations; fetched SKILL.md bodies remain the authority.',\n ),\n },\n async execute(args, context) {\n return handlers.fetchPublishedSkills(args, context);\n },\n }),\n opencode_wizard_published_skill_preference_set: tool<PublishedSkillPreferenceArgs>({\n description:\n 'Always-available tool to install, uninstall, ignore, or unignore a backend-published wizard skill for non-TUI workflows using the same shared server-backed preference API as the TUI overlay; auth/catalog failures are returned in tool output',\n args: {\n skill: tool.schema.string().describe('Published skill slug, artifact name, or skill name to update'),\n action: tool.schema\n .string()\n .describe('Preference action: install, uninstall, ignore, or unignore'),\n preferenceScope: tool.schema\n .string()\n .optional()\n .describe('Preference scope for the action: project/workspace or global; defaults to project'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n },\n async execute(args, context) {\n return handlers.updatePublishedSkillPreference(args, context);\n },\n }),\n opencode_wizard_status: tool<PluginStatusArgs>({\n description:\n 'Always-available tool to report opencode-wizard plugin status, bootstrap auth when missing, and return safe auth/catalog/source/cache/workspace metadata without exposing tokens; fetch matching wizard skill bodies before using them as guidance',\n args: {\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n },\n async execute(args, context) {\n return handlers.getStatus(args, context);\n },\n }),\n },\n editorOnlyTools: {\n opencode_wizard_editor_create_or_update_skill: tool<EditorCreateOrUpdateSkillArgs>({\n description:\n 'Canonical EDITOR-only skill creation/update tool. Sends direct SKILL.md markdown content to the backend createOrUpdateSkillFromMarkdown mutation without requiring a local .opencode/skills seed file first.',\n args: {\n markdownContent: tool.schema\n .string()\n .describe('Complete SKILL.md markdown content, including frontmatter when the backend skill contract requires it'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n },\n async execute(args, context) {\n return handlers.createOrUpdateEditorSkill(args, context);\n },\n }),\n opencode_wizard_editor_publish_skill: tool<EditorPublishSkillArgs>({\n description:\n 'Read skill markdown files from .opencode/skills/ and publish them to the backend via the createOrUpdateSkillFromMarkdown mutation. Requires EDITOR role.',\n args: {\n skillSlug: tool.schema\n .string()\n .describe('Skill slug matching a directory under .opencode/skills/'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n },\n async execute(args, context) {\n return handlers.publishEditorSkill(args, context);\n },\n }),\n opencode_wizard_artifact_import: tool<WizardArtifactImportArgs>({\n description:\n 'Editor-only import tool for external wizard artifacts. Supports SKILL from GitHub/raw SKILL.md sources and DESIGN_DOC from direct URLs or command-like inputs such as `npx getdesign@latest add bmw-m`. Imported backend artifacts become the plugin runtime authority; no project files are written.',\n args: {\n artifactKind: tool.schema\n .string()\n .optional()\n .describe('Wizard artifact kind to import: SKILL or DESIGN_DOC; inferred from source when omitted'),\n source: tool.schema\n .string()\n .describe('Direct URL or command-like input, e.g. `https://github.com/vercel-labs/skills --skill find-skills` or `npx getdesign@latest add bmw-m`'),\n slug: tool.schema.string().optional().describe('Artifact slug; required for DESIGN_DOC unless inferable'),\n skill: tool.schema.string().optional().describe('Skill directory/name for SKILL repo imports'),\n name: tool.schema.string().optional().describe('Optional display name override'),\n summary: tool.schema.string().optional().describe('Optional summary/description override'),\n directory: tool.schema.string().optional().describe('Optional absolute or relative directory override'),\n },\n async execute(args, context) {\n return handlers.importWizardArtifact(args, context);\n },\n }),\n },\n});\n"],"mappings":"AAuGA,OAAO,MAAMA,+BAA+B,GAAG,CAC7C,+BAA+B,EAC/B,gCAAgC,EAChC,yCAAyC,EACzC,wCAAwC,EACxC,gDAAgD,EAChD,wBAAwB,EACxB,+CAA+C,EAC/C,sCAAsC,EACtC,iCAAiC,CAClC;AAED,MAAMC,4BAA4B,GAAGD,+BAA+B,CAACE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;AAEhF,OAAO,MAAMC,qBAAqB,GAAIC,IAA+B,IAAe;EAClF,IAAIA,IAAI,KAAK,QAAQ,EAAE,OAAO,CAAC,GAAGJ,+BAA+B,CAAC;EAClE,OAAO,CAAC,GAAGC,4BAA4B,CAAC;AAC1C,CAAC;AAED,OAAO,MAAMI,mCAAmC,GAAGA,CACjDC,IAAiB,EACjBC,QAAoC,MAChC;EACJC,WAAW,EAAE;IACXC,6BAA6B,EAAEH,IAAI,CAAiC;MAClEI,WAAW,EACT,4OAA4O;MAC9OC,IAAI,EAAE;QACJC,YAAY,EAAEN,IAAI,CAACO,MAAM,CACtBC,MAAM,CAAC,CAAC,CACRC,QAAQ,CAAC,CAAC,CACVC,QAAQ,CAAC,yEAAyE,CAAC;QACtFC,SAAS,EAAEX,IAAI,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,kDAAkD,CAAC;QACvGE,OAAO,EAAEZ,IAAI,CAACO,MAAM,CAACM,OAAO,CAAC,CA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+B,EAAEzC,IAAI,CAA2B;MAC9DI,WAAW,EACT,uSAAuS;MACzSC,IAAI,EAAE;QACJC,YAAY,EAAEN,IAAI,CAACO,MAAM,CACtBC,MAAM,CAAC,CAAC,CACRC,QAAQ,CAAC,CAAC,CACVC,QAAQ,CAAC,wFAAwF,CAAC;QACrGgC,MAAM,EAAE1C,IAAI,CAACO,MAAM,CAChBC,MAAM,CAAC,CAAC,CACRE,QAAQ,CAAC,wIAAwI,CAAC;QACrJiC,IAAI,EAAE3C,IAAI,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,yDAAyD,CAAC;QACzGiB,KAAK,EAAE3B,IAAI,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,6CAA6C,CAAC;QAC9FkC,IAAI,EAAE5C,IAAI,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,gCAAgC,CAAC;QAChFmC,OAAO,EAAE7C,IAAI,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,uCAAuC,CAAC;QAC1FC,SAAS,EAAEX,IAAI,CAACO,MAAM,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,kDAAkD;MACxG,CAAC;MACD,MAAMK,OAAOA,CAACV,IAAI,EAAEW,OAAO,EAAE;QAC3B,OAAOf,QAAQ,CAAC6C,oBAAoB,CAACzC,IAAI,EAAEW,OAAO,CAAC;MACrD;IACF,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
@@ -11,7 +11,11 @@ type PublishedSkillTagLike = {
11
11
  facet?: PublishedSkillFacetLike | null;
12
12
  };
13
13
  type PublishedSkillInstallPolicy = 'GLOBAL_CONTEXT' | 'PROJECT_INSTALLABLE';
14
- type PublishedSkillCatalogItemLike = {
14
+ type RecommendationMetadataLike = {
15
+ relevance?: number | null;
16
+ recommendationReason?: string | null;
17
+ };
18
+ type PublishedSkillCatalogItemLike = RecommendationMetadataLike & {
15
19
  assignmentSource: string;
16
20
  assignmentType: string;
17
21
  scopePath: string;
@@ -53,6 +57,14 @@ type PublishedSkillArtifactFileLike = {
53
57
  size: number;
54
58
  sortOrder: number;
55
59
  };
60
+ export type PublishedSkillSupportingFileMetadata = {
61
+ count: number;
62
+ paths: Array<{
63
+ relativePath: string;
64
+ contentType: string;
65
+ size: number;
66
+ }>;
67
+ };
56
68
  type PublishedSkillDetailItemLike = PublishedSkillCatalogItemLike & {
57
69
  publishedArtifact: PublishedSkillCatalogItemLike['publishedArtifact'] & {
58
70
  markdownBody: string;
@@ -60,7 +72,7 @@ type PublishedSkillDetailItemLike = PublishedSkillCatalogItemLike & {
60
72
  files: PublishedSkillArtifactFileLike[];
61
73
  };
62
74
  };
63
- type PublishedSkillInstallableCatalogItemLike = Pick<PublishedSkillCatalogItemLike, 'skill' | 'skillVersion' | 'publishedArtifact'>;
75
+ type PublishedSkillInstallableCatalogItemLike = Pick<PublishedSkillCatalogItemLike, 'skill' | 'skillVersion' | 'publishedArtifact'> & RecommendationMetadataLike;
64
76
  type PublishedSkillCatalogPayloadLike<TItem extends PublishedSkillCatalogItemLike = PublishedSkillCatalogItemLike> = {
65
77
  workspace: {
66
78
  id: string;
@@ -112,6 +124,8 @@ export type PublishedSkillSummary = {
112
124
  installPolicy: PublishedSkillInstallPolicy;
113
125
  assignmentLabel: string;
114
126
  policyLabel: string;
127
+ relevance: number | null;
128
+ recommendationReason: string | null;
115
129
  };
116
130
  export type PublishedSkillDetail = PublishedSkillSummary & {
117
131
  skillId: string;
@@ -122,9 +136,10 @@ export type PublishedSkillDetail = PublishedSkillSummary & {
122
136
  renderedContent: string;
123
137
  files: PublishedSkillArtifactFileLike[];
124
138
  resources: PublishedSkillArtifactFileLike[];
139
+ supportingFiles: PublishedSkillSupportingFileMetadata;
125
140
  };
126
141
  type WizardArtifactKind = 'SKILL' | 'DESIGN_DOC';
127
- type WizardArtifactCatalogItemLike = {
142
+ type WizardArtifactCatalogItemLike = RecommendationMetadataLike & {
128
143
  assignmentSource: string;
129
144
  assignmentType: string;
130
145
  scopePath: string;
@@ -167,7 +182,7 @@ type WizardArtifactCatalogPayloadLike = {
167
182
  workspace: PublishedSkillCatalogPayloadLike['workspace'];
168
183
  directoryPath: string;
169
184
  artifacts: WizardArtifactCatalogItemLike[];
170
- catalogArtifacts: Pick<WizardArtifactCatalogItemLike, 'artifact' | 'artifactVersion'>[];
185
+ catalogArtifacts: (Pick<WizardArtifactCatalogItemLike, 'artifact' | 'artifactVersion'> & RecommendationMetadataLike)[];
171
186
  artifactPreferences: {
172
187
  scopeKey: string;
173
188
  userKey: string;
@@ -196,6 +211,8 @@ export type WizardArtifactSummary = {
196
211
  installPolicy: PublishedSkillInstallPolicy;
197
212
  assignmentLabel: string;
198
213
  policyLabel: string;
214
+ relevance: number | null;
215
+ recommendationReason: string | null;
199
216
  };
200
217
  export type WizardArtifactDetail = WizardArtifactSummary & {
201
218
  artifactId: string;
@@ -205,6 +222,7 @@ export type WizardArtifactDetail = WizardArtifactSummary & {
205
222
  renderedContent: string;
206
223
  files: PublishedSkillArtifactFileLike[];
207
224
  resources: PublishedSkillArtifactFileLike[];
225
+ supportingFiles: PublishedSkillSupportingFileMetadata;
208
226
  };
209
227
  export type WizardArtifactCatalogState = {
210
228
  pluginId: string;
@@ -21,6 +21,14 @@ export const buildSkillMarkdown = item => {
21
21
  }
22
22
  return `${frontmatter}\n\n${body.endsWith('\n') ? body : `${body}\n`}`;
23
23
  };
24
+ const toSupportingFileMetadata = files => ({
25
+ count: files.length,
26
+ paths: files.map(file => ({
27
+ relativePath: file.relativePath,
28
+ contentType: file.contentType,
29
+ size: file.size
30
+ }))
31
+ });
24
32
  const getSkillIdentifiers = item => {
25
33
  const candidates = [item.skill.slug, item.publishedArtifact.frontmatterName, item.skill.name];
26
34
  const seen = new Set();
@@ -119,7 +127,9 @@ export const toPublishedSkillSummary = item => {
119
127
  assignmentSource: item.assignmentSource,
120
128
  contextKind,
121
129
  policy: item.skill.installPolicy
122
- })
130
+ }),
131
+ relevance: item.relevance ?? null,
132
+ recommendationReason: item.recommendationReason ?? null
123
133
  };
124
134
  };
125
135
  export const toPublishedSkillDetail = item => ({
@@ -131,7 +141,8 @@ export const toPublishedSkillDetail = item => ({
131
141
  markdownBody: item.publishedArtifact.markdownBody,
132
142
  renderedContent: item.publishedArtifact.renderedContent,
133
143
  files: item.publishedArtifact.files,
134
- resources: item.publishedArtifact.files.filter(file => file.relativePath !== 'SKILL.md')
144
+ resources: item.publishedArtifact.files.filter(file => file.relativePath !== 'SKILL.md'),
145
+ supportingFiles: toSupportingFileMetadata(item.publishedArtifact.files.filter(file => file.relativePath !== 'SKILL.md'))
135
146
  });
136
147
  const getWizardArtifactContextKind = item => {
137
148
  if (item.assignmentSource === 'GLOBAL') return 'global';
@@ -178,7 +189,9 @@ export const toWizardArtifactSummary = item => {
178
189
  assignmentSource: item.assignmentSource,
179
190
  contextKind,
180
191
  policy: item.artifact.installPolicy
181
- })
192
+ }),
193
+ relevance: item.relevance ?? null,
194
+ recommendationReason: item.recommendationReason ?? null
182
195
  };
183
196
  };
184
197
  export const buildWizardArtifactMarkdown = item => {
@@ -194,7 +207,8 @@ export const toWizardArtifactDetail = item => ({
194
207
  markdownBody: item.artifactVersion.markdownBody,
195
208
  renderedContent: item.artifactVersion.renderedContent,
196
209
  files: item.artifactVersion.files,
197
- resources: item.artifactVersion.files.filter(file => file.relativePath !== item.artifactVersion.canonicalFilePath)
210
+ resources: item.artifactVersion.files.filter(file => file.relativePath !== item.artifactVersion.canonicalFilePath),
211
+ supportingFiles: toSupportingFileMetadata(item.artifactVersion.files.filter(file => file.relativePath !== item.artifactVersion.canonicalFilePath))
198
212
  });
199
213
  export const toWizardArtifactCatalog = (payload, options) => ({
200
214
  pluginId: options.pluginId,
@@ -245,7 +259,9 @@ export const toInstallableSkillSummary = item => ({
245
259
  assignmentSource: 'CATALOG',
246
260
  contextKind: 'installable',
247
261
  policy: item.skill.installPolicy
248
- })
262
+ }),
263
+ relevance: item.relevance ?? null,
264
+ recommendationReason: item.recommendationReason ?? null
249
265
  });
250
266
  export const toPublishedSkillCatalog = (payload, options) => ({
251
267
  pluginId: options.pluginId,