zenox 1.2.0 → 1.2.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.
@@ -3,15 +3,17 @@
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
6
+ * 2. Sets message variant to "max" for higher precision (ultrawork only)
7
7
  * 3. Shows toast notification for user feedback
8
+ *
9
+ * Uses the "chat.message" hook which fires when user submits a message.
8
10
  */
9
11
  import type { PluginInput } from "@opencode-ai/plugin";
10
12
  interface MessagePart {
11
13
  type: string;
12
14
  text?: string;
13
15
  }
14
- interface HookOutput {
16
+ interface ChatMessageOutput {
15
17
  parts: MessagePart[];
16
18
  message: {
17
19
  variant?: string;
@@ -20,7 +22,7 @@ interface HookOutput {
20
22
  export declare function createKeywordDetectorHook(ctx: PluginInput): {
21
23
  "chat.message": (input: {
22
24
  sessionID: string;
23
- agent: string;
24
- }, output: HookOutput) => Promise<void>;
25
+ agent?: string;
26
+ }, output: ChatMessageOutput) => Promise<void>;
25
27
  };
26
28
  export { KEYWORD_CONFIGS, type KeywordType, type KeywordConfig } from "./contexts";
package/dist/index.js CHANGED
@@ -17835,7 +17835,9 @@ var ZenoxPlugin = async (ctx) => {
17835
17835
  };
17836
17836
  return {
17837
17837
  tool: backgroundTools,
17838
- hook: keywordDetectorHook,
17838
+ "chat.message": async (input, output) => {
17839
+ await keywordDetectorHook["chat.message"]?.(input, output);
17840
+ },
17839
17841
  event: async (input) => {
17840
17842
  const { event } = input;
17841
17843
  await autoUpdateHook.event(input);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zenox",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
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",