@mercury-fw/channel-google-chat 0.1.3 → 0.2.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 +11 -0
- package/dist/index.d.ts +1 -1
- package/google-chat-provider.ts +5 -2
- package/index.ts +4 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @mercury-fw/channel-google-chat
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8bed46b: - A turn carries a `Principal` (the person behind it and the provider that vouched for them) instead of the opaque `userId` and `wikiUserId`; the core derives every per-person id from it.
|
|
8
|
+
- Episodic memory follows the principal, not the channel: a session is captured whenever a provider vouched for the person. Google Chat keeps the ids it had; the terminal and the HTTP channel (until it authenticates its callers) send a principal nobody vouched for, so they stay out of episodic memory as before.
|
|
9
|
+
- The HTTP channel accepts a `conversationId` on `/turn` and `/confirm` only made of letters, digits, `-` and `_`, up to 128 characters once trimmed, and answers `400` otherwise: a client-chosen id can no longer reach another user's wiki notes, forge log lines or break the turn. An existing HTTP conversation whose id has other characters can still be read with `/conversation`, but not continued. `/conversation` keeps opening any session key `/conversations` lists, whatever channel it came from.
|
|
10
|
+
- The model's wiki read tools refuse a per-user id that isn't one path segment, as writes already did.
|
|
11
|
+
- `CHANNEL_API_VERSION` is 2: a channel written for version 1 is refused at load.
|
|
12
|
+
- The first-party channels declare their channel api version as a literal, so an older channel can't claim a newer contract it doesn't implement.
|
|
13
|
+
|
|
3
14
|
## 0.1.3
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
* missing is a misconfiguration: `build()` throws and the loader skips this
|
|
8
8
|
* channel fail-soft, leaving the rest of Mercury up.
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
10
|
+
import type { ChannelPlugin } from "@mercury-fw/channel-types";
|
|
11
11
|
export declare const googleChatChannel: ChannelPlugin;
|
package/google-chat-provider.ts
CHANGED
|
@@ -505,8 +505,11 @@ export function createGoogleChatProvider(deps: GoogleChatProviderDeps): GoogleCh
|
|
|
505
505
|
multiUser: !event.isDirectMessage,
|
|
506
506
|
text: markedInput,
|
|
507
507
|
sessionKey,
|
|
508
|
-
|
|
509
|
-
|
|
508
|
+
principal: {
|
|
509
|
+
id: event.sender,
|
|
510
|
+
provider: "google-chat",
|
|
511
|
+
...(event.senderDisplayName ? { displayName: event.senderDisplayName } : {}),
|
|
512
|
+
},
|
|
510
513
|
logPrefix: `[chat:${event.space}:${event.sender}] `,
|
|
511
514
|
},
|
|
512
515
|
sink,
|
package/index.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* missing is a misconfiguration: `build()` throws and the loader skips this
|
|
8
8
|
* channel fail-soft, leaving the rest of Mercury up.
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
10
|
+
import type { ChannelPlugin, ChannelRuntimeContext } from "@mercury-fw/channel-types";
|
|
11
11
|
import { createGoogleChatProvider } from "./google-chat-provider.ts";
|
|
12
12
|
|
|
13
13
|
/** Reads a required env var, failing loudly (caught by the channel loader) instead of silently degrading. */
|
|
@@ -20,7 +20,9 @@ function require(env: ChannelRuntimeContext["env"], name: string): string {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export const googleChatChannel: ChannelPlugin = {
|
|
23
|
-
|
|
23
|
+
// The contract this channel is written for, as a literal: importing
|
|
24
|
+
// CHANNEL_API_VERSION would report whichever contract is installed.
|
|
25
|
+
apiVersion: 2,
|
|
24
26
|
name: "google-chat",
|
|
25
27
|
build: (ctx) => {
|
|
26
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.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"@google-cloud/pubsub": "^5.3.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@mercury-fw/channel-types": ">=0.
|
|
34
|
+
"@mercury-fw/channel-types": ">=0.34.0 <1.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@mercury-fw/channel-types": "0.
|
|
37
|
+
"@mercury-fw/channel-types": "0.34.0",
|
|
38
38
|
"@mercury-fw/typescript-config": "*",
|
|
39
39
|
"@types/bun": "^1.4.2",
|
|
40
40
|
"typescript": "^6.0.3"
|