oh-my-opencode 2.10.0 → 2.12.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.
- package/README.ja.md +10 -0
- package/README.ko.md +10 -0
- package/README.md +30 -0
- package/README.zh-cn.md +10 -0
- package/dist/cli/index.js +3048 -360
- package/dist/config/schema.d.ts +165 -165
- package/dist/features/claude-code-command-loader/types.d.ts +19 -0
- package/dist/features/claude-code-mcp-loader/loader.d.ts +1 -0
- package/dist/features/claude-code-mcp-loader/loader.test.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/storage.test.d.ts +1 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +1 -1
- package/dist/hooks/auto-update-checker/constants.d.ts +4 -0
- package/dist/hooks/rules-injector/constants.d.ts +2 -0
- package/dist/hooks/rules-injector/finder.d.ts +1 -13
- package/dist/hooks/rules-injector/finder.test.d.ts +1 -0
- package/dist/hooks/rules-injector/parser.test.d.ts +1 -0
- package/dist/hooks/rules-injector/types.d.ts +13 -0
- package/dist/index.js +14839 -14444
- package/dist/plugin-config.d.ts +4 -0
- package/dist/plugin-handlers/config-handler.d.ts +10 -0
- package/dist/plugin-handlers/index.d.ts +1 -0
- package/dist/plugin-state.d.ts +6 -0
- package/dist/shared/frontmatter.d.ts +2 -2
- package/dist/shared/frontmatter.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
export type CommandScope = "user" | "project" | "opencode" | "opencode-project";
|
|
2
|
+
/**
|
|
3
|
+
* Handoff definition for command workflows.
|
|
4
|
+
* Based on speckit's handoff pattern for multi-agent orchestration.
|
|
5
|
+
* @see https://github.com/github/spec-kit
|
|
6
|
+
*/
|
|
7
|
+
export interface HandoffDefinition {
|
|
8
|
+
/** Human-readable label for the handoff action */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Target agent/command identifier (e.g., "speckit.tasks") */
|
|
11
|
+
agent: string;
|
|
12
|
+
/** Pre-filled prompt text for the handoff */
|
|
13
|
+
prompt: string;
|
|
14
|
+
/** If true, automatically executes after command completion; if false, shows as suggestion */
|
|
15
|
+
send?: boolean;
|
|
16
|
+
}
|
|
2
17
|
export interface CommandDefinition {
|
|
3
18
|
name: string;
|
|
4
19
|
description?: string;
|
|
@@ -7,6 +22,8 @@ export interface CommandDefinition {
|
|
|
7
22
|
model?: string;
|
|
8
23
|
subtask?: boolean;
|
|
9
24
|
argumentHint?: string;
|
|
25
|
+
/** Handoff definitions for workflow transitions */
|
|
26
|
+
handoffs?: HandoffDefinition[];
|
|
10
27
|
}
|
|
11
28
|
export interface CommandFrontmatter {
|
|
12
29
|
description?: string;
|
|
@@ -14,6 +31,8 @@ export interface CommandFrontmatter {
|
|
|
14
31
|
agent?: string;
|
|
15
32
|
model?: string;
|
|
16
33
|
subtask?: boolean;
|
|
34
|
+
/** Handoff definitions for workflow transitions */
|
|
35
|
+
handoffs?: HandoffDefinition[];
|
|
17
36
|
}
|
|
18
37
|
export interface LoadedCommand {
|
|
19
38
|
name: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { LoadedMcpServer, McpLoadResult } from "./types";
|
|
2
|
+
export declare function getSystemMcpServerNames(): Set<string>;
|
|
2
3
|
export declare function loadMcpConfigs(): Promise<McpLoadResult>;
|
|
3
4
|
export declare function formatLoadedServersForToast(loadedServers: LoadedMcpServer[]): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,6 +4,10 @@ export declare const NPM_FETCH_TIMEOUT = 5000;
|
|
|
4
4
|
export declare const CACHE_DIR: string;
|
|
5
5
|
export declare const VERSION_FILE: string;
|
|
6
6
|
export declare const INSTALLED_PACKAGE_JSON: string;
|
|
7
|
+
/**
|
|
8
|
+
* Get the Windows-specific APPDATA directory (for fallback checks)
|
|
9
|
+
*/
|
|
10
|
+
export declare function getWindowsAppdataDir(): string | null;
|
|
7
11
|
export declare const USER_CONFIG_DIR: string;
|
|
8
12
|
export declare const USER_OPENCODE_CONFIG: string;
|
|
9
13
|
export declare const USER_OPENCODE_CONFIG_JSONC: string;
|
|
@@ -2,5 +2,7 @@ export declare const OPENCODE_STORAGE: string;
|
|
|
2
2
|
export declare const RULES_INJECTOR_STORAGE: string;
|
|
3
3
|
export declare const PROJECT_MARKERS: string[];
|
|
4
4
|
export declare const PROJECT_RULE_SUBDIRS: [string, string][];
|
|
5
|
+
export declare const PROJECT_RULE_FILES: string[];
|
|
6
|
+
export declare const GITHUB_INSTRUCTIONS_PATTERN: RegExp;
|
|
5
7
|
export declare const USER_RULE_DIR = ".claude/rules";
|
|
6
8
|
export declare const RULE_EXTENSIONS: string[];
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Candidate rule file with metadata for filtering and sorting
|
|
3
|
-
*/
|
|
4
|
-
export interface RuleFileCandidate {
|
|
5
|
-
/** Absolute path to the rule file */
|
|
6
|
-
path: string;
|
|
7
|
-
/** Real path after symlink resolution (for duplicate detection) */
|
|
8
|
-
realPath: string;
|
|
9
|
-
/** Whether this is a global/user-level rule */
|
|
10
|
-
isGlobal: boolean;
|
|
11
|
-
/** Directory distance from current file (9999 for global rules) */
|
|
12
|
-
distance: number;
|
|
13
|
-
}
|
|
1
|
+
import type { RuleFileCandidate } from "./types";
|
|
14
2
|
/**
|
|
15
3
|
* Find project root by walking up from startPath.
|
|
16
4
|
* Checks for PROJECT_MARKERS (.git, pyproject.toml, package.json, etc.)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Rule file metadata (Claude Code style frontmatter)
|
|
3
|
+
* Supports both Claude Code format (globs, paths) and GitHub Copilot format (applyTo)
|
|
3
4
|
* @see https://docs.anthropic.com/en/docs/claude-code/settings#rule-files
|
|
5
|
+
* @see https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot
|
|
4
6
|
*/
|
|
5
7
|
export interface RuleMetadata {
|
|
6
8
|
description?: string;
|
|
@@ -28,6 +30,17 @@ export interface RuleInfo {
|
|
|
28
30
|
/** Real path after symlink resolution (for duplicate detection) */
|
|
29
31
|
realPath: string;
|
|
30
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Rule file candidate with discovery context
|
|
35
|
+
*/
|
|
36
|
+
export interface RuleFileCandidate {
|
|
37
|
+
path: string;
|
|
38
|
+
realPath: string;
|
|
39
|
+
isGlobal: boolean;
|
|
40
|
+
distance: number;
|
|
41
|
+
/** Single-file rules (e.g., .github/copilot-instructions.md) always apply without frontmatter */
|
|
42
|
+
isSingleFile?: boolean;
|
|
43
|
+
}
|
|
31
44
|
/**
|
|
32
45
|
* Session storage for injected rules tracking
|
|
33
46
|
*/
|