@project-ava-supernova/core 0.2.152 → 0.2.154
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/agent/agent.d.ts +67 -0
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/agent.js +67 -2
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/context-continuity.d.ts.map +1 -1
- package/dist/agent/context-continuity.js +2 -0
- package/dist/agent/context-continuity.js.map +1 -1
- package/dist/agent/mode-tags.d.ts +1 -1
- package/dist/agent/mode-tags.d.ts.map +1 -1
- package/dist/agent/mode-tags.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/social/index.d.ts +33 -0
- package/dist/social/index.d.ts.map +1 -1
- package/dist/social/index.js.map +1 -1
- package/dist/tools/check-posts.d.ts +33 -0
- package/dist/tools/check-posts.d.ts.map +1 -0
- package/dist/tools/check-posts.js +107 -0
- package/dist/tools/check-posts.js.map +1 -0
- package/dist/tools/tool-registry.d.ts.map +1 -1
- package/dist/tools/tool-registry.js +2 -0
- package/dist/tools/tool-registry.js.map +1 -1
- package/package.json +1 -1
package/dist/agent/agent.d.ts
CHANGED
|
@@ -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,KAA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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"}
|
package/dist/agent/agent.js
CHANGED
|
@@ -535,6 +535,12 @@ const MODE_ALLOWED_TOOLS = {
|
|
|
535
535
|
// it here would have registered a tool that answers "no canvas" every time.
|
|
536
536
|
// write_voiceover carries its own store, the way write_video_post does.
|
|
537
537
|
'write_voiceover',
|
|
538
|
+
// WHAT ACTUALLY EXISTS. Without this she can only answer "did that go
|
|
539
|
+
// out?" from her own intent, which is how she came to tell the operator
|
|
540
|
+
// four posts were written when only the videos were made. Registering it
|
|
541
|
+
// in the builtins was not enough — this Set is the real gate, the same
|
|
542
|
+
// way write_video_post sat unusable above.
|
|
543
|
+
'check_posts',
|
|
538
544
|
// Research to make the angle current
|
|
539
545
|
'web_search',
|
|
540
546
|
// Memory carries the mission voice; journal her read on the brand
|
|
@@ -712,6 +718,16 @@ export function detectModeFromMessages(messages) {
|
|
|
712
718
|
* second is not a decision, it is an absence - and treating an absence as a
|
|
713
719
|
* refusal is how a registered tool disappears with no error anywhere.
|
|
714
720
|
*/
|
|
721
|
+
/**
|
|
722
|
+
* Tools that PRODUCE an artefact.
|
|
723
|
+
*
|
|
724
|
+
* Named as a set because there is now a state in which none of them may run:
|
|
725
|
+
* see `TALKING_MODE_SUFFIX` below.
|
|
726
|
+
*/
|
|
727
|
+
export const PRODUCING_TOOLS = new Set([
|
|
728
|
+
'write_post', 'write_video_post', 'write_post_image', 'write_voiceover',
|
|
729
|
+
'write_article', 'write_recipe', 'write_exercise',
|
|
730
|
+
]);
|
|
715
731
|
const MODE_CLASSIFIED_TOOLS = new Set(Object.values(MODE_ALLOWED_TOOLS).flatMap((set) => [...set]));
|
|
716
732
|
/**
|
|
717
733
|
* Whether a tool survives a mode's allowlist.
|
|
@@ -722,6 +738,41 @@ const MODE_CLASSIFIED_TOOLS = new Set(Object.values(MODE_ALLOWED_TOOLS).flatMap(
|
|
|
722
738
|
* all (an unknown tool is somebody's extension, not a policy decision) -
|
|
723
739
|
* except desktop tools, which stay out however they are classified.
|
|
724
740
|
*/
|
|
741
|
+
/**
|
|
742
|
+
* A mode name ending in this is the same room, with the making taken away.
|
|
743
|
+
*
|
|
744
|
+
* ── Why a state and not an instruction ────────────────────────────────────
|
|
745
|
+
*
|
|
746
|
+
* 20 Oct 2026: the operator tried to talk to her about a mistake and she made
|
|
747
|
+
* something instead. Every time. He had been raising it for months.
|
|
748
|
+
*
|
|
749
|
+
* The cause was not wilfulness. The only gate she had (`intent-gate`) chooses
|
|
750
|
+
* `needs_team` and creation-vs-continuation — how MUCH machinery to spin up.
|
|
751
|
+
* There was no branch for *don't act*. Add that a complaint is grammatically
|
|
752
|
+
* identical to a request ("the text post wasn't made" reads exactly like "make
|
|
753
|
+
* the text post"), that the room's prefix is a working prefix, and that the
|
|
754
|
+
* tools are always on the table, and producing is the only move the shape of
|
|
755
|
+
* the system affords.
|
|
756
|
+
*
|
|
757
|
+
* "Please discuss rather than act" is a suggestion competing against all of
|
|
758
|
+
* that. Removing the tools is not a suggestion.
|
|
759
|
+
*
|
|
760
|
+
* It matters here more than elsewhere because the operator is LEARNING
|
|
761
|
+
* marketing in this room. "Why did you tag it that way?" is the most valuable
|
|
762
|
+
* turn he can take, and it is worth nothing if the answer is four more cards.
|
|
763
|
+
*/
|
|
764
|
+
export const TALKING_MODE_SUFFIX = ':talking';
|
|
765
|
+
/**
|
|
766
|
+
* The room's tools with everything that makes an artefact removed.
|
|
767
|
+
*
|
|
768
|
+
* Reading, searching and checking all stay: a discussion in which she cannot
|
|
769
|
+
* look anything up is not a discussion, it is a guess. `check_posts`
|
|
770
|
+
* especially — the likeliest reason to be talking at all is that something
|
|
771
|
+
* did not get made.
|
|
772
|
+
*/
|
|
773
|
+
export function talkingToolsFor(modeAllowed) {
|
|
774
|
+
return new Set([...modeAllowed].filter(t => !PRODUCING_TOOLS.has(t)));
|
|
775
|
+
}
|
|
725
776
|
export function toolPassesModeGate(name, modeAllowed) {
|
|
726
777
|
if (modeAllowed.has(name) || ALWAYS_ALLOWED_TOOLS.has(name))
|
|
727
778
|
return true;
|
|
@@ -1473,14 +1524,28 @@ export class Agent {
|
|
|
1473
1524
|
// Desktop tools stay out on both branches. That was the one restriction
|
|
1474
1525
|
// the old fallback did apply, and it is load-bearing.
|
|
1475
1526
|
const effectiveMode = detectedMode ?? 'work';
|
|
1476
|
-
|
|
1527
|
+
// `social:talking` is the social room with the making taken away. Resolve
|
|
1528
|
+
// the base room first, then subtract — so a talking variant can never
|
|
1529
|
+
// drift from the room it belongs to, and a tool added to `social` is
|
|
1530
|
+
// available for discussion on the same day it is added for work.
|
|
1531
|
+
const talkingMode = effectiveMode.endsWith(TALKING_MODE_SUFFIX);
|
|
1532
|
+
const baseMode = talkingMode
|
|
1533
|
+
? effectiveMode.slice(0, -TALKING_MODE_SUFFIX.length)
|
|
1534
|
+
: effectiveMode;
|
|
1535
|
+
const baseAllowed = MODE_ALLOWED_TOOLS[baseMode] ?? null;
|
|
1536
|
+
const modeAllowed = baseAllowed && talkingMode
|
|
1537
|
+
? talkingToolsFor(baseAllowed)
|
|
1538
|
+
: baseAllowed;
|
|
1539
|
+
if (talkingMode) {
|
|
1540
|
+
logger.debug(`[agent] ${baseMode} in talking mode — ${PRODUCING_TOOLS.size} producing tool(s) withheld`);
|
|
1541
|
+
}
|
|
1477
1542
|
// Keyed on the MODE, not on whether a tag was present. Keying it on tag
|
|
1478
1543
|
// presence works today only because code mode is the untagged one — the
|
|
1479
1544
|
// moment a `[Work Mode]` tag exists, that spelling would silently flip
|
|
1480
1545
|
// the gate to enforce and the whole staged rollout would vanish.
|
|
1481
1546
|
// Every other mode has been enforcing for months and continues to.
|
|
1482
1547
|
const applyModeGate = modeAllowed !== null
|
|
1483
|
-
&& (
|
|
1548
|
+
&& (baseMode !== 'work' || WORK_TOOL_GATE === 'enforce' || talkingMode);
|
|
1484
1549
|
let filteredSchemas;
|
|
1485
1550
|
if (modeAllowed && applyModeGate) {
|
|
1486
1551
|
filteredSchemas = allSchemas.filter(s => toolPassesModeGate(s.function.name, modeAllowed));
|