@aexol/opencode-wizard 0.1.14 → 0.1.16
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 +2 -1
- package/dist/config.d.ts +6 -0
- package/dist/config.js +19 -0
- package/dist/config.js.map +1 -0
- package/dist/server.d.ts +49 -2
- package/dist/server.js +448 -97
- package/dist/server.js.map +1 -1
- package/dist/smoke-published-skills.js +7 -1
- package/dist/smoke-published-skills.js.map +1 -1
- package/dist/storage.d.ts +5 -0
- package/dist/storage.js +43 -0
- package/dist/storage.js.map +1 -0
- package/dist/tui.js +414 -186
- package/dist/tui.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -21,6 +21,7 @@ Useful commands:
|
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
npm run typecheck
|
|
24
|
+
npm run test
|
|
24
25
|
npm run build
|
|
25
26
|
npm run release:check
|
|
26
27
|
```
|
|
@@ -45,7 +46,7 @@ Use `skills.urls` only for public registries that are intentionally cacheable by
|
|
|
45
46
|
|
|
46
47
|
## Catalog discovery and auth bootstrap
|
|
47
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`, TUI status, and chat/system-context startup may start the browser Entra PKCE flow and exchange the callback for a fresh backend-issued plugin session.
|
|
49
50
|
|
|
50
51
|
Call `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.
|
|
51
52
|
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const PUBLISHED_BACKEND_ORIGIN = "https://opencode-wizard.aexol.work";
|
|
2
|
+
export declare const normalizeBackendOrigin: (value: string | undefined) => string | null;
|
|
3
|
+
export declare const resolveBackendOriginFromValues: ({ environmentBackendOrigin, localBackendOrigin, }: {
|
|
4
|
+
environmentBackendOrigin?: string;
|
|
5
|
+
localBackendOrigin?: string;
|
|
6
|
+
}) => string;
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const PUBLISHED_BACKEND_ORIGIN = 'https://opencode-wizard.aexol.work';
|
|
2
|
+
export const normalizeBackendOrigin = value => {
|
|
3
|
+
if (!value) return null;
|
|
4
|
+
try {
|
|
5
|
+
const normalizedUrl = new URL(value);
|
|
6
|
+
return normalizedUrl.origin;
|
|
7
|
+
} catch {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
export const resolveBackendOriginFromValues = ({
|
|
12
|
+
environmentBackendOrigin,
|
|
13
|
+
localBackendOrigin
|
|
14
|
+
}) => {
|
|
15
|
+
const configuredBackendOrigin = normalizeBackendOrigin(environmentBackendOrigin) ?? normalizeBackendOrigin(localBackendOrigin);
|
|
16
|
+
if (configuredBackendOrigin) return configuredBackendOrigin;
|
|
17
|
+
return PUBLISHED_BACKEND_ORIGIN;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PUBLISHED_BACKEND_ORIGIN","normalizeBackendOrigin","value","normalizedUrl","URL","origin","resolveBackendOriginFromValues","environmentBackendOrigin","localBackendOrigin","configuredBackendOrigin"],"sources":["../src/config.ts"],"sourcesContent":["export const PUBLISHED_BACKEND_ORIGIN = 'https://opencode-wizard.aexol.work';\n\nexport const normalizeBackendOrigin = (value: string | undefined): string | null => {\n if (!value) return null;\n\n try {\n const normalizedUrl = new URL(value);\n return normalizedUrl.origin;\n } catch {\n return null;\n }\n};\n\nexport const resolveBackendOriginFromValues = ({\n environmentBackendOrigin,\n localBackendOrigin,\n}: {\n environmentBackendOrigin?: string;\n localBackendOrigin?: string;\n}): string => {\n const configuredBackendOrigin =\n normalizeBackendOrigin(environmentBackendOrigin) ?? normalizeBackendOrigin(localBackendOrigin);\n\n if (configuredBackendOrigin) return configuredBackendOrigin;\n\n return PUBLISHED_BACKEND_ORIGIN;\n};\n"],"mappings":"AAAA,OAAO,MAAMA,wBAAwB,GAAG,oCAAoC;AAE5E,OAAO,MAAMC,sBAAsB,GAAIC,KAAyB,IAAoB;EAClF,IAAI,CAACA,KAAK,EAAE,OAAO,IAAI;EAEvB,IAAI;IACF,MAAMC,aAAa,GAAG,IAAIC,GAAG,CAACF,KAAK,CAAC;IACpC,OAAOC,aAAa,CAACE,MAAM;EAC7B,CAAC,CAAC,MAAM;IACN,OAAO,IAAI;EACb;AACF,CAAC;AAED,OAAO,MAAMC,8BAA8B,GAAGA,CAAC;EAC7CC,wBAAwB;EACxBC;AAIF,CAAC,KAAa;EACZ,MAAMC,uBAAuB,GAC3BR,sBAAsB,CAACM,wBAAwB,CAAC,IAAIN,sBAAsB,CAACO,kBAAkB,CAAC;EAEhG,IAAIC,uBAAuB,EAAE,OAAOA,uBAAuB;EAE3D,OAAOT,wBAAwB;AACjC,CAAC","ignoreList":[]}
|
package/dist/server.d.ts
CHANGED
|
@@ -28,7 +28,15 @@ export type PublishedSkillCatalogPayload = {
|
|
|
28
28
|
} | null;
|
|
29
29
|
directoryPath: string;
|
|
30
30
|
skills: PublishedSkillCatalogItem[];
|
|
31
|
+
catalogSkills: PublishedSkillInstallableCatalogItem[];
|
|
32
|
+
userPreferences: PublishedSkillUserPreferences;
|
|
31
33
|
};
|
|
34
|
+
type PublishedSkillUserPreferences = {
|
|
35
|
+
scopeKey: string;
|
|
36
|
+
userKey: string;
|
|
37
|
+
ignoredSkills: PublishedSkillCatalogItem[];
|
|
38
|
+
};
|
|
39
|
+
export type PublishedSkillInstallableCatalogItem = Pick<PublishedSkillCatalogItem, 'skill' | 'skillVersion' | 'publishedArtifact'>;
|
|
32
40
|
export type PublishedSkillCatalogItem = {
|
|
33
41
|
assignmentSource: string;
|
|
34
42
|
assignmentType: string;
|
|
@@ -128,7 +136,7 @@ type PublishedSkillSummary = {
|
|
|
128
136
|
publishedAt: string;
|
|
129
137
|
identifiers: string[];
|
|
130
138
|
tags: PublishedSkillTagSummary[];
|
|
131
|
-
contextKind: 'global' | 'project';
|
|
139
|
+
contextKind: 'global' | 'project' | 'installable';
|
|
132
140
|
installPolicy: PublishedSkillInstallPolicy;
|
|
133
141
|
policyLabel: string;
|
|
134
142
|
};
|
|
@@ -154,7 +162,7 @@ type OpencodePluginServer = (input: OpencodePluginServerInput) => Promise<{
|
|
|
154
162
|
type PublishedSkillsSuccessState = {
|
|
155
163
|
pluginId: string;
|
|
156
164
|
runtimeMode: 'tool_fetch_only';
|
|
157
|
-
deliveryModel: '
|
|
165
|
+
deliveryModel: 'backend_published_installed_effective_skills';
|
|
158
166
|
workspace: PublishedSkillCatalogPayload['workspace'];
|
|
159
167
|
directoryPath: string;
|
|
160
168
|
rootSkillSeedPath: string;
|
|
@@ -177,6 +185,18 @@ export type NativeSkillsUrlCompatibility = {
|
|
|
177
185
|
guidance: string;
|
|
178
186
|
};
|
|
179
187
|
export declare const NATIVE_SKILLS_URL_COMPATIBILITY: NativeSkillsUrlCompatibility;
|
|
188
|
+
type PublishedSkillsResult = {
|
|
189
|
+
directoryPath: string;
|
|
190
|
+
workspaceResolution: WorkspaceResolution;
|
|
191
|
+
fetchResult: FetchResult;
|
|
192
|
+
};
|
|
193
|
+
type PublishedSkillsIgnoreState = {
|
|
194
|
+
scopeKey: string;
|
|
195
|
+
userKey: string;
|
|
196
|
+
ignoredSkillSlugs: string[];
|
|
197
|
+
installedGlobalSkillSlugs: string[];
|
|
198
|
+
installedWorkspaceSkillSlugs: string[];
|
|
199
|
+
};
|
|
180
200
|
export type PluginAuthStateSummary = {
|
|
181
201
|
status: 'missing' | 'authenticated';
|
|
182
202
|
email: string | null;
|
|
@@ -202,6 +222,16 @@ export type PluginStatusSnapshot = {
|
|
|
202
222
|
availableTools: typeof AVAILABLE_PUBLISHED_SKILL_TOOLS;
|
|
203
223
|
message: string | null;
|
|
204
224
|
catalog: PublishedSkillsSuccessState | null;
|
|
225
|
+
installableCatalog: {
|
|
226
|
+
count: number;
|
|
227
|
+
skills: PublishedSkillSummary[];
|
|
228
|
+
} | null;
|
|
229
|
+
ignoredPublishedSkills: {
|
|
230
|
+
scopeKey: string;
|
|
231
|
+
userKey: string;
|
|
232
|
+
count: number;
|
|
233
|
+
skills: PublishedSkillSummary[];
|
|
234
|
+
};
|
|
205
235
|
};
|
|
206
236
|
export declare const resolveConfig: (worktree: string) => Promise<ResolvedConfig>;
|
|
207
237
|
export declare const buildSkillMarkdown: (item: PublishedSkillDetailItem) => string;
|
|
@@ -213,6 +243,7 @@ export declare const selectPublishedSkills: <TItem extends PublishedSkillCatalog
|
|
|
213
243
|
selectedItems: TItem[];
|
|
214
244
|
missingIdentifiers: string[];
|
|
215
245
|
};
|
|
246
|
+
export declare const buildSystemNote: (result: PublishedSkillsResult, config: ResolvedConfig, details: PublishedSkillDetail[]) => string | null;
|
|
216
247
|
declare const toWorkspaceResolutionOutput: (resolution: WorkspaceResolution) => {
|
|
217
248
|
requestedDirectory: string;
|
|
218
249
|
repositoryRoot: string;
|
|
@@ -231,6 +262,22 @@ export declare const resolvePluginStatusSnapshotWithAuthBootstrap: ({ worktree,
|
|
|
231
262
|
directory: string;
|
|
232
263
|
signal: AbortSignal;
|
|
233
264
|
}) => Promise<PluginStatusSnapshot>;
|
|
265
|
+
export declare const setPublishedSkillIgnored: ({ worktree, directory, skillSlug, ignored, preferenceScope, }: {
|
|
266
|
+
worktree: string;
|
|
267
|
+
directory: string;
|
|
268
|
+
scopeKey?: string;
|
|
269
|
+
skillSlug: string;
|
|
270
|
+
ignored: boolean;
|
|
271
|
+
preferenceScope?: "global" | "project";
|
|
272
|
+
}) => Promise<PublishedSkillsIgnoreState>;
|
|
273
|
+
export declare const setPublishedSkillInstalled: ({ worktree, directory, skillSlug, installed, preferenceScope, }: {
|
|
274
|
+
worktree: string;
|
|
275
|
+
directory: string;
|
|
276
|
+
scopeKey?: string;
|
|
277
|
+
skillSlug: string;
|
|
278
|
+
installed: boolean;
|
|
279
|
+
preferenceScope: "global" | "project";
|
|
280
|
+
}) => Promise<PublishedSkillsIgnoreState>;
|
|
234
281
|
declare const _default: {
|
|
235
282
|
id: string;
|
|
236
283
|
server: OpencodePluginServer;
|