opencode-drive 0.1.6 → 0.1.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "opencode-drive",
4
- "version": "0.1.6",
4
+ "version": "0.1.7",
5
5
  "description": "Drive real and simulated OpenCode instances",
6
6
  "license": "MIT",
7
7
  "type": "module",
package/src/cli/index.ts CHANGED
@@ -3,7 +3,6 @@ import { NodeRuntime, NodeServices } from "@effect/platform-node"
3
3
  import { Effect, Option } from "effect"
4
4
  import { Command, Flag } from "effect/unstable/cli"
5
5
  import packageJson from "../../package.json" with { type: "json" }
6
- import { api } from "./api.js"
7
6
  import { extractCommands } from "./parse.js"
8
7
  import { list } from "./list.js"
9
8
  import { logs } from "./logs.js"
@@ -127,10 +126,6 @@ const endRecordingCommand = Command.make(
127
126
  ),
128
127
  ).pipe(Command.withDescription("Stop recording and print its path"))
129
128
 
130
- const apiCommand = Command.make("api", {}, () => execute(api)).pipe(
131
- Command.withDescription("Print the OpenCode drive UI protocol"),
132
- )
133
-
134
129
  const restartCommand = Command.make("restart", { name }, (config) =>
135
130
  execute(() => restart(Option.getOrUndefined(config.name))),
136
131
  ).pipe(
@@ -187,7 +182,6 @@ const root = Command.make("opencode-drive").pipe(
187
182
  logsCommand,
188
183
  restartCommand,
189
184
  stopCommand,
190
- apiCommand,
191
185
  ]),
192
186
  )
193
187
 
package/src/cli/api.ts DELETED
@@ -1,5 +0,0 @@
1
- import { resolve } from "node:path"
2
-
3
- export async function api() {
4
- process.stdout.write(await Bun.file(resolve(import.meta.dir, "..", "client", "protocol.types.ts")).text())
5
- }
@@ -1,62 +0,0 @@
1
- // CLI command contract for `opencode-drive send`.
2
-
3
- export type Json =
4
- null | boolean | number | string | Json[] | { [key: string]: Json }
5
-
6
- export type KeyModifiers = {
7
- ctrl?: boolean
8
- shift?: boolean
9
- meta?: boolean
10
- super?: boolean
11
- hyper?: boolean
12
- }
13
-
14
- export type Element = {
15
- id: string
16
- num: number
17
- x: number
18
- y: number
19
- width: number
20
- height: number
21
- focusable: boolean
22
- focused: boolean
23
- clickable: boolean
24
- editor: boolean
25
- }
26
-
27
- export type State = {
28
- focused: {
29
- renderable?: number
30
- editor: boolean
31
- }
32
- elements: Element[]
33
- }
34
-
35
- export type Command =
36
- | { name: "ui.type"; params: { text: string }; result: State }
37
- | {
38
- name: "ui.press"
39
- params: { key: string; modifiers?: KeyModifiers }
40
- result: State
41
- }
42
- | { name: "ui.enter"; result: State }
43
- | {
44
- name: "ui.arrow"
45
- params: { direction: "up" | "down" | "left" | "right" }
46
- result: State
47
- }
48
- | { name: "ui.focus"; params: { target: number }; result: State }
49
- | {
50
- name: "ui.click"
51
- params: { target: number; x: number; y: number }
52
- result: State
53
- }
54
- | { name: "ui.screenshot"; result: string }
55
- | { name: "ui.state"; result: State }
56
- | { name: "ui.start-record"; result: { recording: true } }
57
- | { name: "ui.end-record"; result: string }
58
-
59
- // Commands with `params` take one JSON argument:
60
- // --command.ui.type '{"text":"hello"}'
61
- // Commands without `params` are flags:
62
- // --command.ui.enter