oh-my-opencode-slim 1.0.7 → 1.1.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.
Files changed (38) hide show
  1. package/README.md +16 -6
  2. package/dist/cli/config-io.d.ts +1 -0
  3. package/dist/cli/index.js +170 -52
  4. package/dist/goal/index.d.ts +3 -0
  5. package/dist/goal/manager.d.ts +41 -0
  6. package/dist/goal/prompts.d.ts +4 -0
  7. package/dist/goal/store.d.ts +15 -0
  8. package/dist/goal/types.d.ts +28 -0
  9. package/dist/hooks/index.d.ts +1 -0
  10. package/dist/hooks/session-goal/index.d.ts +38 -0
  11. package/dist/index.js +1135 -369
  12. package/dist/multiplexer/session-manager.d.ts +3 -1
  13. package/dist/tools/fork/command.d.ts +28 -0
  14. package/dist/tools/fork/files.d.ts +33 -0
  15. package/dist/tools/fork/index.d.ts +10 -0
  16. package/dist/tools/fork/state.d.ts +7 -0
  17. package/dist/tools/fork/tools.d.ts +23 -0
  18. package/dist/tools/fork/vendor.d.ts +28 -0
  19. package/dist/tools/handoff/command.d.ts +29 -0
  20. package/dist/tools/handoff/files.d.ts +33 -0
  21. package/dist/tools/handoff/index.d.ts +10 -0
  22. package/dist/tools/handoff/state.d.ts +7 -0
  23. package/dist/tools/handoff/tools.d.ts +23 -0
  24. package/dist/tools/handoff/vendor.d.ts +28 -0
  25. package/dist/tools/index.d.ts +2 -0
  26. package/dist/tools/subtask/command.d.ts +30 -0
  27. package/dist/tools/subtask/files.d.ts +34 -0
  28. package/dist/tools/subtask/index.d.ts +11 -0
  29. package/dist/tools/subtask/state.d.ts +7 -0
  30. package/dist/tools/subtask/tools.d.ts +23 -0
  31. package/dist/tools/subtask/vendor.d.ts +27 -0
  32. package/dist/tui.js +56 -0
  33. package/dist/utils/session.d.ts +2 -1
  34. package/package.json +1 -1
  35. package/src/skills/clonedeps/README.md +23 -0
  36. package/src/skills/clonedeps/SKILL.md +237 -0
  37. package/src/skills/clonedeps/codemap.md +41 -0
  38. package/src/skills/codemap.md +8 -5
@@ -15,6 +15,7 @@ interface SessionEvent {
15
15
  };
16
16
  };
17
17
  }
18
+ export declare function resetMultiplexerSessionManagerState(): void;
18
19
  /**
19
20
  * Tracks child sessions and spawns/closes multiplexer panes for them.
20
21
  *
@@ -22,7 +23,7 @@ interface SessionEvent {
22
23
  * with polling kept as a fallback for reliability.
23
24
  */
