@project-ava-supernova/core 0.2.153 → 0.2.155

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.
@@ -39,6 +39,40 @@ export declare const DESKTOP_TOOL_NAMES: readonly ["desktop_plan_approve", "desk
39
39
  * shape as the dead tool names in the mode allowlists.
40
40
  */
41
41
  export declare function detectModeFromMessages(messages: Message[]): string | null;
42
+ /**
43
+ * Can this mode change files?
44
+ *
45
+ * Read from `MODE_ALLOWED_TOOLS` rather than a list of its own. A mode that is
46
+ * not handed `write` or `edit` is read-only by design, and nothing downstream
47
+ * should be able to grant it more than the mode itself has.
48
+ *
49
+ * Exists because the AutoCoordinator's Builder hand-off had no idea what mode
50
+ * it was in. Seen live 2026-08-19: a Plan-mode turn produced a plan card, wrote
51
+ * eleven todos, announced "Builder dispatched — executing 11 tasks", and started
52
+ * editing an Unreal project. Plan mode is read-only — it cannot open a file to
53
+ * write it — and the orchestrator went around that by spawning agents that
54
+ * could. The operator's words were "why are you coding when did i say to do
55
+ * anything but plan".
56
+ *
57
+ * An unknown mode returns true: work mode carries no prefix, so callers that
58
+ * default to it must not be silently blocked.
59
+ */
60
+ /**
61
+ * Every tool name that any mode lists.
62
+ *
63
+ * Used to tell two different situations apart, which the allowlist alone
64
+ * cannot: a tool code mode deliberately withholds (present, listed by other
65
+ * modes, correctly filtered) versus a tool no mode has ever classified. The
66
+ * second is not a decision, it is an absence - and treating an absence as a
67
+ * refusal is how a registered tool disappears with no error anywhere.
68
+ */
69
+ /**
70
+ * Tools that PRODUCE an artefact.
71
+ *
72
+ * Named as a set because there is now a state in which none of them may run:
73
+ * see `TALKING_MODE_SUFFIX` below.
74
+ */
75
+ export declare const PRODUCING_TOOLS: Set<string>;
42
76
  /**
43
77
  * Whether a tool survives a mode's allowlist.
44
78
  *
@@ -48,6 +82,39 @@ export declare function detectModeFromMessages(messages: Message[]): string | nu
48
82
  * all (an unknown tool is somebody's extension, not a policy decision) -
49
83
  * except desktop tools, which stay out however they are classified.
50
84
  */
85
+ /**
86
+ * A mode name ending in this is the same room, with the making taken away.
87
+ *
88
+ * ── Why a state and not an instruction ────────────────────────────────────
89
+ *
90
+ * 20 Oct 2026: the operator tried to talk to her about a mistake and she made
91
+ * something instead. Every time. He had been raising it for months.
92
+ *
93
+ * The cause was not wilfulness. The only gate she had (`intent-gate`) chooses
94
+ * `needs_team` and creation-vs-continuation — how MUCH machinery to spin up.
95
+ * There was no branch for *don't act*. Add that a complaint is grammatically
96
+ * identical to a request ("the text post wasn't made" reads exactly like "make
97
+ * the text post"), that the room's prefix is a working prefix, and that the
98
+ * tools are always on the table, and producing is the only move the shape of
99
+ * the system affords.
100
+ *
101
+ * "Please discuss rather than act" is a suggestion competing against all of
102
+ * that. Removing the tools is not a suggestion.
103
+ *
104
+ * It matters here more than elsewhere because the operator is LEARNING
105
+ * marketing in this room. "Why did you tag it that way?" is the most valuable
106
+ * turn he can take, and it is worth nothing if the answer is four more cards.
107
+ */
108
+ export declare const TALKING_MODE_SUFFIX = ":talking";
109
+ /**
110
+ * The room's tools with everything that makes an artefact removed.
111
+ *
112
+ * Reading, searching and checking all stay: a discussion in which she cannot
113
+ * look anything up is not a discussion, it is a guess. `check_posts`
114
+ * especially — the likeliest reason to be talking at all is that something
115
+ * did not get made.
116
+ */
117
+ export declare function talkingToolsFor(modeAllowed: Set<string>): Set<string>;
51
118
  export declare function toolPassesModeGate(name: string, modeAllowed: Set<string>): boolean;
52
119
  /**
53
120
  * The hard ceiling on what a persona may be handed in a READ-ONLY mode.
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/agent/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAqC,MAAM,uBAAuB,CAAC;AAEzF,OAAO,KAAK,EACV,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,eAAe,EACf,UAAU,EAEX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,E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O,EAAE,CAAC;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,eAAe,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAA;KAAE,CAAC;IAKxH,OAAO,CAAC,cAAc,CAAmF;IAEzG,8EAA8E;IACxE,cAAc,CAClB,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,iBAAiB,EAC1B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,OAAO,EAAE,CAAC;IAMrB;;;;;OAKG;IACG,eAAe,CACnB,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,iBAAiB,EAC1B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,OAAO,EAAE,CAAC;IAmQrB,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAMjC,OAAO,CAAC,qBAAqB;IA4B7B,8DAA8D;IAC9D,kBAAkB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM;IAM/C;;;;OAIG;IACH;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,OAAO,CAAC,kBAAkB;IAyE1B,OAAO,CAAC,gBAAgB;IAyDxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,OAAO,CAAC,sBAAsB;IAkE9B;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,CAAC,iBAAiB;IA8DzB;;;;;;;OAOG;IACH,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE;IAI9C;;;;OAIG;IACH,OAAO,CAAC,cAAc;CAoDvB"}
@@ -491,6 +491,10 @@ const MODE_ALLOWED_TOOLS = {
491
491
  // this room ships posts, it doesn't touch the codebase.
492
492
  social: new Set([
493
493
  'research_post', 'propose_hooks', 'write_post', 'post_performance', 'suggest_beats',
494
+ // The brief for each post, agreed before it is written. Not a producing
495
+ // tool, so it stays available in a talking turn — which is where a brief
496
+ // is discussed.
497
+ 'propose_brief',
494
498
  // The day plan. She and the operator agree the day together, so she
495
499
  // needs to read it (items may already be carried from yesterday),
496
500
  // write what was agreed, and tick what she can verify. Registering
@@ -535,6 +539,12 @@ const MODE_ALLOWED_TOOLS = {
535
539
  // it here would have registered a tool that answers "no canvas" every time.
536
540
  // write_voiceover carries its own store, the way write_video_post does.
537
541
  'write_voiceover',
542
+ // WHAT ACTUALLY EXISTS. Without this she can only answer "did that go
543
+ // out?" from her own intent, which is how she came to tell the operator
544
+ // four posts were written when only the videos were made. Registering it
545
+ // in the builtins was not enough — this Set is the real gate, the same
546
+ // way write_video_post sat unusable above.
547
+ 'check_posts',
538
548
  // Research to make the angle current
539
549
  'web_search',
540
550
  // Memory carries the mission voice; journal her read on the brand
@@ -712,6 +722,16 @@ export function detectModeFromMessages(messages) {
712
722
  * second is not a decision, it is an absence - and treating an absence as a
713
723
  * refusal is how a registered tool disappears with no error anywhere.
714
724
  */
725
+ /**
726
+ * Tools that PRODUCE an artefact.
727
+ *
728
+ * Named as a set because there is now a state in which none of them may run:
729
+ * see `TALKING_MODE_SUFFIX` below.
730
+ */
731
+ export const PRODUCING_TOOLS = new Set([
732
+ 'write_post', 'write_video_post', 'write_post_image', 'write_voiceover',
733
+ 'write_article', 'write_recipe', 'write_exercise',
734
+ ]);
715
735
  const MODE_CLASSIFIED_TOOLS = new Set(Object.values(MODE_ALLOWED_TOOLS).flatMap((set) => [...set]));
716
736
  /**
717
737
  * Whether a tool survives a mode's allowlist.
@@ -722,6 +742,41 @@ const MODE_CLASSIFIED_TOOLS = new Set(Object.values(MODE_ALLOWED_TOOLS).flatMap(
722
742
  * all (an unknown tool is somebody's extension, not a policy decision) -
723
743
  * except desktop tools, which stay out however they are classified.
724
744
  */
745
+ /**
746
+ * A mode name ending in this is the same room, with the making taken away.
747
+ *
748
+ * ── Why a state and not an instruction ────────────────────────────────────
749
+ *
750
+ * 20 Oct 2026: the operator tried to talk to her about a mistake and she made
751
+ * something instead. Every time. He had been raising it for months.
752
+ *
753
+ * The cause was not wilfulness. The only gate she had (`intent-gate`) chooses
754
+ * `needs_team` and creation-vs-continuation — how MUCH machinery to spin up.
755
+ * There was no branch for *don't act*. Add that a complaint is grammatically
756
+ * identical to a request ("the text post wasn't made" reads exactly like "make
757
+ * the text post"), that the room's prefix is a working prefix, and that the
758
+ * tools are always on the table, and producing is the only move the shape of
759
+ * the system affords.
760
+ *
761
+ * "Please discuss rather than act" is a suggestion competing against all of
762
+ * that. Removing the tools is not a suggestion.
763
+ *
764
+ * It matters here more than elsewhere because the operator is LEARNING
765
+ * marketing in this room. "Why did you tag it that way?" is the most valuable
766
+ * turn he can take, and it is worth nothing if the answer is four more cards.
767
+ */
768
+ export const TALKING_MODE_SUFFIX = ':talking';
769
+ /**
770
+ * The room's tools with everything that makes an artefact removed.
771
+ *
772
+ * Reading, searching and checking all stay: a discussion in which she cannot
773
+ * look anything up is not a discussion, it is a guess. `check_posts`
774
+ * especially — the likeliest reason to be talking at all is that something
775
+ * did not get made.
776
+ */
777
+ export function talkingToolsFor(modeAllowed) {
778
+ return new Set([...modeAllowed].filter(t => !PRODUCING_TOOLS.has(t)));
779
+ }
725
780
  export function toolPassesModeGate(name, modeAllowed) {
726
781
  if (modeAllowed.has(name) || ALWAYS_ALLOWED_TOOLS.has(name))
727
782
  return true;
@@ -1473,14 +1528,28 @@ export class Agent {
1473
1528
  // Desktop tools stay out on both branches. That was the one restriction
1474
1529
  // the old fallback did apply, and it is load-bearing.
1475
1530
  const effectiveMode = detectedMode ?? 'work';
1476
- const modeAllowed = MODE_ALLOWED_TOOLS[effectiveMode] ?? null;
1531
+ // `social:talking` is the social room with the making taken away. Resolve
1532
+ // the base room first, then subtract — so a talking variant can never
1533
+ // drift from the room it belongs to, and a tool added to `social` is
1534
+ // available for discussion on the same day it is added for work.
1535
+ const talkingMode = effectiveMode.endsWith(TALKING_MODE_SUFFIX);
1536
+ const baseMode = talkingMode
1537
+ ? effectiveMode.slice(0, -TALKING_MODE_SUFFIX.length)
1538
+ : effectiveMode;
1539
+ const baseAllowed = MODE_ALLOWED_TOOLS[baseMode] ?? null;
1540
+ const modeAllowed = baseAllowed && talkingMode
1541
+ ? talkingToolsFor(baseAllowed)
1542
+ : baseAllowed;
1543
+ if (talkingMode) {
1544
+ logger.debug(`[agent] ${baseMode} in talking mode — ${PRODUCING_TOOLS.size} producing tool(s) withheld`);
1545
+ }
1477
1546
  // Keyed on the MODE, not on whether a tag was present. Keying it on tag
1478
1547
  // presence works today only because code mode is the untagged one — the
1479
1548
  // moment a `[Work Mode]` tag exists, that spelling would silently flip
1480
1549
  // the gate to enforce and the whole staged rollout would vanish.
1481
1550
  // Every other mode has been enforcing for months and continues to.
1482
1551
  const applyModeGate = modeAllowed !== null
1483
- && (effectiveMode !== 'work' || WORK_TOOL_GATE === 'enforce');
1552
+ && (baseMode !== 'work' || WORK_TOOL_GATE === 'enforce' || talkingMode);
1484
1553
  let filteredSchemas;
1485
1554
  if (modeAllowed && applyModeGate) {
1486
1555
  filteredSchemas = allSchemas.filter(s => toolPassesModeGate(s.function.name, modeAllowed));