@aexol/opencode-wizard 0.3.11 → 0.4.0

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.
Files changed (36) hide show
  1. package/README.md +4 -1
  2. package/dist/graphql-operations.d.ts +4 -4
  3. package/dist/graphql-operations.js +16 -2
  4. package/dist/graphql-operations.js.map +1 -1
  5. package/dist/plugin-tools.d.ts +3 -0
  6. package/dist/plugin-tools.js +10 -7
  7. package/dist/plugin-tools.js.map +1 -1
  8. package/dist/published-skills-transform.d.ts +22 -4
  9. package/dist/published-skills-transform.js +21 -5
  10. package/dist/published-skills-transform.js.map +1 -1
  11. package/dist/server/client.d.ts +4 -3
  12. package/dist/server/client.js +30 -4
  13. package/dist/server/client.js.map +1 -1
  14. package/dist/server/preferences.d.ts +1 -0
  15. package/dist/server/preferences.js +5 -2
  16. package/dist/server/preferences.js.map +1 -1
  17. package/dist/server/runtime.d.ts +1 -1
  18. package/dist/server/runtime.js +169 -23
  19. package/dist/server/runtime.js.map +1 -1
  20. package/dist/server/status.js +7 -3
  21. package/dist/server/status.js.map +1 -1
  22. package/dist/server/types.d.ts +9 -4
  23. package/dist/server/types.js.map +1 -1
  24. package/dist/smoke-published-skills.js +3 -1
  25. package/dist/smoke-published-skills.js.map +1 -1
  26. package/dist/tui/components/skill-picker-dialog.d.ts +7 -0
  27. package/dist/tui/components/skill-picker-dialog.js +94 -0
  28. package/dist/tui/components/skill-picker-dialog.js.map +1 -0
  29. package/dist/tui/components/status-content.js +6 -1
  30. package/dist/tui/components/status-content.js.map +1 -1
  31. package/dist/tui/plugin.js +36 -69
  32. package/dist/tui/plugin.js.map +1 -1
  33. package/dist/tui/skill-helpers.d.ts +14 -2
  34. package/dist/tui/skill-helpers.js +76 -19
  35. package/dist/tui/skill-helpers.js.map +1 -1
  36. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"names":["createMemo","compactStatusMessage","formatAuthStatus","formatBackendOriginLabel","formatSkillsCatalogUnavailableMessage","getSkillCatalogSummary","getSkillListRows","getUserRoleRow","Row","StatusContent","props","status","kind","_el$","_$createElement","_$insertNode","_$createTextNode","_$setProp","_$effect","_$p","theme","textMuted","_el$3","_el$4","_$insert","message","warning","_$createComponent","ReadyRows","snapshot","SkillsRows","api","current","statusContent","currentStatus","_el$5","SidebarSkillsRows","content","_el$6","_el$8","_el$9","ReadySidebarSkillRows","_el$0","catalog","_el$1","_el$10","skillRows","length","_el$11","_el$12","label","value","labelColor","valueColor","text","_el$14","map","row","roleRow","statusRows","backendOrigin","_el$15","_el$16"],"sources":["../../../src/tui/components/status-content.tsx"],"sourcesContent":["import { createMemo } from 'solid-js';\nimport type { PluginStatusSnapshot } from '../../server.js';\nimport { compactStatusMessage, formatAuthStatus, formatBackendOriginLabel, formatSkillsCatalogUnavailableMessage } from '../formatting.js';\nimport { getSkillCatalogSummary, getSkillListRows, getUserRoleRow } from '../skill-helpers.js';\nimport type { StatusState, TuiPluginApi } from '../types.js';\nimport { Row } from './common.js';\n\nexport const StatusContent = (props: { status: StatusState; theme: TuiPluginApi['theme']['current'] }) => {\n if (props.status.kind === 'loading') {\n return (\n <text fg={props.theme.textMuted} wrapMode=\"none\" overflow=\"hidden\">\n loading…\n </text>\n );\n }\n\n if (props.status.kind === 'error') {\n return (\n <text fg={props.theme.warning} wrapMode=\"none\" overflow=\"hidden\">\n unavailable: {compactStatusMessage(props.status.message)}\n </text>\n );\n }\n\n return <ReadyRows snapshot={props.status.snapshot} theme={props.theme} />;\n};\n\nexport const SkillsRows = (props: { api: TuiPluginApi; status: () => StatusState }) => {\n const theme = createMemo(() => props.api.theme.current);\n const statusContent = () => {\n const currentStatus = props.status();\n\n return <StatusContent status={currentStatus} theme={theme()} />;\n };\n\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n {statusContent()}\n </box>\n );\n};\n\nexport const SidebarSkillsRows = (props: { api: TuiPluginApi; status: () => StatusState }) => {\n const theme = createMemo(() => props.api.theme.current);\n const currentStatus = () => props.status();\n\n const content = () => {\n const status = currentStatus();\n if (status.kind === 'loading') {\n return (\n <text fg={theme().textMuted} wrapMode=\"none\" overflow=\"hidden\">\n skills loading…\n </text>\n );\n }\n\n if (status.kind === 'error') {\n return (\n <text fg={theme().warning} wrapMode=\"none\" overflow=\"hidden\">\n skills unavailable: {compactStatusMessage(status.message)}\n </text>\n );\n }\n\n return <ReadySidebarSkillRows snapshot={status.snapshot} theme={theme()} />;\n };\n\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n {content()}\n </box>\n );\n};\n\nconst ReadySidebarSkillRows = (props: { snapshot: PluginStatusSnapshot; theme: TuiPluginApi['theme']['current'] }) => {\n if (!props.snapshot.catalog) {\n return (\n <text fg={props.theme.textMuted} wrapMode=\"none\" overflow=\"hidden\">\n skills unavailable: {formatSkillsCatalogUnavailableMessage(props.snapshot)}\n </text>\n );\n }\n\n const skillRows = getSkillListRows(props.snapshot);\n if (skillRows.length === 0) {\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n <Row label=\"skills\" value={getSkillCatalogSummary(props.snapshot)} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n <text fg={props.theme.textMuted} wrapMode=\"none\" overflow=\"hidden\">\n no skills listed\n </text>\n </box>\n );\n }\n\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n <Row label=\"skills\" value={getSkillCatalogSummary(props.snapshot)} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n {skillRows.map((row) => (\n <Row label={row.label} value={row.value} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n ))}\n </box>\n );\n};\n\nexport const ReadyRows = (props: { snapshot: PluginStatusSnapshot; theme: TuiPluginApi['theme']['current'] }) => {\n const roleRow = getUserRoleRow(props.snapshot);\n const statusRows = (\n <>\n <Row\n label=\"url\"\n value={formatBackendOriginLabel(props.snapshot.backendOrigin)}\n labelColor={props.theme.textMuted}\n valueColor={props.theme.text}\n />\n <Row label=\"auth\" value={formatAuthStatus(props.snapshot)} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n </>\n );\n\n if (!props.snapshot.catalog) {\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n {statusRows}\n <Row\n label=\"catalog\"\n value={formatSkillsCatalogUnavailableMessage(props.snapshot)}\n labelColor={props.theme.textMuted}\n valueColor={props.theme.text}\n />\n <Row label={roleRow.label} value={roleRow.value} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n </box>\n );\n }\n\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n {statusRows}\n <Row label=\"catalog\" value={getSkillCatalogSummary(props.snapshot)} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n <Row label={roleRow.label} value={roleRow.value} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n </box>\n );\n};\n"],"mappings":";;;;;;;AAAA,SAASA,UAAU,QAAQ,UAAU;AAErC,SAASC,oBAAoB,EAAEC,gBAAgB,EAAEC,wBAAwB,EAAEC,qCAAqC,QAAQ,kBAAkB;AAC1I,SAASC,sBAAsB,EAAEC,gBAAgB,EAAEC,cAAc,QAAQ,qBAAqB;AAE9F,SAASC,GAAG,QAAQ,aAAa;AAEjC,OAAO,MAAMC,aAAa,GAAIC,KAAuE,IAAK;EACxG,IAAIA,KAAK,CAACC,MAAM,CAACC,IAAI,KAAK,SAAS,EAAE;IACnC;MAAA,IAAAC,IAAA,GAAAC,eAAA;MAAAC,YAAA,CAAAF,IAAA,EAAAG,gBAAA;MAAAC,SAAA,CAAAJ,IAAA,cAC4C,MAAM;MAAAI,SAAA,CAAAJ,IAAA,cAAU,QAAQ;MAAAK,QAAA,CAAAC,GAAA,IAAAF,SAAA,CAAAJ,IAAA,QAAxDH,KAAK,CAACU,KAAK,CAACC,SAAS,EAAAF,GAAA;MAAA,OAAAN,IAAA;IAAA;EAInC;EAEA,IAAIH,KAAK,CAACC,MAAM,CAACC,IAAI,KAAK,OAAO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AACU,KAAK,CAACkC,IAAI;MAAA;IAAA;IAAA9B,QAAA,CAAAsC,MAAA,EAAAnC,iBAAA,CAClInB,GAAG;MAAA,IAAC0C,KAAKA,CAAA;QAAA,OAAEQ,OAAO,CAACR,KAAK;MAAA;MAAA,IAAEC,KAAKA,CAAA;QAAA,OAAEO,OAAO,CAACP,KAAK;MAAA;MAAA,IAAEC,UAAUA,CAAA;QAAA,OAAE1C,KAAK,CAACU,KAAK,CAACC,SAAS;MAAA;MAAA,IAAEgC,UAAUA,CAAA;QAAA,OAAE3C,KAAK,CAACU,KAAK,CAACkC,IAAI;MAAA;IAAA;IAAA,OAAAQ,MAAA;EAAA;AAGtH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createMemo","compactStatusMessage","formatAuthStatus","formatBackendOriginLabel","formatSkillsCatalogUnavailableMessage","getSkillCatalogSummary","getSkillListRows","getUserRoleRow","Row","StatusContent","props","status","kind","_el$","_$createElement","_$insertNode","_$createTextNode","_$setProp","_$effect","_$p","theme","textMuted","_el$3","_el$4","_$insert","message","warning","_$createComponent","ReadyRows","snapshot","SkillsRows","api","current","statusContent","currentStatus","_el$5","SidebarSkillsRows","content","_el$6","_el$8","_el$9","ReadySidebarSkillRows","canOpenPicker","Boolean","command","register","commands","ui","dialog","replace","_el$0","catalog","_el$1","_el$10","skillRows","length","_el$11","_el$12","label","value","labelColor","valueColor","text","_el$14","map","row","roleRow","statusRows","backendOrigin","_el$15","_el$16"],"sources":["../../../src/tui/components/status-content.tsx"],"sourcesContent":["import { createMemo } from 'solid-js';\nimport type { PluginStatusSnapshot } from '../../server.js';\nimport { compactStatusMessage, formatAuthStatus, formatBackendOriginLabel, formatSkillsCatalogUnavailableMessage } from '../formatting.js';\nimport { getSkillCatalogSummary, getSkillListRows, getUserRoleRow } from '../skill-helpers.js';\nimport type { StatusState, TuiPluginApi } from '../types.js';\nimport { Row } from './common.js';\n\nexport const StatusContent = (props: { status: StatusState; theme: TuiPluginApi['theme']['current'] }) => {\n if (props.status.kind === 'loading') {\n return (\n <text fg={props.theme.textMuted} wrapMode=\"none\" overflow=\"hidden\">\n loading…\n </text>\n );\n }\n\n if (props.status.kind === 'error') {\n return (\n <text fg={props.theme.warning} wrapMode=\"none\" overflow=\"hidden\">\n unavailable: {compactStatusMessage(props.status.message)}\n </text>\n );\n }\n\n return <ReadyRows snapshot={props.status.snapshot} theme={props.theme} />;\n};\n\nexport const SkillsRows = (props: { api: TuiPluginApi; status: () => StatusState }) => {\n const theme = createMemo(() => props.api.theme.current);\n const statusContent = () => {\n const currentStatus = props.status();\n\n return <StatusContent status={currentStatus} theme={theme()} />;\n };\n\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n {statusContent()}\n </box>\n );\n};\n\nexport const SidebarSkillsRows = (props: { api: TuiPluginApi; status: () => StatusState }) => {\n const theme = createMemo(() => props.api.theme.current);\n const currentStatus = () => props.status();\n\n const content = () => {\n const status = currentStatus();\n if (status.kind === 'loading') {\n return (\n <text fg={theme().textMuted} wrapMode=\"none\" overflow=\"hidden\">\n skills loading…\n </text>\n );\n }\n\n if (status.kind === 'error') {\n return (\n <text fg={theme().warning} wrapMode=\"none\" overflow=\"hidden\">\n skills unavailable: {compactStatusMessage(status.message)}\n </text>\n );\n }\n\n return (\n <ReadySidebarSkillRows\n snapshot={status.snapshot}\n theme={theme()}\n canOpenPicker={Boolean((props.api.command?.register || props.api.commands?.register) && props.api.ui?.dialog?.replace)}\n />\n );\n };\n\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n {content()}\n </box>\n );\n};\n\nconst ReadySidebarSkillRows = (props: {\n snapshot: PluginStatusSnapshot;\n theme: TuiPluginApi['theme']['current'];\n canOpenPicker: boolean;\n}) => {\n if (!props.snapshot.catalog) {\n return (\n <text fg={props.theme.textMuted} wrapMode=\"none\" overflow=\"hidden\">\n skills unavailable: {formatSkillsCatalogUnavailableMessage(props.snapshot)}\n </text>\n );\n }\n\n const skillRows = getSkillListRows(props.snapshot, { canOpenPicker: props.canOpenPicker });\n if (skillRows.length === 0) {\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n <Row label=\"skills\" value={getSkillCatalogSummary(props.snapshot)} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n <text fg={props.theme.textMuted} wrapMode=\"none\" overflow=\"hidden\">\n no skills listed\n </text>\n </box>\n );\n }\n\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n <Row label=\"skills\" value={getSkillCatalogSummary(props.snapshot)} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n {skillRows.map((row) => (\n <Row label={row.label} value={row.value} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n ))}\n </box>\n );\n};\n\nexport const ReadyRows = (props: { snapshot: PluginStatusSnapshot; theme: TuiPluginApi['theme']['current'] }) => {\n const roleRow = getUserRoleRow(props.snapshot);\n const statusRows = (\n <>\n <Row\n label=\"url\"\n value={formatBackendOriginLabel(props.snapshot.backendOrigin)}\n labelColor={props.theme.textMuted}\n valueColor={props.theme.text}\n />\n <Row label=\"auth\" value={formatAuthStatus(props.snapshot)} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n </>\n );\n\n if (!props.snapshot.catalog) {\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n {statusRows}\n <Row\n label=\"catalog\"\n value={formatSkillsCatalogUnavailableMessage(props.snapshot)}\n labelColor={props.theme.textMuted}\n valueColor={props.theme.text}\n />\n <Row label={roleRow.label} value={roleRow.value} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n </box>\n );\n }\n\n return (\n <box width=\"100%\" flexDirection=\"column\" overflow=\"hidden\">\n {statusRows}\n <Row label=\"catalog\" value={getSkillCatalogSummary(props.snapshot)} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n <Row label={roleRow.label} value={roleRow.value} labelColor={props.theme.textMuted} valueColor={props.theme.text} />\n </box>\n );\n};\n"],"mappings":";;;;;;;AAAA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,SAAS;MAAA;MAAA,IAAEwC,UAAUA,CAAA;QAAA,OAAEnD,KAAK,CAACU,KAAK,CAAC0C,IAAI;MAAA;IAAA;IAAA,OAAAQ,MAAA;EAAA;AAGtH,CAAC","ignoreList":[]}
