@cotal-ai/connector-opencode 0.176.6 → 0.177.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/command-catalog.d.ts +4 -0
- package/dist/command-catalog.d.ts.map +1 -0
- package/dist/command-routes.d.ts +23 -0
- package/dist/command-routes.d.ts.map +1 -0
- package/dist/extension.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/plugin/docs-bundle.bin +0 -0
- package/dist/plugin/docs-index.bin +0 -0
- package/dist/plugin/index.js +8 -8
- package/dist/plugin2.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CommandCatalog, CommandListOpts } from "@cotal-ai/core";
|
|
2
|
+
/** `env` is the environment a seat's OpenCode gets, so the list comes from the same configuration. */
|
|
3
|
+
export declare function openCodeCommandCatalog(opts: CommandListOpts, env: Record<string, string>): Promise<CommandCatalog>;
|
|
4
|
+
//# sourceMappingURL=command-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-catalog.d.ts","sourceRoot":"","sources":["../src/command-catalog.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AA6DtE,sGAAsG;AACtG,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CA0BxH"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How OpenCode 2.x lists and runs commands and skills at its server: what a seat's plugin (plugin2.ts)
|
|
3
|
+
* lists and runs, and what the connector lists before launch (command-catalog.ts).
|
|
4
|
+
*/
|
|
5
|
+
import type { CommandEntry, CommandTarget } from "@cotal-ai/core";
|
|
6
|
+
/** How OpenCode lists and runs each command target, measured on 2.2.5. The field `key` of a listed
|
|
7
|
+
* entry is the name `run` sends, so a listed name is one a command runs. A built-in skill's `id`
|
|
8
|
+
* differs from its `name`, and `/prompt` attaches a skill by `id`. `loaded` is the event OpenCode
|
|
9
|
+
* emits once it loaded the list. */
|
|
10
|
+
export declare const COMMAND_ROUTES: Record<CommandTarget, {
|
|
11
|
+
list: string;
|
|
12
|
+
loaded: string;
|
|
13
|
+
key: "name" | "id";
|
|
14
|
+
run(name: string, args: string): [path: string, body: Record<string, unknown>];
|
|
15
|
+
}>;
|
|
16
|
+
/** How long the first list waits for OpenCode to load the lists. OpenCode loads a location's commands
|
|
17
|
+
* and skills on the first request for them, answers that request with what it already holds, and
|
|
18
|
+
* emits each list's `loaded` event once the load ended (measured on 2.2.5). */
|
|
19
|
+
export declare const LISTS_LOAD_MS = 3000;
|
|
20
|
+
/** Every command and skill the server lists now, each named as its route runs it. `get` answers a
|
|
21
|
+
* server path with the parsed reply. */
|
|
22
|
+
export declare function readCommandLists(get: (path: string) => Promise<unknown>): Promise<CommandEntry[]>;
|
|
23
|
+
//# sourceMappingURL=command-routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-routes.d.ts","sourceRoot":"","sources":["../src/command-routes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAElE;;;qCAGqC;AACrC,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,aAAa,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CAAE,CAGtL,CAAC;AAEF;;gFAEgF;AAChF,eAAO,MAAM,aAAa,OAAQ,CAAC;AAEnC;yCACyC;AACzC,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAavG"}
|
package/dist/extension.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,SAAS,EAA8F,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,SAAS,EAA8F,MAAM,gBAAgB,CAAC;AAgLtJ;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,EAAE,SA4L/B,CAAC"}
|