octto 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.
@@ -0,0 +1,337 @@
1
+ export interface BaseConfig {
2
+ /** Window title */
3
+ title?: string;
4
+ /** Timeout in seconds (0 = no timeout) */
5
+ timeout?: number;
6
+ /** Theme preference */
7
+ theme?: "light" | "dark" | "auto";
8
+ }
9
+ export interface Option {
10
+ /** Unique identifier */
11
+ id: string;
12
+ /** Display label */
13
+ label: string;
14
+ /** Optional description */
15
+ description?: string;
16
+ }
17
+ export interface OptionWithPros extends Option {
18
+ /** Pros/advantages */
19
+ pros?: string[];
20
+ /** Cons/disadvantages */
21
+ cons?: string[];
22
+ }
23
+ export interface RatedOption extends Option {
24
+ /** User's rating (filled after response) */
25
+ rating?: number;
26
+ }
27
+ export interface RankedOption extends Option {
28
+ /** User's rank position (filled after response) */
29
+ rank?: number;
30
+ }
31
+ export interface PickOneConfig extends BaseConfig {
32
+ /** Question/prompt to display */
33
+ question: string;
34
+ /** Available options */
35
+ options: Option[];
36
+ /** Recommended option id (highlighted) */
37
+ recommended?: string;
38
+ /** Allow custom "other" input */
39
+ allowOther?: boolean;
40
+ }
41
+ export interface PickManyConfig extends BaseConfig {
42
+ /** Question/prompt to display */
43
+ question: string;
44
+ /** Available options */
45
+ options: Option[];
46
+ /** Recommended option ids (highlighted) */
47
+ recommended?: string[];
48
+ /** Minimum selections required */
49
+ min?: number;
50
+ /** Maximum selections allowed */
51
+ max?: number;
52
+ /** Allow custom "other" input */
53
+ allowOther?: boolean;
54
+ }
55
+ export interface ConfirmConfig extends BaseConfig {
56
+ /** Question/prompt to display */
57
+ question: string;
58
+ /** Context/details to show */
59
+ context?: string;
60
+ /** Custom label for yes button */
61
+ yesLabel?: string;
62
+ /** Custom label for no button */
63
+ noLabel?: string;
64
+ /** Show cancel option */
65
+ allowCancel?: boolean;
66
+ }
67
+ export interface RankConfig extends BaseConfig {
68
+ /** Question/prompt to display */
69
+ question: string;
70
+ /** Items to rank */
71
+ options: Option[];
72
+ /** Context/instructions */
73
+ context?: string;
74
+ }
75
+ export interface RateConfig extends BaseConfig {
76
+ /** Question/prompt to display */
77
+ question: string;
78
+ /** Items to rate */
79
+ options: Option[];
80
+ /** Minimum rating value */
81
+ min?: number;
82
+ /** Maximum rating value */
83
+ max?: number;
84
+ /** Rating step (default 1) */
85
+ step?: number;
86
+ /** Labels for min/max */
87
+ labels?: {
88
+ min?: string;
89
+ max?: string;
90
+ };
91
+ }
92
+ export interface AskTextConfig extends BaseConfig {
93
+ /** Question/prompt to display */
94
+ question: string;
95
+ /** Placeholder text */
96
+ placeholder?: string;
97
+ /** Context/instructions */
98
+ context?: string;
99
+ /** Multi-line input */
100
+ multiline?: boolean;
101
+ /** Minimum length */
102
+ minLength?: number;
103
+ /** Maximum length */
104
+ maxLength?: number;
105
+ }
106
+ export interface AskImageConfig extends BaseConfig {
107
+ /** Question/prompt to display */
108
+ question: string;
109
+ /** Context/instructions */
110
+ context?: string;
111
+ /** Allow multiple images */
112
+ multiple?: boolean;
113
+ /** Maximum number of images */
114
+ maxImages?: number;
115
+ /** Allowed mime types */
116
+ accept?: string[];
117
+ }
118
+ export interface AskFileConfig extends BaseConfig {
119
+ /** Question/prompt to display */
120
+ question: string;
121
+ /** Context/instructions */
122
+ context?: string;
123
+ /** Allow multiple files */
124
+ multiple?: boolean;
125
+ /** Maximum number of files */
126
+ maxFiles?: number;
127
+ /** Allowed file extensions or mime types */
128
+ accept?: string[];
129
+ /** Maximum file size in bytes */
130
+ maxSize?: number;
131
+ }
132
+ export interface AskCodeConfig extends BaseConfig {
133
+ /** Question/prompt to display */
134
+ question: string;
135
+ /** Context/instructions */
136
+ context?: string;
137
+ /** Programming language for syntax highlighting */
138
+ language?: string;
139
+ /** Placeholder code */
140
+ placeholder?: string;
141
+ }
142
+ export interface ShowDiffConfig extends BaseConfig {
143
+ /** Title/description of the change */
144
+ question: string;
145
+ /** Original content */
146
+ before: string;
147
+ /** Modified content */
148
+ after: string;
149
+ /** File path (for context) */
150
+ filePath?: string;
151
+ /** Language for syntax highlighting */
152
+ language?: string;
153
+ }
154
+ export interface PlanSection {
155
+ /** Section identifier */
156
+ id: string;
157
+ /** Section title */
158
+ title: string;
159
+ /** Section content (markdown) */
160
+ content: string;
161
+ }
162
+ export interface ShowPlanConfig extends BaseConfig {
163
+ /** Plan title */
164
+ question: string;
165
+ /** Plan sections */
166
+ sections: PlanSection[];
167
+ /** Full markdown (alternative to sections) */
168
+ markdown?: string;
169
+ }
170
+ export interface ShowOptionsConfig extends BaseConfig {
171
+ /** Question/prompt to display */
172
+ question: string;
173
+ /** Options with pros/cons */
174
+ options: OptionWithPros[];
175
+ /** Recommended option id */
176
+ recommended?: string;
177
+ /** Allow text feedback with selection */
178
+ allowFeedback?: boolean;
179
+ }
180
+ export interface ReviewSectionConfig extends BaseConfig {
181
+ /** Section title */
182
+ question: string;
183
+ /** Section content (markdown) */
184
+ content: string;
185
+ /** Context about what to review */
186
+ context?: string;
187
+ }
188
+ export interface ThumbsConfig extends BaseConfig {
189
+ /** Question/prompt to display */
190
+ question: string;
191
+ /** Context to show */
192
+ context?: string;
193
+ }
194
+ export interface EmojiReactConfig extends BaseConfig {
195
+ /** Question/prompt to display */
196
+ question: string;
197
+ /** Context to show */
198
+ context?: string;
199
+ /** Available emoji options (default: common set) */
200
+ emojis?: string[];
201
+ }
202
+ export interface SliderConfig extends BaseConfig {
203
+ /** Question/prompt to display */
204
+ question: string;
205
+ /** Context/instructions */
206
+ context?: string;
207
+ /** Minimum value */
208
+ min: number;
209
+ /** Maximum value */
210
+ max: number;
211
+ /** Step size */
212
+ step?: number;
213
+ /** Default value */
214
+ defaultValue?: number;
215
+ /** Labels for values */
216
+ labels?: {
217
+ min?: string;
218
+ max?: string;
219
+ mid?: string;
220
+ };
221
+ }
222
+ export interface BaseResponse {
223
+ /** Whether the interaction completed (false if cancelled/timeout) */
224
+ completed: boolean;
225
+ /** Cancellation reason if not completed */
226
+ cancelReason?: "timeout" | "cancelled" | "closed";
227
+ }
228
+ export interface PickOneResponse extends BaseResponse {
229
+ /** Selected option id */
230
+ selected?: string;
231
+ /** Custom "other" value if provided */
232
+ other?: string;
233
+ }
234
+ export interface PickManyResponse extends BaseResponse {
235
+ /** Selected option ids */
236
+ selected: string[];
237
+ /** Custom "other" values if provided */
238
+ other?: string[];
239
+ }
240
+ export interface ConfirmResponse extends BaseResponse {
241
+ /** User's choice */
242
+ choice?: "yes" | "no" | "cancel";
243
+ }
244
+ export interface RankResponse extends BaseResponse {
245
+ /** Option ids in ranked order (first = highest) */
246
+ ranking: string[];
247
+ }
248
+ export interface RateResponse extends BaseResponse {
249
+ /** Ratings by option id */
250
+ ratings: Record<string, number>;
251
+ }
252
+ export interface AskTextResponse extends BaseResponse {
253
+ /** User's text input */
254
+ text?: string;
255
+ }
256
+ export interface AskImageResponse extends BaseResponse {
257
+ /** Image data */
258
+ images: Array<{
259
+ /** Original filename */
260
+ filename: string;
261
+ /** Mime type */
262
+ mimeType: string;
263
+ /** Base64 encoded data */
264
+ data: string;
265
+ }>;
266
+ /** File paths (if provided instead of upload) */
267
+ paths?: string[];
268
+ }
269
+ export interface AskFileResponse extends BaseResponse {
270
+ /** File data */
271
+ files: Array<{
272
+ /** Original filename */
273
+ filename: string;
274
+ /** Mime type */
275
+ mimeType: string;
276
+ /** Base64 encoded data */
277
+ data: string;
278
+ }>;
279
+ /** File paths (if provided instead of upload) */
280
+ paths?: string[];
281
+ }
282
+ export interface AskCodeResponse extends BaseResponse {
283
+ /** User's code input */
284
+ code?: string;
285
+ /** Detected/selected language */
286
+ language?: string;
287
+ }
288
+ export interface ShowDiffResponse extends BaseResponse {
289
+ /** User's decision */
290
+ decision?: "approve" | "reject" | "edit";
291
+ /** User's edited version (if decision is "edit") */
292
+ edited?: string;
293
+ /** Optional feedback */
294
+ feedback?: string;
295
+ }
296
+ export interface Annotation {
297
+ /** Annotation id */
298
+ id: string;
299
+ /** Section id or line range */
300
+ target: string;
301
+ /** Annotation type */
302
+ type: "comment" | "suggest" | "delete" | "approve";
303
+ /** Annotation content */
304
+ content?: string;
305
+ }
306
+ export interface ShowPlanResponse extends BaseResponse {
307
+ /** User's decision */
308
+ decision?: "approve" | "reject" | "revise";
309
+ /** User annotations */
310
+ annotations: Annotation[];
311
+ /** Overall feedback */
312
+ feedback?: string;
313
+ }
314
+ export interface ShowOptionsResponse extends BaseResponse {
315
+ /** Selected option id */
316
+ selected?: string;
317
+ /** Optional feedback text */
318
+ feedback?: string;
319
+ }
320
+ export interface ReviewSectionResponse extends BaseResponse {
321
+ /** User's decision */
322
+ decision?: "approve" | "revise";
323
+ /** Inline feedback/suggestions */
324
+ feedback?: string;
325
+ }
326
+ export interface ThumbsResponse extends BaseResponse {
327
+ /** User's choice */
328
+ choice?: "up" | "down";
329
+ }
330
+ export interface EmojiReactResponse extends BaseResponse {
331
+ /** Selected emoji */
332
+ emoji?: string;
333
+ }
334
+ export interface SliderResponse extends BaseResponse {
335
+ /** Selected value */
336
+ value?: number;
337
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Returns the bundled HTML for the octto UI.
3
+ * Uses nof1 design system - IBM Plex Mono, terminal aesthetic.
4
+ */
5
+ export declare function getHtmlBundle(): string;
@@ -0,0 +1 @@
1
+ export { getHtmlBundle } from "./bundle";
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "octto",
3
+ "version": "0.1.0",
4
+ "description": "OpenCode plugin that turns rough ideas into designs through branch-based exploration",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "type": "module",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js"
15
+ }
16
+ },
17
+ "scripts": {
18
+ "prepare": "lefthook install",
19
+ "build": "bun build src/index.ts --outdir dist --target bun --format esm && tsc --emitDeclarationOnly",
20
+ "clean": "rm -rf dist",
21
+ "typecheck": "tsc --noEmit",
22
+ "prepublishOnly": "bun run clean && bun run build",
23
+ "test": "bun test",
24
+ "test:watch": "bun test --watch",
25
+ "format": "biome format --write .",
26
+ "lint": "biome lint .",
27
+ "check": "biome check ."
28
+ },
29
+ "keywords": [
30
+ "opencode",
31
+ "plugin",
32
+ "octto",
33
+ "brainstorm",
34
+ "interactive",
35
+ "ui"
36
+ ],
37
+ "author": "vtemian",
38
+ "license": "MIT",
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "https://github.com/vtemian/octto.git"
42
+ },
43
+ "dependencies": {
44
+ "@opencode-ai/plugin": "1.0.223",
45
+ "valibot": "^1.2.0",
46
+ "zod": "^4.3.5"
47
+ },
48
+ "devDependencies": {
49
+ "@biomejs/biome": "^2.3.10",
50
+ "bun-types": "latest",
51
+ "lefthook": "^2.0.13",
52
+ "typescript": "^5.7.3"
53
+ }
54
+ }