@@ -1,10 +1,11 @@
1
1
  import { createSignal } from 'solid-js';
2
2
  import { STATUS_REFRESH_INTERVAL_MS } from './constants.js';
3
+ import { SkillPickerDialog } from './components/skill-picker-dialog.js';
3
4
  import { requestRender } from './rendering.js';
5
+ import { getSkillPickerCommands } from './skill-helpers.js';
4
6
  import { createWizardStatusSlot } from './slots.js';
5
7
  import { loadStatus } from './status.js';
6
- const registerCommandActions = (api, actions) => {
7
- const commandProvider = () => actions;
8
+ const registerCommandActions = (api, commandProvider) => {
8
9
  if (api.command?.register) {
9
10
  return {
10
11
  unregister: api.command.register(commandProvider) ?? null
@@ -17,7 +18,18 @@ const registerCommandActions = (api, actions) => {
17
18
  }
18
19
  return null;
19
20
  };
20
- const createSharedSkillActions = refreshStatus => [{
21
+ const canOpenSkillPicker = api => Boolean(api.ui?.dialog?.replace);
22
+ const openSkillPickerDialog = (api, snapshot, row) => {
23
+ if (!api.ui?.dialog?.replace) return;
24
+ api.ui.dialog.setSize?.('large');
25
+ api.ui.dialog.replace(() => SkillPickerDialog({
26
+ snapshot,
27
+ theme: api.theme.current,
28
+ selectedSkillSlug: row?.skillSlug
29
+ }), () => requestRender(api));
30
+ requestRender(api);
31
+ };
32
+ const createSharedSkillActions = (api, refreshStatus, status) => [{
21
33
  value: 'opencode-wizard.status',
22
34
  title: 'Wizard: status',
23
35
  description: 'Refresh plugin auth, backend, catalog, source, and workspace-resolution status via opencode_wizard_status.',
@@ -28,73 +40,33 @@ const createSharedSkillActions = refreshStatus => [{
28
40
  onSelect: () => refreshStatus({
29
41
  showLoading: true
30
42
  })
31
- }, {
32
- value: 'opencode-wizard.fetch-published-skill',
33
- title: 'Wizard: fetch published skill',
34
- description: 'Fetch wizard-listed skill bodies/details with opencode_wizard_published_skills_fetch; pass refresh: true for fresh backend data.',
35
- category: 'Wizard',
36
- slash: {
37
- name: 'wizard-fetch-skill'
38
- },
39
- onSelect: () => refreshStatus({
40
- showLoading: true
41
- })
42
- }, {
43
- value: 'opencode-wizard.manage-skill-preference',
44
- title: 'Wizard: manage skill preference',
45
- description: 'Use opencode_wizard_published_skill_preference_set to install, uninstall, ignore, or unignore a published skill for project/global scope.',
46
- category: 'Wizard',
47
- slash: {
48
- name: 'wizard-manage-skill'
49
- },
50
- onSelect: () => refreshStatus({
51
- showLoading: true
52
- })
53
- }];
54
- const createEditorSkillActions = refreshStatus => [{
55
- value: 'opencode-wizard.editor.create-or-update-skill',
56
- title: 'Wizard: create/update skill from markdown',
57
- description: 'Canonical EDITOR flow: call opencode_wizard_editor_create_or_update_skill with complete SKILL.md markdownContent; no local seed file required.',
58
- category: 'Wizard',
59
- slash: {
60
- name: 'wizard-create-skill'
61
- },
62
- onSelect: () => refreshStatus({
63
- showLoading: true
64
- })
65
- }, {
66
- value: 'opencode-wizard.editor.import-artifact',
67
- title: 'Wizard: import external artifact',
68
- description: 'External source flow: call opencode_wizard_artifact_import for SKILL or DESIGN_DOC URLs/command-like sources; no project files are written.',
43
+ }, ...(canOpenSkillPicker(api) ? [{
44
+ value: 'opencode-wizard.skills',
45
+ title: 'Wizard: skills catalog',
46
+ description: 'Open a read-only wizard skill catalog. Use tools for fetch/install/ignore actions.',
69
47
  category: 'Wizard',
70
48
  slash: {
71
- name: 'wizard-import-artifact'
49
+ name: 'wizard-skills'
72
50
  },
73
- onSelect: () => refreshStatus({
74
- showLoading: true
75
- })
76
- }, {
77
- value: 'opencode-wizard.editor.publish-seed-skill',
78
- title: 'Wizard: publish local seed skill',
79
- description: 'Legacy seed flow: call opencode_wizard_editor_publish_skill for .opencode/skills/<slug>/SKILL.md when a local seed already exists.',
80
- category: 'Wizard',
81
- slash: {
82
- name: 'wizard-publish-seed'
83
- },
84
- onSelect: () => refreshStatus({
85
- showLoading: true
86
- })
87
- }];
88
- const registerSkillActions = (api, refreshStatus, mode) => {
89
- const sharedActions = createSharedSkillActions(refreshStatus);
90
- const actions = mode === 'editor' ? [...sharedActions, ...createEditorSkillActions(refreshStatus)] : sharedActions;
91
- return registerCommandActions(api, actions);
51
+ onSelect: () => {
52
+ const currentStatus = status();
53
+ if (currentStatus.kind !== 'ready') return;
54
+ openSkillPickerDialog(api, currentStatus.snapshot);
55
+ }
56
+ }] : [])];
57
+ const registerSkillActions = (api, refreshStatus, status) => {
58
+ const sharedActions = createSharedSkillActions(api, refreshStatus, status);
59
+ return registerCommandActions(api, () => {
60
+ const currentStatus = status();
61
+ if (currentStatus.kind !== 'ready') return sharedActions;
62
+ if (!canOpenSkillPicker(api)) return sharedActions;
63
+ return [...sharedActions, ...getSkillPickerCommands(currentStatus.snapshot, row => openSkillPickerDialog(api, currentStatus.snapshot, row))];
64
+ });
92
65
  };
93
66
  export const tui = async api => {
94
67
  const [status, setStatus] = createSignal({
95
68
  kind: 'loading'
96
69
  });
97
- let registeredActionMode = null;
98
70
  let commandRegistration = null;
99
71
  const refreshStatus = options => {
100
72
  if (options?.showLoading) {
@@ -105,13 +77,8 @@ export const tui = async api => {
105
77
  }
106
78
  void loadStatus(api).then(nextStatus => {
107
79
  setStatus(nextStatus);
108
- if (nextStatus.kind === 'ready') {
109
- const nextMode = nextStatus.snapshot.availableTools.includes('opencode_wizard_editor_create_or_update_skill') ? 'editor' : 'shared';
110
- if (registeredActionMode !== nextMode) {
111
- commandRegistration?.unregister?.();
112
- commandRegistration = registerSkillActions(api, refreshStatus, nextMode);
113
- registeredActionMode = commandRegistration ? nextMode : null;
114
- }
80
+ if (!commandRegistration) {
81
+ commandRegistration = registerSkillActions(api, refreshStatus, status);
115
82
  }
116
83
  requestRender(api);
117
84
  });
@@ -1 +1 @@
1
- {"version":3,"names":["createSignal","STATUS_REFRESH_INTERVAL_MS","requestRender","createWizardStatusSlot","loadStatus","registerCommandActions","api","actions","commandProvider","command","register","unregister","commands","createSharedSkillActions","refreshStatus","value","title","description","category","slash","name","onSelect","showLoading","createEditorSkillActions","registerSkillActions","mode","sharedActions","tui","status","setStatus","kind","registeredActionMode","commandRegistration","options","then","nextStatus","nextMode","snapshot","availableTools","includes","slots","setInterval"],"sources":["../../src/tui/plugin.ts"],"sourcesContent":["import { createSignal } from 'solid-js';\nimport { STATUS_REFRESH_INTERVAL_MS } from './constants.js';\nimport { requestRender } from './rendering.js';\nimport { createWizardStatusSlot } from './slots.js';\nimport { loadStatus } from './status.js';\nimport type { RefreshStatus, StatusState, TuiCommand, TuiPlugin, TuiPluginApi } from './types.js';\n\ntype RegisteredActionMode = 'shared' | 'editor';\ntype CommandRegistration = {\n unregister: (() => void) | null;\n};\n\nconst registerCommandActions = (api: TuiPluginApi, actions: TuiCommand[]): CommandRegistration | null => {\n const commandProvider = () => actions;\n\n if (api.command?.register) {\n return { unregister: api.command.register(commandProvider) ?? null };\n }\n\n if (api.commands?.register) {\n return { unregister: api.commands.register(commandProvider) ?? null };\n }\n\n return null;\n};\n\nconst createSharedSkillActions = (refreshStatus: RefreshStatus): TuiCommand[] => [\n {\n value: 'opencode-wizard.status',\n title: 'Wizard: status',\n description: 'Refresh plugin auth, backend, catalog, source, and workspace-resolution status via opencode_wizard_status.',\n category: 'Wizard',\n slash: {\n name: 'wizard-status',\n },\n onSelect: () => refreshStatus({ showLoading: true }),\n },\n {\n value: 'opencode-wizard.fetch-published-skill',\n title: 'Wizard: fetch published skill',\n description: 'Fetch wizard-listed skill bodies/details with opencode_wizard_published_skills_fetch; pass refresh: true for fresh backend data.',\n category: 'Wizard',\n slash: {\n name: 'wizard-fetch-skill',\n },\n onSelect: () => refreshStatus({ showLoading: true }),\n },\n {\n value: 'opencode-wizard.manage-skill-preference',\n title: 'Wizard: manage skill preference',\n description:\n 'Use opencode_wizard_published_skill_preference_set to install, uninstall, ignore, or unignore a published skill for project/global scope.',\n category: 'Wizard',\n slash: {\n name: 'wizard-manage-skill',\n },\n onSelect: () => refreshStatus({ showLoading: true }),\n },\n];\n\nconst createEditorSkillActions = (refreshStatus: RefreshStatus): TuiCommand[] => [\n {\n value: 'opencode-wizard.editor.create-or-update-skill',\n title: 'Wizard: create/update skill from markdown',\n description:\n 'Canonical EDITOR flow: call opencode_wizard_editor_create_or_update_skill with complete SKILL.md markdownContent; no local seed file required.',\n category: 'Wizard',\n slash: {\n name: 'wizard-create-skill',\n },\n onSelect: () => refreshStatus({ showLoading: true }),\n },\n {\n value: 'opencode-wizard.editor.import-artifact',\n title: 'Wizard: import external artifact',\n description:\n 'External source flow: call opencode_wizard_artifact_import for SKILL or DESIGN_DOC URLs/command-like sources; no project files are written.',\n category: 'Wizard',\n slash: {\n name: 'wizard-import-artifact',\n },\n onSelect: () => refreshStatus({ showLoading: true }),\n },\n {\n value: 'opencode-wizard.editor.publish-seed-skill',\n title: 'Wizard: publish local seed skill',\n description:\n 'Legacy seed flow: call opencode_wizard_editor_publish_skill for .opencode/skills/<slug>/SKILL.md when a local seed already exists.',\n category: 'Wizard',\n slash: {\n name: 'wizard-publish-seed',\n },\n onSelect: () => refreshStatus({ showLoading: true }),\n },\n];\n\nconst registerSkillActions = (\n api: TuiPluginApi,\n refreshStatus: RefreshStatus,\n mode: RegisteredActionMode,\n): CommandRegistration | null => {\n const sharedActions = createSharedSkillActions(refreshStatus);\n const actions = mode === 'editor' ? [...sharedActions, ...createEditorSkillActions(refreshStatus)] : sharedActions;\n\n return registerCommandActions(api, actions);\n};\n\nexport const tui: TuiPlugin = async (api) => {\n const [status, setStatus] = createSignal<StatusState>({ kind: 'loading' });\n let registeredActionMode: RegisteredActionMode | null = null;\n let commandRegistration: CommandRegistration | null = null;\n const refreshStatus: RefreshStatus = (options) => {\n if (options?.showLoading) {\n setStatus({ kind: 'loading' });\n requestRender(api);\n }\n\n void loadStatus(api).then((nextStatus) => {\n setStatus(nextStatus);\n if (nextStatus.kind === 'ready') {\n const nextMode: RegisteredActionMode = nextStatus.snapshot.availableTools.includes(\n 'opencode_wizard_editor_create_or_update_skill',\n )\n ? 'editor'\n : 'shared';\n if (registeredActionMode !== nextMode) {\n commandRegistration?.unregister?.();\n commandRegistration = registerSkillActions(api, refreshStatus, nextMode);\n registeredActionMode = commandRegistration ? nextMode : null;\n }\n }\n requestRender(api);\n });\n };\n\n api.slots.register(createWizardStatusSlot(api, status, refreshStatus));\n refreshStatus();\n setInterval(refreshStatus, STATUS_REFRESH_INTERVAL_MS);\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,UAAU;AACvC,SAASC,0BAA0B,QAAQ,gBAAgB;AAC3D,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SAASC,sBAAsB,QAAQ,YAAY;AACnD,SAASC,UAAU,QAAQ,aAAa;AAQxC,MAAMC,sBAAsB,GAAGA,CAACC,GAAiB,EAAEC,OAAqB,KAAiC;EACvG,MAAMC,eAAe,GAAGA,CAAA,KAAMD,OAAO;EAErC,IAAID,GAAG,CAACG,OAAO,EAAEC,QAAQ,EAAE;IACzB,OAAO;MAAEC,UAAU,EAAEL,GAAG,CAACG,OAAO,CAACC,QAAQ,CAACF,eAAe,CAAC,IAAI;IAAK,CAAC;EACtE;EAEA,IAAIF,GAAG,CAACM,QAAQ,EAAEF,QAAQ,EAAE;IAC1B,OAAO;MAAEC,UAAU,EAAEL,GAAG,CAACM,QAAQ,CAACF,QAAQ,CAACF,eAAe,CAAC,IAAI;IAAK,CAAC;EACvE;EAEA,OAAO,IAAI;AACb,CAAC;AAED,MAAMK,wBAAwB,GAAIC,aAA4B,IAAmB,CAC/E;EACEC,KAAK,EAAE,wBAAwB;EAC/BC,KAAK,EAAE,gBAAgB;EACvBC,WAAW,EAAE,4GAA4G;EACzHC,QAAQ,EAAE,QAAQ;EAClBC,KAAK,EAAE;IACLC,IAAI,EAAE;EACR,CAAC;EACDC,QAAQ,EAAEA,CAAA,KAAMP,aAAa,CAAC;IAAEQ,WAAW,EAAE;EAAK,CAAC;AACrD,CAAC,EACD;EACEP,KAAK,EAAE,uC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UACxEL,oBAAoB,GAAGC,mBAAmB,GAAGI,QAAQ,GAAG,IAAI;QAC9D;MACF;MACAlC,aAAa,CAACI,GAAG,CAAC;IACpB,CAAC,CAAC;EACJ,CAAC;EAEDA,GAAG,CAACkC,KAAK,CAAC9B,QAAQ,CAACP,sBAAsB,CAACG,GAAG,EAAEsB,MAAM,EAAEd,aAAa,CAAC,CAAC;EACtEA,aAAa,CAAC,CAAC;EACf2B,WAAW,CAAC3B,aAAa,EAAEb,0BAA0B,CAAC;AACxD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createSignal","STATUS_REFRESH_INTERVAL_MS","SkillPickerDialog","requestRender","getSkillPickerCommands","createWizardStatusSlot","loadStatus","registerCommandActions","api","commandProvider","command","register","unregister","commands","canOpenSkillPicker","Boolean","ui","dialog","replace","openSkillPickerDialog","snapshot","row","setSize","theme","current","selectedSkillSlug","skillSlug","createSharedSkillActions","refreshStatus","status","value","title","description","category","slash","name","onSelect","showLoading","currentStatus","kind","registerSkillActions","sharedActions","tui","setStatus","commandRegistration","options","then","nextStatus","slots","setInterval"],"sources":["../../src/tui/plugin.ts"],"sourcesContent":["import { createSignal } from 'solid-js';\nimport { STATUS_REFRESH_INTERVAL_MS } from './constants.js';\nimport { SkillPickerDialog } from './components/skill-picker-dialog.js';\nimport { requestRender } from './rendering.js';\nimport { getSkillPickerCommands, type SkillPickerRow } from './skill-helpers.js';\nimport { createWizardStatusSlot } from './slots.js';\nimport { loadStatus } from './status.js';\nimport type { RefreshStatus, StatusState, TuiCommand, TuiPlugin, TuiPluginApi } from './types.js';\n\ntype CommandRegistration = {\n unregister: (() => void) | null;\n};\n\nconst registerCommandActions = (api: TuiPluginApi, commandProvider: () => TuiCommand[]): CommandRegistration | null => {\n if (api.command?.register) {\n return { unregister: api.command.register(commandProvider) ?? null };\n }\n\n if (api.commands?.register) {\n return { unregister: api.commands.register(commandProvider) ?? null };\n }\n\n return null;\n};\n\nconst canOpenSkillPicker = (api: TuiPluginApi): boolean => Boolean(api.ui?.dialog?.replace);\n\nconst openSkillPickerDialog = (api: TuiPluginApi, snapshot: Extract<StatusState, { kind: 'ready' }>['snapshot'], row?: SkillPickerRow) => {\n if (!api.ui?.dialog?.replace) return;\n\n api.ui.dialog.setSize?.('large');\n api.ui.dialog.replace(\n () => SkillPickerDialog({ snapshot, theme: api.theme.current, selectedSkillSlug: row?.skillSlug }),\n () => requestRender(api),\n );\n requestRender(api);\n};\n\nconst createSharedSkillActions = (api: TuiPluginApi, refreshStatus: RefreshStatus, status: () => StatusState): TuiCommand[] => [\n {\n value: 'opencode-wizard.status',\n title: 'Wizard: status',\n description: 'Refresh plugin auth, backend, catalog, source, and workspace-resolution status via opencode_wizard_status.',\n category: 'Wizard',\n slash: {\n name: 'wizard-status',\n },\n onSelect: () => refreshStatus({ showLoading: true }),\n },\n ...(canOpenSkillPicker(api)\n ? [\n {\n value: 'opencode-wizard.skills',\n title: 'Wizard: skills catalog',\n description: 'Open a read-only wizard skill catalog. Use tools for fetch/install/ignore actions.',\n category: 'Wizard',\n slash: {\n name: 'wizard-skills',\n },\n onSelect: () => {\n const currentStatus = status();\n if (currentStatus.kind !== 'ready') return;\n openSkillPickerDialog(api, currentStatus.snapshot);\n },\n },\n ]\n : []),\n];\n\nconst registerSkillActions = (\n api: TuiPluginApi,\n refreshStatus: RefreshStatus,\n status: () => StatusState,\n): CommandRegistration | null => {\n const sharedActions = createSharedSkillActions(api, refreshStatus, status);\n\n return registerCommandActions(api, () => {\n const currentStatus = status();\n if (currentStatus.kind !== 'ready') return sharedActions;\n if (!canOpenSkillPicker(api)) return sharedActions;\n\n return [\n ...sharedActions,\n ...getSkillPickerCommands(currentStatus.snapshot, (row) => openSkillPickerDialog(api, currentStatus.snapshot, row)),\n ];\n });\n};\n\nexport const tui: TuiPlugin = async (api) => {\n const [status, setStatus] = createSignal<StatusState>({ kind: 'loading' });\n let commandRegistration: CommandRegistration | null = null;\n const refreshStatus: RefreshStatus = (options) => {\n if (options?.showLoading) {\n setStatus({ kind: 'loading' });\n requestRender(api);\n }\n\n void loadStatus(api).then((nextStatus) => {\n setStatus(nextStatus);\n if (!commandRegistration) {\n commandRegistration = registerSkillActions(api, refreshStatus, status);\n }\n requestRender(api);\n });\n };\n\n api.slots.register(createWizardStatusSlot(api, status, refreshStatus));\n refreshStatus();\n setInterval(refreshStatus, STATUS_REFRESH_INTERVAL_MS);\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,UAAU;AACvC,SAASC,0BAA0B,QAAQ,gBAAgB;AAC3D,SAASC,iBAAiB,QAAQ,qCAAqC;AACvE,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SAASC,sBAAsB,QAA6B,oBAAoB;AAChF,SAASC,sBAAsB,QAAQ,YAAY;AACnD,SAASC,UAAU,QAAQ,aAAa;AAOxC,MAAMC,sBAAsB,GAAGA,CAACC,GAAiB,EAAEC,eAAmC,KAAiC;EACrH,IAAID,GAAG,CAACE,OAAO,EAAEC,QAAQ,EAAE;IACzB,OAAO;MAAEC,UAAU,EAAEJ,GAAG,CAACE,OAAO,CAACC,QAAQ,CAACF,eAAe,CAAC,IAAI;IAAK,CAAC;EACtE;EAEA,IAAID,GAAG,CAACK,QAAQ,EAAEF,QAAQ,EAAE;IAC1B,OAAO;MAAEC,UAAU,EAAEJ,GAAG,CAACK,QAAQ,CAACF,QAAQ,CAACF,eAAe,CAAC,IAAI;IAAK,CAAC;EACvE;EAEA,OAAO,IAAI;AACb,CAAC;AAED,MAAMK,kBAAkB,GAAIN,GAAiB,IAAcO,OAAO,CAACP,GAAG,CAACQ,EAAE,EAAEC,MAAM,EAAEC,OAAO,CAAC;AAE3F,MAAMC,qBAAqB,GAAGA,CAACX,GAAiB,EAAEY,QAA6D,EAAEC,GAAoB,KAAK;EACxI,IAAI,CAACb,GAAG,CAACQ,EAAE,EAAEC,MAAM,EAAEC,OAAO,EAAE;EAE9BV,GAAG,CAACQ,EAAE,CAACC,MAAM,CAACK,OAAO,GAAG,OAAO,CAAC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AACrB,aAAa,EAAE3B,0BAA0B,CAAC;AACxD,CAAC","ignoreList":[]}
@@ -1,11 +1,23 @@
1
1
  import type { PluginStatusSnapshot } from '../server.js';
2
- import type { PublishedSkillSummary } from './types.js';
2
+ import type { PublishedSkillSummary, TuiCommand } from './types.js';
3
+ type SkillListOptions = {
4
+ canOpenPicker?: boolean;
5
+ };
3
6
  export declare const getInstallableNotInstalledSkills: (snapshot: PluginStatusSnapshot) => PublishedSkillSummary[];
4
7
  export type SkillListRow = {
5
8
  label: string;
6
9
  value: string;
7
10
  };
11
+ export type SkillPickerRow = SkillListRow & {
12
+ skillSlug: string;
13
+ description: string;
14
+ toolHint: string;
15
+ relevance: number | null;
16
+ };
8
17
  export declare const getSkillCatalogSummary: (snapshot: PluginStatusSnapshot) => string;
9
18
  export declare const getUserRoleRow: (snapshot: PluginStatusSnapshot) => SkillListRow;
10
- export declare const getSkillListRows: (snapshot: PluginStatusSnapshot) => SkillListRow[];
19
+ export declare const getSkillListRows: (snapshot: PluginStatusSnapshot, options?: SkillListOptions) => SkillListRow[];
11
20
  export declare const getSkillActionRows: (snapshot: PluginStatusSnapshot) => SkillListRow[];
21
+ export declare const getSkillPickerRows: (snapshot: PluginStatusSnapshot, query?: string) => SkillPickerRow[];
22
+ export declare const getSkillPickerCommands: (snapshot: PluginStatusSnapshot, onSelect?: (row: SkillPickerRow) => void) => TuiCommand[];
23
+ export {};
@@ -1,4 +1,4 @@
1
- const MAX_LISTED_SKILLS = 6;
1
+ const MAX_PICKER_SKILLS = 24;
2
2
  export const getInstallableNotInstalledSkills = snapshot => {
3
3
  const installableSkills = snapshot.installableCatalog?.skills ?? [];
4
4
  if (installableSkills.length === 0) return [];
@@ -34,25 +34,82 @@ const toEffectiveSkillLabel = skill => {
34
34
  if (skill.contextKind === 'project') return 'project';
35
35
  return 'active';
36
36
  };
37
- export const getSkillListRows = snapshot => {
38
- const activeRows = (snapshot.catalog?.skills ?? []).map(skill => ({
39
- label: toEffectiveSkillLabel(skill),
40
- value: compactSkillName(skill)
41
- }));
42
- const availableRows = getInstallableNotInstalledSkills(snapshot).map(skill => ({
43
- label: 'available',
44
- value: compactSkillName(skill)
45
- }));
46
- const ignoredRows = snapshot.ignoredPublishedSkills.skills.map(skill => ({
47
- label: 'ignored',
48
- value: compactSkillName(skill)
49
- }));
50
- const rows = [...activeRows, ...availableRows, ...ignoredRows];
51
- if (rows.length <= MAX_LISTED_SKILLS) return rows;
52
- return [...rows.slice(0, MAX_LISTED_SKILLS), {
53
- label: 'more',
54
- value: `${rows.length - MAX_LISTED_SKILLS} hidden · use opencode_wizard_published_skills_fetch`
37
+ export const getSkillListRows = (snapshot, options = {}) => {
38
+ const rows = [options.canOpenPicker ? {
39
+ label: 'open',
40
+ value: '/wizard-skills'
41
+ } : {
42
+ label: 'fetch',
43
+ value: 'opencode_wizard_published_skills_fetch'
44
+ }];
45
+ if (getInstallableNotInstalledSkills(snapshot).length === 0 && snapshot.ignoredPublishedSkills.skills.length === 0) return rows;
46
+ return [...rows, {
47
+ label: 'manage',
48
+ value: 'opencode_wizard_published_skill_preference_set'
55
49
  }];
56
50
  };
57
51
  export const getSkillActionRows = snapshot => [getUserRoleRow(snapshot)];
52
+ const normalizePickerText = value => value?.trim().toLowerCase() ?? '';
53
+ const getSkillSearchText = skill => [skill.skillSlug, skill.skillName, skill.artifactName, skill.artifactDescription, skill.whenToUse, skill.recommendationReason, ...skill.identifiers, ...skill.tags.flatMap(tag => [tag.slug, tag.label, tag.facet?.slug, tag.facet?.label])].map(normalizePickerText).filter(Boolean).join(' ');
54
+ const getPickerLabel = skill => {
55
+ if (skill.contextKind === 'installable') return 'available';
56
+ return toEffectiveSkillLabel(skill);
57
+ };
58
+ const getSkillToolHint = (skill, label) => {
59
+ if (label === 'available') {
60
+ return `read-only: install with opencode_wizard_published_skill_preference_set skill=${skill.skillSlug}`;
61
+ }
62
+ if (label === 'ignored') {
63
+ return `read-only: unignore with opencode_wizard_published_skill_preference_set skill=${skill.skillSlug}; use preferenceScope=global for global starter skills`;
64
+ }
65
+ if (skill.contextKind === 'global') {
66
+ return `read-only: disable global with opencode_wizard_published_skill_preference_set skill=${skill.skillSlug} action=ignore preferenceScope=global`;
67
+ }
68
+ return `read-only: fetch body with opencode_wizard_published_skills_fetch skill=${skill.skillSlug}`;
69
+ };
70
+ const toPickerRow = (skill, label) => ({
71
+ label,
72
+ value: compactSkillName(skill),
73
+ skillSlug: skill.skillSlug,
74
+ description: [skill.recommendationReason, skill.whenToUse, skill.artifactDescription].map(item => item?.trim()).find(item => Boolean(item)) ?? '',
75
+ toolHint: getSkillToolHint(skill, label),
76
+ relevance: skill.relevance ?? null
77
+ });
78
+ const getPickerSkills = snapshot => [...(snapshot.catalog?.skills ?? []).map(skill => ({
79
+ skill,
80
+ label: getPickerLabel(skill)
81
+ })), ...getInstallableNotInstalledSkills(snapshot).map(skill => ({
82
+ skill,
83
+ label: 'available'
84
+ })), ...snapshot.ignoredPublishedSkills.skills.map(skill => ({
85
+ skill,
86
+ label: 'ignored'
87
+ }))];
88
+ export const getSkillPickerRows = (snapshot, query = '') => {
89
+ const normalizedQuery = normalizePickerText(query);
90
+ const tokens = normalizedQuery.split(/\s+/u).filter(Boolean);
91
+ return getPickerSkills(snapshot).filter(({
92
+ skill
93
+ }) => {
94
+ if (tokens.length === 0) return true;
95
+ const searchText = getSkillSearchText(skill);
96
+ return tokens.every(token => searchText.includes(token));
97
+ }).sort((left, right) => {
98
+ const leftRelevance = left.skill.relevance ?? -1;
99
+ const rightRelevance = right.skill.relevance ?? -1;
100
+ if (leftRelevance !== rightRelevance) return rightRelevance - leftRelevance;
101
+ return left.skill.skillSlug.localeCompare(right.skill.skillSlug);
102
+ }).slice(0, MAX_PICKER_SKILLS).map(({
103
+ skill,
104
+ label
105
+ }) => toPickerRow(skill, label));
106
+ };
107
+ export const getSkillPickerCommands = (snapshot, onSelect) => getSkillPickerRows(snapshot).map(row => ({
108
+ value: `opencode-wizard.skill-picker.${row.label}.${row.skillSlug}`,
109
+ title: `Wizard skill: ${row.value}`,
110
+ description: [row.label, row.relevance === null ? null : `relevance ${row.relevance}`, row.description, row.toolHint].filter(item => Boolean(item)).join(' · '),
111
+ category: 'Wizard skills',
112
+ suggested: row.relevance !== null && row.relevance >= 80,
113
+ onSelect: onSelect ? () => onSelect(row) : undefined
114
+ }));
58
115
  //# sourceMappingURL=skill-helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["MAX_LISTED_SKILLS","getInstallableNotInstalledSkills","snapshot","installableSkills","installableCatalog","skills","length","activeSkillSlugs","Set","catalog","map","skill","skillSlug","ignoredSkillSlugs","ignoredPublishedSkills","filter","has","getSkillCatalogSummary","loadedSkillCount","publishedSkillCount","workspaceSkillCount","assignmentCounts","project","userSkillCount","user","globalSkillCount","global","getUserRoleLabel","authState","role","status","getUserRoleRow","label","value","compactSkillName","name","skillName","trim","artifactName","toEffectiveSkillLabel","assignmentSource","includes","contextKind","getSkillListRows","activeRows","availableRows","ignoredRows","rows","slice","getSkillActionRows"],"sources":["../../src/tui/skill-helpers.ts"],"sourcesContent":["import type { PluginStatusSnapshot } from '../server.js';\nimport type { PublishedSkillSummary } from './types.js';\n\nconst MAX_LISTED_SKILLS = 6;\n\nexport const getInstallableNotInstalledSkills = (snapshot: PluginStatusSnapshot): PublishedSkillSummary[] => {\n const installableSkills = snapshot.installableCatalog?.skills ?? [];\n if (installableSkills.length === 0) return [];\n\n const activeSkillSlugs = new Set(snapshot.catalog?.skills.map((skill) => skill.skillSlug) ?? []);\n const ignoredSkillSlugs = new Set(snapshot.ignoredPublishedSkills.skills.map((skill) => skill.skillSlug));\n\n return installableSkills.filter(\n (skill) => !activeSkillSlugs.has(skill.skillSlug) && !ignoredSkillSlugs.has(skill.skillSlug),\n );\n};\n\nexport type SkillListRow = {\n label: string;\n value: string;\n};\n\nexport const getSkillCatalogSummary = (snapshot: PluginStatusSnapshot): string => {\n const catalog = snapshot.catalog;\n const loadedSkillCount = catalog?.publishedSkillCount ?? 0;\n const workspaceSkillCount = catalog?.assignmentCounts?.project ?? 0;\n const userSkillCount = catalog?.assignmentCounts?.user ?? 0;\n const globalSkillCount = catalog?.assignmentCounts?.global ?? 0;\n\n return `${loadedSkillCount} loaded · ${workspaceSkillCount} workspace · ${userSkillCount} user · ${globalSkillCount} global`;\n};\n\nconst getUserRoleLabel = (snapshot: PluginStatusSnapshot): string => {\n if (snapshot.authState.role) return snapshot.authState.role;\n if (snapshot.authState.status === 'authenticated') return 'unknown';\n\n return 'none';\n};\n\nexport const getUserRoleRow = (snapshot: PluginStatusSnapshot): SkillListRow => ({\n label: 'role',\n value: getUserRoleLabel(snapshot),\n});\n\nconst compactSkillName = (skill: PublishedSkillSummary): string => {\n const name = skill.skillName.trim() || skill.artifactName.trim() || skill.skillSlug;\n if (name === skill.skillSlug) return name;\n\n return `${name} (${skill.skillSlug})`;\n};\n\nconst toEffectiveSkillLabel = (skill: PublishedSkillSummary): string => {\n if (skill.assignmentSource.includes('USER')) return 'user';\n if (skill.contextKind === 'global') return 'global';\n if (skill.contextKind === 'project') return 'project';\n\n return 'active';\n};\n\nexport const getSkillListRows = (snapshot: PluginStatusSnapshot): SkillListRow[] => {\n const activeRows = (snapshot.catalog?.skills ?? []).map((skill) => ({\n label: toEffectiveSkillLabel(skill),\n value: compactSkillName(skill),\n }));\n const availableRows = getInstallableNotInstalledSkills(snapshot).map((skill) => ({\n label: 'available',\n value: compactSkillName(skill),\n }));\n const ignoredRows = snapshot.ignoredPublishedSkills.skills.map((skill) => ({\n label: 'ignored',\n value: compactSkillName(skill),\n }));\n const rows = [...activeRows, ...availableRows, ...ignoredRows];\n if (rows.length <= MAX_LISTED_SKILLS) return rows;\n\n return [\n ...rows.slice(0, MAX_LISTED_SKILLS),\n {\n label: 'more',\n value: `${rows.length - MAX_LISTED_SKILLS} hidden · use opencode_wizard_published_skills_fetch`,\n },\n ];\n};\n\nexport const getSkillActionRows = (snapshot: PluginStatusSnapshot): SkillListRow[] => [getUserRoleRow(snapshot)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CAACvB,KAAK;EAC/B,CAAC,CAAC,CAAC;EACH,MAAMkC,aAAa,GAAG5C,gCAAgC,CAACC,QAAQ,CAAC,CAACQ,GAAG,CAAEC,KAAK,KAAM;IAC/EqB,KAAK,EAAE,WAAW;IAClBC,KAAK,EAAEC,gBAAgB,CAACvB,KAAK;EAC/B,CAAC,CAAC,CAAC;EACH,MAAMmC,WAAW,GAAG5C,QAAQ,CAACY,sBAAsB,CAACT,MAAM,CAACK,GAAG,CAAEC,KAAK,KAAM;IACzEqB,KAAK,EAAE,SAAS;IAChBC,KAAK,EAAEC,gBAAgB,CAACvB,KAAK;EAC/B,CAAC,CAAC,CAAC;EACH,MAAMoC,IAAI,GAAG,CAAC,GAAGH,UAAU,EAAE,GAAGC,aAAa,EAAE,GAAGC,WAAW,CAAC;EAC9D,IAAIC,IAAI,CAACzC,MAAM,IAAIN,iBAAiB,EAAE,OAAO+C,IAAI;EAEjD,OAAO,CACL,GAAGA,IAAI,CAACC,KAAK,CAAC,CAAC,EAAEhD,iBAAiB,CAAC,EACnC;IACEgC,KAAK,EAAE,MAAM;IACbC,KAAK,EAAE,GAAGc,IAAI,CAACzC,MAAM,GAAGN,iBAAiB;EAC3C,CAAC,CACF;AACH,CAAC;AAED,OAAO,MAAMiD,kBAAkB,GAAI/C,QAA8B,IAAqB,CAAC6B,cAAc,CAAC7B,QAAQ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["MAX_PICKER_SKILLS","getInstallableNotInstalledSkills","snapshot","installableSkills","installableCatalog","skills","length","activeSkillSlugs","Set","catalog","map","skill","skillSlug","ignoredSkillSlugs","ignoredPublishedSkills","filter","has","getSkillCatalogSummary","loadedSkillCount","publishedSkillCount","workspaceSkillCount","assignmentCounts","project","userSkillCount","user","globalSkillCount","global","getUserRoleLabel","authState","role","status","getUserRoleRow","label","value","compactSkillName","name","skillName","trim","artifactName","toEffectiveSkillLabel","assignmentSource","includes","contextKind","getSkillListRows","options","rows","canOpenPicker","getSkillActionRows","normalizePickerText","toLowerCase","getSkillSearchText","artifactDescription","whenToUse","recommendationReason","identifiers","tags","flatMap","tag","slug","facet","Boolean","join","getPickerLabel","getSkillToolHint","toPickerRow","description","item","find","toolHint","relevance","getPickerSkills","getSkillPickerRows","query","normalizedQuery","tokens","split","searchText","every","token","sort","left","right","leftRelevance","rightRelevance","localeCompare","slice","getSkillPickerCommands","onSelect","row","title","category","suggested","undefined"],"sources":["../../src/tui/skill-helpers.ts"],"sourcesContent":["import type { PluginStatusSnapshot } from '../server.js';\nimport type { PublishedSkillSummary, TuiCommand } from './types.js';\n\nconst MAX_PICKER_SKILLS = 24;\n\ntype SkillListOptions = {\n canOpenPicker?: boolean;\n};\n\nexport const getInstallableNotInstalledSkills = (snapshot: PluginStatusSnapshot): PublishedSkillSummary[] => {\n const installableSkills = snapshot.installableCatalog?.skills ?? [];\n if (installableSkills.length === 0) return [];\n\n const activeSkillSlugs = new Set(snapshot.catalog?.skills.map((skill) => skill.skillSlug) ?? []);\n const ignoredSkillSlugs = new Set(snapshot.ignoredPublishedSkills.skills.map((skill) => skill.skillSlug));\n\n return installableSkills.filter(\n (skill) => !activeSkillSlugs.has(skill.skillSlug) && !ignoredSkillSlugs.has(skill.skillSlug),\n );\n};\n\nexport type SkillListRow = {\n label: string;\n value: string;\n};\n\nexport type SkillPickerRow = SkillListRow & {\n skillSlug: string;\n description: string;\n toolHint: string;\n relevance: number | null;\n};\n\nexport const getSkillCatalogSummary = (snapshot: PluginStatusSnapshot): string => {\n const catalog = snapshot.catalog;\n const loadedSkillCount = catalog?.publishedSkillCount ?? 0;\n const workspaceSkillCount = catalog?.assignmentCounts?.project ?? 0;\n const userSkillCount = catalog?.assignmentCounts?.user ?? 0;\n const globalSkillCount = catalog?.assignmentCounts?.global ?? 0;\n\n return `${loadedSkillCount} loaded · ${workspaceSkillCount} workspace · ${userSkillCount} user · ${globalSkillCount} global`;\n};\n\nconst getUserRoleLabel = (snapshot: PluginStatusSnapshot): string => {\n if (snapshot.authState.role) return snapshot.authState.role;\n if (snapshot.authState.status === 'authenticated') return 'unknown';\n\n return 'none';\n};\n\nexport const getUserRoleRow = (snapshot: PluginStatusSnapshot): SkillListRow => ({\n label: 'role',\n value: getUserRoleLabel(snapshot),\n});\n\nconst compactSkillName = (skill: PublishedSkillSummary): string => {\n const name = skill.skillName.trim() || skill.artifactName.trim() || skill.skillSlug;\n if (name === skill.skillSlug) return name;\n\n return `${name} (${skill.skillSlug})`;\n};\n\nconst toEffectiveSkillLabel = (skill: PublishedSkillSummary): string => {\n if (skill.assignmentSource.includes('USER')) return 'user';\n if (skill.contextKind === 'global') return 'global';\n if (skill.contextKind === 'project') return 'project';\n\n return 'active';\n};\n\nexport const getSkillListRows = (snapshot: PluginStatusSnapshot, options: SkillListOptions = {}): SkillListRow[] => {\n const rows: SkillListRow[] = [\n options.canOpenPicker\n ? { label: 'open', value: '/wizard-skills' }\n : { label: 'fetch', value: 'opencode_wizard_published_skills_fetch' },\n ];\n\n if (getInstallableNotInstalledSkills(snapshot).length === 0 && snapshot.ignoredPublishedSkills.skills.length === 0) return rows;\n\n return [\n ...rows,\n {\n label: 'manage',\n value: 'opencode_wizard_published_skill_preference_set',\n },\n ];\n};\n\nexport const getSkillActionRows = (snapshot: PluginStatusSnapshot): SkillListRow[] => [getUserRoleRow(snapshot)];\n\nconst normalizePickerText = (value: string | null | undefined): string => value?.trim().toLowerCase() ?? '';\n\nconst getSkillSearchText = (skill: PublishedSkillSummary): string =>\n [\n skill.skillSlug,\n skill.skillName,\n skill.artifactName,\n skill.artifactDescription,\n skill.whenToUse,\n skill.recommendationReason,\n ...skill.identifiers,\n ...skill.tags.flatMap((tag) => [tag.slug, tag.label, tag.facet?.slug, tag.facet?.label]),\n ]\n .map(normalizePickerText)\n .filter(Boolean)\n .join(' ');\n\nconst getPickerLabel = (skill: PublishedSkillSummary): string => {\n if (skill.contextKind === 'installable') return 'available';\n return toEffectiveSkillLabel(skill);\n};\n\nconst getSkillToolHint = (skill: PublishedSkillSummary, label: string): string => {\n if (label === 'available') {\n return `read-only: install with opencode_wizard_published_skill_preference_set skill=${skill.skillSlug}`;\n }\n\n if (label === 'ignored') {\n return `read-only: unignore with opencode_wizard_published_skill_preference_set skill=${skill.skillSlug}; use preferenceScope=global for global starter skills`;\n }\n\n if (skill.contextKind === 'global') {\n return `read-only: disable global with opencode_wizard_published_skill_preference_set skill=${skill.skillSlug} action=ignore preferenceScope=global`;\n }\n\n return `read-only: fetch body with opencode_wizard_published_skills_fetch skill=${skill.skillSlug}`;\n};\n\nconst toPickerRow = (skill: PublishedSkillSummary, label: string): SkillPickerRow => ({\n label,\n value: compactSkillName(skill),\n skillSlug: skill.skillSlug,\n description: [skill.recommendationReason, skill.whenToUse, skill.artifactDescription]\n .map((item) => item?.trim())\n .find((item): item is string => Boolean(item)) ?? '',\n toolHint: getSkillToolHint(skill, label),\n relevance: skill.relevance ?? null,\n});\n\nconst getPickerSkills = (snapshot: PluginStatusSnapshot): Array<{ skill: PublishedSkillSummary; label: string }> => [\n ...(snapshot.catalog?.skills ?? []).map((skill) => ({ skill, label: getPickerLabel(skill) })),\n ...getInstallableNotInstalledSkills(snapshot).map((skill) => ({ skill, label: 'available' })),\n ...snapshot.ignoredPublishedSkills.skills.map((skill) => ({ skill, label: 'ignored' })),\n];\n\nexport const getSkillPickerRows = (snapshot: PluginStatusSnapshot, query = ''): SkillPickerRow[] => {\n const normalizedQuery = normalizePickerText(query);\n const tokens = normalizedQuery.split(/\\s+/u).filter(Boolean);\n\n return getPickerSkills(snapshot)\n .filter(({ skill }) => {\n if (tokens.length === 0) return true;\n const searchText = getSkillSearchText(skill);\n return tokens.every((token) => searchText.includes(token));\n })\n .sort((left, right) => {\n const leftRelevance = left.skill.relevance ?? -1;\n const rightRelevance = right.skill.relevance ?? -1;\n if (leftRelevance !== rightRelevance) return rightRelevance - leftRelevance;\n return left.skill.skillSlug.localeCompare(right.skill.skillSlug);\n })\n .slice(0, MAX_PICKER_SKILLS)\n .map(({ skill, label }) => toPickerRow(skill, label));\n};\n\nexport const getSkillPickerCommands = (snapshot: PluginStatusSnapshot, onSelect?: (row: SkillPickerRow) => void): TuiCommand[] =>\n getSkillPickerRows(snapshot).map((row) => ({\n value: `opencode-wizard.skill-picker.${row.label}.${row.skillSlug}`,\n title: `Wizard skill: ${row.value}`,\n description: [row.label, row.relevance === null ? null : `relevance ${row.relevance}`, row.description, row.toolHint]\n .filter((item): item is string => Boolean(item))\n .join(' · '),\n category: 'Wizard skills',\n suggested: row.relevance !== null && row.relevance >= 80,\n onSelect: onSelect ? () => onSelect(row) : undefined,\n }));\n"],"mappings":"AAGA,MAAMA,iBAAiB,GAAG,EAAE;AAM5B,OAAO,MAAMC,gCAAgC,GAAIC,QAA8B,IAA8B;EAC3G,MAAMC,iBAAiB,GAAGD,QAAQ,CAACE,kBAAkB,EAAEC,MAAM,IAAI,EAAE;EACnE,IAAIF,iBAAiB,CAACG,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE;EAE7C,MAAMC,gBAAgB,GAAG,IAAIC,GAAG,CAACN,QAAQ,CAACO,OAAO,EAAEJ,MAAM,CAACK,GAAG,CAAEC,KAAK,IAAKA,KAAK,CAACC,SAAS,CAAC,IAAI,EAAE,CAAC;EAChG,MAAMC,iBAAiB,GAAG,IAAIL,GAAG,CAACN,QAAQ,CAACY,sBAAsB,CAACT,MAAM,CAACK,GAAG,CAAEC,KAAK,IAAKA,KAAK,CAACC,SAAS,CAAC,CAAC;EAEzG,OAAOT,iBAAiB,CAACY,MAAM,CAC5BJ,KAAK,IAAK,CAACJ,gBAAgB,CAACS,GAAG,CAACL,KAAK,CAACC,SAAS,CAAC,IAAI,CAACC,iBAAiB,CAACG,GAAG,CAACL,KAAK,CAACC,SAAS,CAC7F,CAAC;AACH,CAAC;AAcD,OAAO,MAAMK,sBAAsB,GAAIf,QAA8B,IAAa;EAChF,MAAMO,OAAO,GAAGP,QAAQ,CAACO,OAAO;EAChC,MAAMS,gBAAgB,GAAGT,OAAO,E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CAACC,GAAG,CAAC,GAAGI;AAC7C,CAAC,CAAC,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aexol/opencode-wizard",
3
- "version": "0.3.11",
3
+ "version": "0.4.0",
4
4
  "description": "OpenCode plugin for opencode-wizard published skills",
5
5
  "type": "module",
6
6
  "oc-plugin": [
@@ -21,7 +21,7 @@
21
21
  "dist"
22
22
  ],
23
23
  "scripts": {
24
- "release:check": "npm run typecheck && npm run test",
24
+ "release:check": "npm run typecheck && npm run test && npm pack --dry-run",
25
25
  "build": "node ./build.mjs",
26
26
  "test": "npm run build && node --test \"test/**/*.test.mjs\"",
27
27
  "typecheck": "tsc --noEmit -p tsconfig.json",