@sentry/junior-google 0.238.0 → 0.239.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 CHANGED
@@ -8,18 +8,36 @@ This version supports Calendar only. Drive and Gmail are out of scope.
8
8
 
9
9
  ## Surfaces
10
10
 
11
- - `findMeetingTimes` finds times when every attendee is free. It reads
12
- free/busy data only. It never reads event titles or details.
11
+ - `findMeetingTimes` finds times when every required attendee is free and
12
+ inside working hours (09:00 to 17:00 by default) in the time zone of their
13
+ own calendar. It reads free/busy data and calendar time zones only. It never
14
+ reads event titles or details. Optional attendees do not block a slot.
15
+ Slots where they are free come first, and each slot names the optional
16
+ attendees who are busy or off hours. Slots are spread across days and
17
+ across each day, so the requester gets a real choice.
13
18
  - `createCalendarEvent` creates an event on Junior's own calendar. It sends
14
- invites and can add a Google Meet link. A retry of the same tool call returns
15
- the same event. It does not create a second invite.
16
- - `listCalendarEvents` reads the events on one colleague's calendar. It shows
17
- only what the calendar's Google sharing settings let Junior's account see.
18
- A calendar shared as free/busy only shows busy blocks without titles. It
19
- never returns event descriptions.
20
- - `updateCalendarEvent` changes the title, description, time, or attendees of
21
- an event that Junior organizes. Google emails the attendees about the
22
- change. Only people invited to the event can ask for a change.
19
+ invites and can add a Google Meet link, a location, optional attendees, and
20
+ a simple repeat rule (weekdays, weekly, or monthly). A retry of the same
21
+ tool call returns the same event. It does not create a second invite.
22
+ - `listCalendarEvents` reads the events on one colleague's calendar, or on
23
+ Junior's own calendar when no calendar is given. It shows only what the
24
+ calendar's Google sharing settings let Junior's account see. A calendar
25
+ shared as free/busy only shows busy blocks without titles. It never returns
26
+ event descriptions. Each event says whether Junior organizes it, and gives
27
+ attendee responses and the series id of a repeating event.
28
+ - `updateCalendarEvent` and `cancelCalendarEvent` accept an event id or a
29
+ Google Calendar event link.
30
+ - `updateCalendarEvent` changes the title, description, time, location, video
31
+ call, or attendees of an event that Junior organizes. Google emails the
32
+ attendees about the change. Only people invited to the event can ask for a
33
+ change.
34
+ - `cancelCalendarEvent` deletes an event that Junior organizes. Google removes
35
+ it from every attendee's calendar and emails them a cancellation. Only
36
+ people invited to the event can ask to cancel it.
37
+ - `createCalendarEvent` and `updateCalendarEvent` save a Calendar event
38
+ annotation on the Conversation. Junior shows its card with the next reply.
39
+ The card shows the title, time, and attendees, and links to the event. A
40
+ change to an event replaces its card.
23
41
  - The **Google account** page on the dashboard Admin page shows whether the
24
42
  account is connected. Its Connect button starts Google sign-in.
25
43
  - `junior google connect` and `junior google status` are the operator CLI.
@@ -56,18 +74,24 @@ admin to reconnect.
56
74
  - Junior checks and invites only people in the allowed domains. By default,
57
75
  the allowed domain is the domain of the account email.
58
76
  - Junior adds the requester to the attendees when it knows their email.
59
- - Junior changes only events that it organizes, and only for a requester who
60
- is invited to the event.
77
+ - Junior changes or cancels only events that it organizes, and only for a
78
+ requester who is invited to the event. The `calendar.events.owned` scope
79
+ also keeps events that other people organize out of reach.
61
80
  - Calendar scopes are `calendar.events.freebusy`, `calendar.events.readonly`,
62
81
  and `calendar.events.owned`. Junior also requests `openid email` to verify
63
82
  the account during sign-in.
64
83
 
65
84
  ## Setup
66
85
 
