@aexol/opencode-wizard 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +4 -0
  2. package/dist/graphql-operations.d.ts +4 -0
  3. package/dist/graphql-operations.js +225 -0
  4. package/dist/graphql-operations.js.map +1 -0
  5. package/dist/plugin-tools.d.ts +64 -0
  6. package/dist/plugin-tools.js +57 -0
  7. package/dist/plugin-tools.js.map +1 -0
  8. package/dist/published-skills-system-note.d.ts +9 -0
  9. package/dist/published-skills-system-note.js +34 -0
  10. package/dist/published-skills-system-note.js.map +1 -0
  11. package/dist/published-skills-transform.d.ts +161 -0
  12. package/dist/published-skills-transform.js +238 -0
  13. package/dist/published-skills-transform.js.map +1 -0
  14. package/dist/server/auth-flow.d.ts +10 -0
  15. package/dist/server/auth-flow.js +215 -0
  16. package/dist/server/auth-flow.js.map +1 -0
  17. package/dist/server/auth-store.d.ts +19 -0
  18. package/dist/server/auth-store.js +177 -0
  19. package/dist/server/auth-store.js.map +1 -0
  20. package/dist/server/client.d.ts +51 -0
  21. package/dist/server/client.js +244 -0
  22. package/dist/server/client.js.map +1 -0
  23. package/dist/server/config.d.ts +2 -0
  24. package/dist/server/config.js +82 -0
  25. package/dist/server/config.js.map +1 -0
  26. package/dist/server/constants.d.ts +26 -0
  27. package/dist/server/constants.js +32 -0
  28. package/dist/server/constants.js.map +1 -0
  29. package/dist/server/path-utils.d.ts +2 -0
  30. package/dist/server/path-utils.js +8 -0
  31. package/dist/server/path-utils.js.map +1 -0
  32. package/dist/server/presence.d.ts +14 -0
  33. package/dist/server/presence.js +68 -0
  34. package/dist/server/presence.js.map +1 -0
  35. package/dist/server/runtime.d.ts +32 -0
  36. package/dist/server/runtime.js +1110 -0
  37. package/dist/server/runtime.js.map +1 -0
  38. package/dist/server/status.d.ts +27 -0
  39. package/dist/server/status.js +224 -0
  40. package/dist/server/status.js.map +1 -0
  41. package/dist/server/types.d.ts +321 -0
  42. package/dist/server/types.js +2 -0
  43. package/dist/server/types.js.map +1 -0
  44. package/dist/server/workspace.d.ts +15 -0
  45. package/dist/server/workspace.js +126 -0
  46. package/dist/server/workspace.js.map +1 -0
  47. package/dist/server.d.ts +4 -304
  48. package/dist/server.js +4 -2489
  49. package/dist/server.js.map +1 -1
  50. package/dist/smoke-published-skills.js +11 -9
  51. package/dist/smoke-published-skills.js.map +1 -1
  52. package/dist/tui/components/common.d.ts +15 -0
  53. package/dist/tui/components/common.js +81 -0
  54. package/dist/tui/components/common.js.map +1 -0
  55. package/dist/tui/components/preference-action-notice-row.d.ts +5 -0
  56. package/dist/tui/components/preference-action-notice-row.js +17 -0
  57. package/dist/tui/components/preference-action-notice-row.js.map +1 -0
  58. package/dist/tui/components/skill-catalog-row.d.ts +8 -0
  59. package/dist/tui/components/skill-catalog-row.js +124 -0
  60. package/dist/tui/components/skill-catalog-row.js.map +1 -0
  61. package/dist/tui/components/status-content.d.ts +14 -0
  62. package/dist/tui/components/status-content.js +131 -0
  63. package/dist/tui/components/status-content.js.map +1 -0
  64. package/dist/tui/components/wizard-skills-dialog-content.d.ts +9 -0
  65. package/dist/tui/components/wizard-skills-dialog-content.js +219 -0
  66. package/dist/tui/components/wizard-skills-dialog-content.js.map +1 -0
  67. package/dist/tui/components/wizard-skills-dialog.d.ts +7 -0
  68. package/dist/tui/components/wizard-skills-dialog.js +156 -0
  69. package/dist/tui/components/wizard-skills-dialog.js.map +1 -0
  70. package/dist/tui/constants.d.ts +8 -0
  71. package/dist/tui/constants.js +9 -0
  72. package/dist/tui/constants.js.map +1 -0
  73. package/dist/tui/formatting.d.ts +8 -0
  74. package/dist/tui/formatting.js +45 -0
  75. package/dist/tui/formatting.js.map +1 -0
  76. package/dist/tui/plugin.d.ts +2 -0
  77. package/dist/tui/plugin.js +26 -0
  78. package/dist/tui/plugin.js.map +1 -0
  79. package/dist/tui/rendering.d.ts +2 -0
  80. package/dist/tui/rendering.js +8 -0
  81. package/dist/tui/rendering.js.map +1 -0
  82. package/dist/tui/skill-helpers.d.ts +13 -0
  83. package/dist/tui/skill-helpers.js +49 -0
  84. package/dist/tui/skill-helpers.js.map +1 -0
  85. package/dist/tui/slots.d.ts +2 -0
  86. package/dist/tui/slots.js +56 -0
  87. package/dist/tui/slots.js.map +1 -0
  88. package/dist/tui/status.d.ts +2 -0
  89. package/dist/tui/status.js +21 -0
  90. package/dist/tui/status.js.map +1 -0
  91. package/dist/tui/types.d.ts +75 -0
  92. package/dist/tui/types.js +2 -0
  93. package/dist/tui/types.js.map +1 -0
  94. package/dist/tui.d.ts +1 -44
  95. package/dist/tui.js +2 -870
  96. package/dist/tui.js.map +1 -1
  97. package/package.json +1 -1
