@skj1724/oh-my-opencode 3.19.4 → 3.19.6

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.
@@ -0,0 +1,10 @@
1
+ import type { PerfTracer } from "./perf-tracer";
2
+ export interface FileIOMonitor {
3
+ readdirSync(path: string): string[];
4
+ readFileSync(path: string, options?: any): string | Buffer;
5
+ writeFileSync(path: string, data: any, options?: any): void;
6
+ existsSync(path: string): boolean;
7
+ }
8
+ export declare function setFileIOMonitor(monitor: FileIOMonitor | null): void;
9
+ export declare function getFileIOMonitor(): FileIOMonitor | null;
10
+ export declare function createFileIOMonitor(tracer: PerfTracer): FileIOMonitor;
@@ -0,0 +1 @@
1
+ export {};
@@ -29,4 +29,7 @@ export * from "./model-requirements";
29
29
  export * from "./model-resolver";
30
30
  export * from "./model-availability";
31
31
  export * from "./perf-timer";
32
+ export * from "./perf-tracer";
32
33
  export * from "./case-insensitive";
34
+ export * from "./fileio-monitor";
35
+ export * from "./windows-reserved-names";
@@ -0,0 +1,73 @@
1
+ export interface HookSpan {
2
+ t: string;
3
+ type: "hook";
4
+ pipeline: "event" | "tool.execute.before" | "tool.execute.after" | "chat.message";
5
+ hook: string;
6
+ durationMs: number;
7
+ sessionID: string;
8
+ tool?: string;
9
+ error?: string;
10
+ }
11
+ export interface PipelineSpan {
12
+ t: string;
13
+ type: "pipeline";
14
+ name: "event" | "tool.execute.before" | "tool.execute.after" | "chat.message";
15
+ totalDurationMs: number;
16
+ hookCount: number;
17
+ sessionID: string;
18
+ }
19
+ export interface ApiCallSpan {
20
+ t: string;
21
+ type: "api";
22
+ method: string;
23
+ durationMs: number;
24
+ sessionID: string;
25
+ messageCount?: number;
26
+ error?: string;
27
+ }
28
+ export interface FileIOSpan {
29
+ t: string;
30
+ type: "fileio";
31
+ operation: string;
32
+ path: string;
33
+ durationMs: number;
34
+ fileCount?: number;
35
+ }
36
+ export interface PollingSpan {
37
+ t: string;
38
+ type: "polling";
39
+ durationMs: number;
40
+ taskCount: number;
41
+ sessionCount: number;
42
+ }
43
+ export interface MemorySnapshot {
44
+ t: string;
45
+ type: "memory";
46
+ trigger: string;
47
+ mapSizes: Record<string, number>;
48
+ }
49
+ export type PerfSpan = HookSpan | PipelineSpan | ApiCallSpan | FileIOSpan | PollingSpan | MemorySnapshot;
50
+ export declare class PerfTracer {
51
+ private buffer;
52
+ private enabled;
53
+ private outputDir;
54
+ private slowThreshold;
55
+ private eventCount;
56
+ private memorySnapshotInterval;
57
+ constructor(config: {
58
+ enabled: boolean;
59
+ outputDir?: string;
60
+ slowThreshold?: number;
61
+ memorySnapshotInterval?: number;
62
+ });
63
+ isEnabled(): boolean;
64
+ isSlowHook(durationMs: number): boolean;
65
+ recordHook(pipeline: string, hook: string, durationMs: number, sessionID: string, tool?: string, error?: string): void;
66
+ recordPipeline(name: string, totalDurationMs: number, hookCount: number, sessionID: string): void;
67
+ recordApiCall(method: string, durationMs: number, sessionID: string, messageCount?: number, error?: string): void;
68
+ recordFileIO(operation: string, path: string, durationMs: number, fileCount?: number): void;
69
+ recordPolling(durationMs: number, taskCount: number, sessionCount: number): void;
70
+ snapshotMemory(trigger: string, mapSizes: Record<string, number>): void;
71
+ flush(): void;
72
+ reset(): void;
73
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Check a directory for files/folders named after Windows reserved device names.
3
+ * These cause "error: short read while indexing" in git on Windows.
4
+ *
5
+ * Returns list of found paths, or empty array if clean.
6
+ */
7
+ export declare function scanForReservedNames(directory: string, maxDepth?: number): string[];
8
+ export declare function formatReservedNamesWarning(found: string[]): string;
@@ -0,0 +1,2 @@
1
+ import type { PerfTracer } from "../../shared/perf-tracer";
2
+ export declare function patchSessionClient(client: any, tracer: PerfTracer): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skj1724/oh-my-opencode",
3
- "version": "3.19.4",
3
+ "version": "3.19.6",
4
4
  "description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/postinstall.mjs CHANGED
@@ -2,6 +2,9 @@
2
2
  // Runs after npm install to verify platform binary is available
3
3
 
4
4
  import { createRequire } from "node:module";
5
+ import { existsSync } from "node:fs";
6
+ import { homedir } from "node:os";
7
+ import { join } from "node:path";
5
8
  import { getPlatformPackage, getBinaryPath } from "./bin/platform.js";
6
9
 
7
10
  const require = createRequire(import.meta.url);
@@ -26,6 +29,23 @@ function main() {
26
29
  const { platform, arch } = process;
27
30
  const libcFamily = getLibcFamily();
28
31
 
32
+ // Check for conflicting Bun binary stub
33
+ const home = homedir();
34
+ const bunExe = platform === "win32" ? "oh-my-opencode.exe" : "oh-my-opencode";
35
+ const bunBinPath = join(home, ".bun", "bin", bunExe);
36
+
37
+ if (existsSync(bunBinPath)) {
38
+ console.warn(`⚠ oh-my-opencode: Detected Bun binary stub. This may conflict with the npm installation.`);
39
+ console.warn(` Stub location: ${bunBinPath}`);
40
+ console.warn(` To fix, remove the Bun stub:`);
41
+ if (platform === "win32") {
42
+ console.warn(` Remove-Item "${bunBinPath}"`);
43
+ } else {
44
+ console.warn(` rm "${bunBinPath}"`);
45
+ }
46
+ console.warn();
47
+ }
48
+
29
49
  try {
30
50
  const pkg = getPlatformPackage({ platform, arch, libcFamily });
31
51
  const binPath = getBinaryPath(pkg, platform);