@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.
package/README.md CHANGED
@@ -1,16 +1,19 @@
1
1
  # @aexol/opencode-wizard
2
2
 
3
- `@aexol/opencode-wizard` is a separately releasable OpenCode server plugin package for fetching published skills from the opencode-wizard backend runtime.
3
+ `@aexol/opencode-wizard` is a separately releasable OpenCode plugin package for fetching published skills from the opencode-wizard backend runtime and surfacing plugin status in the TUI.
4
4
 
5
5
  ## Package target
6
6
 
7
- - `oc-plugin: ["server"]`
7
+ - `oc-plugin: ["server", "tui"]`
8
8
  - `./server` → `dist/server.js`
9
+ - `./tui` → `dist/tui.js`
9
10
  - no generated runtime skill directory is published; the plugin stays fetch-only at runtime
11
+ - native OpenCode `skills.urls` is treated as a public/static registry complement, not as the private wizard delivery authority
12
+ - the TUI shows loaded plugins, current paths, backend/auth status without tokens, available tools, `skills.urls` guidance, the backend-published GLOBAL/PROJECT delivery model, policy labels, and catalog counts/names when passive fetch succeeds
10
13
 
11
14
  ## Local development
12
15
 
13
- This monorepo still path-loads the same package from `./plugin/opencode-wizard-skills` during local OpenCode development.
16
+ This monorepo still path-loads the same package from `./plugin/opencode-wizard` during local OpenCode development.
14
17
 
15
18
  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
19
 
@@ -34,11 +37,27 @@ OpenCode server/plugin host can install the published package by package name in
34
37
 
35
38
  For repo-local development, continue using the local path-based config already documented in this repository.
36
39
 
40
+ ## Native `skills.urls` compatibility
41
+
42
+ OpenCode's native `skills.urls` support downloads public/static skill registries from base URLs that expose an `index.json` and file paths under that base URL. Current support has no plugin session/header integration, so it must not be pointed at private opencode-wizard skill delivery.
43
+
44
+ Use `skills.urls` only for public registries that are intentionally cacheable by OpenCode. Private workspace-scoped wizard skills remain authenticated and directory-scoped through `opencode_wizard_published_skills_fetch`.
45
+
46
+ ## Catalog discovery and auth bootstrap
47
+
48
+ On chat/system-context startup, the plugin attempts to load the catalog automatically with the stored plugin session at `plugin/opencode-wizard/.generated/auth-state.json`. If no valid plugin session exists, startup stays passive and reports that interactive fetch will bootstrap browser login when needed; it does not open the browser from system context.
49
+
50
+ 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
+ No-arg discovery returns published skill summaries, assignment counts split into `global` and `project`, policy metadata, and no markdown bodies. Existing `skill` and `skills` calls still fetch one or more full skill body/detail payloads by slug, artifact name, or skill name.
53
+
54
+ `GLOBAL_CONTEXT` skills are active context skills and are not meant to be installed per project. `PROJECT_INSTALLABLE` skills are gallery/installable skills that may be attached globally or to a workspace/path through assignment records; those assignments remain the source of truth for what is active in a catalog response.
55
+
37
56
  ## Release flow
38
57
 
39
- 1. Bump `version` in `plugin/opencode-wizard-skills/package.json`.
58
+ 1. Bump `version` in `plugin/opencode-wizard/package.json`.
40
59
  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>`.
60
+ 3. If you are following the repo release-tag convention, create Git tag `plugin-opencode-wizard-v<version>`.
42
61
  4. Push the release commit/tag so GitLab can run the shared npm public publish job.
43
62
 
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/`.
63
+ 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` 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/package.json CHANGED
@@ -1,15 +1,20 @@
1
1
  {
2
2
  "name": "@aexol/opencode-wizard",
3
- "version": "0.1.0",
4
- "description": "OpenCode server plugin for opencode-wizard published skills",
3
+ "version": "0.1.2",
4
+ "description": "OpenCode plugin for opencode-wizard published skills",
5
5
  "type": "module",
6
6
  "oc-plugin": [
7
- "server"
7
+ "server",
8
+ "tui"
8
9
  ],
9
10
  "exports": {
10
11
  "./server": {
11
12
  "default": "./dist/server.js",
12
13
  "types": "./dist/server.d.ts"
14
+ },
15
+ "./tui": {
16
+ "default": "./dist/tui.js",
17
+ "types": "./dist/tui.d.ts"
13
18
  }
14
19
  },
15
20
  "files": [
@@ -17,7 +22,7 @@
17
22
  ],
18
23
  "scripts": {
19
24
  "release:check": "npm run typecheck && npm run build",
20
- "build": "tsc -p tsconfig.json",
25
+ "build": "node ./build.mjs",
21
26
  "typecheck": "tsc --noEmit -p tsconfig.json",
22
27
  "smoke:published-skills": "node ./dist/smoke-published-skills.js"
23
28
  },
@@ -27,7 +32,7 @@
27
32
  "repository": {
28
33
  "type": "git",
29
34
  "url": "git+https://gitlab.com/aexol/open-source/opencode-wizard.git",
30
- "directory": "plugin/opencode-wizard-skills"
35
+ "directory": "plugin/opencode-wizard"
31
36
  },
32
37
  "keywords": [
33
38
  "opencode",
@@ -40,10 +45,16 @@
40
45
  "opencode": ">=1.14.18 <2"
41
46
  },
42
47
  "dependencies": {
43
- "@opencode-ai/plugin": "^1.14.18"
48
+ "@opencode-ai/plugin": "^1.14.18",
49
+ "@opentui/core": "0.1.103",
50
+ "@opentui/solid": "0.1.103",
51
+ "solid-js": "1.9.11"
44
52
  },
45
53
  "devDependencies": {
54
+ "@babel/core": "^7.28.4",
55
+ "@babel/preset-typescript": "^7.27.1",
46
56
  "@types/node": "^22.12.0",
57
+ "babel-preset-solid": "1.9.10",
47
58
  "typescript": "^5.9.2"
48
59
  }
49
60
  }
package/dist/server.d.ts DELETED
@@ -1,130 +0,0 @@
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;