24
25
  export declare class MultiplexerSessionManager {
25
- private client;
26
+ private instanceId;
26
27
  private serverUrl;
27
28
  private directory;
28
29
  private multiplexer;
@@ -39,6 +40,7 @@ export declare class MultiplexerSessionManager {
39
40
  private startPolling;
40
41
  private stopPolling;
41
42
  private pollSessions;
43
+ private fetchSessionStatuses;
42
44
  private closeSession;
43
45
  private respawnIfKnown;
44
46
  private isTrackedOrSpawning;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Command registration manager for fork functionality.
3
+ *
4
+ * Manages the /fork slash command registration and template.
5
+ */
6
+ import type { PluginInput } from '@opencode-ai/plugin';
7
+ import type { ForkState } from './state';
8
+ /**
9
+ * Creates a fork command manager.
10
+ *
11
+ * Handles registration of the /fork command and fork session state events.
12
+ */
13
+ export declare function createForkCommandManager(_ctx: PluginInput, state: ForkState, _processedSessions?: Set<string>): {
14
+ registerCommand: (opencodeConfig: Record<string, unknown>) => void;
15
+ handleEvent(input: {
16
+ event: {
17
+ type: string;
18
+ properties?: {
19
+ info?: {
20
+ id?: string;
21
+ parentID?: string;
22
+ };
23
+ sessionID?: string;
24
+ };
25
+ };
26
+ }): void;
27
+ };
28
+ export type ForkCommandManager = ReturnType<typeof createForkCommandManager>;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * File reference parsing and synthetic file parts for fork sessions.
3
+ *
4
+ * Handles extraction of @file references from fork prompts and
5
+ * building synthetic text parts that match OpenCode's Read tool output
6
+ * format.
7
+ */
8
+ import type { TextPartInput } from '@opencode-ai/sdk';
9
+ /**
10
+ * File reference regex matching OpenCode's internal pattern.
11
+ * Matches @file references like @src/plugin.ts
12
+ */
13
+ export declare const FILE_REGEX: RegExp;
14
+ /**
15
+ * Parse @file references from text.
16
+ *
17
+ * @param text - Text to search for @file references
18
+ * @returns Set of file paths referenced in the text
19
+ */
20
+ export declare function parseFileReferences(text: string): Set<string>;
21
+ /**
22
+ * Build synthetic text parts matching OpenCode's Read tool output.
23
+ *
24
+ * Creates two synthetic text parts for each file:
25
+ * 1. Header describing the Read tool call
26
+ * 2. Formatted file content with line numbers
27
+ *
28
+ * @param directory - Project directory to resolve relative paths against
29
+ * @param refs - Set of file path references to check
30
+ * @returns Array of synthetic text parts (non-existent and binary files are
31
+ * skipped)
32
+ */
33
+ export declare function buildSyntheticFileParts(directory: string, refs: Set<string>): Promise<TextPartInput[]>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Fork functionality for orchestrator worker sessions.
3
+ *
4
+ * Provides tools and commands for forking current context into child workers.
5
+ */
6
+ export { createForkCommandManager, type ForkCommandManager, } from './command';
7
+ export { buildSyntheticFileParts, FILE_REGEX, parseFileReferences, } from './files';
8
+ export { createForkState, type ForkState } from './state';
9
+ export { createForkSessionTool, createReadSessionTool, type OpencodeClient, } from './tools';
10
+ export { DEFAULT_READ_LIMIT, formatFileContent, isBinaryFile, MAX_BYTES, MAX_LINE_LENGTH, } from './vendor';
@@ -0,0 +1,7 @@
1
+ export interface ForkState {
2
+ markSession(sessionID: string, sourceSessionID: string): void;
3
+ unmarkSession(sessionID: string): void;
4
+ isForkSession(sessionID: string): boolean;
5
+ sourceFor(sessionID: string): string | undefined;
6
+ }
7
+ export declare function createForkState(): ForkState;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Tool definitions for fork functionality.
3
+ *
4
+ * Factory functions that create tool definitions with injected dependencies:
5
+ * - createForkSessionTool: Create a fork worker session
6
+ * - createReadSessionTool: Read conversation transcript from a session
7
+ */
8
+ import type { PluginInput, ToolDefinition } from '@opencode-ai/plugin';
9
+ import type { SubagentDepthTracker } from '../../utils/subagent-depth';
10
+ import type { ForkState } from './state';
11
+ export type OpencodeClient = PluginInput['client'];
12
+ /**
13
+ * Create the fork_session tool.
14
+ *
15
+ * Takes the OpenCode client as a dependency for TUI and session operations.
16
+ */
17
+ export declare function createForkSessionTool(ctx: PluginInput, state: ForkState, depthTracker?: SubagentDepthTracker): ToolDefinition;
18
+ /**
19
+ * Create the read_session tool.
20
+ *
21
+ * Takes the OpenCode client as a dependency for session.messages() calls.
22
+ */
23
+ export declare function createReadSessionTool(client: OpencodeClient, state: ForkState): ToolDefinition;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Vendored read-format helpers from OpenCode.
3
+ *
4
+ * Source: https://github.com/sst/opencode
5
+ * File: packages/opencode/src/tool/read.ts
6
+ *
7
+ * These functions and constants are copied to ensure synthetic file parts
8
+ * match OpenCode's Read tool output exactly.
9
+ */
10
+ /**
11
+ * Constants from OpenCode's ReadTool
12
+ */
13
+ export declare const DEFAULT_READ_LIMIT = 2000;
14
+ export declare const MAX_LINE_LENGTH = 2000;
15
+ export declare const MAX_BYTES: number;
16
+ /**
17
+ * Check if a file is binary (copied from OpenCode's ReadTool)
18
+ */
19
+ export declare function isBinaryFile(filepath: string): Promise<boolean>;
20
+ /**
21
+ * Format file content matching OpenCode's Read tool output format.
22
+ *
23
+ * @param _filepath - Absolute path to the file (unused in output, kept for
24
+ * signature compatibility)
25
+ * @param content - File content as string
26
+ * @returns Formatted output with line numbers in <file> tags
27
+ */
28
+ export declare function formatFileContent(_filepath: string, content: string): string;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Command registration manager for fork functionality.
3
+ *
4
+ * Manages the /fork-session slash command registration and template.
5
+ */
6
+ import type { PluginInput } from '@opencode-ai/plugin';
7
+ import type { ForkState } from './state';
8
+ /**
9
+ * Creates a fork command manager.
10
+ *
11
+ * Handles registration of the /fork-session command and fork session state
12
+ * events.
13
+ */
14
+ export declare function createForkCommandManager(_ctx: PluginInput, state: ForkState, _processedSessions?: Set<string>): {
15
+ registerCommand: (opencodeConfig: Record<string, unknown>) => void;
16
+ handleEvent(input: {
17
+ event: {
18
+ type: string;
19
+ properties?: {
20
+ info?: {
21
+ id?: string;
22
+ parentID?: string;
23
+ };
24
+ sessionID?: string;
25
+ };
26
+ };
27
+ }): void;
28
+ };
29
+ export type ForkCommandManager = ReturnType<typeof createForkCommandManager>;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * File reference parsing and synthetic file parts for fork sessions.
3
+ *
4
+ * Handles extraction of @file references from fork prompts and
5
+ * building synthetic text parts that match OpenCode's Read tool output
6
+ * format.
7
+ */
8
+ import type { TextPartInput } from '@opencode-ai/sdk';
9
+ /**
10
+ * File reference regex matching OpenCode's internal pattern.
11
+ * Matches @file references like @src/plugin.ts
12
+ */
13
+ export declare const FILE_REGEX: RegExp;
14
+ /**
15
+ * Parse @file references from text.
16
+ *
17
+ * @param text - Text to search for @file references
18
+ * @returns Set of file paths referenced in the text
19
+ */
20
+ export declare function parseFileReferences(text: string): Set<string>;
21
+ /**
22
+ * Build synthetic text parts matching OpenCode's Read tool output.
23
+ *
24
+ * Creates two synthetic text parts for each file:
25
+ * 1. Header describing the Read tool call
26
+ * 2. Formatted file content with line numbers
27
+ *
28
+ * @param directory - Project directory to resolve relative paths against
29
+ * @param refs - Set of file path references to check
30
+ * @returns Array of synthetic text parts (non-existent and binary files are
31
+ * skipped)
32
+ */
33
+ export declare function buildSyntheticFileParts(directory: string, refs: Set<string>): Promise<TextPartInput[]>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Fork functionality for orchestrator worker sessions.
3
+ *
4
+ * Provides tools and commands for forking current context into child workers.
5
+ */
6
+ export { createForkCommandManager, type ForkCommandManager, } from './command';
7
+ export { buildSyntheticFileParts, FILE_REGEX, parseFileReferences, } from './files';
8
+ export { createForkState, type ForkState } from './state';
9
+ export { createForkSessionTool, createReadSessionTool, type OpencodeClient, } from './tools';
10
+ export { DEFAULT_READ_LIMIT, formatFileContent, isBinaryFile, MAX_BYTES, MAX_LINE_LENGTH, } from './vendor';
@@ -0,0 +1,7 @@
1
+ export interface ForkState {
2
+ markSession(sessionID: string, sourceSessionID: string): void;
3
+ unmarkSession(sessionID: string): void;
4
+ isForkSession(sessionID: string): boolean;
5
+ sourceFor(sessionID: string): string | undefined;
6
+ }
7
+ export declare function createForkState(): ForkState;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Tool definitions for fork functionality.
3
+ *
4
+ * Factory functions that create tool definitions with injected dependencies:
5
+ * - createForkSessionTool: Create a fork worker session
6
+ * - createReadSessionTool: Read conversation transcript from a session
7
+ */
8
+ import type { PluginInput, ToolDefinition } from '@opencode-ai/plugin';
9
+ import type { SubagentDepthTracker } from '../../utils/subagent-depth';
10
+ import type { ForkState } from './state';
11
+ export type OpencodeClient = PluginInput['client'];
12
+ /**
13
+ * Create the fork_session tool.
14
+ *
15
+ * Takes the OpenCode client as a dependency for TUI and session operations.
16
+ */
17
+ export declare function createForkSessionTool(ctx: PluginInput, state: ForkState, depthTracker?: SubagentDepthTracker): ToolDefinition;
18
+ /**
19
+ * Create the read_session tool.
20
+ *
21
+ * Takes the OpenCode client as a dependency for session.messages() calls.
22
+ */
23
+ export declare function createReadSessionTool(client: OpencodeClient, state: ForkState): ToolDefinition;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Vendored read-format helpers from OpenCode.
3
+ *
4
+ * Source: https://github.com/sst/opencode
5
+ * File: packages/opencode/src/tool/read.ts
6
+ *
7
+ * These functions and constants are copied to ensure synthetic file parts
8
+ * match OpenCode's Read tool output exactly.
9
+ */
10
+ /**
11
+ * Constants from OpenCode's ReadTool
12
+ */
13
+ export declare const DEFAULT_READ_LIMIT = 2000;
14
+ export declare const MAX_LINE_LENGTH = 2000;
15
+ export declare const MAX_BYTES: number;
16
+ /**
17
+ * Check if a file is binary (copied from OpenCode's ReadTool)
18
+ */
19
+ export declare function isBinaryFile(filepath: string): Promise<boolean>;
20
+ /**
21
+ * Format file content matching OpenCode's Read tool output format.
22
+ *
23
+ * @param _filepath - Absolute path to the file (unused in output, kept for
24
+ * signature compatibility)
25
+ * @param content - File content as string
26
+ * @returns Formatted output with line numbers in <file> tags
27
+ */
28
+ export declare function formatFileContent(_filepath: string, content: string): string;
@@ -3,3 +3,5 @@ export { createCouncilTool } from './council';
3
3
  export type { PresetManager } from './preset-manager';
4
4
  export { createPresetManager } from './preset-manager';
5
5
  export { createWebfetchTool } from './smartfetch';
6
+ export type { SubtaskCommandManager } from './subtask';
7
+ export { createReadSessionTool, createSubtaskCommandManager, createSubtaskState, createSubtaskTool, } from './subtask';
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Command registration manager for subtask functionality.
3
+ *
4
+ * Manages the /subtask slash command registration and the SUBTASK_COMMAND
5
+ * template that guides the AI in generating subtask prompts.
6
+ */
7
+ import type { PluginInput } from '@opencode-ai/plugin';
8
+ import type { SubtaskState } from './state';
9
+ /**
10
+ * Creates a subtask command manager.
11
+ *
12
+ * Handles registration of the /subtask command and processing of chat
13
+ * messages to inject synthetic file parts for subtask sessions.
14
+ */
15
+ export declare function createSubtaskCommandManager(_ctx: PluginInput, state: SubtaskState): {
16
+ registerCommand: (opencodeConfig: Record<string, unknown>) => void;
17
+ handleEvent(input: {
18
+ event: {
19
+ type: string;
20
+ properties?: {
21
+ info?: {
22
+ id?: string;
23
+ parentID?: string;
24
+ };
25
+ sessionID?: string;
26
+ };
27
+ };
28
+ }): void;
29
+ };
30
+ export type SubtaskCommandManager = ReturnType<typeof createSubtaskCommandManager>;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * File reference parsing and synthetic file parts for subtask sessions.
3
+ *
4
+ * Handles extraction of @file references from subtask prompts and
5
+ * building synthetic text parts that match OpenCode's Read tool output
6
+ * format.
7
+ */
8
+ import type { TextPartInput } from '@opencode-ai/sdk';
9
+ /**
10
+ * File reference regex matching OpenCode's internal pattern.
11
+ * Matches @file references like @src/plugin.ts
12
+ */
13
+ export declare const FILE_REGEX: RegExp;
14
+ export declare function cleanFileReference(ref: string): string;
15
+ /**
16
+ * Parse @file references from text.
17
+ *
18
+ * @param text - Text to search for @file references
19
+ * @returns Set of file paths referenced in the text
20
+ */
21
+ export declare function parseFileReferences(text: string): Set<string>;
22
+ /**
23
+ * Build synthetic text parts matching OpenCode's Read tool output.
24
+ *
25
+ * Creates two synthetic text parts for each file:
26
+ * 1. Header describing the Read tool call
27
+ * 2. Formatted file content with line numbers
28
+ *
29
+ * @param directory - Project directory to resolve relative paths against
30
+ * @param refs - Set of file path references to check
31
+ * @returns Array of synthetic text parts (non-existent and binary files are
32
+ * skipped)
33
+ */
34
+ export declare function buildSyntheticFileParts(directory: string, refs: Set<string>): Promise<TextPartInput[]>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Subtask functionality for session continuation.
3
+ *
4
+ * Provides tools and commands for creating subtask prompts that allow
5
+ * work to continue seamlessly in new sessions with preloaded context.
6
+ */
7
+ export { createSubtaskCommandManager, type SubtaskCommandManager, } from './command';
8
+ export { buildSyntheticFileParts, FILE_REGEX, parseFileReferences, } from './files';
9
+ export { createSubtaskState, type SubtaskState } from './state';
10
+ export { createReadSessionTool, createSubtaskTool, type OpencodeClient, } from './tools';
11
+ export { DEFAULT_READ_LIMIT, formatFileContent, isBinaryFile, MAX_BYTES, MAX_LINE_LENGTH, } from './vendor';
@@ -0,0 +1,7 @@
1
+ export interface SubtaskState {
2
+ markSession(sessionID: string, sourceSessionID: string): void;
3
+ unmarkSession(sessionID: string): void;
4
+ isSubtaskSession(sessionID: string): boolean;
5
+ sourceFor(sessionID: string): string | undefined;
6
+ }
7
+ export declare function createSubtaskState(): SubtaskState;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Tool definitions for subtask functionality.
3
+ *
4
+ * Factory functions that create tool definitions with injected dependencies:
5
+ * - createSubtaskTool: Create a new session with subtask prompt
6
+ * - createReadSessionTool: Read conversation transcript from a session
7
+ */
8
+ import type { PluginInput, ToolDefinition } from '@opencode-ai/plugin';
9
+ import type { SubagentDepthTracker } from '../../utils/subagent-depth';
10
+ import type { SubtaskState } from './state';
11
+ export type OpencodeClient = PluginInput['client'];
12
+ /**
13
+ * Create the subtask tool.
14
+ *
15
+ * Takes the OpenCode client as a dependency for TUI and session operations.
16
+ */
17
+ export declare function createSubtaskTool(ctx: PluginInput, state: SubtaskState, depthTracker?: SubagentDepthTracker): ToolDefinition;
18
+ /**
19
+ * Create the read_session tool.
20
+ *
21
+ * Takes the OpenCode client as a dependency for session.messages() calls.
22
+ */
23
+ export declare function createReadSessionTool(client: OpencodeClient, state: SubtaskState): ToolDefinition;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Vendored read-format helpers from OpenCode.
3
+ *
4
+ * Source: https://github.com/sst/opencode
5
+ * File: packages/opencode/src/tool/read.ts
6
+ *
7
+ * These functions and constants are copied to ensure synthetic file parts
8
+ * match OpenCode's Read tool output exactly.
9
+ */
10
+ /**
11
+ * Constants from OpenCode's ReadTool
12
+ */
13
+ export declare const DEFAULT_READ_LIMIT = 2000;
14
+ export declare const MAX_LINE_LENGTH = 2000;
15
+ export declare const MAX_BYTES: number;
16
+ /**
17
+ * Check if a file is binary (copied from OpenCode's ReadTool)
18
+ */
19
+ export declare function isBinaryFile(filepath: string): Promise<boolean>;
20
+ /**
21
+ * Format file content matching OpenCode's Read tool output format.
22
+ *
23
+ * @param _filepath - Absolute path to the file (used as `<path>` in the output)
24
+ * @param content - File content as string
25
+ * @returns Formatted output with line numbers in <file> tags
26
+ */
27
+ export declare function formatFileContent(_filepath: string, content: string): string;
package/dist/tui.js CHANGED
@@ -79,6 +79,56 @@ var DEFAULT_DISABLED_AGENTS = ["observer"];
79
79
  import * as fs from "node:fs";
80
80
  import * as path from "node:path";
81
81
 
82
+ // src/utils/compat.ts
83
+ import { spawn as nodeSpawn } from "node:child_process";
84
+ import { writeFile as fsWriteFile } from "node:fs/promises";
85
+ var isBun = typeof globalThis.Bun !== "undefined";
86
+ function collectStream(stream) {
87
+ if (!stream)
88
+ return () => Promise.resolve("");
89
+ const chunks = [];
90
+ stream.on("data", (chunk) => chunks.push(chunk));
91
+ return () => new Promise((resolve, reject) => {
92
+ if (!stream.readable) {
93
+ resolve(Buffer.concat(chunks).toString("utf-8"));
94
+ return;
95
+ }
96
+ stream.on("end", () => resolve(Buffer.concat(chunks).toString("utf-8")));
97
+ stream.on("error", reject);
98
+ });
99
+ }
100
+ function crossSpawn(command, options) {
101
+ const [cmd, ...args] = command;
102
+ const proc = nodeSpawn(cmd, args, {
103
+ stdio: [
104
+ options?.stdin ?? "ignore",
105
+ options?.stdout ?? "pipe",
106
+ options?.stderr ?? "pipe"
107
+ ],
108
+ cwd: options?.cwd,
109
+ env: options?.env
110
+ });
111
+ const stdoutCollector = collectStream(proc.stdout);
112
+ const stderrCollector = collectStream(proc.stderr);
113
+ const exited = new Promise((resolve, reject) => {
114
+ proc.on("error", reject);
115
+ proc.on("close", (code) => resolve(code ?? 1));
116
+ });
117
+ return {
118
+ proc,
119
+ stdout: stdoutCollector,
120
+ stderr: stderrCollector,
121
+ exited,
122
+ kill: (signal) => proc.kill(signal),
123
+ get exitCode() {
124
+ return proc.exitCode;
125
+ }
126
+ };
127
+ }
128
+ async function crossWrite(path, data) {
129
+ await fsWriteFile(path, Buffer.from(data));
130
+ }
131
+
82
132
  // src/cli/paths.ts
83
133
  import { homedir } from "node:os";
84
134
  import { dirname, join } from "node:path";
@@ -401,6 +451,12 @@ var CUSTOM_SKILLS = [
401
451
  description: "Repository understanding and hierarchical codemap generation",
402
452
  allowedAgents: ["orchestrator"],
403
453
  sourcePath: "src/skills/codemap"
454
+ },
455
+ {
456
+ name: "clonedeps",
457
+ description: "Clone important dependency source for local inspection",
458
+ allowedAgents: ["orchestrator"],
459
+ sourcePath: "src/skills/clonedeps"
404
460
  }
405
461
  ];
406
462
 
@@ -49,7 +49,7 @@ export declare function parseModelReference(model: string): {
49
49
  * @param timeoutMs - Timeout in milliseconds (0 = no timeout)
50
50
  * @throws Error if timeout is exceeded
51
51
  */
52
- export declare function promptWithTimeout(client: OpencodeClient, args: Parameters<OpencodeClient['session']['prompt']>[0], timeoutMs: number): Promise<void>;
52
+ export declare function promptWithTimeout(client: OpencodeClient, args: Parameters<OpencodeClient['session']['prompt']>[0], timeoutMs: number, signal?: AbortSignal): Promise<void>;
53
53
  /**
54
54
  * Result of extracting session content.
55
55
  * `empty` is true when the assistant produced zero text content —
@@ -69,6 +69,7 @@ export interface SessionExtractionResult {
69
69
  * @returns Object with extracted text and an `empty` flag for zero-content detection
70
70
  */
71
71
  export declare function extractSessionResult(client: OpencodeClient, sessionId: string, options?: {
72
+ directory?: string;
72
73
  includeReasoning?: boolean;
73
74
  }): Promise<SessionExtractionResult>;
74
75
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode-slim",
3
- "version": "1.0.7",
3
+ "version": "1.1.1",
4
4
  "description": "Lightweight agent orchestration plugin for OpenCode - a slimmed-down fork of oh-my-opencode",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,23 @@
1
+ # clonedeps
2
+
3
+ `clonedeps` is a bundled OpenCode workflow skill for cloning a small set of
4
+ important dependency source repositories into a local ignored workspace so agents
5
+ can read library internals.
6
+
7
+ It is orchestrator-owned. The orchestrator delegates source discovery and URL/ref
8
+ resolution to `@librarian`, asks for approval, then performs the git and
9
+ filesystem operations directly.
10
+
11
+ There is intentionally no helper script. Dependency discovery, ref validation,
12
+ and cloning are repo-specific enough that the orchestrator/librarian workflow is
13
+ safer than a brittle cross-ecosystem script.
14
+
15
+ Cloned repositories live under `.slim/clonedeps/repos/<safe-repo-name>/`, one
16
+ folder per source repository, and are ignored by git. `.slim/clonedeps.json` is
17
+ intentionally trackable project
18
+ metadata. After cloning, the orchestrator should add or update a concise
19
+ `## Cloned Dependency Source` section in root `AGENTS.md` that lists each
20
+ read-only cloned repo path directly with a one-sentence purpose.
21
+
22
+ If `.slim/clonedeps.json` already exists, read it first and reuse those clones
23
+ before asking `@librarian` for new recommendations.