@ericsanchezok/synergy-plugin 2.2.0 → 2.2.2
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 +10 -10
- package/dist/example.js +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +9 -9
- package/dist/index.d.ts +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,19 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
Plugins extend the Synergy server runtime and can also contribute Web UI surfaces through `plugin.json`. The current API is intentionally strict: a plugin module exports an object descriptor with a canonical `id` and an `init()` method. The descriptor id, `plugin.json.name`, registry id, lockfile key, and approval key must all be the same canonical plugin id.
|
|
6
6
|
|
|
7
|
-
Plugin authors should use
|
|
7
|
+
Plugin authors should use `@ericsanchezok/synergy-plugin-kit` and this SDK from a standalone plugin project. Cloning the Synergy source repository is only needed when changing or debugging the plugin platform itself.
|
|
8
8
|
|
|
9
9
|
## Recommended Flow
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
synergy
|
|
12
|
+
bunx @ericsanchezok/synergy-plugin-kit create my-plugin --template tool-ui
|
|
13
13
|
cd my-plugin
|
|
14
14
|
bun install
|
|
15
|
-
synergy
|
|
16
|
-
synergy
|
|
17
|
-
synergy
|
|
18
|
-
synergy plugin sign my-plugin-0.1.0.synergy-plugin.tgz
|
|
19
|
-
synergy plugin publish my-plugin-0.1.0.synergy-plugin.tgz
|
|
15
|
+
synergy-plugin dev
|
|
16
|
+
synergy-plugin validate --runtime-discovery
|
|
17
|
+
synergy-plugin publish-market
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
During local development you can also install directly:
|
|
@@ -124,7 +122,7 @@ Each distributable plugin has a root `plugin.json`:
|
|
|
124
122
|
}
|
|
125
123
|
```
|
|
126
124
|
|
|
127
|
-
`contributes.ui.entry` is a runtime-loadable JavaScript asset. Source files such as `src/ui.tsx` are only build inputs. `synergy
|
|
125
|
+
`contributes.ui.entry` is a runtime-loadable JavaScript asset. Source files such as `src/ui.tsx` are only build inputs. `synergy-plugin build` uses the conventional UI source path and writes the compiled bundle to the declared entry.
|
|
128
126
|
|
|
129
127
|
## UI Types
|
|
130
128
|
|
|
@@ -148,7 +146,7 @@ Worker and process plugins are started through Synergy's plugin runner. The runn
|
|
|
148
146
|
|
|
149
147
|
## Packaging
|
|
150
148
|
|
|
151
|
-
`synergy
|
|
149
|
+
`synergy-plugin build` writes a distributable `dist/` directory:
|
|
152
150
|
|
|
153
151
|
- `dist/plugin.json`
|
|
154
152
|
- `dist/runtime/index.js`
|
|
@@ -157,7 +155,9 @@ Worker and process plugins are started through Synergy's plugin runner. The runn
|
|
|
157
155
|
- `dist/permissions.summary.json`
|
|
158
156
|
- `dist/integrity.json`
|
|
159
157
|
|
|
160
|
-
`synergy
|
|
158
|
+
`synergy-plugin pack` archives `dist/` into `<name>-<version>.synergy-plugin.tgz`. `synergy-plugin sign` writes `<tarball>.sig`. `synergy-plugin publish-market` prepares the official marketplace submission by uploading or checking GitHub Release assets, writing a `SII-Holos/synergy-plugins` entry with the signer public key, regenerating the registry index, running registry validation, and opening a PR when `gh` is available.
|
|
159
|
+
|
|
160
|
+
For local marketplace UX testing, the Synergy runtime still provides `synergy plugin publish <tarball>` to publish into the local development registry.
|
|
161
161
|
|
|
162
162
|
## Exports
|
|
163
163
|
|
package/dist/example.js
CHANGED
|
@@ -79,7 +79,7 @@ export const ExamplePlugin = {
|
|
|
79
79
|
output.note.title = output.note.title.trim() || "Untitled note";
|
|
80
80
|
output.note.tags = mergeTags(output.note.tags);
|
|
81
81
|
},
|
|
82
|
-
async "
|
|
82
|
+
async "library.memory.search.after"(input, output) {
|
|
83
83
|
output.results = output.results
|
|
84
84
|
.slice()
|
|
85
85
|
.sort((left, right) => right.similarity - left.similarity)
|
package/dist/hooks.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type HookCategory = "core" | "chat" | "permission" | "tool" | "session" | "cortex" | "agenda" | "note" | "
|
|
1
|
+
export type HookCategory = "core" | "chat" | "permission" | "tool" | "session" | "cortex" | "agenda" | "note" | "library" | "experimental";
|
|
2
2
|
export interface HookDescriptor {
|
|
3
3
|
name: string;
|
|
4
4
|
category: HookCategory;
|
package/dist/hooks.js
CHANGED
|
@@ -120,20 +120,20 @@ export const HOOKS = [
|
|
|
120
120
|
summary: "Filter or reorder note search results",
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
|
-
name: "
|
|
124
|
-
category: "
|
|
123
|
+
name: "library.memory.search.before",
|
|
124
|
+
category: "library",
|
|
125
125
|
mutatesOutput: true,
|
|
126
|
-
summary: "Rewrite
|
|
126
|
+
summary: "Rewrite library memory search query and options",
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
|
-
name: "
|
|
130
|
-
category: "
|
|
129
|
+
name: "library.memory.search.after",
|
|
130
|
+
category: "library",
|
|
131
131
|
mutatesOutput: true,
|
|
132
|
-
summary: "Filter or reorder
|
|
132
|
+
summary: "Filter or reorder library memory results",
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
|
-
name: "
|
|
136
|
-
category: "
|
|
135
|
+
name: "library.experience.encode.after",
|
|
136
|
+
category: "library",
|
|
137
137
|
mutatesOutput: false,
|
|
138
138
|
summary: "Observe experience encoding outcomes",
|
|
139
139
|
},
|
|
@@ -275,6 +275,6 @@ export const HOOK_CATEGORIES = [
|
|
|
275
275
|
"cortex",
|
|
276
276
|
"agenda",
|
|
277
277
|
"note",
|
|
278
|
-
"
|
|
278
|
+
"library",
|
|
279
279
|
"experimental",
|
|
280
280
|
];
|
package/dist/index.d.ts
CHANGED
|
@@ -415,7 +415,7 @@ export interface PluginHooks {
|
|
|
415
415
|
notes: NoteInfo[];
|
|
416
416
|
}): Promise<void>;
|
|
417
417
|
/** Rewrite memory search query */
|
|
418
|
-
"
|
|
418
|
+
"library.memory.search.before"?(input: {}, output: {
|
|
419
419
|
query: string;
|
|
420
420
|
vector?: number[];
|
|
421
421
|
topK?: number;
|
|
@@ -424,14 +424,14 @@ export interface PluginHooks {
|
|
|
424
424
|
rerank?: boolean;
|
|
425
425
|
}): Promise<void>;
|
|
426
426
|
/** Filter or reorder memory results */
|
|
427
|
-
"
|
|
427
|
+
"library.memory.search.after"?(input: {
|
|
428
428
|
query: string;
|
|
429
429
|
topK: number;
|
|
430
430
|
}, output: {
|
|
431
431
|
results: MemorySearchResult[];
|
|
432
432
|
}): Promise<void>;
|
|
433
433
|
/** Observe experience encoding outcomes */
|
|
434
|
-
"
|
|
434
|
+
"library.experience.encode.after"?(input: {
|
|
435
435
|
sessionID: string;
|
|
436
436
|
userMessageID: string;
|
|
437
437
|
}, output: {
|