Compare commits

..
Author SHA1 Message Date
Peter Steinberger ea25d9cc03 docs: changelog for MS Teams scopes (#1507) (thanks @Evizero) 2026-01-24 00:07:03 +00:00
Christof Salis ade8426cb2 fix(msteams): remove .default suffix from graph scopes
The @microsoft/agents-hosting SDK's MsalTokenProvider automatically
appends `/.default` to all scope strings in its token acquisition
methods (acquireAccessTokenViaSecret, acquireAccessTokenViaFIC,
acquireAccessTokenViaWID, acquireTokenWithCertificate in
msalTokenProvider.ts). This is consistent SDK behavior, not a recent
change.

Our code was including `.default` in scope URLs, resulting in invalid
double suffixes like `https://graph.microsoft.com/.default/.default`.

This was confirmed to cause Graph API authentication errors. Removing
the `.default` suffix from our scope strings allows the SDK to append
it correctly, resolving the issue.

Before: we pass `.default` -> SDK appends -> double `.default` (broken)
After:  we pass base URL  -> SDK appends -> single `.default` (works)
2026-01-24 00:03:20 +00:00
4 changed files with 1 additions and 21 deletions

No files matched your search

-1
View File
@@ -19,7 +19,6 @@ Docs: https://docs.clawd.bot
- CLI: suppress diagnostic session/run noise during auth probes.
- Linux: include env-configured user bin roots in systemd PATH and align PATH audits. (#1512) Thanks @robbyczgw-cla.
- TUI: render Gateway slash-command replies as system output (for example, `/context`).
- TUI/Gateway: reset session token counters on `/new` and refresh the footer immediately. (#1542) Thanks @robbyczgw-cla.
- Media: preserve PNG alpha when possible; fall back to JPEG when still over size cap. (#1491) Thanks @robbyczgw-cla.
- Agents: treat plugin-only tool allowlists as opt-ins; keep core tools enabled. (#1467)
- Exec approvals: persist allowlist entry ids to keep macOS allowlist rows stable. (#1521) Thanks @ngutman.
-4
View File
@@ -251,10 +251,6 @@ export const sessionsHandlers: GatewayRequestHandlers = {
lastChannel: entry?.lastChannel,
lastTo: entry?.lastTo,
skillsSnapshot: entry?.skillsSnapshot,
// Reset token counts to 0 on session reset (#1523)
inputTokens: 0,
outputTokens: 0,
totalTokens: 0,
};
store[primaryKey] = nextEntry;
return nextEntry;
@@ -345,19 +345,11 @@ describe("gateway server sessions", () => {
const reset = await rpcReq<{
ok: true;
key: string;
entry: {
sessionId: string;
inputTokens?: number;
outputTokens?: number;
totalTokens?: number;
};
entry: { sessionId: string };
}>(ws, "sessions.reset", { key: "agent:main:main" });
expect(reset.ok).toBe(true);
expect(reset.payload?.key).toBe("agent:main:main");
expect(reset.payload?.entry.sessionId).not.toBe("sess-main");
expect(reset.payload?.entry.inputTokens).toBe(0);
expect(reset.payload?.entry.outputTokens).toBe(0);
expect(reset.payload?.entry.totalTokens).toBe(0);
const badThinking = await rpcReq(ws, "sessions.patch", {
key: "agent:main:main",
-7
View File
@@ -409,15 +409,8 @@ export function createCommandHandlers(context: CommandHandlerContext) {
case "reset":
try {
await client.resetSession(state.currentSessionKey);
// Clear token counts after reset to avoid stale display while refreshing. (#1523)
state.sessionInfo.inputTokens = 0;
state.sessionInfo.outputTokens = 0;
state.sessionInfo.totalTokens = 0;
tui.requestRender();
chatLog.addSystem(`session ${state.currentSessionKey} reset`);
await loadHistory();
await refreshSessionInfo();
} catch (err) {
chatLog.addSystem(`reset failed: ${String(err)}`);
}