@assemblyline-agents/google-drive 5.0.10 → 6.0.1

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
@@ -2,15 +2,15 @@
2
2
 
3
3
  Official Assembly Line Google Drive connection plugin.
4
4
 
5
- It exposes file search, downloads, exports, uploads, organization, and sharing through a reviewed direct Google Drive REST API connection. Drive authorization is stored independently from Gmail and Google Calendar. The package exports `defineGoogleDriveConnection(options)`.
5
+ The selected plugin exposes file search, downloads, exports, uploads, organization, and sharing through a reviewed direct REST connection. Drive authorization is independent from Gmail and Google Calendar.
6
6
 
7
7
  ## Install
8
8
 
9
9
  ```sh
10
- npm install @assemblyline-agents/google-drive
10
+ assembly-line add google-drive agent
11
11
  ```
12
12
 
13
- Create a Google OAuth web client, enable the Google Drive API, and set `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET`. Optionally set `GOOGLE_REDIRECT_URI` or `GOOGLE_DRIVE_API_BASE_URL`. Assembly Line runs Authorization Code + PKCE, requests offline access, and stores the refreshable grant host-side. Downloads and exports return byte-preserving base64; content uploads accept base64 plus an explicit media type. Set `access: "approval-required"` if uploads, moves, renames, sharing, and deletes should pause for approval, or `access: "read-only"` to request `drive.readonly` and omit mutations.
13
+ Create a Google OAuth web client, enable the Google Drive API, and set `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET`. Optionally set `GOOGLE_REDIRECT_URI` or `GOOGLE_DRIVE_API_BASE_URL`. Assembly Line runs Authorization Code + PKCE, requests offline access, and stores the refreshable grant host-side. Downloads and exports return byte-preserving base64; content uploads accept base64 plus an explicit media type. Gate or remove named actions through `plugins.google-drive.connections.google-drive.approval` or `disable`.
14
14
 
15
15
  ## Part of Assembly Line
16
16
 
@@ -0,0 +1,93 @@
1
+ {
2
+ "kind": "google-drive",
3
+ "role": "connection",
4
+ "packageName": "@assemblyline-agents/google-drive",
5
+ "helper": "defineGoogleDriveConnection",
6
+ "protocol": "http",
7
+ "provider": "google_drive",
8
+ "description": "Google Drive file search, downloads, uploads, organization, and sharing through the Google Drive REST API.",
9
+ "defaultBaseUrl": "https://www.googleapis.com",
10
+ "baseUrlEnv": "GOOGLE_DRIVE_API_BASE_URL",
11
+ "capabilities": [
12
+ "http-api",
13
+ "oauth",
14
+ "pkce",
15
+ "refresh-token",
16
+ "binary-transfer",
17
+ "live-tools"
18
+ ],
19
+ "scopes": [
20
+ "https://www.googleapis.com/auth/drive.readonly",
21
+ "https://www.googleapis.com/auth/drive"
22
+ ],
23
+ "subject": "user",
24
+ "tools": {
25
+ "allow": [
26
+ "google_drive_get_about",
27
+ "google_drive_list_shared_drives",
28
+ "google_drive_get_shared_drive",
29
+ "google_drive_list_files",
30
+ "google_drive_get_file",
31
+ "google_drive_download_file",
32
+ "google_drive_export_file",
33
+ "google_drive_list_permissions",
34
+ "google_drive_get_permission",
35
+ "google_drive_create_file",
36
+ "google_drive_update_file",
37
+ "google_drive_upload_file_content",
38
+ "google_drive_copy_file",
39
+ "google_drive_delete_file",
40
+ "google_drive_create_permission",
41
+ "google_drive_update_permission",
42
+ "google_drive_delete_permission"
43
+ ]
44
+ },
45
+ "readToolPatterns": [
46
+ "google_drive_get_about",
47
+ "google_drive_list_shared_drives",
48
+ "google_drive_get_shared_drive",
49
+ "google_drive_list_files",
50
+ "google_drive_get_file",
51
+ "google_drive_download_file",
52
+ "google_drive_export_file",
53
+ "google_drive_list_permissions",
54
+ "google_drive_get_permission"
55
+ ],
56
+ "writeToolPatterns": [
57
+ "google_drive_create_file",
58
+ "google_drive_update_file",
59
+ "google_drive_upload_file_content",
60
+ "google_drive_copy_file",
61
+ "google_drive_delete_file",
62
+ "google_drive_create_permission",
63
+ "google_drive_update_permission",
64
+ "google_drive_delete_permission"
65
+ ],
66
+ "eventCatalog": [
67
+ "drive.changed"
68
+ ],
69
+ "defaultEvents": [
70
+ "drive.changed"
71
+ ],
72
+ "eventMode": "watch",
73
+ "eventScope": "principal",
74
+ "setup": [
75
+ {
76
+ "kind": "connection",
77
+ "name": "google-drive-oauth-configuration",
78
+ "required": true,
79
+ "message": "Create a Google OAuth web client, enable the Google Drive API, set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET, and register the Assembly Line connection callback URL. Drive authorization is stored as its own connection grant."
80
+ }
81
+ ],
82
+ "requiredConfig": [
83
+ "GOOGLE_CLIENT_ID"
84
+ ],
85
+ "optionalConfig": [
86
+ "GOOGLE_REDIRECT_URI",
87
+ "GOOGLE_DRIVE_API_BASE_URL"
88
+ ],
89
+ "requiredCredentials": [
90
+ "GOOGLE_CLIENT_SECRET"
91
+ ],
92
+ "optionalCredentials": []
93
+ }
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ "connections": {
3
+ "google-drive": {
4
+ "contract": "./ai.assemblyline/connections/google-drive.json",
5
+ "definition": "@assemblyline-agents/google-drive",
6
+ "factory": "defineGoogleDriveConnection"
7
+ }
8
+ }
9
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACpC,MAAM,2BAA2B,CAAC;AAOnC,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CAAC,8BAA8B,EAAE,MAAM,GAAG,YAAY,CAAC;IAC/G,IAAI,CAAC,EAAE,wBAAwB,GAAG,KAAK,CAAC;CACzC;AAED,wBAAgB,2BAA2B,CAAC,OAAO,GAAE,4BAAiC,oIAUrF;AAED,eAAO,MAAM,kBAAkB,kDAA0C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACpC,MAAM,2BAA2B,CAAC;AAOnC,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CAAC,8BAA8B,EAAE,MAAM,GAAG,YAAY,CAAC;IAC/G,IAAI,CAAC,EAAE,wBAAwB,GAAG,KAAK,CAAC;CACzC;AAED,wBAAgB,2BAA2B,CAAC,OAAO,GAAE,4BAAiC,oIAUrF;AAED,eAAO,MAAM,kBAAkB,kDAA0C,CAAC"}
package/dist/index.js CHANGED
@@ -1,8 +1,9 @@
1
- import { connectionPluginMetadata, defineConnectionPluginEvents, defineHttpApiPluginConnection, definePlugin } from "@assemblyline-agents/core";
1
+ import connectionContract_google_drive from "../ai.assemblyline/connections/google-drive.json" with { type: "json" };
2
+ import { defineConnectionPluginEvents, defineHttpApiPluginConnection, definePlugin } from "@assemblyline-agents/core";
2
3
  import { googleDriveOAuth } from "./auth.js";
