oh-my-opencode 2.8.0 → 2.8.1
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 +14 -10
- package/README.ko.md +14 -10
- package/README.md +10 -6
- package/README.zh-cn.md +14 -10
- package/dist/cli/index.js +6 -6
- package/dist/config/schema.d.ts +6 -6
- package/dist/index.js +9 -9
- package/package.json +1 -1
package/README.ja.md
CHANGED
|
@@ -874,7 +874,7 @@ Oh My OpenCode は以下の場所からフックを読み込んで実行しま
|
|
|
874
874
|
}
|
|
875
875
|
```
|
|
876
876
|
|
|
877
|
-
利用可能なフック:`todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `
|
|
877
|
+
利用可能なフック:`todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `directory-agents-injector`, `directory-readme-injector`, `empty-task-response-detector`, `think-mode`, `anthropic-context-window-limit-recovery`, `rules-injector`, `background-notification`, `auto-update-checker`, `startup-toast`, `keyword-detector`, `agent-usage-reminder`, `non-interactive-env`, `interactive-bash-session`, `empty-message-sanitizer`, `compaction-context-injector`, `thinking-block-validator`, `claude-code-hooks`, `ralph-loop`
|
|
878
878
|
|
|
879
879
|
**`auto-update-checker`と`startup-toast`について**: `startup-toast` フックは `auto-update-checker` のサブ機能です。アップデートチェックは有効なまま起動トースト通知のみを無効化するには、`disabled_hooks` に `"startup-toast"` を追加してください。すべてのアップデートチェック機能(トーストを含む)を無効化するには、`"auto-update-checker"` を追加してください。
|
|
880
880
|
|
|
@@ -926,20 +926,24 @@ OpenCode でサポートされるすべての LSP 構成およびカスタム設
|
|
|
926
926
|
```json
|
|
927
927
|
{
|
|
928
928
|
"experimental": {
|
|
929
|
+
"tool_output_truncator": true,
|
|
930
|
+
"preemptive_compaction": true,
|
|
931
|
+
"truncate_all_tool_outputs": true,
|
|
929
932
|
"aggressive_truncation": true,
|
|
930
|
-
"auto_resume": true
|
|
931
|
-
"truncate_all_tool_outputs": false
|
|
933
|
+
"auto_resume": true
|
|
932
934
|
}
|
|
933
935
|
}
|
|
934
936
|
```
|
|
935
937
|
|
|
936
|
-
| オプション
|
|
937
|
-
|
|
|
938
|
-
| `
|
|
939
|
-
| `
|
|
940
|
-
| `
|
|
941
|
-
|
|
942
|
-
|
|
938
|
+
| オプション | デフォルト | 説明 |
|
|
939
|
+
| --------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
940
|
+
| `tool_output_truncator` | `false` | コンテキストウィンドウの使用状況に基づいてツール出力(Grep、Glob、LSP、AST-grepなど)を動的に切り詰めます。プロンプトが長くなりすぎるのを防ぎます。 |
|
|
941
|
+
| `preemptive_compaction` | `false` | トークン制限に達する前にセッションを事前にコンパクションします。デフォルトでコンテキストウィンドウ使用率80%で実行されます。 |
|
|
942
|
+
| `preemptive_compaction_threshold` | `0.80` | プリエンプティブコンパクションをトリガーする閾値(0.5-0.95)。`preemptive_compaction`が有効な場合のみ適用されます。 |
|
|
943
|
+
| `truncate_all_tool_outputs` | `false` | `tool_output_truncator`が有効な場合、ホワイトリストのツール(Grep、Glob、LSP、AST-grep)だけでなく、すべてのツール出力を切り詰めます。 |
|
|
944
|
+
| `aggressive_truncation` | `false` | トークン制限を超えた場合、ツール出力を積極的に切り詰めて制限内に収めます。デフォルトの切り詰めより積極的です。不十分な場合は要約/復元にフォールバックします。 |
|
|
945
|
+
| `auto_resume` | `false` | thinking block エラーや thinking disabled violation からの回復成功後、自動的にセッションを再開します。最後のユーザーメッセージを抽出して続行します。 |
|
|
946
|
+
| `dcp_for_compaction` | `false` | コンパクション用DCP(動的コンテキスト整理)を有効化 - トークン制限超過時に最初に実行されます。コンパクション前に重複したツール呼び出しと古いツール出力を整理します。 |
|
|
943
947
|
|
|
944
948
|
**警告**:これらの機能は実験的であり、予期しない動作を引き起こす可能性があります。影響を理解した場合にのみ有効にしてください。
|
|
945
949
|
|
package/README.ko.md
CHANGED
|
@@ -871,7 +871,7 @@ Schema 자동 완성이 지원됩니다:
|
|
|
871
871
|
}
|
|
872
872
|
```
|
|
873
873
|
|
|
874
|
-
사용 가능한 훅: `todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `
|
|
874
|
+
사용 가능한 훅: `todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `directory-agents-injector`, `directory-readme-injector`, `empty-task-response-detector`, `think-mode`, `anthropic-context-window-limit-recovery`, `rules-injector`, `background-notification`, `auto-update-checker`, `startup-toast`, `keyword-detector`, `agent-usage-reminder`, `non-interactive-env`, `interactive-bash-session`, `empty-message-sanitizer`, `compaction-context-injector`, `thinking-block-validator`, `claude-code-hooks`, `ralph-loop`
|
|
875
875
|
|
|
876
876
|
**`auto-update-checker`와 `startup-toast`에 대한 참고사항**: `startup-toast` 훅은 `auto-update-checker`의 하위 기능입니다. 업데이트 확인은 유지하면서 시작 토스트 알림만 비활성화하려면 `disabled_hooks`에 `"startup-toast"`를 추가하세요. 모든 업데이트 확인 기능(토스트 포함)을 비활성화하려면 `"auto-update-checker"`를 추가하세요.
|
|
877
877
|
|
|
@@ -923,20 +923,24 @@ OpenCode 에서 지원하는 모든 LSP 구성 및 커스텀 설정 (opencode.js
|
|
|
923
923
|
```json
|
|
924
924
|
{
|
|
925
925
|
"experimental": {
|
|
926
|
+
"tool_output_truncator": true,
|
|
927
|
+
"preemptive_compaction": true,
|
|
928
|
+
"truncate_all_tool_outputs": true,
|
|
926
929
|
"aggressive_truncation": true,
|
|
927
|
-
"auto_resume": true
|
|
928
|
-
"truncate_all_tool_outputs": false
|
|
930
|
+
"auto_resume": true
|
|
929
931
|
}
|
|
930
932
|
}
|
|
931
933
|
```
|
|
932
934
|
|
|
933
|
-
| 옵션
|
|
934
|
-
|
|
|
935
|
-
| `
|
|
936
|
-
| `
|
|
937
|
-
| `
|
|
938
|
-
|
|
939
|
-
|
|
935
|
+
| 옵션 | 기본값 | 설명 |
|
|
936
|
+
| --------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
937
|
+
| `tool_output_truncator` | `false` | 컨텍스트 윈도우 사용량에 따라 도구 출력(Grep, Glob, LSP, AST-grep 등)을 동적으로 잘라냅니다. 프롬프트가 너무 길어지는 것을 방지합니다. |
|
|
938
|
+
| `preemptive_compaction` | `false` | 토큰 제한에 도달하기 전에 세션을 미리 컴팩션합니다. 기본적으로 컨텍스트 윈도우 사용량이 80%일 때 실행됩니다. |
|
|
939
|
+
| `preemptive_compaction_threshold` | `0.80` | 선제적 컴팩션을 트리거할 임계값 비율(0.5-0.95). `preemptive_compaction`이 활성화된 경우에만 적용됩니다. |
|
|
940
|
+
| `truncate_all_tool_outputs` | `false` | `tool_output_truncator`가 활성화된 경우, 화이트리스트 도구(Grep, Glob, LSP, AST-grep)만이 아닌 모든 도구 출력을 잘라냅니다. |
|
|
941
|
+
| `aggressive_truncation` | `false` | 토큰 제한을 초과하면 도구 출력을 공격적으로 잘라내어 제한 내에 맞춥니다. 기본 truncation보다 더 공격적입니다. 부족하면 요약/복구로 fallback합니다. |
|
|
942
|
+
| `auto_resume` | `false` | thinking block 에러나 thinking disabled violation으로부터 성공적으로 복구한 후 자동으로 세션을 재개합니다. 마지막 사용자 메시지를 추출하여 계속합니다. |
|
|
943
|
+
| `dcp_for_compaction` | `false` | 컴팩션용 DCP(동적 컨텍스트 정리) 활성화 - 토큰 제한 초과 시 먼저 실행됩니다. 컴팩션 전에 중복 도구 호출과 오래된 도구 출력을 정리합니다. |
|
|
940
944
|
|
|
941
945
|
**경고**: 이 기능들은 실험적이며 예상치 못한 동작을 유발할 수 있습니다. 의미를 이해한 경우에만 활성화하세요.
|
|
942
946
|
|
package/README.md
CHANGED
|
@@ -910,7 +910,7 @@ Disable specific built-in hooks via `disabled_hooks` in `~/.config/opencode/oh-m
|
|
|
910
910
|
}
|
|
911
911
|
```
|
|
912
912
|
|
|
913
|
-
Available hooks: `todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `
|
|
913
|
+
Available hooks: `todo-continuation-enforcer`, `context-window-monitor`, `session-recovery`, `session-notification`, `comment-checker`, `grep-output-truncator`, `directory-agents-injector`, `directory-readme-injector`, `empty-task-response-detector`, `think-mode`, `anthropic-context-window-limit-recovery`, `rules-injector`, `background-notification`, `auto-update-checker`, `startup-toast`, `keyword-detector`, `agent-usage-reminder`, `non-interactive-env`, `interactive-bash-session`, `empty-message-sanitizer`, `compaction-context-injector`, `thinking-block-validator`, `claude-code-hooks`, `ralph-loop`
|
|
914
914
|
|
|
915
915
|
**Note on `auto-update-checker` and `startup-toast`**: The `startup-toast` hook is a sub-feature of `auto-update-checker`. To disable only the startup toast notification while keeping update checking enabled, add `"startup-toast"` to `disabled_hooks`. To disable all update checking features (including the toast), add `"auto-update-checker"` to `disabled_hooks`.
|
|
916
916
|
|
|
@@ -962,20 +962,24 @@ Opt-in experimental features that may change or be removed in future versions. U
|
|
|
962
962
|
```json
|
|
963
963
|
{
|
|
964
964
|
"experimental": {
|
|
965
|
+
"tool_output_truncator": true,
|
|
966
|
+
"preemptive_compaction": true,
|
|
967
|
+
"truncate_all_tool_outputs": true,
|
|
965
968
|
"aggressive_truncation": true,
|
|
966
|
-
"auto_resume": true
|
|
967
|
-
"truncate_all_tool_outputs": false
|
|
969
|
+
"auto_resume": true
|
|
968
970
|
}
|
|
969
971
|
}
|
|
970
972
|
```
|
|
971
973
|
|
|
972
974
|
| Option | Default | Description |
|
|
973
975
|
| --------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
976
|
+
| `tool_output_truncator` | `false` | Enable dynamic truncation of tool outputs (Grep, Glob, LSP, AST-grep, etc.) based on context window usage. Prevents prompts from becoming too long. |
|
|
977
|
+
| `preemptive_compaction` | `false` | Compacts session proactively before hitting hard token limits. Runs at 80% context window usage by default. |
|
|
978
|
+
| `preemptive_compaction_threshold` | `0.80` | Threshold percentage (0.5-0.95) to trigger preemptive compaction. Only applies when `preemptive_compaction` is enabled. |
|
|
979
|
+
| `truncate_all_tool_outputs` | `false` | When `tool_output_truncator` is enabled, truncates ALL tool outputs instead of just whitelisted tools (Grep, Glob, LSP, AST-grep). |
|
|
974
980
|
| `aggressive_truncation` | `false` | When token limit is exceeded, aggressively truncates tool outputs to fit within limits. More aggressive than the default truncation behavior. Falls back to summarize/revert if insufficient. |
|
|
975
981
|
| `auto_resume` | `false` | Automatically resumes session after successful recovery from thinking block errors or thinking disabled violations. Extracts the last user message and continues. |
|
|
976
|
-
| `
|
|
977
|
-
|
|
978
|
-
**Note**: `dcp-for-compaction` (Dynamic Context Pruning for compaction) is now a hook, not an experimental feature. It's enabled by default and can be disabled via `disabled_hooks: ["dcp-for-compaction"]`.
|
|
982
|
+
| `dcp_for_compaction` | `false` | Enable DCP (Dynamic Context Pruning) for compaction - runs first when token limit exceeded. Prunes duplicate tool calls and old tool outputs before running compaction. |
|
|
979
983
|
|
|
980
984
|
**Warning**: These features are experimental and may cause unexpected behavior. Enable only if you understand the implications.
|
|
981
985
|
|
package/README.zh-cn.md
CHANGED
|
@@ -878,7 +878,7 @@ Sisyphus Agent 也能自定义:
|
|
|
878
878
|
}
|
|
879
879
|
```
|
|
880
880
|
|
|
881
|
-
可关的 hook:`todo-continuation-enforcer`、`context-window-monitor`、`session-recovery`、`session-notification`、`comment-checker`、`grep-output-truncator`、`
|
|
881
|
+
可关的 hook:`todo-continuation-enforcer`、`context-window-monitor`、`session-recovery`、`session-notification`、`comment-checker`、`grep-output-truncator`、`directory-agents-injector`、`directory-readme-injector`、`empty-task-response-detector`、`think-mode`、`anthropic-context-window-limit-recovery`、`rules-injector`、`background-notification`、`auto-update-checker`、`startup-toast`、`keyword-detector`、`agent-usage-reminder`、`non-interactive-env`、`interactive-bash-session`、`empty-message-sanitizer`、`compaction-context-injector`、`thinking-block-validator`、`claude-code-hooks`、`ralph-loop`
|
|
882
882
|
|
|
883
883
|
**关于 `auto-update-checker` 和 `startup-toast`**: `startup-toast` hook 是 `auto-update-checker` 的子功能。若想保持更新检查但只禁用启动提示通知,在 `disabled_hooks` 中添加 `"startup-toast"`。若要禁用所有更新检查功能(包括提示),添加 `"auto-update-checker"`。
|
|
884
884
|
|
|
@@ -930,20 +930,24 @@ Oh My OpenCode 送你重构工具(重命名、代码操作)。
|
|
|
930
930
|
```json
|
|
931
931
|
{
|
|
932
932
|
"experimental": {
|
|
933
|
+
"tool_output_truncator": true,
|
|
934
|
+
"preemptive_compaction": true,
|
|
935
|
+
"truncate_all_tool_outputs": true,
|
|
933
936
|
"aggressive_truncation": true,
|
|
934
|
-
"auto_resume": true
|
|
935
|
-
"truncate_all_tool_outputs": false
|
|
937
|
+
"auto_resume": true
|
|
936
938
|
}
|
|
937
939
|
}
|
|
938
940
|
```
|
|
939
941
|
|
|
940
|
-
| 选项
|
|
941
|
-
|
|
|
942
|
-
| `
|
|
943
|
-
| `
|
|
944
|
-
| `
|
|
945
|
-
|
|
946
|
-
|
|
942
|
+
| 选项 | 默认值 | 说明 |
|
|
943
|
+
| --------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
944
|
+
| `tool_output_truncator` | `false` | 根据上下文窗口使用情况动态截断工具输出(Grep、Glob、LSP、AST-grep 等)。防止提示过长。 |
|
|
945
|
+
| `preemptive_compaction` | `false` | 在达到 token 限制之前主动压缩会话。默认在上下文窗口使用率达到 80% 时运行。 |
|
|
946
|
+
| `preemptive_compaction_threshold` | `0.80` | 触发预先压缩的阈值比例(0.5-0.95)。仅在 `preemptive_compaction` 启用时生效。 |
|
|
947
|
+
| `truncate_all_tool_outputs` | `false` | 当 `tool_output_truncator` 启用时,截断所有工具输出,而不仅仅是白名单工具(Grep、Glob、LSP、AST-grep)。 |
|
|
948
|
+
| `aggressive_truncation` | `false` | 超出 token 限制时,激进地截断工具输出以适应限制。比默认截断更激进。不够的话会回退到摘要/恢复。 |
|
|
949
|
+
| `auto_resume` | `false` | 从 thinking block 错误或 thinking disabled violation 成功恢复后,自动恢复会话。提取最后一条用户消息继续执行。 |
|
|
950
|
+
| `dcp_for_compaction` | `false` | 启用压缩用 DCP(动态上下文剪枝)- 在超出 token 限制时首先执行。在压缩前清理重复的工具调用和旧的工具输出。 |
|
|
947
951
|
|
|
948
952
|
**警告**:这些功能是实验性的,可能会导致意外行为。只有在理解其影响的情况下才启用。
|
|
949
953
|
|
package/dist/cli/index.js
CHANGED
|
@@ -2657,7 +2657,7 @@ var require_napi = __commonJS((exports, module) => {
|
|
|
2657
2657
|
var require_package = __commonJS((exports, module) => {
|
|
2658
2658
|
module.exports = {
|
|
2659
2659
|
name: "oh-my-opencode",
|
|
2660
|
-
version: "2.
|
|
2660
|
+
version: "2.8.0",
|
|
2661
2661
|
description: "OpenCode plugin - custom agents (oracle, librarian) and enhanced features",
|
|
2662
2662
|
main: "dist/index.js",
|
|
2663
2663
|
types: "dist/index.d.ts",
|
|
@@ -19704,7 +19704,6 @@ var HookNameSchema = exports_external.enum([
|
|
|
19704
19704
|
"session-notification",
|
|
19705
19705
|
"comment-checker",
|
|
19706
19706
|
"grep-output-truncator",
|
|
19707
|
-
"tool-output-truncator",
|
|
19708
19707
|
"directory-agents-injector",
|
|
19709
19708
|
"directory-readme-injector",
|
|
19710
19709
|
"empty-task-response-detector",
|
|
@@ -19720,8 +19719,7 @@ var HookNameSchema = exports_external.enum([
|
|
|
19720
19719
|
"interactive-bash-session",
|
|
19721
19720
|
"empty-message-sanitizer",
|
|
19722
19721
|
"thinking-block-validator",
|
|
19723
|
-
"ralph-loop"
|
|
19724
|
-
"dcp-for-compaction"
|
|
19722
|
+
"ralph-loop"
|
|
19725
19723
|
]);
|
|
19726
19724
|
var BuiltinCommandNameSchema = exports_external.enum([
|
|
19727
19725
|
"init-deep"
|
|
@@ -19804,10 +19802,12 @@ var DynamicContextPruningConfigSchema = exports_external.object({
|
|
|
19804
19802
|
var ExperimentalConfigSchema = exports_external.object({
|
|
19805
19803
|
aggressive_truncation: exports_external.boolean().optional(),
|
|
19806
19804
|
auto_resume: exports_external.boolean().optional(),
|
|
19805
|
+
tool_output_truncator: exports_external.boolean().optional(),
|
|
19807
19806
|
preemptive_compaction: exports_external.boolean().optional(),
|
|
19808
19807
|
preemptive_compaction_threshold: exports_external.number().min(0.5).max(0.95).optional(),
|
|
19809
|
-
truncate_all_tool_outputs: exports_external.boolean().
|
|
19810
|
-
dynamic_context_pruning: DynamicContextPruningConfigSchema.optional()
|
|
19808
|
+
truncate_all_tool_outputs: exports_external.boolean().optional(),
|
|
19809
|
+
dynamic_context_pruning: DynamicContextPruningConfigSchema.optional(),
|
|
19810
|
+
dcp_for_compaction: exports_external.boolean().optional()
|
|
19811
19811
|
});
|
|
19812
19812
|
var SkillSourceSchema = exports_external.union([
|
|
19813
19813
|
exports_external.string(),
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -37,7 +37,6 @@ export declare const HookNameSchema: z.ZodEnum<{
|
|
|
37
37
|
"session-notification": "session-notification";
|
|
38
38
|
"comment-checker": "comment-checker";
|
|
39
39
|
"grep-output-truncator": "grep-output-truncator";
|
|
40
|
-
"tool-output-truncator": "tool-output-truncator";
|
|
41
40
|
"directory-agents-injector": "directory-agents-injector";
|
|
42
41
|
"directory-readme-injector": "directory-readme-injector";
|
|
43
42
|
"empty-task-response-detector": "empty-task-response-detector";
|
|
@@ -54,7 +53,6 @@ export declare const HookNameSchema: z.ZodEnum<{
|
|
|
54
53
|
"empty-message-sanitizer": "empty-message-sanitizer";
|
|
55
54
|
"thinking-block-validator": "thinking-block-validator";
|
|
56
55
|
"ralph-loop": "ralph-loop";
|
|
57
|
-
"dcp-for-compaction": "dcp-for-compaction";
|
|
58
56
|
}>;
|
|
59
57
|
export declare const BuiltinCommandNameSchema: z.ZodEnum<{
|
|
60
58
|
"init-deep": "init-deep";
|
|
@@ -672,9 +670,10 @@ export declare const DynamicContextPruningConfigSchema: z.ZodObject<{
|
|
|
672
670
|
export declare const ExperimentalConfigSchema: z.ZodObject<{
|
|
673
671
|
aggressive_truncation: z.ZodOptional<z.ZodBoolean>;
|
|
674
672
|
auto_resume: z.ZodOptional<z.ZodBoolean>;
|
|
673
|
+
tool_output_truncator: z.ZodOptional<z.ZodBoolean>;
|
|
675
674
|
preemptive_compaction: z.ZodOptional<z.ZodBoolean>;
|
|
676
675
|
preemptive_compaction_threshold: z.ZodOptional<z.ZodNumber>;
|
|
677
|
-
truncate_all_tool_outputs: z.
|
|
676
|
+
truncate_all_tool_outputs: z.ZodOptional<z.ZodBoolean>;
|
|
678
677
|
dynamic_context_pruning: z.ZodOptional<z.ZodObject<{
|
|
679
678
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
680
679
|
notification: z.ZodDefault<z.ZodEnum<{
|
|
@@ -701,6 +700,7 @@ export declare const ExperimentalConfigSchema: z.ZodObject<{
|
|
|
701
700
|
}, z.core.$strip>>;
|
|
702
701
|
}, z.core.$strip>>;
|
|
703
702
|
}, z.core.$strip>>;
|
|
703
|
+
dcp_for_compaction: z.ZodOptional<z.ZodBoolean>;
|
|
704
704
|
}, z.core.$strip>;
|
|
705
705
|
export declare const SkillSourceSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
706
706
|
path: z.ZodString;
|
|
@@ -785,7 +785,6 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
785
785
|
"session-notification": "session-notification";
|
|
786
786
|
"comment-checker": "comment-checker";
|
|
787
787
|
"grep-output-truncator": "grep-output-truncator";
|
|
788
|
-
"tool-output-truncator": "tool-output-truncator";
|
|
789
788
|
"directory-agents-injector": "directory-agents-injector";
|
|
790
789
|
"directory-readme-injector": "directory-readme-injector";
|
|
791
790
|
"empty-task-response-detector": "empty-task-response-detector";
|
|
@@ -802,7 +801,6 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
802
801
|
"empty-message-sanitizer": "empty-message-sanitizer";
|
|
803
802
|
"thinking-block-validator": "thinking-block-validator";
|
|
804
803
|
"ralph-loop": "ralph-loop";
|
|
805
|
-
"dcp-for-compaction": "dcp-for-compaction";
|
|
806
804
|
}>>>;
|
|
807
805
|
disabled_commands: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
808
806
|
"init-deep": "init-deep";
|
|
@@ -1348,9 +1346,10 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
1348
1346
|
experimental: z.ZodOptional<z.ZodObject<{
|
|
1349
1347
|
aggressive_truncation: z.ZodOptional<z.ZodBoolean>;
|
|
1350
1348
|
auto_resume: z.ZodOptional<z.ZodBoolean>;
|
|
1349
|
+
tool_output_truncator: z.ZodOptional<z.ZodBoolean>;
|
|
1351
1350
|
preemptive_compaction: z.ZodOptional<z.ZodBoolean>;
|
|
1352
1351
|
preemptive_compaction_threshold: z.ZodOptional<z.ZodNumber>;
|
|
1353
|
-
truncate_all_tool_outputs: z.
|
|
1352
|
+
truncate_all_tool_outputs: z.ZodOptional<z.ZodBoolean>;
|
|
1354
1353
|
dynamic_context_pruning: z.ZodOptional<z.ZodObject<{
|
|
1355
1354
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1356
1355
|
notification: z.ZodDefault<z.ZodEnum<{
|
|
@@ -1377,6 +1376,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
1377
1376
|
}, z.core.$strip>>;
|
|
1378
1377
|
}, z.core.$strip>>;
|
|
1379
1378
|
}, z.core.$strip>>;
|
|
1379
|
+
dcp_for_compaction: z.ZodOptional<z.ZodBoolean>;
|
|
1380
1380
|
}, z.core.$strip>>;
|
|
1381
1381
|
auto_update: z.ZodOptional<z.ZodBoolean>;
|
|
1382
1382
|
skills: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -6026,7 +6026,7 @@ var TRUNCATABLE_TOOLS = [
|
|
|
6026
6026
|
];
|
|
6027
6027
|
function createToolOutputTruncatorHook(ctx, options) {
|
|
6028
6028
|
const truncator = createDynamicTruncator(ctx);
|
|
6029
|
-
const truncateAll = options?.experimental?.truncate_all_tool_outputs ??
|
|
6029
|
+
const truncateAll = options?.experimental?.truncate_all_tool_outputs ?? false;
|
|
6030
6030
|
const toolExecuteAfter = async (input, output) => {
|
|
6031
6031
|
if (!truncateAll && !TRUNCATABLE_TOOLS.includes(input.tool))
|
|
6032
6032
|
return;
|
|
@@ -7958,7 +7958,7 @@ function createPreemptiveCompactionHook(ctx, options) {
|
|
|
7958
7958
|
const experimental = options?.experimental;
|
|
7959
7959
|
const onBeforeSummarize = options?.onBeforeSummarize;
|
|
7960
7960
|
const getModelLimit = options?.getModelLimit;
|
|
7961
|
-
const enabled = experimental?.preemptive_compaction
|
|
7961
|
+
const enabled = experimental?.preemptive_compaction === true;
|
|
7962
7962
|
const threshold = experimental?.preemptive_compaction_threshold ?? DEFAULT_THRESHOLD;
|
|
7963
7963
|
if (!enabled) {
|
|
7964
7964
|
return { event: async () => {} };
|
|
@@ -31918,7 +31918,6 @@ var HookNameSchema = exports_external.enum([
|
|
|
31918
31918
|
"session-notification",
|
|
31919
31919
|
"comment-checker",
|
|
31920
31920
|
"grep-output-truncator",
|
|
31921
|
-
"tool-output-truncator",
|
|
31922
31921
|
"directory-agents-injector",
|
|
31923
31922
|
"directory-readme-injector",
|
|
31924
31923
|
"empty-task-response-detector",
|
|
@@ -31934,8 +31933,7 @@ var HookNameSchema = exports_external.enum([
|
|
|
31934
31933
|
"interactive-bash-session",
|
|
31935
31934
|
"empty-message-sanitizer",
|
|
31936
31935
|
"thinking-block-validator",
|
|
31937
|
-
"ralph-loop"
|
|
31938
|
-
"dcp-for-compaction"
|
|
31936
|
+
"ralph-loop"
|
|
31939
31937
|
]);
|
|
31940
31938
|
var BuiltinCommandNameSchema = exports_external.enum([
|
|
31941
31939
|
"init-deep"
|
|
@@ -32018,10 +32016,12 @@ var DynamicContextPruningConfigSchema = exports_external.object({
|
|
|
32018
32016
|
var ExperimentalConfigSchema = exports_external.object({
|
|
32019
32017
|
aggressive_truncation: exports_external.boolean().optional(),
|
|
32020
32018
|
auto_resume: exports_external.boolean().optional(),
|
|
32019
|
+
tool_output_truncator: exports_external.boolean().optional(),
|
|
32021
32020
|
preemptive_compaction: exports_external.boolean().optional(),
|
|
32022
32021
|
preemptive_compaction_threshold: exports_external.number().min(0.5).max(0.95).optional(),
|
|
32023
|
-
truncate_all_tool_outputs: exports_external.boolean().
|
|
32024
|
-
dynamic_context_pruning: DynamicContextPruningConfigSchema.optional()
|
|
32022
|
+
truncate_all_tool_outputs: exports_external.boolean().optional(),
|
|
32023
|
+
dynamic_context_pruning: DynamicContextPruningConfigSchema.optional(),
|
|
32024
|
+
dcp_for_compaction: exports_external.boolean().optional()
|
|
32025
32025
|
});
|
|
32026
32026
|
var SkillSourceSchema = exports_external.union([
|
|
32027
32027
|
exports_external.string(),
|
|
@@ -32300,7 +32300,7 @@ var OhMyOpenCodePlugin = async (ctx) => {
|
|
|
32300
32300
|
const sessionRecovery = isHookEnabled("session-recovery") ? createSessionRecoveryHook(ctx, { experimental: pluginConfig.experimental }) : null;
|
|
32301
32301
|
const sessionNotification = isHookEnabled("session-notification") ? createSessionNotification(ctx) : null;
|
|
32302
32302
|
const commentChecker = isHookEnabled("comment-checker") ? createCommentCheckerHooks(pluginConfig.comment_checker) : null;
|
|
32303
|
-
const toolOutputTruncator =
|
|
32303
|
+
const toolOutputTruncator = pluginConfig.experimental?.tool_output_truncator === true ? createToolOutputTruncatorHook(ctx, { experimental: pluginConfig.experimental }) : null;
|
|
32304
32304
|
const directoryAgentsInjector = isHookEnabled("directory-agents-injector") ? createDirectoryAgentsInjectorHook(ctx) : null;
|
|
32305
32305
|
const directoryReadmeInjector = isHookEnabled("directory-readme-injector") ? createDirectoryReadmeInjectorHook(ctx) : null;
|
|
32306
32306
|
const emptyTaskResponseDetector = isHookEnabled("empty-task-response-detector") ? createEmptyTaskResponseDetectorHook(ctx) : null;
|
|
@@ -32310,7 +32310,7 @@ var OhMyOpenCodePlugin = async (ctx) => {
|
|
|
32310
32310
|
});
|
|
32311
32311
|
const anthropicContextWindowLimitRecovery = isHookEnabled("anthropic-context-window-limit-recovery") ? createAnthropicContextWindowLimitRecoveryHook(ctx, {
|
|
32312
32312
|
experimental: pluginConfig.experimental,
|
|
32313
|
-
dcpForCompaction:
|
|
32313
|
+
dcpForCompaction: pluginConfig.experimental?.dcp_for_compaction
|
|
32314
32314
|
}) : null;
|
|
32315
32315
|
const compactionContextInjector = createCompactionContextInjector();
|
|
32316
32316
|
const preemptiveCompaction = createPreemptiveCompactionHook(ctx, {
|