oh-my-opencode 3.0.0-beta.1 → 3.0.0-beta.10
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.ja.md +109 -89
- package/README.md +113 -104
- package/README.zh-cn.md +664 -511
- package/bin/oh-my-opencode.js +80 -0
- package/bin/platform.js +38 -0
- package/bin/platform.test.ts +148 -0
- package/dist/agents/metis.d.ts +1 -0
- package/dist/agents/momus.d.ts +1 -1
- package/dist/agents/orchestrator-sisyphus.d.ts +3 -2
- package/dist/agents/prometheus-prompt.d.ts +3 -1
- package/dist/agents/sisyphus-junior.d.ts +6 -1
- package/dist/agents/types.d.ts +1 -0
- package/dist/agents/utils.d.ts +3 -2
- package/dist/cli/config-manager.d.ts +9 -1
- package/dist/cli/doctor/checks/opencode.d.ts +5 -1
- package/dist/cli/index.js +3886 -3763
- package/dist/cli/run/events.d.ts +1 -0
- package/dist/cli/types.d.ts +3 -0
- package/dist/config/schema.d.ts +538 -208
- package/dist/features/background-agent/concurrency.d.ts +17 -0
- package/dist/features/background-agent/manager.d.ts +44 -5
- package/dist/features/background-agent/types.d.ts +9 -1
- package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
- package/dist/features/builtin-commands/templates/refactor.d.ts +1 -1
- package/dist/features/builtin-commands/types.d.ts +1 -1
- package/dist/features/claude-code-session-state/state.d.ts +6 -1
- package/dist/features/context-injector/index.d.ts +1 -1
- package/dist/features/context-injector/injector.d.ts +1 -1
- package/dist/features/hook-message-injector/index.d.ts +2 -2
- package/dist/features/hook-message-injector/injector.d.ts +7 -0
- package/dist/features/opencode-skill-loader/skill-content.d.ts +17 -2
- package/dist/features/skill-mcp-manager/manager.d.ts +11 -0
- package/dist/features/task-toast-manager/index.d.ts +1 -1
- package/dist/features/task-toast-manager/manager.d.ts +2 -1
- package/dist/features/task-toast-manager/types.d.ts +5 -0
- package/dist/hooks/agent-usage-reminder/constants.d.ts +1 -1
- package/dist/hooks/anthropic-context-window-limit-recovery/executor.d.ts +1 -1
- package/dist/hooks/anthropic-context-window-limit-recovery/index.d.ts +1 -2
- package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +0 -5
- package/dist/hooks/auto-update-checker/checker.d.ts +1 -1
- package/dist/hooks/auto-update-checker/index.d.ts +4 -0
- package/dist/hooks/background-compaction/index.d.ts +19 -0
- package/dist/hooks/background-notification/index.d.ts +6 -0
- package/dist/hooks/comment-checker/cli.d.ts +0 -1
- package/dist/hooks/compaction-context-injector/index.d.ts +7 -1
- package/dist/hooks/delegate-task-retry/index.d.ts +24 -0
- package/dist/hooks/index.d.ts +1 -2
- package/dist/hooks/keyword-detector/index.d.ts +2 -1
- package/dist/hooks/prometheus-md-only/constants.d.ts +2 -2
- package/dist/hooks/prometheus-md-only/index.d.ts +1 -1
- package/dist/hooks/ralph-loop/index.d.ts +1 -0
- package/dist/hooks/ralph-loop/types.d.ts +1 -0
- package/dist/index.js +22506 -23819
- package/dist/mcp/context7.d.ts +1 -0
- package/dist/mcp/grep-app.d.ts +1 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/websearch.d.ts +1 -0
- package/dist/plugin-handlers/config-handler.d.ts +2 -0
- package/dist/plugin-handlers/config-handler.test.d.ts +1 -0
- package/dist/shared/agent-tool-restrictions.d.ts +7 -0
- package/dist/shared/agent-variant.d.ts +5 -0
- package/dist/shared/agent-variant.test.d.ts +1 -0
- package/dist/shared/deep-merge.test.d.ts +1 -0
- package/dist/shared/first-message-variant.d.ts +11 -0
- package/dist/shared/first-message-variant.test.d.ts +1 -0
- package/dist/shared/index.d.ts +6 -0
- package/dist/shared/migration.d.ts +1 -0
- package/dist/shared/opencode-version.d.ts +6 -3
- package/dist/shared/permission-compat.d.ts +22 -7
- package/dist/shared/session-cursor.d.ts +13 -0
- package/dist/shared/session-cursor.test.d.ts +1 -0
- package/dist/shared/shell-env.d.ts +41 -0
- package/dist/shared/shell-env.test.d.ts +1 -0
- package/dist/shared/system-directive.d.ts +31 -0
- package/dist/shared/zip-extractor.d.ts +1 -0
- package/dist/tools/{sisyphus-task → delegate-task}/constants.d.ts +3 -3
- package/dist/tools/{sisyphus-task → delegate-task}/index.d.ts +1 -1
- package/dist/tools/{sisyphus-task → delegate-task}/tools.d.ts +5 -3
- package/dist/tools/delegate-task/tools.test.d.ts +1 -0
- package/dist/tools/{sisyphus-task → delegate-task}/types.d.ts +1 -1
- package/dist/tools/glob/cli.d.ts +4 -0
- package/dist/tools/glob/cli.test.d.ts +1 -0
- package/dist/tools/glob/types.d.ts +1 -0
- package/dist/tools/index.d.ts +3 -1
- package/dist/tools/interactive-bash/constants.d.ts +1 -1
- package/dist/tools/look-at/tools.d.ts +7 -0
- package/dist/tools/look-at/tools.test.d.ts +1 -0
- package/dist/tools/lsp/client.d.ts +1 -3
- package/dist/tools/lsp/config.test.d.ts +1 -0
- package/dist/tools/lsp/index.d.ts +1 -1
- package/dist/tools/lsp/tools.d.ts +1 -6
- package/dist/tools/lsp/types.d.ts +0 -33
- package/dist/tools/lsp/utils.d.ts +1 -4
- package/dist/tools/skill/tools.d.ts +1 -7
- package/dist/tools/skill/types.d.ts +3 -0
- package/dist/tools/skill-mcp/types.d.ts +1 -1
- package/dist/tools/slashcommand/tools.d.ts +1 -7
- package/package.json +21 -14
- package/postinstall.mjs +43 -0
- package/dist/agents/build-prompt.d.ts +0 -31
- package/dist/agents/plan-prompt.d.ts +0 -64
- package/dist/auth/antigravity/accounts.d.ts +0 -40
- package/dist/auth/antigravity/browser.d.ts +0 -27
- package/dist/auth/antigravity/cli.d.ts +0 -2
- package/dist/auth/antigravity/constants.d.ts +0 -98
- package/dist/auth/antigravity/fetch.d.ts +0 -69
- package/dist/auth/antigravity/index.d.ts +0 -13
- package/dist/auth/antigravity/integration.test.d.ts +0 -10
- package/dist/auth/antigravity/message-converter.d.ts +0 -54
- package/dist/auth/antigravity/oauth.d.ts +0 -51
- package/dist/auth/antigravity/plugin.d.ts +0 -54
- package/dist/auth/antigravity/project.d.ts +0 -10
- package/dist/auth/antigravity/request.d.ts +0 -116
- package/dist/auth/antigravity/response.d.ts +0 -137
- package/dist/auth/antigravity/storage.d.ts +0 -5
- package/dist/auth/antigravity/thinking.d.ts +0 -278
- package/dist/auth/antigravity/thinking.test.d.ts +0 -10
- package/dist/auth/antigravity/thought-signature-store.d.ts +0 -52
- package/dist/auth/antigravity/token.d.ts +0 -38
- package/dist/auth/antigravity/tools.d.ts +0 -119
- package/dist/auth/antigravity/types.d.ts +0 -229
- package/dist/cli/ast-grep-napi.linux-x64-gnu-jfv8414z.node +0 -0
- package/dist/cli/ast-grep-napi.linux-x64-musl-8cj2e5cf.node +0 -0
- package/dist/cli/commands/auth.d.ts +0 -2
- package/dist/google-auth.d.ts +0 -3
- package/dist/google-auth.js +0 -3871
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-executor.d.ts +0 -3
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-purge-errors.d.ts +0 -7
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-storage.d.ts +0 -2
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-supersede.d.ts +0 -6
- package/dist/hooks/comment-checker/constants.d.ts +0 -3
- package/dist/hooks/comment-checker/filters/bdd.d.ts +0 -2
- package/dist/hooks/comment-checker/filters/directive.d.ts +0 -2
- package/dist/hooks/comment-checker/filters/docstring.d.ts +0 -2
- package/dist/hooks/comment-checker/filters/index.d.ts +0 -7
- package/dist/hooks/comment-checker/filters/shebang.d.ts +0 -2
- package/dist/hooks/comment-checker/output/formatter.d.ts +0 -2
- package/dist/hooks/comment-checker/output/index.d.ts +0 -2
- package/dist/hooks/comment-checker/output/xml-builder.d.ts +0 -2
- package/dist/hooks/empty-message-sanitizer/index.d.ts +0 -12
- package/dist/hooks/preemptive-compaction/constants.d.ts +0 -3
- package/dist/hooks/preemptive-compaction/index.d.ts +0 -24
- package/dist/hooks/preemptive-compaction/types.d.ts +0 -17
- package/dist/tools/ast-grep/napi.d.ts +0 -13
- package/dist/tools/interactive-bash/types.d.ts +0 -3
- /package/dist/{auth/antigravity/accounts.test.d.ts → agents/momus.test.d.ts} +0 -0
- /package/dist/{auth/antigravity/browser.test.d.ts → agents/prometheus-prompt.test.d.ts} +0 -0
- /package/dist/{auth/antigravity/cli.test.d.ts → agents/sisyphus-junior.test.d.ts} +0 -0
- /package/dist/{auth/antigravity/constants.test.d.ts → features/claude-code-session-state/state.test.d.ts} +0 -0
- /package/dist/{auth/antigravity/oauth.test.d.ts → hooks/auto-update-checker/checker.test.d.ts} +0 -0
- /package/dist/{auth/antigravity/request.test.d.ts → hooks/auto-update-checker/index.test.d.ts} +0 -0
- /package/dist/{auth/antigravity/storage.test.d.ts → hooks/comment-checker/cli.test.d.ts} +0 -0
- /package/dist/{auth/antigravity/token.test.d.ts → hooks/delegate-task-retry/index.test.d.ts} +0 -0
- /package/dist/{tools/sisyphus-task/tools.test.d.ts → plugin-config.test.d.ts} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { PruningState } from "./pruning-types";
|
|
2
|
-
export interface PurgeErrorsConfig {
|
|
3
|
-
enabled: boolean;
|
|
4
|
-
turns: number;
|
|
5
|
-
protectedTools?: string[];
|
|
6
|
-
}
|
|
7
|
-
export declare function executePurgeErrors(sessionID: string, state: PruningState, config: PurgeErrorsConfig, protectedTools: Set<string>): number;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { PruningState } from "./pruning-types";
|
|
2
|
-
export interface SupersedeWritesConfig {
|
|
3
|
-
enabled: boolean;
|
|
4
|
-
aggressive: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare function executeSupersedeWrites(sessionID: string, state: PruningState, config: SupersedeWritesConfig, protectedTools: Set<string>): number;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const BDD_KEYWORDS: Set<string>;
|
|
2
|
-
export declare const TYPE_CHECKER_PREFIXES: string[];
|
|
3
|
-
export declare const HOOK_MESSAGE_HEADER = "COMMENT/DOCSTRING DETECTED - IMMEDIATE ACTION REQUIRED\n\nYour recent changes contain comments or docstrings, which triggered this hook.\nYou need to take immediate action. You must follow the conditions below.\n(Listed in priority order - you must always act according to this priority order)\n\nCRITICAL WARNING: This hook message MUST NEVER be ignored, even if you receive it multiple times.\nYou MUST provide corresponding explanation or action for EACH occurrence of this message.\nIgnoring this message or failing to respond appropriately is strictly prohibited.\n\nPRIORITY-BASED ACTION GUIDELINES:\n\n1. This is a comment/docstring that already existed before\n\t-> Explain to the user that this is an existing comment/docstring and proceed (justify it)\n\n2. This is a newly written comment: but it's in given, when, then format\n\t-> Tell the user it's a BDD comment and proceed (justify it)\n\t-> Note: This applies to comments only, not docstrings\n\n3. This is a newly written comment/docstring: but it's a necessary comment/docstring\n\t-> Tell the user why this comment/docstring is absolutely necessary and proceed (justify it)\n\t-> Examples of necessary comments: complex algorithms, security-related, performance optimization, regex, mathematical formulas\n\t-> Examples of necessary docstrings: public API documentation, complex module/class interfaces\n\t-> IMPORTANT: Most docstrings are unnecessary if the code is self-explanatory. Only keep truly essential ones.\n\n4. This is a newly written comment/docstring: but it's an unnecessary comment/docstring\n\t-> Apologize to the user and remove the comment/docstring.\n\t-> Make the code itself clearer so it can be understood without comments/docstrings.\n\t-> For verbose docstrings: refactor code to be self-documenting instead of adding lengthy explanations.\n\nCODE SMELL WARNING: Using comments as visual separators (e.g., \"// =========\", \"# ---\", \"// *** Section ***\")\nis a code smell. If you need separators, your file is too long or poorly organized.\nRefactor into smaller modules or use proper code organization instead of comment-based section dividers.\n\nMANDATORY REQUIREMENT: You must acknowledge this hook message and take one of the above actions.\nReview in the above priority order and take the corresponding action EVERY TIME this appears.\n\nDetected comments/docstrings:\n";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { CommentInfo } from "../types";
|
|
2
|
-
import { filterBddComments } from "./bdd";
|
|
3
|
-
import { filterDirectiveComments } from "./directive";
|
|
4
|
-
import { filterDocstringComments } from "./docstring";
|
|
5
|
-
import { filterShebangComments } from "./shebang";
|
|
6
|
-
export { filterBddComments, filterDirectiveComments, filterDocstringComments, filterShebangComments };
|
|
7
|
-
export declare function applyFilters(comments: CommentInfo[]): CommentInfo[];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Message, Part } from "@opencode-ai/sdk";
|
|
2
|
-
interface MessageWithParts {
|
|
3
|
-
info: Message;
|
|
4
|
-
parts: Part[];
|
|
5
|
-
}
|
|
6
|
-
type MessagesTransformHook = {
|
|
7
|
-
"experimental.chat.messages.transform"?: (input: Record<string, never>, output: {
|
|
8
|
-
messages: MessageWithParts[];
|
|
9
|
-
}) => Promise<void>;
|
|
10
|
-
};
|
|
11
|
-
export declare function createEmptyMessageSanitizerHook(): MessagesTransformHook;
|
|
12
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
-
import type { ExperimentalConfig } from "../../config";
|
|
3
|
-
export interface SummarizeContext {
|
|
4
|
-
sessionID: string;
|
|
5
|
-
providerID: string;
|
|
6
|
-
modelID: string;
|
|
7
|
-
usageRatio: number;
|
|
8
|
-
directory: string;
|
|
9
|
-
}
|
|
10
|
-
export type BeforeSummarizeCallback = (ctx: SummarizeContext) => Promise<void> | void;
|
|
11
|
-
export type GetModelLimitCallback = (providerID: string, modelID: string) => number | undefined;
|
|
12
|
-
export interface PreemptiveCompactionOptions {
|
|
13
|
-
experimental?: ExperimentalConfig;
|
|
14
|
-
onBeforeSummarize?: BeforeSummarizeCallback;
|
|
15
|
-
getModelLimit?: GetModelLimitCallback;
|
|
16
|
-
}
|
|
17
|
-
export declare function createPreemptiveCompactionHook(ctx: PluginInput, options?: PreemptiveCompactionOptions): {
|
|
18
|
-
event: ({ event }: {
|
|
19
|
-
event: {
|
|
20
|
-
type: string;
|
|
21
|
-
properties?: unknown;
|
|
22
|
-
};
|
|
23
|
-
}) => Promise<void>;
|
|
24
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface PreemptiveCompactionState {
|
|
2
|
-
lastCompactionTime: Map<string, number>;
|
|
3
|
-
compactionInProgress: Set<string>;
|
|
4
|
-
}
|
|
5
|
-
export interface TokenInfo {
|
|
6
|
-
input: number;
|
|
7
|
-
output: number;
|
|
8
|
-
reasoning: number;
|
|
9
|
-
cache: {
|
|
10
|
-
read: number;
|
|
11
|
-
write: number;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export interface ModelLimits {
|
|
15
|
-
context: number;
|
|
16
|
-
output: number;
|
|
17
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { NapiLanguage, AnalyzeResult, MetaVariable } from "./types";
|
|
2
|
-
export declare function parseCode(code: string, lang: NapiLanguage): import("@ast-grep/napi").SgRoot<import("@ast-grep/napi/types/staticTypes").TypesMap>;
|
|
3
|
-
export declare function findPattern(root: ReturnType<typeof parseCode>, pattern: string): import("@ast-grep/napi").SgNode<import("@ast-grep/napi/types/staticTypes").TypesMap, import("@ast-grep/napi/types/staticTypes").Kinds<import("@ast-grep/napi/types/staticTypes").TypesMap>>[];
|
|
4
|
-
export declare function extractMetaVariables(node: ReturnType<ReturnType<typeof parseCode>["root"]>, pattern: string): MetaVariable[];
|
|
5
|
-
export declare function analyzeCode(code: string, lang: NapiLanguage, pattern: string, shouldExtractMetaVars: boolean): AnalyzeResult[];
|
|
6
|
-
export declare function transformCode(code: string, lang: NapiLanguage, pattern: string, rewrite: string): {
|
|
7
|
-
transformed: string;
|
|
8
|
-
editCount: number;
|
|
9
|
-
};
|
|
10
|
-
export declare function getRootInfo(code: string, lang: NapiLanguage): {
|
|
11
|
-
kind: string;
|
|
12
|
-
childCount: number;
|
|
13
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{auth/antigravity/oauth.test.d.ts → hooks/auto-update-checker/checker.test.d.ts}
RENAMED
|
File without changes
|
/package/dist/{auth/antigravity/request.test.d.ts → hooks/auto-update-checker/index.test.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/{auth/antigravity/token.test.d.ts → hooks/delegate-task-retry/index.test.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|