oh-my-opencode-slim 2.0.0-beta.4 → 2.0.0-beta.8

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.
@@ -1,5 +1,6 @@
1
1
  import type { PluginInput } from '@opencode-ai/plugin';
2
2
  import type { MultiplexerConfig } from '../config/schema';
3
+ import type { BackgroundJobBoard } from '../utils/background-job-board';
3
4
  interface SessionEvent {
4
5
  type: string;
5
6
  properties?: {
@@ -23,6 +24,7 @@ export declare function resetMultiplexerSessionManagerState(): void;
23
24
  * with polling kept as a fallback for reliability.
24
25
  */
25
26
  export declare class MultiplexerSessionManager {
27
+ private readonly backgroundJobBoard?;
26
28
  private instanceId;
27
29
  private serverUrl;
28
30
  private directory;
@@ -33,7 +35,7 @@ export declare class MultiplexerSessionManager {
33
35
  private closingSessions;
34
36
  private pollInterval?;
35
37
  private enabled;
36
- constructor(ctx: PluginInput, config: MultiplexerConfig);
38
+ constructor(ctx: PluginInput, config: MultiplexerConfig, backgroundJobBoard?: BackgroundJobBoard | undefined);
37
39
  onSessionCreated(event: SessionEvent): Promise<void>;
38
40
  onSessionStatus(event: SessionEvent): Promise<void>;
39
41
  onSessionDeleted(event: SessionEvent): Promise<void>;
@@ -46,6 +48,7 @@ export declare class MultiplexerSessionManager {
46
48
  private isTrackedOrSpawning;
47
49
  private updatePolling;
48
50
  private getSessionId;
51
+ private isRunningBackgroundJob;
49
52
  cleanup(): Promise<void>;
50
53
  }
51
54
  /**
@@ -1,3 +1,3 @@
1
- import { type ToolDefinition } from '@opencode-ai/plugin/tool';
1
+ import { type ToolDefinition } from '@opencode-ai/plugin';
2
2
  export declare const ast_grep_search: ToolDefinition;
3
3
  export declare const ast_grep_replace: ToolDefinition;
package/dist/tui.js CHANGED
@@ -4,29 +4,15 @@ var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- function __accessProp(key) {
8
- return this[key];
9
- }
10
- var __toESMCache_node;
11
- var __toESMCache_esm;
12
7
  var __toESM = (mod, isNodeMode, target) => {
13
- var canCache = mod != null && typeof mod === "object";
14
- if (canCache) {
15
- var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
- var cached = cache.get(mod);
17
- if (cached)
18
- return cached;
19
- }
20
8
  target = mod != null ? __create(__getProtoOf(mod)) : {};
21
9
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
10
  for (let key of __getOwnPropNames(mod))
23
11
  if (!__hasOwnProp.call(to, key))
24
12
  __defProp(to, key, {
25
- get: __accessProp.bind(mod, key),
13
+ get: () => mod[key],
26
14
  enumerable: true
27
15
  });
28
- if (canCache)
29
- cache.set(mod, to);
30
16
  return to;
31
17
  };
32
18
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
@@ -10,6 +10,7 @@ export interface BackgroundJobRecord {
10
10
  timedOut: boolean;
11
11
  terminalUnreconciled: boolean;
12
12
  launchedAt: number;
13
+ lastLaunchedAt: number;
13
14
  updatedAt: number;
14
15
  completedAt?: number;
15
16
  resultSummary?: string;
@@ -41,7 +42,7 @@ export declare class BackgroundJobBoard {
41
42
  list(parentSessionID?: string): BackgroundJobRecord[];
42
43
  hasRunning(parentSessionID: string): boolean;
43
44
  hasTerminalUnreconciled(parentSessionID: string): boolean;
44
- formatForPrompt(parentSessionID: string): string | undefined;
45
+ formatForPrompt(parentSessionID: string, now?: number): string | undefined;
45
46
  clearParent(parentSessionID: string): void;
46
47
  drop(taskID: string): void;
47
48
  private nextAlias;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode-slim",
3
- "version": "2.0.0-beta.4",
3
+ "version": "2.0.0-beta.8",
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",
@@ -43,12 +43,13 @@
43
43
  "src/skills",
44
44
  "oh-my-opencode-slim.schema.json",
45
45
  "README.md",
46
+ "README.zh-CN.md",
46
47
  "LICENSE"
47
48
  ],
48
49
  "scripts": {
49
50
  "clean:dist": "bun -e \"import { rmSync } from 'node:fs'; rmSync('dist', { recursive: true, force: true })\"",
50
- "build:plugin": "bun build src/index.ts src/tui.ts --outdir dist --target node --format esm --external @ast-grep/napi --external @opencode-ai/plugin --external @opencode-ai/sdk --external @opentui/core --external @opentui/solid --external jsdom --external zod",
51
- "build:cli": "bun build src/cli/index.ts --outdir dist/cli --target node --format esm --external @ast-grep/napi --external @opencode-ai/plugin --external @opencode-ai/sdk --external jsdom --external zod",
51
+ "build:plugin": "bun build src/index.ts src/tui.ts --outdir dist --target node --format esm --external @ast-grep/napi --external @opencode-ai/plugin --external @opencode-ai/plugin/* --external @opencode-ai/sdk --external @opencode-ai/sdk/* --external @opentui/core --external @opentui/solid --external jsdom --external zod",
52
+ "build:cli": "bun build src/cli/index.ts --outdir dist/cli --target node --format esm --external @ast-grep/napi --external @opencode-ai/plugin --external @opencode-ai/plugin/* --external @opencode-ai/sdk --external @opencode-ai/sdk/* --external jsdom --external zod",
52
53
  "copy:divoom-assets": "bun run scripts/copy-divoom-assets.ts",
53
54
  "build": "bun run clean:dist && bun run build:plugin && bun run build:cli && bun run copy:divoom-assets && tsc --emitDeclarationOnly && bun run generate-schema",
54
55
  "prepare": "bun run build",
@@ -18,15 +18,21 @@ Required behavior:
18
18
 
19
19
  - keep OpenCode todos aligned with the active deepwork phase;
20
20
  - create and maintain a local markdown progress file under `.slim/deepwork/`;
21
+ - write valuable research findings into that file as confirmed research context
22
+ when they are received and reconciled;
21
23
  - draft a plan before implementation;
22
24
  - ask `@oracle` to review the plan and revise it until acceptable;
23
25
  - create a phased implementation/delegation plan;
26
+ - before oracle reviews, add relevant confirmed research findings and file
27
+ references to the deepwork file so oracle can review the plan or phase from
28
+ accepted context instead of redoing discovery;
24
29
  - ask `@oracle` to review that implementation plan before execution;
25
- - execute phase by phase with specialist delegation where useful;
26
- - after each phase, validate, update the deepwork file, ask `@oracle` to review
27
- the phase result, fix actionable issues, then continue;
28
- - ask `@oracle` phase reviews to include simplify/readability feedback alongside
29
- correctness, blockers, risks, and plan adherence;
30
+ - after oracle review and before each implementation phase, decide the execution
31
+ path: what can run in parallel, what must be sequential, which specialists to
32
+ delegate to, and whether to split the same agent into multiple bounded lanes;
33
+ - after each phase, validate, update the deepwork file, prepare the plan file
34
+ for oracle review and ask `@oracle` to review the phase result, fix
35
+ actionable issues, then continue;
30
36
  - finish with final validation and a concise summary.
31
37
 
32
38
  ## Deepwork File
@@ -56,37 +62,28 @@ work. The file only needs to remain useful as persistent session state and shoul
56
62
  capture, as applicable:
57
63
 
58
64
  - current goal and understanding;
59
- - assumptions, constraints, and decisions;
65
+ - researched, factual context from `@librarian` to avoid oracle doing its own
66
+ research;
60
67
  - plan drafts and oracle review notes;
61
68
  - implementation phases and status;
62
69
  - validation results;
63
70
  - unresolved questions, blockers, and follow-ups.
64
71
 
65
- Update this file after major decisions, reviews, phase completions, validation
66
- results, and scope changes.
72
+ Update this file after major decisions, valuable specialist research, reviews,
73
+ phase completions, validation results, and scope changes.
74
+ When `@librarian` docs, code reads, or external references produce useful
75
+ information, reconcile the result and record the accepted findings here so later
76
+ planning and reviews share the same context instead of rediscovering it.
77
+ Don't put actual contents of local files, reference them by path only.
67
78
 
68
79
  ## Scheduler Discipline
69
80
 
70
- Use the V2 scheduler model throughout:
81
+ Use the scheduler model throughout:
71
82
 
72
- - dispatch `@explorer`, `@librarian`, `@fixer`, `@designer`, `@oracle`, or
73
- `@council` lanes as background tasks when useful;
83
+ - follow Orchestrator delegations rules
74
84
  - record task/session IDs and ownership boundaries;
75
85
  - poll `task_status` before consuming background results;
76
- - reconcile terminal results before dependent work;
77
- - keep write scopes separate when parallelizing;
86
+ - avoid blocking Orchestrator lane too long; prefer shorter periodic task waits
87
+ rather than one long wait;
78
88
  - do not advance to the next phase while relevant jobs are running or terminal
79
89
  results are unreconciled.
80
-
81
- `@oracle` owns review and risk assessment. It should review plans and completed
82
- phase outputs, not become the default implementer. For phase reviews, explicitly
83
- ask oracle to use its simplify skill when available and report readability,
84
- maintainability, and unnecessary-complexity findings separately from blocking
85
- correctness issues.
86
-
87
- ## Lightweight Judgment
88
-
89
- Deepwork is meant to prevent chaotic long sessions, not create paperwork. Keep
90
- the markdown concise, batch small related checks when reasonable, and scale the
91
- number of review gates to the risk of the work. If the task becomes small and
92
- obvious, finish simply while preserving validation and the final summary.