zenox 1.2.1 → 1.2.3

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.
package/README.md CHANGED
@@ -171,7 +171,7 @@ Zenox checks for updates on startup. When a new version drops:
171
171
  2. Bun cache is invalidated
172
172
  3. Restart to get the update
173
173
 
174
- Pin a version to disable: `"zenox@1.2.0"` in your plugins array.
174
+ Pin a version to disable: `"zenox@1.2.1"` in your plugins array.
175
175
 
176
176
  ## Credits
177
177
 
@@ -13,16 +13,19 @@ export interface BackgroundTask {
13
13
  startedAt: Date;
14
14
  completedAt?: Date;
15
15
  error?: string;
16
+ parentAgent?: string;
16
17
  }
17
18
  export interface LaunchInput {
18
19
  agent: string;
19
20
  prompt: string;
20
21
  description: string;
21
22
  parentSessionID: string;
23
+ parentAgent?: string;
22
24
  }
23
25
  export interface CompletionNotification {
24
26
  allComplete: boolean;
25
27
  message: string;
26
28
  completedTasks: BackgroundTask[];
27
29
  runningCount: number;
30
+ parentAgent?: string;
28
31
  }
@@ -3,8 +3,7 @@
3
3
  *
4
4
  * Detects special keywords in user messages and:
5
5
  * 1. Injects mode-specific context into the message
6
- * 2. Sets message variant to "max" for higher precision (ultrawork only)
7
- * 3. Shows toast notification for user feedback
6
+ * 2. Shows toast notification for user feedback
8
7
  *
9
8
  * Uses the "chat.message" hook which fires when user submits a message.
10
9
  */
@@ -12,12 +11,11 @@ import type { PluginInput } from "@opencode-ai/plugin";
12
11
  interface MessagePart {
13
12
  type: string;
14
13
  text?: string;
14
+ synthetic?: boolean;
15
15
  }
16
16
  interface ChatMessageOutput {
17
17
  parts: MessagePart[];
18
- message: {
19
- variant?: string;
20
- };
18
+ message: Record<string, unknown>;
21
19
  }
22
20
  export declare function createKeywordDetectorHook(ctx: PluginInput): {
23
21
  "chat.message": (input: {
package/dist/index.js CHANGED
@@ -4879,7 +4879,8 @@ class BackgroundManager {
4879
4879
  description: input.description,
4880
4880
  prompt: input.prompt,
4881
4881
  status: "running",
4882
- startedAt: new Date
4882
+ startedAt: new Date,
4883
+ parentAgent: input.parentAgent
4883
4884
  };
4884
4885
  this.tasks.set(task.id, task);
4885
4886
  if (this.toastManager) {
@@ -5007,11 +5008,13 @@ Task: ${justCompleted?.id ?? "unknown"} (${justCompleted?.description ?? "unknow
5007
5008
  ${runningTasks.length} task(s) still running. Continue working.
5008
5009
  </system-reminder>`;
5009
5010
  }
5011
+ const parentAgent = completedTasks[0]?.parentAgent;
5010
5012
  return {
5011
5013
  allComplete,
5012
5014
  message,
5013
5015
  completedTasks,
5014
- runningCount: runningTasks.length
5016
+ runningCount: runningTasks.length,
5017
+ parentAgent
5015
5018
  };
5016
5019
  }
5017
5020
  listActiveTasks() {
@@ -17366,7 +17369,8 @@ Use for independent research tasks that benefit from parallelism.`,
17366
17369
  agent: args.agent,
17367
17370
  description: args.description,
17368
17371
  prompt: args.prompt,
17369
- parentSessionID: context.sessionID
17372
+ parentSessionID: context.sessionID,
17373
+ parentAgent: context.agent
17370
17374
  });
17371
17375
  const activeTasks = manager.listActiveTasks();
17372
17376
  return `Background task launched successfully.
@@ -17674,13 +17678,19 @@ function createKeywordDetectorHook(ctx) {
17674
17678
  return;
17675
17679
  detectedSessions.add(sessionKey);
17676
17680
  const primaryKeyword = detectedKeywords[0];
17677
- if (primaryKeyword.type === "ultrawork") {
17678
- output.message.variant = "max";
17681
+ const textPartIndex = output.parts.findIndex((p) => p.type === "text" && p.text);
17682
+ if (textPartIndex >= 0) {
17683
+ const existingPart = output.parts[textPartIndex];
17684
+ existingPart.text = `${existingPart.text ?? ""}
17685
+
17686
+ ${primaryKeyword.context}`;
17687
+ } else {
17688
+ output.parts.push({
17689
+ type: "text",
17690
+ text: primaryKeyword.context,
17691
+ synthetic: true
17692
+ });
17679
17693
  }
17680
- output.parts.push({
17681
- type: "text",
17682
- text: primaryKeyword.context
17683
- });
17684
17694
  await ctx.client.tui.showToast({
17685
17695
  body: {
17686
17696
  title: primaryKeyword.toast.title,
@@ -17861,6 +17871,7 @@ var ZenoxPlugin = async (ctx) => {
17861
17871
  path: { id: mainSessionID },
17862
17872
  body: {
17863
17873
  noReply: !notification.allComplete,
17874
+ agent: notification.parentAgent,
17864
17875
  parts: [{ type: "text", text: notification.message }]
17865
17876
  }
17866
17877
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zenox",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "OpenCode plugin with specialized agents (explorer, librarian, oracle, ui-planner), background tasks for parallel execution, and smart orchestration",
5
5
  "author": "Ayush",
6
6
  "license": "MIT",