@hostwebhook/node-types 1.52.17 → 1.52.18
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/dist/docs-toolkit.d.ts +42 -0
- package/dist/docs-toolkit.js +100 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -1
- package/dist/sheets-toolkit.d.ts +10 -3
- package/dist/sheets-toolkit.js +10 -3
- package/package.json +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Docs AI Toolkit — las herramientas que un docsAction expone cuando
|
|
3
|
+
* `aiEnabled` está encendido.
|
|
4
|
+
*
|
|
5
|
+
* Se escribe **una sola vez**, aquí, y la importan la api
|
|
6
|
+
* (`mcp-servers/toolkit-specs.ts`) y el dashboard (`NodeAsToolPicker`,
|
|
7
|
+
* `DocsActionDetail`). Es el sexto toolkit que vive en el paquete —van Gmail,
|
|
8
|
+
* native email, Calendar, Drive, Telegram y Sheets—; los que siguen con copia a
|
|
9
|
+
* mano en los dos repos son WhatsApp, Discord, Slack y Contacts, y de ese
|
|
10
|
+
* reparto salió que Contacts anunciara 15 herramientas y expusiera una.
|
|
11
|
+
*
|
|
12
|
+
* La forma es la que ya consume `toolkitSpecToMcpTool` en la api, para poder
|
|
13
|
+
* usarse sin adaptador. Los textos van en inglés porque los lee el modelo y
|
|
14
|
+
* quien mire la lista de herramientas del servidor MCP.
|
|
15
|
+
*/
|
|
16
|
+
import type { DocsOperation } from './docs-operations';
|
|
17
|
+
export interface DocsToolkitParameter {
|
|
18
|
+
name: string;
|
|
19
|
+
/** El esquema MCP sólo admite estos tres. */
|
|
20
|
+
type: 'string' | 'number' | 'boolean';
|
|
21
|
+
description: string;
|
|
22
|
+
required: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface DocsToolkitSpec {
|
|
25
|
+
operation: DocsOperation;
|
|
26
|
+
label: string;
|
|
27
|
+
toolName: string;
|
|
28
|
+
description: string;
|
|
29
|
+
parameters: DocsToolkitParameter[];
|
|
30
|
+
/** Escribe en el documento del usuario. Lo usa la confirmación previa del AI Node. */
|
|
31
|
+
destructive?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare const DOCS_TOOLKIT_SPECS: DocsToolkitSpec[];
|
|
34
|
+
/** Las herramientas por nombre, para despachar una llamada del modelo. */
|
|
35
|
+
export declare const DOCS_TOOLKIT_BY_TOOL_NAME: Record<string, DocsToolkitSpec>;
|
|
36
|
+
/**
|
|
37
|
+
* El parámetro que el nodo puede rellenar por defecto. Se exporta para que la
|
|
38
|
+
* api y el dashboard no vuelvan a escribir la lista a mano — `create_doc` no
|
|
39
|
+
* lo declara y por eso se queda fuera de la inyección sin necesidad de
|
|
40
|
+
* excepciones.
|
|
41
|
+
*/
|
|
42
|
+
export declare const DOCS_TOOLKIT_DEFAULTABLE: readonly ["documentId"];
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Google Docs AI Toolkit — las herramientas que un docsAction expone cuando
|
|
4
|
+
* `aiEnabled` está encendido.
|
|
5
|
+
*
|
|
6
|
+
* Se escribe **una sola vez**, aquí, y la importan la api
|
|
7
|
+
* (`mcp-servers/toolkit-specs.ts`) y el dashboard (`NodeAsToolPicker`,
|
|
8
|
+
* `DocsActionDetail`). Es el sexto toolkit que vive en el paquete —van Gmail,
|
|
9
|
+
* native email, Calendar, Drive, Telegram y Sheets—; los que siguen con copia a
|
|
10
|
+
* mano en los dos repos son WhatsApp, Discord, Slack y Contacts, y de ese
|
|
11
|
+
* reparto salió que Contacts anunciara 15 herramientas y expusiera una.
|
|
12
|
+
*
|
|
13
|
+
* La forma es la que ya consume `toolkitSpecToMcpTool` en la api, para poder
|
|
14
|
+
* usarse sin adaptador. Los textos van en inglés porque los lee el modelo y
|
|
15
|
+
* quien mire la lista de herramientas del servidor MCP.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.DOCS_TOOLKIT_DEFAULTABLE = exports.DOCS_TOOLKIT_BY_TOOL_NAME = exports.DOCS_TOOLKIT_SPECS = void 0;
|
|
19
|
+
const p = (name, description, required = true, type = 'string') => ({ name, type, description, required });
|
|
20
|
+
/*
|
|
21
|
+
* El documento del nodo va como **defecto** y el modelo puede cambiarlo — la
|
|
22
|
+
* misma decisión y la misma maquinaria que la hoja de Sheets:
|
|
23
|
+
* `toolkitSpecToMcpTool(spec, nombre, { documentId })` lo saca de `required`
|
|
24
|
+
* **y le cuenta el valor al modelo** en la descripción. Las dos cosas o
|
|
25
|
+
* ninguna: mientras el esquema diga `required`, el LLM siempre lo rellena y el
|
|
26
|
+
* documento configurado no se usaría jamás.
|
|
27
|
+
*
|
|
28
|
+
* Por eso aquí se declara `required: true`: lo es para la API de Google, y es
|
|
29
|
+
* el defecto del nodo quien lo vuelve opcional, nodo por nodo.
|
|
30
|
+
*
|
|
31
|
+
* `create_doc` es el único que NO lo declara —todavía no hay documento al que
|
|
32
|
+
* apuntar— y su nombre de campo es `title`. Si se llamara `documentId`, la
|
|
33
|
+
* inyección de defectos se lo rellenaría con el documento del nodo y el
|
|
34
|
+
* documento nuevo nacería con el id del viejo por título.
|
|
35
|
+
*/
|
|
36
|
+
const documento = () => p('documentId', 'Id of the Google Docs document — the long chunk of its URL, between /d/ and /edit.');
|
|
37
|
+
exports.DOCS_TOOLKIT_SPECS = [
|
|
38
|
+
{
|
|
39
|
+
operation: 'readDoc',
|
|
40
|
+
label: 'Read document',
|
|
41
|
+
toolName: 'read_doc',
|
|
42
|
+
description: 'Read the whole document as plain text. Use it before editing when you do not know what the document already says — replace_text and append_text act blindly otherwise.',
|
|
43
|
+
parameters: [documento()],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
operation: 'createDoc',
|
|
47
|
+
label: 'Create document',
|
|
48
|
+
toolName: 'create_doc',
|
|
49
|
+
description: 'Create a new Google Docs document and return its id. The id it returns is what the other tools take as documentId.',
|
|
50
|
+
parameters: [
|
|
51
|
+
p('title', 'Name of the new document.'),
|
|
52
|
+
p('content', 'Initial body, as HTML. Basic tags work (<p>, <b>, <i>, <ul>, <li>, <h1>…). Plain text is fine too. Leave it out for an empty document.', false),
|
|
53
|
+
],
|
|
54
|
+
destructive: true,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
operation: 'appendText',
|
|
58
|
+
label: 'Append text',
|
|
59
|
+
toolName: 'append_text',
|
|
60
|
+
description: 'Add content at the END of the document. It never replaces what is already there, so it is the safe way to add a paragraph, a note or a log line.',
|
|
61
|
+
parameters: [
|
|
62
|
+
p('content', 'What to add, as HTML. Basic tags work (<p>, <b>, <i>, <ul>, <li>, <h1>…). Plain text is fine too.'),
|
|
63
|
+
documento(),
|
|
64
|
+
],
|
|
65
|
+
destructive: true,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
operation: 'replaceText',
|
|
69
|
+
label: 'Replace text',
|
|
70
|
+
toolName: 'replace_text',
|
|
71
|
+
description: 'Find every occurrence of a piece of text and swap it for another. It matches literally and it is case-sensitive; a search string that appears nowhere changes nothing and is not an error.',
|
|
72
|
+
parameters: [
|
|
73
|
+
p('searchText', 'Exact text to look for. Every occurrence is replaced, not just the first.'),
|
|
74
|
+
p('replaceWith', 'Text to put in its place. An empty string deletes the matches.'),
|
|
75
|
+
documento(),
|
|
76
|
+
],
|
|
77
|
+
destructive: true,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
operation: 'insertTable',
|
|
81
|
+
label: 'Insert table',
|
|
82
|
+
toolName: 'insert_table',
|
|
83
|
+
description: 'Insert an empty table at the end of the document. It creates the grid only — fill the cells afterwards with replace_text, or build the content as HTML and use append_text instead.',
|
|
84
|
+
parameters: [
|
|
85
|
+
p('rows', 'Number of rows, including the header row if you want one.', true, 'number'),
|
|
86
|
+
p('cols', 'Number of columns.', true, 'number'),
|
|
87
|
+
documento(),
|
|
88
|
+
],
|
|
89
|
+
destructive: true,
|
|
90
|
+
},
|
|
91
|
+
];
|
|
92
|
+
/** Las herramientas por nombre, para despachar una llamada del modelo. */
|
|
93
|
+
exports.DOCS_TOOLKIT_BY_TOOL_NAME = Object.fromEntries(exports.DOCS_TOOLKIT_SPECS.map((s) => [s.toolName, s]));
|
|
94
|
+
/**
|
|
95
|
+
* El parámetro que el nodo puede rellenar por defecto. Se exporta para que la
|
|
96
|
+
* api y el dashboard no vuelvan a escribir la lista a mano — `create_doc` no
|
|
97
|
+
* lo declara y por eso se queda fuera de la inyección sin necesidad de
|
|
98
|
+
* excepciones.
|
|
99
|
+
*/
|
|
100
|
+
exports.DOCS_TOOLKIT_DEFAULTABLE = ['documentId'];
|
package/dist/index.d.ts
CHANGED
|
@@ -37,5 +37,7 @@ export { MONGO_OPERATIONS, MONGO_OPERATION_SPECS, isMongoOperation, } from './mo
|
|
|
37
37
|
export type { MongoOperation, MongoParamType, MongoParamSpec, MongoOperationSpec, } from './mongo-operations';
|
|
38
38
|
export { DOCS_OPERATIONS, DOCS_OPERATION_SPECS, isDocsOperation, } from './docs-operations';
|
|
39
39
|
export type { DocsOperation, DocsParamType, DocsParamSlot, DocsParamSpec, DocsOperationSpec, } from './docs-operations';
|
|
40
|
+
export { DOCS_TOOLKIT_SPECS, DOCS_TOOLKIT_BY_TOOL_NAME, DOCS_TOOLKIT_DEFAULTABLE, } from './docs-toolkit';
|
|
41
|
+
export type { DocsToolkitSpec, DocsToolkitParameter, } from './docs-toolkit';
|
|
40
42
|
export type { CredentialTypeRegistration, CredentialType } from './credentials';
|
|
41
43
|
export { CREDENTIAL_TYPES, CREDENTIAL_TYPE_VALUES, credentialTypeValues, getCredentialType, isCredentialType, } from './credentials';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TELEGRAM_TOOLKIT_SPECS = exports.isTelegramOperation = exports.TELEGRAM_OPERATION_SPECS = exports.TELEGRAM_OPERATIONS = exports.DRIVE_TOOLKIT_BY_TOOL_NAME = exports.DRIVE_TOOLKIT_SPECS = exports.isDriveOperation = exports.DRIVE_OPERATION_SPECS = exports.DRIVE_OPERATIONS = exports.GOOGLE_CALENDAR_TOOLKIT_BY_TOOL_NAME = exports.GOOGLE_CALENDAR_TOOLKIT_SPECS = exports.isGoogleCalendarOperation = exports.GOOGLE_CALENDAR_OPERATION_SPECS = exports.GOOGLE_CALENDAR_OPERATIONS = exports.isGmailOperation = exports.resolveGmailSendFields = exports.GMAIL_SEND_LEGACY_FIELDS = exports.NATIVE_EMAIL_TOOLKIT_BY_TOOL_NAME = exports.GMAIL_TOOLKIT_BY_TOOL_NAME = exports.NATIVE_EMAIL_TOOLKIT_SPECS = exports.GMAIL_SEND_AND_WAIT_TOOL_SPEC = exports.GMAIL_ALL_TOOLKIT_SPECS = exports.GMAIL_TOOLKIT_SPECS = exports.GMAIL_TOOLKIT_OPERATIONS = exports.GMAIL_DROPDOWN_OPERATIONS = exports.GMAIL_OPERATION_GROUPS = exports.GMAIL_OPERATION_SPECS = exports.GMAIL_OPERATIONS = exports.NODE_TYPE_TO_PREFIX = exports.PREFIX_TO_NODE_TYPE = exports.NODE_STATE_KEYS = exports.NODE_COLORS = exports.NODE_DETAIL_PATHS = exports.getNodeRegistryEntry = exports.NODE_REGISTRY = exports.getNodeDispatchConfig = exports.getAllNodeCollections = exports.NODE_DISPATCH = exports.resolveNodeId = exports.PREFIX_TO_TYPE = exports.NODE_UI = exports.ALL_NODE_TYPES = exports.isNodeType = exports.isTerminal = exports.canSendToNodes = exports.canReceiveFromNodes = exports.canReceiveFrom = exports.NODE_CONNECTIONS = exports.iterableMeta = exports.singleMeta = void 0;
|
|
4
|
-
exports.isCredentialType = exports.getCredentialType = exports.credentialTypeValues = exports.CREDENTIAL_TYPE_VALUES = exports.CREDENTIAL_TYPES = exports.isDocsOperation = exports.DOCS_OPERATION_SPECS = exports.DOCS_OPERATIONS = exports.isMongoOperation = exports.MONGO_OPERATION_SPECS = exports.MONGO_OPERATIONS = exports.isPostgresOperation = exports.POSTGRES_OPERATION_SPECS = exports.POSTGRES_MODES = exports.POSTGRES_OPERATIONS = exports.isGoogleContactsOperation = exports.GOOGLE_CONTACTS_DEFAULT_PERSON_FIELDS = exports.GOOGLE_CONTACTS_OPERATION_GROUPS = exports.GOOGLE_CONTACTS_OPERATION_SPECS = exports.GOOGLE_CONTACTS_OPERATIONS_V2 = exports.GOOGLE_CONTACTS_OPERATIONS_V1 = exports.GOOGLE_CONTACTS_OPERATIONS = exports.SHEETS_TOOLKIT_DEFAULTABLE = exports.SHEETS_TOOLKIT_BY_TOOL_NAME = exports.SHEETS_TOOLKIT_SPECS = exports.isSheetsOperation = exports.SHEETS_OPERATION_SPECS = exports.SHEETS_OPERATIONS = exports.isSlackOperation = exports.SLACK_OPERATION_SPECS = exports.SLACK_OPERATIONS = exports.isDiscordOperation = exports.DISCORD_OPERATION_SPECS = exports.DISCORD_OPERATIONS = exports.isWhatsAppOperation = exports.WHATSAPP_OPERATIONS = exports.TELEGRAM_TOOLKIT_BY_TOOL_NAME = void 0;
|
|
4
|
+
exports.isCredentialType = exports.getCredentialType = exports.credentialTypeValues = exports.CREDENTIAL_TYPE_VALUES = exports.CREDENTIAL_TYPES = exports.DOCS_TOOLKIT_DEFAULTABLE = exports.DOCS_TOOLKIT_BY_TOOL_NAME = exports.DOCS_TOOLKIT_SPECS = exports.isDocsOperation = exports.DOCS_OPERATION_SPECS = exports.DOCS_OPERATIONS = exports.isMongoOperation = exports.MONGO_OPERATION_SPECS = exports.MONGO_OPERATIONS = exports.isPostgresOperation = exports.POSTGRES_OPERATION_SPECS = exports.POSTGRES_MODES = exports.POSTGRES_OPERATIONS = exports.isGoogleContactsOperation = exports.GOOGLE_CONTACTS_DEFAULT_PERSON_FIELDS = exports.GOOGLE_CONTACTS_OPERATION_GROUPS = exports.GOOGLE_CONTACTS_OPERATION_SPECS = exports.GOOGLE_CONTACTS_OPERATIONS_V2 = exports.GOOGLE_CONTACTS_OPERATIONS_V1 = exports.GOOGLE_CONTACTS_OPERATIONS = exports.SHEETS_TOOLKIT_DEFAULTABLE = exports.SHEETS_TOOLKIT_BY_TOOL_NAME = exports.SHEETS_TOOLKIT_SPECS = exports.isSheetsOperation = exports.SHEETS_OPERATION_SPECS = exports.SHEETS_OPERATIONS = exports.isSlackOperation = exports.SLACK_OPERATION_SPECS = exports.SLACK_OPERATIONS = exports.isDiscordOperation = exports.DISCORD_OPERATION_SPECS = exports.DISCORD_OPERATIONS = exports.isWhatsAppOperation = exports.WHATSAPP_OPERATIONS = exports.TELEGRAM_TOOLKIT_BY_TOOL_NAME = void 0;
|
|
5
5
|
var types_1 = require("./types");
|
|
6
6
|
Object.defineProperty(exports, "singleMeta", { enumerable: true, get: function () { return types_1.singleMeta; } });
|
|
7
7
|
Object.defineProperty(exports, "iterableMeta", { enumerable: true, get: function () { return types_1.iterableMeta; } });
|
|
@@ -109,6 +109,10 @@ var docs_operations_1 = require("./docs-operations");
|
|
|
109
109
|
Object.defineProperty(exports, "DOCS_OPERATIONS", { enumerable: true, get: function () { return docs_operations_1.DOCS_OPERATIONS; } });
|
|
110
110
|
Object.defineProperty(exports, "DOCS_OPERATION_SPECS", { enumerable: true, get: function () { return docs_operations_1.DOCS_OPERATION_SPECS; } });
|
|
111
111
|
Object.defineProperty(exports, "isDocsOperation", { enumerable: true, get: function () { return docs_operations_1.isDocsOperation; } });
|
|
112
|
+
var docs_toolkit_1 = require("./docs-toolkit");
|
|
113
|
+
Object.defineProperty(exports, "DOCS_TOOLKIT_SPECS", { enumerable: true, get: function () { return docs_toolkit_1.DOCS_TOOLKIT_SPECS; } });
|
|
114
|
+
Object.defineProperty(exports, "DOCS_TOOLKIT_BY_TOOL_NAME", { enumerable: true, get: function () { return docs_toolkit_1.DOCS_TOOLKIT_BY_TOOL_NAME; } });
|
|
115
|
+
Object.defineProperty(exports, "DOCS_TOOLKIT_DEFAULTABLE", { enumerable: true, get: function () { return docs_toolkit_1.DOCS_TOOLKIT_DEFAULTABLE; } });
|
|
112
116
|
var credentials_1 = require("./credentials");
|
|
113
117
|
Object.defineProperty(exports, "CREDENTIAL_TYPES", { enumerable: true, get: function () { return credentials_1.CREDENTIAL_TYPES; } });
|
|
114
118
|
Object.defineProperty(exports, "CREDENTIAL_TYPE_VALUES", { enumerable: true, get: function () { return credentials_1.CREDENTIAL_TYPE_VALUES; } });
|
package/dist/sheets-toolkit.d.ts
CHANGED
|
@@ -2,11 +2,18 @@
|
|
|
2
2
|
* Google Sheets AI Toolkit — las herramientas que un sheetsAction expone
|
|
3
3
|
* cuando `aiEnabled` está encendido.
|
|
4
4
|
*
|
|
5
|
-
* **Se escribe una sola vez.**
|
|
6
|
-
*
|
|
5
|
+
* **Se escribe una sola vez.**
|
|
6
|
+
*
|
|
7
|
+
* Cuando esto se escribió, las especificaciones de los demás nodos vivían dos
|
|
8
|
+
* veces —una copia en el dashboard y otra en
|
|
7
9
|
* `api/src/mcp-servers/toolkit-specs.ts`, las dos a mano y sin nada que las
|
|
8
10
|
* ate— y de ahí salió que Contacts anunciara 15 herramientas y expusiera una.
|
|
9
|
-
*
|
|
11
|
+
*
|
|
12
|
+
* Ya no es así, y este comentario decía lo contrario hasta 2026-08-12: hoy en
|
|
13
|
+
* el paquete viven **siete** toolkits —Gmail, native email, Calendar, Drive,
|
|
14
|
+
* Telegram, Sheets y Docs— y los que siguen duplicados a mano son WhatsApp,
|
|
15
|
+
* Discord, Slack y Contacts. El paquete es el sitio por defecto para uno
|
|
16
|
+
* nuevo; los cuatro rezagados están pendientes de migrar.
|
|
10
17
|
*
|
|
11
18
|
* La forma es la que ya consume `toolkitSpecToMcpTool` en la api, para que
|
|
12
19
|
* pueda usarse sin adaptador. Los textos van en inglés porque los lee el modelo
|
package/dist/sheets-toolkit.js
CHANGED
|
@@ -3,11 +3,18 @@
|
|
|
3
3
|
* Google Sheets AI Toolkit — las herramientas que un sheetsAction expone
|
|
4
4
|
* cuando `aiEnabled` está encendido.
|
|
5
5
|
*
|
|
6
|
-
* **Se escribe una sola vez.**
|
|
7
|
-
*
|
|
6
|
+
* **Se escribe una sola vez.**
|
|
7
|
+
*
|
|
8
|
+
* Cuando esto se escribió, las especificaciones de los demás nodos vivían dos
|
|
9
|
+
* veces —una copia en el dashboard y otra en
|
|
8
10
|
* `api/src/mcp-servers/toolkit-specs.ts`, las dos a mano y sin nada que las
|
|
9
11
|
* ate— y de ahí salió que Contacts anunciara 15 herramientas y expusiera una.
|
|
10
|
-
*
|
|
12
|
+
*
|
|
13
|
+
* Ya no es así, y este comentario decía lo contrario hasta 2026-08-12: hoy en
|
|
14
|
+
* el paquete viven **siete** toolkits —Gmail, native email, Calendar, Drive,
|
|
15
|
+
* Telegram, Sheets y Docs— y los que siguen duplicados a mano son WhatsApp,
|
|
16
|
+
* Discord, Slack y Contacts. El paquete es el sitio por defecto para uno
|
|
17
|
+
* nuevo; los cuatro rezagados están pendientes de migrar.
|
|
11
18
|
*
|
|
12
19
|
* La forma es la que ya consume `toolkitSpecToMcpTool` en la api, para que
|
|
13
20
|
* pueda usarse sin adaptador. Los textos van en inglés porque los lee el modelo
|
package/package.json
CHANGED