@opencode_weave/weave 0.6.1 → 0.6.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.
@@ -4,6 +4,7 @@ import type { WeaveConfig } from "../config/schema";
4
4
  import type { ConfigHandler } from "../managers/config-handler";
5
5
  import type { CreatedHooks } from "../hooks/create-hooks";
6
6
  import type { PluginContext } from "./types";
7
+ import type { SessionTracker } from "../features/analytics";
7
8
  export declare function createPluginInterface(args: {
8
9
  pluginConfig: WeaveConfig;
9
10
  hooks: CreatedHooks;
@@ -11,4 +12,6 @@ export declare function createPluginInterface(args: {
11
12
  configHandler: ConfigHandler;
12
13
  agents: Record<string, AgentConfig>;
13
14
  client?: PluginContext["client"];
15
+ directory?: string;
16
+ tracker?: SessionTracker;
14
17
  }): PluginInterface;
@@ -5,8 +5,19 @@
5
5
  *
6
6
  * OpenCode uses the agent key in config.agent as the display name in the UI,
7
7
  * so we remap lowercase config keys to descriptive display names.
8
+ *
9
+ * This map is mutable — custom agents can register display names via
10
+ * registerAgentDisplayName().
8
11
  */
9
12
  export declare const AGENT_DISPLAY_NAMES: Record<string, string>;
13
+ /**
14
+ * Register a display name for an agent config key.
15
+ * Custom agents call this so getAgentDisplayName/getAgentConfigKey work for them.
16
+ *
17
+ * Throws if the display name collides with a built-in agent's display name,
18
+ * or if the config key is a built-in agent name.
19
+ */
20
+ export declare function registerAgentDisplayName(configKey: string, displayName: string): void;
10
21
  /**
11
22
  * Get display name for an agent config key.
12
23
  * Uses case-insensitive lookup for flexibility.
@@ -1,4 +1,4 @@
1
1
  export type { DeepPartial, Brand } from "./types";
2
2
  export { log, getLogFilePath, logDelegation } from "./log";
3
3
  export type { DelegationEvent } from "./log";
4
- export { AGENT_DISPLAY_NAMES, getAgentDisplayName, getAgentConfigKey, } from "./agent-display-names";
4
+ export { AGENT_DISPLAY_NAMES, getAgentDisplayName, getAgentConfigKey, registerAgentDisplayName, } from "./agent-display-names";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencode_weave/weave",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "description": "Weave — lean OpenCode plugin with multi-agent orchestration",
5
5
  "author": "Weave",
6
6
  "license": "MIT",