@aexol/opencode-wizard 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- export {};
@@ -1,79 +0,0 @@
1
- import { buildSkillMarkdown, resolveConfig, selectPublishedSkills, toPublishedSkillCatalog, toPublishedSkillDetail } from './server.js';
2
- const run = async () => {
3
- const payload = {
4
- workspace: {
5
- id: 'workspace-1',
6
- slug: 'opencode-wizard',
7
- name: 'opencode-wizard',
8
- repositoryUrl: 'https://example.com/opencode-wizard.git',
9
- defaultBranch: 'main',
10
- status: 'ACTIVE',
11
- },
12
- directoryPath: '.',
13
- skills: [
14
- {
15
- assignmentSource: 'WORKSPACE',
16
- assignmentType: 'PATH',
17
- scopePath: '.',
18
- includeChildren: true,
19
- skill: {
20
- id: 'skill-1',
21
- slug: 'backend-auth',
22
- name: 'backend-auth',
23
- summary: 'Backend auth skill',
24
- status: 'ACTIVE',
25
- tags: [
26
- {
27
- id: 'tag-1',
28
- slug: 'auth',
29
- label: 'Auth',
30
- description: null,
31
- facet: {
32
- id: 'facet-1',
33
- slug: 'capability',
34
- label: 'Capability',
35
- description: null,
36
- },
37
- },
38
- ],
39
- },
40
- skillVersion: {
41
- id: 'version-1',
42
- version: '1.0.0',
43
- title: 'Initial',
44
- summary: 'Initial publish',
45
- status: 'PUBLISHED',
46
- },
47
- publishedArtifact: {
48
- id: 'artifact-1',
49
- frontmatterName: 'backend-auth',
50
- frontmatterDescription: 'JWT auth skill',
51
- markdownBody: '## Mock skill\n\nThis is a mock published skill.',
52
- renderedContent: '<h2>Mock skill</h2>',
53
- checksum: 'checksum-1',
54
- publishedAt: '2026-04-22T00:00:00.000Z',
55
- },
56
- },
57
- ],
58
- };
59
- const config = await resolveConfig(process.cwd());
60
- const catalog = toPublishedSkillCatalog(payload);
61
- const selection = selectPublishedSkills(payload, ['backend-auth', 'missing-skill']);
62
- const detail = selection.selectedItems[0] ? toPublishedSkillDetail(selection.selectedItems[0]) : null;
63
- const preview = buildSkillMarkdown(payload.skills[0]).split('\n').slice(0, 6);
64
- console.log(JSON.stringify({
65
- runtimeMode: catalog.runtimeMode,
66
- graphqlUrl: config.graphqlUrl,
67
- publishedSkillCount: catalog.publishedSkillCount,
68
- availableTools: catalog.availableTools,
69
- facets: catalog.facets,
70
- selectedSkillCount: selection.selectedItems.length,
71
- missingSkills: selection.missingIdentifiers,
72
- selectedSkillSlug: detail?.skillSlug ?? null,
73
- selectedSkillTags: detail?.tags ?? [],
74
- markdownDocumentIncludesFrontmatter: detail?.markdownDocument.startsWith('---') ?? false,
75
- preview,
76
- markdownBodyIncludesContent: detail?.markdownBody.includes('This is a mock published skill.') ?? false,
77
- }, null, 2));
78
- };
79
- void run();