oh-my-opencode-slim 0.9.1 → 0.9.4
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 +8 -2
- package/dist/cli/index.js +31 -4
- package/dist/config/schema.d.ts +13 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/todo-continuation/index.d.ts +25 -0
- package/dist/index.js +143876 -1050
- package/dist/multiplexer/zellij/index.d.ts +0 -2
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/smartfetch/binary.d.ts +3 -0
- package/dist/tools/smartfetch/cache.d.ts +6 -0
- package/dist/tools/smartfetch/constants.d.ts +12 -0
- package/dist/tools/smartfetch/index.d.ts +3 -0
- package/dist/tools/smartfetch/network.d.ts +38 -0
- package/dist/tools/smartfetch/secondary-model.d.ts +28 -0
- package/dist/tools/smartfetch/tool.d.ts +3 -0
- package/dist/tools/smartfetch/types.d.ts +122 -0
- package/dist/tools/smartfetch/utils.d.ts +18 -0
- package/oh-my-opencode-slim.schema.json +31 -0
- package/package.json +8 -1
package/README.md
CHANGED
|
@@ -385,7 +385,7 @@ If any agent fails to respond, check your provider authentication and config fil
|
|
|
385
385
|
<p><sub>Every merged contribution leaves a mark on the realm.</sub></p>
|
|
386
386
|
|
|
387
387
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
388
|
-
[](#contributors-)
|
|
389
389
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
390
390
|
</div>
|
|
391
391
|
|
|
@@ -397,7 +397,7 @@ If any agent fails to respond, check your provider authentication and config fil
|
|
|
397
397
|
<table>
|
|
398
398
|
<tbody>
|
|
399
399
|
<tr>
|
|
400
|
-
<td align="center" valign="top" width="16.66%"><a href="https://boringdystopia.ai/"><img src="https://avatars.githubusercontent.com/u/204474669?v=4?s=100" width="100px;" alt="Alvin"/><br /><sub><b>Alvin</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=alvinunreal" title="Code">💻</a
|
|
400
|
+
<td align="center" valign="top" width="16.66%"><a href="https://boringdystopia.ai/"><img src="https://avatars.githubusercontent.com/u/204474669?v=4?s=100" width="100px;" alt="Alvin"/><br /><sub><b>Alvin</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=alvinunreal" title="Code">💻</a></td>
|
|
401
401
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/alvinreal"><img src="https://avatars.githubusercontent.com/u/262747402?v=4?s=100" width="100px;" alt="alvinreal"/><br /><sub><b>alvinreal</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=alvinreal" title="Code">💻</a></td>
|
|
402
402
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/imarshallwidjaja"><img src="https://avatars.githubusercontent.com/u/60992624?v=4?s=100" width="100px;" alt="imw"/><br /><sub><b>imw</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=imarshallwidjaja" title="Code">💻</a></td>
|
|
403
403
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/adikpb"><img src="https://avatars.githubusercontent.com/u/67222969?v=4?s=100" width="100px;" alt="Adithya Kozham Burath Bijoy"/><br /><sub><b>Adithya Kozham Burath Bijoy</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=adikpb" title="Code">💻</a></td>
|
|
@@ -432,6 +432,12 @@ If any agent fails to respond, check your provider authentication and config fil
|
|
|
432
432
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/xLillium"><img src="https://avatars.githubusercontent.com/u/16964936?v=4?s=100" width="100px;" alt="xLillium"/><br /><sub><b>xLillium</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=xLillium" title="Code">💻</a></td>
|
|
433
433
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/CoolZxp"><img src="https://avatars.githubusercontent.com/u/54017765?v=4?s=100" width="100px;" alt="4.435km/s"/><br /><sub><b>4.435km/s</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=CoolZxp" title="Code">💻</a></td>
|
|
434
434
|
<td align="center" valign="top" width="16.66%"><a href="https://github.com/drindr"><img src="https://avatars.githubusercontent.com/u/34709601?v=4?s=100" width="100px;" alt="Drin"/><br /><sub><b>Drin</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=drindr" title="Code">💻</a></td>
|
|
435
|
+
<td align="center" valign="top" width="16.66%"><a href="https://hzu.lol/"><img src="https://avatars.githubusercontent.com/u/42469039?v=4?s=100" width="100px;" alt="Hakim Zulkufli"/><br /><sub><b>Hakim Zulkufli</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=hakimzulkufli" title="Code">💻</a></td>
|
|
436
|
+
<td align="center" valign="top" width="16.66%"><a href="https://bit.ly/2N1ynXZ"><img src="https://avatars.githubusercontent.com/u/14874913?v=4?s=100" width="100px;" alt="Simon Klakegg"/><br /><sub><b>Simon Klakegg</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=sklakegg" title="Code">💻</a></td>
|
|
437
|
+
<td align="center" valign="top" width="16.66%"><a href="https://github.com/sudorest"><img src="https://avatars.githubusercontent.com/u/214225921?v=4?s=100" width="100px;" alt="Kiwi"/><br /><sub><b>Kiwi</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=sudorest" title="Code">💻</a></td>
|
|
438
|
+
</tr>
|
|
439
|
+
<tr>
|
|
440
|
+
<td align="center" valign="top" width="16.66%"><a href="https://trade.xyz/?ref=BZ1RJRXWO"><img src="https://avatars.githubusercontent.com/u/7317522?v=4?s=100" width="100px;" alt="Raxxoor"/><br /><sub><b>Raxxoor</b></sub></a><br /><a href="https://github.com/alvinunreal/oh-my-opencode-slim/commits?author=dhaern" title="Code">💻</a></td>
|
|
435
441
|
</tr>
|
|
436
442
|
</tbody>
|
|
437
443
|
</table>
|
package/dist/cli/index.js
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
statSync as statSync2,
|
|
24
24
|
writeFileSync
|
|
25
25
|
} from "fs";
|
|
26
|
+
import { pathToFileURL } from "url";
|
|
26
27
|
|
|
27
28
|
// src/cli/paths.ts
|
|
28
29
|
import { existsSync, mkdirSync } from "fs";
|
|
@@ -13776,6 +13777,12 @@ var McpNameSchema = exports_external.enum(["websearch", "context7", "grep_app"])
|
|
|
13776
13777
|
var BackgroundTaskConfigSchema = exports_external.object({
|
|
13777
13778
|
maxConcurrentStarts: exports_external.number().min(1).max(50).default(10)
|
|
13778
13779
|
});
|
|
13780
|
+
var TodoContinuationConfigSchema = exports_external.object({
|
|
13781
|
+
maxContinuations: exports_external.number().int().min(1).max(50).default(5).describe("Maximum consecutive auto-continuations before stopping to ask user"),
|
|
13782
|
+
cooldownMs: exports_external.number().int().min(0).max(30000).default(3000).describe("Delay in ms before auto-continuing (gives user time to abort)"),
|
|
13783
|
+
autoEnable: exports_external.boolean().default(false).describe("Automatically enable auto-continue when the orchestrator session has enough todos"),
|
|
13784
|
+
autoEnableThreshold: exports_external.number().int().min(1).max(50).default(4).describe("Number of todos that triggers auto-enable (only used when autoEnable is true)")
|
|
13785
|
+
});
|
|
13779
13786
|
var FailoverConfigSchema = exports_external.object({
|
|
13780
13787
|
enabled: exports_external.boolean().default(true),
|
|
13781
13788
|
timeoutMs: exports_external.number().min(0).default(15000),
|
|
@@ -13796,12 +13803,13 @@ var PluginConfigSchema = exports_external.object({
|
|
|
13796
13803
|
tmux: TmuxConfigSchema.optional(),
|
|
13797
13804
|
websearch: WebsearchConfigSchema.optional(),
|
|
13798
13805
|
background: BackgroundTaskConfigSchema.optional(),
|
|
13806
|
+
todoContinuation: TodoContinuationConfigSchema.optional(),
|
|
13799
13807
|
fallback: FailoverConfigSchema.optional(),
|
|
13800
13808
|
council: CouncilConfigSchema.optional()
|
|
13801
13809
|
});
|
|
13802
13810
|
// src/config/agent-mcps.ts
|
|
13803
13811
|
var DEFAULT_AGENT_MCPS = {
|
|
13804
|
-
orchestrator: ["
|
|
13812
|
+
orchestrator: ["*"],
|
|
13805
13813
|
designer: [],
|
|
13806
13814
|
oracle: [],
|
|
13807
13815
|
librarian: ["websearch", "context7", "grep_app"],
|
|
@@ -14005,6 +14013,24 @@ function generateLiteConfig(installConfig) {
|
|
|
14005
14013
|
|
|
14006
14014
|
// src/cli/config-io.ts
|
|
14007
14015
|
var PACKAGE_NAME = "oh-my-opencode-slim";
|
|
14016
|
+
function isPluginEntry(entry) {
|
|
14017
|
+
return entry === PACKAGE_NAME || entry.startsWith(`${PACKAGE_NAME}@`) || entry.startsWith("file://") && entry.includes(PACKAGE_NAME);
|
|
14018
|
+
}
|
|
14019
|
+
function getPluginEntry() {
|
|
14020
|
+
const cliEntryPath = process.argv[1];
|
|
14021
|
+
if (!cliEntryPath) {
|
|
14022
|
+
return PACKAGE_NAME;
|
|
14023
|
+
}
|
|
14024
|
+
try {
|
|
14025
|
+
const pluginEntryPath = cliEntryPath.match(/[\\/]dist[\\/]cli[\\/]index\.js$/) ? cliEntryPath.replace(/[\\/]dist[\\/]cli[\\/]index\.js$/, "/dist/index.js") : null;
|
|
14026
|
+
if (!pluginEntryPath) {
|
|
14027
|
+
return PACKAGE_NAME;
|
|
14028
|
+
}
|
|
14029
|
+
return pathToFileURL(pluginEntryPath).href;
|
|
14030
|
+
} catch {
|
|
14031
|
+
return PACKAGE_NAME;
|
|
14032
|
+
}
|
|
14033
|
+
}
|
|
14008
14034
|
function stripJsonComments(json2) {
|
|
14009
14035
|
const commentPattern = /\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g;
|
|
14010
14036
|
const trailingCommaPattern = /\\"|"(?:\\"|[^"])*"|(,)(\s*[}\]])/g;
|
|
@@ -14071,8 +14097,9 @@ async function addPluginToOpenCodeConfig() {
|
|
|
14071
14097
|
}
|
|
14072
14098
|
const config2 = parsedConfig ?? {};
|
|
14073
14099
|
const plugins = config2.plugin ?? [];
|
|
14074
|
-
const
|
|
14075
|
-
filteredPlugins.
|
|
14100
|
+
const pluginEntry = getPluginEntry();
|
|
14101
|
+
const filteredPlugins = plugins.filter((p) => !isPluginEntry(p));
|
|
14102
|
+
filteredPlugins.push(pluginEntry);
|
|
14076
14103
|
config2.plugin = filteredPlugins;
|
|
14077
14104
|
writeConfig(configPath, config2);
|
|
14078
14105
|
return { success: true, configPath };
|
|
@@ -14151,7 +14178,7 @@ function detectCurrentConfig() {
|
|
|
14151
14178
|
if (!config2)
|
|
14152
14179
|
return result;
|
|
14153
14180
|
const plugins = config2.plugin ?? [];
|
|
14154
|
-
result.isInstalled = plugins.some((p) => p
|
|
14181
|
+
result.isInstalled = plugins.some((p) => isPluginEntry(p));
|
|
14155
14182
|
result.hasAntigravity = plugins.some((p) => p.startsWith("opencode-antigravity-auth"));
|
|
14156
14183
|
const providers = config2.provider;
|
|
14157
14184
|
result.hasKimi = !!providers?.kimi;
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -146,6 +146,13 @@ export declare const BackgroundTaskConfigSchema: z.ZodObject<{
|
|
|
146
146
|
maxConcurrentStarts: z.ZodDefault<z.ZodNumber>;
|
|
147
147
|
}, z.core.$strip>;
|
|
148
148
|
export type BackgroundTaskConfig = z.infer<typeof BackgroundTaskConfigSchema>;
|
|
149
|
+
export declare const TodoContinuationConfigSchema: z.ZodObject<{
|
|
150
|
+
maxContinuations: z.ZodDefault<z.ZodNumber>;
|
|
151
|
+
cooldownMs: z.ZodDefault<z.ZodNumber>;
|
|
152
|
+
autoEnable: z.ZodDefault<z.ZodBoolean>;
|
|
153
|
+
autoEnableThreshold: z.ZodDefault<z.ZodNumber>;
|
|
154
|
+
}, z.core.$strip>;
|
|
155
|
+
export type TodoContinuationConfig = z.infer<typeof TodoContinuationConfigSchema>;
|
|
149
156
|
export declare const FailoverConfigSchema: z.ZodObject<{
|
|
150
157
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
151
158
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
@@ -265,6 +272,12 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
265
272
|
background: z.ZodOptional<z.ZodObject<{
|
|
266
273
|
maxConcurrentStarts: z.ZodDefault<z.ZodNumber>;
|
|
267
274
|
}, z.core.$strip>>;
|
|
275
|
+
todoContinuation: z.ZodOptional<z.ZodObject<{
|
|
276
|
+
maxContinuations: z.ZodDefault<z.ZodNumber>;
|
|
277
|
+
cooldownMs: z.ZodDefault<z.ZodNumber>;
|
|
278
|
+
autoEnable: z.ZodDefault<z.ZodBoolean>;
|
|
279
|
+
autoEnableThreshold: z.ZodDefault<z.ZodNumber>;
|
|
280
|
+
}, z.core.$strip>>;
|
|
268
281
|
fallback: z.ZodOptional<z.ZodObject<{
|
|
269
282
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
270
283
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export { ForegroundFallbackManager, isRateLimitError, } from './foreground-fallb
|
|
|
7
7
|
export { createJsonErrorRecoveryHook } from './json-error-recovery';
|
|
8
8
|
export { createPhaseReminderHook } from './phase-reminder';
|
|
9
9
|
export { createPostFileToolNudgeHook } from './post-file-tool-nudge';
|
|
10
|
+
export { createTodoContinuationHook } from './todo-continuation';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PluginInput } from '@opencode-ai/plugin';
|
|
2
|
+
export declare function createTodoContinuationHook(ctx: PluginInput, config?: {
|
|
3
|
+
maxContinuations?: number;
|
|
4
|
+
cooldownMs?: number;
|
|
5
|
+
autoEnable?: boolean;
|
|
6
|
+
autoEnableThreshold?: number;
|
|
7
|
+
}): {
|
|
8
|
+
tool: Record<string, unknown>;
|
|
9
|
+
handleEvent: (input: {
|
|
10
|
+
event: {
|
|
11
|
+
type: string;
|
|
12
|
+
properties?: Record<string, unknown>;
|
|
13
|
+
};
|
|
14
|
+
}) => Promise<void>;
|
|
15
|
+
handleCommandExecuteBefore: (input: {
|
|
16
|
+
command: string;
|
|
17
|
+
sessionID: string;
|
|
18
|
+
arguments: string;
|
|
19
|
+
}, output: {
|
|
20
|
+
parts: Array<{
|
|
21
|
+
type: string;
|
|
22
|
+
text?: string;
|
|
23
|
+
}>;
|
|
24
|
+
}) => Promise<void>;
|
|
25
|
+
};
|