@brainervirus/opencode-commandcode 0.9.0 → 0.9.1

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/CHANGELOG.md CHANGED
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.9.1] - 2026-09-27
11
+
10
12
  ## [0.9.0] - 2026-09-26
11
13
 
12
14
  ## [0.8.0] - 2026-09-26
package/README.md CHANGED
@@ -99,7 +99,7 @@ bun run catalog:ci # entry used by the catalog-sync workflow
99
99
 
100
100
  Entry points: `plugin.ts` owns all config-hook logic (dual default `{ id, setup }` plus `server`); `index.ts` re-exports the plugin plus the `createCommandCode` SDK factory; `src/entry.ts` is bundle glue for `scripts/build-plugin.ts` only — it produces `dist/plugin.js`.
101
101
 
102
- CI (`.github/workflows/catalog-sync.yml`) opens a `fix(catalog)` PR every 6 hours when Command Code ships a new catalog; if extraction fails it opens a `catalog-break` issue instead. The PR auto-merges after **check (test)**, **check (typecheck)**, **check (lint)**, **check (format)**, and **check (pack)** are green. `.github/workflows/release.yml` then runs **semantic-release** (npm publish + GitHub Release + tag). Do not push to `main`.
102
+ CI (`.github/workflows/catalog-sync.yml`) opens a `fix(catalog)` PR every 6 hours when Command Code ships a new catalog; if extraction fails it opens a `catalog-break` issue instead. The PR auto-merges after **check (test)**, **check (typecheck)**, **check (lint)**, **check (format)**, and **check (pack)** are green. `.github/workflows/release.yml` then runs **semantic-release** (build + verified npm publish + GitHub Release + tag). Do not push to `main`.
103
103
 
104
104
  The GitHub Actions secret name is `NPMJS`. It is mapped to both `NPM_TOKEN` and `NODE_AUTH_TOKEN`. Use an npm **Automation** token (bypasses 2FA). A login token from `~/.npmrc` fails CI with `EOTP`. Catalog PRs get a real CI run when `RELEASE_SYNC_TOKEN` is a PAT; `GITHUB_TOKEN` can open the PR but GitHub will not start workflows from that event.
105
105
 
@@ -0,0 +1,12 @@
1
+ import { CommandCodeLanguageModel } from "./src/model.js";
2
+ export { default, server } from "./plugin.js";
3
+ export interface CommandCodeProviderOptions {
4
+ name?: string;
5
+ apiKey?: string;
6
+ baseURL?: string;
7
+ headers?: Record<string, string>;
8
+ authPaths?: string[];
9
+ }
10
+ export declare function createCommandCode(options?: CommandCodeProviderOptions): {
11
+ languageModel(modelId: string): CommandCodeLanguageModel;
12
+ };
@@ -0,0 +1,45 @@
1
+ import { type ModelEntry } from "./src/catalog.js";
2
+ import { type EnvDeps } from "./src/env.js";
3
+ export type { ModelEntry };
4
+ export type CatalogLoad = {
5
+ models: ModelEntry[];
6
+ catalogSource: "bundled" | "cache" | "opt-in-local";
7
+ commandCodeVersion: string | null;
8
+ degraded: boolean;
9
+ degradedReason: string | null;
10
+ };
11
+ export declare function loadCatalogEntries(deps?: EnvDeps): CatalogLoad;
12
+ /** V1 entrypoint (OpenCode 1.18.29+ also accepts it via `server`). */
13
+ export declare function server(): Promise<{
14
+ config: (config: Record<string, unknown>) => Promise<void>;
15
+ auth: {
16
+ provider: string;
17
+ methods: {
18
+ type: string;
19
+ label: string;
20
+ authorize: (inputs: Record<string, unknown> | undefined) => Promise<{
21
+ type: "failed";
22
+ key?: undefined;
23
+ } | {
24
+ type: "success";
25
+ key: string;
26
+ }>;
27
+ }[];
28
+ loader: (getAuth: () => Promise<{
29
+ type: string;
30
+ key?: string;
31
+ } | null>) => Promise<{
32
+ apiKey?: undefined;
33
+ } | {
34
+ apiKey: string;
35
+ }>;
36
+ };
37
+ }>;
38
+ /** V2 setup: provider inventory + models through transforms. Auth stays V1-only for now. */
39
+ declare function setup(ctx: any): Promise<void>;
40
+ declare const _default: {
41
+ server: typeof server;
42
+ id: string;
43
+ setup: typeof setup;
44
+ };
45
+ export default _default;