Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3ab3e7b
feat(addie): report provenance data readiness
bokelley Aug 25, 2026
fbe3777
fix(addie): bound readiness validation errors
bokelley Aug 25, 2026
7cd4d39
Merge remote-tracking branch 'origin/main' into eval-addie-model-quality
bokelley Aug 25, 2026
6d901a4
fix(addie): recover thinking-only responses
bokelley Aug 25, 2026
f85e456
Merge remote-tracking branch 'origin/main' into eval-addie-model-quality
bokelley Aug 25, 2026
b2b69fc
refactor(addie): isolate router provider boundary
bokelley Aug 25, 2026
b52b51c
fix(addie): retain categorical router failures
bokelley Aug 25, 2026
6ce6c3e
Merge remote-tracking branch 'origin/main' into eval-addie-model-quality
bokelley Aug 26, 2026
2ad2fcb
feat(addie): add bounded Luna router shadow
bokelley Aug 26, 2026
db8d5a3
fix(addie): cast router shadow maintenance timestamp
bokelley Aug 26, 2026
be9077c
Merge remote-tracking branch 'origin/main' into eval-addie-model-quality
bokelley Aug 26, 2026
f2cd4c3
chore(addie): gate tool and prompt surface growth
bokelley Aug 26, 2026
592fdb7
ci(addie): enforce inventory in build
bokelley Aug 26, 2026
2918925
Merge remote-tracking branch 'origin/main' into eval-addie-model-quality
bokelley Aug 26, 2026
772ef0d
fix(addie): align Slack tool selection profiles
bokelley Aug 26, 2026
f8596c4
fix(addie): normalize Slack DM privacy
bokelley Aug 26, 2026
c83d955
chore(addie): refresh tool inventory fingerprint
bokelley Aug 26, 2026
8c47c67
fix(addie): remove unused Slack selector import
bokelley Aug 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions scripts/addie-tool-surface-budget.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema_version": 4,
"profile_ids_sha256": "5acc51e8ab204b5043ee416bcf3d1a48fa94ee8d7e1c5e5a7f71d39f93445a1b",
"profile_contract_sha256": "761dcbd0dd9ebefbbefb62a475472bf479cae4e11fc16e50aa2acb9f588a8465",
"profile_ids_sha256": "79957b57d370335967ead65eec0cb71fc81c3d469d222169f9319e6c3a3306a8",
"profile_contract_sha256": "f3ac0fa74e7fe520eb2ae537bc4c0d7f515c5fb23cb90ad8b490c529b8e964df",
"baseline": {
"id": "2026-08-26-pre-domain-consolidation",
"metrics": {
Expand Down Expand Up @@ -66,6 +66,7 @@
"slack_bolt:private_channel_member": { "custom_tool_count": 148, "wire_schema_bytes": 125095, "maximum_provider_tool_count": 1, "maximum_provider_tool_wire_bytes": 52 },
"slack_bolt:public_channel_admin": { "custom_tool_count": 209, "wire_schema_bytes": 161050, "maximum_provider_tool_count": 1, "maximum_provider_tool_wire_bytes": 52 },
"slack_bolt:public_channel_member": { "custom_tool_count": 147, "wire_schema_bytes": 124622, "maximum_provider_tool_count": 1, "maximum_provider_tool_wire_bytes": 52 },
"slack_bolt:system_channel_admin": { "custom_tool_count": 217, "wire_schema_bytes": 167053, "maximum_provider_tool_count": 1, "maximum_provider_tool_wire_bytes": 52 },
"tavus_voice:admin": { "custom_tool_count": 220, "wire_schema_bytes": 162700, "maximum_provider_tool_count": 0, "maximum_provider_tool_wire_bytes": 2 },
"tavus_voice:baseline": { "custom_tool_count": 19, "wire_schema_bytes": 12383, "maximum_provider_tool_count": 0, "maximum_provider_tool_wire_bytes": 2 },
"tavus_voice:committee_leader": { "custom_tool_count": 132, "wire_schema_bytes": 104901, "maximum_provider_tool_count": 0, "maximum_provider_tool_wire_bytes": 2 },
Expand Down
129 changes: 104 additions & 25 deletions scripts/build-addie-tool-surface-inventory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ import {
mergeAddieToolDefinitions,
} from '../server/src/addie/tool-wire-shape.js';
import { assembleAddieSystemPrompt } from '../server/src/addie/prompt-assembly.js';
import {
ADMIN_CHANNEL_WG_SLUG,
selectSlackToolSets,
SYSTEM_CHANNEL_TOOL_SETS,
type SlackToolSource,
type SystemChannelRole,
} from '../server/src/addie/slack-tool-selection.js';

interface BudgetFile {
schema_version: 4;
Expand Down Expand Up @@ -261,23 +268,34 @@ function buildSlackBoltProfiles(defs: Awaited<ReturnType<typeof loadDefinitions>
const memberRequest = buildRequest(false, false);
const adminRequest = buildRequest(true, false);
const publicRequest = buildRequest(false, true);
const surfaces = [
{ audience: 'member_dm', isAdmin: false, isPublic: false, forceAdmin: false, available: memberRequest },
{ audience: 'admin_dm', isAdmin: true, isPublic: false, forceAdmin: true, available: adminRequest },
{ audience: 'private_channel_member', isAdmin: false, isPublic: false, forceAdmin: false, available: memberRequest },
{ audience: 'private_channel_admin', isAdmin: true, isPublic: false, forceAdmin: false, available: adminRequest },
{ audience: 'admin_working_group', isAdmin: true, isPublic: false, forceAdmin: true, available: adminRequest },
{ audience: 'public_channel_member', isAdmin: false, isPublic: true, forceAdmin: false, available: publicRequest },
{ audience: 'public_channel_admin', isAdmin: true, isPublic: true, forceAdmin: false, available: buildRequest(true, true) },
const surfaces: Array<{
audience: string;
source: SlackToolSource;
isAdmin: boolean;
isPublic: boolean;
workingGroupSlug?: string;
available: AddieTool[];
}> = [
{ audience: 'member_dm', source: 'dm', isAdmin: false, isPublic: false, available: memberRequest },
{ audience: 'admin_dm', source: 'dm', isAdmin: true, isPublic: false, available: adminRequest },
{ audience: 'private_channel_member', source: 'channel', isAdmin: false, isPublic: false, available: memberRequest },
{ audience: 'private_channel_admin', source: 'channel', isAdmin: true, isPublic: false, available: adminRequest },
{ audience: 'admin_working_group', source: 'channel', isAdmin: true, isPublic: false, workingGroupSlug: ADMIN_CHANNEL_WG_SLUG, available: adminRequest },
{ audience: 'public_channel_member', source: 'channel', isAdmin: false, isPublic: true, available: publicRequest },
{ audience: 'public_channel_admin', source: 'channel', isAdmin: true, isPublic: true, available: buildRequest(true, true) },
];
const profiles: Profile[] = [];

for (const surface of surfaces) {
for (const [setName, set] of Object.entries(toolSets.TOOL_SETS)) {
if (!surface.isAdmin && set.adminOnly) continue;
const selectedSets = surface.forceAdmin
? [...new Set([setName, 'admin'])]
: [setName];
const selectedSets = selectSlackToolSets({
routerSelectedSets: [setName],
routerAvailable: true,
source: surface.source,
isAdmin: surface.isAdmin,
workingGroupSlug: surface.workingGroupSlug,
});
const allowed = new Set(toolSets.getToolsForSets(
selectedSets,
surface.isAdmin,
Expand Down Expand Up @@ -307,8 +325,15 @@ function buildSlackBoltProfiles(defs: Awaited<ReturnType<typeof loadDefinitions>
const allValidSets = Object.entries(toolSets.TOOL_SETS)
.filter(([, set]) => surface.isAdmin || !set.adminOnly)
.map(([name]) => name);
const selectedAllValidSets = selectSlackToolSets({
routerSelectedSets: allValidSets,
routerAvailable: true,
source: surface.source,
isAdmin: surface.isAdmin,
workingGroupSlug: surface.workingGroupSlug,
});
const allAllowed = new Set(toolSets.getToolsForSets(
allValidSets,
selectedAllValidSets,
surface.isAdmin,
surface.isPublic,
));
Expand All @@ -317,7 +342,7 @@ function buildSlackBoltProfiles(defs: Awaited<ReturnType<typeof loadDefinitions>
runtime: 'slack_bolt',
audience: surface.audience,
route: 'all_valid_sets_maximum',
selectedToolSets: allValidSets,
selectedToolSets: selectedAllValidSets,
globalTools,
requestTools: surface.available.filter((tool) => allAllowed.has(tool.name)),
providerToolCount: 1,
Expand All @@ -329,26 +354,80 @@ function buildSlackBoltProfiles(defs: Awaited<ReturnType<typeof loadDefinitions>
'nonstreaming_web_search',
],
}));
const certificationSets = ['certification', 'knowledge'];
const certificationAllowed = new Set(toolSets.getToolsForSets(
certificationSets,
const fallbackSets = selectSlackToolSets({
routerAvailable: false,
source: surface.source,
isAdmin: surface.isAdmin,
workingGroupSlug: surface.workingGroupSlug,
});
const fallbackAllowed = new Set(toolSets.getToolsForSets(
fallbackSets,
surface.isAdmin,
surface.isPublic,
));
profiles.push(profile({
id: `slack_bolt:${surface.audience}:certification_session`,
id: `slack_bolt:${surface.audience}:router_unavailable`,
runtime: 'slack_bolt',
audience: surface.audience,
route: 'certification_session',
selectedToolSets: certificationSets,
route: 'router_unavailable',
selectedToolSets: fallbackSets,
globalTools,
requestTools: surface.available.filter((tool) => certificationAllowed.has(tool.name)),
requestTools: surface.available.filter((tool) => fallbackAllowed.has(tool.name)),
providerToolCount: 1,
conditionalMaximums: [
'certification_context_overrides_router_and_admin_auto_add',
'google_docs_configured',
'nonstreaming_web_search',
],
conditionalMaximums: ['router_unavailable', 'google_docs_configured', 'nonstreaming_web_search'],
}));

if (surface.source === 'dm') {
const certificationSets = selectSlackToolSets({
routerSelectedSets: ['admin'],
routerAvailable: true,
source: surface.source,
isAdmin: surface.isAdmin,
hasActiveCertification: true,
});
const certificationAllowed = new Set(toolSets.getToolsForSets(
certificationSets,
surface.isAdmin,
surface.isPublic,
));
profiles.push(profile({
id: `slack_bolt:${surface.audience}:certification_session`,
runtime: 'slack_bolt',
audience: surface.audience,
route: 'certification_session',
selectedToolSets: certificationSets,
globalTools,
requestTools: surface.available.filter((tool) => certificationAllowed.has(tool.name)),
providerToolCount: 1,
conditionalMaximums: [
'active_certification_overrides_router_admin_and_fallback',
'google_docs_configured',
'nonstreaming_web_search',
],
}));
}
}

for (const systemRole of Object.keys(SYSTEM_CHANNEL_TOOL_SETS) as SystemChannelRole[]) {
const allValidSets = Object.keys(toolSets.TOOL_SETS);
const selectedSets = selectSlackToolSets({
routerSelectedSets: allValidSets,
routerAvailable: true,
source: 'channel',
isAdmin: true,
systemRole,
});
const allowed = new Set(toolSets.getToolsForSets(selectedSets, true, false));
profiles.push(profile({
id: `slack_bolt:system_channel_admin:${systemRole}:all_valid_sets_maximum`,
runtime: 'slack_bolt',
audience: 'system_channel_admin',
route: `system_role_${systemRole}_all_valid_sets_maximum`,
selectedToolSets: selectedSets,
globalTools,
requestTools: adminRequest.filter((tool) => allowed.has(tool.name)),
providerToolCount: 1,
conditionalMaximums: ['server_configured_system_channel', 'router_returns_all_valid_tool_sets', 'google_docs_configured', 'nonstreaming_web_search'],
}));
}
profiles.push(
Expand Down
Loading
Loading