@aexol/opencode-wizard 0.3.4 → 0.3.6
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 +11 -7
- package/dist/graphql-operations.d.ts +6 -2
- package/dist/graphql-operations.js +173 -156
- package/dist/graphql-operations.js.map +1 -1
- package/dist/plugin-tools.d.ts +37 -0
- package/dist/plugin-tools.js +58 -7
- package/dist/plugin-tools.js.map +1 -1
- package/dist/published-skills-system-note.js +3 -7
- package/dist/published-skills-system-note.js.map +1 -1
- package/dist/published-skills-terminology.d.ts +21 -0
- package/dist/published-skills-terminology.js +38 -0
- package/dist/published-skills-terminology.js.map +1 -0
- package/dist/published-skills-transform.d.ts +99 -2
- package/dist/published-skills-transform.js +91 -19
- package/dist/published-skills-transform.js.map +1 -1
- package/dist/server/auth-bootstrap.d.ts +7 -0
- package/dist/server/auth-bootstrap.js +89 -0
- package/dist/server/auth-bootstrap.js.map +1 -0
- package/dist/server/client.d.ts +30 -1
- package/dist/server/client.js +81 -1
- package/dist/server/client.js.map +1 -1
- package/dist/server/import-sources.d.ts +27 -0
- package/dist/server/import-sources.js +115 -0
- package/dist/server/import-sources.js.map +1 -0
- package/dist/server/preferences.d.ts +22 -0
- package/dist/server/preferences.js +121 -0
- package/dist/server/preferences.js.map +1 -0
- package/dist/server/runtime.d.ts +3 -22
- package/dist/server/runtime.js +567 -242
- package/dist/server/runtime.js.map +1 -1
- package/dist/server/types.d.ts +87 -0
- package/dist/server/types.js.map +1 -1
- package/dist/server.d.ts +1 -0
- package/dist/server.js +1 -0
- package/dist/server.js.map +1 -1
- package/dist/smoke-published-skills.js +4 -4
- package/dist/smoke-published-skills.js.map +1 -1
- package/dist/tui/components/common.d.ts +0 -1
- package/dist/tui/components/common.js +6 -29
- package/dist/tui/components/common.js.map +1 -1
- package/dist/tui/components/status-content.js +1 -1
- package/dist/tui/components/status-content.js.map +1 -1
- package/dist/tui/constants.d.ts +0 -5
- package/dist/tui/constants.js +0 -5
- package/dist/tui/constants.js.map +1 -1
- package/dist/tui/formatting.d.ts +0 -3
- package/dist/tui/formatting.js +1 -13
- package/dist/tui/formatting.js.map +1 -1
- package/dist/tui/skill-helpers.d.ts +1 -11
- package/dist/tui/skill-helpers.js +0 -41
- package/dist/tui/skill-helpers.js.map +1 -1
- package/dist/tui/slots.d.ts +1 -1
- package/dist/tui/slots.js +1 -24
- package/dist/tui/slots.js.map +1 -1
- package/dist/tui/status.js +2 -2
- package/dist/tui/status.js.map +1 -1
- package/dist/tui/types.d.ts +0 -19
- package/dist/tui/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/tui/components/preference-action-notice-row.d.ts +0 -5
- package/dist/tui/components/preference-action-notice-row.js +0 -17
- package/dist/tui/components/preference-action-notice-row.js.map +0 -1
- package/dist/tui/components/skill-catalog-row.d.ts +0 -8
- package/dist/tui/components/skill-catalog-row.js +0 -124
- package/dist/tui/components/skill-catalog-row.js.map +0 -1
- package/dist/tui/components/wizard-skills-dialog-content.d.ts +0 -9
- package/dist/tui/components/wizard-skills-dialog-content.js +0 -219
- package/dist/tui/components/wizard-skills-dialog-content.js.map +0 -1
- package/dist/tui/components/wizard-skills-dialog.d.ts +0 -7
- package/dist/tui/components/wizard-skills-dialog.js +0 -156
- package/dist/tui/components/wizard-skills-dialog.js.map +0 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- `./tui` → `dist/tui.js`
|
|
10
10
|
- no generated runtime skill directory is published; the plugin stays fetch-only at runtime
|
|
11
11
|
- native OpenCode `skills.urls` is treated as a public/static registry complement, not as the private wizard delivery authority
|
|
12
|
-
- the TUI
|
|
12
|
+
- the TUI is a minimalist information-only panel showing backend/auth/catalog status without exposing install, ignore, import, publish, or preference actions
|
|
13
13
|
|
|
14
14
|
## Local development
|
|
15
15
|
|
|
@@ -42,21 +42,25 @@ For repo-local development, continue using the local path-based config already d
|
|
|
42
42
|
|
|
43
43
|
OpenCode's native `skills.urls` support downloads public/static skill registries from base URLs that expose an `index.json` and file paths under that base URL. Current support has no plugin session/header integration, so it must not be pointed at private opencode-wizard skill delivery.
|
|
44
44
|
|
|
45
|
-
Use `skills.urls` only for public registries that are intentionally cacheable by OpenCode. Private workspace-scoped wizard
|
|
45
|
+
Use `skills.urls` only for public registries that are intentionally cacheable by OpenCode. Private workspace-scoped wizard artifacts remain authenticated and directory-scoped through `opencode_wizard_artifact_fetch` or compatibility `opencode_wizard_published_skills_fetch`; same-named native/local seed skill bodies are not authoritative for wizard-listed skills.
|
|
46
46
|
|
|
47
47
|
## Catalog discovery and auth bootstrap
|
|
48
48
|
|
|
49
|
-
Catalog discovery uses the backend-issued plugin session token stored at `~/.config/opencode/opencode-wizard.json` (`auth` field); the plugin does not persist or send Microsoft/Entra tokens to GraphQL. If no valid plugin session exists, no-arg `opencode_wizard_published_skills_fetch`, explicit `opencode_wizard_status`,
|
|
49
|
+
Catalog discovery uses the backend-issued plugin session token stored at `~/.config/opencode/opencode-wizard.json` (`auth` field); the plugin does not persist or send Microsoft/Entra tokens to GraphQL. If no valid plugin session exists, no-arg `opencode_wizard_catalog_fetch`, compatibility no-arg `opencode_wizard_published_skills_fetch`, explicit `opencode_wizard_status`, and chat/system-context startup may start the browser Entra PKCE flow and exchange the callback for a fresh backend-issued plugin session. The TUI status panel only displays the resulting auth/catalog state.
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
The shared plugin tools `opencode_wizard_catalog_fetch`, `opencode_wizard_artifact_fetch`, `opencode_wizard_artifact_preference_set`, compatibility published-skill tools, and `opencode_wizard_status` are always exposed by the plugin. Missing auth, forbidden role, backend, or catalog problems are reported by tool output/status metadata instead of hiding these shared tools; only `opencode_wizard_editor_publish_skill` and `opencode_wizard_artifact_import` stay editor-only.
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Call `opencode_wizard_catalog_fetch` with `artifactKind: SKILL` or compatibility `opencode_wizard_published_skills_fetch` without `skill` or `skills` to manually bootstrap plugin login if needed and return catalog-only discovery output for the current directory scope.
|
|
54
|
+
|
|
55
|
+
No-arg discovery returns published skill summaries, assignment counts split into `global`, `project`, `user`, and `other`, policy metadata, and no markdown bodies. Canonical `opencode_wizard_artifact_fetch` with `artifactKind: SKILL` and compatibility `skill`/`skills` calls fetch one or more full skill body/detail payloads by slug, artifact name, or skill name. `DESIGN_DOC` uses generic wizard artifact persistence and returns metadata-only catalogs plus explicit `DESIGN.md` body/files detail fetches for effective assignments. Use the fetched `markdownDocument`/`markdownBody` as the authoritative wizard skill body before applying a wizard-listed skill.
|
|
54
56
|
|
|
55
57
|
Workspace delivery still follows the backend contract: the plugin sends `workspaceSlug` when it has one, otherwise falls back to `repositoryUrl`. The plugin now prefers configured or learned workspace slug mappings over a repo-basename fallback, and learns durable slug-to-repo mappings from successful backend catalog responses so worktrees and nontrivial repo roots stay aligned.
|
|
56
58
|
|
|
57
|
-
Published skill fetches still support `refresh: true`, but normal cache entries now self-expire after 30 seconds and fetch/status payloads surface `source`, `workspaceSlug`, and `workspaceSlugSource` so stale-vs-refreshed behavior is visible without relying on manual cache deletion.
|
|
59
|
+
Published skill fetches still support `refresh: true`, but normal cache entries now self-expire after 30 seconds and fetch/status payloads surface `source`, `workspaceSlug`, and `workspaceSlugSource` so stale-vs-refreshed behavior is visible without relying on manual cache deletion. Try `refresh: true` and report the tool-output auth/catalog/source/cache/workspace-resolution state before deleting `~/.cache/opencode/*`.
|
|
60
|
+
|
|
61
|
+
Use `opencode_wizard_artifact_preference_set` or compatibility `opencode_wizard_published_skill_preference_set` for preference actions (`install`, `uninstall`, `ignore`, `unignore`); the TUI panel stays information-only and does not expose those mutations.
|
|
58
62
|
|
|
59
|
-
|
|
63
|
+
Editors can import external artifacts without writing project files via `opencode_wizard_artifact_import`: use `source: "npx getdesign@latest add bmw-m"` for a `DESIGN_DOC`, or `source: "https://github.com/vercel-labs/skills --skill find-skills"` for a `SKILL`. The plugin fetches raw markdown, sends it to the backend import mutation, records the importing editor in existing created/published actor fields plus source metadata, and the imported backend artifact becomes the runtime authority.
|
|
60
64
|
|
|
61
65
|
`GLOBAL_CONTEXT` skills are active context skills and are not meant to be installed per project. `PROJECT_INSTALLABLE` skills are gallery/installable skills that may be attached globally or to a workspace/path through assignment records; those assignments remain the source of truth for what is active in a catalog response.
|
|
62
66
|
|
|
@@ -1,4 +1,8 @@
|
|
|
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 assignmentSource\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 assignmentSource\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 \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";
|
|
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 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 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 canonicalFilePath\n publishedAt\n fileCount\n }\n\n\n }\n }\n unsupportedReason\n message\n }\n }\n";
|
|
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 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
|
+
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 canonicalFilePath\n publishedAt\n fileCount\n }\n\n\n }\n }\n }\n";
|
|
4
7
|
export declare const CREATE_OR_UPDATE_SKILL_FROM_MARKDOWN_MUTATION = "\n mutation CreateOrUpdateSkillFromMarkdown($markdownContent: String!) {\n createOrUpdateSkillFromMarkdown(markdownContent: $markdownContent) {\n success\n skillSlug\n skillVersionId\n errors\n }\n }\n";
|
|
8
|
+
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";
|
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
const PUBLISHED_SKILL_CORE_FIELDS = `
|
|
2
|
+
skill {
|
|
3
|
+
id
|
|
4
|
+
slug
|
|
5
|
+
name
|
|
6
|
+
summary
|
|
7
|
+
whenToUse
|
|
8
|
+
status
|
|
9
|
+
installPolicy
|
|
10
|
+
tags {
|
|
11
|
+
id
|
|
12
|
+
slug
|
|
13
|
+
label
|
|
14
|
+
description
|
|
15
|
+
facet {
|
|
16
|
+
id
|
|
17
|
+
slug
|
|
18
|
+
label
|
|
19
|
+
description
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
skillVersion {
|
|
24
|
+
id
|
|
25
|
+
version
|
|
26
|
+
title
|
|
27
|
+
summary
|
|
28
|
+
status
|
|
29
|
+
}
|
|
30
|
+
publishedArtifact {
|
|
31
|
+
id
|
|
32
|
+
frontmatterName
|
|
33
|
+
frontmatterDescription
|
|
34
|
+
checksum
|
|
35
|
+
publishedAt
|
|
36
|
+
fileCount
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
const PUBLISHED_SKILL_ASSIGNMENT_FIELDS = `
|
|
40
|
+
assignmentSource
|
|
41
|
+
assignmentType
|
|
42
|
+
scopePath
|
|
43
|
+
includeChildren
|
|
44
|
+
${PUBLISHED_SKILL_CORE_FIELDS}
|
|
45
|
+
`;
|
|
1
46
|
export const PUBLISHED_SKILLS_CATALOG_QUERY = `
|
|
2
47
|
query PluginPublishedSkills($input: PublishedSkillsDeliveryInput!) {
|
|
3
48
|
pluginPublishedSkills(input: $input) {
|
|
@@ -11,129 +56,16 @@ export const PUBLISHED_SKILLS_CATALOG_QUERY = `
|
|
|
11
56
|
}
|
|
12
57
|
directoryPath
|
|
13
58
|
skills {
|
|
14
|
-
|
|
15
|
-
assignmentType
|
|
16
|
-
scopePath
|
|
17
|
-
includeChildren
|
|
18
|
-
skill {
|
|
19
|
-
id
|
|
20
|
-
slug
|
|
21
|
-
name
|
|
22
|
-
summary
|
|
23
|
-
whenToUse
|
|
24
|
-
status
|
|
25
|
-
installPolicy
|
|
26
|
-
tags {
|
|
27
|
-
id
|
|
28
|
-
slug
|
|
29
|
-
label
|
|
30
|
-
description
|
|
31
|
-
facet {
|
|
32
|
-
id
|
|
33
|
-
slug
|
|
34
|
-
label
|
|
35
|
-
description
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
skillVersion {
|
|
40
|
-
id
|
|
41
|
-
version
|
|
42
|
-
title
|
|
43
|
-
summary
|
|
44
|
-
status
|
|
45
|
-
}
|
|
46
|
-
publishedArtifact {
|
|
47
|
-
id
|
|
48
|
-
frontmatterName
|
|
49
|
-
frontmatterDescription
|
|
50
|
-
checksum
|
|
51
|
-
publishedAt
|
|
52
|
-
fileCount
|
|
53
|
-
}
|
|
59
|
+
${PUBLISHED_SKILL_ASSIGNMENT_FIELDS}
|
|
54
60
|
}
|
|
55
61
|
catalogSkills {
|
|
56
|
-
|
|
57
|
-
id
|
|
58
|
-
slug
|
|
59
|
-
name
|
|
60
|
-
summary
|
|
61
|
-
whenToUse
|
|
62
|
-
status
|
|
63
|
-
installPolicy
|
|
64
|
-
tags {
|
|
65
|
-
id
|
|
66
|
-
slug
|
|
67
|
-
label
|
|
68
|
-
description
|
|
69
|
-
facet {
|
|
70
|
-
id
|
|
71
|
-
slug
|
|
72
|
-
label
|
|
73
|
-
description
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
skillVersion {
|
|
78
|
-
id
|
|
79
|
-
version
|
|
80
|
-
title
|
|
81
|
-
summary
|
|
82
|
-
status
|
|
83
|
-
}
|
|
84
|
-
publishedArtifact {
|
|
85
|
-
id
|
|
86
|
-
frontmatterName
|
|
87
|
-
frontmatterDescription
|
|
88
|
-
checksum
|
|
89
|
-
publishedAt
|
|
90
|
-
fileCount
|
|
91
|
-
}
|
|
62
|
+
${PUBLISHED_SKILL_CORE_FIELDS}
|
|
92
63
|
}
|
|
93
64
|
userPreferences {
|
|
94
65
|
scopeKey
|
|
95
66
|
userKey
|
|
96
67
|
ignoredSkills {
|
|
97
|
-
|
|
98
|
-
assignmentType
|
|
99
|
-
scopePath
|
|
100
|
-
includeChildren
|
|
101
|
-
skill {
|
|
102
|
-
id
|
|
103
|
-
slug
|
|
104
|
-
name
|
|
105
|
-
summary
|
|
106
|
-
whenToUse
|
|
107
|
-
status
|
|
108
|
-
installPolicy
|
|
109
|
-
tags {
|
|
110
|
-
id
|
|
111
|
-
slug
|
|
112
|
-
label
|
|
113
|
-
description
|
|
114
|
-
facet {
|
|
115
|
-
id
|
|
116
|
-
slug
|
|
117
|
-
label
|
|
118
|
-
description
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
skillVersion {
|
|
123
|
-
id
|
|
124
|
-
version
|
|
125
|
-
title
|
|
126
|
-
summary
|
|
127
|
-
status
|
|
128
|
-
}
|
|
129
|
-
publishedArtifact {
|
|
130
|
-
id
|
|
131
|
-
frontmatterName
|
|
132
|
-
frontmatterDescription
|
|
133
|
-
checksum
|
|
134
|
-
publishedAt
|
|
135
|
-
fileCount
|
|
136
|
-
}
|
|
68
|
+
${PUBLISHED_SKILL_ASSIGNMENT_FIELDS}
|
|
137
69
|
}
|
|
138
70
|
}
|
|
139
71
|
}
|
|
@@ -145,46 +77,7 @@ export const SET_PUBLISHED_SKILL_PREFERENCE_MUTATION = `
|
|
|
145
77
|
scopeKey
|
|
146
78
|
userKey
|
|
147
79
|
ignoredSkills {
|
|
148
|
-
|
|
149
|
-
assignmentType
|
|
150
|
-
scopePath
|
|
151
|
-
includeChildren
|
|
152
|
-
skill {
|
|
153
|
-
id
|
|
154
|
-
slug
|
|
155
|
-
name
|
|
156
|
-
summary
|
|
157
|
-
whenToUse
|
|
158
|
-
status
|
|
159
|
-
installPolicy
|
|
160
|
-
tags {
|
|
161
|
-
id
|
|
162
|
-
slug
|
|
163
|
-
label
|
|
164
|
-
description
|
|
165
|
-
facet {
|
|
166
|
-
id
|
|
167
|
-
slug
|
|
168
|
-
label
|
|
169
|
-
description
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
skillVersion {
|
|
174
|
-
id
|
|
175
|
-
version
|
|
176
|
-
title
|
|
177
|
-
summary
|
|
178
|
-
status
|
|
179
|
-
}
|
|
180
|
-
publishedArtifact {
|
|
181
|
-
id
|
|
182
|
-
frontmatterName
|
|
183
|
-
frontmatterDescription
|
|
184
|
-
checksum
|
|
185
|
-
publishedAt
|
|
186
|
-
fileCount
|
|
187
|
-
}
|
|
80
|
+
${PUBLISHED_SKILL_ASSIGNMENT_FIELDS}
|
|
188
81
|
}
|
|
189
82
|
}
|
|
190
83
|
}
|
|
@@ -212,6 +105,118 @@ export const PUBLISHED_SKILL_DETAIL_QUERY = `
|
|
|
212
105
|
}
|
|
213
106
|
}
|
|
214
107
|
`;
|
|
108
|
+
const WIZARD_ARTIFACT_CORE_FIELDS = `
|
|
109
|
+
artifact {
|
|
110
|
+
id
|
|
111
|
+
kind
|
|
112
|
+
slug
|
|
113
|
+
name
|
|
114
|
+
summary
|
|
115
|
+
whenToUse
|
|
116
|
+
status
|
|
117
|
+
installPolicy
|
|
118
|
+
}
|
|
119
|
+
artifactVersion {
|
|
120
|
+
id
|
|
121
|
+
version
|
|
122
|
+
title
|
|
123
|
+
summary
|
|
124
|
+
status
|
|
125
|
+
frontmatterName
|
|
126
|
+
frontmatterDescription
|
|
127
|
+
checksum
|
|
128
|
+
canonicalFilePath
|
|
129
|
+
publishedAt
|
|
130
|
+
fileCount
|
|
131
|
+
}
|
|
132
|
+
`;
|
|
133
|
+
const WIZARD_ARTIFACT_ASSIGNMENT_FIELDS = `
|
|
134
|
+
assignmentSource
|
|
135
|
+
assignmentType
|
|
136
|
+
scopePath
|
|
137
|
+
includeChildren
|
|
138
|
+
${WIZARD_ARTIFACT_CORE_FIELDS}
|
|
139
|
+
`;
|
|
140
|
+
export const WIZARD_ARTIFACTS_CATALOG_QUERY = `
|
|
141
|
+
query PluginWizardArtifacts($input: WizardArtifactsDeliveryInput!) {
|
|
142
|
+
pluginWizardArtifacts(input: $input) {
|
|
143
|
+
artifactKind
|
|
144
|
+
workspace {
|
|
145
|
+
id
|
|
146
|
+
slug
|
|
147
|
+
name
|
|
148
|
+
repositoryUrl
|
|
149
|
+
defaultBranch
|
|
150
|
+
status
|
|
151
|
+
}
|
|
152
|
+
directoryPath
|
|
153
|
+
artifacts {
|
|
154
|
+
${WIZARD_ARTIFACT_ASSIGNMENT_FIELDS}
|
|
155
|
+
}
|
|
156
|
+
catalogArtifacts {
|
|
157
|
+
${WIZARD_ARTIFACT_CORE_FIELDS}
|
|
158
|
+
}
|
|
159
|
+
artifactPreferences {
|
|
160
|
+
scopeKey
|
|
161
|
+
userKey
|
|
162
|
+
ignoredArtifacts {
|
|
163
|
+
${WIZARD_ARTIFACT_ASSIGNMENT_FIELDS}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
unsupportedReason
|
|
167
|
+
message
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
`;
|
|
171
|
+
export const WIZARD_ARTIFACT_DETAIL_QUERY = `
|
|
172
|
+
query PluginWizardArtifactVersion($input: WizardArtifactDetailInput!) {
|
|
173
|
+
pluginWizardArtifactVersion(input: $input) {
|
|
174
|
+
id
|
|
175
|
+
artifact {
|
|
176
|
+
id
|
|
177
|
+
kind
|
|
178
|
+
slug
|
|
179
|
+
name
|
|
180
|
+
summary
|
|
181
|
+
whenToUse
|
|
182
|
+
status
|
|
183
|
+
installPolicy
|
|
184
|
+
}
|
|
185
|
+
version
|
|
186
|
+
title
|
|
187
|
+
summary
|
|
188
|
+
status
|
|
189
|
+
frontmatterName
|
|
190
|
+
frontmatterDescription
|
|
191
|
+
markdownBody
|
|
192
|
+
renderedContent
|
|
193
|
+
checksum
|
|
194
|
+
canonicalFilePath
|
|
195
|
+
publishedAt
|
|
196
|
+
fileCount
|
|
197
|
+
files {
|
|
198
|
+
id
|
|
199
|
+
relativePath
|
|
200
|
+
contentType
|
|
201
|
+
content
|
|
202
|
+
checksum
|
|
203
|
+
size
|
|
204
|
+
sortOrder
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
`;
|
|
209
|
+
export const SET_WIZARD_ARTIFACT_PREFERENCE_MUTATION = `
|
|
210
|
+
mutation SetWizardArtifactPreference($input: SetWizardArtifactPreferenceInput!) {
|
|
211
|
+
setWizardArtifactPreference(input: $input) {
|
|
212
|
+
scopeKey
|
|
213
|
+
userKey
|
|
214
|
+
ignoredArtifacts {
|
|
215
|
+
${WIZARD_ARTIFACT_ASSIGNMENT_FIELDS}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
`;
|
|
215
220
|
export const CREATE_OR_UPDATE_SKILL_FROM_MARKDOWN_MUTATION = `
|
|
216
221
|
mutation CreateOrUpdateSkillFromMarkdown($markdownContent: String!) {
|
|
217
222
|
createOrUpdateSkillFromMarkdown(markdownContent: $markdownContent) {
|
|
@@ -222,4 +227,16 @@ export const CREATE_OR_UPDATE_SKILL_FROM_MARKDOWN_MUTATION = `
|
|
|
222
227
|
}
|
|
223
228
|
}
|
|
224
229
|
`;
|
|
230
|
+
export const IMPORT_WIZARD_ARTIFACT_SNAPSHOT_MUTATION = `
|
|
231
|
+
mutation ImportWizardArtifactSnapshot($input: ImportWizardArtifactSnapshotInput!) {
|
|
232
|
+
importWizardArtifactSnapshot(input: $input) {
|
|
233
|
+
success
|
|
234
|
+
skillSlug
|
|
235
|
+
skillVersionId
|
|
236
|
+
artifactSlug
|
|
237
|
+
artifactVersionId
|
|
238
|
+
errors
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
`;
|
|
225
242
|
//# sourceMappingURL=graphql-operations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PUBLISHED_SKILLS_CATALOG_QUERY","SET_PUBLISHED_SKILL_PREFERENCE_MUTATION","PUBLISHED_SKILL_DETAIL_QUERY","CREATE_OR_UPDATE_SKILL_FROM_MARKDOWN_MUTATION"],"sources":["../src/graphql-operations.ts"],"sourcesContent":["
|
|
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","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 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 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 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 createOrUpdateSkillFromMarkdown(markdownContent: $markdownContent) {\n success\n skillSlug\n skillVersionId\n errors\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,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,CAAC;AAED,OAAO,MAAMC,uCAAuC,GAAG;AACvD;AACA;AACA;AACA;AACA;AACA,UAAUH,iCAAiC;AAC3C;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMI,6CAA6C,GAAG;AAC7D;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":[]}
|
package/dist/plugin-tools.d.ts
CHANGED
|
@@ -4,6 +4,19 @@ export type PublishedSkillFetchArgs = {
|
|
|
4
4
|
directory?: string;
|
|
5
5
|
refresh?: boolean;
|
|
6
6
|
};
|
|
7
|
+
export type WizardArtifactKind = 'SKILL' | 'DESIGN_DOC';
|
|
8
|
+
export type WizardArtifactCatalogFetchArgs = {
|
|
9
|
+
artifactKind?: string;
|
|
10
|
+
directory?: string;
|
|
11
|
+
refresh?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type WizardArtifactFetchArgs = {
|
|
14
|
+
artifactKind?: string;
|
|
15
|
+
artifact?: string;
|
|
16
|
+
artifacts?: string;
|
|
17
|
+
directory?: string;
|
|
18
|
+
refresh?: boolean;
|
|
19
|
+
};
|
|
7
20
|
export type PluginStatusArgs = {
|
|
8
21
|
directory?: string;
|
|
9
22
|
};
|
|
@@ -13,10 +26,26 @@ export type PublishedSkillPreferenceArgs = {
|
|
|
13
26
|
preferenceScope?: string;
|
|
14
27
|
directory?: string;
|
|
15
28
|
};
|
|
29
|
+
export type WizardArtifactPreferenceArgs = {
|
|
30
|
+
artifactKind?: string;
|
|
31
|
+
artifact: string;
|
|
32
|
+
action: string;
|
|
33
|
+
preferenceScope?: string;
|
|
34
|
+
directory?: string;
|
|
35
|
+
};
|
|
16
36
|
export type EditorPublishSkillArgs = {
|
|
17
37
|
skillSlug: string;
|
|
18
38
|
directory?: string;
|
|
19
39
|
};
|
|
40
|
+
export type WizardArtifactImportArgs = {
|
|
41
|
+
artifactKind?: string;
|
|
42
|
+
source: string;
|
|
43
|
+
slug?: string;
|
|
44
|
+
skill?: string;
|
|
45
|
+
name?: string;
|
|
46
|
+
summary?: string;
|
|
47
|
+
directory?: string;
|
|
48
|
+
};
|
|
20
49
|
type ToolSchemaValue<TSelf> = {
|
|
21
50
|
optional: () => TSelf;
|
|
22
51
|
describe: (description: string) => TSelf;
|
|
@@ -45,20 +74,28 @@ export type ToolFactory = (<TArgs extends object>(definition: ToolDefinition<TAr
|
|
|
45
74
|
};
|
|
46
75
|
type PublishedSkillToolHandlers = {
|
|
47
76
|
fetchPublishedSkills: (args: PublishedSkillFetchArgs, context: ToolExecuteContext) => Promise<unknown>;
|
|
77
|
+
fetchWizardArtifactCatalog: (args: WizardArtifactCatalogFetchArgs, context: ToolExecuteContext) => Promise<unknown>;
|
|
78
|
+
fetchWizardArtifacts: (args: WizardArtifactFetchArgs, context: ToolExecuteContext) => Promise<unknown>;
|
|
48
79
|
updatePublishedSkillPreference: (args: PublishedSkillPreferenceArgs, context: ToolExecuteContext) => Promise<unknown>;
|
|
80
|
+
updateWizardArtifactPreference: (args: WizardArtifactPreferenceArgs, context: ToolExecuteContext) => Promise<unknown>;
|
|
49
81
|
getStatus: (args: PluginStatusArgs, context: ToolExecuteContext) => Promise<unknown>;
|
|
50
82
|
publishEditorSkill: (args: EditorPublishSkillArgs, context: ToolExecuteContext) => Promise<unknown>;
|
|
83
|
+
importWizardArtifact: (args: WizardArtifactImportArgs, context: ToolExecuteContext) => Promise<unknown>;
|
|
51
84
|
};
|
|
52
85
|
export declare const AVAILABLE_PUBLISHED_SKILL_TOOLS: string[];
|
|
53
86
|
export declare const resolveAvailableTools: (role: string | null | undefined) => string[];
|
|
54
87
|
export declare const createPublishedSkillToolDefinitions: (tool: ToolFactory, handlers: PublishedSkillToolHandlers) => {
|
|
55
88
|
sharedTools: {
|
|
89
|
+
opencode_wizard_catalog_fetch: unknown;
|
|
90
|
+
opencode_wizard_artifact_fetch: unknown;
|
|
91
|
+
opencode_wizard_artifact_preference_set: unknown;
|
|
56
92
|
opencode_wizard_published_skills_fetch: unknown;
|
|
57
93
|
opencode_wizard_published_skill_preference_set: unknown;
|
|
58
94
|
opencode_wizard_status: unknown;
|
|
59
95
|
};
|
|
60
96
|
editorOnlyTools: {
|
|
61
97
|
opencode_wizard_editor_publish_skill: unknown;
|
|
98
|
+
opencode_wizard_artifact_import: unknown;
|
|
62
99
|
};
|
|
63
100
|
};
|
|
64
101
|
export {};
|
package/dist/plugin-tools.js
CHANGED
|
@@ -1,14 +1,50 @@
|
|
|
1
|
-
export const AVAILABLE_PUBLISHED_SKILL_TOOLS = ['opencode_wizard_published_skills_fetch', 'opencode_wizard_published_skill_preference_set', 'opencode_wizard_status', 'opencode_wizard_editor_publish_skill'];
|
|
2
|
-
const SHARED_PUBLISHED_SKILL_TOOLS = AVAILABLE_PUBLISHED_SKILL_TOOLS.slice(0,
|
|
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_publish_skill', 'opencode_wizard_artifact_import'];
|
|
2
|
+
const SHARED_PUBLISHED_SKILL_TOOLS = AVAILABLE_PUBLISHED_SKILL_TOOLS.slice(0, 6);
|
|
3
3
|
export const resolveAvailableTools = role => {
|
|
4
|
-
if (role === 'ADMIN') return [...SHARED_PUBLISHED_SKILL_TOOLS];
|
|
5
4
|
if (role === 'EDITOR') return [...AVAILABLE_PUBLISHED_SKILL_TOOLS];
|
|
6
|
-
return [];
|
|
5
|
+
return [...SHARED_PUBLISHED_SKILL_TOOLS];
|
|
7
6
|
};
|
|
8
7
|
export const createPublishedSkillToolDefinitions = (tool, handlers) => ({
|
|
9
8
|
sharedTools: {
|
|
9
|
+
opencode_wizard_catalog_fetch: tool({
|
|
10
|
+
description: 'Always-available canonical wizard artifact catalog tool. Supports artifactKind SKILL and DESIGN_DOC; catalogs are metadata-only and bodies/files require explicit artifact fetch.',
|
|
11
|
+
args: {
|
|
12
|
+
artifactKind: tool.schema.string().optional().describe('Wizard artifact kind to catalog: SKILL or DESIGN_DOC; defaults to SKILL'),
|
|
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')
|
|
15
|
+
},
|
|
16
|
+
async execute(args, context) {
|
|
17
|
+
return handlers.fetchWizardArtifactCatalog(args, context);
|
|
18
|
+
}
|
|
19
|
+
}),
|
|
20
|
+
opencode_wizard_artifact_fetch: tool({
|
|
21
|
+
description: 'Always-available canonical wizard artifact detail tool. Supports artifactKind SKILL and DESIGN_DOC; fetches explicit backend-authorized bodies/files for effective artifacts.',
|
|
22
|
+
args: {
|
|
23
|
+
artifactKind: tool.schema.string().optional().describe('Wizard artifact kind to fetch: SKILL or DESIGN_DOC; defaults to SKILL'),
|
|
24
|
+
artifact: tool.schema.string().optional().describe('Single artifact identifier; for SKILL this is a skill slug, artifact name, or skill name'),
|
|
25
|
+
artifacts: tool.schema.string().optional().describe('One or more comma-separated or newline-separated artifact identifiers'),
|
|
26
|
+
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
|
+
},
|
|
29
|
+
async execute(args, context) {
|
|
30
|
+
return handlers.fetchWizardArtifacts(args, context);
|
|
31
|
+
}
|
|
32
|
+
}),
|
|
33
|
+
opencode_wizard_artifact_preference_set: tool({
|
|
34
|
+
description: 'Always-available canonical wizard artifact preference tool. Supports SKILL and DESIGN_DOC install/uninstall/ignore/unignore through server-backed artifact preference APIs.',
|
|
35
|
+
args: {
|
|
36
|
+
artifactKind: tool.schema.string().optional().describe('Wizard artifact kind to update: SKILL or DESIGN_DOC; defaults to SKILL'),
|
|
37
|
+
artifact: tool.schema.string().describe('Artifact identifier; for SKILL this is the published skill slug'),
|
|
38
|
+
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'),
|
|
40
|
+
directory: tool.schema.string().optional().describe('Optional absolute or relative directory override')
|
|
41
|
+
},
|
|
42
|
+
async execute(args, context) {
|
|
43
|
+
return handlers.updateWizardArtifactPreference(args, context);
|
|
44
|
+
}
|
|
45
|
+
}),
|
|
10
46
|
opencode_wizard_published_skills_fetch: tool({
|
|
11
|
-
description: '
|
|
47
|
+
description: 'Always-available tool to fetch one or multiple wizard-published skill bodies/details for the current scope. 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',
|
|
12
48
|
args: {
|
|
13
49
|
skill: tool.schema.string().optional().describe('Single skill slug, artifact name, or skill name; backward-compatible with comma/newline-delimited lists'),
|
|
14
50
|
skills: tool.schema.string().optional().describe('One or more comma-separated or newline-separated skill slugs, artifact names, or skill names'),
|
|
@@ -20,7 +56,7 @@ export const createPublishedSkillToolDefinitions = (tool, handlers) => ({
|
|
|
20
56
|
}
|
|
21
57
|
}),
|
|
22
58
|
opencode_wizard_published_skill_preference_set: tool({
|
|
23
|
-
description: '
|
|
59
|
+
description: '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',
|
|
24
60
|
args: {
|
|
25
61
|
skill: tool.schema.string().describe('Published skill slug, artifact name, or skill name to update'),
|
|
26
62
|
action: tool.schema.string().describe('Preference action: install, uninstall, ignore, or unignore'),
|
|
@@ -32,7 +68,7 @@ export const createPublishedSkillToolDefinitions = (tool, handlers) => ({
|
|
|
32
68
|
}
|
|
33
69
|
}),
|
|
34
70
|
opencode_wizard_status: tool({
|
|
35
|
-
description: '
|
|
71
|
+
description: 'Always-available tool to report opencode-wizard plugin status, bootstrap auth when missing, and return safe auth/catalog/source/cache/workspace guidance without exposing tokens',
|
|
36
72
|
args: {
|
|
37
73
|
directory: tool.schema.string().optional().describe('Optional absolute or relative directory override')
|
|
38
74
|
},
|
|
@@ -51,6 +87,21 @@ export const createPublishedSkillToolDefinitions = (tool, handlers) => ({
|
|
|
51
87
|
async execute(args, context) {
|
|
52
88
|
return handlers.publishEditorSkill(args, context);
|
|
53
89
|
}
|
|
90
|
+
}),
|
|
91
|
+
opencode_wizard_artifact_import: tool({
|
|
92
|
+
description: '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.',
|
|
93
|
+
args: {
|
|
94
|
+
artifactKind: tool.schema.string().optional().describe('Wizard artifact kind to import: SKILL or DESIGN_DOC; inferred from source when omitted'),
|
|
95
|
+
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`'),
|
|
96
|
+
slug: tool.schema.string().optional().describe('Artifact slug; required for DESIGN_DOC unless inferable'),
|
|
97
|
+
skill: tool.schema.string().optional().describe('Skill directory/name for SKILL repo imports'),
|
|
98
|
+
name: tool.schema.string().optional().describe('Optional display name override'),
|
|
99
|
+
summary: tool.schema.string().optional().describe('Optional summary/description override'),
|
|
100
|
+
directory: tool.schema.string().optional().describe('Optional absolute or relative directory override')
|
|
101
|
+
},
|
|
102
|
+
async execute(args, context) {
|
|
103
|
+
return handlers.importWizardArtifact(args, context);
|
|
104
|
+
}
|
|
54
105
|
})
|
|
55
106
|
}
|
|
56
107
|
});
|