3
4
  import { googleDriveEvents } from "./events.js";
4
5
  import { GOOGLE_DRIVE_OPERATIONS } from "./operations.js";
5
- const PLUGIN = connectionPluginMetadata("google-drive");
6
+ const PLUGIN = connectionContract_google_drive;
6
7
  export function defineGoogleDriveConnection(options = {}) {
7
8
  const { auth, ...connection } = options;
8
9
  const definition = defineHttpApiPluginConnection(PLUGIN, {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,YAAY,EAGb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,MAAM,MAAM,GAAG,wBAAwB,CAAC,cAAc,CAAE,CAAC;AAMzD,MAAM,UAAU,2BAA2B,CAAC,UAAwC,EAAE;IACpF,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE,GAAG,OAAO,CAAC;IACxC,MAAM,UAAU,GAAG,6BAA6B,CAAC,MAAM,EAAE;QACvD,GAAG,UAAU;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C;IACH,MAAM,MAAM,GAAG,4BAA4B,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACvF,IAAI,MAAM;QAAE,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC;IACvC,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assemblyline-agents/google-drive",
3
- "version": "5.0.10",
3
+ "version": "6.0.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -9,11 +9,13 @@
9
9
  }
10
10
  },
11
11
  "dependencies": {
12
- "@assemblyline-agents/core": "5.0.10"
12
+ "@assemblyline-agents/core": "6.0.1"
13
13
  },
14
14
  "description": "Official Assembly Line direct Google Drive API connection plugin.",
15
15
  "files": [
16
- "dist"
16
+ "dist",
17
+ "plugin.json",
18
+ "ai.assemblyline"
17
19
  ],
18
20
  "engines": {
19
21
  "node": ">=22.19.0"
package/plugin.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
+ "name": "google-drive",
4
+ "version": "6.0.1",
5
+ "description": "Official Assembly Line direct Google Drive API connection plugin.",
6
+ "extensions": {
7
+ "ai.assemblyline": {
8
+ "entry": "./ai.assemblyline/index.cjs"
9
+ }
10
+ }
11
+ }