@agent-native/core-corpus 0.198.8 → 0.199.0-nightly-20261001124634
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/corpus/README.md +1 -1
- package/corpus/templates/brain/.agents/skills/brain/SKILL.md +7 -6
- package/corpus/templates/brain/actions/ask-brain.ts +39 -30
- package/corpus/templates/brain/actions/search-everything.ts +1 -1
- package/corpus/templates/brain/app/i18n-data.ts +10 -10
- package/corpus/templates/brain/changelog/2026-10-01-brain-answers-from-synced-slack-and-zoom-messages.md +6 -0
- package/corpus/templates/brain/server/lib/brain.ts +15 -10
- package/corpus/templates/brain/server/plugins/agent-chat.ts +1 -3
- package/corpus/templates/clips/changelog/2026-09-30-recording-setup-checks-storage-credentials-faster.md +6 -0
- package/corpus/templates/clips/desktop/src-tauri/src/config.rs +5 -0
- package/corpus/templates/clips/desktop/src-tauri/src/meetings_watcher.rs +541 -95
- package/corpus/templates/clips/server/lib/s3-upload-provider.ts +21 -1
- package/corpus/templates/content/actions/add-database-item.ts +5 -0
- package/corpus/templates/content/actions/create-content-database.ts +5 -0
- package/corpus/templates/content/actions/create-document.ts +5 -0
- package/corpus/templates/content/actions/edit-document.ts +5 -0
- package/corpus/templates/content/actions/get-content-database.ts +5 -0
- package/corpus/templates/content/actions/get-document.ts +5 -0
- package/corpus/templates/content/actions/list-content-databases.ts +5 -0
- package/corpus/templates/content/actions/list-documents.ts +5 -0
- package/corpus/templates/content/actions/query-content-database-items.ts +5 -0
- package/corpus/templates/content/actions/search-documents.ts +5 -0
- package/corpus/templates/content/actions/update-database-item.ts +5 -0
- package/corpus/templates/content/agent-native.app-skill.json +85 -1
- package/corpus/templates/content/changelog/2026-09-30-connect-chatgpt-to-draft-documents-and-organize-workspace-re.md +6 -0
- package/corpus/templates/content/public/chatgpt-plugin-icon.svg +9 -0
- package/corpus/templates/content/server/lib/chatgpt-directory-tools.ts +30 -0
- package/corpus/templates/content/server/plugins/agent-chat.ts +2 -0
- package/corpus/templates/design/actions/create-design-from-template.ts +5 -0
- package/corpus/templates/design/actions/create-design.ts +5 -0
- package/corpus/templates/design/actions/edit-design.ts +5 -0
- package/corpus/templates/design/actions/generate-design.ts +5 -0
- package/corpus/templates/design/actions/get-design-snapshot.ts +5 -0
- package/corpus/templates/design/actions/get-design-system.ts +5 -0
- package/corpus/templates/design/actions/list-design-systems.ts +5 -0
- package/corpus/templates/design/actions/list-design-templates.ts +5 -0
- package/corpus/templates/design/actions/list-designs.ts +5 -0
- package/corpus/templates/design/actions/open-visual-edit.ts +32 -0
- package/corpus/templates/design/actions/present-design-variants.ts +5 -0
- package/corpus/templates/design/agent-native.app-skill.json +85 -1
- package/corpus/templates/design/changelog/2026-09-30-connect-chatgpt-to-create-and-refine-interactive-prototypes-.md +6 -0
- package/corpus/templates/design/changelog/2026-09-30-visual-edit-over-mcp-now-gives-your-agent-the-bridge-start-c.md +6 -0
- package/corpus/templates/design/public/chatgpt-plugin-icon.svg +11 -0
- package/corpus/templates/design/server/lib/chatgpt-directory-tools.ts +46 -0
- package/corpus/templates/design/server/plugins/agent-chat.ts +39 -0
- package/corpus/templates/mail/app/components/email/EmailThread.tsx +57 -31
- package/corpus/templates/mail/changelog/2026-09-27-emails-show-as-soon-as-their-text-arrives-instead-of-waiting.md +6 -0
- package/corpus/templates/slides/actions/_deck-write.ts +37 -6
- package/corpus/templates/slides/actions/add-slide.ts +5 -0
- package/corpus/templates/slides/actions/create-deck.ts +5 -0
- package/corpus/templates/slides/actions/duplicate-deck.ts +5 -0
- package/corpus/templates/slides/actions/generate-image-api.ts +8 -2
- package/corpus/templates/slides/actions/get-deck-reference-context.ts +5 -0
- package/corpus/templates/slides/actions/get-deck.ts +7 -1
- package/corpus/templates/slides/actions/get-design-system.ts +6 -1
- package/corpus/templates/slides/actions/get-workspace-defaults.ts +5 -0
- package/corpus/templates/slides/actions/list-decks.ts +6 -0
- package/corpus/templates/slides/actions/list-design-systems.ts +5 -0
- package/corpus/templates/slides/actions/list-slide-comments.ts +31 -11
- package/corpus/templates/slides/actions/patch-deck.ts +44 -34
- package/corpus/templates/slides/actions/update-slide.ts +198 -145
- package/corpus/templates/slides/actions/view-screen.ts +1 -1
- package/corpus/templates/slides/agent-native.app-skill.json +85 -1
- package/corpus/templates/slides/app/components/comments/SlideCommentPins.tsx +89 -1
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +146 -55
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +1 -0
- package/corpus/templates/slides/app/components/editor/NewDeckReferenceStep.tsx +12 -3
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +118 -56
- package/corpus/templates/slides/app/components/editor/SlideSlashCommandMenu.tsx +7 -6
- package/corpus/templates/slides/app/components/editor/canvas-interactions/slides-canvas-adapter.ts +1 -1
- package/corpus/templates/slides/app/components/editor/in-place-text-session.ts +5 -9
- package/corpus/templates/slides/app/context/DeckContext.tsx +108 -23
- package/corpus/templates/slides/app/hooks/use-design-system-workflows.ts +6 -2
- package/corpus/templates/slides/app/hooks/use-design-systems.ts +9 -2
- package/corpus/templates/slides/app/hooks/use-slide-comments.ts +78 -8
- package/corpus/templates/slides/app/i18n/en-US.ts +1 -0
- package/corpus/templates/slides/app/lib/slide-comment-anchor.ts +149 -2
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +31 -0
- package/corpus/templates/slides/app/pages/Index.tsx +15 -2
- package/corpus/templates/slides/app/routes/chat.tsx +1 -0
- package/corpus/templates/slides/changelog/2026-09-30-anchored-comments-stay-visible-on-the-slide-filters-stay-tuc.md +6 -0
- package/corpus/templates/slides/changelog/2026-09-30-comments-stay-attached-to-highlighted-text-and-collaborators.md +6 -0
- package/corpus/templates/slides/changelog/2026-09-30-connect-chatgpt-to-create-and-revise-presentations-in-slides.md +6 -0
- package/corpus/templates/slides/changelog/2026-09-30-fixed-list-editing-and-slash-commands-on-imported-slide-layo.md +6 -0
- package/corpus/templates/slides/changelog/2026-09-30-new-decks-can-be-created-in-empty-workspaces-without-a-desig.md +6 -0
- package/corpus/templates/slides/public/chatgpt-plugin-icon.svg +10 -0
- package/corpus/templates/slides/scripts/edit-fidelity/README.md +5 -4
- package/corpus/templates/slides/scripts/edit-fidelity/lib/in-page.ts +159 -6
- package/corpus/templates/slides/scripts/edit-fidelity/lib/metrics.ts +33 -0
- package/corpus/templates/slides/scripts/edit-fidelity/run.ts +136 -46
- package/corpus/templates/slides/server/lib/chatgpt-directory-tools.ts +53 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +22 -6
- package/corpus/templates/slides/shared/deck-write.ts +22 -0
- package/corpus/templates/slides/shared/slide-comment-anchor.ts +12 -0
- package/package.json +3 -4
- package/corpus/templates/brain/server/lib/a2a-fallback.ts +0 -101
package/corpus/README.md
CHANGED
|
@@ -136,9 +136,9 @@ not just documented:
|
|
|
136
136
|
|
|
137
137
|
| `sourcePolicy` | `rawCaptureFallback` | Behavior |
|
|
138
138
|
| --- | --- | --- |
|
|
139
|
-
| `strict` | `never-answer` |
|
|
140
|
-
| `balanced` (default) | `thin-results` | Prefer
|
|
141
|
-
| `exploratory` | `allowed-leads` | Always include
|
|
139
|
+
| `strict` | `never-answer` | Answers cite distilled knowledge only; synced captures stay searchable but are not answer evidence. If knowledge is missing/thin, say so. |
|
|
140
|
+
| `balanced` (default) | `thin-results` | Prefer distilled knowledge; when it is missing or combined summary+body text is under ~260 chars, answer from answer-eligible synced captures (Slack, Zoom, or other sources), naming source and date. |
|
|
141
|
+
| `exploratory` | `allowed-leads` | Always include answer-eligible synced captures alongside knowledge as citations with source and date. |
|
|
142
142
|
|
|
143
143
|
`requireCitations` (default true) additionally blocks `ask-brain` from
|
|
144
144
|
returning an answer with no usable citation — it returns a policy-explanation
|
|
@@ -146,9 +146,10 @@ message instead of a bare summary when that happens.
|
|
|
146
146
|
|
|
147
147
|
Each source may also carry an `answerPolicy`, configured through the
|
|
148
148
|
`create-source` / `update-source` `policy` argument. `ask-brain` excludes stale
|
|
149
|
-
or answer-ineligible results,
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
or answer-ineligible results, and all captures from sources whose
|
|
150
|
+
`conflictBehavior` is `require-review` (legacy `reviewRequired` no longer
|
|
151
|
+
excludes anything). It ranks `blessed` before `standard` before `untrusted`,
|
|
152
|
+
then by `authority`. It returns the evaluated policy alongside citations
|
|
152
153
|
so external apps can explain why a result was preferred or excluded. Sources
|
|
153
154
|
without this policy retain the compatible `standard`, eligible, authority-50
|
|
154
155
|
behavior.
|
|
@@ -173,7 +173,7 @@ function sourcePolicyEnforcement(args: {
|
|
|
173
173
|
|
|
174
174
|
export default defineAction({
|
|
175
175
|
description:
|
|
176
|
-
"Answer a company-knowledge question from published Brain knowledge,
|
|
176
|
+
"Answer a company-knowledge question from published Brain knowledge, plus synced captures (Slack, Zoom, and other connected sources) that the source policy allows as answer evidence (none under the strict policy). Use this for every company-specific factual question instead of answering from general model knowledge. Capture citations include location and capturedAt; use them to judge recency. Returns a cited answer plus deep links into the Brain knowledge/capture records.",
|
|
177
177
|
schema: z.object({
|
|
178
178
|
question: z.string().min(1),
|
|
179
179
|
mode: z.enum(["cited"]).default("cited"),
|
|
@@ -216,21 +216,24 @@ export default defineAction({
|
|
|
216
216
|
reviewed: item.status === "published",
|
|
217
217
|
}),
|
|
218
218
|
}));
|
|
219
|
-
const
|
|
219
|
+
const eligibleKnowledge = evaluatedKnowledge
|
|
220
220
|
.filter((item) => item.answerPolicy.eligible)
|
|
221
221
|
.sort((left, right) =>
|
|
222
222
|
compareEvaluatedSourcePolicies(left.answerPolicy, right.answerPolicy),
|
|
223
|
-
)
|
|
224
|
-
|
|
223
|
+
);
|
|
224
|
+
const knowledge = eligibleKnowledge.slice(0, 6);
|
|
225
|
+
const answerKnowledge = guidance.retrieval.requireCitations
|
|
226
|
+
? eligibleKnowledge.filter((item) => item.evidence.length > 0).slice(0, 6)
|
|
227
|
+
: knowledge;
|
|
225
228
|
const captureFallback: UniversalSearchResult[] = [];
|
|
226
|
-
const knowledgeTextLength =
|
|
229
|
+
const knowledgeTextLength = answerKnowledge.reduce(
|
|
227
230
|
(total, item) => total + `${item.summary} ${item.body}`.trim().length,
|
|
228
231
|
0,
|
|
229
232
|
);
|
|
230
233
|
const allowRawCaptureFallback =
|
|
231
234
|
guidance.retrieval.rawCaptureFallback === "allowed-leads" ||
|
|
232
235
|
(guidance.retrieval.rawCaptureFallback === "thin-results" &&
|
|
233
|
-
(!
|
|
236
|
+
(!answerKnowledge.length || knowledgeTextLength < 260));
|
|
234
237
|
const captureSearchLanes: SearchLaneStatuses = {
|
|
235
238
|
fts: { status: "ok" },
|
|
236
239
|
semantic: { status: "ok" },
|
|
@@ -269,7 +272,7 @@ export default defineAction({
|
|
|
269
272
|
answerPolicy: evaluateSourceAnswerPolicy({
|
|
270
273
|
sourceIds: item.source?.id ? [item.source.id] : [],
|
|
271
274
|
sourcePolicies,
|
|
272
|
-
contentUpdatedAt: item.updatedAt,
|
|
275
|
+
contentUpdatedAt: item.capturedAt ?? item.updatedAt,
|
|
273
276
|
resultType: "capture",
|
|
274
277
|
reviewed: false,
|
|
275
278
|
}),
|
|
@@ -295,13 +298,12 @@ export default defineAction({
|
|
|
295
298
|
captureSearchLanes.semantic.status === "failed";
|
|
296
299
|
return {
|
|
297
300
|
answer: captureSearchIncomplete
|
|
298
|
-
? "Brain search was incomplete (the semantic or keyword lane failed), so matching
|
|
301
|
+
? "Brain search was incomplete (the semantic or keyword lane failed), so matching synced content may be missing. I could not find Brain knowledge for that question."
|
|
299
302
|
: guidance.retrieval.rawCaptureFallback === "never-answer"
|
|
300
|
-
? "I could not find enough
|
|
301
|
-
: "I could not find
|
|
303
|
+
? "I could not find enough distilled Brain knowledge for that question yet."
|
|
304
|
+
: "I could not find Brain knowledge or matching synced content for that question yet.",
|
|
302
305
|
answerSource: "none",
|
|
303
306
|
citations: [],
|
|
304
|
-
leadCitations: [],
|
|
305
307
|
knowledge: [],
|
|
306
308
|
captures: [],
|
|
307
309
|
results: [],
|
|
@@ -313,7 +315,7 @@ export default defineAction({
|
|
|
313
315
|
};
|
|
314
316
|
}
|
|
315
317
|
|
|
316
|
-
const knowledgeCitations =
|
|
318
|
+
const knowledgeCitations = answerKnowledge.flatMap((item) =>
|
|
317
319
|
item.evidence.slice(0, 2).map((evidence, index) => ({
|
|
318
320
|
id: `${item.id}-${index}`,
|
|
319
321
|
knowledgeId: item.id,
|
|
@@ -331,28 +333,27 @@ export default defineAction({
|
|
|
331
333
|
captureId: item.id,
|
|
332
334
|
title: item.title,
|
|
333
335
|
sourceName: item.source?.title ?? item.title,
|
|
336
|
+
location: item.location ?? null,
|
|
337
|
+
capturedAt: item.capturedAt ?? null,
|
|
334
338
|
excerpt: item.snippet,
|
|
335
339
|
url: safeCitationUrl(item.sourceUrl),
|
|
336
340
|
deepLink: captureDeepLink(item.id),
|
|
337
341
|
sourcePolicy: item.answerPolicy,
|
|
338
342
|
}));
|
|
339
|
-
const answerSource =
|
|
340
|
-
? "
|
|
343
|
+
const answerSource = answerKnowledge.length
|
|
344
|
+
? "knowledge"
|
|
341
345
|
: eligibleCaptures.length
|
|
342
|
-
? "
|
|
346
|
+
? "captures"
|
|
343
347
|
: "none";
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
if (guidance.retrieval.requireCitations && !hasCitations) {
|
|
348
|
+
const citations = [...knowledgeCitations, ...captureCitations];
|
|
349
|
+
if (guidance.retrieval.requireCitations && !citations.length) {
|
|
347
350
|
const federatedCoverage = await federatedCoveragePromise;
|
|
348
351
|
return {
|
|
349
|
-
answer:
|
|
350
|
-
|
|
351
|
-
: "I found possible Brain context, but workspace settings require citations and these results did not include usable evidence.",
|
|
352
|
+
answer:
|
|
353
|
+
"I found possible Brain context, but workspace settings require citations and these results did not include usable evidence.",
|
|
352
354
|
answerSource,
|
|
353
355
|
citations: [],
|
|
354
|
-
|
|
355
|
-
knowledge,
|
|
356
|
+
knowledge: answerKnowledge,
|
|
356
357
|
captures: eligibleCaptures,
|
|
357
358
|
results: eligibleCaptures,
|
|
358
359
|
policy: guidance.retrieval,
|
|
@@ -362,29 +363,37 @@ export default defineAction({
|
|
|
362
363
|
captureSearchLanes,
|
|
363
364
|
};
|
|
364
365
|
}
|
|
365
|
-
|
|
366
|
+
const answerParts = [];
|
|
367
|
+
if (answerKnowledge.length) {
|
|
366
368
|
answerParts.push(
|
|
367
|
-
|
|
369
|
+
answerKnowledge
|
|
368
370
|
.map((item) => `${item.title}: ${item.summary || item.body}`)
|
|
369
371
|
.join("\n\n"),
|
|
370
372
|
);
|
|
371
373
|
}
|
|
372
|
-
if (
|
|
374
|
+
if (eligibleCaptures.length) {
|
|
373
375
|
answerParts.push(
|
|
374
|
-
|
|
376
|
+
[
|
|
377
|
+
"From synced sources:",
|
|
378
|
+
...eligibleCaptures.map((item) => {
|
|
379
|
+
const where = item.location || item.source?.title || item.title;
|
|
380
|
+
const when = item.capturedAt
|
|
381
|
+
? ` (${item.capturedAt.slice(0, 10)})`
|
|
382
|
+
: "";
|
|
383
|
+
return `- ${where}${when}: ${item.snippet}`;
|
|
384
|
+
}),
|
|
385
|
+
].join("\n"),
|
|
375
386
|
);
|
|
376
387
|
}
|
|
377
388
|
|
|
378
389
|
const federatedCoverage = await federatedCoveragePromise;
|
|
379
|
-
const citations = knowledgeCitations;
|
|
380
390
|
const primary = citations[0] ?? null;
|
|
381
391
|
return {
|
|
382
392
|
answer: formatAnswer(answerParts.join("\n\n"), guidance),
|
|
383
393
|
answerSource,
|
|
384
394
|
citations,
|
|
385
|
-
leadCitations: captureCitations,
|
|
386
395
|
deepLink: primary?.deepLink ?? null,
|
|
387
|
-
knowledge,
|
|
396
|
+
knowledge: answerKnowledge,
|
|
388
397
|
captures: eligibleCaptures,
|
|
389
398
|
results: eligibleCaptures,
|
|
390
399
|
policy: guidance.retrieval,
|
|
@@ -111,7 +111,7 @@ export default defineAction({
|
|
|
111
111
|
const answerPolicy = evaluateSourceAnswerPolicy({
|
|
112
112
|
sourceIds: result.source?.id ? [result.source.id] : [],
|
|
113
113
|
sourcePolicies,
|
|
114
|
-
contentUpdatedAt: result.updatedAt,
|
|
114
|
+
contentUpdatedAt: result.capturedAt ?? result.updatedAt,
|
|
115
115
|
resultType: "capture",
|
|
116
116
|
reviewed: false,
|
|
117
117
|
});
|
|
@@ -375,7 +375,7 @@ const enUS = {
|
|
|
375
375
|
attempts: "attempts",
|
|
376
376
|
nextCheck: "Next check",
|
|
377
377
|
waitingForWorker:
|
|
378
|
-
"Waiting for the Brain distillation worker to write knowledge
|
|
378
|
+
"Waiting for the Brain distillation worker to write knowledge from this capture.",
|
|
379
379
|
source: "Source",
|
|
380
380
|
ignore: "Ignore",
|
|
381
381
|
noCapturesTitle: "No captures match this view",
|
|
@@ -3230,7 +3230,7 @@ const exactEnglishDebtOverrides: Partial<
|
|
|
3230
3230
|
unselectAll: "قم بإلغاء تحديد الكل",
|
|
3231
3231
|
valuesHidden: "القيم مخفية",
|
|
3232
3232
|
waitingForWorker:
|
|
3233
|
-
"في انتظار قيام عامل التقطير Brain بكتابة المعرفة
|
|
3233
|
+
"في انتظار قيام عامل التقطير Brain بكتابة المعرفة من هذا الالتقاط.",
|
|
3234
3234
|
webhookSourceKeyDescription:
|
|
3235
3235
|
"تتلقى المصادر الجديدة رمزًا مميزًا للتناول لمرة واحدة. تحتفظ المصادر الموجودة برموزها المميزة ما لم يتم تدويرها بشكل منفصل.",
|
|
3236
3236
|
webhookSourceKey: "Webhook مفتاح المصدر",
|
|
@@ -3657,7 +3657,7 @@ const exactEnglishDebtOverrides: Partial<
|
|
|
3657
3657
|
unselectAll: "Alle abwählen",
|
|
3658
3658
|
valuesHidden: "Werte ausgeblendet",
|
|
3659
3659
|
waitingForWorker:
|
|
3660
|
-
"Ich warte darauf, dass der Brain-Destillationsmitarbeiter
|
|
3660
|
+
"Ich warte darauf, dass der Brain-Destillationsmitarbeiter aus dieser Aufnahme Wissen schreibt.",
|
|
3661
3661
|
webhookSourceKeyDescription:
|
|
3662
3662
|
"Neue Quellen erhalten ein einmaliges Aufnahme-Token. Bestehende Quellen behalten ihr Token, sofern sie nicht separat rotiert werden.",
|
|
3663
3663
|
webhookSourceKey: "Webhook Quellschlüssel",
|
|
@@ -4079,7 +4079,7 @@ const exactEnglishDebtOverrides: Partial<
|
|
|
4079
4079
|
unselectAll: "Deseleccionar todo",
|
|
4080
4080
|
valuesHidden: "Valores ocultos",
|
|
4081
4081
|
waitingForWorker:
|
|
4082
|
-
"Esperando que el trabajador de destilación Brain escriba conocimiento
|
|
4082
|
+
"Esperando que el trabajador de destilación Brain escriba conocimiento a partir de esta captura.",
|
|
4083
4083
|
webhookSourceKeyDescription:
|
|
4084
4084
|
"Las nuevas fuentes reciben un token de ingesta único. Las fuentes existentes conservan su token a menos que se roten por separado.",
|
|
4085
4085
|
webhookSourceKey: "Webhook clave fuente",
|
|
@@ -4506,7 +4506,7 @@ const exactEnglishDebtOverrides: Partial<
|
|
|
4506
4506
|
unselectAll: "Tout désélectionner",
|
|
4507
4507
|
valuesHidden: "Valeurs masquées",
|
|
4508
4508
|
waitingForWorker:
|
|
4509
|
-
"En attente que l'ouvrier de distillation Brain rédige
|
|
4509
|
+
"En attente que l'ouvrier de distillation Brain rédige des connaissances à partir de cette capture.",
|
|
4510
4510
|
webhookSourceKeyDescription:
|
|
4511
4511
|
"Les nouvelles sources reçoivent un jeton d’ingestion unique. Les sources existantes conservent leur jeton à moins d'être pivotées séparément.",
|
|
4512
4512
|
webhookSourceKey: "Clé source Webhook",
|
|
@@ -4898,7 +4898,7 @@ const exactEnglishDebtOverrides: Partial<
|
|
|
4898
4898
|
unselectAll: "सभी को अचयनित करें",
|
|
4899
4899
|
valuesHidden: "मूल्य छुपे हुए",
|
|
4900
4900
|
waitingForWorker:
|
|
4901
|
-
"Brain आसवन कार्यकर्ता द्वारा
|
|
4901
|
+
"Brain आसवन कार्यकर्ता द्वारा इस कैप्चर से ज्ञान लिखने की प्रतीक्षा की जा रही है।",
|
|
4902
4902
|
webhookSourceKeyDescription:
|
|
4903
4903
|
"नए स्रोतों को एक बार का अंतर्ग्रहण टोकन प्राप्त होता है। मौजूदा स्रोत अपना टोकन तब तक बनाए रखते हैं जब तक कि उसे अलग से न घुमाया जाए।",
|
|
4904
4904
|
webhookSourceKey: "Webhook स्रोत कुंजी",
|
|
@@ -5307,7 +5307,7 @@ const exactEnglishDebtOverrides: Partial<
|
|
|
5307
5307
|
unselectAll: "すべての選択を解除します",
|
|
5308
5308
|
valuesHidden: "非表示の値",
|
|
5309
5309
|
waitingForWorker:
|
|
5310
|
-
"Brain
|
|
5310
|
+
"Brain 蒸留作業者がこのキャプチャからナレッジを書き込むのを待っています。",
|
|
5311
5311
|
webhookSourceKeyDescription:
|
|
5312
5312
|
"新しいソースは 1 回限りの取り込みトークンを受け取ります。既存のソースは、個別にローテーションされない限り、トークンを保持します。",
|
|
5313
5313
|
webhookSourceKey: "Webhook ソースキー",
|
|
@@ -5708,7 +5708,7 @@ const exactEnglishDebtOverrides: Partial<
|
|
|
5708
5708
|
unselectAll: "모두 선택 취소",
|
|
5709
5709
|
valuesHidden: "숨겨진 값",
|
|
5710
5710
|
waitingForWorker:
|
|
5711
|
-
"Brain 증류 작업자가
|
|
5711
|
+
"Brain 증류 작업자가 이 캡처에서 지식을 기록하기를 기다리는 중입니다.",
|
|
5712
5712
|
webhookSourceKeyDescription:
|
|
5713
5713
|
"새 소스는 일회성 수집 토큰을 받습니다. 기존 소스는 별도로 순환되지 않는 한 토큰을 유지합니다.",
|
|
5714
5714
|
webhookSourceKey: "Webhook 소스 키",
|
|
@@ -6125,7 +6125,7 @@ const exactEnglishDebtOverrides: Partial<
|
|
|
6125
6125
|
unselectAll: "Desmarcar tudo",
|
|
6126
6126
|
valuesHidden: "Valores ocultos",
|
|
6127
6127
|
waitingForWorker:
|
|
6128
|
-
"Aguardando que o trabalhador da destilação Brain escreva o conhecimento
|
|
6128
|
+
"Aguardando que o trabalhador da destilação Brain escreva o conhecimento a partir desta captura.",
|
|
6129
6129
|
webhookSourceKeyDescription:
|
|
6130
6130
|
"Novas fontes recebem um token de ingestão único. As fontes existentes mantêm seu token, a menos que sejam rotacionadas separadamente.",
|
|
6131
6131
|
webhookSourceKey: "Webhook chave de origem",
|
|
@@ -6483,7 +6483,7 @@ const exactEnglishDebtOverrides: Partial<
|
|
|
6483
6483
|
tuneSource: "调音源",
|
|
6484
6484
|
unselectAll: "取消选择全部",
|
|
6485
6485
|
valuesHidden: "隐藏的价值观",
|
|
6486
|
-
waitingForWorker: "等待 Brain
|
|
6486
|
+
waitingForWorker: "等待 Brain 蒸馏工作人员根据此捕获编写知识。",
|
|
6487
6487
|
webhookSourceKeyDescription:
|
|
6488
6488
|
"新来源会收到一次性摄取令牌。现有来源保留其令牌,除非单独轮换。",
|
|
6489
6489
|
webhookSourceKey: "Webhook 源密钥",
|
|
@@ -266,18 +266,18 @@ function retrievalPolicy(
|
|
|
266
266
|
return {
|
|
267
267
|
rawCaptureFallback: "never-answer" as const,
|
|
268
268
|
instructions: [
|
|
269
|
-
"Answer from
|
|
269
|
+
"Answer from distilled Brain knowledge only.",
|
|
270
270
|
"Use raw captures for distillation and exact quote validation, not as answer support.",
|
|
271
|
-
"If
|
|
271
|
+
"If distilled knowledge is missing or thin, say Brain does not have enough distilled support.",
|
|
272
272
|
],
|
|
273
273
|
};
|
|
274
274
|
case "exploratory":
|
|
275
275
|
return {
|
|
276
276
|
rawCaptureFallback: "allowed-leads" as const,
|
|
277
277
|
instructions: [
|
|
278
|
-
"
|
|
279
|
-
"
|
|
280
|
-
"
|
|
278
|
+
"Use distilled Brain knowledge together with synced captures (Slack, Zoom, and other connected sources) whose answerEligible is true.",
|
|
279
|
+
"Name the source (channel or meeting) and date behind each fact, and prefer the most recent capture when sources disagree.",
|
|
280
|
+
"Label weaker or conflicting signals as uncertain instead of dropping them.",
|
|
281
281
|
],
|
|
282
282
|
};
|
|
283
283
|
case "balanced":
|
|
@@ -285,8 +285,8 @@ function retrievalPolicy(
|
|
|
285
285
|
return {
|
|
286
286
|
rawCaptureFallback: "thin-results" as const,
|
|
287
287
|
instructions: [
|
|
288
|
-
"Prefer
|
|
289
|
-
"
|
|
288
|
+
"Prefer distilled Brain knowledge.",
|
|
289
|
+
"When distilled knowledge is missing or thin, answer from synced captures (Slack, Zoom, and other connected sources) whose answerEligible is true, naming the source (channel or meeting) and date behind each fact.",
|
|
290
290
|
"Do not invent facts beyond returned Brain results.",
|
|
291
291
|
],
|
|
292
292
|
};
|
|
@@ -355,9 +355,14 @@ export function buildBrainAgentGuidance(
|
|
|
355
355
|
},
|
|
356
356
|
response: {
|
|
357
357
|
toneInstruction: toneInstruction(tone),
|
|
358
|
-
citationInstruction:
|
|
359
|
-
|
|
360
|
-
|
|
358
|
+
citationInstruction:
|
|
359
|
+
sourcePolicy === "strict"
|
|
360
|
+
? requireCitations
|
|
361
|
+
? "Cite published Brain knowledge evidence for factual claims; raw captures are not answer citations under the strict policy; say when distilled support is missing."
|
|
362
|
+
: "Include published Brain knowledge citations when helpful; raw captures are not answer evidence under the strict policy, and concise uncited summaries are allowed by workspace settings."
|
|
363
|
+
: requireCitations
|
|
364
|
+
? "Cite published Brain knowledge or answer-eligible captures for factual claims, giving each capture's source (channel or meeting), date, and link; say when support is missing."
|
|
365
|
+
: "Include knowledge or answer-eligible capture citations (source, date, link) when helpful; concise uncited summaries are allowed by workspace settings.",
|
|
361
366
|
},
|
|
362
367
|
};
|
|
363
368
|
}
|
|
@@ -8,7 +8,6 @@ import { accessFilter } from "@agent-native/core/sharing";
|
|
|
8
8
|
import { and, desc, like, or } from "drizzle-orm";
|
|
9
9
|
|
|
10
10
|
import actionsRegistry from "../../.generated/actions-registry.js";
|
|
11
|
-
import { tryAnswerBrainA2AQuestion } from "../lib/a2a-fallback.js";
|
|
12
11
|
import { brainFinalResponseGuard } from "../lib/brain-response-guard.js";
|
|
13
12
|
|
|
14
13
|
const BRAIN_BACKGROUND_RUN_SOFT_TIMEOUT_MS = 13 * 60_000;
|
|
@@ -53,7 +52,7 @@ Use actions as the source of truth. Import raw material with import-capture or i
|
|
|
53
52
|
|
|
54
53
|
Important rules:
|
|
55
54
|
- Before answering, searching broadly, or distilling, call get-brain-settings when you do not already have current settings. Apply its guidance for assistant name, company name, tone, source policy, citation requirements, publish tier, pre-save capture sanitization, redaction, and distillation instructions.
|
|
56
|
-
- For every company-specific factual question, call get-brain-settings when current settings are not already in context, then call search-everything with the question (and ask-brain for distilled knowledge) before answering. Answer from their results, naming the source and
|
|
55
|
+
- For every company-specific factual question, call get-brain-settings when current settings are not already in context, then call search-everything with the question (and ask-brain for distilled knowledge) before answering. Answer from their results, naming the source, date, and link (sourceUrl) behind each fact. If neither returns relevant results, say the information is not in Brain; never fill the gap from general model knowledge.
|
|
57
56
|
- Correction and follow-up discipline matters: when the latest user turn says an answer is wrong, asks why you did that, or asks where an answer came from, treat earlier assistant text, tool results, and source examples as untrusted context for this turn. Do not continue the earlier request. Re-read the latest question; if it asks for company or product facts, call search-everything and ask-brain again with that question. For strategy questions, prefer published synthesis and blessed, high-authority product or leadership sources. Individual Slack feedback is one person's view, not strategic direction.
|
|
58
57
|
- Evidence quotes must be exact substrings of a raw capture. Use get-capture with includeRawContent=true only when you need exact quote validation; normal capture reads are redacted by default.
|
|
59
58
|
- search-everything runs pgvector semantic search over every synced Slack thread and Zoom transcript; capture results include provider, location (Slack channel or Zoom meeting), content, capturedAt and sourceUrl, and only captures with answerEligible: true may support an answer. Use capturedAt to judge how current information is. search-knowledge is SQL text matching over distilled knowledge only.
|
|
@@ -63,7 +62,6 @@ Important rules:
|
|
|
63
62
|
- Source/read actions are convenience readers, not provider capability limits. Before any provider API request, call list-connection-providers and inspect the matching provider. If configured is not true, do not attempt the request; explain that the connection needs setup or repair and include setupLink. Jira is queried on demand through the provider API rather than indexed as a Brain source. For ad hoc provider analysis that needs an endpoint, filter, payload, pagination mode, or API version not modeled by a Brain action, call provider-api-catalog/provider-api-docs, then provider-api-request against the provider's real HTTP API. Use connectionId for a specific shared grant and accountId for a specific OAuth account.
|
|
64
63
|
- Analytics owns live HubSpot, Gong, CRM, call, pipeline, and provider-backed analytics questions. For those requests, use describe-workspace-apps when needed and delegate a bounded task with call-agent so Analytics chooses the provider, credentials, and query shape. Do not duplicate Analytics provider queries in Brain. If shared access is unavailable, include the absolute setupLink and mention the personal MCP option when the chat offers it; personal MCP connections are user-scoped and do not require workspace-admin privileges.
|
|
65
64
|
- For broad searches, joins, classification, source-corpus counts, or absence claims across provider records, fetch every relevant page or an explicitly bounded cohort, stage/save large responses with stageAs/saveToFile/fetchAllPages, then use query-staged-dataset or run-code to reduce the corpus. Report source, filters, row counts, pagination, truncation, and gaps.`,
|
|
66
|
-
a2aMessageFallback: async ({ text }) => tryAnswerBrainA2AQuestion(text),
|
|
67
65
|
mentionProviders: async () => {
|
|
68
66
|
const { getDb, schema } = await import("../db/index.js");
|
|
69
67
|
return {
|
|
@@ -386,6 +386,11 @@ pub async fn set_feature_config(
|
|
|
386
386
|
crate::util::reapply_capture_exclusion_to_overlays(&app);
|
|
387
387
|
}
|
|
388
388
|
crate::clips::reconcile_region_guides(&app);
|
|
389
|
+
if previous.meetings_enabled != config.meetings_enabled {
|
|
390
|
+
if let Some(state) = app.try_state::<crate::meetings_watcher::MeetingsWatcherState>() {
|
|
391
|
+
state.invalidate_cache();
|
|
392
|
+
}
|
|
393
|
+
}
|
|
389
394
|
if previous.whisper_model_enabled != config.whisper_model_enabled {
|
|
390
395
|
let _ = app.emit(
|
|
391
396
|
"whisper:model-enabled-changed",
|