oh-my-opencode 2.7.2 → 2.8.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 -4
- package/README.ko.md +10 -4
- package/README.md +10 -4
- package/README.zh-cn.md +10 -4
- 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/doctor/checks/auth.d.ts +7 -0
- package/dist/cli/doctor/checks/config.d.ts +8 -0
- package/dist/cli/doctor/checks/dependencies.d.ts +8 -0
- package/dist/cli/doctor/checks/dependencies.test.d.ts +1 -0
- package/dist/cli/doctor/checks/index.d.ts +10 -0
- package/dist/cli/doctor/checks/lsp.d.ts +8 -0
- package/dist/cli/doctor/checks/lsp.test.d.ts +1 -0
- package/dist/cli/doctor/checks/mcp.d.ts +6 -0
- package/dist/cli/doctor/checks/mcp.test.d.ts +1 -0
- package/dist/cli/doctor/checks/opencode.d.ts +10 -0
- package/dist/cli/doctor/checks/opencode.test.d.ts +1 -0
- package/dist/cli/doctor/checks/plugin.d.ts +4 -0
- package/dist/cli/doctor/checks/plugin.test.d.ts +1 -0
- package/dist/cli/doctor/checks/version.d.ts +4 -0
- package/dist/cli/doctor/checks/version.test.d.ts +1 -0
- package/dist/cli/doctor/constants.d.ts +39 -0
- package/dist/cli/doctor/formatter.d.ts +12 -0
- package/dist/cli/doctor/formatter.test.d.ts +1 -0
- package/dist/cli/doctor/index.d.ts +5 -0
- package/dist/cli/doctor/runner.d.ts +7 -0
- package/dist/cli/doctor/runner.test.d.ts +1 -0
- package/dist/cli/doctor/types.d.ts +91 -0
- package/dist/cli/index.js +14180 -76
- package/dist/config/index.d.ts +2 -2
- package/dist/config/schema.d.ts +96 -4
- package/dist/features/builtin-commands/templates/ralph-loop.d.ts +2 -0
- package/dist/features/builtin-commands/types.d.ts +1 -1
- package/dist/features/builtin-skills/index.d.ts +2 -0
- package/dist/features/builtin-skills/skills.d.ts +2 -0
- package/dist/features/builtin-skills/types.d.ts +13 -0
- package/dist/features/{claude-code-skill-loader → opencode-skill-loader}/index.d.ts +1 -0
- package/dist/features/opencode-skill-loader/loader.d.ts +41 -0
- package/dist/features/opencode-skill-loader/merger.d.ts +7 -0
- package/dist/features/opencode-skill-loader/types.d.ts +25 -0
- package/dist/hooks/{anthropic-auto-compact → anthropic-context-window-limit-recovery}/executor.d.ts +1 -1
- package/dist/hooks/anthropic-context-window-limit-recovery/executor.test.d.ts +1 -0
- package/dist/hooks/{anthropic-auto-compact → anthropic-context-window-limit-recovery}/index.d.ts +3 -2
- package/dist/hooks/anthropic-context-window-limit-recovery/pruning-deduplication.test.d.ts +1 -0
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/ralph-loop/constants.d.ts +5 -0
- package/dist/hooks/ralph-loop/index.d.ts +20 -0
- package/dist/hooks/ralph-loop/index.test.d.ts +1 -0
- package/dist/hooks/ralph-loop/storage.d.ts +6 -0
- package/dist/hooks/ralph-loop/types.d.ts +13 -0
- package/dist/hooks/think-mode/index.test.d.ts +1 -0
- package/dist/hooks/think-mode/switcher.d.ts +54 -1
- package/dist/hooks/think-mode/switcher.test.d.ts +1 -0
- package/dist/index.js +1287 -353
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/interactive-bash/constants.d.ts +1 -1
- package/dist/tools/look-at/constants.d.ts +1 -1
- package/dist/tools/lsp/utils.d.ts +1 -0
- package/dist/tools/skill/constants.d.ts +3 -0
- package/dist/tools/skill/index.d.ts +3 -0
- package/dist/tools/skill/tools.d.ts +10 -0
- package/dist/tools/skill/types.d.ts +20 -0
- package/dist/tools/slashcommand/types.d.ts +3 -3
- package/package.json +1 -1
- package/dist/features/claude-code-skill-loader/loader.d.ts +0 -3
- package/dist/features/claude-code-skill-loader/types.d.ts +0 -13
- /package/dist/{hooks/anthropic-auto-compact/executor.test.d.ts → cli/doctor/checks/auth.test.d.ts} +0 -0
- /package/dist/{hooks/anthropic-auto-compact/pruning-deduplication.test.d.ts → cli/doctor/checks/config.test.d.ts} +0 -0
- /package/dist/hooks/{anthropic-auto-compact → anthropic-context-window-limit-recovery}/parser.d.ts +0 -0
- /package/dist/hooks/{anthropic-auto-compact → anthropic-context-window-limit-recovery}/pruning-deduplication.d.ts +0 -0
- /package/dist/hooks/{anthropic-auto-compact → anthropic-context-window-limit-recovery}/pruning-executor.d.ts +0 -0
- /package/dist/hooks/{anthropic-auto-compact → anthropic-context-window-limit-recovery}/pruning-purge-errors.d.ts +0 -0
- /package/dist/hooks/{anthropic-auto-compact → anthropic-context-window-limit-recovery}/pruning-storage.d.ts +0 -0
- /package/dist/hooks/{anthropic-auto-compact → anthropic-context-window-limit-recovery}/pruning-supersede.d.ts +0 -0
- /package/dist/hooks/{anthropic-auto-compact → anthropic-context-window-limit-recovery}/pruning-types.d.ts +0 -0
- /package/dist/hooks/{anthropic-auto-compact → anthropic-context-window-limit-recovery}/storage.d.ts +0 -0
- /package/dist/hooks/{anthropic-auto-compact → anthropic-context-window-limit-recovery}/types.d.ts +0 -0
package/dist/config/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { OhMyOpenCodeConfigSchema, AgentOverrideConfigSchema, AgentOverridesSchema, McpNameSchema, AgentNameSchema, HookNameSchema, BuiltinCommandNameSchema, SisyphusAgentConfigSchema, ExperimentalConfigSchema, } from "./schema";
|
|
2
|
-
export type { OhMyOpenCodeConfig, AgentOverrideConfig, AgentOverrides, McpName, AgentName, HookName, BuiltinCommandName, SisyphusAgentConfig, ExperimentalConfig, DynamicContextPruningConfig, } from "./schema";
|
|
1
|
+
export { OhMyOpenCodeConfigSchema, AgentOverrideConfigSchema, AgentOverridesSchema, McpNameSchema, AgentNameSchema, HookNameSchema, BuiltinCommandNameSchema, SisyphusAgentConfigSchema, ExperimentalConfigSchema, RalphLoopConfigSchema, } from "./schema";
|
|
2
|
+
export type { OhMyOpenCodeConfig, AgentOverrideConfig, AgentOverrides, McpName, AgentName, HookName, BuiltinCommandName, SisyphusAgentConfig, ExperimentalConfig, DynamicContextPruningConfig, RalphLoopConfig, } from "./schema";
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export declare const HookNameSchema: z.ZodEnum<{
|
|
|
42
42
|
"directory-readme-injector": "directory-readme-injector";
|
|
43
43
|
"empty-task-response-detector": "empty-task-response-detector";
|
|
44
44
|
"think-mode": "think-mode";
|
|
45
|
-
"anthropic-
|
|
45
|
+
"anthropic-context-window-limit-recovery": "anthropic-context-window-limit-recovery";
|
|
46
46
|
"rules-injector": "rules-injector";
|
|
47
47
|
"background-notification": "background-notification";
|
|
48
48
|
"auto-update-checker": "auto-update-checker";
|
|
@@ -53,6 +53,8 @@ export declare const HookNameSchema: z.ZodEnum<{
|
|
|
53
53
|
"interactive-bash-session": "interactive-bash-session";
|
|
54
54
|
"empty-message-sanitizer": "empty-message-sanitizer";
|
|
55
55
|
"thinking-block-validator": "thinking-block-validator";
|
|
56
|
+
"ralph-loop": "ralph-loop";
|
|
57
|
+
"dcp-for-compaction": "dcp-for-compaction";
|
|
56
58
|
}>;
|
|
57
59
|
export declare const BuiltinCommandNameSchema: z.ZodEnum<{
|
|
58
60
|
"init-deep": "init-deep";
|
|
@@ -699,7 +701,66 @@ export declare const ExperimentalConfigSchema: z.ZodObject<{
|
|
|
699
701
|
}, z.core.$strip>>;
|
|
700
702
|
}, z.core.$strip>>;
|
|
701
703
|
}, z.core.$strip>>;
|
|
702
|
-
|
|
704
|
+
}, z.core.$strip>;
|
|
705
|
+
export declare const SkillSourceSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
706
|
+
path: z.ZodString;
|
|
707
|
+
recursive: z.ZodOptional<z.ZodBoolean>;
|
|
708
|
+
glob: z.ZodOptional<z.ZodString>;
|
|
709
|
+
}, z.core.$strip>]>;
|
|
710
|
+
export declare const SkillDefinitionSchema: z.ZodObject<{
|
|
711
|
+
description: z.ZodOptional<z.ZodString>;
|
|
712
|
+
template: z.ZodOptional<z.ZodString>;
|
|
713
|
+
from: z.ZodOptional<z.ZodString>;
|
|
714
|
+
model: z.ZodOptional<z.ZodString>;
|
|
715
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
716
|
+
subtask: z.ZodOptional<z.ZodBoolean>;
|
|
717
|
+
"argument-hint": z.ZodOptional<z.ZodString>;
|
|
718
|
+
license: z.ZodOptional<z.ZodString>;
|
|
719
|
+
compatibility: z.ZodOptional<z.ZodString>;
|
|
720
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
721
|
+
"allowed-tools": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
722
|
+
disable: z.ZodOptional<z.ZodBoolean>;
|
|
723
|
+
}, z.core.$strip>;
|
|
724
|
+
export declare const SkillEntrySchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
725
|
+
description: z.ZodOptional<z.ZodString>;
|
|
726
|
+
template: z.ZodOptional<z.ZodString>;
|
|
727
|
+
from: z.ZodOptional<z.ZodString>;
|
|
728
|
+
model: z.ZodOptional<z.ZodString>;
|
|
729
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
730
|
+
subtask: z.ZodOptional<z.ZodBoolean>;
|
|
731
|
+
"argument-hint": z.ZodOptional<z.ZodString>;
|
|
732
|
+
license: z.ZodOptional<z.ZodString>;
|
|
733
|
+
compatibility: z.ZodOptional<z.ZodString>;
|
|
734
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
735
|
+
"allowed-tools": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
736
|
+
disable: z.ZodOptional<z.ZodBoolean>;
|
|
737
|
+
}, z.core.$strip>]>;
|
|
738
|
+
export declare const SkillsConfigSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
739
|
+
description: z.ZodOptional<z.ZodString>;
|
|
740
|
+
template: z.ZodOptional<z.ZodString>;
|
|
741
|
+
from: z.ZodOptional<z.ZodString>;
|
|
742
|
+
model: z.ZodOptional<z.ZodString>;
|
|
743
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
744
|
+
subtask: z.ZodOptional<z.ZodBoolean>;
|
|
745
|
+
"argument-hint": z.ZodOptional<z.ZodString>;
|
|
746
|
+
license: z.ZodOptional<z.ZodString>;
|
|
747
|
+
compatibility: z.ZodOptional<z.ZodString>;
|
|
748
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
749
|
+
"allowed-tools": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
750
|
+
disable: z.ZodOptional<z.ZodBoolean>;
|
|
751
|
+
}, z.core.$strip>]>>, z.ZodObject<{
|
|
752
|
+
sources: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
753
|
+
path: z.ZodString;
|
|
754
|
+
recursive: z.ZodOptional<z.ZodBoolean>;
|
|
755
|
+
glob: z.ZodOptional<z.ZodString>;
|
|
756
|
+
}, z.core.$strip>]>>>>;
|
|
757
|
+
enable: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
758
|
+
disable: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
759
|
+
}, z.core.$strip>>]>;
|
|
760
|
+
export declare const RalphLoopConfigSchema: z.ZodObject<{
|
|
761
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
762
|
+
default_max_iterations: z.ZodDefault<z.ZodNumber>;
|
|
763
|
+
state_dir: z.ZodOptional<z.ZodString>;
|
|
703
764
|
}, z.core.$strip>;
|
|
704
765
|
export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
705
766
|
$schema: z.ZodOptional<z.ZodString>;
|
|
@@ -729,7 +790,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
729
790
|
"directory-readme-injector": "directory-readme-injector";
|
|
730
791
|
"empty-task-response-detector": "empty-task-response-detector";
|
|
731
792
|
"think-mode": "think-mode";
|
|
732
|
-
"anthropic-
|
|
793
|
+
"anthropic-context-window-limit-recovery": "anthropic-context-window-limit-recovery";
|
|
733
794
|
"rules-injector": "rules-injector";
|
|
734
795
|
"background-notification": "background-notification";
|
|
735
796
|
"auto-update-checker": "auto-update-checker";
|
|
@@ -740,6 +801,8 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
740
801
|
"interactive-bash-session": "interactive-bash-session";
|
|
741
802
|
"empty-message-sanitizer": "empty-message-sanitizer";
|
|
742
803
|
"thinking-block-validator": "thinking-block-validator";
|
|
804
|
+
"ralph-loop": "ralph-loop";
|
|
805
|
+
"dcp-for-compaction": "dcp-for-compaction";
|
|
743
806
|
}>>>;
|
|
744
807
|
disabled_commands: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
745
808
|
"init-deep": "init-deep";
|
|
@@ -1314,9 +1377,35 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
1314
1377
|
}, z.core.$strip>>;
|
|
1315
1378
|
}, z.core.$strip>>;
|
|
1316
1379
|
}, z.core.$strip>>;
|
|
1317
|
-
dcp_for_compaction: z.ZodOptional<z.ZodBoolean>;
|
|
1318
1380
|
}, z.core.$strip>>;
|
|
1319
1381
|
auto_update: z.ZodOptional<z.ZodBoolean>;
|
|
1382
|
+
skills: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
1383
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1384
|
+
template: z.ZodOptional<z.ZodString>;
|
|
1385
|
+
from: z.ZodOptional<z.ZodString>;
|
|
1386
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1387
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
1388
|
+
subtask: z.ZodOptional<z.ZodBoolean>;
|
|
1389
|
+
"argument-hint": z.ZodOptional<z.ZodString>;
|
|
1390
|
+
license: z.ZodOptional<z.ZodString>;
|
|
1391
|
+
compatibility: z.ZodOptional<z.ZodString>;
|
|
1392
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1393
|
+
"allowed-tools": z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1394
|
+
disable: z.ZodOptional<z.ZodBoolean>;
|
|
1395
|
+
}, z.core.$strip>]>>, z.ZodObject<{
|
|
1396
|
+
sources: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1397
|
+
path: z.ZodString;
|
|
1398
|
+
recursive: z.ZodOptional<z.ZodBoolean>;
|
|
1399
|
+
glob: z.ZodOptional<z.ZodString>;
|
|
1400
|
+
}, z.core.$strip>]>>>>;
|
|
1401
|
+
enable: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1402
|
+
disable: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1403
|
+
}, z.core.$strip>>]>>;
|
|
1404
|
+
ralph_loop: z.ZodOptional<z.ZodObject<{
|
|
1405
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1406
|
+
default_max_iterations: z.ZodDefault<z.ZodNumber>;
|
|
1407
|
+
state_dir: z.ZodOptional<z.ZodString>;
|
|
1408
|
+
}, z.core.$strip>>;
|
|
1320
1409
|
}, z.core.$strip>;
|
|
1321
1410
|
export type OhMyOpenCodeConfig = z.infer<typeof OhMyOpenCodeConfigSchema>;
|
|
1322
1411
|
export type AgentOverrideConfig = z.infer<typeof AgentOverrideConfigSchema>;
|
|
@@ -1328,4 +1417,7 @@ export type SisyphusAgentConfig = z.infer<typeof SisyphusAgentConfigSchema>;
|
|
|
1328
1417
|
export type CommentCheckerConfig = z.infer<typeof CommentCheckerConfigSchema>;
|
|
1329
1418
|
export type ExperimentalConfig = z.infer<typeof ExperimentalConfigSchema>;
|
|
1330
1419
|
export type DynamicContextPruningConfig = z.infer<typeof DynamicContextPruningConfigSchema>;
|
|
1420
|
+
export type SkillsConfig = z.infer<typeof SkillsConfigSchema>;
|
|
1421
|
+
export type SkillDefinition = z.infer<typeof SkillDefinitionSchema>;
|
|
1422
|
+
export type RalphLoopConfig = z.infer<typeof RalphLoopConfigSchema>;
|
|
1331
1423
|
export { McpNameSchema, type McpName } from "../mcp/types";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const RALPH_LOOP_TEMPLATE = "You are starting a Ralph Loop - a self-referential development loop that runs until task completion.\n\n## How Ralph Loop Works\n\n1. You will work on the task continuously\n2. When you believe the task is FULLY complete, output: `<promise>{{COMPLETION_PROMISE}}</promise>`\n3. If you don't output the promise, the loop will automatically inject another prompt to continue\n4. Maximum iterations: Configurable (default 100)\n\n## Rules\n\n- Focus on completing the task fully, not partially\n- Don't output the completion promise until the task is truly done\n- Each iteration should make meaningful progress toward the goal\n- If stuck, try different approaches\n- Use todos to track your progress\n\n## Exit Conditions\n\n1. **Completion**: Output `<promise>DONE</promise>` (or custom promise text) when fully complete\n2. **Max Iterations**: Loop stops automatically at limit\n3. **Cancel**: User runs `/cancel-ralph` command\n\n## Your Task\n\nParse the arguments below and begin working on the task. The format is:\n`\"task description\" [--completion-promise=TEXT] [--max-iterations=N]`\n\nDefault completion promise is \"DONE\" and default max iterations is 100.";
|
|
2
|
+
export declare const CANCEL_RALPH_TEMPLATE = "Cancel the currently active Ralph Loop.\n\nThis will:\n1. Stop the loop from continuing\n2. Clear the loop state file\n3. Allow the session to end normally\n\nCheck if a loop is active and cancel it. Inform the user of the result.";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CommandDefinition } from "../claude-code-command-loader";
|
|
2
|
-
export type BuiltinCommandName = "init-deep";
|
|
2
|
+
export type BuiltinCommandName = "init-deep" | "ralph-loop" | "cancel-ralph";
|
|
3
3
|
export interface BuiltinCommandConfig {
|
|
4
4
|
disabled_commands?: BuiltinCommandName[];
|
|
5
5
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface BuiltinSkill {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
template: string;
|
|
5
|
+
license?: string;
|
|
6
|
+
compatibility?: string;
|
|
7
|
+
metadata?: Record<string, unknown>;
|
|
8
|
+
allowedTools?: string[];
|
|
9
|
+
agent?: string;
|
|
10
|
+
model?: string;
|
|
11
|
+
subtask?: boolean;
|
|
12
|
+
argumentHint?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { CommandDefinition } from "../claude-code-command-loader/types";
|
|
2
|
+
import type { LoadedSkill } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Load skills from Claude Code user directory (~/.claude/skills/)
|
|
5
|
+
*/
|
|
6
|
+
export declare function loadUserSkills(): Record<string, CommandDefinition>;
|
|
7
|
+
/**
|
|
8
|
+
* Load skills from Claude Code project directory (.claude/skills/)
|
|
9
|
+
*/
|
|
10
|
+
export declare function loadProjectSkills(): Record<string, CommandDefinition>;
|
|
11
|
+
/**
|
|
12
|
+
* Load skills from OpenCode global directory (~/.config/opencode/skill/)
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadOpencodeGlobalSkills(): Record<string, CommandDefinition>;
|
|
15
|
+
/**
|
|
16
|
+
* Load skills from OpenCode project directory (.opencode/skill/)
|
|
17
|
+
*/
|
|
18
|
+
export declare function loadOpencodeProjectSkills(): Record<string, CommandDefinition>;
|
|
19
|
+
/**
|
|
20
|
+
* Discover all skills from all sources with priority ordering.
|
|
21
|
+
* Priority order: opencode-project > project > opencode > user
|
|
22
|
+
*
|
|
23
|
+
* @returns Array of LoadedSkill objects for use in slashcommand discovery
|
|
24
|
+
*/
|
|
25
|
+
export declare function discoverAllSkills(): LoadedSkill[];
|
|
26
|
+
export interface DiscoverSkillsOptions {
|
|
27
|
+
includeClaudeCodePaths?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Discover skills with optional filtering.
|
|
31
|
+
* When includeClaudeCodePaths is false, only loads from OpenCode paths.
|
|
32
|
+
*/
|
|
33
|
+
export declare function discoverSkills(options?: DiscoverSkillsOptions): LoadedSkill[];
|
|
34
|
+
/**
|
|
35
|
+
* Get a skill by name from all available sources.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getSkillByName(name: string, options?: DiscoverSkillsOptions): LoadedSkill | undefined;
|
|
38
|
+
export declare function discoverUserClaudeSkills(): LoadedSkill[];
|
|
39
|
+
export declare function discoverProjectClaudeSkills(): LoadedSkill[];
|
|
40
|
+
export declare function discoverOpencodeGlobalSkills(): LoadedSkill[];
|
|
41
|
+
export declare function discoverOpencodeProjectSkills(): LoadedSkill[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LoadedSkill } from "./types";
|
|
2
|
+
import type { SkillsConfig } from "../../config/schema";
|
|
3
|
+
import type { BuiltinSkill } from "../builtin-skills/types";
|
|
4
|
+
export interface MergeSkillsOptions {
|
|
5
|
+
configDir?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function mergeSkills(builtinSkills: BuiltinSkill[], config: SkillsConfig | undefined, userClaudeSkills: LoadedSkill[], userOpencodeSkills: LoadedSkill[], projectClaudeSkills: LoadedSkill[], projectOpencodeSkills: LoadedSkill[], options?: MergeSkillsOptions): LoadedSkill[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { CommandDefinition } from "../claude-code-command-loader/types";
|
|
2
|
+
export type SkillScope = "builtin" | "config" | "user" | "project" | "opencode" | "opencode-project";
|
|
3
|
+
export interface SkillMetadata {
|
|
4
|
+
name?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
model?: string;
|
|
7
|
+
"argument-hint"?: string;
|
|
8
|
+
agent?: string;
|
|
9
|
+
subtask?: boolean;
|
|
10
|
+
license?: string;
|
|
11
|
+
compatibility?: string;
|
|
12
|
+
metadata?: Record<string, string>;
|
|
13
|
+
"allowed-tools"?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface LoadedSkill {
|
|
16
|
+
name: string;
|
|
17
|
+
path?: string;
|
|
18
|
+
resolvedPath?: string;
|
|
19
|
+
definition: CommandDefinition;
|
|
20
|
+
scope: SkillScope;
|
|
21
|
+
license?: string;
|
|
22
|
+
compatibility?: string;
|
|
23
|
+
metadata?: Record<string, string>;
|
|
24
|
+
allowedTools?: string[];
|
|
25
|
+
}
|
package/dist/hooks/{anthropic-auto-compact → anthropic-context-window-limit-recovery}/executor.d.ts
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AutoCompactState } from "./types";
|
|
2
2
|
import type { ExperimentalConfig } from "../../config";
|
|
3
3
|
export declare function getLastAssistant(sessionID: string, client: any, directory: string): Promise<Record<string, unknown> | null>;
|
|
4
|
-
export declare function executeCompact(sessionID: string, msg: Record<string, unknown>, autoCompactState: AutoCompactState, client: any, directory: string, experimental?: ExperimentalConfig): Promise<void>;
|
|
4
|
+
export declare function executeCompact(sessionID: string, msg: Record<string, unknown>, autoCompactState: AutoCompactState, client: any, directory: string, experimental?: ExperimentalConfig, dcpForCompaction?: boolean): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/hooks/{anthropic-auto-compact → anthropic-context-window-limit-recovery}/index.d.ts
RENAMED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
2
|
import type { ExperimentalConfig } from "../../config";
|
|
3
|
-
export interface
|
|
3
|
+
export interface AnthropicContextWindowLimitRecoveryOptions {
|
|
4
4
|
experimental?: ExperimentalConfig;
|
|
5
|
+
dcpForCompaction?: boolean;
|
|
5
6
|
}
|
|
6
|
-
export declare function
|
|
7
|
+
export declare function createAnthropicContextWindowLimitRecoveryHook(ctx: PluginInput, options?: AnthropicContextWindowLimitRecoveryOptions): {
|
|
7
8
|
event: ({ event }: {
|
|
8
9
|
event: {
|
|
9
10
|
type: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { createToolOutputTruncatorHook } from "./tool-output-truncator";
|
|
|
7
7
|
export { createDirectoryAgentsInjectorHook } from "./directory-agents-injector";
|
|
8
8
|
export { createDirectoryReadmeInjectorHook } from "./directory-readme-injector";
|
|
9
9
|
export { createEmptyTaskResponseDetectorHook } from "./empty-task-response-detector";
|
|
10
|
-
export {
|
|
10
|
+
export { createAnthropicContextWindowLimitRecoveryHook, type AnthropicContextWindowLimitRecoveryOptions } from "./anthropic-context-window-limit-recovery";
|
|
11
11
|
export { createPreemptiveCompactionHook, type PreemptiveCompactionOptions, type SummarizeContext, type BeforeSummarizeCallback } from "./preemptive-compaction";
|
|
12
12
|
export { createCompactionContextInjector } from "./compaction-context-injector";
|
|
13
13
|
export { createThinkModeHook } from "./think-mode";
|
|
@@ -21,3 +21,4 @@ export { createNonInteractiveEnvHook } from "./non-interactive-env";
|
|
|
21
21
|
export { createInteractiveBashSessionHook } from "./interactive-bash-session";
|
|
22
22
|
export { createEmptyMessageSanitizerHook } from "./empty-message-sanitizer";
|
|
23
23
|
export { createThinkingBlockValidatorHook } from "./thinking-block-validator";
|
|
24
|
+
export { createRalphLoopHook, type RalphLoopHook } from "./ralph-loop";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const HOOK_NAME = "ralph-loop";
|
|
2
|
+
export declare const DEFAULT_STATE_FILE = ".sisyphus/ralph-loop.local.md";
|
|
3
|
+
export declare const COMPLETION_TAG_PATTERN: RegExp;
|
|
4
|
+
export declare const DEFAULT_MAX_ITERATIONS = 100;
|
|
5
|
+
export declare const DEFAULT_COMPLETION_PROMISE = "DONE";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { RalphLoopState, RalphLoopOptions } from "./types";
|
|
3
|
+
export * from "./types";
|
|
4
|
+
export * from "./constants";
|
|
5
|
+
export { readState, writeState, clearState, incrementIteration } from "./storage";
|
|
6
|
+
export interface RalphLoopHook {
|
|
7
|
+
event: (input: {
|
|
8
|
+
event: {
|
|
9
|
+
type: string;
|
|
10
|
+
properties?: unknown;
|
|
11
|
+
};
|
|
12
|
+
}) => Promise<void>;
|
|
13
|
+
startLoop: (sessionID: string, prompt: string, options?: {
|
|
14
|
+
maxIterations?: number;
|
|
15
|
+
completionPromise?: string;
|
|
16
|
+
}) => boolean;
|
|
17
|
+
cancelLoop: (sessionID: string) => boolean;
|
|
18
|
+
getState: () => RalphLoopState | null;
|
|
19
|
+
}
|
|
20
|
+
export declare function createRalphLoopHook(ctx: PluginInput, options?: RalphLoopOptions): RalphLoopHook;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RalphLoopState } from "./types";
|
|
2
|
+
export declare function getStateFilePath(directory: string, customPath?: string): string;
|
|
3
|
+
export declare function readState(directory: string, customPath?: string): RalphLoopState | null;
|
|
4
|
+
export declare function writeState(directory: string, state: RalphLoopState, customPath?: string): boolean;
|
|
5
|
+
export declare function clearState(directory: string, customPath?: string): boolean;
|
|
6
|
+
export declare function incrementIteration(directory: string, customPath?: string): RalphLoopState | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RalphLoopConfig } from "../../config";
|
|
2
|
+
export interface RalphLoopState {
|
|
3
|
+
active: boolean;
|
|
4
|
+
iteration: number;
|
|
5
|
+
max_iterations: number;
|
|
6
|
+
completion_promise: string;
|
|
7
|
+
started_at: string;
|
|
8
|
+
prompt: string;
|
|
9
|
+
session_id?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface RalphLoopOptions {
|
|
12
|
+
config?: RalphLoopConfig;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Think Mode Switcher
|
|
3
|
+
*
|
|
4
|
+
* This module handles "thinking mode" activation for reasoning-capable models.
|
|
5
|
+
* When a user includes "think" keywords in their prompt, models are upgraded to
|
|
6
|
+
* their high-reasoning variants with extended thinking budgets.
|
|
7
|
+
*
|
|
8
|
+
* PROVIDER ALIASING:
|
|
9
|
+
* GitHub Copilot acts as a proxy provider that routes to underlying providers
|
|
10
|
+
* (Anthropic, Google, OpenAI). We resolve the proxy to the actual provider
|
|
11
|
+
* based on model name patterns, allowing GitHub Copilot to inherit thinking
|
|
12
|
+
* configurations without duplication.
|
|
13
|
+
*
|
|
14
|
+
* NORMALIZATION:
|
|
15
|
+
* Model IDs are normalized (dots → hyphens in version numbers) to handle API
|
|
16
|
+
* inconsistencies defensively while maintaining backwards compatibility.
|
|
17
|
+
*/
|
|
18
|
+
export declare const THINKING_CONFIGS: {
|
|
19
|
+
readonly anthropic: {
|
|
20
|
+
readonly thinking: {
|
|
21
|
+
readonly type: "enabled";
|
|
22
|
+
readonly budgetTokens: 64000;
|
|
23
|
+
};
|
|
24
|
+
readonly maxTokens: 128000;
|
|
25
|
+
};
|
|
26
|
+
readonly "amazon-bedrock": {
|
|
27
|
+
readonly reasoningConfig: {
|
|
28
|
+
readonly type: "enabled";
|
|
29
|
+
readonly budgetTokens: 32000;
|
|
30
|
+
};
|
|
31
|
+
readonly maxTokens: 64000;
|
|
32
|
+
};
|
|
33
|
+
readonly google: {
|
|
34
|
+
readonly providerOptions: {
|
|
35
|
+
readonly google: {
|
|
36
|
+
readonly thinkingConfig: {
|
|
37
|
+
readonly thinkingLevel: "HIGH";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
readonly "google-vertex": {
|
|
43
|
+
readonly providerOptions: {
|
|
44
|
+
readonly "google-vertex": {
|
|
45
|
+
readonly thinkingConfig: {
|
|
46
|
+
readonly thinkingLevel: "HIGH";
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
readonly openai: {
|
|
52
|
+
readonly reasoning_effort: "high";
|
|
53
|
+
};
|
|
54
|
+
};
|
|
2
55
|
export declare function getHighVariant(modelID: string): string | null;
|
|
3
56
|
export declare function isAlreadyHighVariant(modelID: string): boolean;
|
|
4
57
|
export declare function getThinkingConfig(providerID: string, modelID: string): Record<string, unknown> | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|