@voicethere/agent 0.31.0 → 0.31.2
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/llm/agent/create-llm-agent.d.ts.map +1 -1
- package/dist/llm/agent/create-llm-agent.js +80 -3
- package/dist/llm/agent/create-llm-agent.js.map +1 -1
- package/dist/templates/llm-agent/agent.js +64 -3
- package/dist/templates/llm-board/agent.js +118 -32
- package/dist/templates/llm-docs-rag/agent.js +64 -3
- package/dist/templates/llm-language-tutor/agent.js +64 -3
- package/dist/templates/llm-mcp-service/agent.js +64 -3
- package/dist/templates/llm-support-sticky-user/agent.js +64 -3
- package/dist/templates/registry.d.ts.map +1 -1
- package/dist/templates/registry.js +1 -0
- package/dist/templates/registry.js.map +1 -1
- package/eject/llm/loop.ts +118 -4
- package/package.json +1 -1
- package/templates/llm-board/README.md +1 -1
- package/templates/llm-board/agent.ts +4 -29
- package/templates/llm-board/prompt.md +10 -2
- package/templates/llm-board/tool-specs.ts +43 -0
- package/templates/llm-board/voicethere.llm.json +1 -1
|
@@ -36009,6 +36009,45 @@ ${validated.errors.map((e) => `${e.path || "(root)"}: ${e.message}`).join("\n")}
|
|
|
36009
36009
|
...link.label ? { label: link.label } : {}
|
|
36010
36010
|
});
|
|
36011
36011
|
}
|
|
36012
|
+
function trackSpeech(s, h, meta2) {
|
|
36013
|
+
const entry = {
|
|
36014
|
+
requestId: h.requestId,
|
|
36015
|
+
...meta2
|
|
36016
|
+
};
|
|
36017
|
+
s.speech.push(entry);
|
|
36018
|
+
void h.done.then(() => {
|
|
36019
|
+
const i = s.speech.indexOf(entry);
|
|
36020
|
+
if (i >= 0)
|
|
36021
|
+
s.speech.splice(i, 1);
|
|
36022
|
+
});
|
|
36023
|
+
return h;
|
|
36024
|
+
}
|
|
36025
|
+
function flushSpeechForChat(s, keepTurnId) {
|
|
36026
|
+
const targets = s.speech.filter((e) => e.turnId !== keepTurnId);
|
|
36027
|
+
if (targets.length === 0)
|
|
36028
|
+
return;
|
|
36029
|
+
for (const e of targets) {
|
|
36030
|
+
cancelSpeech(s.sessionId, { requestId: e.requestId });
|
|
36031
|
+
}
|
|
36032
|
+
s.speech = s.speech.filter((e) => !targets.includes(e));
|
|
36033
|
+
agentLog("info", `chat message flushed ${targets.length} pending speech item(s)`, s.sessionId);
|
|
36034
|
+
const byTurn = /* @__PURE__ */ new Map();
|
|
36035
|
+
for (const e of targets) {
|
|
36036
|
+
if (!e.sentences)
|
|
36037
|
+
continue;
|
|
36038
|
+
const list = byTurn.get(e.turnId) ?? [];
|
|
36039
|
+
list.push(e);
|
|
36040
|
+
byTurn.set(e.turnId, list);
|
|
36041
|
+
}
|
|
36042
|
+
for (const [turnId, cut] of byTurn) {
|
|
36043
|
+
const sentences = cut[0].sentences;
|
|
36044
|
+
const cutIndexes = new Set(cut.flatMap((e) => e.indexes ?? []));
|
|
36045
|
+
const playedText = sentences.filter((_, i) => !cutIndexes.has(i)).join(" ");
|
|
36046
|
+
const unplayedText = cut.map((e) => e.text).join(" ");
|
|
36047
|
+
s.lastInterruption = { turnId, playedText, unplayedText };
|
|
36048
|
+
s.history.replaceAssistantText(turnId, playedText, useNote ? interruptionNote(playedText, unplayedText) : void 0);
|
|
36049
|
+
}
|
|
36050
|
+
}
|
|
36012
36051
|
function deliver(s, t, text, interruptible = true) {
|
|
36013
36052
|
flushSpeech(s, t);
|
|
36014
36053
|
t.spoken.push(text);
|
|
@@ -36016,7 +36055,12 @@ ${validated.errors.map((e) => `${e.path || "(root)"}: ${e.message}`).join("\n")}
|
|
|
36016
36055
|
sendReplyDelta(s, t, text);
|
|
36017
36056
|
if (t.source === "voice" || speakChat) {
|
|
36018
36057
|
if (interruptible) {
|
|
36019
|
-
speak(s.sessionId, text, replyOpts(t))
|
|
36058
|
+
trackSpeech(s, speak(s.sessionId, text, replyOpts(t)), {
|
|
36059
|
+
turnId: t.turnId,
|
|
36060
|
+
text,
|
|
36061
|
+
sentences: t.spoken,
|
|
36062
|
+
indexes: [t.spoken.length - 1]
|
|
36063
|
+
});
|
|
36020
36064
|
} else {
|
|
36021
36065
|
const h = announce(s.sessionId, text, replyOpts(t));
|
|
36022
36066
|
trackAnnouncement(s, h.done);
|
|
@@ -36029,7 +36073,11 @@ ${validated.errors.map((e) => `${e.path || "(root)"}: ${e.message}`).join("\n")}
|
|
|
36029
36073
|
function speakAnnouncement(s, turnId, text, interruptible, fillerKind) {
|
|
36030
36074
|
const opts2 = fillerKind ? { turnId, kind: "filler", fillerKind } : { turnId };
|
|
36031
36075
|
if (interruptible) {
|
|
36032
|
-
return speak(s.sessionId, text, opts2)
|
|
36076
|
+
return trackSpeech(s, speak(s.sessionId, text, opts2), {
|
|
36077
|
+
turnId,
|
|
36078
|
+
text,
|
|
36079
|
+
...fillerKind ? {} : { sentences: [text], indexes: [0] }
|
|
36080
|
+
});
|
|
36033
36081
|
}
|
|
36034
36082
|
const h = announce(s.sessionId, text, opts2);
|
|
36035
36083
|
trackAnnouncement(s, h.done);
|
|
@@ -36117,11 +36165,18 @@ ${validated.errors.map((e) => `${e.path || "(root)"}: ${e.message}`).join("\n")}
|
|
|
36117
36165
|
if (t.pending.length === 0)
|
|
36118
36166
|
return;
|
|
36119
36167
|
const text = t.pending.join(" ");
|
|
36168
|
+
const base = t.spoken.length - t.pending.length;
|
|
36169
|
+
const indexes = t.pending.map((_, i) => base + i);
|
|
36120
36170
|
t.pending = [];
|
|
36121
36171
|
t.pendingChars = 0;
|
|
36122
36172
|
if (t.controller.signal.aborted || s.ended)
|
|
36123
36173
|
return;
|
|
36124
|
-
speak(s.sessionId, text, replyOpts(t))
|
|
36174
|
+
trackSpeech(s, speak(s.sessionId, text, replyOpts(t)), {
|
|
36175
|
+
turnId: t.turnId,
|
|
36176
|
+
text,
|
|
36177
|
+
sentences: t.spoken,
|
|
36178
|
+
indexes
|
|
36179
|
+
});
|
|
36125
36180
|
}
|
|
36126
36181
|
function deliverReply(s, t, text) {
|
|
36127
36182
|
if (coalesceMs <= 0) {
|
|
@@ -36768,12 +36823,16 @@ ${t.inputText}` : t.inputText, {
|
|
|
36768
36823
|
return;
|
|
36769
36824
|
}
|
|
36770
36825
|
const active = s.active;
|
|
36826
|
+
if (source === "chat" && policy === "cancel" && config2.bargeIn?.mode !== "off") {
|
|
36827
|
+
flushSpeechForChat(s, active?.turnId);
|
|
36828
|
+
}
|
|
36771
36829
|
if (active) {
|
|
36772
36830
|
if (policy === "finish") {
|
|
36773
36831
|
s.queued = { text, source, utteranceId };
|
|
36774
36832
|
return;
|
|
36775
36833
|
}
|
|
36776
36834
|
cancelSpeech(s.sessionId, { turnId: active.turnId });
|
|
36835
|
+
s.speech = s.speech.filter((e) => e.turnId !== active.turnId);
|
|
36777
36836
|
active.state.abortStatus = "cancelled";
|
|
36778
36837
|
active.state.controller.abort();
|
|
36779
36838
|
clearFillerTimer(active.state);
|
|
@@ -36826,6 +36885,7 @@ ${t.inputText}` : t.inputText, {
|
|
|
36826
36885
|
const s = {
|
|
36827
36886
|
sessionId: ctx.sessionId,
|
|
36828
36887
|
history: new ConversationHistory(historyTurns),
|
|
36888
|
+
speech: [],
|
|
36829
36889
|
announcing: 0,
|
|
36830
36890
|
chain: Promise.resolve(),
|
|
36831
36891
|
ended: false
|
|
@@ -36894,6 +36954,7 @@ ${t.inputText}` : t.inputText, {
|
|
|
36894
36954
|
return;
|
|
36895
36955
|
s.ended = true;
|
|
36896
36956
|
s.queued = void 0;
|
|
36957
|
+
s.speech.length = 0;
|
|
36897
36958
|
if (s.active) {
|
|
36898
36959
|
s.active.state.abortStatus = "cancelled";
|
|
36899
36960
|
s.active.state.controller.abort();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/templates/registry.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,KAAK,CAAC;AAE7C,MAAM,MAAM,gBAAgB,GAC1B,OAAO,GAAG,MAAM,GAAG,YAAY,GA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,CAAC;AAEF,MAAM,UAAU,iBAAiB,CAAC,EAAU;IAC1C,OAAO,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAU;IACxC,MAAM,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACxC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,8BAA8B,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,yBAAyB;IACvC,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AACrE,CAAC"}
|
package/eject/llm/loop.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copied from @voicethere/agent 0.31.
|
|
1
|
+
// Copied from @voicethere/agent 0.31.2. Package updates no longer change this file.
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import {
|
|
4
4
|
type AgentHandlers,
|
|
@@ -160,8 +160,24 @@ interface ActiveTurn {
|
|
|
160
160
|
promise: Promise<void>;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Interruptible speech sent to the runner and not settled yet. A typed message
|
|
165
|
+
* flushes these like a voice barge-in does (`flushSpeechForChat`).
|
|
166
|
+
*/
|
|
167
|
+
interface PendingSpeech {
|
|
168
|
+
requestId: string;
|
|
169
|
+
turnId: string;
|
|
170
|
+
text: string;
|
|
171
|
+
/** Reply sentences of the turn, in order; undefined for fillers. */
|
|
172
|
+
sentences?: string[];
|
|
173
|
+
/** Indexes in `sentences` of the sentences `text` holds (coalesced speech holds several). */
|
|
174
|
+
indexes?: number[];
|
|
175
|
+
}
|
|
176
|
+
|
|
163
177
|
interface SessionState {
|
|
164
178
|
sessionId: string;
|
|
179
|
+
/** Interruptible speech still pending at the runner, oldest first. */
|
|
180
|
+
speech: PendingSpeech[];
|
|
165
181
|
history: ConversationHistory;
|
|
166
182
|
active?: ActiveTurn;
|
|
167
183
|
queued?: { text: string; source: Source; utteranceId?: string };
|
|
@@ -435,6 +451,78 @@ export function createLlmAgent(opts: CreateLlmAgentOptions): AgentHandlers {
|
|
|
435
451
|
});
|
|
436
452
|
}
|
|
437
453
|
|
|
454
|
+
/** Remembers interruptible speech until the runner settles it. */
|
|
455
|
+
function trackSpeech(
|
|
456
|
+
s: SessionState,
|
|
457
|
+
h: SpeakHandle,
|
|
458
|
+
meta: {
|
|
459
|
+
turnId: string;
|
|
460
|
+
text: string;
|
|
461
|
+
sentences?: string[];
|
|
462
|
+
indexes?: number[];
|
|
463
|
+
},
|
|
464
|
+
): SpeakHandle {
|
|
465
|
+
const entry: PendingSpeech = {
|
|
466
|
+
requestId: h.requestId,
|
|
467
|
+
...meta,
|
|
468
|
+
};
|
|
469
|
+
s.speech.push(entry);
|
|
470
|
+
void h.done.then(() => {
|
|
471
|
+
const i = s.speech.indexOf(entry);
|
|
472
|
+
if (i >= 0) s.speech.splice(i, 1);
|
|
473
|
+
});
|
|
474
|
+
return h;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* A typed message barges in like caller speech: interruptible speech of
|
|
479
|
+
* earlier turns is cancelled (speech the agent sent with
|
|
480
|
+
* `interruptible: false` keeps playing, as on a voice barge-in). Speech of
|
|
481
|
+
* `keepTurnId` (the running turn, cancelled by its own path) is left alone.
|
|
482
|
+
* The runner reports no played text for a cancel, so the history keeps the
|
|
483
|
+
* reply sentences already settled and gets the same interruption note as a
|
|
484
|
+
* voice barge-in, at sentence granularity: a sentence still pending (queued
|
|
485
|
+
* or playing) counts as not heard. Nothing waits for the runner, so the new
|
|
486
|
+
* reply starts at once.
|
|
487
|
+
*/
|
|
488
|
+
function flushSpeechForChat(
|
|
489
|
+
s: SessionState,
|
|
490
|
+
keepTurnId: string | undefined,
|
|
491
|
+
): void {
|
|
492
|
+
const targets = s.speech.filter((e) => e.turnId !== keepTurnId);
|
|
493
|
+
if (targets.length === 0) return;
|
|
494
|
+
for (const e of targets) {
|
|
495
|
+
cancelSpeech(s.sessionId, { requestId: e.requestId });
|
|
496
|
+
}
|
|
497
|
+
s.speech = s.speech.filter((e) => !targets.includes(e));
|
|
498
|
+
agentLog(
|
|
499
|
+
"info",
|
|
500
|
+
`chat message flushed ${targets.length} pending speech item(s)`,
|
|
501
|
+
s.sessionId,
|
|
502
|
+
);
|
|
503
|
+
const byTurn = new Map<string, PendingSpeech[]>();
|
|
504
|
+
for (const e of targets) {
|
|
505
|
+
if (!e.sentences) continue;
|
|
506
|
+
const list = byTurn.get(e.turnId) ?? [];
|
|
507
|
+
list.push(e);
|
|
508
|
+
byTurn.set(e.turnId, list);
|
|
509
|
+
}
|
|
510
|
+
for (const [turnId, cut] of byTurn) {
|
|
511
|
+
const sentences = cut[0].sentences as string[];
|
|
512
|
+
const cutIndexes = new Set(cut.flatMap((e) => e.indexes ?? []));
|
|
513
|
+
const playedText = sentences
|
|
514
|
+
.filter((_, i) => !cutIndexes.has(i))
|
|
515
|
+
.join(" ");
|
|
516
|
+
const unplayedText = cut.map((e) => e.text).join(" ");
|
|
517
|
+
s.lastInterruption = { turnId, playedText, unplayedText };
|
|
518
|
+
s.history.replaceAssistantText(
|
|
519
|
+
turnId,
|
|
520
|
+
playedText,
|
|
521
|
+
useNote ? interruptionNote(playedText, unplayedText) : undefined,
|
|
522
|
+
);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
438
526
|
/** The one place where a sentence of a reply leaves the agent. */
|
|
439
527
|
function deliver(
|
|
440
528
|
s: SessionState,
|
|
@@ -448,7 +536,12 @@ export function createLlmAgent(opts: CreateLlmAgentOptions): AgentHandlers {
|
|
|
448
536
|
sendReplyDelta(s, t, text);
|
|
449
537
|
if (t.source === "voice" || speakChat) {
|
|
450
538
|
if (interruptible) {
|
|
451
|
-
speak(s.sessionId, text, replyOpts(t))
|
|
539
|
+
trackSpeech(s, speak(s.sessionId, text, replyOpts(t)), {
|
|
540
|
+
turnId: t.turnId,
|
|
541
|
+
text,
|
|
542
|
+
sentences: t.spoken,
|
|
543
|
+
indexes: [t.spoken.length - 1],
|
|
544
|
+
});
|
|
452
545
|
} else {
|
|
453
546
|
const h = announce(s.sessionId, text, replyOpts(t));
|
|
454
547
|
trackAnnouncement(s, h.done);
|
|
@@ -480,7 +573,11 @@ export function createLlmAgent(opts: CreateLlmAgentOptions): AgentHandlers {
|
|
|
480
573
|
? { turnId, kind: "filler" as const, fillerKind }
|
|
481
574
|
: { turnId };
|
|
482
575
|
if (interruptible) {
|
|
483
|
-
return speak(s.sessionId, text, opts)
|
|
576
|
+
return trackSpeech(s, speak(s.sessionId, text, opts), {
|
|
577
|
+
turnId,
|
|
578
|
+
text,
|
|
579
|
+
...(fillerKind ? {} : { sentences: [text], indexes: [0] }),
|
|
580
|
+
});
|
|
484
581
|
}
|
|
485
582
|
const h = announce(s.sessionId, text, opts);
|
|
486
583
|
trackAnnouncement(s, h.done);
|
|
@@ -586,10 +683,17 @@ export function createLlmAgent(opts: CreateLlmAgentOptions): AgentHandlers {
|
|
|
586
683
|
t.coalesceTimer = undefined;
|
|
587
684
|
if (t.pending.length === 0) return;
|
|
588
685
|
const text = t.pending.join(" ");
|
|
686
|
+
const base = t.spoken.length - t.pending.length;
|
|
687
|
+
const indexes = t.pending.map((_, i) => base + i);
|
|
589
688
|
t.pending = [];
|
|
590
689
|
t.pendingChars = 0;
|
|
591
690
|
if (t.controller.signal.aborted || s.ended) return;
|
|
592
|
-
speak(s.sessionId, text, replyOpts(t))
|
|
691
|
+
trackSpeech(s, speak(s.sessionId, text, replyOpts(t)), {
|
|
692
|
+
turnId: t.turnId,
|
|
693
|
+
text,
|
|
694
|
+
sentences: t.spoken,
|
|
695
|
+
indexes,
|
|
696
|
+
});
|
|
593
697
|
}
|
|
594
698
|
|
|
595
699
|
/** A sentence of the model's reply: chat delta now, speech coalesced. */
|
|
@@ -1412,12 +1516,20 @@ export function createLlmAgent(opts: CreateLlmAgentOptions): AgentHandlers {
|
|
|
1412
1516
|
return;
|
|
1413
1517
|
}
|
|
1414
1518
|
const active = s.active;
|
|
1519
|
+
if (
|
|
1520
|
+
source === "chat" &&
|
|
1521
|
+
policy === "cancel" &&
|
|
1522
|
+
config.bargeIn?.mode !== "off"
|
|
1523
|
+
) {
|
|
1524
|
+
flushSpeechForChat(s, active?.turnId);
|
|
1525
|
+
}
|
|
1415
1526
|
if (active) {
|
|
1416
1527
|
if (policy === "finish") {
|
|
1417
1528
|
s.queued = { text, source, utteranceId };
|
|
1418
1529
|
return;
|
|
1419
1530
|
}
|
|
1420
1531
|
cancelSpeech(s.sessionId, { turnId: active.turnId });
|
|
1532
|
+
s.speech = s.speech.filter((e) => e.turnId !== active.turnId);
|
|
1421
1533
|
active.state.abortStatus = "cancelled";
|
|
1422
1534
|
active.state.controller.abort();
|
|
1423
1535
|
clearFillerTimer(active.state);
|
|
@@ -1486,6 +1598,7 @@ export function createLlmAgent(opts: CreateLlmAgentOptions): AgentHandlers {
|
|
|
1486
1598
|
const s: SessionState = {
|
|
1487
1599
|
sessionId: ctx.sessionId,
|
|
1488
1600
|
history: new ConversationHistory(historyTurns),
|
|
1601
|
+
speech: [],
|
|
1489
1602
|
announcing: 0,
|
|
1490
1603
|
chain: Promise.resolve(),
|
|
1491
1604
|
ended: false,
|
|
@@ -1566,6 +1679,7 @@ export function createLlmAgent(opts: CreateLlmAgentOptions): AgentHandlers {
|
|
|
1566
1679
|
if (!s) return;
|
|
1567
1680
|
s.ended = true;
|
|
1568
1681
|
s.queued = undefined;
|
|
1682
|
+
s.speech.length = 0;
|
|
1569
1683
|
if (s.active) {
|
|
1570
1684
|
s.active.state.abortStatus = "cancelled";
|
|
1571
1685
|
s.active.state.controller.abort();
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ A project secret named `AGENT_OPENROUTER_API_KEY` (a key from openrouter.ai). No
|
|
|
10
10
|
|
|
11
11
|
- `agent.ts` routes board messages first and passes everything else to the LLM as chat. It also defines the tools `list_notes`, `add_note` and `update_note`.
|
|
12
12
|
- `board.ts` is the board itself and the message parser, with no VoiceThere imports.
|
|
13
|
-
- `voicethere.llm.json` holds the model (`
|
|
13
|
+
- `voicethere.llm.json` holds the model (`anthropic/claude-haiku-5.5` on OpenRouter), greeting and settings. Knowledge is off.
|
|
14
14
|
- `prompt.md` is the facilitator's system prompt.
|
|
15
15
|
- `md.d.ts` lets TypeScript accept `import x from "./x.md"`.
|
|
16
16
|
|
|
@@ -9,11 +9,11 @@ import config from "./voicethere.llm.json";
|
|
|
9
9
|
import systemPrompt from "./prompt.md";
|
|
10
10
|
import {
|
|
11
11
|
Board,
|
|
12
|
-
NOTE_COLORS,
|
|
13
12
|
parseBoardMessage,
|
|
14
13
|
type BoardMessage,
|
|
15
14
|
type NoteColor,
|
|
16
15
|
} from "./board";
|
|
16
|
+
import { BOARD_TOOL_SPECS } from "./tool-specs";
|
|
17
17
|
|
|
18
18
|
// Boards are room-scoped. A client joins a room with { type: "board.join",
|
|
19
19
|
// room }; every session in the room sees the same board. A session that never
|
|
@@ -130,12 +130,8 @@ function apply(sessionId: string, m: BoardMessage): void {
|
|
|
130
130
|
broadcast(sessionId);
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
const colorSchema = { type: "string", enum: [...NOTE_COLORS] };
|
|
134
|
-
|
|
135
133
|
const listNotes = defineTool({
|
|
136
|
-
|
|
137
|
-
description: "List every note on the shared board.",
|
|
138
|
-
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
134
|
+
...BOARD_TOOL_SPECS.list_notes,
|
|
139
135
|
handler: (_args, ctx) => {
|
|
140
136
|
const board = boardFor(ctx.sessionId);
|
|
141
137
|
if (!board) return SESSION_ENDED;
|
|
@@ -148,14 +144,7 @@ const listNotes = defineTool({
|
|
|
148
144
|
});
|
|
149
145
|
|
|
150
146
|
const addNote = defineTool<{ text: string; color?: NoteColor }>({
|
|
151
|
-
|
|
152
|
-
description: "Add a note to the shared board. Text is 1 to 200 characters.",
|
|
153
|
-
inputSchema: {
|
|
154
|
-
type: "object",
|
|
155
|
-
properties: { text: { type: "string" }, color: colorSchema },
|
|
156
|
-
required: ["text"],
|
|
157
|
-
additionalProperties: false,
|
|
158
|
-
},
|
|
147
|
+
...BOARD_TOOL_SPECS.add_note,
|
|
159
148
|
handler: ({ text, color }, ctx) => {
|
|
160
149
|
const board = boardFor(ctx.sessionId);
|
|
161
150
|
if (!board) return SESSION_ENDED;
|
|
@@ -173,21 +162,7 @@ const updateNote = defineTool<{
|
|
|
173
162
|
x?: number;
|
|
174
163
|
y?: number;
|
|
175
164
|
}>({
|
|
176
|
-
|
|
177
|
-
description:
|
|
178
|
-
"Change a note's text, color or position (x and y between 0 and 1).",
|
|
179
|
-
inputSchema: {
|
|
180
|
-
type: "object",
|
|
181
|
-
properties: {
|
|
182
|
-
id: { type: "string" },
|
|
183
|
-
text: { type: "string" },
|
|
184
|
-
color: colorSchema,
|
|
185
|
-
x: { type: "number" },
|
|
186
|
-
y: { type: "number" },
|
|
187
|
-
},
|
|
188
|
-
required: ["id"],
|
|
189
|
-
additionalProperties: false,
|
|
190
|
-
},
|
|
165
|
+
...BOARD_TOOL_SPECS.update_note,
|
|
191
166
|
handler: ({ id, ...patch }, ctx) => {
|
|
192
167
|
const board = boardFor(ctx.sessionId);
|
|
193
168
|
if (!board) return SESSION_ENDED;
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
You are the facilitator of a shared brainstorming board. The people in the room put sticky notes on it, and you can read, add and change notes with your tools. People talk to you by voice, so everything you say is read aloud.
|
|
1
|
+
You are the facilitator of a shared brainstorming board. The people in the room put sticky notes on it, and you can read, add and change notes with your tools. People talk to you by voice, so everything you say is read aloud. What they say reaches you as a transcript that can mishear words, for example "node" for "note"; when the board makes the meaning clear, write the word they meant.
|
|
2
2
|
|
|
3
3
|
Keep spoken replies to one or two short sentences. Do not use markdown, lists, emoji or special characters.
|
|
4
4
|
|
|
5
|
+
A note has only its text, a color and a position. It has no separate title or name, so naming, renaming or rewording a note means changing its text.
|
|
6
|
+
|
|
5
7
|
Call list_notes before you group, compare or summarise notes, and before you change one. Never guess what is on the board.
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
To change a note that is already on the board, use update_note with that note's id. That covers new wording, a new name, a fix, a new color or a move. Never use add_note to change a note: it would leave the old note and a second one.
|
|
10
|
+
|
|
11
|
+
Use add_note only for a note that is not on the board yet: when someone asks you to add one, or when you summarise. When you summarise, write one short note per theme yourself; do not ask anyone to name or word it.
|
|
12
|
+
|
|
13
|
+
If you asked a question about a note that is on the board, such as "What should I call it?", the answer is meant for that note, even in the middle of a summary: put it on that note with update_note and do not add a new note.
|
|
14
|
+
|
|
15
|
+
After a change, say briefly what you did, for example "I renamed the note to Basic note." Ask a follow-up question only when you need the answer to finish the request.
|
|
8
16
|
|
|
9
17
|
If a tool says the board is full or a note does not exist, say so plainly and suggest what to do next.
|
|
10
18
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { NOTE_COLORS } from "./board.js";
|
|
2
|
+
|
|
3
|
+
const colorSchema = { type: "string", enum: [...NOTE_COLORS] };
|
|
4
|
+
|
|
5
|
+
export const BOARD_TOOL_SPECS = {
|
|
6
|
+
list_notes: {
|
|
7
|
+
name: "list_notes",
|
|
8
|
+
description: "List every note on the shared board.",
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: "object",
|
|
11
|
+
properties: {},
|
|
12
|
+
additionalProperties: false,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
add_note: {
|
|
16
|
+
name: "add_note",
|
|
17
|
+
description:
|
|
18
|
+
"Add a new note to the shared board. Only for a note that is not on the board yet; to rename, reword, recolor or move an existing note use update_note. Text is 1 to 200 characters.",
|
|
19
|
+
inputSchema: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: { text: { type: "string" }, color: colorSchema },
|
|
22
|
+
required: ["text"],
|
|
23
|
+
additionalProperties: false,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
update_note: {
|
|
27
|
+
name: "update_note",
|
|
28
|
+
description:
|
|
29
|
+
"Change an existing note by id: its text (also to rename or reword it), color or position (x and y between 0 and 1). Get the id from list_notes.",
|
|
30
|
+
inputSchema: {
|
|
31
|
+
type: "object",
|
|
32
|
+
properties: {
|
|
33
|
+
id: { type: "string" },
|
|
34
|
+
text: { type: "string" },
|
|
35
|
+
color: colorSchema,
|
|
36
|
+
x: { type: "number" },
|
|
37
|
+
y: { type: "number" },
|
|
38
|
+
},
|
|
39
|
+
required: ["id"],
|
|
40
|
+
additionalProperties: false,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
} as const;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "./node_modules/@voicethere/agent/schema/voicethere.llm.schema.json",
|
|
3
3
|
"version": 1,
|
|
4
4
|
"provider": "openrouter",
|
|
5
|
-
"model": "
|
|
5
|
+
"model": "anthropic/claude-haiku-5.5",
|
|
6
6
|
"apiKeySecret": "AGENT_OPENROUTER_API_KEY",
|
|
7
7
|
"maxOutputTokens": 512,
|
|
8
8
|
"greeting": {
|