@sentry/junior-google 0.299.0 → 0.300.0
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/README.md +12 -1
- package/dist/credentials.d.ts +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1492 -1221
- package/dist/links/calendar.d.ts +11 -0
- package/dist/links/files.d.ts +11 -0
- package/dist/links/summary.d.ts +13 -0
- package/dist/tools/cancel-event.d.ts +38 -2
- package/dist/tools/create-doc.d.ts +38 -2
- package/dist/tools/create-event.d.ts +38 -2
- package/dist/tools/files.d.ts +11 -1
- package/dist/tools/find-meeting-times.d.ts +38 -2
- package/dist/tools/insert-doc-content.d.ts +38 -2
- package/dist/tools/list-events.d.ts +38 -2
- package/dist/tools/list-file-comments.d.ts +38 -2
- package/dist/tools/read-doc.d.ts +8 -165
- package/dist/tools/read-file.d.ts +241 -0
- package/dist/tools/read-meeting-transcript.d.ts +38 -2
- package/dist/tools/read-sheet.d.ts +12 -170
- package/dist/tools/read-slides.d.ts +12 -169
- package/dist/tools/replace-doc-content.d.ts +38 -2
- package/dist/tools/replace-doc-text.d.ts +38 -2
- package/dist/tools/search-files.d.ts +42 -2
- package/dist/tools/shared.d.ts +20 -2
- package/dist/tools/update-event.d.ts +38 -2
- package/package.json +5 -4
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Link cards for Google Calendar events.
|
|
3
|
+
*
|
|
4
|
+
* Junior's own Google account reads the event from its own calendar, so the
|
|
5
|
+
* card shows only when the viewer organizes, created, or is invited to the
|
|
6
|
+
* event. Any unclear case gets no card. The card shows the title, the time,
|
|
7
|
+
* and the start of the description, never the guests.
|
|
8
|
+
*/
|
|
9
|
+
import type { PluginObjectLinkDefinition } from "@sentry/junior-plugin-api";
|
|
10
|
+
/** Google Calendar event links that resolve to Calendar event cards. */
|
|
11
|
+
export declare const googleCalendarLinks: PluginObjectLinkDefinition;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Link cards for Google Docs, Sheets, and Slides.
|
|
3
|
+
*
|
|
4
|
+
* Junior's own Google account reads the file, so the card shows only when
|
|
5
|
+
* Drive says that the viewer can open it too. This is the rule of
|
|
6
|
+
* `searchGoogleFiles`. Any unclear case gets no card. A Doc card also shows
|
|
7
|
+
* its first paragraph.
|
|
8
|
+
*/
|
|
9
|
+
import type { PluginObjectLinkDefinition } from "@sentry/junior-plugin-api";
|
|
10
|
+
/** Docs, Sheets, and Slides links that resolve to document cards. */
|
|
11
|
+
export declare const googleFileLinks: PluginObjectLinkDefinition;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ObjectLinkContext } from "@sentry/junior-plugin-api";
|
|
2
|
+
import { type FileReference } from "../tools/files";
|
|
3
|
+
/**
|
|
4
|
+
* Make a card summary from a Calendar event description. Calendar stores
|
|
5
|
+
* descriptions as HTML or plain text, so parse it and keep only the text.
|
|
6
|
+
*/
|
|
7
|
+
export declare function htmlSummary(html: string | undefined): string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Read the first body paragraph of a Doc as a card summary. Call it only
|
|
10
|
+
* after the viewer may open the Doc. A Docs API failure gives no summary,
|
|
11
|
+
* so the card still shows.
|
|
12
|
+
*/
|
|
13
|
+
export declare function docSummary(ctx: ObjectLinkContext, file: FileReference): Promise<string | undefined>;
|
|
@@ -15,7 +15,7 @@ export declare function createCancelCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
15
15
|
kind: "object";
|
|
16
16
|
key: string;
|
|
17
17
|
label: string;
|
|
18
|
-
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
|
|
18
|
+
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
|
|
19
19
|
title: string;
|
|
20
20
|
url: string | null;
|
|
21
21
|
description?: string | undefined;
|
|
@@ -26,6 +26,7 @@ export declare function createCancelCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
26
26
|
sourceUpdatedAt?: string | undefined;
|
|
27
27
|
facts?: {
|
|
28
28
|
type: "code_change";
|
|
29
|
+
summary?: string | undefined;
|
|
29
30
|
author?: string | undefined;
|
|
30
31
|
sourceBranch?: string | undefined;
|
|
31
32
|
targetBranch?: string | undefined;
|
|
@@ -43,6 +44,7 @@ export declare function createCancelCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
43
44
|
previewImageUrls?: string[] | undefined;
|
|
44
45
|
} | {
|
|
45
46
|
type: "task";
|
|
47
|
+
summary?: string | undefined;
|
|
46
48
|
assignees?: string[] | undefined;
|
|
47
49
|
priority?: string | undefined;
|
|
48
50
|
project?: string | undefined;
|
|
@@ -51,25 +53,41 @@ export declare function createCancelCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
51
53
|
labels?: string[] | undefined;
|
|
52
54
|
} | {
|
|
53
55
|
type: "deployment";
|
|
56
|
+
summary?: string | undefined;
|
|
54
57
|
project?: string | undefined;
|
|
55
58
|
environment?: string | undefined;
|
|
56
59
|
revision?: string | undefined;
|
|
57
60
|
branch?: string | undefined;
|
|
58
61
|
} | {
|
|
59
62
|
type: "calendar_event";
|
|
63
|
+
summary?: string | undefined;
|
|
60
64
|
when?: string | undefined;
|
|
61
65
|
attendees?: string[] | undefined;
|
|
62
66
|
} | {
|
|
63
67
|
type: "conversation";
|
|
68
|
+
summary?: string | undefined;
|
|
64
69
|
participants?: string[] | undefined;
|
|
65
70
|
lastActivityAt?: string | undefined;
|
|
71
|
+
} | {
|
|
72
|
+
type: "document";
|
|
73
|
+
summary?: string | undefined;
|
|
74
|
+
owner?: string | undefined;
|
|
75
|
+
modifiedAt?: string | undefined;
|
|
66
76
|
} | {
|
|
67
77
|
type: "message";
|
|
78
|
+
summary?: string | undefined;
|
|
68
79
|
channel?: string | undefined;
|
|
69
80
|
author?: string | undefined;
|
|
70
81
|
sentAt?: string | undefined;
|
|
82
|
+
} | {
|
|
83
|
+
type: "web_page";
|
|
84
|
+
summary?: string | undefined;
|
|
85
|
+
siteName?: string | undefined;
|
|
86
|
+
author?: string | undefined;
|
|
87
|
+
thumbnailUrl?: string | undefined;
|
|
71
88
|
} | {
|
|
72
89
|
type: "person";
|
|
90
|
+
summary?: string | undefined;
|
|
73
91
|
email?: string | undefined;
|
|
74
92
|
slackHandle?: string | undefined;
|
|
75
93
|
githubHandle?: string | undefined;
|
|
@@ -108,7 +126,7 @@ export declare function createCancelCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
108
126
|
kind: "object";
|
|
109
127
|
key: string;
|
|
110
128
|
label: string;
|
|
111
|
-
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
|
|
129
|
+
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
|
|
112
130
|
title: string;
|
|
113
131
|
url: string | null;
|
|
114
132
|
description?: string | undefined;
|
|
@@ -119,6 +137,7 @@ export declare function createCancelCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
119
137
|
sourceUpdatedAt?: string | undefined;
|
|
120
138
|
facts?: {
|
|
121
139
|
type: "code_change";
|
|
140
|
+
summary?: string | undefined;
|
|
122
141
|
author?: string | undefined;
|
|
123
142
|
sourceBranch?: string | undefined;
|
|
124
143
|
targetBranch?: string | undefined;
|
|
@@ -136,6 +155,7 @@ export declare function createCancelCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
136
155
|
previewImageUrls?: string[] | undefined;
|
|
137
156
|
} | {
|
|
138
157
|
type: "task";
|
|
158
|
+
summary?: string | undefined;
|
|
139
159
|
assignees?: string[] | undefined;
|
|
140
160
|
priority?: string | undefined;
|
|
141
161
|
project?: string | undefined;
|
|
@@ -144,25 +164,41 @@ export declare function createCancelCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
144
164
|
labels?: string[] | undefined;
|
|
145
165
|
} | {
|
|
146
166
|
type: "deployment";
|
|
167
|
+
summary?: string | undefined;
|
|
147
168
|
project?: string | undefined;
|
|
148
169
|
environment?: string | undefined;
|
|
149
170
|
revision?: string | undefined;
|
|
150
171
|
branch?: string | undefined;
|
|
151
172
|
} | {
|
|
152
173
|
type: "calendar_event";
|
|
174
|
+
summary?: string | undefined;
|
|
153
175
|
when?: string | undefined;
|
|
154
176
|
attendees?: string[] | undefined;
|
|
155
177
|
} | {
|
|
156
178
|
type: "conversation";
|
|
179
|
+
summary?: string | undefined;
|
|
157
180
|
participants?: string[] | undefined;
|
|
158
181
|
lastActivityAt?: string | undefined;
|
|
182
|
+
} | {
|
|
183
|
+
type: "document";
|
|
184
|
+
summary?: string | undefined;
|
|
185
|
+
owner?: string | undefined;
|
|
186
|
+
modifiedAt?: string | undefined;
|
|
159
187
|
} | {
|
|
160
188
|
type: "message";
|
|
189
|
+
summary?: string | undefined;
|
|
161
190
|
channel?: string | undefined;
|
|
162
191
|
author?: string | undefined;
|
|
163
192
|
sentAt?: string | undefined;
|
|
193
|
+
} | {
|
|
194
|
+
type: "web_page";
|
|
195
|
+
summary?: string | undefined;
|
|
196
|
+
siteName?: string | undefined;
|
|
197
|
+
author?: string | undefined;
|
|
198
|
+
thumbnailUrl?: string | undefined;
|
|
164
199
|
} | {
|
|
165
200
|
type: "person";
|
|
201
|
+
summary?: string | undefined;
|
|
166
202
|
email?: string | undefined;
|
|
167
203
|
slackHandle?: string | undefined;
|
|
168
204
|
githubHandle?: string | undefined;
|
|
@@ -17,7 +17,7 @@ export declare function createCreateGoogleDocTool(ctx: GoogleToolContext): impor
|
|
|
17
17
|
kind: "object";
|
|
18
18
|
key: string;
|
|
19
19
|
label: string;
|
|
20
|
-
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
|
|
20
|
+
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
|
|
21
21
|
title: string;
|
|
22
22
|
url: string | null;
|
|
23
23
|
description?: string | undefined;
|
|
@@ -28,6 +28,7 @@ export declare function createCreateGoogleDocTool(ctx: GoogleToolContext): impor
|
|
|
28
28
|
sourceUpdatedAt?: string | undefined;
|
|
29
29
|
facts?: {
|
|
30
30
|
type: "code_change";
|
|
31
|
+
summary?: string | undefined;
|
|
31
32
|
author?: string | undefined;
|
|
32
33
|
sourceBranch?: string | undefined;
|
|
33
34
|
targetBranch?: string | undefined;
|
|
@@ -45,6 +46,7 @@ export declare function createCreateGoogleDocTool(ctx: GoogleToolContext): impor
|
|
|
45
46
|
previewImageUrls?: string[] | undefined;
|
|
46
47
|
} | {
|
|
47
48
|
type: "task";
|
|
49
|
+
summary?: string | undefined;
|
|
48
50
|
assignees?: string[] | undefined;
|
|
49
51
|
priority?: string | undefined;
|
|
50
52
|
project?: string | undefined;
|
|
@@ -53,25 +55,41 @@ export declare function createCreateGoogleDocTool(ctx: GoogleToolContext): impor
|
|
|
53
55
|
labels?: string[] | undefined;
|
|
54
56
|
} | {
|
|
55
57
|
type: "deployment";
|
|
58
|
+
summary?: string | undefined;
|
|
56
59
|
project?: string | undefined;
|
|
57
60
|
environment?: string | undefined;
|
|
58
61
|
revision?: string | undefined;
|
|
59
62
|
branch?: string | undefined;
|
|
60
63
|
} | {
|
|
61
64
|
type: "calendar_event";
|
|
65
|
+
summary?: string | undefined;
|
|
62
66
|
when?: string | undefined;
|
|
63
67
|
attendees?: string[] | undefined;
|
|
64
68
|
} | {
|
|
65
69
|
type: "conversation";
|
|
70
|
+
summary?: string | undefined;
|
|
66
71
|
participants?: string[] | undefined;
|
|
67
72
|
lastActivityAt?: string | undefined;
|
|
73
|
+
} | {
|
|
74
|
+
type: "document";
|
|
75
|
+
summary?: string | undefined;
|
|
76
|
+
owner?: string | undefined;
|
|
77
|
+
modifiedAt?: string | undefined;
|
|
68
78
|
} | {
|
|
69
79
|
type: "message";
|
|
80
|
+
summary?: string | undefined;
|
|
70
81
|
channel?: string | undefined;
|
|
71
82
|
author?: string | undefined;
|
|
72
83
|
sentAt?: string | undefined;
|
|
84
|
+
} | {
|
|
85
|
+
type: "web_page";
|
|
86
|
+
summary?: string | undefined;
|
|
87
|
+
siteName?: string | undefined;
|
|
88
|
+
author?: string | undefined;
|
|
89
|
+
thumbnailUrl?: string | undefined;
|
|
73
90
|
} | {
|
|
74
91
|
type: "person";
|
|
92
|
+
summary?: string | undefined;
|
|
75
93
|
email?: string | undefined;
|
|
76
94
|
slackHandle?: string | undefined;
|
|
77
95
|
githubHandle?: string | undefined;
|
|
@@ -98,7 +116,7 @@ export declare function createCreateGoogleDocTool(ctx: GoogleToolContext): impor
|
|
|
98
116
|
kind: "object";
|
|
99
117
|
key: string;
|
|
100
118
|
label: string;
|
|
101
|
-
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
|
|
119
|
+
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
|
|
102
120
|
title: string;
|
|
103
121
|
url: string | null;
|
|
104
122
|
description?: string | undefined;
|
|
@@ -109,6 +127,7 @@ export declare function createCreateGoogleDocTool(ctx: GoogleToolContext): impor
|
|
|
109
127
|
sourceUpdatedAt?: string | undefined;
|
|
110
128
|
facts?: {
|
|
111
129
|
type: "code_change";
|
|
130
|
+
summary?: string | undefined;
|
|
112
131
|
author?: string | undefined;
|
|
113
132
|
sourceBranch?: string | undefined;
|
|
114
133
|
targetBranch?: string | undefined;
|
|
@@ -126,6 +145,7 @@ export declare function createCreateGoogleDocTool(ctx: GoogleToolContext): impor
|
|
|
126
145
|
previewImageUrls?: string[] | undefined;
|
|
127
146
|
} | {
|
|
128
147
|
type: "task";
|
|
148
|
+
summary?: string | undefined;
|
|
129
149
|
assignees?: string[] | undefined;
|
|
130
150
|
priority?: string | undefined;
|
|
131
151
|
project?: string | undefined;
|
|
@@ -134,25 +154,41 @@ export declare function createCreateGoogleDocTool(ctx: GoogleToolContext): impor
|
|
|
134
154
|
labels?: string[] | undefined;
|
|
135
155
|
} | {
|
|
136
156
|
type: "deployment";
|
|
157
|
+
summary?: string | undefined;
|
|
137
158
|
project?: string | undefined;
|
|
138
159
|
environment?: string | undefined;
|
|
139
160
|
revision?: string | undefined;
|
|
140
161
|
branch?: string | undefined;
|
|
141
162
|
} | {
|
|
142
163
|
type: "calendar_event";
|
|
164
|
+
summary?: string | undefined;
|
|
143
165
|
when?: string | undefined;
|
|
144
166
|
attendees?: string[] | undefined;
|
|
145
167
|
} | {
|
|
146
168
|
type: "conversation";
|
|
169
|
+
summary?: string | undefined;
|
|
147
170
|
participants?: string[] | undefined;
|
|
148
171
|
lastActivityAt?: string | undefined;
|
|
172
|
+
} | {
|
|
173
|
+
type: "document";
|
|
174
|
+
summary?: string | undefined;
|
|
175
|
+
owner?: string | undefined;
|
|
176
|
+
modifiedAt?: string | undefined;
|
|
149
177
|
} | {
|
|
150
178
|
type: "message";
|
|
179
|
+
summary?: string | undefined;
|
|
151
180
|
channel?: string | undefined;
|
|
152
181
|
author?: string | undefined;
|
|
153
182
|
sentAt?: string | undefined;
|
|
183
|
+
} | {
|
|
184
|
+
type: "web_page";
|
|
185
|
+
summary?: string | undefined;
|
|
186
|
+
siteName?: string | undefined;
|
|
187
|
+
author?: string | undefined;
|
|
188
|
+
thumbnailUrl?: string | undefined;
|
|
154
189
|
} | {
|
|
155
190
|
type: "person";
|
|
191
|
+
summary?: string | undefined;
|
|
156
192
|
email?: string | undefined;
|
|
157
193
|
slackHandle?: string | undefined;
|
|
158
194
|
githubHandle?: string | undefined;
|
|
@@ -40,7 +40,7 @@ export declare function createCreateCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
40
40
|
kind: "object";
|
|
41
41
|
key: string;
|
|
42
42
|
label: string;
|
|
43
|
-
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
|
|
43
|
+
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
|
|
44
44
|
title: string;
|
|
45
45
|
url: string | null;
|
|
46
46
|
description?: string | undefined;
|
|
@@ -51,6 +51,7 @@ export declare function createCreateCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
51
51
|
sourceUpdatedAt?: string | undefined;
|
|
52
52
|
facts?: {
|
|
53
53
|
type: "code_change";
|
|
54
|
+
summary?: string | undefined;
|
|
54
55
|
author?: string | undefined;
|
|
55
56
|
sourceBranch?: string | undefined;
|
|
56
57
|
targetBranch?: string | undefined;
|
|
@@ -68,6 +69,7 @@ export declare function createCreateCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
68
69
|
previewImageUrls?: string[] | undefined;
|
|
69
70
|
} | {
|
|
70
71
|
type: "task";
|
|
72
|
+
summary?: string | undefined;
|
|
71
73
|
assignees?: string[] | undefined;
|
|
72
74
|
priority?: string | undefined;
|
|
73
75
|
project?: string | undefined;
|
|
@@ -76,25 +78,41 @@ export declare function createCreateCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
76
78
|
labels?: string[] | undefined;
|
|
77
79
|
} | {
|
|
78
80
|
type: "deployment";
|
|
81
|
+
summary?: string | undefined;
|
|
79
82
|
project?: string | undefined;
|
|
80
83
|
environment?: string | undefined;
|
|
81
84
|
revision?: string | undefined;
|
|
82
85
|
branch?: string | undefined;
|
|
83
86
|
} | {
|
|
84
87
|
type: "calendar_event";
|
|
88
|
+
summary?: string | undefined;
|
|
85
89
|
when?: string | undefined;
|
|
86
90
|
attendees?: string[] | undefined;
|
|
87
91
|
} | {
|
|
88
92
|
type: "conversation";
|
|
93
|
+
summary?: string | undefined;
|
|
89
94
|
participants?: string[] | undefined;
|
|
90
95
|
lastActivityAt?: string | undefined;
|
|
96
|
+
} | {
|
|
97
|
+
type: "document";
|
|
98
|
+
summary?: string | undefined;
|
|
99
|
+
owner?: string | undefined;
|
|
100
|
+
modifiedAt?: string | undefined;
|
|
91
101
|
} | {
|
|
92
102
|
type: "message";
|
|
103
|
+
summary?: string | undefined;
|
|
93
104
|
channel?: string | undefined;
|
|
94
105
|
author?: string | undefined;
|
|
95
106
|
sentAt?: string | undefined;
|
|
107
|
+
} | {
|
|
108
|
+
type: "web_page";
|
|
109
|
+
summary?: string | undefined;
|
|
110
|
+
siteName?: string | undefined;
|
|
111
|
+
author?: string | undefined;
|
|
112
|
+
thumbnailUrl?: string | undefined;
|
|
96
113
|
} | {
|
|
97
114
|
type: "person";
|
|
115
|
+
summary?: string | undefined;
|
|
98
116
|
email?: string | undefined;
|
|
99
117
|
slackHandle?: string | undefined;
|
|
100
118
|
githubHandle?: string | undefined;
|
|
@@ -133,7 +151,7 @@ export declare function createCreateCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
133
151
|
kind: "object";
|
|
134
152
|
key: string;
|
|
135
153
|
label: string;
|
|
136
|
-
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
|
|
154
|
+
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
|
|
137
155
|
title: string;
|
|
138
156
|
url: string | null;
|
|
139
157
|
description?: string | undefined;
|
|
@@ -144,6 +162,7 @@ export declare function createCreateCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
144
162
|
sourceUpdatedAt?: string | undefined;
|
|
145
163
|
facts?: {
|
|
146
164
|
type: "code_change";
|
|
165
|
+
summary?: string | undefined;
|
|
147
166
|
author?: string | undefined;
|
|
148
167
|
sourceBranch?: string | undefined;
|
|
149
168
|
targetBranch?: string | undefined;
|
|
@@ -161,6 +180,7 @@ export declare function createCreateCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
161
180
|
previewImageUrls?: string[] | undefined;
|
|
162
181
|
} | {
|
|
163
182
|
type: "task";
|
|
183
|
+
summary?: string | undefined;
|
|
164
184
|
assignees?: string[] | undefined;
|
|
165
185
|
priority?: string | undefined;
|
|
166
186
|
project?: string | undefined;
|
|
@@ -169,25 +189,41 @@ export declare function createCreateCalendarEventTool(ctx: GoogleToolContext): i
|
|
|
169
189
|
labels?: string[] | undefined;
|
|
170
190
|
} | {
|
|
171
191
|
type: "deployment";
|
|
192
|
+
summary?: string | undefined;
|
|
172
193
|
project?: string | undefined;
|
|
173
194
|
environment?: string | undefined;
|
|
174
195
|
revision?: string | undefined;
|
|
175
196
|
branch?: string | undefined;
|
|
176
197
|
} | {
|
|
177
198
|
type: "calendar_event";
|
|
199
|
+
summary?: string | undefined;
|
|
178
200
|
when?: string | undefined;
|
|
179
201
|
attendees?: string[] | undefined;
|
|
180
202
|
} | {
|
|
181
203
|
type: "conversation";
|
|
204
|
+
summary?: string | undefined;
|
|
182
205
|
participants?: string[] | undefined;
|
|
183
206
|
lastActivityAt?: string | undefined;
|
|
207
|
+
} | {
|
|
208
|
+
type: "document";
|
|
209
|
+
summary?: string | undefined;
|
|
210
|
+
owner?: string | undefined;
|
|
211
|
+
modifiedAt?: string | undefined;
|
|
184
212
|
} | {
|
|
185
213
|
type: "message";
|
|
214
|
+
summary?: string | undefined;
|
|
186
215
|
channel?: string | undefined;
|
|
187
216
|
author?: string | undefined;
|
|
188
217
|
sentAt?: string | undefined;
|
|
218
|
+
} | {
|
|
219
|
+
type: "web_page";
|
|
220
|
+
summary?: string | undefined;
|
|
221
|
+
siteName?: string | undefined;
|
|
222
|
+
author?: string | undefined;
|
|
223
|
+
thumbnailUrl?: string | undefined;
|
|
189
224
|
} | {
|
|
190
225
|
type: "person";
|
|
226
|
+
summary?: string | undefined;
|
|
191
227
|
email?: string | undefined;
|
|
192
228
|
slackHandle?: string | undefined;
|
|
193
229
|
githubHandle?: string | undefined;
|
package/dist/tools/files.d.ts
CHANGED
|
@@ -5,14 +5,17 @@ import { type GoogleToolContext } from "./shared";
|
|
|
5
5
|
declare const FILE_TYPES: {
|
|
6
6
|
readonly document: {
|
|
7
7
|
readonly label: "Google Doc";
|
|
8
|
+
readonly linkRoot: "document";
|
|
8
9
|
readonly mimeType: "application/vnd.google-apps.document";
|
|
9
10
|
};
|
|
10
11
|
readonly presentation: {
|
|
11
12
|
readonly label: "Google Slides presentation";
|
|
13
|
+
readonly linkRoot: "presentation";
|
|
12
14
|
readonly mimeType: "application/vnd.google-apps.presentation";
|
|
13
15
|
};
|
|
14
16
|
readonly spreadsheet: {
|
|
15
17
|
readonly label: "Google Sheet";
|
|
18
|
+
readonly linkRoot: "spreadsheets";
|
|
16
19
|
readonly mimeType: "application/vnd.google-apps.spreadsheet";
|
|
17
20
|
};
|
|
18
21
|
};
|
|
@@ -22,6 +25,13 @@ export declare const GOOGLE_FILE_TYPES: GoogleFileType[];
|
|
|
22
25
|
export declare function googleFileMimeType(type: GoogleFileType): string;
|
|
23
26
|
/** Return the file type of a Drive MIME type, when the tools read it. */
|
|
24
27
|
export declare function googleFileType(mimeType: string): GoogleFileType | undefined;
|
|
28
|
+
/** Return the first path segment of a file type's links, such as `spreadsheets`. */
|
|
29
|
+
export declare function googleFileLinkRoot(type: GoogleFileType): string;
|
|
30
|
+
/**
|
|
31
|
+
* Return the file type that a Docs, Sheets, or Slides link names in its
|
|
32
|
+
* path, such as `/spreadsheets/d/<id>`. Other links name no type.
|
|
33
|
+
*/
|
|
34
|
+
export declare function googleLinkFileType(url: URL): GoogleFileType | undefined;
|
|
25
35
|
/** File id or link input for the tools that use one file. */
|
|
26
36
|
export declare function fileReferenceSchema(name: string): z.ZodString;
|
|
27
37
|
/** A Drive file id, as the file tools accept it. */
|
|
@@ -60,7 +70,7 @@ export declare function googleFileRequest(ctx: GoogleToolContext, file: FileRefe
|
|
|
60
70
|
* `drive.readonly` can read any Drive file, so each tool checks the type
|
|
61
71
|
* before it reads content or comments.
|
|
62
72
|
*/
|
|
63
|
-
export declare function
|
|
73
|
+
export declare function readGoogleFileMetadata(ctx: GoogleToolContext, file: FileReference, types: readonly GoogleFileType[]): Promise<{
|
|
64
74
|
capabilities?: {
|
|
65
75
|
canEdit?: boolean | undefined;
|
|
66
76
|
} | undefined;
|
|
@@ -84,7 +84,7 @@ export declare function createFindMeetingTimesTool(ctx: GoogleToolContext): impo
|
|
|
84
84
|
kind: "object";
|
|
85
85
|
key: string;
|
|
86
86
|
label: string;
|
|
87
|
-
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
|
|
87
|
+
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
|
|
88
88
|
title: string;
|
|
89
89
|
url: string | null;
|
|
90
90
|
description?: string | undefined;
|
|
@@ -95,6 +95,7 @@ export declare function createFindMeetingTimesTool(ctx: GoogleToolContext): impo
|
|
|
95
95
|
sourceUpdatedAt?: string | undefined;
|
|
96
96
|
facts?: {
|
|
97
97
|
type: "code_change";
|
|
98
|
+
summary?: string | undefined;
|
|
98
99
|
author?: string | undefined;
|
|
99
100
|
sourceBranch?: string | undefined;
|
|
100
101
|
targetBranch?: string | undefined;
|
|
@@ -112,6 +113,7 @@ export declare function createFindMeetingTimesTool(ctx: GoogleToolContext): impo
|
|
|
112
113
|
previewImageUrls?: string[] | undefined;
|
|
113
114
|
} | {
|
|
114
115
|
type: "task";
|
|
116
|
+
summary?: string | undefined;
|
|
115
117
|
assignees?: string[] | undefined;
|
|
116
118
|
priority?: string | undefined;
|
|
117
119
|
project?: string | undefined;
|
|
@@ -120,25 +122,41 @@ export declare function createFindMeetingTimesTool(ctx: GoogleToolContext): impo
|
|
|
120
122
|
labels?: string[] | undefined;
|
|
121
123
|
} | {
|
|
122
124
|
type: "deployment";
|
|
125
|
+
summary?: string | undefined;
|
|
123
126
|
project?: string | undefined;
|
|
124
127
|
environment?: string | undefined;
|
|
125
128
|
revision?: string | undefined;
|
|
126
129
|
branch?: string | undefined;
|
|
127
130
|
} | {
|
|
128
131
|
type: "calendar_event";
|
|
132
|
+
summary?: string | undefined;
|
|
129
133
|
when?: string | undefined;
|
|
130
134
|
attendees?: string[] | undefined;
|
|
131
135
|
} | {
|
|
132
136
|
type: "conversation";
|
|
137
|
+
summary?: string | undefined;
|
|
133
138
|
participants?: string[] | undefined;
|
|
134
139
|
lastActivityAt?: string | undefined;
|
|
140
|
+
} | {
|
|
141
|
+
type: "document";
|
|
142
|
+
summary?: string | undefined;
|
|
143
|
+
owner?: string | undefined;
|
|
144
|
+
modifiedAt?: string | undefined;
|
|
135
145
|
} | {
|
|
136
146
|
type: "message";
|
|
147
|
+
summary?: string | undefined;
|
|
137
148
|
channel?: string | undefined;
|
|
138
149
|
author?: string | undefined;
|
|
139
150
|
sentAt?: string | undefined;
|
|
151
|
+
} | {
|
|
152
|
+
type: "web_page";
|
|
153
|
+
summary?: string | undefined;
|
|
154
|
+
siteName?: string | undefined;
|
|
155
|
+
author?: string | undefined;
|
|
156
|
+
thumbnailUrl?: string | undefined;
|
|
140
157
|
} | {
|
|
141
158
|
type: "person";
|
|
159
|
+
summary?: string | undefined;
|
|
142
160
|
email?: string | undefined;
|
|
143
161
|
slackHandle?: string | undefined;
|
|
144
162
|
githubHandle?: string | undefined;
|
|
@@ -177,7 +195,7 @@ export declare function createFindMeetingTimesTool(ctx: GoogleToolContext): impo
|
|
|
177
195
|
kind: "object";
|
|
178
196
|
key: string;
|
|
179
197
|
label: string;
|
|
180
|
-
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "item" | "message" | "person" | "task";
|
|
198
|
+
objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
|
|
181
199
|
title: string;
|
|
182
200
|
url: string | null;
|
|
183
201
|
description?: string | undefined;
|
|
@@ -188,6 +206,7 @@ export declare function createFindMeetingTimesTool(ctx: GoogleToolContext): impo
|
|
|
188
206
|
sourceUpdatedAt?: string | undefined;
|
|
189
207
|
facts?: {
|
|
190
208
|
type: "code_change";
|
|
209
|
+
summary?: string | undefined;
|
|
191
210
|
author?: string | undefined;
|
|
192
211
|
sourceBranch?: string | undefined;
|
|
193
212
|
targetBranch?: string | undefined;
|
|
@@ -205,6 +224,7 @@ export declare function createFindMeetingTimesTool(ctx: GoogleToolContext): impo
|
|
|
205
224
|
previewImageUrls?: string[] | undefined;
|
|
206
225
|
} | {
|
|
207
226
|
type: "task";
|
|
227
|
+
summary?: string | undefined;
|
|
208
228
|
assignees?: string[] | undefined;
|
|
209
229
|
priority?: string | undefined;
|
|
210
230
|
project?: string | undefined;
|
|
@@ -213,25 +233,41 @@ export declare function createFindMeetingTimesTool(ctx: GoogleToolContext): impo
|
|
|
213
233
|
labels?: string[] | undefined;
|
|
214
234
|
} | {
|
|
215
235
|
type: "deployment";
|
|
236
|
+
summary?: string | undefined;
|
|
216
237
|
project?: string | undefined;
|
|
217
238
|
environment?: string | undefined;
|
|
218
239
|
revision?: string | undefined;
|
|
219
240
|
branch?: string | undefined;
|
|
220
241
|
} | {
|
|
221
242
|
type: "calendar_event";
|
|
243
|
+
summary?: string | undefined;
|
|
222
244
|
when?: string | undefined;
|
|
223
245
|
attendees?: string[] | undefined;
|
|
224
246
|
} | {
|
|
225
247
|
type: "conversation";
|
|
248
|
+
summary?: string | undefined;
|
|
226
249
|
participants?: string[] | undefined;
|
|
227
250
|
lastActivityAt?: string | undefined;
|
|
251
|
+
} | {
|
|
252
|
+
type: "document";
|
|
253
|
+
summary?: string | undefined;
|
|
254
|
+
owner?: string | undefined;
|
|
255
|
+
modifiedAt?: string | undefined;
|
|
228
256
|
} | {
|
|
229
257
|
type: "message";
|
|
258
|
+
summary?: string | undefined;
|
|
230
259
|
channel?: string | undefined;
|
|
231
260
|
author?: string | undefined;
|
|
232
261
|
sentAt?: string | undefined;
|
|
262
|
+
} | {
|
|
263
|
+
type: "web_page";
|
|
264
|
+
summary?: string | undefined;
|
|
265
|
+
siteName?: string | undefined;
|
|
266
|
+
author?: string | undefined;
|
|
267
|
+
thumbnailUrl?: string | undefined;
|
|
233
268
|
} | {
|
|
234
269
|
type: "person";
|
|
270
|
+
summary?: string | undefined;
|
|
235
271
|
email?: string | undefined;
|
|
236
272
|
slackHandle?: string | undefined;
|
|
237
273
|
githubHandle?: string | undefined;
|