oh-my-opencode-slim 1.0.5 → 1.0.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/README.md +25 -18
- package/dist/cli/divoom.d.ts +23 -0
- package/dist/cli/doctor.d.ts +38 -0
- package/dist/cli/index.js +306 -14
- package/dist/cli/providers.d.ts +3 -0
- package/dist/config/council-schema.d.ts +2 -2
- package/dist/config/index.d.ts +1 -1
- package/dist/config/loader.d.ts +46 -1
- package/dist/config/schema.d.ts +23 -1
- package/dist/divoom/council.gif +0 -0
- package/dist/divoom/designer.gif +0 -0
- package/dist/divoom/explorer.gif +0 -0
- package/dist/divoom/fixer.gif +0 -0
- package/dist/divoom/input.gif +0 -0
- package/dist/divoom/intro.gif +0 -0
- package/dist/divoom/librarian.gif +0 -0
- package/dist/divoom/manager.d.ts +57 -0
- package/dist/divoom/oracle.gif +0 -0
- package/dist/divoom/orchestrator.gif +0 -0
- package/dist/hooks/auto-update-checker/types.d.ts +0 -1
- package/dist/index.js +844 -270
- package/dist/integrations/divoom/index.d.ts +3 -0
- package/dist/integrations/divoom/status-manager.d.ts +31 -0
- package/dist/integrations/divoom/swift-helper-source.d.ts +1 -0
- package/dist/integrations/divoom/swift-transport.d.ts +26 -0
- package/dist/integrations/divoom/types.d.ts +41 -0
- package/dist/multiplexer/tmux/index.d.ts +5 -0
- package/dist/tools/council.d.ts +2 -2
- package/dist/tui-state.d.ts +15 -0
- package/dist/tui.d.ts +4 -0
- package/dist/tui.js +787 -9
- package/dist/utils/session.d.ts +10 -4
- package/oh-my-opencode-slim.schema.json +59 -4
- package/package.json +3 -2
package/dist/config/loader.d.ts
CHANGED
|
@@ -1,4 +1,48 @@
|
|
|
1
1
|
import { type PluginConfig } from './schema';
|
|
2
|
+
/**
|
|
3
|
+
* Warning kinds produced during config loading.
|
|
4
|
+
*/
|
|
5
|
+
export type ConfigLoadWarningKind = 'invalid-json' | 'invalid-schema' | 'read-error' | 'missing-preset';
|
|
6
|
+
/**
|
|
7
|
+
* A warning emitted while loading plugin configuration.
|
|
8
|
+
*/
|
|
9
|
+
export interface ConfigLoadWarning {
|
|
10
|
+
path: string;
|
|
11
|
+
kind: ConfigLoadWarningKind;
|
|
12
|
+
message: string;
|
|
13
|
+
formatted?: unknown;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Options for loadPluginConfig.
|
|
17
|
+
*/
|
|
18
|
+
export interface LoadPluginConfigOptions {
|
|
19
|
+
/**
|
|
20
|
+
* Called with a warning whenever config loading produces a non-fatal issue.
|
|
21
|
+
* The loader still falls back to defaults and continues normally.
|
|
22
|
+
*/
|
|
23
|
+
onWarning?: (warning: ConfigLoadWarning) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Suppress console warnings while still invoking onWarning.
|
|
26
|
+
*/
|
|
27
|
+
silent?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Find plugin config paths (user and project) for a given directory.
|
|
31
|
+
* User config uses getConfigSearchDirs() for lookup.
|
|
32
|
+
* Project config uses <directory>/.opencode/oh-my-opencode-slim.
|
|
33
|
+
*
|
|
34
|
+
* @param directory - Project directory to search for .opencode config
|
|
35
|
+
* @returns Object with userConfigPath and projectConfigPath (null if not found)
|
|
36
|
+
*/
|
|
37
|
+
export declare function findPluginConfigPaths(directory: string): {
|
|
38
|
+
userConfigPath: string | null;
|
|
39
|
+
projectConfigPath: string | null;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Merge two plugin configs using the loader's merge rules.
|
|
43
|
+
* Project/override takes precedence over base.
|
|
44
|
+
*/
|
|
45
|
+
export declare function mergePluginConfigs(base: PluginConfig, override: PluginConfig): PluginConfig;
|
|
2
46
|
/**
|
|
3
47
|
* Recursively merge two objects, with override values taking precedence.
|
|
4
48
|
* For nested objects, merges recursively. For arrays and primitives, override replaces base.
|
|
@@ -21,9 +65,10 @@ export declare function deepMerge<T extends Record<string, unknown>>(base?: T, o
|
|
|
21
65
|
* deep-merged, while top-level arrays are replaced entirely by project config.
|
|
22
66
|
*
|
|
23
67
|
* @param directory - Project directory to search for .opencode config
|
|
68
|
+
* @param options - Optional load options including onWarning callback
|
|
24
69
|
* @returns Merged plugin configuration (empty object if no configs found)
|
|
25
70
|
*/
|
|
26
|
-
export declare function loadPluginConfig(directory: string): PluginConfig;
|
|
71
|
+
export declare function loadPluginConfig(directory: string, options?: LoadPluginConfigOptions): PluginConfig;
|
|
27
72
|
/**
|
|
28
73
|
* Load custom prompt for an agent from the prompts directory.
|
|
29
74
|
* Checks for {agent}.md (replaces default) and {agent}_append.md (appends to default).
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -164,6 +164,18 @@ export declare const SessionManagerConfigSchema: z.ZodObject<{
|
|
|
164
164
|
readContextMaxFiles: z.ZodDefault<z.ZodNumber>;
|
|
165
165
|
}, z.core.$strip>;
|
|
166
166
|
export type SessionManagerConfig = z.infer<typeof SessionManagerConfigSchema>;
|
|
167
|
+
export declare const DivoomConfigSchema: z.ZodObject<{
|
|
168
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
169
|
+
python: z.ZodDefault<z.ZodString>;
|
|
170
|
+
script: z.ZodDefault<z.ZodString>;
|
|
171
|
+
size: z.ZodDefault<z.ZodNumber>;
|
|
172
|
+
fps: z.ZodDefault<z.ZodNumber>;
|
|
173
|
+
speed: z.ZodDefault<z.ZodNumber>;
|
|
174
|
+
maxFrames: z.ZodDefault<z.ZodNumber>;
|
|
175
|
+
posterizeBits: z.ZodDefault<z.ZodNumber>;
|
|
176
|
+
gifs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
export type DivoomConfig = z.infer<typeof DivoomConfigSchema>;
|
|
167
179
|
export declare const TodoContinuationConfigSchema: z.ZodObject<{
|
|
168
180
|
maxContinuations: z.ZodDefault<z.ZodNumber>;
|
|
169
181
|
cooldownMs: z.ZodDefault<z.ZodNumber>;
|
|
@@ -195,7 +207,6 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
195
207
|
v2: "v2";
|
|
196
208
|
}>>;
|
|
197
209
|
balanceProviderUsage: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
-
showStartupToast: z.ZodOptional<z.ZodBoolean>;
|
|
199
210
|
autoUpdate: z.ZodOptional<z.ZodBoolean>;
|
|
200
211
|
manualPlan: z.ZodOptional<z.ZodObject<{
|
|
201
212
|
orchestrator: z.ZodObject<{
|
|
@@ -310,6 +321,17 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
310
321
|
readContextMinLines: z.ZodDefault<z.ZodNumber>;
|
|
311
322
|
readContextMaxFiles: z.ZodDefault<z.ZodNumber>;
|
|
312
323
|
}, z.core.$strip>>;
|
|
324
|
+
divoom: z.ZodOptional<z.ZodObject<{
|
|
325
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
326
|
+
python: z.ZodDefault<z.ZodString>;
|
|
327
|
+
script: z.ZodDefault<z.ZodString>;
|
|
328
|
+
size: z.ZodDefault<z.ZodNumber>;
|
|
329
|
+
fps: z.ZodDefault<z.ZodNumber>;
|
|
330
|
+
speed: z.ZodDefault<z.ZodNumber>;
|
|
331
|
+
maxFrames: z.ZodDefault<z.ZodNumber>;
|
|
332
|
+
posterizeBits: z.ZodDefault<z.ZodNumber>;
|
|
333
|
+
gifs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
334
|
+
}, z.core.$strip>>;
|
|
313
335
|
todoContinuation: z.ZodOptional<z.ZodObject<{
|
|
314
336
|
maxContinuations: z.ZodDefault<z.ZodNumber>;
|
|
315
337
|
cooldownMs: z.ZodDefault<z.ZodNumber>;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { DivoomConfig } from '../config';
|
|
2
|
+
export type DivoomSenderCall = {
|
|
3
|
+
command: string;
|
|
4
|
+
args: string[];
|
|
5
|
+
};
|
|
6
|
+
export type DivoomSender = (call: DivoomSenderCall) => Promise<void> | void;
|
|
7
|
+
type DivoomManagerOptions = {
|
|
8
|
+
assetDir?: string | null;
|
|
9
|
+
sender?: DivoomSender;
|
|
10
|
+
};
|
|
11
|
+
export declare function getDivoomOutDir(homeDir?: string): string;
|
|
12
|
+
export declare class DivoomManager {
|
|
13
|
+
private sender;
|
|
14
|
+
private assetDir;
|
|
15
|
+
private config;
|
|
16
|
+
private parentStates;
|
|
17
|
+
private pendingUserInputs;
|
|
18
|
+
private orchestratorBusy;
|
|
19
|
+
private latestRequestedGifPath?;
|
|
20
|
+
private lastGifPath?;
|
|
21
|
+
private sendQueue;
|
|
22
|
+
constructor(config?: Partial<DivoomConfig>, sender?: DivoomSender, options?: DivoomManagerOptions);
|
|
23
|
+
onPluginLoad(): void;
|
|
24
|
+
onTaskStart(input: {
|
|
25
|
+
parentSessionId?: string;
|
|
26
|
+
callId?: string;
|
|
27
|
+
args?: unknown;
|
|
28
|
+
}): void;
|
|
29
|
+
onTaskEnd(input: {
|
|
30
|
+
parentSessionId?: string;
|
|
31
|
+
callId?: string;
|
|
32
|
+
}): void;
|
|
33
|
+
onUserInputRequired(input: {
|
|
34
|
+
sessionId?: string;
|
|
35
|
+
requestId?: string;
|
|
36
|
+
}): void;
|
|
37
|
+
onUserInputResolved(input: {
|
|
38
|
+
sessionId?: string;
|
|
39
|
+
requestId?: string;
|
|
40
|
+
}): void;
|
|
41
|
+
onOrchestratorStatus(input: {
|
|
42
|
+
sessionId?: string;
|
|
43
|
+
status?: string;
|
|
44
|
+
isOrchestrator?: boolean;
|
|
45
|
+
}): void;
|
|
46
|
+
onSessionDeleted(input: {
|
|
47
|
+
sessionId?: string;
|
|
48
|
+
isOrchestrator?: boolean;
|
|
49
|
+
}): void;
|
|
50
|
+
private render;
|
|
51
|
+
private getParentState;
|
|
52
|
+
private show;
|
|
53
|
+
flush(): Promise<void>;
|
|
54
|
+
private clearLatestIfCurrent;
|
|
55
|
+
}
|
|
56
|
+
export declare function createDivoomManager(config?: Partial<DivoomConfig>): DivoomManager;
|
|
57
|
+
export {};
|
|
Binary file
|
|
Binary file
|