@aexol/opencode-wizard 0.4.1 → 0.4.4
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/graphql-operations.d.ts +1 -1
- package/dist/graphql-operations.js +9 -7
- package/dist/graphql-operations.js.map +1 -1
- package/dist/plugin-tools.d.ts +1 -0
- package/dist/plugin-tools.js +5 -4
- package/dist/plugin-tools.js.map +1 -1
- package/dist/published-skills-system-note.js +1 -1
- package/dist/published-skills-system-note.js.map +1 -1
- package/dist/server/runtime.js +8 -8
- package/dist/server/runtime.js.map +1 -1
- package/dist/server/types.d.ts +9 -7
- package/dist/server/types.js.map +1 -1
- package/dist/smoke-published-skills.js +5 -4
- package/dist/smoke-published-skills.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,4 +8,4 @@ export declare const SET_WIZARD_ARTIFACT_PREFERENCE_MUTATION = "\n mutation Set
|
|
|
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 EDITOR_SKILL_WORKSPACE_ASSIGNMENT_LOOKUP_QUERY = "\n query EditorSkillWorkspaceAssignmentLookup($skillSlug: String!, $workspaceSlug: String!) {\n admin {\n skill(slug: $skillSlug) {\n id\n slug\n }\n workspace(slug: $workspaceSlug) {\n id\n slug\n }\n }\n }\n";
|
|
10
10
|
export declare const BULK_CREATE_SKILL_ASSIGNMENTS_MUTATION = "\n mutation BulkCreateSkillAssignments($input: BulkCreateSkillAssignmentsInput!) {\n admin {\n bulkCreateSkillAssignments(input: $input) {\n scopePathAssignments {\n id\n }\n skippedScopePathAssignments {\n id\n }\n conflicts {\n target\n inputIndex\n reason\n message\n }\n }\n }\n }\n";
|
|
11
|
-
export declare const IMPORT_WIZARD_ARTIFACT_SNAPSHOT_MUTATION = "\n mutation ImportWizardArtifactSnapshot($input: ImportWizardArtifactSnapshotInput!) {\n importWizardArtifactSnapshot(input: $input) {\n
|
|
11
|
+
export declare const IMPORT_WIZARD_ARTIFACT_SNAPSHOT_MUTATION = "\n mutation ImportWizardArtifactSnapshot($input: ImportWizardArtifactSnapshotInput!) {\n admin {\n importWizardArtifactSnapshot(input: $input) {\n success\n skillSlug\n skillVersionId\n artifactSlug\n artifactVersionId\n errors\n }\n }\n }\n";
|
|
@@ -296,13 +296,15 @@ export const BULK_CREATE_SKILL_ASSIGNMENTS_MUTATION = `
|
|
|
296
296
|
`;
|
|
297
297
|
export const IMPORT_WIZARD_ARTIFACT_SNAPSHOT_MUTATION = `
|
|
298
298
|
mutation ImportWizardArtifactSnapshot($input: ImportWizardArtifactSnapshotInput!) {
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
299
|
+
admin {
|
|
300
|
+
importWizardArtifactSnapshot(input: $input) {
|
|
301
|
+
success
|
|
302
|
+
skillSlug
|
|
303
|
+
skillVersionId
|
|
304
|
+
artifactSlug
|
|
305
|
+
artifactVersionId
|
|
306
|
+
errors
|
|
307
|
+
}
|
|
306
308
|
}
|
|
307
309
|
}
|
|
308
310
|
`;
|
|
@@ -1 +1 @@
|
|
|
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","EDITOR_SKILL_WORKSPACE_ASSIGNMENT_LOOKUP_QUERY","BULK_CREATE_SKILL_ASSIGNMENTS_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 EDITOR_SKILL_WORKSPACE_ASSIGNMENT_LOOKUP_QUERY = `\n query EditorSkillWorkspaceAssignmentLookup($skillSlug: String!, $workspaceSlug: String!) {\n admin {\n skill(slug: $skillSlug) {\n id\n slug\n }\n workspace(slug: $workspaceSlug) {\n id\n slug\n }\n }\n }\n`;\n\nexport const BULK_CREATE_SKILL_ASSIGNMENTS_MUTATION = `\n mutation BulkCreateSkillAssignments($input: BulkCreateSkillAssignmentsInput!) {\n admin {\n bulkCreateSkillAssignments(input: $input) {\n scopePathAssignments {\n id\n }\n skippedScopePathAssignments {\n id\n }\n conflicts {\n target\n inputIndex\n reason\n message\n }\n }\n }\n }\n`;\n\nexport const IMPORT_WIZARD_ARTIFACT_SNAPSHOT_MUTATION = `\n mutation ImportWizardArtifactSnapshot($input: ImportWizardArtifactSnapshotInput!) {\n importWizardArtifactSnapshot(input: $input) {\n
|
|
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","EDITOR_SKILL_WORKSPACE_ASSIGNMENT_LOOKUP_QUERY","BULK_CREATE_SKILL_ASSIGNMENTS_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 EDITOR_SKILL_WORKSPACE_ASSIGNMENT_LOOKUP_QUERY = `\n query EditorSkillWorkspaceAssignmentLookup($skillSlug: String!, $workspaceSlug: String!) {\n admin {\n skill(slug: $skillSlug) {\n id\n slug\n }\n workspace(slug: $workspaceSlug) {\n id\n slug\n }\n }\n }\n`;\n\nexport const BULK_CREATE_SKILL_ASSIGNMENTS_MUTATION = `\n mutation BulkCreateSkillAssignments($input: BulkCreateSkillAssignmentsInput!) {\n admin {\n bulkCreateSkillAssignments(input: $input) {\n scopePathAssignments {\n id\n }\n skippedScopePathAssignments {\n id\n }\n conflicts {\n target\n inputIndex\n reason\n message\n }\n }\n }\n }\n`;\n\nexport const IMPORT_WIZARD_ARTIFACT_SNAPSHOT_MUTATION = `\n mutation ImportWizardArtifactSnapshot($input: ImportWizardArtifactSnapshotInput!) {\n admin {\n importWizardArtifactSnapshot(input: $input) {\n success\n skillSlug\n skillVersionId\n artifactSlug\n artifactVersionId\n errors\n }\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,8CAA8C,GAAG;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,sCAAsC,GAAG;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA,CAAC","ignoreList":[]}
|
package/dist/plugin-tools.d.ts
CHANGED
|
@@ -91,6 +91,7 @@ type PublishedSkillToolHandlers = {
|
|
|
91
91
|
importWizardArtifact: (args: WizardArtifactImportArgs, context: ToolExecuteContext) => Promise<unknown>;
|
|
92
92
|
};
|
|
93
93
|
export declare const AVAILABLE_PUBLISHED_SKILL_TOOLS: string[];
|
|
94
|
+
export declare const hasPrivilegedWizardToolRole: (role: string | null | undefined) => boolean;
|
|
94
95
|
export declare const resolveAvailableTools: (role: string | null | undefined) => string[];
|
|
95
96
|
export declare const createPublishedSkillToolDefinitions: (tool: ToolFactory, handlers: PublishedSkillToolHandlers) => {
|
|
96
97
|
sharedTools: {
|
package/dist/plugin-tools.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export const AVAILABLE_PUBLISHED_SKILL_TOOLS = ['opencode_wizard_catalog_fetch', 'opencode_wizard_artifact_fetch', 'opencode_wizard_artifact_preference_set', 'opencode_wizard_published_skills_fetch', 'opencode_wizard_published_skill_preference_set', 'opencode_wizard_status', 'opencode_wizard_editor_create_or_update_skill', 'opencode_wizard_editor_publish_skill', 'opencode_wizard_artifact_import'];
|
|
2
2
|
const SHARED_PUBLISHED_SKILL_TOOLS = AVAILABLE_PUBLISHED_SKILL_TOOLS.slice(0, 6);
|
|
3
|
+
export const hasPrivilegedWizardToolRole = role => role === 'ADMIN' || role === 'EDITOR';
|
|
3
4
|
export const resolveAvailableTools = role => {
|
|
4
|
-
if (role
|
|
5
|
+
if (hasPrivilegedWizardToolRole(role)) return [...AVAILABLE_PUBLISHED_SKILL_TOOLS];
|
|
5
6
|
return [...SHARED_PUBLISHED_SKILL_TOOLS];
|
|
6
7
|
};
|
|
7
8
|
export const createPublishedSkillToolDefinitions = (tool, handlers) => ({
|
|
@@ -82,7 +83,7 @@ export const createPublishedSkillToolDefinitions = (tool, handlers) => ({
|
|
|
82
83
|
},
|
|
83
84
|
editorOnlyTools: {
|
|
84
85
|
opencode_wizard_editor_create_or_update_skill: tool({
|
|
85
|
-
description: 'Canonical
|
|
86
|
+
description: 'Canonical privileged skill creation/update tool for ADMIN or EDITOR sessions. Sends direct SKILL.md markdown content to the backend createOrUpdateSkillFromMarkdown mutation and creates a workspace assignment when the directory resolves to a backend workspace.',
|
|
86
87
|
args: {
|
|
87
88
|
markdownContent: tool.schema.string().describe('Complete SKILL.md markdown content, including frontmatter when the backend skill contract requires it'),
|
|
88
89
|
directory: tool.schema.string().optional().describe('Optional absolute or relative directory override')
|
|
@@ -92,7 +93,7 @@ export const createPublishedSkillToolDefinitions = (tool, handlers) => ({
|
|
|
92
93
|
}
|
|
93
94
|
}),
|
|
94
95
|
opencode_wizard_editor_publish_skill: tool({
|
|
95
|
-
description: 'Read skill markdown files from .opencode/skills/ and publish them to the backend via the createOrUpdateSkillFromMarkdown mutation, then assign them to the resolved workspace when available. Requires EDITOR role.',
|
|
96
|
+
description: 'Read skill markdown files from .opencode/skills/ and publish them to the backend via the createOrUpdateSkillFromMarkdown mutation, then assign them to the resolved workspace when available. Requires ADMIN or EDITOR role.',
|
|
96
97
|
args: {
|
|
97
98
|
skillSlug: tool.schema.string().describe('Skill slug matching a directory under .opencode/skills/'),
|
|
98
99
|
directory: tool.schema.string().optional().describe('Optional absolute or relative directory override')
|
|
@@ -102,7 +103,7 @@ export const createPublishedSkillToolDefinitions = (tool, handlers) => ({
|
|
|
102
103
|
}
|
|
103
104
|
}),
|
|
104
105
|
opencode_wizard_artifact_import: tool({
|
|
105
|
-
description: '
|
|
106
|
+
description: 'Privileged ADMIN/EDITOR 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.',
|
|
106
107
|
args: {
|
|
107
108
|
artifactKind: tool.schema.string().optional().describe('Wizard artifact kind to import: SKILL or DESIGN_DOC; inferred from source when omitted'),
|
|
108
109
|
source: tool.schema.string().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`'),
|
package/dist/plugin-tools.js.map
CHANGED
|
@@ -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","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. To disable a per-user global starter/global skill, call artifactKind=SKILL action=ignore preferenceScope=global; use action=unignore preferenceScope=global to enable it again.',\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. Use global with ignore/unignore to disable or enable starter/global skills for the current user.'),\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 shared server-backed preference API; auth/catalog failures are returned in tool output. Disable a per-user global starter/global skill with skill=<slug> action=ignore preferenceScope=global; enable it again with action=unignore preferenceScope=global.',\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. Use global with ignore/unignore to turn starter/global skills off or on for the current user.'),\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 and creates a workspace assignment when the directory resolves to a backend workspace.',\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, then assign them to the resolved workspace when available. 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,C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yB,+BAA+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":[]}
|
|
1
|
+
{"version":3,"names":["AVAILABLE_PUBLISHED_SKILL_TOOLS","SHARED_PUBLISHED_SKILL_TOOLS","slice","hasPrivilegedWizardToolRole","role","resolveAvailableTools","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 hasPrivilegedWizardToolRole = (role: string | null | undefined): boolean =>\n role === 'ADMIN' || role === 'EDITOR';\n\nexport const resolveAvailableTools = (role: string | null | undefined): string[] => {\n if (hasPrivilegedWizardToolRole(role)) 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. To disable a per-user global starter/global skill, call artifactKind=SKILL action=ignore preferenceScope=global; use action=unignore preferenceScope=global to enable it again.',\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. Use global with ignore/unignore to disable or enable starter/global skills for the current user.'),\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 shared server-backed preference API; auth/catalog failures are returned in tool output. Disable a per-user global starter/global skill with skill=<slug> action=ignore preferenceScope=global; enable it again with action=unignore preferenceScope=global.',\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. Use global with ignore/unignore to turn starter/global skills off or on for the current user.'),\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 privileged skill creation/update tool for ADMIN or EDITOR sessions. Sends direct SKILL.md markdown content to the backend createOrUpdateSkillFromMarkdown mutation and creates a workspace assignment when the directory resolves to a backend workspace.',\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, then assign them to the resolved workspace when available. Requires ADMIN or 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 'Privileged ADMIN/EDITOR 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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AM,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":[]}
|
|
@@ -9,6 +9,6 @@ export const buildPublishedSkillsSystemNote = ({
|
|
|
9
9
|
const renderedSkillNames = skillNames.length > 0 ? skillNames.slice(0, SYSTEM_NOTE_SKILL_NAME_LIMIT).join(', ') : 'none';
|
|
10
10
|
const remainingCount = Math.max(skillNames.length - SYSTEM_NOTE_SKILL_NAME_LIMIT, 0);
|
|
11
11
|
const renderedCountSuffix = remainingCount > 0 ? ` (+${remainingCount} more)` : '';
|
|
12
|
-
return [workspace ? `Workspace: ${workspace.slug}.` : 'Workspace not found; workspace-scoped wizard skills are unavailable.', `
|
|
12
|
+
return [workspace ? `Workspace: ${workspace.slug}.` : 'Workspace not found; workspace-scoped wizard skills are unavailable.', `Directory: ${directoryPath}.`, `Wizard-listed skills (${skillNames.length}): ${renderedSkillNames}${renderedCountSuffix}.`, 'Fetch rule: only when the user task materially matches a wizard-listed skill workflow, fetch it with `opencode_wizard_published_skills_fetch`; the fetched `SKILL.md` is authoritative.', 'Catalog/status metadata is discovery-only, not executable skill instructions.', 'If fetch/auth/catalog fails, report degraded wizard-skill context and continue with normal repo evidence when safe.', 'Use `refresh: true` before cache deletion; use `opencode_wizard_artifact_fetch` for non-skill wizard artifacts.'].filter(Boolean).join(' ');
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=published-skills-system-note.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SYSTEM_NOTE_SKILL_NAME_LIMIT","buildPublishedSkillsSystemNote","workspace","directoryPath","catalog","details","_details","skillNames","skills","map","skill","artifactName","skillName","skillSlug","renderedSkillNames","length","slice","join","remainingCount","Math","max","renderedCountSuffix","slug","filter","Boolean"],"sources":["../src/published-skills-system-note.ts"],"sourcesContent":["import type { PublishedSkillsSuccessState } from './published-skills-transform.js';\n\nconst SYSTEM_NOTE_SKILL_NAME_LIMIT = 10;\n\nexport const buildPublishedSkillsSystemNote = ({\n workspace,\n directoryPath,\n catalog,\n details: _details,\n}: {\n workspace: { slug: string } | null;\n directoryPath: string;\n catalog: PublishedSkillsSuccessState;\n details: unknown[];\n}): string => {\n const skillNames = catalog.skills.map((skill) => skill.artifactName || skill.skillName || skill.skillSlug);\n const renderedSkillNames =\n skillNames.length > 0 ? skillNames.slice(0, SYSTEM_NOTE_SKILL_NAME_LIMIT).join(', ') : 'none';\n const remainingCount = Math.max(skillNames.length - SYSTEM_NOTE_SKILL_NAME_LIMIT, 0);\n const renderedCountSuffix = remainingCount > 0 ? ` (+${remainingCount} more)` : '';\n\n return [\n workspace ? `Workspace: ${workspace.slug}.` : 'Workspace not found; workspace-scoped wizard skills are unavailable.',\n `
|
|
1
|
+
{"version":3,"names":["SYSTEM_NOTE_SKILL_NAME_LIMIT","buildPublishedSkillsSystemNote","workspace","directoryPath","catalog","details","_details","skillNames","skills","map","skill","artifactName","skillName","skillSlug","renderedSkillNames","length","slice","join","remainingCount","Math","max","renderedCountSuffix","slug","filter","Boolean"],"sources":["../src/published-skills-system-note.ts"],"sourcesContent":["import type { PublishedSkillsSuccessState } from './published-skills-transform.js';\n\nconst SYSTEM_NOTE_SKILL_NAME_LIMIT = 10;\n\nexport const buildPublishedSkillsSystemNote = ({\n workspace,\n directoryPath,\n catalog,\n details: _details,\n}: {\n workspace: { slug: string } | null;\n directoryPath: string;\n catalog: PublishedSkillsSuccessState;\n details: unknown[];\n}): string => {\n const skillNames = catalog.skills.map((skill) => skill.artifactName || skill.skillName || skill.skillSlug);\n const renderedSkillNames =\n skillNames.length > 0 ? skillNames.slice(0, SYSTEM_NOTE_SKILL_NAME_LIMIT).join(', ') : 'none';\n const remainingCount = Math.max(skillNames.length - SYSTEM_NOTE_SKILL_NAME_LIMIT, 0);\n const renderedCountSuffix = remainingCount > 0 ? ` (+${remainingCount} more)` : '';\n\n return [\n workspace ? `Workspace: ${workspace.slug}.` : 'Workspace not found; workspace-scoped wizard skills are unavailable.',\n `Directory: ${directoryPath}.`,\n `Wizard-listed skills (${skillNames.length}): ${renderedSkillNames}${renderedCountSuffix}.`,\n 'Fetch rule: only when the user task materially matches a wizard-listed skill workflow, fetch it with `opencode_wizard_published_skills_fetch`; the fetched `SKILL.md` is authoritative.',\n 'Catalog/status metadata is discovery-only, not executable skill instructions.',\n 'If fetch/auth/catalog fails, report degraded wizard-skill context and continue with normal repo evidence when safe.',\n 'Use `refresh: true` before cache deletion; use `opencode_wizard_artifact_fetch` for non-skill wizard artifacts.',\n ]\n .filter(Boolean)\n .join(' ');\n};\n"],"mappings":"AAEA,MAAMA,4BAA4B,GAAG,EAAE;AAEvC,OAAO,MAAMC,8BAA8B,GAAGA,CAAC;EAC7CC,SAAS;EACTC,aAAa;EACbC,OAAO;EACPC,OAAO,EAAEC;AAMX,CAAC,KAAa;EACZ,MAAMC,UAAU,GAAGH,OAAO,CAACI,MAAM,CAACC,GAAG,CAAEC,KAAK,IAAKA,KAAK,CAACC,YAAY,IAAID,KAAK,CAACE,SAAS,IAAIF,KAAK,CAACG,SAAS,CAAC;EAC1G,MAAMC,kBAAkB,GACtBP,UAAU,CAACQ,MAAM,GAAG,CAAC,GAAGR,UAAU,CAACS,KAAK,CAAC,CAAC,EAAEhB,4BAA4B,CAAC,CAACiB,IAAI,CAAC,IAAI,CAAC,GAAG,MAAM;EAC/F,MAAMC,cAAc,GAAGC,IAAI,CAACC,GAAG,CAACb,UAAU,CAACQ,MAAM,GAAGf,4BAA4B,EAAE,CAAC,CAAC;EACpF,MAAMqB,mBAAmB,GAAGH,cAAc,GAAG,CAAC,GAAG,MAAMA,cAAc,QAAQ,GAAG,EAAE;EAElF,OAAO,CACLhB,SAAS,GAAG,cAAcA,SAAS,CAACoB,IAAI,GAAG,GAAG,sEAAsE,EACpH,cAAcnB,aAAa,GAAG,EAC9B,yBAAyBI,UAAU,CAACQ,MAAM,MAAMD,kBAAkB,GAAGO,mBAAmB,GAAG,EAC3F,yLAAyL,EACzL,+EAA+E,EAC/E,qHAAqH,EACrH,iHAAiH,CAClH,CACEE,MAAM,CAACC,OAAO,CAAC,CACfP,IAAI,CAAC,GAAG,CAAC;AACd,CAAC","ignoreList":[]}
|
package/dist/server/runtime.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { BULK_CREATE_SKILL_ASSIGNMENTS_MUTATION, CREATE_OR_UPDATE_SKILL_FROM_MARKDOWN_MUTATION, EDITOR_SKILL_WORKSPACE_ASSIGNMENT_LOOKUP_QUERY, IMPORT_WIZARD_ARTIFACT_SNAPSHOT_MUTATION, SET_WIZARD_ARTIFACT_PREFERENCE_MUTATION } from '../graphql-operations.js';
|
|
4
|
-
import { createPublishedSkillToolDefinitions, resolveAvailableTools } from '../plugin-tools.js';
|
|
4
|
+
import { createPublishedSkillToolDefinitions, hasPrivilegedWizardToolRole, resolveAvailableTools } from '../plugin-tools.js';
|
|
5
5
|
import { resolveStoredAuthState, toAuthState, writeAuthState } from './auth-store.js';
|
|
6
6
|
import { resolveConfig } from './config.js';
|
|
7
7
|
export { resolveConfig } from './config.js';
|
|
@@ -1517,14 +1517,14 @@ export const OpencodeWizardSkillsPlugin = async input => {
|
|
|
1517
1517
|
requestedSkillSlug
|
|
1518
1518
|
}) => {
|
|
1519
1519
|
const authState = await resolveStoredAuthState(input.worktree, config);
|
|
1520
|
-
if (!authState || authState.role
|
|
1520
|
+
if (!authState || !hasPrivilegedWizardToolRole(authState.role)) {
|
|
1521
1521
|
return {
|
|
1522
1522
|
output: JSON.stringify({
|
|
1523
1523
|
pluginId: PLUGIN_ID,
|
|
1524
1524
|
status: 'forbidden',
|
|
1525
1525
|
skillSlug: requestedSkillSlug ?? null,
|
|
1526
1526
|
source,
|
|
1527
|
-
message: 'This tool requires EDITOR role. Your current session does not have the required
|
|
1527
|
+
message: 'This tool requires ADMIN or EDITOR role. Your current session does not have the required privileged permission.'
|
|
1528
1528
|
}, null, 2),
|
|
1529
1529
|
metadata: {
|
|
1530
1530
|
status: 'forbidden',
|
|
@@ -1629,14 +1629,14 @@ export const OpencodeWizardSkillsPlugin = async input => {
|
|
|
1629
1629
|
throw new Error('Editor publish requires a non-empty skill slug.');
|
|
1630
1630
|
}
|
|
1631
1631
|
const authState = await resolveStoredAuthState(input.worktree, config);
|
|
1632
|
-
if (!authState || authState.role
|
|
1632
|
+
if (!authState || !hasPrivilegedWizardToolRole(authState.role)) {
|
|
1633
1633
|
return {
|
|
1634
1634
|
output: JSON.stringify({
|
|
1635
1635
|
pluginId: PLUGIN_ID,
|
|
1636
1636
|
status: 'forbidden',
|
|
1637
1637
|
skillSlug: requestedSkillSlug,
|
|
1638
1638
|
source: 'seed_file',
|
|
1639
|
-
message: 'This tool requires EDITOR role. Your current session does not have the required
|
|
1639
|
+
message: 'This tool requires ADMIN or EDITOR role. Your current session does not have the required privileged permission.'
|
|
1640
1640
|
}, null, 2),
|
|
1641
1641
|
metadata: {
|
|
1642
1642
|
status: 'forbidden',
|
|
@@ -1694,14 +1694,14 @@ export const OpencodeWizardSkillsPlugin = async input => {
|
|
|
1694
1694
|
slug: args.slug,
|
|
1695
1695
|
skill: args.skill
|
|
1696
1696
|
});
|
|
1697
|
-
if (!authState || authState.role
|
|
1697
|
+
if (!authState || !hasPrivilegedWizardToolRole(authState.role)) {
|
|
1698
1698
|
return {
|
|
1699
1699
|
output: JSON.stringify({
|
|
1700
1700
|
pluginId: PLUGIN_ID,
|
|
1701
1701
|
status: 'forbidden',
|
|
1702
1702
|
artifactKind: importPlan.artifactKind,
|
|
1703
1703
|
source: importPlan.source,
|
|
1704
|
-
message: 'This tool requires EDITOR role. Your current session does not have the required
|
|
1704
|
+
message: 'This tool requires ADMIN or EDITOR role. Your current session does not have the required privileged permission.'
|
|
1705
1705
|
}, null, 2),
|
|
1706
1706
|
metadata: {
|
|
1707
1707
|
status: 'forbidden',
|
|
@@ -1772,7 +1772,7 @@ export const OpencodeWizardSkillsPlugin = async input => {
|
|
|
1772
1772
|
}
|
|
1773
1773
|
};
|
|
1774
1774
|
}
|
|
1775
|
-
const payload = response.data.importWizardArtifactSnapshot;
|
|
1775
|
+
const payload = response.data.admin.importWizardArtifactSnapshot;
|
|
1776
1776
|
await scheduleInteractivePresenceStart();
|
|
1777
1777
|
return {
|
|
1778
1778
|
output: JSON.stringify({
|