package/dist/server.d.ts CHANGED
@@ -1,308 +1,8 @@
1
- export declare const PLUGIN_ID = "opencode-wizard";
2
- type ResolvedConfig = {
3
- backendOrigin: string;
4
- graphqlUrl: string;
5
- authSessionUrl: string;
6
- presenceUrl: string;
7
- actionsUrl: string;
8
- fallbackWorkspaceSlug: string;
9
- rootSkillSeedPath: string;
10
- authStatePath: string;
11
- };
12
- type WorkspaceResolution = {
13
- requestedDirectory: string;
14
- repositoryRoot: string;
15
- repositoryUrl: string | null;
16
- fallbackWorkspaceSlug: string | null;
17
- directoryPath: string;
18
- cacheKey: string;
19
- };
20
- export type PublishedSkillCatalogPayload = {
21
- workspace: {
22
- id: string;
23
- slug: string;
24
- name: string;
25
- repositoryUrl?: string | null;
26
- defaultBranch?: string | null;
27
- status: string;
28
- } | null;
29
- directoryPath: string;
30
- skills: PublishedSkillCatalogItem[];
31
- catalogSkills: PublishedSkillInstallableCatalogItem[];
32
- userPreferences: PublishedSkillUserPreferences;
33
- };
34
- type PublishedSkillUserPreferences = {
35
- scopeKey: string;
36
- userKey: string;
37
- ignoredSkills: PublishedSkillCatalogItem[];
38
- };
39
- export type PublishedSkillInstallableCatalogItem = Pick<PublishedSkillCatalogItem, 'skill' | 'skillVersion' | 'publishedArtifact'>;
40
- export type PublishedSkillCatalogItem = {
41
- assignmentSource: string;
42
- assignmentType: string;
43
- scopePath: string;
44
- includeChildren?: boolean | null;
45
- skill: {
46
- id: string;
47
- slug: string;
48
- name: string;
49
- summary?: string | null;
50
- whenToUse?: string | null;
51
- status: string;
52
- installPolicy: PublishedSkillInstallPolicy;
53
- tags: PublishedSkillTag[];
54
- };
55
- skillVersion: {
56
- id: string;
57
- version: string;
58
- title?: string | null;
59
- summary?: string | null;
60
- status: string;
61
- };
62
- publishedArtifact: {
63
- id: string;
64
- frontmatterName: string;
65
- frontmatterDescription: string;
66
- checksum: string;
67
- publishedAt: string;
68
- fileCount: number;
69
- };
70
- };
71
- type PublishedSkillArtifactFilePayload = {
72
- id: string;
73
- relativePath: string;
74
- contentType: string;
75
- content: string;
76
- checksum: string;
77
- size: number;
78
- sortOrder: number;
79
- };
80
- type PublishedSkillFacet = {
81
- id: string;
82
- slug: string;
83
- label: string;
84
- description?: string | null;
85
- };
86
- type PublishedSkillTag = {
87
- id: string;
88
- slug: string;
89
- label: string;
90
- description?: string | null;
91
- facet?: PublishedSkillFacet | null;
92
- };
93
- type PublishedSkillFacetSummary = {
94
- slug: string;
95
- label: string;
96
- description: string | null;
97
- };
98
- type PublishedSkillTagSummary = {
99
- slug: string;
100
- label: string;
101
- description: string | null;
102
- facet: PublishedSkillFacetSummary | null;
103
- };
104
- type PublishedSkillInstallPolicy = 'GLOBAL_CONTEXT' | 'PROJECT_INSTALLABLE';
105
- export type PublishedSkillDetailItem = PublishedSkillCatalogItem & {
106
- publishedArtifact: PublishedSkillCatalogItem['publishedArtifact'] & {
107
- markdownBody: string;
108
- renderedContent: string;
109
- files: PublishedSkillArtifactFilePayload[];
110
- };
111
- };
112
- type AuthState = {
113
- pluginId: string;
114
- sessionToken: string;
115
- expiresAt: string;
116
- authenticatedAt: string;
117
- userId: string;
118
- email: string;
119
- };
120
- type FetchResult = {
121
- ok: true;
122
- status: 'ready';
123
- authMode: 'session';
124
- payload: PublishedSkillCatalogPayload;
125
- fetchedAt: string;
126
- source: 'network' | 'cache';
127
- } | {
128
- ok: false;
129
- status: 'missing_auth' | 'request_failed';
130
- authMode: 'missing' | 'session';
131
- message: string;
132
- fetchedAt: string;
133
- source: 'network' | 'cache';
134
- };
135
- type PublishedSkillSummary = {
136
- skillSlug: string;
137
- skillName: string;
138
- artifactName: string;
139
- artifactDescription: string;
140
- whenToUse: string | null;
141
- version: string;
142
- assignmentSource: string;
143
- assignmentType: string;
144
- scopePath: string;
145
- includeChildren: boolean | null;
146
- checksum: string;
147
- publishedAt: string;
148
- fileCount: number;
149
- identifiers: string[];
150
- tags: PublishedSkillTagSummary[];
151
- contextKind: 'global' | 'project' | 'installable';
152
- installPolicy: PublishedSkillInstallPolicy;
153
- assignmentLabel: string;
154
- policyLabel: string;
155
- };
156
- type PublishedSkillDetail = PublishedSkillSummary & {
157
- skillId: string;
158
- skillVersionId: string;
159
- artifactId: string;
160
- markdownDocument: string;
161
- markdownBody: string;
162
- renderedContent: string;
163
- files: PublishedSkillArtifactFilePayload[];
164
- resources: PublishedSkillArtifactFilePayload[];
165
- };
166
- export type PublishedSkillFetchArgs = {
167
- skill?: string;
168
- skills?: string;
169
- directory?: string;
170
- refresh?: boolean;
171
- };
172
- type OpencodePluginServerInput = {
173
- worktree: string;
174
- directory: string;
175
- };
176
- type OpencodePluginSystemTransformOutput = {
177
- system: string[];
178
- };
179
- type OpencodePluginServer = (input: OpencodePluginServerInput) => Promise<{
180
- tool: Record<string, unknown>;
181
- 'experimental.chat.system.transform': (hookInput: unknown, output: OpencodePluginSystemTransformOutput) => Promise<void>;
182
- }>;
183
- type PublishedSkillsSuccessState = {
184
- pluginId: string;
185
- runtimeMode: 'tool_fetch_only';
186
- deliveryModel: 'backend_published_installed_effective_skills';
187
- workspace: PublishedSkillCatalogPayload['workspace'];
188
- directoryPath: string;
189
- rootSkillSeedPath: string;
190
- availableTools: string[];
191
- publishedSkillCount: number;
192
- assignmentCounts: {
193
- global: number;
194
- project: number;
195
- user: number;
196
- other: number;
197
- };
198
- facets: PublishedSkillFacetSummary[];
199
- skills: PublishedSkillSummary[];
200
- };
201
- export declare const AVAILABLE_PUBLISHED_SKILL_TOOLS: string[];
202
- export type NativeSkillsUrlCompatibility = {
203
- configKey: 'skills.urls';
204
- deliveryMode: 'public_static_registry';
205
- wizardPrivateDelivery: 'authenticated_scoped_fetch_tool';
206
- authSupport: 'none';
207
- guidance: string;
208
- };
209
- export declare const NATIVE_SKILLS_URL_COMPATIBILITY: NativeSkillsUrlCompatibility;
210
- type PublishedSkillsResult = {
211
- directoryPath: string;
212
- workspaceResolution: WorkspaceResolution;
213
- fetchResult: FetchResult;
214
- };
215
- type PublishedSkillsIgnoreState = {
216
- scopeKey: string;
217
- userKey: string;
218
- ignoredSkillSlugs: string[];
219
- installedGlobalSkillSlugs: string[];
220
- installedWorkspaceSkillSlugs: string[];
221
- };
222
- export type PluginAuthStateSummary = {
223
- status: 'missing' | 'authenticated';
224
- email: string | null;
225
- userId: string | null;
226
- authenticatedAt: string | null;
227
- expiresAt: string | null;
228
- };
229
- export type PluginStatusSnapshot = {
230
- pluginId: string;
231
- runtimeMode: 'tool_fetch_only';
232
- nativeSkillsUrlCompatibility: NativeSkillsUrlCompatibility;
233
- backendOrigin: string;
234
- graphqlUrl: string;
235
- fallbackWorkspaceSlug: string;
236
- workspaceResolution: ReturnType<typeof toWorkspaceResolutionOutput>;
237
- rootSkillSeedPath: string;
238
- authStatePath: string;
239
- authState: PluginAuthStateSummary;
240
- status: FetchResult['status'];
241
- authMode: FetchResult['authMode'];
242
- fetchedAt: string;
243
- source: FetchResult['source'];
244
- availableTools: typeof AVAILABLE_PUBLISHED_SKILL_TOOLS;
245
- message: string | null;
246
- catalog: PublishedSkillsSuccessState | null;
247
- installableCatalog: {
248
- count: number;
249
- skills: PublishedSkillSummary[];
250
- } | null;
251
- ignoredPublishedSkills: {
252
- scopeKey: string;
253
- userKey: string;
254
- count: number;
255
- skills: PublishedSkillSummary[];
256
- };
257
- };
258
- export declare const resolveConfig: (worktree: string) => Promise<ResolvedConfig>;
259
- export declare const buildSkillMarkdown: (item: PublishedSkillDetailItem) => string;
260
- export declare const toPublishedSkillDetail: (item: PublishedSkillDetailItem) => PublishedSkillDetail;
261
- export declare const toPublishedSkillCatalog: (payload: PublishedSkillCatalogPayload) => PublishedSkillsSuccessState;
262
- export declare const parseRequestedSkillArgs: (args: PublishedSkillFetchArgs) => string[];
263
- export declare const selectPublishedSkills: <TItem extends PublishedSkillCatalogItem>(payload: Omit<PublishedSkillCatalogPayload, "skills"> & {
264
- skills: TItem[];
265
- }, identifiers: string[]) => {
266
- selectedItems: TItem[];
267
- missingIdentifiers: string[];
268
- };
269
- export declare const buildSystemNote: (result: PublishedSkillsResult, config: ResolvedConfig, details: PublishedSkillDetail[]) => string | null;
270
- declare const toWorkspaceResolutionOutput: (resolution: WorkspaceResolution) => {
271
- requestedDirectory: string;
272
- repositoryRoot: string;
273
- repositoryUrl: string | null;
274
- fallbackWorkspaceSlug: string | null;
275
- directoryPath: string;
276
- };
277
- export declare const toPluginAuthStateSummary: (authState: AuthState | null) => PluginAuthStateSummary;
278
- export declare const resolvePluginStatusSnapshot: ({ worktree, directory, signal, }: {
279
- worktree: string;
280
- directory: string;
281
- signal: AbortSignal;
282
- }) => Promise<PluginStatusSnapshot>;
283
- export declare const resolvePluginStatusSnapshotWithAuthBootstrap: ({ worktree, directory, signal, }: {
284
- worktree: string;
285
- directory: string;
286
- signal: AbortSignal;
287
- }) => Promise<PluginStatusSnapshot>;
288
- export declare const setPublishedSkillIgnored: ({ worktree, directory, skillSlug, ignored, preferenceScope, }: {
289
- worktree: string;
290
- directory: string;
291
- scopeKey?: string;
292
- skillSlug: string;
293
- ignored: boolean;
294
- preferenceScope?: "global" | "project";
295
- }) => Promise<PublishedSkillsIgnoreState>;
296
- export declare const setPublishedSkillInstalled: ({ worktree, directory, skillSlug, installed, preferenceScope, }: {
297
- worktree: string;
298
- directory: string;
299
- scopeKey?: string;
300
- skillSlug: string;
301
- installed: boolean;
302
- preferenceScope: "global" | "project";
303
- }) => Promise<PublishedSkillsIgnoreState>;
1
+ export { AVAILABLE_PUBLISHED_SKILL_TOOLS, resolveAvailableTools, type PublishedSkillFetchArgs, } from './plugin-tools.js';
2
+ export { buildSkillMarkdown, parseRequestedSkillArgs, selectPublishedSkills, toPublishedSkillDetail, } from './published-skills-transform.js';
3
+ export { PLUGIN_ID, NATIVE_SKILLS_URL_COMPATIBILITY, buildSystemNote, resolveConfig, resolvePluginStatusSnapshot, resolvePluginStatusSnapshotWithAuthBootstrap, setPublishedSkillIgnored, setPublishedSkillInstalled, toPluginAuthStateSummary, toPublishedSkillCatalog, type NativeSkillsUrlCompatibility, type PluginAuthStateSummary, type PluginStatusSnapshot, type PublishedSkillCatalogItem, type PublishedSkillCatalogPayload, type PublishedSkillDetailItem, type PublishedSkillInstallableCatalogItem, } from './server/runtime.js';
304
4
  declare const _default: {
305
5
  id: string;
306
- server: OpencodePluginServer;
6
+ server: import("./server/types.js").OpencodePluginServer;
307
7
  };
308
8
  export default _default;