ai-advisory-board 0.11.0 → 0.11.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # CHANGELOG — AI Advisory Board CLI
2
2
 
3
+ ## 0.11.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f462786: Decision Coach × Business Wiki: make the **"📚 Use Business Wiki" toggle directly available** — no Settings step.
8
+
9
+ The toggle now appears right in the **New Coach Session modal** (start a session with the wiki already wired) and in the **composer** (flip it any turn). The previous `knowledgeWiki.exposeToCoach` global opt-in has been removed — the per-session toggle is the sole control, default OFF per session. `aab coach --wiki` / `aab coach send … --wiki` just set the session flag (no opt-in to enable first).
10
+
3
11
  ## 0.11.0
4
12
 
5
13
  ### Minor Changes
package/dist/bin/aab.js CHANGED
@@ -1875,7 +1875,6 @@ var DEFAULT_KNOWLEDGE_WIKI_SETTINGS = {
1875
1875
  summarySoftCap: 200,
1876
1876
  exposeToMemberAgents: true,
1877
1877
  exposeToOrchestrator: true,
1878
- exposeToCoach: false,
1879
1878
  recommendFoam: true,
1880
1879
  slugMapInIndex: true,
1881
1880
  maxAliasesGlobal: 100,
@@ -14795,10 +14794,9 @@ async function startUiServer(opts) {
14795
14794
  sendError(res, 500, error);
14796
14795
  }
14797
14796
  });
