@ericsanchezok/synergy-plugin 1.2.20 → 1.2.21

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/dist/index.d.ts CHANGED
@@ -46,8 +46,42 @@ export type PluginCLIEntry = PluginCLICommand | PluginCLIGroup;
46
46
  export interface PluginSkill {
47
47
  name: string;
48
48
  description: string;
49
- content: string;
49
+ /** Skill main content (markdown). When `dir` is set, this overrides auto-loaded content. */
50
+ content?: string;
51
+ /** Reference docs: key = reference name, value = inline content string */
50
52
  references?: Record<string, string>;
53
+ /**
54
+ * Relative path (from pluginDir) to a skill directory on disk.
55
+ * When set, the runtime resolves content, references, and scripts from this directory
56
+ * using the same conventions as `.synergy/skills/` directories:
57
+ * - `SKILL.md` or `content.txt` → content
58
+ * - `references/*` → references (keyed by relative path)
59
+ * - `scripts/*` → scripts (keyed by basename without extension)
60
+ *
61
+ * Explicit `content` or `references` fields take precedence over auto-loaded values.
62
+ */
63
+ dir?: string;
64
+ }
65
+ export interface PluginAgent {
66
+ name: string;
67
+ /** Description shown to the orchestrator for routing decisions */
68
+ description: string;
69
+ /** System prompt */
70
+ prompt: string;
71
+ /** Agent mode (default: "all") */
72
+ mode?: "subagent" | "primary" | "all";
73
+ /** Model override in "providerID/modelID" format */
74
+ model?: string;
75
+ temperature?: number;
76
+ topP?: number;
77
+ /** Maximum agentic iterations */
78
+ steps?: number;
79
+ /** Hide from the @ autocomplete menu */
80
+ hidden?: boolean;
81
+ /** Hex color code (e.g. "#FF5733") */
82
+ color?: string;
83
+ /** Permission rules — same format as synergy.jsonc agent.permission */
84
+ permission?: Record<string, any>;
51
85
  }
52
86
  export type ProviderContext = {
53
87
  source: "env" | "config" | "custom" | "api";
@@ -168,6 +202,8 @@ export type PluginInput = {
168
202
  config: PluginConfigAccessor;
169
203
  auth: PluginAuthStore;
170
204
  cache: PluginCacheStore;
205
+ /** Absolute path to this plugin's package root (where package.json lives) */
206
+ pluginDir: string;
171
207
  };
172
208
  export interface Plugin {
173
209
  /** Unique identifier for this plugin (used as config/auth/cache namespace) */
@@ -184,6 +220,8 @@ export interface PluginHooks {
184
220
  cli?: Record<string, PluginCLIEntry>;
185
221
  /** Register skills that become available when this plugin is loaded */
186
222
  skills?: PluginSkill[];
223
+ /** Register custom agents */
224
+ agents?: Record<string, PluginAgent>;
187
225
  /** Register custom tools */
188
226
  tool?: Record<string, ToolDefinition>;
189
227
  /** Provider auth integration */
package/dist/tool.d.ts CHANGED
@@ -4,6 +4,12 @@ export type ToolContext = {
4
4
  messageID: string;
5
5
  agent: string;
6
6
  abort: AbortSignal;
7
+ /** Request permission from the user before proceeding */
8
+ ask?(input: {
9
+ permission: string;
10
+ patterns: string[];
11
+ metadata?: Record<string, any>;
12
+ }): Promise<void>;
7
13
  };
8
14
  export interface ToolResult {
9
15
  title?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@ericsanchezok/synergy-plugin",
4
- "version": "1.2.20",
4
+ "version": "1.2.21",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {