You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2ffbae6
Browse filesBrowse the repository at this point in the historyBrowse files
fix(search): keep activity paging and labels truthful under busy sources and failures (#10561)
* fix(search): keep activity paging and labels truthful under busy sources and failures
- Jira reads its created listing with relative-minute bounds and assigned issues by the
moment of assignment (assignee CHANGED TO currentUser() DURING, from each issue's history)
- Confluence places pages at the member's own latest edit from version history, dropping
pages they did not edit in the window, and reads listings whose order is not the member's
action whole; CQL bounds widen by the widest time zone offsets instead of a day
- A listing that cannot reach its bound stops only its own account, with an accurate status
- A failed account is retried once, then reported
- Search MCP charges one rate-limit operation per account read
- Continuations may change topK; Assistant items drop the duplicate citationUrl and items drop accountId
- Calendar reports an overfull week only when a slice exhausts the whole budget
- Removes the never-emitted mentioned action and approximateTime
* refactor(search): read Confluence version histories together and tidy activity constants
* fix(search): stop only the activity source that cannot advance and pick each item once per window
- A page with no progress stops the accounts pinning the horizon; the others page on
- A failed account the listing ends before retrying is reported
- Confluence pages and Jira assignments are placed at their latest moment in the whole window,
so a later page never repeats them; an unread version history reports partial coverage
- Confluence comments before the window are left out
- Search MCP charges a continuation by the accounts its cursor still names
* fix(search): charge Search MCP activity by the accounts a page read, after admission
* fix(search): admit every activity account read before reading, through the MCP rate limit
* chore(search): regenerate Mothership tool contracts after rebasing
* fix(search): read Jira assignments at a fixed page size and check cancellation around admission
* chore(search): regenerate Mothership tool contracts after rebasing
* fix(search): declare optional activity window fields as possibly undefined for the synced worker contract
'List what you did across your connected sources in a date window, newest first: messages and mail you sent or replied to, meetings you attended, Jira issues you created or are assigned, Confluence pages you created or edited and comments you wrote. Each item has a documentId for read_document. Follow nextCursor for more. sources reports each source: not_connected and reconnect carry the provider to connect with oauth_get_auth_link.',
658
+
'List what you did across your connected sources in a date window, newest first: Slack messages and Gmail mail you sent (replied when the message answers another), Google Calendar meetings you organized or accepted, Jira issues you created or that were assigned to you, Confluence pages you created or edited and comments you wrote. Each item has a documentId for read_document. Follow nextCursor for more; a source that failed and recovers on a later page can return entries older than that page. sources reports each source: not_connected and reconnect carry the provider to connect with oauth_get_auth_link.',
* Provider reads one call makes, for the rate limit: about one listing per connected source,
22
-
* which is more than a single search's share.
23
-
*/
24
-
constLIST_MY_ACTIVITY_COST=2
25
-
26
21
/**
27
22
* Registers `list_my_activity`: what the caller did across their connected sources in a window,
28
23
* newest first, with a status per source that names the ones to connect.
@@ -36,7 +31,7 @@ export function registerListMyActivityTool(
36
31
{
37
32
title: 'List my activity',
38
33
description:
39
-
'List what you did across your connected sources in a date window, newest first: Slack messages and Gmail mail you sent or replied to, Google Calendar meetings you attended, Jira issues you created or are assigned, and Confluence pages you created or edited and comments you wrote. Use it for standups, weekly reports and open action items. Defaults to the last 7 days; the window spans at most 92 days. Each item has a documentId for read_document and its url to cite. approximateTime marks a time that is the item’s last update rather than your own action. When truncated is true, call again with nextCursor and the same arguments: pages continue without gaps. sources reports every source: not_connected and reconnect carry connect.url, where you connect that account.',
34
+
'List what you did across your connected sources in a date window, newest first, each at the time of your own action: Slack messages and Gmail mail you sent (replied when the message answers another), Google Calendar meetings you organized or accepted (attended), Jira issues you created or that were assigned to you, and Confluence pages you created or edited and comments you wrote. Use it for standups, weekly reports and open action items. Defaults to the last 7 days; the window spans at most 92 days. Each item has a documentId for read_document and its url to cite. When truncated is true, call again with nextCursor and the same startDate, endDate and source (topK may change): pages continue without gaps, though a source that failed and recovers on a later page can return entries older than that page. sources reports every source: not_connected and reconnect carry connect.url, where you connect that account.',
40
35
inputSchema: listMyActivityMcpSchema,
41
36
annotations: KNOWLEDGE_MCP_READ_ONLY,
42
37
},
@@ -45,16 +40,28 @@ export function registerListMyActivityTool(
45
40
'list_my_activity',
46
41
knowledgeOperations.listActivity,
47
42
extra.signal,
48
-
async(registry,signal)=>{
43
+
async(registry,signal,charge)=>{
49
44
constparsed=listMyActivityMcpSchema.parse(input)
50
45
constresult=awaitlistMyActivity.execute({
51
46
principal,
52
-
input: { ...parsed, organizationId,resultSecretRegistry: registry, signal },
47
+
input: {
48
+
...parsed,
49
+
organizationId,
50
+
resultSecretRegistry: registry,
51
+
signal,
52
+
/**
53
+
* Each account is a separate provider listing: beyond the one operation the call
54
+
* was admitted with, one more per further account, admitted before any is read.
message: 'Pass either personId or a query with its filters and cursor, not both.',
550
+
}
551
+
)
527
552
528
553
/**
529
-
* The caller's own questions to Sim over a window, oldest first. The 92-day window and the page
530
-
* bounds are literals so the worker's generated copy stays standalone.
554
+
* The caller's own questions to Sim over a window, newest first by default. The 92-day window
555
+
* and the page bounds are literals so the worker's generated copy stays standalone.
531
556
*/
532
557
exportconstlistMyChatHistoryInputSchema=z
533
558
.object({
534
559
startDate: z
535
560
.string()
536
561
.datetime({offset: true})
562
+
.optional()
537
563
.describe(
538
-
'Inclusive lower bound on when you asked, as an ISO datetime with your timezone offset. For whole days, use local midnight on the first day.'
564
+
'Inclusive start of the window, an ISO datetime with your timezone offset. Defaults to 7 days before endDate; the window spans at most 92 days.'
539
565
),
540
566
endDate: z
541
567
.string()
542
568
.datetime({offset: true})
543
569
.optional()
544
570
.describe(
545
-
'Exclusive upper bound, at most 92 days after startDate; defaults to now. For whole days, use local midnight after the final day.'
571
+
'Exclusive end of the window, an ISO datetime with your timezone offset. Defaults to now; a later time reads up to now. For whole days, use local midnight after the final day.'
546
572
),
573
+
sortBy: z
574
+
.enum(['newest','oldest'])
575
+
.optional()
576
+
.describe('newest (the default) or oldest first.'),
547
577
topK: z
548
578
.number()
549
579
.int()
@@ -556,7 +586,7 @@ export const listMyChatHistoryInputSchema = z
556
586
.min(1)
557
587
.max(1024)
558
588
.optional()
559
-
.describe('nextCursor from the previous page of the same window.'),
589
+
.describe('nextCursor from the previous page of the same window and order.'),
'Look up people in this organization’s directory by name, email, title, department, or location. Returns each person’s title, department, location, email, and manager. When exactly one person matches, or with a personId, returns that person with managerChain (direct manager first) and directReports. Covers only this organization’s people; use search_workspace for customers, vendors, and other outside contacts.',
667
+
'Look up people in this organization’s directory by name, email, title, department, or location, with query across all of them or a filter per field; managerPersonId lists someone’s direct reports. Returns each person’s title, department, location, email, start date, time zone, Slack user ID, manager, and direct report count. When exactly one person matches, or with a personId, returns that person with managerChain (direct manager first) and directReports. Covers only this organization’s people; use search_workspace for customers, vendors, and other outside contacts.',
638
668
inputSchema: searchPeopleInputSchema,
639
669
},
640
670
{
641
671
id: 'list_my_chat_history',
642
672
route: 'sim',
643
673
description:
644
-
'List the questions you asked Sim (the Assistant, agent chats, the Slack app and Search MCP chat) in a time window, oldest first, each with a link to its conversation. Covers only your own conversations that still exist.',
674
+
'List the questions you asked Sim (the Assistant, agent chats, the Slack app and Search MCP chat) in a time window, newest first, each with a link to its conversation. Covers only your own conversations that still exist.',
645
675
inputSchema: listMyChatHistoryInputSchema,
646
676
},
647
677
{
648
678
id: 'list_my_activity',
649
679
route: 'sim',
650
680
description:
651
-
'List what you did across your connected sources in a date window, newest first: messages and mail you sent or replied to, meetings you attended, Jira issues you created or are assigned, Confluence pages you created or edited and comments you wrote. Each item has a documentId for read_document. Follow nextCursor for more. sources reports each source: not_connected and reconnect carry the provider to connect with oauth_get_auth_link.',
681
+
'List what you did across your connected sources in a date window, newest first: Slack messages and Gmail mail you sent (replied when the message answers another), Google Calendar meetings you organized or accepted, Jira issues you created or that were assigned to you, Confluence pages you created or edited and comments you wrote. Each item has a documentId for read_document. Follow nextCursor for more; a source that failed and recovers on a later page can return entries older than that page. sources reports each source: not_connected and reconnect carry the provider to connect with oauth_get_auth_link.',
0 commit comments