fixate-on 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +396 -2
- package/completion-verdict.schema.json +52 -0
- package/docs/tui-integration.md +75 -0
- package/index.d.ts +608 -0
- package/package.json +121 -4
- package/plugin/fixate-on/plugin.js +15171 -0
- package/plugin/fixate-on/tui.js +4499 -0
- package/tui.d.ts +75 -0
package/tui.d.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type declarations for the TUI companion entrypoint (`fixate-on/tui`).
|
|
3
|
+
*
|
|
4
|
+
* The default export serves both host generations: OpenCode 1.x calls `tui`,
|
|
5
|
+
* OpenCode 2.x calls `setup`. Configure it by package name, never by subpath:
|
|
6
|
+
*
|
|
7
|
+
* - 1.x: `"plugin": ["fixate-on"]` in `tui.json`
|
|
8
|
+
* - 2.x: loaded automatically with the server plugin; `cli.json` is optional
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** The v2 TUI plugin context supplied by the OpenCode host. */
|
|
12
|
+
export type GoalTuiPluginV2Context = unknown;
|
|
13
|
+
|
|
14
|
+
/** The v2 TUI plugin module's setup function. */
|
|
15
|
+
export type GoalTuiPluginV2Setup = (
|
|
16
|
+
context: GoalTuiPluginV2Context,
|
|
17
|
+
) => Promise<void | (() => void)>;
|
|
18
|
+
|
|
19
|
+
/** Named v2 plugin export consumed by integrations. */
|
|
20
|
+
export declare const GoalTuiPluginV2: {
|
|
21
|
+
id: 'fixate-on-tui';
|
|
22
|
+
setup: GoalTuiPluginV2Setup;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Options for the TUI companion plugin. All fields are optional — the TUI
|
|
27
|
+
* works with zero configuration.
|
|
28
|
+
*/
|
|
29
|
+
export interface GoalTuiPluginOptions {
|
|
30
|
+
/**
|
|
31
|
+
* Log verbosity for the TUI companion. `"error"` logs only failures;
|
|
32
|
+
* `"info"` logs initialization and event subscription; `"debug"` logs every
|
|
33
|
+
* applied event. @default "info"
|
|
34
|
+
*/
|
|
35
|
+
logLevel?: 'error' | 'info' | 'debug';
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Workspace directory to scan for persisted goal state. Defaults to the
|
|
39
|
+
* process working directory.
|
|
40
|
+
*/
|
|
41
|
+
directory?: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Where goal state lives, relative to the workspace or absolute. On 1.x, set
|
|
45
|
+
* it to match the server plugin's `stateRoot`. On 2.x the companion asks the
|
|
46
|
+
* server plugin instead, and a value here overrides that answer.
|
|
47
|
+
*/
|
|
48
|
+
stateRoot?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The 1.x TUI companion function. Called by the OpenCode 1.x TUI plugin loader
|
|
53
|
+
* when `fixate-on` is registered in `tui.json`. Subscribes to host events,
|
|
54
|
+
* feeds them into the shared TuiStateStore, and exposes the store for view
|
|
55
|
+
* components and keymap handlers.
|
|
56
|
+
*/
|
|
57
|
+
export declare function GoalTuiPlugin(
|
|
58
|
+
api: unknown,
|
|
59
|
+
options?: GoalTuiPluginOptions,
|
|
60
|
+
meta?: unknown,
|
|
61
|
+
): Promise<void>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Default export consumed by both TUI plugin loaders. Each host reads its own
|
|
65
|
+
* entrypoint and ignores the other.
|
|
66
|
+
*/
|
|
67
|
+
declare const goalTuiPluginModule: {
|
|
68
|
+
id: 'fixate-on-tui';
|
|
69
|
+
/** OpenCode 1.x entrypoint. */
|
|
70
|
+
tui: typeof GoalTuiPlugin;
|
|
71
|
+
/** OpenCode 2.x entrypoint. */
|
|
72
|
+
setup: GoalTuiPluginV2Setup;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export default goalTuiPluginModule;
|