@jeffreyjyz/opencode-command-code 0.3.18 → 0.4.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/dist/access.d.ts +2 -1
- package/dist/api.d.ts +0 -1
- package/dist/catalog.d.ts +1 -1
- package/dist/constants/binaries.d.ts +6 -0
- package/dist/constants/cli.d.ts +12 -0
- package/dist/constants/endpoints.d.ts +6 -0
- package/dist/constants/gating.d.ts +22 -0
- package/dist/constants/models.d.ts +29 -0
- package/dist/constants/paths.d.ts +18 -0
- package/dist/constants/providers.d.ts +28 -0
- package/dist/constants/sidebar.d.ts +33 -0
- package/dist/constants/timing.d.ts +13 -0
- package/dist/gating.d.ts +1 -19
- package/dist/index.d.ts +2 -2
- package/dist/index.js +242 -85
- package/dist/provider/index.d.ts +0 -1
- package/dist/sidebar/data.d.ts +13 -10
- package/dist/sidebar/prefs.d.ts +5 -3
- package/dist/sidebar/rows.d.ts +15 -4
- package/dist/sidebar/useRows.d.ts +11 -6
- package/dist/sidebar/windows.d.ts +0 -4
- package/dist/sidebar/zen.d.ts +0 -6
- package/dist/tui.d.ts +1 -1
- package/dist/tui.js +246 -91
- package/dist/v2.d.ts +2 -16
- package/package.json +46 -46
- package/tui.js +1 -1
package/dist/v2.d.ts
CHANGED
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
import type { Plugin as PluginNs } from "@opencode/plugin";
|
|
2
|
+
import { type Lane } from "./constants/providers";
|
|
2
3
|
import { type CmdModel } from "./models";
|
|
3
|
-
export declare const PLUGIN_ID = "command-code";
|
|
4
|
-
export declare const PROVIDER_BASE = "https://api.commandcode.ai/provider/v1";
|
|
5
|
-
/** Shared integration backing both lanes' credentials (/connect + env). */
|
|
6
|
-
export declare const INTEGRATION_ID = "command-code";
|
|
7
|
-
export declare const INTEGRATION_NAME = "Command Code";
|
|
8
|
-
type Lane = {
|
|
9
|
-
id: "command-code-anthropic" | "command-code-openai";
|
|
10
|
-
name: string;
|
|
11
|
-
/** v2 runtime package (first-party, distinct from the v1 `npm` value). */
|
|
12
|
-
pkg: string;
|
|
13
|
-
/** Wire field reasoning must round-trip through on the openai-compatible
|
|
14
|
-
* lane; v2 spells the old `interleaved: {field}` as `compatibility`. */
|
|
15
|
-
reasoningField?: string;
|
|
16
|
-
};
|
|
17
|
-
export type { Lane };
|
|
18
|
-
export declare const TOOL_DESCRIPTION = "Fetch live Command Code plan/usage: plan name, monthly credits, 5-hour & weekly windows, billing-period summary. Pass arg='plans' for the plan comparison table only, or extra cmduse flags (e.g. '--tz +05:30 daily').";
|
|
19
4
|
/** API/known model → v2 Model.Info. Capabilities, variants and $/1M cost all
|
|
20
5
|
* come from the generated catalog (the listing API publishes none of them);
|
|
21
6
|
* only the open lane needs the reasoning round-trip field. */
|
|
@@ -51,3 +36,4 @@ export declare function credentialKey(ctx: CredentialContext): Promise<string |
|
|
|
51
36
|
* own rewrite list (@opentui/*, solid-js).
|
|
52
37
|
*/
|
|
53
38
|
export declare const commandCodeV2: PluginNs.Plugin;
|
|
39
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
2
|
+
"name": "@jeffreyjyz/opencode-command-code",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Command Code provider + usage dashboard for opencode: two providers (Anthropic wire for Claude, OpenAI wire for everything else) against api.commandcode.ai, live model list, plan gating, /cmd-usage. Requires the cmduse CLI for usage rendering.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/index.js",
|
|
10
|
+
"./tui": "./dist/tui.js"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "rm -rf dist && bun build src/index.ts --outdir dist --target bun --external @opencode-ai/plugin --external @opencode/plugin --external @opencode/plugin/tui && bun scripts/build-tui.ts && tsc -p tsconfig.build.json",
|
|
14
|
+
"test": "bun test",
|
|
15
|
+
"typecheck": "tsc --noEmit",
|
|
16
|
+
"build:tui": "bun scripts/build-tui.ts",
|
|
17
|
+
"extract:catalog": "bun scripts/extract-catalog.ts"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@opentui/core": "^0.5.4",
|
|
21
|
+
"@opentui/solid": "^0.5.4",
|
|
22
|
+
"solid-js": "1.9.12",
|
|
23
|
+
"zod": "4.1.8"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/bun": "latest",
|
|
27
|
+
"typescript": "^7",
|
|
28
|
+
"@opencode-ai/plugin": "*",
|
|
29
|
+
"@opencode/plugin": "^2.0.11",
|
|
30
|
+
"@ai-sdk/provider": "3.0.8"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"tui.js",
|
|
35
|
+
"LICENSE"
|
|
36
|
+
],
|
|
37
|
+
"keywords": [
|
|
38
|
+
"opencode",
|
|
39
|
+
"command-code",
|
|
40
|
+
"plugin",
|
|
41
|
+
"provider",
|
|
42
|
+
"ai-sdk"
|
|
43
|
+
],
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
}
|
|
48
48
|
}
|
package/tui.js
CHANGED