oh-my-opencode-slim 0.8.4 → 0.8.6
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 +80 -19
- package/dist/agents/council-master.d.ts +2 -0
- package/dist/agents/council.d.ts +28 -0
- package/dist/agents/councillor.d.ts +2 -0
- package/dist/agents/orchestrator.d.ts +6 -0
- package/dist/background/background-manager.d.ts +6 -1
- package/dist/background/index.d.ts +1 -0
- package/dist/background/subagent-depth.d.ts +35 -0
- package/dist/cli/index.js +65 -3
- package/dist/cli/paths.d.ts +10 -0
- package/dist/config/constants.d.ts +7 -2
- package/dist/config/council-schema.d.ts +134 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/schema.d.ts +24 -0
- package/dist/council/council-manager.d.ts +40 -0
- package/dist/council/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/json-error-recovery/hook.d.ts +1 -1
- package/dist/hooks/phase-reminder/index.d.ts +1 -1
- package/dist/hooks/post-file-tool-nudge/index.d.ts +18 -0
- package/dist/index.js +1003 -682
- package/dist/tools/council.d.ts +9 -0
- package/dist/tools/index.d.ts +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/session.d.ts +59 -0
- package/oh-my-opencode-slim.schema.json +70 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type PluginInput, type ToolDefinition } from '@opencode-ai/plugin';
|
|
2
|
+
import type { CouncilManager } from '../council/council-manager';
|
|
3
|
+
/**
|
|
4
|
+
* Creates the council_session tool for multi-LLM orchestration.
|
|
5
|
+
*
|
|
6
|
+
* This tool triggers a full council session: parallel councillors →
|
|
7
|
+
* master synthesis. Available to the council agent.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createCouncilTool(_ctx: PluginInput, councilManager: CouncilManager): Record<string, ToolDefinition>;
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ast_grep_replace, ast_grep_search } from './ast-grep';
|
|
2
2
|
export { createBackgroundTools } from './background';
|
|
3
|
-
export {
|
|
3
|
+
export { createCouncilTool } from './council';
|
|
4
4
|
export { lsp_diagnostics, lsp_find_references, lsp_goto_definition, lsp_rename, lspManager, setUserLspConfig, } from './lsp';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared session utilities for council and background managers.
|
|
3
|
+
*/
|
|
4
|
+
import type { PluginInput } from '@opencode-ai/plugin';
|
|
5
|
+
type OpencodeClient = PluginInput['client'];
|
|
6
|
+
/**
|
|
7
|
+
* Extract the short model label from a "provider/model" string.
|
|
8
|
+
* E.g. "openai/gpt-5.4-mini" → "gpt-5.4-mini"
|
|
9
|
+
*/
|
|
10
|
+
export declare function shortModelLabel(model: string): string;
|
|
11
|
+
export type PromptBody = {
|
|
12
|
+
messageID?: string;
|
|
13
|
+
model?: {
|
|
14
|
+
providerID: string;
|
|
15
|
+
modelID: string;
|
|
16
|
+
};
|
|
17
|
+
agent?: string;
|
|
18
|
+
noReply?: boolean;
|
|
19
|
+
system?: string;
|
|
20
|
+
tools?: {
|
|
21
|
+
[key: string]: boolean;
|
|
22
|
+
};
|
|
23
|
+
parts: Array<{
|
|
24
|
+
type: 'text';
|
|
25
|
+
text: string;
|
|
26
|
+
}>;
|
|
27
|
+
variant?: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Parse a model reference string into provider and model IDs.
|
|
31
|
+
* @param model - Model string in format "provider/model"
|
|
32
|
+
* @returns Object with providerID and modelID, or null if invalid
|
|
33
|
+
*/
|
|
34
|
+
export declare function parseModelReference(model: string): {
|
|
35
|
+
providerID: string;
|
|
36
|
+
modelID: string;
|
|
37
|
+
} | null;
|
|
38
|
+
/**
|
|
39
|
+
* Send a prompt to a session with optional timeout.
|
|
40
|
+
* If timeout is exceeded, the session is aborted and an error is thrown.
|
|
41
|
+
* @param client - OpenCode client instance
|
|
42
|
+
* @param args - Arguments for session.prompt()
|
|
43
|
+
* @param timeoutMs - Timeout in milliseconds (0 = no timeout)
|
|
44
|
+
* @throws Error if timeout is exceeded
|
|
45
|
+
*/
|
|
46
|
+
export declare function promptWithTimeout(client: OpencodeClient, args: Parameters<OpencodeClient['session']['prompt']>[0], timeoutMs: number): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Extract the result text from a session.
|
|
49
|
+
* Collects all assistant messages and concatenates their text parts.
|
|
50
|
+
* @param client - OpenCode client instance
|
|
51
|
+
* @param sessionId - Session ID to extract from
|
|
52
|
+
* @param options - Optional: `includeReasoning` (default true) controls whether
|
|
53
|
+
* reasoning/chain-of-thought parts are included.
|
|
54
|
+
* @returns Concatenated text from all assistant messages
|
|
55
|
+
*/
|
|
56
|
+
export declare function extractSessionResult(client: OpencodeClient, sessionId: string, options?: {
|
|
57
|
+
includeReasoning?: boolean;
|
|
58
|
+
}): Promise<string>;
|
|
59
|
+
export {};
|
|
@@ -441,6 +441,76 @@
|
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
+
},
|
|
445
|
+
"council": {
|
|
446
|
+
"type": "object",
|
|
447
|
+
"properties": {
|
|
448
|
+
"master": {
|
|
449
|
+
"type": "object",
|
|
450
|
+
"properties": {
|
|
451
|
+
"model": {
|
|
452
|
+
"type": "string",
|
|
453
|
+
"pattern": "^[^/\\s]+\\/[^\\s]+$",
|
|
454
|
+
"description": "Model ID for the council master (e.g. \"anthropic/claude-opus-4-6\")"
|
|
455
|
+
},
|
|
456
|
+
"variant": {
|
|
457
|
+
"type": "string"
|
|
458
|
+
},
|
|
459
|
+
"prompt": {
|
|
460
|
+
"description": "Optional role/guidance injected into the master synthesis prompt",
|
|
461
|
+
"type": "string"
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
"required": [
|
|
465
|
+
"model"
|
|
466
|
+
]
|
|
467
|
+
},
|
|
468
|
+
"presets": {
|
|
469
|
+
"type": "object",
|
|
470
|
+
"propertyNames": {
|
|
471
|
+
"type": "string"
|
|
472
|
+
},
|
|
473
|
+
"additionalProperties": {
|
|
474
|
+
"type": "object",
|
|
475
|
+
"propertyNames": {
|
|
476
|
+
"type": "string"
|
|
477
|
+
},
|
|
478
|
+
"additionalProperties": {
|
|
479
|
+
"type": "object",
|
|
480
|
+
"propertyNames": {
|
|
481
|
+
"type": "string"
|
|
482
|
+
},
|
|
483
|
+
"additionalProperties": {}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
"master_timeout": {
|
|
488
|
+
"default": 300000,
|
|
489
|
+
"type": "number",
|
|
490
|
+
"minimum": 0
|
|
491
|
+
},
|
|
492
|
+
"councillors_timeout": {
|
|
493
|
+
"default": 180000,
|
|
494
|
+
"type": "number",
|
|
495
|
+
"minimum": 0
|
|
496
|
+
},
|
|
497
|
+
"default_preset": {
|
|
498
|
+
"default": "default",
|
|
499
|
+
"type": "string"
|
|
500
|
+
},
|
|
501
|
+
"master_fallback": {
|
|
502
|
+
"description": "Fallback models for the council master. Tried in order if the primary model fails. Example: [\"anthropic/claude-sonnet-4-6\", \"openai/gpt-5.4\"]",
|
|
503
|
+
"type": "array",
|
|
504
|
+
"items": {
|
|
505
|
+
"type": "string",
|
|
506
|
+
"pattern": "^[^/\\s]+\\/[^\\s]+$"
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
"required": [
|
|
511
|
+
"master",
|
|
512
|
+
"presets"
|
|
513
|
+
]
|
|
444
514
|
}
|
|
445
515
|
},
|
|
446
516
|
"title": "oh-my-opencode-slim",
|
package/package.json
CHANGED