@actagent/googlechat 2026.6.2

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.
Files changed (73) hide show
  1. package/README.md +11 -0
  2. package/actagent.plugin.json +17 -0
  3. package/api.ts +4 -0
  4. package/channel-config-api.ts +2 -0
  5. package/channel-plugin-api.ts +2 -0
  6. package/config-api.ts +3 -0
  7. package/contract-api.ts +6 -0
  8. package/directory-contract-api.ts +7 -0
  9. package/doctor-contract-api.ts +2 -0
  10. package/index.ts +21 -0
  11. package/npm-shrinkwrap.json +314 -0
  12. package/package.json +88 -0
  13. package/runtime-api.ts +61 -0
  14. package/secret-contract-api.ts +6 -0
  15. package/setup-entry.ts +14 -0
  16. package/setup-plugin-api.ts +3 -0
  17. package/src/accounts.ts +185 -0
  18. package/src/actions.test.ts +312 -0
  19. package/src/actions.ts +228 -0
  20. package/src/api.ts +346 -0
  21. package/src/approval-auth.test.ts +25 -0
  22. package/src/approval-auth.ts +38 -0
  23. package/src/approval-card-actions.test.ts +113 -0
  24. package/src/approval-card-actions.ts +307 -0
  25. package/src/approval-card-click.test.ts +279 -0
  26. package/src/approval-card-click.ts +94 -0
  27. package/src/approval-handler.runtime.test.ts +388 -0
  28. package/src/approval-handler.runtime.ts +413 -0
  29. package/src/approval-native.test.ts +399 -0
  30. package/src/approval-native.ts +246 -0
  31. package/src/auth.ts +219 -0
  32. package/src/channel-base.ts +123 -0
  33. package/src/channel-config.test.ts +174 -0
  34. package/src/channel.adapters.ts +363 -0
  35. package/src/channel.deps.runtime.ts +30 -0
  36. package/src/channel.runtime.ts +18 -0
  37. package/src/channel.setup.ts +7 -0
  38. package/src/channel.test.ts +845 -0
  39. package/src/channel.ts +214 -0
  40. package/src/config-schema.test.ts +32 -0
  41. package/src/config-schema.ts +4 -0
  42. package/src/doctor-contract.test.ts +76 -0
  43. package/src/doctor-contract.ts +181 -0
  44. package/src/doctor.ts +58 -0
  45. package/src/gateway.ts +84 -0
  46. package/src/google-auth.runtime.test.ts +571 -0
  47. package/src/google-auth.runtime.ts +570 -0
  48. package/src/group-policy.ts +18 -0
  49. package/src/monitor-access.test.ts +492 -0
  50. package/src/monitor-access.ts +466 -0
  51. package/src/monitor-durable.test.ts +40 -0
  52. package/src/monitor-durable.ts +24 -0
  53. package/src/monitor-reply-delivery.ts +162 -0
  54. package/src/monitor-routing.ts +66 -0
  55. package/src/monitor-types.ts +34 -0
  56. package/src/monitor-webhook.test.ts +670 -0
  57. package/src/monitor-webhook.ts +361 -0
  58. package/src/monitor.reply-delivery.test.ts +145 -0
  59. package/src/monitor.test.ts +389 -0
  60. package/src/monitor.ts +530 -0
  61. package/src/monitor.webhook-routing.test.ts +258 -0
  62. package/src/runtime.ts +10 -0
  63. package/src/secret-contract.test.ts +61 -0
  64. package/src/secret-contract.ts +162 -0
  65. package/src/setup-core.ts +41 -0
  66. package/src/setup-surface.ts +244 -0
  67. package/src/setup.test.ts +620 -0
  68. package/src/targets.test.ts +562 -0
  69. package/src/targets.ts +67 -0
  70. package/src/types.config.ts +4 -0
  71. package/src/types.ts +139 -0
  72. package/test-api.ts +3 -0
  73. package/tsconfig.json +16 -0
