@mercury-fw/channel-google-chat 0.3.0 → 0.5.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/CHANGELOG.md +38 -0
- package/index.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @mercury-fw/channel-google-chat
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a7f2f13: A user directory decides who people are and what they may make Mercury do.
|
|
8
|
+
|
|
9
|
+
- An app can declare a `directory` in `mercury.config.ts`. Given whoever a channel says is talking, it returns the person with their roles. The person's key is `<directory name>:<id>`, so one person reached from several channels keeps one private area, one memory and one set of confirmations.
|
|
10
|
+
- With a directory the instance is closed. Someone it doesn't know gets a refusal and nothing runs, unless `access.unknown` is `"allow"`; `access.unknownMessage` sets what they're told. A directory that can't be reached, or fails to load, refuses everyone but the terminal. Answers are cached for five minutes, so a revoked role stops counting within that time.
|
|
11
|
+
- `mercury.act-as-self` (every plugin) or `mercury.act-as-self.<plugin>` (one) lets a person make Mercury act with its own identity.
|
|
12
|
+
- A plugin acting as Mercury, such as atlassian-admin, is offered only to those people, and on the terminal.
|
|
13
|
+
- A plugin acting as the person also gives them each tool a second time, as `<tool>AsMercury`.
|
|
14
|
+
- Every call made as Mercury for someone is logged with who asked.
|
|
15
|
+
- `access.plugins` restricts a plugin to some roles. Prompts, skills and the manifest follow what each person is offered.
|
|
16
|
+
- New package `@mercury-fw/directory-static`: people, their identities on each channel and their roles, listed in `DIRECTORY_STATIC_PEOPLE`.
|
|
17
|
+
- The channel contract is at version 5:
|
|
18
|
+
- `ChannelRuntimeContext.admit` says whether the core talks to a caller;
|
|
19
|
+
- the reads are per person and async, the manifest included;
|
|
20
|
+
- `DirectoryPlugin` is the directory contract;
|
|
21
|
+
- `Principal` no longer carries `roles`.
|
|
22
|
+
- `channel-http` answers `403` to a caller the directory doesn't know and `503` when it can't be reached, on every route.
|
|
23
|
+
- `auth-static` refuses `roles` in `AUTH_STATIC_TOKENS`: roles come from the directory.
|
|
24
|
+
|
|
25
|
+
## 0.4.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- 0739f77: A plugin acts as the person Mercury is talking to, who logs in to the service through Mercury.
|
|
30
|
+
|
|
31
|
+
- Plugin contract version 4: a plugin declares `actsAs: "person" | "mercury"`, and one acting as the person contributes a `login`; its tools get the turn's `person` and `requireLogin` in their context.
|
|
32
|
+
- A person is offered only the plugins acting as the person: their prompt fragments, skills and tools. A plugin acting as Mercury, or declaring nothing, is offered on the terminal only until people can be allowed to make Mercury act as itself; the startup log names it.
|
|
33
|
+
- `createCliTool` adds `--user` with the person's id to every command, staged confirmations included, and when the CLI exits with code 3 (not logged in) returns their login instead. `createCliPersonLogin` builds a plugin's `login` on a CLI's two-step remote login. A failed `runCli` carries `exitCode`.
|
|
34
|
+
- Channel contract version 4: channels get `logins` (`accept` a callback URL, `complete` a login) and `detectLoginRequired`.
|
|
35
|
+
- The HTTP channel, with `HTTP_SURFACE_PUBLIC_URL` set, streams a `login` event with the link to open and takes the person back at `GET /login/callback`, public and protected by the single-use state.
|
|
36
|
+
- `mercury.cliCredentials` can declare `userSetup`, run by `mfw credentials setup <plugin> --user-app`: the app people log in through, set up without logging anyone in.
|
|
37
|
+
- plugin-jira and plugin-bitbucket act as the person, on CLIs 2.3.0: set up their people's app with `--user-app` and register `<HTTP_SURFACE_PUBLIC_URL>/login/callback` on it. Jira's skill now says `currentUser()` is the person.
|
|
38
|
+
- plugin-atlassian-admin acts as Mercury, on CLI 0.2.0, whose `init` asks for the key without echoing it: until permissions exist it's available on the terminal only.
|
|
39
|
+
- A third-party plugin needs `apiVersion: 4` to load, and `actsAs: "person"` with a `login` to be offered to people.
|
|
40
|
+
|
|
3
41
|
## 0.3.0
|
|
4
42
|
|
|
5
43
|
### Minor Changes
|
package/index.ts
CHANGED
|
@@ -22,7 +22,7 @@ function require(env: ChannelRuntimeContext["env"], name: string): string {
|
|
|
22
22
|
export const googleChatChannel: ChannelPlugin = {
|
|
23
23
|
// The contract this channel is written for, as a literal: importing
|
|
24
24
|
// CHANNEL_API_VERSION would report whichever contract is installed.
|
|
25
|
-
apiVersion:
|
|
25
|
+
apiVersion: 5,
|
|
26
26
|
name: "google-chat",
|
|
27
27
|
build: (ctx) => {
|
|
28
28
|
// No subscription configured ⇒ this instance simply doesn't run Google Chat.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mercury-fw/channel-google-chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@mercury-fw/channel-types": ">=0.36.0 <1.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@mercury-fw/channel-types": "0.
|
|
37
|
+
"@mercury-fw/channel-types": "0.42.0",
|
|
38
38
|
"@mercury-fw/typescript-config": "*",
|
|
39
39
|
"@types/bun": "^1.4.2",
|
|
40
40
|
"typescript": "^6.0.3"
|