@ericsanchezok/synergy-util 2.4.4 → 2.4.5
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/capability.d.ts +3 -1
- package/dist/capability.js +18 -0
- package/dist/plugin-policy.d.ts +1 -1
- package/dist/plugin-policy.js +1 -1
- package/package.json +3 -3
package/dist/capability.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export interface SynergyCapabilityManifest {
|
|
|
68
68
|
permissionAsk?: "none" | "own" | "all";
|
|
69
69
|
events?: "none" | "selected" | "all";
|
|
70
70
|
eventNames?: string[];
|
|
71
|
+
config?: boolean;
|
|
71
72
|
};
|
|
72
73
|
network?: {
|
|
73
74
|
connectDomains?: string[];
|
|
@@ -106,7 +107,7 @@ export interface SynergyCapabilityDefinition extends Omit<SynergyCapabilityPermi
|
|
|
106
107
|
export declare function publicToolNames(manifest: SynergyCapabilityManifest): string[];
|
|
107
108
|
export declare function hasPublicTools(manifest: SynergyCapabilityManifest): boolean;
|
|
108
109
|
export declare const SYNERGY_CAPABILITY_DETAILS: Record<string, SynergyCapabilityDefinition>;
|
|
109
|
-
export declare const SYNERGY_PROFILE_CAPABILITIES: readonly ["file_read", "file_write", "shell_read", "shell", "shell_remote_write", "shell_remote_publish", "shell_destructive", "shell_hardline", "file_external_read", "file_external_write", "network_read", "network_request", "mcp_invoke", "mcp_spawn", "session_data", "workspace_data", "config:read", "config:write", "secrets", "task", "prompt_transform", "compaction_transform", "tool_execution_hook", "permission_hook", "event_hook", "identity_act", "communication_email", "channel_outbound", "platform_control", "protected_op", "session_state", "browser_interact", "browser_inspect", "browser_eval_readonly", "browser_eval_trusted", "browser_clipboard", "browser_download", "browser_viewport"];
|
|
110
|
+
export declare const SYNERGY_PROFILE_CAPABILITIES: readonly ["file_read", "file_write", "shell_read", "shell", "shell_remote_write", "shell_remote_publish", "shell_destructive", "shell_hardline", "file_external_read", "file_external_write", "network_read", "network_request", "mcp_invoke", "mcp_spawn", "session_data", "workspace_data", "config:read", "config:write", "secrets", "task", "prompt_transform", "compaction_transform", "tool_execution_hook", "permission_hook", "event_hook", "config_hook", "identity_act", "communication_email", "channel_outbound", "platform_control", "protected_op", "session_state", "browser_interact", "browser_inspect", "browser_eval_readonly", "browser_eval_trusted", "browser_clipboard", "browser_download", "browser_viewport"];
|
|
110
111
|
export declare const SYNERGY_PERMISSION_CAPABILITY: Record<string, string>;
|
|
111
112
|
export declare function permissionCapability(permission: string): string;
|
|
112
113
|
export declare function capabilityNonBypassable(capability: string): boolean;
|
|
@@ -160,6 +161,7 @@ export declare function permissionsHashPayload(manifest: SynergyCapabilityManife
|
|
|
160
161
|
permissionAsk?: "none" | "own" | "all";
|
|
161
162
|
events?: "none" | "selected" | "all";
|
|
162
163
|
eventNames?: string[];
|
|
164
|
+
config?: boolean;
|
|
163
165
|
};
|
|
164
166
|
network?: {
|
|
165
167
|
connectDomains?: string[];
|
package/dist/capability.js
CHANGED
|
@@ -177,6 +177,12 @@ export const SYNERGY_CAPABILITY_DETAILS = {
|
|
|
177
177
|
title: "Subscribe to Synergy events",
|
|
178
178
|
description: "Can receive approved Synergy runtime events.",
|
|
179
179
|
},
|
|
180
|
+
config_hook: {
|
|
181
|
+
category: "hooks",
|
|
182
|
+
severity: "medium",
|
|
183
|
+
title: "Observe runtime config",
|
|
184
|
+
description: "Can receive redacted runtime configuration snapshots when Synergy starts or reloads config.",
|
|
185
|
+
},
|
|
180
186
|
session_state: {
|
|
181
187
|
category: "session",
|
|
182
188
|
severity: "low",
|
|
@@ -288,6 +294,7 @@ export const SYNERGY_PROFILE_CAPABILITIES = [
|
|
|
288
294
|
"tool_execution_hook",
|
|
289
295
|
"permission_hook",
|
|
290
296
|
"event_hook",
|
|
297
|
+
"config_hook",
|
|
291
298
|
"identity_act",
|
|
292
299
|
"communication_email",
|
|
293
300
|
"channel_outbound",
|
|
@@ -447,6 +454,8 @@ function buildCapabilitySet(permissions, toolOverrides) {
|
|
|
447
454
|
caps.add("prompt_transform");
|
|
448
455
|
if (hooks?.compactionTransform)
|
|
449
456
|
caps.add("compaction_transform");
|
|
457
|
+
if (hooks?.config)
|
|
458
|
+
caps.add("config_hook");
|
|
450
459
|
if (hooks?.toolExecute && hooks.toolExecute !== "none")
|
|
451
460
|
caps.add("tool_execution_hook");
|
|
452
461
|
if (hooks?.permissionAsk && hooks.permissionAsk !== "none")
|
|
@@ -653,6 +662,15 @@ function hookPermissionItems(manifest) {
|
|
|
653
662
|
description: "Can modify the system prompt and message context sent to the LLM.",
|
|
654
663
|
});
|
|
655
664
|
}
|
|
665
|
+
if (hooks?.config) {
|
|
666
|
+
items.push({
|
|
667
|
+
key: "hooks.config",
|
|
668
|
+
category: "hooks",
|
|
669
|
+
severity: "medium",
|
|
670
|
+
title: "Observe runtime config",
|
|
671
|
+
description: "Can observe redacted runtime configuration snapshots when Synergy starts or reloads config.",
|
|
672
|
+
});
|
|
673
|
+
}
|
|
656
674
|
if (hooks?.toolExecute === "all") {
|
|
657
675
|
items.push({
|
|
658
676
|
key: "hooks.toolExecute",
|
package/dist/plugin-policy.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SynergyCapabilityManifest } from "./capability";
|
|
1
|
+
import { type SynergyCapabilityManifest } from "./capability.js";
|
|
2
2
|
export type PluginSource = "local" | "official" | "npm" | "git" | "url" | "builtin";
|
|
3
3
|
export type RuntimeMode = "in-process" | "worker" | "process";
|
|
4
4
|
export type TrustTier = "declarative" | "trusted-import" | "sandbox";
|
package/dist/plugin-policy.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ericsanchezok/synergy-util",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./*": {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
8
|
+
"types": "./dist/*.d.ts",
|
|
9
|
+
"import": "./dist/*.js"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|