package/src/types.ts ADDED
@@ -0,0 +1,139 @@
1
+ // Googlechat type declarations define plugin contracts.
2
+ export type GoogleChatSpace = {
3
+ name?: string;
4
+ displayName?: string;
5
+ type?: string;
6
+ };
7
+
8
+ export type GoogleChatUser = {
9
+ name?: string;
10
+ displayName?: string;
11
+ email?: string;
12
+ type?: string;
13
+ };
14
+
15
+ type GoogleChatThread = {
16
+ name?: string;
17
+ threadKey?: string;
18
+ };
19
+
20
+ type GoogleChatAttachmentDataRef = {
21
+ resourceName?: string;
22
+ attachmentUploadToken?: string;
23
+ };
24
+
25
+ export type GoogleChatAttachment = {
26
+ name?: string;
27
+ contentName?: string;
28
+ contentType?: string;
29
+ thumbnailUri?: string;
30
+ downloadUri?: string;
31
+ source?: string;
32
+ attachmentDataRef?: GoogleChatAttachmentDataRef;
33
+ driveDataRef?: Record<string, unknown>;
34
+ };
35
+
36
+ type GoogleChatUserMention = {
37
+ user?: GoogleChatUser;
38
+ type?: string;
39
+ };
40
+
41
+ export type GoogleChatAnnotation = {
42
+ type?: string;
43
+ startIndex?: number;
44
+ length?: number;
45
+ userMention?: GoogleChatUserMention;
46
+ slashCommand?: Record<string, unknown>;
47
+ richLinkMetadata?: Record<string, unknown>;
48
+ customEmojiMetadata?: Record<string, unknown>;
49
+ };
50
+
51
+ export type GoogleChatMessage = {
52
+ name?: string;
53
+ text?: string;
54
+ argumentText?: string;
55
+ sender?: GoogleChatUser;
56
+ thread?: GoogleChatThread;
57
+ cardsV2?: GoogleChatCardV2[];
58
+ attachment?: GoogleChatAttachment[];
59
+ annotations?: GoogleChatAnnotation[];
60
+ };
61
+
62
+ export type GoogleChatActionParameter = {
63
+ key?: string;
64
+ value?: string;
65
+ };
66
+
67
+ export type GoogleChatAction = {
68
+ actionMethodName?: string;
69
+ parameters?: GoogleChatActionParameter[];
70
+ };
71
+
72
+ export type GoogleChatEvent = {
73
+ type?: string;
74
+ eventType?: string;
75
+ eventTime?: string;
76
+ space?: GoogleChatSpace;
77
+ user?: GoogleChatUser;
78
+ message?: GoogleChatMessage;
79
+ action?: GoogleChatAction;
80
+ common?: {
81
+ invokedFunction?: string;
82
+ parameters?: Record<string, string>;
83
+ };
84
+ commonEventObject?: {
85
+ invokedFunction?: string;
86
+ parameters?: Record<string, string>;
87
+ };
88
+ };
89
+
90
+ export type GoogleChatReaction = {
91
+ name?: string;
92
+ user?: GoogleChatUser;
93
+ emoji?: { unicode?: string };
94
+ };
95
+
96
+ export type GoogleChatTextParagraphWidget = {
97
+ textParagraph: {
98
+ text: string;
99
+ };
100
+ };
101
+
102
+ export type GoogleChatButtonWidget = {
103
+ buttonList: {
104
+ buttons: Array<{
105
+ text: string;
106
+ onClick: {
107
+ action: {
108
+ function: string;
109
+ parameters?: GoogleChatActionParameter[];
110
+ loadIndicator?: "SPINNER" | "NONE";
111
+ };
112
+ };
113
+ }>;
114
+ };
115
+ };
116
+
117
+ export type GoogleChatDividerWidget = { divider: Record<string, never> };
118
+
119
+ export type GoogleChatWidget =
120
+ | GoogleChatTextParagraphWidget
121
+ | GoogleChatButtonWidget
122
+ | GoogleChatDividerWidget;
123
+
124
+ export type GoogleChatCardV2 = {
125
+ cardId?: string;
126
+ card: {
127
+ header?: {
128
+ title?: string;
129
+ subtitle?: string;
130
+ imageType?: "SQUARE" | "CIRCLE";
131
+ };
132
+ sections?: Array<{
133
+ header?: string;
134
+ collapsible?: boolean;
135
+ uncollapsibleWidgetsCount?: number;
136
+ widgets?: GoogleChatWidget[];
137
+ }>;
138
+ };
139
+ };
package/test-api.ts ADDED
@@ -0,0 +1,3 @@
1
+ // Googlechat API module exposes the plugin public contract.
2
+ export { googlechatPlugin } from "./src/channel.js";
3
+ export { setGoogleChatRuntime } from "./src/runtime.js";
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "extends": "../tsconfig.package-boundary.base.json",
3
+ "compilerOptions": {
4
+ "rootDir": "."
5
+ },
6
+ "include": ["./*.ts", "./src/**/*.ts"],
7
+ "exclude": [
8
+ "./**/*.test.ts",
9
+ "./dist/**",
10
+ "./node_modules/**",
11
+ "./src/test-support/**",
12
+ "./src/**/*test-helpers.ts",
13
+ "./src/**/*test-harness.ts",
14
+ "./src/**/*test-support.ts"
15
+ ]
16
+ }