oh-my-opencode 2.3.0 → 2.3.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.
@@ -3,7 +3,6 @@ export { createContextWindowMonitorHook } from "./context-window-monitor";
3
3
  export { createSessionNotification } from "./session-notification";
4
4
  export { createSessionRecoveryHook, type SessionRecoveryHook, type SessionRecoveryOptions } from "./session-recovery";
5
5
  export { createCommentCheckerHooks } from "./comment-checker";
6
- export { createGrepOutputTruncatorHook } from "./grep-output-truncator";
7
6
  export { createToolOutputTruncatorHook } from "./tool-output-truncator";
8
7
  export { createDirectoryAgentsInjectorHook } from "./directory-agents-injector";
9
8
  export { createDirectoryReadmeInjectorHook } from "./directory-readme-injector";
package/dist/index.js CHANGED
@@ -4712,6 +4712,8 @@ ${result.message}`;
4712
4712
  }
4713
4713
  // src/hooks/tool-output-truncator.ts
4714
4714
  var TRUNCATABLE_TOOLS = [
4715
+ "grep",
4716
+ "Grep",
4715
4717
  "safe_grep",
4716
4718
  "glob",
4717
4719
  "Glob",
@@ -7673,12 +7675,41 @@ async function checkForUpdate(directory) {
7673
7675
  // src/hooks/auto-update-checker/cache.ts
7674
7676
  import * as fs5 from "fs";
7675
7677
  import * as path6 from "path";
7678
+ function stripTrailingCommas(json) {
7679
+ return json.replace(/,(\s*[}\]])/g, "$1");
7680
+ }
7681
+ function removeFromBunLock(packageName) {
7682
+ const lockPath = path6.join(CACHE_DIR, "bun.lock");
7683
+ if (!fs5.existsSync(lockPath))
7684
+ return false;
7685
+ try {
7686
+ const content = fs5.readFileSync(lockPath, "utf-8");
7687
+ const lock = JSON.parse(stripTrailingCommas(content));
7688
+ let modified = false;
7689
+ if (lock.workspaces?.[""]?.dependencies?.[packageName]) {
7690
+ delete lock.workspaces[""].dependencies[packageName];
7691
+ modified = true;
7692
+ }
7693
+ if (lock.packages?.[packageName]) {
7694
+ delete lock.packages[packageName];
7695
+ modified = true;
7696
+ }
7697
+ if (modified) {
7698
+ fs5.writeFileSync(lockPath, JSON.stringify(lock, null, 2));
7699
+ log(`[auto-update-checker] Removed from bun.lock: ${packageName}`);
7700
+ }
7701
+ return modified;
7702
+ } catch {
7703
+ return false;
7704
+ }
7705
+ }
7676
7706
  function invalidatePackage(packageName = PACKAGE_NAME) {
7677
7707
  try {
7678
7708
  const pkgDir = path6.join(CACHE_DIR, "node_modules", packageName);
7679
7709
  const pkgJsonPath = path6.join(CACHE_DIR, "package.json");
7680
7710
  let packageRemoved = false;
7681
7711
  let dependencyRemoved = false;
7712
+ let lockRemoved = false;
7682
7713
  if (fs5.existsSync(pkgDir)) {
7683
7714
  fs5.rmSync(pkgDir, { recursive: true, force: true });
7684
7715
  log(`[auto-update-checker] Package removed: ${pkgDir}`);
@@ -7694,7 +7725,8 @@ function invalidatePackage(packageName = PACKAGE_NAME) {
7694
7725
  dependencyRemoved = true;
7695
7726
  }
7696
7727
  }
7697
- if (!packageRemoved && !dependencyRemoved) {
7728
+ lockRemoved = removeFromBunLock(packageName);
7729
+ if (!packageRemoved && !dependencyRemoved && !lockRemoved) {
7698
7730
  log(`[auto-update-checker] Package not found, nothing to invalidate: ${packageName}`);
7699
7731
  return false;
7700
7732
  }
@@ -10525,6 +10557,10 @@ var BUILTIN_SERVERS = {
10525
10557
  command: ["astro-ls", "--stdio"],
10526
10558
  extensions: [".astro"]
10527
10559
  },
10560
+ "bash-ls": {
10561
+ command: ["bash-language-server", "start"],
10562
+ extensions: [".sh", ".bash", ".zsh", ".ksh"]
10563
+ },
10528
10564
  jdtls: {
10529
10565
  command: ["jdtls"],
10530
10566
  extensions: [".java"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "OpenCode plugin - custom agents (oracle, librarian) and enhanced features",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,12 +0,0 @@
1
- import type { PluginInput } from "@opencode-ai/plugin";
2
- export declare function createGrepOutputTruncatorHook(ctx: PluginInput): {
3
- "tool.execute.after": (input: {
4
- tool: string;
5
- sessionID: string;
6
- callID: string;
7
- }, output: {
8
- title: string;
9
- output: string;
10
- metadata: unknown;
11
- }) => Promise<void>;
12
- };