fixate-on 0.0.0-stage → 0.1.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/tui-v2.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Type declarations for the OpenCode v2 TUI companion entrypoint
3
+ * (`fixate-on/tui-v2`).
4
+ *
5
+ * The v2 host supplies its Context implementation. The plugin deliberately
6
+ * accepts an opaque context here so this package remains compatible with host
7
+ * SDK releases whose v2 context types are not yet published.
8
+ */
9
+
10
+ /** The v2 TUI plugin context supplied by the OpenCode host. */
11
+ export type GoalTuiPluginV2Context = unknown;
12
+
13
+ /** The v2 TUI plugin module's setup function. */
14
+ export type GoalTuiPluginV2Setup = (
15
+ context: GoalTuiPluginV2Context,
16
+ ) => Promise<void | (() => void)>;
17
+
18
+ /** Named v2 plugin export consumed by integrations. */
19
+ export declare const GoalTuiPluginV2: {
20
+ id: 'fixate-on-tui';
21
+ setup: GoalTuiPluginV2Setup;
22
+ };
23
+
24
+ /** Default export consumed by the OpenCode v2 TUI plugin loader. */
25
+ declare const goalTuiPluginV2Module: typeof GoalTuiPluginV2;
26
+
27
+ export default goalTuiPluginV2Module;
package/tui.d.ts ADDED
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Type declarations for the TUI companion entrypoint (`fixate-on/tui`).
3
+ *
4
+ * The TUI companion is a separate `TuiPluginModule` (has `tui`, no `server`),
5
+ * mutually exclusive with the server `PluginModule` in `index.d.ts`. Register
6
+ * both as separate plugin entries in `opencode.json`:
7
+ *
8
+ * ```json
9
+ * "plugin": [
10
+ * "fixate-on",
11
+ * ["fixate-on/tui", { "logLevel": "info" }]
12
+ * ]
13
+ * ```
14
+ */
15
+
16
+ /**
17
+ * Options for the TUI companion plugin. All fields are optional — the TUI
18
+ * works with zero configuration.
19
+ */
20
+ export interface GoalTuiPluginOptions {
21
+ /**
22
+ * Log verbosity for the TUI companion. `"error"` logs only failures;
23
+ * `"info"` logs initialization and event subscription; `"debug"` logs every
24
+ * applied event. @default "info"
25
+ */
26
+ logLevel?: 'error' | 'info' | 'debug';
27
+
28
+ /**
29
+ * Workspace directory to scan for persisted goal state. Defaults to the
30
+ * process working directory.
31
+ */
32
+ directory?: string;
33
+ }
34
+
35
+ /**
36
+ * The TUI companion plugin function. Called by OpenCode's TUI plugin loader
37
+ * when `fixate-on/tui` is registered. Subscribes to host events,
38
+ * feeds them into the shared TuiStateStore, and exposes the store for view
39
+ * components and keymap handlers.
40
+ */
41
+ export declare function GoalTuiPlugin(
42
+ api: unknown,
43
+ options?: GoalTuiPluginOptions,
44
+ meta?: unknown,
45
+ ): Promise<void>;
46
+
47
+ /**
48
+ * Default export consumed by OpenCode's TUI plugin loader:
49
+ * `{ "fixate-on/tui": { ... } }` in `opencode.json` resolves `id`
50
+ * and calls `tui` to initialize the TUI companion.
51
+ */
52
+ declare const goalTuiPluginModule: {
53
+ id: 'fixate-on-tui';
54
+ tui: typeof GoalTuiPlugin;
55
+ };
56
+
57
+ export default goalTuiPluginModule;