67
- 1. In a Google Cloud project that the company owns, enable the Google Calendar
68
- API.
69
- 2. Configure the OAuth consent screen with user type **Internal**.
70
- 3. Create an OAuth client of type **Web application**. Add these redirect URIs:
86
+ The plugin uses the same Google OAuth client as dashboard sign-in. Each
87
+ sign-in requests only its own scopes, so dashboard sign-in still asks only for
88
+ identity.
89
+
90
+ 1. In the Google Cloud project of the dashboard OAuth client, enable the
91
+ Google Calendar API.
92
+ 2. On the OAuth consent screen, use user type **Internal** and add the
93
+ Calendar scopes above.
94
+ 3. On the OAuth client, add these redirect URIs:
71
95
  - `https://<junior host>/api/plugins/google/oauth/callback`
72
96
  - `http://127.0.0.1:8765/oauth/callback`, for the CLI. Use another port with
73
97
  `junior google connect --port`.
@@ -76,8 +100,8 @@ admin to reconnect.
76
100
 
77
101
  | Variable | Purpose |
78
102
  | ---------------------------------- | ----------------------------------------------- |
79
- | `GOOGLE_WORKSPACE_CLIENT_ID` | OAuth client id |
80
- | `GOOGLE_WORKSPACE_CLIENT_SECRET` | OAuth client secret |
103
+ | `GOOGLE_CLIENT_ID` | OAuth client id, shared with dashboard sign-in |
104
+ | `GOOGLE_CLIENT_SECRET` | OAuth client secret |
81
105
  | `GOOGLE_WORKSPACE_ACCOUNT_EMAIL` | The account Junior acts as |
82
106
  | `GOOGLE_WORKSPACE_ALLOWED_DOMAINS` | Optional comma-separated domains to schedule in |
83
107
 
@@ -99,5 +123,11 @@ variables are set. The Admin page shows **Not configured** until then.
99
123
  - Anyone who can talk to Junior can ask it to read a colleague's calendar.
100
124
  Junior returns what its own account can see, so set the sharing default
101
125
  with that in mind.
126
+ - Google does not expose the working hours that people set in Calendar.
127
+ Junior uses each calendar's time zone and one shared workday instead.
128
+ - Junior cannot find or book meeting rooms. Room discovery needs the Admin
129
+ SDK `admin.directory.resource.calendar.readonly` scope and a Workspace
130
+ admin role on Junior's account. Room emails are also outside the allowed
131
+ domains. It cannot accept or decline invites for other people.
102
132
  - No disconnect command. To revoke access, remove the app grant from the
103
133
  Junior account in Google.
package/dist/config.d.ts CHANGED
@@ -3,8 +3,9 @@
3
3
  *
4
4
  * Values come from host environment variables. They never reach the sandbox.
5
5
  */
6
- export declare const GOOGLE_CLIENT_ID_ENV = "GOOGLE_WORKSPACE_CLIENT_ID";
7
- export declare const GOOGLE_CLIENT_SECRET_ENV = "GOOGLE_WORKSPACE_CLIENT_SECRET";
6
+ /** Dashboard sign-in uses the same OAuth client. */
7
+ export declare const GOOGLE_CLIENT_ID_ENV = "GOOGLE_CLIENT_ID";
8
+ export declare const GOOGLE_CLIENT_SECRET_ENV = "GOOGLE_CLIENT_SECRET";
8
9
  export declare const GOOGLE_ACCOUNT_EMAIL_ENV = "GOOGLE_WORKSPACE_ACCOUNT_EMAIL";
9
10
  export declare const GOOGLE_ALLOWED_DOMAINS_ENV = "GOOGLE_WORKSPACE_ALLOWED_DOMAINS";
10
11
  /**
@@ -14,6 +14,11 @@ export declare const GOOGLE_OPERATIONS: {
14
14
  readonly method: "POST";
15
15
  readonly path: RegExp;
16
16
  };
17
+ readonly "google.calendar.event.delete": {
18
+ readonly access: "write";
19
+ readonly method: "DELETE";
20
+ readonly path: RegExp;
21
+ };
17
22
  readonly "google.calendar.event.get": {
18
23
  readonly access: "read";
19
24
  readonly method: "GET";