shadok-ai 0.17.18 → 0.17.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadok-ai",
3
- "version": "0.17.18",
3
+ "version": "0.17.19",
4
4
  "main": "dist/session.js",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test --test-timeout=120000 test/*.ts context/*/test/*.test.mjs",
@@ -97,10 +97,16 @@ export function keyGroups(groups) {
97
97
  return others.length ? others : list.filter((g) => String(g.id) === MAIN_ID);
98
98
  }
99
99
 
100
- /** Groups a secret can be lent to: not its owner, not Main (Main is already read by all). */
100
+ /** Groups a secret can be lent to: not its owner, and nothing already in the
101
+ * commons — not Main, and not a PUBLIC group. A public non-Main group is
102
+ * "public = commun" (operator decision 2026-11-03): every agent already
103
+ * resolves its tier, so offering to share a secret WITH it is as meaningless as
104
+ * offering Main. Only restricted/private groups are real sealed vaults to lend
105
+ * to. (Server-side resolution is unchanged; this is the UI's offer only.) */
101
106
  export function shareTargets(groups, ownerGroupId) {
102
107
  return (Array.isArray(groups) ? groups : []).filter(
103
- (g) => g && g.id != null && String(g.id) !== MAIN_ID && String(g.id) !== String(ownerGroupId),
108
+ (g) =>
109
+ g && g.id != null && String(g.id) !== MAIN_ID && String(g.id) !== String(ownerGroupId) && g.nature !== "public",
104
110
  );
105
111
  }
106
112