14798
- const coachWikiOpts = (session, settings) => {
14797
+ const coachWikiOpts = (session) => {
14799
14798
  const root = opts.storage.getWorkspaceRoot();
14800
- const useWiki = !!session.useBusinessWiki && settings.knowledgeWiki?.exposeToCoach === true;
14801
- return { useWiki, workspaceRoot: root, wikiDir: paths(root).wiki };
14799
+ return { useWiki: !!session.useBusinessWiki, workspaceRoot: root, wikiDir: paths(root).wiki };
14802
14800
  };
14803
14801
  app.get("/api/coach/sessions", async (_req, res) => {
14804
14802
  try {
@@ -14872,7 +14870,7 @@ async function startUiServer(opts) {
14872
14870
  const settings = await opts.storage.loadSettings();
14873
14871
  const principles = await opts.storage.loadPrinciples();
14874
14872
  broadcast({ type: "coach_thinking", sessionId: session.id });
14875
- const { session: updated, reply } = await coachReply(session, principles, "", settings, coachWikiOpts(session, settings));
14873
+ const { session: updated, reply } = await coachReply(session, principles, "", settings, coachWikiOpts(session));
14876
14874
  await opts.storage.updateDecisionSession(updated);
14877
14875
  broadcast({ type: "coach_message", sessionId: updated.id, message: reply, session: updated });
14878
14876
  } catch (error) {
@@ -14915,10 +14913,10 @@ async function startUiServer(opts) {
14915
14913
  const settings = await opts.storage.loadSettings();
14916
14914
  const principles = await opts.storage.loadPrinciples();
14917
14915
  const content = body.content.trim();
14918
- const { session: updated, reply } = await coachReply(session, principles, content, settings, coachWikiOpts(session, settings));
14916
+ const { session: updated, reply } = await coachReply(session, principles, content, settings, coachWikiOpts(session));
14919
14917
  await opts.storage.updateDecisionSession(updated);
14920
14918
  broadcast({ type: "coach_message", sessionId: updated.id, message: reply, session: updated });
14921
- if (updated.useBusinessWiki && settings.knowledgeWiki?.exposeToCoach === true) {
14919
+ if (updated.useBusinessWiki) {
14922
14920
  maybeEnqueueUserInput({
14923
14921
  text: content,
14924
14922
  kind: "coach_message",
@@ -18636,14 +18634,11 @@ function registerCoachCommand(program) {
18636
18634
  `);
18637
18635
  }
18638
18636
  const settings = await ctx.storage.loadSettings();
18639
- if (opts.wiki) {
18640
- assertWikiOptIn(settings);
18641
- if (!session.useBusinessWiki) {
18642
- session.useBusinessWiki = true;
18643
- await ctx.storage.updateDecisionSession(session);
18644
- }
18637
+ if (opts.wiki && !session.useBusinessWiki) {
18638
+ session.useBusinessWiki = true;
18639
+ await ctx.storage.updateDecisionSession(session);
18645
18640
  }
18646
- if (session.useBusinessWiki && settings.knowledgeWiki?.exposeToCoach === true) {
18641
+ if (session.useBusinessWiki) {
18647
18642
  process.stdout.write(c.hint("\u{1F4DA} Business Wiki is ON for this session.\n"));
18648
18643
  }
18649
18644
  const principles = await ctx.storage.loadPrinciples();
@@ -18662,7 +18657,7 @@ function registerCoachCommand(program) {
18662
18657
  principles,
18663
18658
  "",
18664
18659
  settings,
18665
- coachWikiRunOpts(session, settings, ctx.workspace.root)
18660
+ coachWikiRunOpts(session, ctx.workspace.root)
18666
18661
  );
18667
18662
  sp.stop();
18668
18663
  session = updated;
@@ -18690,7 +18685,7 @@ function registerCoachCommand(program) {
18690
18685
  principles,
18691
18686
  trimmed,
18692
18687
  settings,
18693
- coachWikiRunOpts(session, settings, ctx.workspace.root)
18688
+ coachWikiRunOpts(session, ctx.workspace.root)
18694
18689
  );
18695
18690
  sp.stop();
18696
18691
  session = updated;
@@ -18719,7 +18714,6 @@ function registerCoachCommand(program) {
18719
18714
  }
18720
18715
  const settings = await ctx.storage.loadSettings();
18721
18716
  if (sendOpts.wiki) {
18722
- assertWikiOptIn(settings);
18723
18717
  session = { ...session, useBusinessWiki: true };
18724
18718
  }
18725
18719
  const principles = await ctx.storage.loadPrinciples();
@@ -18728,7 +18722,7 @@ function registerCoachCommand(program) {
18728
18722
  principles,
18729
18723
  message,
18730
18724
  settings,
18731
- coachWikiRunOpts(session, settings, ctx.workspace.root)
18725
+ coachWikiRunOpts(session, ctx.workspace.root)
18732
18726
  );
18733
18727
  await ctx.storage.updateDecisionSession(updated);
18734
18728
  fireCoachIngest(updated, settings, ctx.storage, message);
@@ -18846,20 +18840,11 @@ ${c.bold(session.title ?? "Decision session")} ${c.hint("\xB7 " + session.id.sli
18846
18840
  }
18847
18841
  });
18848
18842
  }
18849
- function coachWikiRunOpts(session, settings, root) {
18850
- const useWiki = !!session.useBusinessWiki && settings.knowledgeWiki?.exposeToCoach === true;
18851
- return { useWiki, workspaceRoot: root, wikiDir: paths(root).wiki };
18852
- }
18853
- function assertWikiOptIn(settings) {
18854
- if (settings.knowledgeWiki?.exposeToCoach !== true) {
18855
- throw new UserError(
18856
- "The Business Wiki is not enabled for the Decision Coach.",
18857
- "Enable it first: set `knowledgeWiki.exposeToCoach` to true (Settings in the web UI, or edit the workspace settings.json), then retry with --wiki."
18858
- );
18859
- }
18843
+ function coachWikiRunOpts(session, root) {
18844
+ return { useWiki: !!session.useBusinessWiki, workspaceRoot: root, wikiDir: paths(root).wiki };
18860
18845
  }
18861
18846
  function fireCoachIngest(session, settings, storage, text) {
18862
- if (session.useBusinessWiki && settings.knowledgeWiki?.exposeToCoach === true) {
18847
+ if (session.useBusinessWiki) {
18863
18848
  maybeEnqueueUserInput({
18864
18849
  text,
18865
18850
  kind: "coach_message",