shadok-ai 0.17.17 → 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.17",
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",
package/public/index.html CHANGED
@@ -1564,7 +1564,10 @@
1564
1564
  /* ── Activity block ──────────────────────────────────────
1565
1565
  A run of tool calls between two pieces of assistant text. Folds at three
1566
1566
  levels — output, same-tool run, whole block — each driven by data-folded.
1567
- Anything containing an error carries .has-err and never folds. */
1567
+ A whole block always folds to its summary line at turn end (even on an
1568
+ error — the count says "· N errors" and the head is flagged .has-err); the
1569
+ errored output and run INSIDE it stay open, so expanding reveals the
1570
+ failure at once rather than hiding it. */
1568
1571
  .turn.activity { max-width: 82%; gap: 0; }
1569
1572
  .act-body, .run-body, .item-out { display: flex; flex-direction: column; }
1570
1573
  [data-folded="true"] > .act-body,
@@ -1611,7 +1614,8 @@
1611
1614
  /* Inside a run the tool name is already in the header — don't repeat it. */
1612
1615
  .act-run:not([data-count="1"]) .item-head .tool { display: none; }
1613
1616
  .item-head .err-flag { flex: none; color: var(--err); }
1614
- .has-err > .item-head, .has-err > .run-head { border-left-color: var(--err); }
1617
+ /* A folded block hides its runs, so flag the error on the summary line too. */
1618
+ .has-err > .item-head, .has-err > .run-head, .has-err > .act-head { border-left-color: var(--err); }
1615
1619
 
1616
1620
  /* Tool output. */
1617
1621
  .result-body {
@@ -7476,10 +7480,14 @@
7476
7480
  tab.act = null;
7477
7481
  }
7478
7482
 
7479
- /** Folds every block of the finished turn that saw no error. */
7483
+ /** Folds every block of the finished turn down to its one-line summary.
7484
+ An errored block folds too — the count line still reads "· N errors" and
7485
+ the head carries .has-err, so the failure is flagged, not hidden. Inside,
7486
+ its errored run and output stay unfolded (addToolLine / addResult), so
7487
+ expanding the block lands straight on what failed. */
7480
7488
  function sealTurn(tab) {
7481
7489
  for (const block of tab.turnBlocks || []) {
7482
- if (!block.el.classList.contains("has-err")) setFolded(block.el, true);
7490
+ setFolded(block.el, true);
7483
7491
  }
7484
7492
  tab.turnBlocks = [];
7485
7493
  tab.pendingCalls?.clear();
@@ -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