@aexol/opencode-wizard 0.1.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.
- package/README.md +44 -0
- package/dist/server.d.ts +130 -0
- package/dist/server.js +1628 -0
- package/dist/smoke-published-skills.d.ts +1 -0
- package/dist/smoke-published-skills.js +79 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @aexol/opencode-wizard
|
|
2
|
+
|
|
3
|
+
`@aexol/opencode-wizard` is a separately releasable OpenCode server plugin package for fetching published skills from the opencode-wizard backend runtime.
|
|
4
|
+
|
|
5
|
+
## Package target
|
|
6
|
+
|
|
7
|
+
- `oc-plugin: ["server"]`
|
|
8
|
+
- `./server` → `dist/server.js`
|
|
9
|
+
- no generated runtime skill directory is published; the plugin stays fetch-only at runtime
|
|
10
|
+
|
|
11
|
+
## Local development
|
|
12
|
+
|
|
13
|
+
This monorepo still path-loads the same package from `./plugin/opencode-wizard-skills` during local OpenCode development.
|
|
14
|
+
|
|
15
|
+
Backend origin resolution keeps local-first behavior only when the plugin is executing from a local module path/check-out. In that case it still prefers repo `.env`/`PORT`, then `APP_URL`, then falls back to `http://localhost:8080`. For the packaged/published plugin, the same config values still win when present, but the fallback origin is `https://opencode-wizard.aexol.work`.
|
|
16
|
+
|
|
17
|
+
Useful commands:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm run typecheck
|
|
21
|
+
npm run build
|
|
22
|
+
npm run release:check
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Published package usage
|
|
26
|
+
|
|
27
|
+
OpenCode server/plugin host can install the published package by package name instead of a repo-local path:
|
|
28
|
+
|
|
29
|
+
```jsonc
|
|
30
|
+
{
|
|
31
|
+
"plugin": ["@aexol/opencode-wizard@latest"]
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
For repo-local development, continue using the local path-based config already documented in this repository.
|
|
36
|
+
|
|
37
|
+
## Release flow
|
|
38
|
+
|
|
39
|
+
1. Bump `version` in `plugin/opencode-wizard-skills/package.json`.
|
|
40
|
+
2. Run `npm run plugin:skills:release:check` from the repo root.
|
|
41
|
+
3. If you are following the repo release-tag convention, create Git tag `plugin-opencode-wizard-skills-v<version>`.
|
|
42
|
+
4. Push the release commit/tag so GitLab can run the shared npm public publish job.
|
|
43
|
+
|
|
44
|
+
The CI publish job comes from `ci/templates/node/npm-publish-public.yml`, stays manual on the repo `deploy` stage, runs from `plugin/opencode-wizard-skills` via `APP_ROOT`, builds the package with `npm run build --if-present`, deletes the inherited `@aexol` GitLab registry override, and then publishes `@aexol/opencode-wizard` with `npm publish --access public --registry https://registry.npmjs.org/`.
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { type Plugin } from '@opencode-ai/plugin';
|
|
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 PublishedSkillCatalogPayload = {
|
|
13
|
+
workspace: {
|
|
14
|
+
id: string;
|
|
15
|
+
slug: string;
|
|
16
|
+
name: string;
|
|
17
|
+
repositoryUrl?: string | null;
|
|
18
|
+
defaultBranch?: string | null;
|
|
19
|
+
status: string;
|
|
20
|
+
};
|
|
21
|
+
directoryPath: string;
|
|
22
|
+
skills: PublishedSkillCatalogItem[];
|
|
23
|
+
};
|
|
24
|
+
type PublishedSkillCatalogItem = {
|
|
25
|
+
assignmentSource: string;
|
|
26
|
+
assignmentType: string;
|
|
27
|
+
scopePath: string;
|
|
28
|
+
includeChildren?: boolean | null;
|
|
29
|
+
skill: {
|
|
30
|
+
id: string;
|
|
31
|
+
slug: string;
|
|
32
|
+
name: string;
|
|
33
|
+
summary?: string | null;
|
|
34
|
+
status: string;
|
|
35
|
+
tags: PublishedSkillTag[];
|
|
36
|
+
};
|
|
37
|
+
skillVersion: {
|
|
38
|
+
id: string;
|
|
39
|
+
version: string;
|
|
40
|
+
title?: string | null;
|
|
41
|
+
summary?: string | null;
|
|
42
|
+
status: string;
|
|
43
|
+
};
|
|
44
|
+
publishedArtifact: {
|
|
45
|
+
id: string;
|
|
46
|
+
frontmatterName: string;
|
|
47
|
+
frontmatterDescription: string;
|
|
48
|
+
checksum: string;
|
|
49
|
+
publishedAt: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
type PublishedSkillFacet = {
|
|
53
|
+
id: string;
|
|
54
|
+
slug: string;
|
|
55
|
+
label: string;
|
|
56
|
+
description?: string | null;
|
|
57
|
+
};
|
|
58
|
+
type PublishedSkillTag = {
|
|
59
|
+
id: string;
|
|
60
|
+
slug: string;
|
|
61
|
+
label: string;
|
|
62
|
+
description?: string | null;
|
|
63
|
+
facet?: PublishedSkillFacet | null;
|
|
64
|
+
};
|
|
65
|
+
type PublishedSkillFacetSummary = {
|
|
66
|
+
slug: string;
|
|
67
|
+
label: string;
|
|
68
|
+
description: string | null;
|
|
69
|
+
};
|
|
70
|
+
type PublishedSkillTagSummary = {
|
|
71
|
+
slug: string;
|
|
72
|
+
label: string;
|
|
73
|
+
description: string | null;
|
|
74
|
+
facet: PublishedSkillFacetSummary | null;
|
|
75
|
+
};
|
|
76
|
+
type PublishedSkillDetailItem = PublishedSkillCatalogItem & {
|
|
77
|
+
publishedArtifact: PublishedSkillCatalogItem['publishedArtifact'] & {
|
|
78
|
+
markdownBody: string;
|
|
79
|
+
renderedContent: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
type PublishedSkillSummary = {
|
|
83
|
+
skillSlug: string;
|
|
84
|
+
skillName: string;
|
|
85
|
+
artifactName: string;
|
|
86
|
+
artifactDescription: string;
|
|
87
|
+
version: string;
|
|
88
|
+
assignmentSource: string;
|
|
89
|
+
assignmentType: string;
|
|
90
|
+
scopePath: string;
|
|
91
|
+
includeChildren: boolean | null;
|
|
92
|
+
checksum: string;
|
|
93
|
+
publishedAt: string;
|
|
94
|
+
identifiers: string[];
|
|
95
|
+
tags: PublishedSkillTagSummary[];
|
|
96
|
+
};
|
|
97
|
+
type PublishedSkillDetail = PublishedSkillSummary & {
|
|
98
|
+
skillId: string;
|
|
99
|
+
skillVersionId: string;
|
|
100
|
+
artifactId: string;
|
|
101
|
+
markdownDocument: string;
|
|
102
|
+
markdownBody: string;
|
|
103
|
+
renderedContent: string;
|
|
104
|
+
};
|
|
105
|
+
type PublishedSkillsSuccessState = {
|
|
106
|
+
pluginId: string;
|
|
107
|
+
runtimeMode: 'tool_fetch_only';
|
|
108
|
+
workspace: PublishedSkillCatalogPayload['workspace'];
|
|
109
|
+
directoryPath: string;
|
|
110
|
+
rootSkillSeedPath: string;
|
|
111
|
+
availableTools: string[];
|
|
112
|
+
publishedSkillCount: number;
|
|
113
|
+
facets: PublishedSkillFacetSummary[];
|
|
114
|
+
skills: PublishedSkillSummary[];
|
|
115
|
+
};
|
|
116
|
+
export declare const resolveConfig: (worktree: string) => Promise<ResolvedConfig>;
|
|
117
|
+
export declare const buildSkillMarkdown: (item: PublishedSkillDetailItem) => string;
|
|
118
|
+
export declare const toPublishedSkillDetail: (item: PublishedSkillDetailItem) => PublishedSkillDetail;
|
|
119
|
+
export declare const toPublishedSkillCatalog: (payload: PublishedSkillCatalogPayload) => PublishedSkillsSuccessState;
|
|
120
|
+
export declare const selectPublishedSkills: <TItem extends PublishedSkillCatalogItem>(payload: Omit<PublishedSkillCatalogPayload, "skills"> & {
|
|
121
|
+
skills: TItem[];
|
|
122
|
+
}, identifiers: string[]) => {
|
|
123
|
+
selectedItems: TItem[];
|
|
124
|
+
missingIdentifiers: string[];
|
|
125
|
+
};
|
|
126
|
+
declare const _default: {
|
|
127
|
+
id: string;
|
|
128
|
+
server: Plugin;
|
|
129
|
+
};
|
|
130
|
+
export default _default;
|