@keystrokehq/textrazor 0.1.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/README.md +17 -0
- package/dist/action.cjs +21 -0
- package/dist/action.cjs.map +1 -0
- package/dist/action.mjs +21 -0
- package/dist/action.mjs.map +1 -0
- package/dist/actions/account-info.cjs +22 -0
- package/dist/actions/account-info.cjs.map +1 -0
- package/dist/actions/account-info.d.cts +9 -0
- package/dist/actions/account-info.d.cts.map +1 -0
- package/dist/actions/account-info.d.mts +9 -0
- package/dist/actions/account-info.d.mts.map +1 -0
- package/dist/actions/account-info.mjs +19 -0
- package/dist/actions/account-info.mjs.map +1 -0
- package/dist/actions/classify-text.cjs +39 -0
- package/dist/actions/classify-text.cjs.map +1 -0
- package/dist/actions/classify-text.d.cts +9 -0
- package/dist/actions/classify-text.d.cts.map +1 -0
- package/dist/actions/classify-text.d.mts +9 -0
- package/dist/actions/classify-text.d.mts.map +1 -0
- package/dist/actions/classify-text.mjs +38 -0
- package/dist/actions/classify-text.mjs.map +1 -0
- package/dist/actions/custom-classifier-manager.cjs +46 -0
- package/dist/actions/custom-classifier-manager.cjs.map +1 -0
- package/dist/actions/custom-classifier-manager.d.cts +9 -0
- package/dist/actions/custom-classifier-manager.d.cts.map +1 -0
- package/dist/actions/custom-classifier-manager.d.mts +9 -0
- package/dist/actions/custom-classifier-manager.d.mts.map +1 -0
- package/dist/actions/custom-classifier-manager.mjs +45 -0
- package/dist/actions/custom-classifier-manager.mjs.map +1 -0
- package/dist/actions/dictionary-manager.cjs +36 -0
- package/dist/actions/dictionary-manager.cjs.map +1 -0
- package/dist/actions/dictionary-manager.d.cts +9 -0
- package/dist/actions/dictionary-manager.d.cts.map +1 -0
- package/dist/actions/dictionary-manager.d.mts +9 -0
- package/dist/actions/dictionary-manager.d.mts.map +1 -0
- package/dist/actions/dictionary-manager.mjs +33 -0
- package/dist/actions/dictionary-manager.mjs.map +1 -0
- package/dist/actions/extract-entities.cjs +46 -0
- package/dist/actions/extract-entities.cjs.map +1 -0
- package/dist/actions/extract-entities.d.cts +9 -0
- package/dist/actions/extract-entities.d.cts.map +1 -0
- package/dist/actions/extract-entities.d.mts +9 -0
- package/dist/actions/extract-entities.d.mts.map +1 -0
- package/dist/actions/extract-entities.mjs +45 -0
- package/dist/actions/extract-entities.mjs.map +1 -0
- package/dist/actions/index.cjs +13 -0
- package/dist/actions/index.d.cts +7 -0
- package/dist/actions/index.d.mts +7 -0
- package/dist/actions/index.mjs +7 -0
- package/dist/actions/text-razor-analyze-content.cjs +78 -0
- package/dist/actions/text-razor-analyze-content.cjs.map +1 -0
- package/dist/actions/text-razor-analyze-content.d.cts +9 -0
- package/dist/actions/text-razor-analyze-content.d.cts.map +1 -0
- package/dist/actions/text-razor-analyze-content.d.mts +9 -0
- package/dist/actions/text-razor-analyze-content.d.mts.map +1 -0
- package/dist/actions/text-razor-analyze-content.mjs +77 -0
- package/dist/actions/text-razor-analyze-content.mjs.map +1 -0
- package/dist/app.cjs +9 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +5 -0
- package/dist/app.d.cts.map +1 -0
- package/dist/app.d.mts +5 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +10 -0
- package/dist/app.mjs.map +1 -0
- package/dist/catalog.cjs +15 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +14 -0
- package/dist/catalog.d.cts.map +1 -0
- package/dist/catalog.d.mts +14 -0
- package/dist/catalog.d.mts.map +1 -0
- package/dist/catalog.mjs +15 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/execute.cjs +18 -0
- package/dist/execute.cjs.map +1 -0
- package/dist/execute.mjs +18 -0
- package/dist/execute.mjs.map +1 -0
- package/dist/index.cjs +18 -0
- package/dist/index.d.cts +9 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.mjs +10 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @keystrokehq/textrazor
|
|
2
|
+
|
|
3
|
+
Keystroke-managed integration.
|
|
4
|
+
|
|
5
|
+
**App:** `textrazor`
|
|
6
|
+
**Version:** `20260615_00`
|
|
7
|
+
**Actions:** 6
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { defineAgent } from "@keystrokehq/keystroke/agent";
|
|
11
|
+
import { textrazorAccountInfo } from "@keystrokehq/textrazor/actions";
|
|
12
|
+
|
|
13
|
+
export default defineAgent({
|
|
14
|
+
key: "textrazor-agent",
|
|
15
|
+
tools: [textrazorAccountInfo],
|
|
16
|
+
});
|
|
17
|
+
```
|
package/dist/action.cjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_app = require("./app.cjs");
|
|
2
|
+
const require_execute = require("./execute.cjs");
|
|
3
|
+
require("zod");
|
|
4
|
+
//#region src/action.ts
|
|
5
|
+
/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
|
|
6
|
+
function action(tool, def) {
|
|
7
|
+
return require_app.textrazor.action({
|
|
8
|
+
slug: def.slug,
|
|
9
|
+
name: def.name,
|
|
10
|
+
description: def.description,
|
|
11
|
+
input: def.input,
|
|
12
|
+
output: def.output,
|
|
13
|
+
async run(input) {
|
|
14
|
+
return def.output.parse(await require_execute.executeTextrazorTool(tool, input));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.action = action;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=action.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.cjs","names":["textrazor","executeTextrazorTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { textrazor } from \"./app\";\nimport { executeTextrazorTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return textrazor.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeTextrazorTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,UAAU,OAAO;EACtB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,qBAAqB,MAAM,KAAgC,CAAC;EAC5F;CACF,CAAC;AACH"}
|
package/dist/action.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { textrazor } from "./app.mjs";
|
|
2
|
+
import { executeTextrazorTool } from "./execute.mjs";
|
|
3
|
+
import "zod";
|
|
4
|
+
//#region src/action.ts
|
|
5
|
+
/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
|
|
6
|
+
function action(tool, def) {
|
|
7
|
+
return textrazor.action({
|
|
8
|
+
slug: def.slug,
|
|
9
|
+
name: def.name,
|
|
10
|
+
description: def.description,
|
|
11
|
+
input: def.input,
|
|
12
|
+
output: def.output,
|
|
13
|
+
async run(input) {
|
|
14
|
+
return def.output.parse(await executeTextrazorTool(tool, input));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { action };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=action.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { textrazor } from \"./app\";\nimport { executeTextrazorTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return textrazor.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeTextrazorTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,UAAU,OAAO;EACtB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,qBAAqB,MAAM,KAAgC,CAAC;EAC5F;CACF,CAAC;AACH"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/account-info.ts
|
|
4
|
+
const TextrazorAccountInfoInput = zod.z.object({});
|
|
5
|
+
const TextrazorAccountInfoOutput = zod.z.object({
|
|
6
|
+
plan: zod.z.string().describe("The current subscription plan identifier.").nullable().optional(),
|
|
7
|
+
requestsUsedToday: zod.z.number().int().describe("Total number of requests that have been made today.").nullable().optional(),
|
|
8
|
+
concurrentRequestLimit: zod.z.number().int().describe("Maximum number of concurrent requests allowed for this account.").nullable().optional(),
|
|
9
|
+
concurrentRequestsUsed: zod.z.number().int().describe("Number of concurrent requests currently being used.").nullable().optional(),
|
|
10
|
+
planDailyRequestsIncluded: zod.z.number().int().describe("Daily request quota included with the subscription plan.").nullable().optional()
|
|
11
|
+
}).describe("Response model for account information.");
|
|
12
|
+
const textrazorAccountInfo = require_action.action("TEXTRAZOR_ACCOUNT_INFO", {
|
|
13
|
+
slug: "textrazor-account-info",
|
|
14
|
+
name: "Get Account Information",
|
|
15
|
+
description: "This tool retrieves comprehensive information about a TextRazor account, providing essential details about the account's status, usage, and limits. It returns an Account object containing properties such as the current subscription plan, concurrent request limits, and daily usage among others, making it crucial for monitoring API usage, managing requests, and ensuring compliance with subscription limits.",
|
|
16
|
+
input: TextrazorAccountInfoInput,
|
|
17
|
+
output: TextrazorAccountInfoOutput
|
|
18
|
+
});
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.textrazorAccountInfo = textrazorAccountInfo;
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=account-info.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-info.cjs","names":["z","action"],"sources":["../../src/actions/account-info.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const TextrazorAccountInfoInput: z.ZodTypeAny = z.object({});\nexport const TextrazorAccountInfoOutput: z.ZodTypeAny = z.object({\n plan: z.string().describe(\"The current subscription plan identifier.\").nullable().optional(),\n requestsUsedToday: z.number().int().describe(\"Total number of requests that have been made today.\").nullable().optional(),\n concurrentRequestLimit: z.number().int().describe(\"Maximum number of concurrent requests allowed for this account.\").nullable().optional(),\n concurrentRequestsUsed: z.number().int().describe(\"Number of concurrent requests currently being used.\").nullable().optional(),\n planDailyRequestsIncluded: z.number().int().describe(\"Daily request quota included with the subscription plan.\").nullable().optional(),\n}).describe(\"Response model for account information.\");\n\nexport const textrazorAccountInfo = action(\"TEXTRAZOR_ACCOUNT_INFO\", {\n slug: \"textrazor-account-info\",\n name: \"Get Account Information\",\n description: \"This tool retrieves comprehensive information about a TextRazor account, providing essential details about the account's status, usage, and limits. It returns an Account object containing properties such as the current subscription plan, concurrent request limits, and daily usage among others, making it crucial for monitoring API usage, managing requests, and ensuring compliance with subscription limits.\",\n input: TextrazorAccountInfoInput,\n output: TextrazorAccountInfoOutput,\n});\n"],"mappings":";;;AAIA,MAAa,4BAA0CA,IAAAA,EAAE,OAAO,CAAC,CAAC;AAClE,MAAa,6BAA2CA,IAAAA,EAAE,OAAO;CAC/D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3F,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxH,wBAAwBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzI,wBAAwBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7H,2BAA2BA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACvI,CAAC,CAAC,CAAC,SAAS,yCAAyC;AAErD,MAAa,uBAAuBC,eAAAA,OAAO,0BAA0B;CACnE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/account-info.d.ts
|
|
4
|
+
declare const TextrazorAccountInfoInput: z.ZodTypeAny;
|
|
5
|
+
declare const TextrazorAccountInfoOutput: z.ZodTypeAny;
|
|
6
|
+
declare const textrazorAccountInfo: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { textrazorAccountInfo };
|
|
9
|
+
//# sourceMappingURL=account-info.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-info.d.cts","names":[],"sources":["../../src/actions/account-info.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UAAyB;AAAA,cACtD,0BAAA,EAA4B,CAAA,CAAE,UAMW;AAAA,cAEzC,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/account-info.d.ts
|
|
4
|
+
declare const TextrazorAccountInfoInput: z.ZodTypeAny;
|
|
5
|
+
declare const TextrazorAccountInfoOutput: z.ZodTypeAny;
|
|
6
|
+
declare const textrazorAccountInfo: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { textrazorAccountInfo };
|
|
9
|
+
//# sourceMappingURL=account-info.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-info.d.mts","names":[],"sources":["../../src/actions/account-info.ts"],"mappings":";;;cAIa,yBAAA,EAA2B,CAAA,CAAE,UAAyB;AAAA,cACtD,0BAAA,EAA4B,CAAA,CAAE,UAMW;AAAA,cAEzC,oBAAA,gCAAoB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const textrazorAccountInfo = action("TEXTRAZOR_ACCOUNT_INFO", {
|
|
4
|
+
slug: "textrazor-account-info",
|
|
5
|
+
name: "Get Account Information",
|
|
6
|
+
description: "This tool retrieves comprehensive information about a TextRazor account, providing essential details about the account's status, usage, and limits. It returns an Account object containing properties such as the current subscription plan, concurrent request limits, and daily usage among others, making it crucial for monitoring API usage, managing requests, and ensuring compliance with subscription limits.",
|
|
7
|
+
input: z.object({}),
|
|
8
|
+
output: z.object({
|
|
9
|
+
plan: z.string().describe("The current subscription plan identifier.").nullable().optional(),
|
|
10
|
+
requestsUsedToday: z.number().int().describe("Total number of requests that have been made today.").nullable().optional(),
|
|
11
|
+
concurrentRequestLimit: z.number().int().describe("Maximum number of concurrent requests allowed for this account.").nullable().optional(),
|
|
12
|
+
concurrentRequestsUsed: z.number().int().describe("Number of concurrent requests currently being used.").nullable().optional(),
|
|
13
|
+
planDailyRequestsIncluded: z.number().int().describe("Daily request quota included with the subscription plan.").nullable().optional()
|
|
14
|
+
}).describe("Response model for account information.")
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { textrazorAccountInfo };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=account-info.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-info.mjs","names":[],"sources":["../../src/actions/account-info.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const TextrazorAccountInfoInput: z.ZodTypeAny = z.object({});\nexport const TextrazorAccountInfoOutput: z.ZodTypeAny = z.object({\n plan: z.string().describe(\"The current subscription plan identifier.\").nullable().optional(),\n requestsUsedToday: z.number().int().describe(\"Total number of requests that have been made today.\").nullable().optional(),\n concurrentRequestLimit: z.number().int().describe(\"Maximum number of concurrent requests allowed for this account.\").nullable().optional(),\n concurrentRequestsUsed: z.number().int().describe(\"Number of concurrent requests currently being used.\").nullable().optional(),\n planDailyRequestsIncluded: z.number().int().describe(\"Daily request quota included with the subscription plan.\").nullable().optional(),\n}).describe(\"Response model for account information.\");\n\nexport const textrazorAccountInfo = action(\"TEXTRAZOR_ACCOUNT_INFO\", {\n slug: \"textrazor-account-info\",\n name: \"Get Account Information\",\n description: \"This tool retrieves comprehensive information about a TextRazor account, providing essential details about the account's status, usage, and limits. It returns an Account object containing properties such as the current subscription plan, concurrent request limits, and daily usage among others, making it crucial for monitoring API usage, managing requests, and ensuring compliance with subscription limits.\",\n input: TextrazorAccountInfoInput,\n output: TextrazorAccountInfoOutput,\n});\n"],"mappings":";;AAaA,MAAa,uBAAuB,OAAO,0BAA0B;CACnE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAbqD,EAAE,OAAO,CAAC,CAaxD;CACP,QAbsD,EAAE,OAAO;EAC/D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3F,mBAAmB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACxH,wBAAwB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACzI,wBAAwB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC7H,2BAA2B,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvI,CAAC,CAAC,CAAC,SAAS,yCAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/classify-text.ts
|
|
4
|
+
const TextrazorClassifyTextInput = zod.z.object({
|
|
5
|
+
text: zod.z.string().describe("The text content to be classified (up to 200kb UTF-8 encoded text)"),
|
|
6
|
+
classifiers: zod.z.string().describe("Comma-separated list of classifiers to use for text classification"),
|
|
7
|
+
cleanup_mode: zod.z.string().default("raw").describe("Controls preprocessing cleanup mode (raw, stripTags, cleanHTML)").optional(),
|
|
8
|
+
language_override: zod.z.string().describe("Force TextRazor to analyze content with specific language (ISO-639-2 code)").optional()
|
|
9
|
+
}).describe("Request model for text classification.");
|
|
10
|
+
const TextrazorClassifyText_ScoredCategorySchema = zod.z.object({
|
|
11
|
+
id: zod.z.number().int().describe("Sequential ID for this category in the response"),
|
|
12
|
+
label: zod.z.string().describe("The human readable label for this category"),
|
|
13
|
+
score: zod.z.number().describe("The confidence score between 0 and 1"),
|
|
14
|
+
categoryId: zod.z.string().describe("The unique ID for this category within its classifier"),
|
|
15
|
+
classifierId: zod.z.string().describe("The unique identifier for the classifier that matched this category")
|
|
16
|
+
}).describe("Model representing a category with its confidence score.");
|
|
17
|
+
const TextrazorClassifyText_ResponseDataSchema = zod.z.object({
|
|
18
|
+
language: zod.z.string().describe("Detected language code (e.g., 'eng' for English)").nullable().optional(),
|
|
19
|
+
categories: zod.z.array(TextrazorClassifyText_ScoredCategorySchema).describe("List of categories matched by the classifiers with confidence scores").nullable().optional(),
|
|
20
|
+
languageIsReliable: zod.z.boolean().describe("Whether the language detection is reliable").nullable().optional()
|
|
21
|
+
}).describe("Model representing the response data from TextRazor.");
|
|
22
|
+
const TextrazorClassifyTextOutput = zod.z.object({
|
|
23
|
+
ok: zod.z.boolean().describe("True if TextRazor successfully analyzed the document"),
|
|
24
|
+
time: zod.z.number().describe("Total time in seconds TextRazor took to process this request"),
|
|
25
|
+
error: zod.z.string().describe("Error message if any problems occurred during analysis").nullable().optional(),
|
|
26
|
+
message: zod.z.string().describe("Any warning or informational messages").nullable().optional(),
|
|
27
|
+
response: TextrazorClassifyText_ResponseDataSchema.nullable()
|
|
28
|
+
}).describe("Response model for text classification.");
|
|
29
|
+
const textrazorClassifyText = require_action.action("TEXTRAZOR_CLASSIFY_TEXT", {
|
|
30
|
+
slug: "textrazor-classify-text",
|
|
31
|
+
name: "Classify Text",
|
|
32
|
+
description: "This tool will classify text into predefined categories using TextRazor's classification capabilities. It takes input text, optional cleanup mode and language, and returns a list of relevant categories with their confidence scores from the analysis. The tool supports various built-in classifiers including: - textrazor_iab: IAB QAG segments - textrazor_iab_content_taxonomy_3.0: IAB Content Taxonomy v3.0 (2022) - textrazor_mediatopics_2023Q1: Latest IPTC Media Topics (March 2023) - And other versions of these taxonomies",
|
|
33
|
+
input: TextrazorClassifyTextInput,
|
|
34
|
+
output: TextrazorClassifyTextOutput
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
exports.textrazorClassifyText = textrazorClassifyText;
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=classify-text.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classify-text.cjs","names":["z","action"],"sources":["../../src/actions/classify-text.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const TextrazorClassifyTextInput: z.ZodTypeAny = z.object({\n text: z.string().describe(\"The text content to be classified (up to 200kb UTF-8 encoded text)\"),\n classifiers: z.string().describe(\"Comma-separated list of classifiers to use for text classification\"),\n cleanup_mode: z.string().default(\"raw\").describe(\"Controls preprocessing cleanup mode (raw, stripTags, cleanHTML)\").optional(),\n language_override: z.string().describe(\"Force TextRazor to analyze content with specific language (ISO-639-2 code)\").optional(),\n}).describe(\"Request model for text classification.\");\nconst TextrazorClassifyText_ScoredCategorySchema: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Sequential ID for this category in the response\"),\n label: z.string().describe(\"The human readable label for this category\"),\n score: z.number().describe(\"The confidence score between 0 and 1\"),\n categoryId: z.string().describe(\"The unique ID for this category within its classifier\"),\n classifierId: z.string().describe(\"The unique identifier for the classifier that matched this category\"),\n}).describe(\"Model representing a category with its confidence score.\");\nconst TextrazorClassifyText_ResponseDataSchema: z.ZodTypeAny = z.object({\n language: z.string().describe(\"Detected language code (e.g., 'eng' for English)\").nullable().optional(),\n categories: z.array(TextrazorClassifyText_ScoredCategorySchema).describe(\"List of categories matched by the classifiers with confidence scores\").nullable().optional(),\n languageIsReliable: z.boolean().describe(\"Whether the language detection is reliable\").nullable().optional(),\n}).describe(\"Model representing the response data from TextRazor.\");\nexport const TextrazorClassifyTextOutput: z.ZodTypeAny = z.object({\n ok: z.boolean().describe(\"True if TextRazor successfully analyzed the document\"),\n time: z.number().describe(\"Total time in seconds TextRazor took to process this request\"),\n error: z.string().describe(\"Error message if any problems occurred during analysis\").nullable().optional(),\n message: z.string().describe(\"Any warning or informational messages\").nullable().optional(),\n response: TextrazorClassifyText_ResponseDataSchema.nullable(),\n}).describe(\"Response model for text classification.\");\n\nexport const textrazorClassifyText = action(\"TEXTRAZOR_CLASSIFY_TEXT\", {\n slug: \"textrazor-classify-text\",\n name: \"Classify Text\",\n description: \"This tool will classify text into predefined categories using TextRazor's classification capabilities. It takes input text, optional cleanup mode and language, and returns a list of relevant categories with their confidence scores from the analysis. The tool supports various built-in classifiers including: - textrazor_iab: IAB QAG segments - textrazor_iab_content_taxonomy_3.0: IAB Content Taxonomy v3.0 (2022) - textrazor_mediatopics_2023Q1: Latest IPTC Media Topics (March 2023) - And other versions of these taxonomies\",\n input: TextrazorClassifyTextInput,\n output: TextrazorClassifyTextOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6BAA2CA,IAAAA,EAAE,OAAO;CAC/D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE;CAC9F,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE;CACrG,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC7H,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;AAChI,CAAC,CAAC,CAAC,SAAS,wCAAwC;AACpD,MAAM,6CAA2DA,IAAAA,EAAE,OAAO;CACxE,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iDAAiD;CAC/E,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C;CACvE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CACjE,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD;CACvF,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qEAAqE;AACzG,CAAC,CAAC,CAAC,SAAS,0DAA0D;AACtE,MAAM,2CAAyDA,IAAAA,EAAE,OAAO;CACtE,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtG,YAAYA,IAAAA,EAAE,MAAM,0CAA0C,CAAC,CAAC,SAAS,sEAAsE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrK,oBAAoBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7G,CAAC,CAAC,CAAC,SAAS,sDAAsD;AAClE,MAAa,8BAA4CA,IAAAA,EAAE,OAAO;CAChE,IAAIA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,sDAAsD;CAC/E,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D;CACxF,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACzG,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1F,UAAU,yCAAyC,SAAS;AAC9D,CAAC,CAAC,CAAC,SAAS,yCAAyC;AAErD,MAAa,wBAAwBC,eAAAA,OAAO,2BAA2B;CACrE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/classify-text.d.ts
|
|
4
|
+
declare const TextrazorClassifyTextInput: z.ZodTypeAny;
|
|
5
|
+
declare const TextrazorClassifyTextOutput: z.ZodTypeAny;
|
|
6
|
+
declare const textrazorClassifyText: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { textrazorClassifyText };
|
|
9
|
+
//# sourceMappingURL=classify-text.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classify-text.d.cts","names":[],"sources":["../../src/actions/classify-text.ts"],"mappings":";;;cAIa,0BAAA,EAA4B,CAAA,CAAE,UAKU;AAAA,cAaxC,2BAAA,EAA6B,CAAA,CAAE,UAMU;AAAA,cAEzC,qBAAA,gCAAqB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/classify-text.d.ts
|
|
4
|
+
declare const TextrazorClassifyTextInput: z.ZodTypeAny;
|
|
5
|
+
declare const TextrazorClassifyTextOutput: z.ZodTypeAny;
|
|
6
|
+
declare const textrazorClassifyText: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { textrazorClassifyText };
|
|
9
|
+
//# sourceMappingURL=classify-text.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classify-text.d.mts","names":[],"sources":["../../src/actions/classify-text.ts"],"mappings":";;;cAIa,0BAAA,EAA4B,CAAA,CAAE,UAKU;AAAA,cAaxC,2BAAA,EAA6B,CAAA,CAAE,UAMU;AAAA,cAEzC,qBAAA,gCAAqB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/classify-text.ts
|
|
4
|
+
const TextrazorClassifyTextInput = z.object({
|
|
5
|
+
text: z.string().describe("The text content to be classified (up to 200kb UTF-8 encoded text)"),
|
|
6
|
+
classifiers: z.string().describe("Comma-separated list of classifiers to use for text classification"),
|
|
7
|
+
cleanup_mode: z.string().default("raw").describe("Controls preprocessing cleanup mode (raw, stripTags, cleanHTML)").optional(),
|
|
8
|
+
language_override: z.string().describe("Force TextRazor to analyze content with specific language (ISO-639-2 code)").optional()
|
|
9
|
+
}).describe("Request model for text classification.");
|
|
10
|
+
const TextrazorClassifyText_ScoredCategorySchema = z.object({
|
|
11
|
+
id: z.number().int().describe("Sequential ID for this category in the response"),
|
|
12
|
+
label: z.string().describe("The human readable label for this category"),
|
|
13
|
+
score: z.number().describe("The confidence score between 0 and 1"),
|
|
14
|
+
categoryId: z.string().describe("The unique ID for this category within its classifier"),
|
|
15
|
+
classifierId: z.string().describe("The unique identifier for the classifier that matched this category")
|
|
16
|
+
}).describe("Model representing a category with its confidence score.");
|
|
17
|
+
const TextrazorClassifyText_ResponseDataSchema = z.object({
|
|
18
|
+
language: z.string().describe("Detected language code (e.g., 'eng' for English)").nullable().optional(),
|
|
19
|
+
categories: z.array(TextrazorClassifyText_ScoredCategorySchema).describe("List of categories matched by the classifiers with confidence scores").nullable().optional(),
|
|
20
|
+
languageIsReliable: z.boolean().describe("Whether the language detection is reliable").nullable().optional()
|
|
21
|
+
}).describe("Model representing the response data from TextRazor.");
|
|
22
|
+
const textrazorClassifyText = action("TEXTRAZOR_CLASSIFY_TEXT", {
|
|
23
|
+
slug: "textrazor-classify-text",
|
|
24
|
+
name: "Classify Text",
|
|
25
|
+
description: "This tool will classify text into predefined categories using TextRazor's classification capabilities. It takes input text, optional cleanup mode and language, and returns a list of relevant categories with their confidence scores from the analysis. The tool supports various built-in classifiers including: - textrazor_iab: IAB QAG segments - textrazor_iab_content_taxonomy_3.0: IAB Content Taxonomy v3.0 (2022) - textrazor_mediatopics_2023Q1: Latest IPTC Media Topics (March 2023) - And other versions of these taxonomies",
|
|
26
|
+
input: TextrazorClassifyTextInput,
|
|
27
|
+
output: z.object({
|
|
28
|
+
ok: z.boolean().describe("True if TextRazor successfully analyzed the document"),
|
|
29
|
+
time: z.number().describe("Total time in seconds TextRazor took to process this request"),
|
|
30
|
+
error: z.string().describe("Error message if any problems occurred during analysis").nullable().optional(),
|
|
31
|
+
message: z.string().describe("Any warning or informational messages").nullable().optional(),
|
|
32
|
+
response: TextrazorClassifyText_ResponseDataSchema.nullable()
|
|
33
|
+
}).describe("Response model for text classification.")
|
|
34
|
+
});
|
|
35
|
+
//#endregion
|
|
36
|
+
export { textrazorClassifyText };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=classify-text.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classify-text.mjs","names":[],"sources":["../../src/actions/classify-text.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const TextrazorClassifyTextInput: z.ZodTypeAny = z.object({\n text: z.string().describe(\"The text content to be classified (up to 200kb UTF-8 encoded text)\"),\n classifiers: z.string().describe(\"Comma-separated list of classifiers to use for text classification\"),\n cleanup_mode: z.string().default(\"raw\").describe(\"Controls preprocessing cleanup mode (raw, stripTags, cleanHTML)\").optional(),\n language_override: z.string().describe(\"Force TextRazor to analyze content with specific language (ISO-639-2 code)\").optional(),\n}).describe(\"Request model for text classification.\");\nconst TextrazorClassifyText_ScoredCategorySchema: z.ZodTypeAny = z.object({\n id: z.number().int().describe(\"Sequential ID for this category in the response\"),\n label: z.string().describe(\"The human readable label for this category\"),\n score: z.number().describe(\"The confidence score between 0 and 1\"),\n categoryId: z.string().describe(\"The unique ID for this category within its classifier\"),\n classifierId: z.string().describe(\"The unique identifier for the classifier that matched this category\"),\n}).describe(\"Model representing a category with its confidence score.\");\nconst TextrazorClassifyText_ResponseDataSchema: z.ZodTypeAny = z.object({\n language: z.string().describe(\"Detected language code (e.g., 'eng' for English)\").nullable().optional(),\n categories: z.array(TextrazorClassifyText_ScoredCategorySchema).describe(\"List of categories matched by the classifiers with confidence scores\").nullable().optional(),\n languageIsReliable: z.boolean().describe(\"Whether the language detection is reliable\").nullable().optional(),\n}).describe(\"Model representing the response data from TextRazor.\");\nexport const TextrazorClassifyTextOutput: z.ZodTypeAny = z.object({\n ok: z.boolean().describe(\"True if TextRazor successfully analyzed the document\"),\n time: z.number().describe(\"Total time in seconds TextRazor took to process this request\"),\n error: z.string().describe(\"Error message if any problems occurred during analysis\").nullable().optional(),\n message: z.string().describe(\"Any warning or informational messages\").nullable().optional(),\n response: TextrazorClassifyText_ResponseDataSchema.nullable(),\n}).describe(\"Response model for text classification.\");\n\nexport const textrazorClassifyText = action(\"TEXTRAZOR_CLASSIFY_TEXT\", {\n slug: \"textrazor-classify-text\",\n name: \"Classify Text\",\n description: \"This tool will classify text into predefined categories using TextRazor's classification capabilities. It takes input text, optional cleanup mode and language, and returns a list of relevant categories with their confidence scores from the analysis. The tool supports various built-in classifiers including: - textrazor_iab: IAB QAG segments - textrazor_iab_content_taxonomy_3.0: IAB Content Taxonomy v3.0 (2022) - textrazor_mediatopics_2023Q1: Latest IPTC Media Topics (March 2023) - And other versions of these taxonomies\",\n input: TextrazorClassifyTextInput,\n output: TextrazorClassifyTextOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6BAA2C,EAAE,OAAO;CAC/D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE;CAC9F,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE;CACrG,cAAc,EAAE,OAAO,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC7H,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;AAChI,CAAC,CAAC,CAAC,SAAS,wCAAwC;AACpD,MAAM,6CAA2D,EAAE,OAAO;CACxE,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iDAAiD;CAC/E,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C;CACvE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CACjE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD;CACvF,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,qEAAqE;AACzG,CAAC,CAAC,CAAC,SAAS,0DAA0D;AACtE,MAAM,2CAAyD,EAAE,OAAO;CACtE,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtG,YAAY,EAAE,MAAM,0CAA0C,CAAC,CAAC,SAAS,sEAAsE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrK,oBAAoB,EAAE,QAAQ,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7G,CAAC,CAAC,CAAC,SAAS,sDAAsD;AASlE,MAAa,wBAAwB,OAAO,2BAA2B;CACrE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAbuD,EAAE,OAAO;EAChE,IAAI,EAAE,QAAQ,CAAC,CAAC,SAAS,sDAAsD;EAC/E,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,8DAA8D;EACxF,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACzG,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC1F,UAAU,yCAAyC,SAAS;CAC9D,CAAC,CAAC,CAAC,SAAS,yCAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/custom-classifier-manager.ts
|
|
4
|
+
const TextrazorCustomClassifierManagerInput = zod.z.object({
|
|
5
|
+
limit: zod.z.number().int().describe("Maximum number of categories to return when listing categories.").optional(),
|
|
6
|
+
offset: zod.z.number().int().describe("Offset for pagination when listing categories.").optional(),
|
|
7
|
+
operation: zod.z.enum([
|
|
8
|
+
"create_update",
|
|
9
|
+
"delete",
|
|
10
|
+
"get_categories",
|
|
11
|
+
"get_category",
|
|
12
|
+
"delete_category"
|
|
13
|
+
]).describe("The operation to perform on the classifier."),
|
|
14
|
+
categories: zod.z.array(zod.z.object({
|
|
15
|
+
label: zod.z.string().describe("The human readable label for this category.").optional(),
|
|
16
|
+
query: zod.z.string().describe("The query used to define this category."),
|
|
17
|
+
category_id: zod.z.string().describe("The unique ID for this category within its classifier.")
|
|
18
|
+
}).describe("Model representing a TextRazor category.")).describe("List of categories to create/update. Required for create_update operation.").optional(),
|
|
19
|
+
category_id: zod.z.string().describe("The category ID when performing operations on a specific category.").optional(),
|
|
20
|
+
classifier_id: zod.z.string().describe("The unique identifier for the classifier.")
|
|
21
|
+
}).describe("Request model for managing custom classifiers.");
|
|
22
|
+
const TextrazorCustomClassifierManager_CategoryResponseSchema = zod.z.object({
|
|
23
|
+
label: zod.z.string().describe("The human readable label for this category.").nullable().optional(),
|
|
24
|
+
query: zod.z.string().describe("The query used to define this category."),
|
|
25
|
+
category_id: zod.z.string().describe("The unique ID for this category.")
|
|
26
|
+
}).describe("Response model for a single category.");
|
|
27
|
+
const TextrazorCustomClassifierManager_CategoriesListResponseSchema = zod.z.object({
|
|
28
|
+
total: zod.z.number().int().describe("Total number of categories in the classifier."),
|
|
29
|
+
categories: zod.z.array(TextrazorCustomClassifierManager_CategoryResponseSchema).describe("List of categories in the classifier.")
|
|
30
|
+
}).describe("Response model for listing categories.");
|
|
31
|
+
const TextrazorCustomClassifierManagerOutput = zod.z.object({
|
|
32
|
+
data: zod.z.union([TextrazorCustomClassifierManager_CategoryResponseSchema, TextrazorCustomClassifierManager_CategoriesListResponseSchema]).nullable().optional(),
|
|
33
|
+
message: zod.z.string().describe("A message describing the result of the operation."),
|
|
34
|
+
success: zod.z.boolean().describe("Whether the operation was successful.")
|
|
35
|
+
}).describe("Response model for custom classifier management operations.");
|
|
36
|
+
const textrazorCustomClassifierManager = require_action.action("TEXTRAZOR_CUSTOM_CLASSIFIER_MANAGER", {
|
|
37
|
+
slug: "textrazor-custom-classifier-manager",
|
|
38
|
+
name: "Manage Custom Classifiers",
|
|
39
|
+
description: "This tool manages custom classifiers in TextRazor, allowing users to create, update, and manage custom classification categories.",
|
|
40
|
+
input: TextrazorCustomClassifierManagerInput,
|
|
41
|
+
output: TextrazorCustomClassifierManagerOutput
|
|
42
|
+
});
|
|
43
|
+
//#endregion
|
|
44
|
+
exports.textrazorCustomClassifierManager = textrazorCustomClassifierManager;
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=custom-classifier-manager.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-classifier-manager.cjs","names":["z","action"],"sources":["../../src/actions/custom-classifier-manager.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const TextrazorCustomClassifierManagerInput: z.ZodTypeAny = z.object({\n limit: z.number().int().describe(\"Maximum number of categories to return when listing categories.\").optional(),\n offset: z.number().int().describe(\"Offset for pagination when listing categories.\").optional(),\n operation: z.enum([\"create_update\", \"delete\", \"get_categories\", \"get_category\", \"delete_category\"]).describe(\"The operation to perform on the classifier.\"),\n categories: z.array(z.object({\n label: z.string().describe(\"The human readable label for this category.\").optional(),\n query: z.string().describe(\"The query used to define this category.\"),\n category_id: z.string().describe(\"The unique ID for this category within its classifier.\"),\n}).describe(\"Model representing a TextRazor category.\")).describe(\"List of categories to create/update. Required for create_update operation.\").optional(),\n category_id: z.string().describe(\"The category ID when performing operations on a specific category.\").optional(),\n classifier_id: z.string().describe(\"The unique identifier for the classifier.\"),\n}).describe(\"Request model for managing custom classifiers.\");\nconst TextrazorCustomClassifierManager_CategoryResponseSchema: z.ZodTypeAny = z.object({\n label: z.string().describe(\"The human readable label for this category.\").nullable().optional(),\n query: z.string().describe(\"The query used to define this category.\"),\n category_id: z.string().describe(\"The unique ID for this category.\"),\n}).describe(\"Response model for a single category.\");\nconst TextrazorCustomClassifierManager_CategoriesListResponseSchema: z.ZodTypeAny = z.object({\n total: z.number().int().describe(\"Total number of categories in the classifier.\"),\n categories: z.array(TextrazorCustomClassifierManager_CategoryResponseSchema).describe(\"List of categories in the classifier.\"),\n}).describe(\"Response model for listing categories.\");\nexport const TextrazorCustomClassifierManagerOutput: z.ZodTypeAny = z.object({\n data: z.union([TextrazorCustomClassifierManager_CategoryResponseSchema, TextrazorCustomClassifierManager_CategoriesListResponseSchema]).nullable().optional(),\n message: z.string().describe(\"A message describing the result of the operation.\"),\n success: z.boolean().describe(\"Whether the operation was successful.\"),\n}).describe(\"Response model for custom classifier management operations.\");\n\nexport const textrazorCustomClassifierManager = action(\"TEXTRAZOR_CUSTOM_CLASSIFIER_MANAGER\", {\n slug: \"textrazor-custom-classifier-manager\",\n name: \"Manage Custom Classifiers\",\n description: \"This tool manages custom classifiers in TextRazor, allowing users to create, update, and manage custom classification categories.\",\n input: TextrazorCustomClassifierManagerInput,\n output: TextrazorCustomClassifierManagerOutput,\n});\n"],"mappings":";;;AAIA,MAAa,wCAAsDA,IAAAA,EAAE,OAAO;CAC1E,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC7G,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CAC7F,WAAWA,IAAAA,EAAE,KAAK;EAAC;EAAiB;EAAU;EAAkB;EAAgB;CAAiB,CAAC,CAAC,CAAC,SAAS,6CAA6C;CAC1J,YAAYA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC7B,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS;EACnF,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;EACpE,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD;CAC3F,CAAC,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;CACvJ,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CAChH,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C;AAChF,CAAC,CAAC,CAAC,SAAS,gDAAgD;AAC5D,MAAM,0DAAwEA,IAAAA,EAAE,OAAO;CACrF,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9F,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;CACpE,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC;AACrE,CAAC,CAAC,CAAC,SAAS,uCAAuC;AACnD,MAAM,gEAA8EA,IAAAA,EAAE,OAAO;CAC3F,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,+CAA+C;CAChF,YAAYA,IAAAA,EAAE,MAAM,uDAAuD,CAAC,CAAC,SAAS,uCAAuC;AAC/H,CAAC,CAAC,CAAC,SAAS,wCAAwC;AACpD,MAAa,yCAAuDA,IAAAA,EAAE,OAAO;CAC3E,MAAMA,IAAAA,EAAE,MAAM,CAAC,yDAAyD,6DAA6D,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC5J,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD;CAChF,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,uCAAuC;AACvE,CAAC,CAAC,CAAC,SAAS,6DAA6D;AAEzE,MAAa,mCAAmCC,eAAAA,OAAO,uCAAuC;CAC5F,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/custom-classifier-manager.d.ts
|
|
4
|
+
declare const TextrazorCustomClassifierManagerInput: z.ZodTypeAny;
|
|
5
|
+
declare const TextrazorCustomClassifierManagerOutput: z.ZodTypeAny;
|
|
6
|
+
declare const textrazorCustomClassifierManager: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { textrazorCustomClassifierManager };
|
|
9
|
+
//# sourceMappingURL=custom-classifier-manager.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-classifier-manager.d.cts","names":[],"sources":["../../src/actions/custom-classifier-manager.ts"],"mappings":";;;cAIa,qCAAA,EAAuC,CAAA,CAAE,UAWO;AAAA,cAUhD,sCAAA,EAAwC,CAAA,CAAE,UAImB;AAAA,cAE7D,gCAAA,gCAAgC,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/custom-classifier-manager.d.ts
|
|
4
|
+
declare const TextrazorCustomClassifierManagerInput: z.ZodTypeAny;
|
|
5
|
+
declare const TextrazorCustomClassifierManagerOutput: z.ZodTypeAny;
|
|
6
|
+
declare const textrazorCustomClassifierManager: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { textrazorCustomClassifierManager };
|
|
9
|
+
//# sourceMappingURL=custom-classifier-manager.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-classifier-manager.d.mts","names":[],"sources":["../../src/actions/custom-classifier-manager.ts"],"mappings":";;;cAIa,qCAAA,EAAuC,CAAA,CAAE,UAWO;AAAA,cAUhD,sCAAA,EAAwC,CAAA,CAAE,UAImB;AAAA,cAE7D,gCAAA,gCAAgC,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/custom-classifier-manager.ts
|
|
4
|
+
const TextrazorCustomClassifierManagerInput = z.object({
|
|
5
|
+
limit: z.number().int().describe("Maximum number of categories to return when listing categories.").optional(),
|
|
6
|
+
offset: z.number().int().describe("Offset for pagination when listing categories.").optional(),
|
|
7
|
+
operation: z.enum([
|
|
8
|
+
"create_update",
|
|
9
|
+
"delete",
|
|
10
|
+
"get_categories",
|
|
11
|
+
"get_category",
|
|
12
|
+
"delete_category"
|
|
13
|
+
]).describe("The operation to perform on the classifier."),
|
|
14
|
+
categories: z.array(z.object({
|
|
15
|
+
label: z.string().describe("The human readable label for this category.").optional(),
|
|
16
|
+
query: z.string().describe("The query used to define this category."),
|
|
17
|
+
category_id: z.string().describe("The unique ID for this category within its classifier.")
|
|
18
|
+
}).describe("Model representing a TextRazor category.")).describe("List of categories to create/update. Required for create_update operation.").optional(),
|
|
19
|
+
category_id: z.string().describe("The category ID when performing operations on a specific category.").optional(),
|
|
20
|
+
classifier_id: z.string().describe("The unique identifier for the classifier.")
|
|
21
|
+
}).describe("Request model for managing custom classifiers.");
|
|
22
|
+
const TextrazorCustomClassifierManager_CategoryResponseSchema = z.object({
|
|
23
|
+
label: z.string().describe("The human readable label for this category.").nullable().optional(),
|
|
24
|
+
query: z.string().describe("The query used to define this category."),
|
|
25
|
+
category_id: z.string().describe("The unique ID for this category.")
|
|
26
|
+
}).describe("Response model for a single category.");
|
|
27
|
+
const TextrazorCustomClassifierManager_CategoriesListResponseSchema = z.object({
|
|
28
|
+
total: z.number().int().describe("Total number of categories in the classifier."),
|
|
29
|
+
categories: z.array(TextrazorCustomClassifierManager_CategoryResponseSchema).describe("List of categories in the classifier.")
|
|
30
|
+
}).describe("Response model for listing categories.");
|
|
31
|
+
const textrazorCustomClassifierManager = action("TEXTRAZOR_CUSTOM_CLASSIFIER_MANAGER", {
|
|
32
|
+
slug: "textrazor-custom-classifier-manager",
|
|
33
|
+
name: "Manage Custom Classifiers",
|
|
34
|
+
description: "This tool manages custom classifiers in TextRazor, allowing users to create, update, and manage custom classification categories.",
|
|
35
|
+
input: TextrazorCustomClassifierManagerInput,
|
|
36
|
+
output: z.object({
|
|
37
|
+
data: z.union([TextrazorCustomClassifierManager_CategoryResponseSchema, TextrazorCustomClassifierManager_CategoriesListResponseSchema]).nullable().optional(),
|
|
38
|
+
message: z.string().describe("A message describing the result of the operation."),
|
|
39
|
+
success: z.boolean().describe("Whether the operation was successful.")
|
|
40
|
+
}).describe("Response model for custom classifier management operations.")
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
export { textrazorCustomClassifierManager };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=custom-classifier-manager.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-classifier-manager.mjs","names":[],"sources":["../../src/actions/custom-classifier-manager.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const TextrazorCustomClassifierManagerInput: z.ZodTypeAny = z.object({\n limit: z.number().int().describe(\"Maximum number of categories to return when listing categories.\").optional(),\n offset: z.number().int().describe(\"Offset for pagination when listing categories.\").optional(),\n operation: z.enum([\"create_update\", \"delete\", \"get_categories\", \"get_category\", \"delete_category\"]).describe(\"The operation to perform on the classifier.\"),\n categories: z.array(z.object({\n label: z.string().describe(\"The human readable label for this category.\").optional(),\n query: z.string().describe(\"The query used to define this category.\"),\n category_id: z.string().describe(\"The unique ID for this category within its classifier.\"),\n}).describe(\"Model representing a TextRazor category.\")).describe(\"List of categories to create/update. Required for create_update operation.\").optional(),\n category_id: z.string().describe(\"The category ID when performing operations on a specific category.\").optional(),\n classifier_id: z.string().describe(\"The unique identifier for the classifier.\"),\n}).describe(\"Request model for managing custom classifiers.\");\nconst TextrazorCustomClassifierManager_CategoryResponseSchema: z.ZodTypeAny = z.object({\n label: z.string().describe(\"The human readable label for this category.\").nullable().optional(),\n query: z.string().describe(\"The query used to define this category.\"),\n category_id: z.string().describe(\"The unique ID for this category.\"),\n}).describe(\"Response model for a single category.\");\nconst TextrazorCustomClassifierManager_CategoriesListResponseSchema: z.ZodTypeAny = z.object({\n total: z.number().int().describe(\"Total number of categories in the classifier.\"),\n categories: z.array(TextrazorCustomClassifierManager_CategoryResponseSchema).describe(\"List of categories in the classifier.\"),\n}).describe(\"Response model for listing categories.\");\nexport const TextrazorCustomClassifierManagerOutput: z.ZodTypeAny = z.object({\n data: z.union([TextrazorCustomClassifierManager_CategoryResponseSchema, TextrazorCustomClassifierManager_CategoriesListResponseSchema]).nullable().optional(),\n message: z.string().describe(\"A message describing the result of the operation.\"),\n success: z.boolean().describe(\"Whether the operation was successful.\"),\n}).describe(\"Response model for custom classifier management operations.\");\n\nexport const textrazorCustomClassifierManager = action(\"TEXTRAZOR_CUSTOM_CLASSIFIER_MANAGER\", {\n slug: \"textrazor-custom-classifier-manager\",\n name: \"Manage Custom Classifiers\",\n description: \"This tool manages custom classifiers in TextRazor, allowing users to create, update, and manage custom classification categories.\",\n input: TextrazorCustomClassifierManagerInput,\n output: TextrazorCustomClassifierManagerOutput,\n});\n"],"mappings":";;;AAIA,MAAa,wCAAsD,EAAE,OAAO;CAC1E,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC7G,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CAC7F,WAAW,EAAE,KAAK;EAAC;EAAiB;EAAU;EAAkB;EAAgB;CAAiB,CAAC,CAAC,CAAC,SAAS,6CAA6C;CAC1J,YAAY,EAAE,MAAM,EAAE,OAAO;EAC7B,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS;EACnF,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;EACpE,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,wDAAwD;CAC3F,CAAC,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;CACvJ,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CAChH,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C;AAChF,CAAC,CAAC,CAAC,SAAS,gDAAgD;AAC5D,MAAM,0DAAwE,EAAE,OAAO;CACrF,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9F,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;CACpE,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC;AACrE,CAAC,CAAC,CAAC,SAAS,uCAAuC;AACnD,MAAM,gEAA8E,EAAE,OAAO;CAC3F,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,+CAA+C;CAChF,YAAY,EAAE,MAAM,uDAAuD,CAAC,CAAC,SAAS,uCAAuC;AAC/H,CAAC,CAAC,CAAC,SAAS,wCAAwC;AAOpD,MAAa,mCAAmC,OAAO,uCAAuC;CAC5F,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAXkE,EAAE,OAAO;EAC3E,MAAM,EAAE,MAAM,CAAC,yDAAyD,6DAA6D,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC5J,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD;EAChF,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,uCAAuC;CACvE,CAAC,CAAC,CAAC,SAAS,6DAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/dictionary-manager.ts
|
|
4
|
+
const TextrazorDictionaryManagerInput = zod.z.object({
|
|
5
|
+
entries: zod.z.array(zod.z.object({
|
|
6
|
+
id: zod.z.string().describe("The unique identifier for the dictionary entry. If not provided, TextRazor will generate one automatically.").optional(),
|
|
7
|
+
data: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Additional metadata for the entry. Must be a JSON object where each key is a string and each value is an array of strings (e.g., {'category': ['technology'], 'type': ['company']}).").optional(),
|
|
8
|
+
text: zod.z.string().describe("The text content of the dictionary entry to match in documents.")
|
|
9
|
+
})).describe("List of dictionary entries to add or delete. Required for 'add_entries' and 'delete_entries' operations. Each entry must have at least a 'text' field.").optional(),
|
|
10
|
+
operation: zod.z.enum([
|
|
11
|
+
"create",
|
|
12
|
+
"list",
|
|
13
|
+
"get",
|
|
14
|
+
"delete",
|
|
15
|
+
"add_entries",
|
|
16
|
+
"get_entries",
|
|
17
|
+
"delete_entries"
|
|
18
|
+
]).describe("The operation to perform: 'create' creates a new dictionary, 'list' lists all dictionaries, 'get' retrieves dictionary details, 'delete' removes a dictionary, 'add_entries' adds entities to a dictionary, 'get_entries' retrieves all entries from a dictionary, 'delete_entries' removes specific entries from a dictionary."),
|
|
19
|
+
dictionary_id: zod.z.string().describe("The unique identifier for the dictionary. Required for all operations except 'list'. Use a descriptive name like 'tech_companies' or 'product_names'.").optional()
|
|
20
|
+
});
|
|
21
|
+
const TextrazorDictionaryManagerOutput = zod.z.object({
|
|
22
|
+
ok: zod.z.boolean().describe("True if the operation was successful."),
|
|
23
|
+
data: zod.z.record(zod.z.string(), zod.z.unknown()).describe("The response data from the operation, if any.").nullable().optional(),
|
|
24
|
+
message: zod.z.string().describe("Response message describing the result of the operation.")
|
|
25
|
+
});
|
|
26
|
+
const textrazorDictionaryManager = require_action.action("TEXTRAZOR_DICTIONARY_MANAGER", {
|
|
27
|
+
slug: "textrazor-dictionary-manager",
|
|
28
|
+
name: "Dictionary Manager",
|
|
29
|
+
description: "Manage custom entity dictionaries in TextRazor for enhanced named entity recognition. This tool enables you to create and manage dictionaries of domain-specific entities (e.g., product names, company names, technical terms) that TextRazor will recognize in text analysis. Operations include: - Creating new dictionaries with configurable matching rules - Listing all available dictionaries - Retrieving dictionary details and configuration - Deleting dictionaries - Adding, retrieving, and removing dictionary entries Note: Dictionaries created here can be used in text analysis by specifying their IDs in the 'entityDictionaries' parameter of TextRazor analysis requests.",
|
|
30
|
+
input: TextrazorDictionaryManagerInput,
|
|
31
|
+
output: TextrazorDictionaryManagerOutput
|
|
32
|
+
});
|
|
33
|
+
//#endregion
|
|
34
|
+
exports.textrazorDictionaryManager = textrazorDictionaryManager;
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=dictionary-manager.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionary-manager.cjs","names":["z","action"],"sources":["../../src/actions/dictionary-manager.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const TextrazorDictionaryManagerInput: z.ZodTypeAny = z.object({\n entries: z.array(z.object({\n id: z.string().describe(\"The unique identifier for the dictionary entry. If not provided, TextRazor will generate one automatically.\").optional(),\n data: z.record(z.string(), z.unknown()).describe(\"Additional metadata for the entry. Must be a JSON object where each key is a string and each value is an array of strings (e.g., {'category': ['technology'], 'type': ['company']}).\").optional(),\n text: z.string().describe(\"The text content of the dictionary entry to match in documents.\"),\n})).describe(\"List of dictionary entries to add or delete. Required for 'add_entries' and 'delete_entries' operations. Each entry must have at least a 'text' field.\").optional(),\n operation: z.enum([\"create\", \"list\", \"get\", \"delete\", \"add_entries\", \"get_entries\", \"delete_entries\"]).describe(\"The operation to perform: 'create' creates a new dictionary, 'list' lists all dictionaries, 'get' retrieves dictionary details, 'delete' removes a dictionary, 'add_entries' adds entities to a dictionary, 'get_entries' retrieves all entries from a dictionary, 'delete_entries' removes specific entries from a dictionary.\"),\n dictionary_id: z.string().describe(\"The unique identifier for the dictionary. Required for all operations except 'list'. Use a descriptive name like 'tech_companies' or 'product_names'.\").optional(),\n});\nexport const TextrazorDictionaryManagerOutput: z.ZodTypeAny = z.object({\n ok: z.boolean().describe(\"True if the operation was successful.\"),\n data: z.record(z.string(), z.unknown()).describe(\"The response data from the operation, if any.\").nullable().optional(),\n message: z.string().describe(\"Response message describing the result of the operation.\"),\n});\n\nexport const textrazorDictionaryManager = action(\"TEXTRAZOR_DICTIONARY_MANAGER\", {\n slug: \"textrazor-dictionary-manager\",\n name: \"Dictionary Manager\",\n description: \"Manage custom entity dictionaries in TextRazor for enhanced named entity recognition. This tool enables you to create and manage dictionaries of domain-specific entities (e.g., product names, company names, technical terms) that TextRazor will recognize in text analysis. Operations include: - Creating new dictionaries with configurable matching rules - Listing all available dictionaries - Retrieving dictionary details and configuration - Deleting dictionaries - Adding, retrieving, and removing dictionary entries Note: Dictionaries created here can be used in text analysis by specifying their IDs in the 'entityDictionaries' parameter of TextRazor analysis requests.\",\n input: TextrazorDictionaryManagerInput,\n output: TextrazorDictionaryManagerOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAgDA,IAAAA,EAAE,OAAO;CACpE,SAASA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC1B,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6GAA6G,CAAC,CAAC,SAAS;EAChJ,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,sLAAsL,CAAC,CAAC,SAAS;EAClP,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE;CAC7F,CAAC,CAAC,CAAC,CAAC,SAAS,wJAAwJ,CAAC,CAAC,SAAS;CAC9K,WAAWA,IAAAA,EAAE,KAAK;EAAC;EAAU;EAAQ;EAAO;EAAU;EAAe;EAAe;CAAgB,CAAC,CAAC,CAAC,SAAS,iUAAiU;CACjb,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uJAAuJ,CAAC,CAAC,SAAS;AACvM,CAAC;AACD,MAAa,mCAAiDA,IAAAA,EAAE,OAAO;CACrE,IAAIA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,uCAAuC;CAChE,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtH,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D;AACzF,CAAC;AAED,MAAa,6BAA6BC,eAAAA,OAAO,gCAAgC;CAC/E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/dictionary-manager.d.ts
|
|
4
|
+
declare const TextrazorDictionaryManagerInput: z.ZodTypeAny;
|
|
5
|
+
declare const TextrazorDictionaryManagerOutput: z.ZodTypeAny;
|
|
6
|
+
declare const textrazorDictionaryManager: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { textrazorDictionaryManager };
|
|
9
|
+
//# sourceMappingURL=dictionary-manager.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionary-manager.d.cts","names":[],"sources":["../../src/actions/dictionary-manager.ts"],"mappings":";;;cAIa,+BAAA,EAAiC,CAAA,CAAE,UAQ9C;AAAA,cACW,gCAAA,EAAkC,CAAA,CAAE,UAI/C;AAAA,cAEW,0BAAA,gCAA0B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/dictionary-manager.d.ts
|
|
4
|
+
declare const TextrazorDictionaryManagerInput: z.ZodTypeAny;
|
|
5
|
+
declare const TextrazorDictionaryManagerOutput: z.ZodTypeAny;
|
|
6
|
+
declare const textrazorDictionaryManager: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { textrazorDictionaryManager };
|
|
9
|
+
//# sourceMappingURL=dictionary-manager.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionary-manager.d.mts","names":[],"sources":["../../src/actions/dictionary-manager.ts"],"mappings":";;;cAIa,+BAAA,EAAiC,CAAA,CAAE,UAQ9C;AAAA,cACW,gCAAA,EAAkC,CAAA,CAAE,UAI/C;AAAA,cAEW,0BAAA,gCAA0B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const textrazorDictionaryManager = action("TEXTRAZOR_DICTIONARY_MANAGER", {
|
|
4
|
+
slug: "textrazor-dictionary-manager",
|
|
5
|
+
name: "Dictionary Manager",
|
|
6
|
+
description: "Manage custom entity dictionaries in TextRazor for enhanced named entity recognition. This tool enables you to create and manage dictionaries of domain-specific entities (e.g., product names, company names, technical terms) that TextRazor will recognize in text analysis. Operations include: - Creating new dictionaries with configurable matching rules - Listing all available dictionaries - Retrieving dictionary details and configuration - Deleting dictionaries - Adding, retrieving, and removing dictionary entries Note: Dictionaries created here can be used in text analysis by specifying their IDs in the 'entityDictionaries' parameter of TextRazor analysis requests.",
|
|
7
|
+
input: z.object({
|
|
8
|
+
entries: z.array(z.object({
|
|
9
|
+
id: z.string().describe("The unique identifier for the dictionary entry. If not provided, TextRazor will generate one automatically.").optional(),
|
|
10
|
+
data: z.record(z.string(), z.unknown()).describe("Additional metadata for the entry. Must be a JSON object where each key is a string and each value is an array of strings (e.g., {'category': ['technology'], 'type': ['company']}).").optional(),
|
|
11
|
+
text: z.string().describe("The text content of the dictionary entry to match in documents.")
|
|
12
|
+
})).describe("List of dictionary entries to add or delete. Required for 'add_entries' and 'delete_entries' operations. Each entry must have at least a 'text' field.").optional(),
|
|
13
|
+
operation: z.enum([
|
|
14
|
+
"create",
|
|
15
|
+
"list",
|
|
16
|
+
"get",
|
|
17
|
+
"delete",
|
|
18
|
+
"add_entries",
|
|
19
|
+
"get_entries",
|
|
20
|
+
"delete_entries"
|
|
21
|
+
]).describe("The operation to perform: 'create' creates a new dictionary, 'list' lists all dictionaries, 'get' retrieves dictionary details, 'delete' removes a dictionary, 'add_entries' adds entities to a dictionary, 'get_entries' retrieves all entries from a dictionary, 'delete_entries' removes specific entries from a dictionary."),
|
|
22
|
+
dictionary_id: z.string().describe("The unique identifier for the dictionary. Required for all operations except 'list'. Use a descriptive name like 'tech_companies' or 'product_names'.").optional()
|
|
23
|
+
}),
|
|
24
|
+
output: z.object({
|
|
25
|
+
ok: z.boolean().describe("True if the operation was successful."),
|
|
26
|
+
data: z.record(z.string(), z.unknown()).describe("The response data from the operation, if any.").nullable().optional(),
|
|
27
|
+
message: z.string().describe("Response message describing the result of the operation.")
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
export { textrazorDictionaryManager };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=dictionary-manager.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionary-manager.mjs","names":[],"sources":["../../src/actions/dictionary-manager.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const TextrazorDictionaryManagerInput: z.ZodTypeAny = z.object({\n entries: z.array(z.object({\n id: z.string().describe(\"The unique identifier for the dictionary entry. If not provided, TextRazor will generate one automatically.\").optional(),\n data: z.record(z.string(), z.unknown()).describe(\"Additional metadata for the entry. Must be a JSON object where each key is a string and each value is an array of strings (e.g., {'category': ['technology'], 'type': ['company']}).\").optional(),\n text: z.string().describe(\"The text content of the dictionary entry to match in documents.\"),\n})).describe(\"List of dictionary entries to add or delete. Required for 'add_entries' and 'delete_entries' operations. Each entry must have at least a 'text' field.\").optional(),\n operation: z.enum([\"create\", \"list\", \"get\", \"delete\", \"add_entries\", \"get_entries\", \"delete_entries\"]).describe(\"The operation to perform: 'create' creates a new dictionary, 'list' lists all dictionaries, 'get' retrieves dictionary details, 'delete' removes a dictionary, 'add_entries' adds entities to a dictionary, 'get_entries' retrieves all entries from a dictionary, 'delete_entries' removes specific entries from a dictionary.\"),\n dictionary_id: z.string().describe(\"The unique identifier for the dictionary. Required for all operations except 'list'. Use a descriptive name like 'tech_companies' or 'product_names'.\").optional(),\n});\nexport const TextrazorDictionaryManagerOutput: z.ZodTypeAny = z.object({\n ok: z.boolean().describe(\"True if the operation was successful.\"),\n data: z.record(z.string(), z.unknown()).describe(\"The response data from the operation, if any.\").nullable().optional(),\n message: z.string().describe(\"Response message describing the result of the operation.\"),\n});\n\nexport const textrazorDictionaryManager = action(\"TEXTRAZOR_DICTIONARY_MANAGER\", {\n slug: \"textrazor-dictionary-manager\",\n name: \"Dictionary Manager\",\n description: \"Manage custom entity dictionaries in TextRazor for enhanced named entity recognition. This tool enables you to create and manage dictionaries of domain-specific entities (e.g., product names, company names, technical terms) that TextRazor will recognize in text analysis. Operations include: - Creating new dictionaries with configurable matching rules - Listing all available dictionaries - Retrieving dictionary details and configuration - Deleting dictionaries - Adding, retrieving, and removing dictionary entries Note: Dictionaries created here can be used in text analysis by specifying their IDs in the 'entityDictionaries' parameter of TextRazor analysis requests.\",\n input: TextrazorDictionaryManagerInput,\n output: TextrazorDictionaryManagerOutput,\n});\n"],"mappings":";;AAmBA,MAAa,6BAA6B,OAAO,gCAAgC;CAC/E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAnB2D,EAAE,OAAO;EACpE,SAAS,EAAE,MAAM,EAAE,OAAO;GAC1B,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,6GAA6G,CAAC,CAAC,SAAS;GAChJ,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,sLAAsL,CAAC,CAAC,SAAS;GAClP,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE;EAC7F,CAAC,CAAC,CAAC,CAAC,SAAS,wJAAwJ,CAAC,CAAC,SAAS;EAC9K,WAAW,EAAE,KAAK;GAAC;GAAU;GAAQ;GAAO;GAAU;GAAe;GAAe;EAAgB,CAAC,CAAC,CAAC,SAAS,iUAAiU;EACjb,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,uJAAuJ,CAAC,CAAC,SAAS;CACvM,CAWS;CACP,QAX4D,EAAE,OAAO;EACrE,IAAI,EAAE,QAAQ,CAAC,CAAC,SAAS,uCAAuC;EAChE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACtH,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D;CACzF,CAOU;AACV,CAAC"}
|