oh-my-opencode-slim 1.0.1 → 1.0.2

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.
@@ -27,6 +27,8 @@ export declare class MultiplexerSessionManager {
27
27
  private directory;
28
28
  private multiplexer;
29
29
  private sessions;
30
+ private knownSessions;
31
+ private spawningSessions;
30
32
  private pollInterval?;
31
33
  private enabled;
32
34
  constructor(ctx: PluginInput, config: MultiplexerConfig);
@@ -37,6 +39,8 @@ export declare class MultiplexerSessionManager {
37
39
  private stopPolling;
38
40
  private pollSessions;
39
41
  private closeSession;
42
+ private respawnIfKnown;
43
+ private isTrackedOrSpawning;
40
44
  cleanup(): Promise<void>;
41
45
  }
42
46
  /**
@@ -1,5 +1,5 @@
1
- import { type PluginInput, type ToolDefinition } from '@opencode-ai/plugin';
2
- import type { CouncilManager } from '../council/council-manager';
1
+ import { type PluginInput, type ToolDefinition } from "@opencode-ai/plugin";
2
+ import type { CouncilManager } from "../council/council-manager";
3
3
  /**
4
4
  * Creates the council_session tool for multi-LLM orchestration.
5
5
  *
@@ -4,4 +4,6 @@ export * from './internal-initiator';
4
4
  export { getLogDir, initLogger, log, resetLogger } from './logger';
5
5
  export * from './polling';
6
6
  export * from './session';
7
+ export * from './session-manager';
8
+ export * from './task';
7
9
  export { extractZip } from './zip-extractor';
@@ -0,0 +1,38 @@
1
+ import type { AgentName } from '../config';
2
+ export interface RememberedTaskSession {
3
+ alias: string;
4
+ taskId: string;
5
+ agentType: AgentName;
6
+ label: string;
7
+ createdAt: number;
8
+ lastUsedAt: number;
9
+ }
10
+ export declare function deriveTaskSessionLabel(input: {
11
+ description?: string;
12
+ prompt?: string;
13
+ agentType: AgentName;
14
+ }): string;
15
+ export declare class SessionManager {
16
+ private readonly maxSessionsPerAgent;
17
+ private readonly sessionsByParent;
18
+ private readonly nextAliasIndexByParent;
19
+ private orderCounter;
20
+ constructor(maxSessionsPerAgent: number);
21
+ remember(input: {
22
+ parentSessionId: string;
23
+ taskId: string;
24
+ agentType: AgentName;
25
+ label: string;
26
+ }): RememberedTaskSession;
27
+ markUsed(parentSessionId: string, agentType: AgentName, key: string): void;
28
+ resolve(parentSessionId: string, agentType: AgentName, key: string): RememberedTaskSession | undefined;
29
+ drop(parentSessionId: string, agentType: AgentName, key: string): void;
30
+ dropTask(taskId: string): void;
31
+ clearParent(parentSessionId: string): void;
32
+ formatForPrompt(parentSessionId: string): string | undefined;
33
+ private getAgentGroup;
34
+ private setAgentGroup;
35
+ private nextAlias;
36
+ private trimGroup;
37
+ private nextOrder;
38
+ }
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Shared session utilities for council and background managers.
3
3
  */
4
- import type { PluginInput } from '@opencode-ai/plugin';
5
- type OpencodeClient = PluginInput['client'];
4
+ import type { PluginInput } from "@opencode-ai/plugin";
5
+ type OpencodeClient = PluginInput["client"];
6
6
  /**
7
7
  * Extract the short model label from a "provider/model" string.
8
8
  * E.g. "openai/gpt-5.4-mini" → "gpt-5.4-mini"
@@ -21,7 +21,7 @@ export type PromptBody = {
21
21
  [key: string]: boolean;
22
22
  };
23
23
  parts: Array<{
24
- type: 'text';
24
+ type: "text";
25
25
  text: string;
26
26
  }>;
27
27
  variant?: string;
@@ -43,7 +43,7 @@ export declare function parseModelReference(model: string): {
43
43
  * @param timeoutMs - Timeout in milliseconds (0 = no timeout)
44
44
  * @throws Error if timeout is exceeded
45
45
  */
46
- export declare function promptWithTimeout(client: OpencodeClient, args: Parameters<OpencodeClient['session']['prompt']>[0], timeoutMs: number): Promise<void>;
46
+ export declare function promptWithTimeout(client: OpencodeClient, args: Parameters<OpencodeClient["session"]["prompt"]>[0], timeoutMs: number): Promise<void>;
47
47
  /**
48
48
  * Result of extracting session content.
49
49
  * `empty` is true when the assistant produced zero text content —
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Collapse a system message array into a single element by joining all
3
+ * entries with double-newline separators. Mutates the array in-place so
4
+ * that callers holding a reference to the original array see the change.
5
+ */
6
+ export declare function collapseSystemInPlace(system: string[]): void;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Parse Task tool output to recover a session/task ID for resumption.
3
+ */
4
+ export declare function parseTaskIdFromTaskOutput(output: string): string | undefined;
@@ -23,6 +23,10 @@
23
23
  "description": "Show the startup activation toast when OpenCode starts. Defaults to true.",
24
24
  "type": "boolean"
25
25
  },
26
+ "autoUpdate": {
27
+ "description": "Disable automatic installation of plugin updates when false. Defaults to true.",
28
+ "type": "boolean"
29
+ },
26
30
  "manualPlan": {
27
31
  "type": "object",
28
32
  "properties": {
@@ -486,6 +490,17 @@
486
490
  }
487
491
  }
488
492
  },
493
+ "sessionManager": {
494
+ "type": "object",
495
+ "properties": {
496
+ "maxSessionsPerAgent": {
497
+ "default": 2,
498
+ "type": "integer",
499
+ "minimum": 1,
500
+ "maximum": 10
501
+ }
502
+ }
503
+ },
489
504
  "todoContinuation": {
490
505
  "type": "object",
491
506
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode-slim",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
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",