@zuora/agent-toolkit 0.0.1-alpha.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 +298 -0
- package/dist/async-jobs-Dd8Jafv0.d.ts +532 -0
- package/dist/bundle-catalog-3V6EICKE.json +289 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +496 -0
- package/dist/index.js.map +1 -0
- package/dist/langchain/index.d.ts +2 -0
- package/dist/langchain/index.js +1 -0
- package/dist/langchain/index.js.map +1 -0
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/openai/index.d.ts +165 -0
- package/dist/openai/index.js +5257 -0
- package/dist/openai/index.js.map +1 -0
- package/dist/openai-agents/index.d.ts +94 -0
- package/dist/openai-agents/index.js +5203 -0
- package/dist/openai-agents/index.js.map +1 -0
- package/dist/shared/resources/bundle-catalog.json +289 -0
- package/dist/shared/toolkit-core.d.ts +73 -0
- package/dist/shared/toolkit-core.js +4686 -0
- package/dist/shared/toolkit-core.js.map +1 -0
- package/dist/toolkit-CafRZuAV.d.ts +31 -0
- package/dist/vercel-ai/index.d.ts +2 -0
- package/dist/vercel-ai/index.js +1 -0
- package/dist/vercel-ai/index.js.map +1 -0
- package/package.json +95 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ChatCompletionTool } from 'openai/resources/chat/completions';
|
|
2
|
+
import { ToolkitCore } from './shared/toolkit-core.js';
|
|
3
|
+
import { Z as ZuoraToolDefinition, a as ZuoraAgentToolkitConfigInput } from './async-jobs-Dd8Jafv0.js';
|
|
4
|
+
|
|
5
|
+
declare class ZuoraOpenAIAgentToolkit extends ToolkitCore<ChatCompletionTool> {
|
|
6
|
+
private toolIndex;
|
|
7
|
+
protected convertTools(tools: ZuoraToolDefinition[]): ChatCompletionTool[];
|
|
8
|
+
resolveToolName(sanitizedName: string): string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Resolves a sanitized adapter tool name to the full `ZuoraToolDefinition`.
|
|
11
|
+
* Used by `handleToolCalls` to pass the definition to the `shouldExecute` hook
|
|
12
|
+
* without an async catalog scan.
|
|
13
|
+
*/
|
|
14
|
+
resolveToolDefinition(sanitizedName: string): ZuoraToolDefinition | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Returns the subset of `ChatCompletionTool[]` corresponding to the given
|
|
17
|
+
* tool names. Used to narrow the tool list after an async job starts, so the
|
|
18
|
+
* model is presented only with the relevant follow-up (polling) tools.
|
|
19
|
+
*
|
|
20
|
+
* Looks up tools from the full normalized catalog (not the current active
|
|
21
|
+
* tool list), so it works correctly even when `getTools()` was called with a
|
|
22
|
+
* `maxTools` limit that excluded some tools. Tool names that are not found in
|
|
23
|
+
* the catalog are silently skipped. Returns an empty array when none match.
|
|
24
|
+
*
|
|
25
|
+
* @param toolNames - The original (unsanitized) tool names to include.
|
|
26
|
+
*/
|
|
27
|
+
loadFollowUpTools(toolNames: string[]): ChatCompletionTool[];
|
|
28
|
+
}
|
|
29
|
+
declare const createZuoraOpenAIAgentToolkit: (config: ZuoraAgentToolkitConfigInput) => Promise<ZuoraOpenAIAgentToolkit>;
|
|
30
|
+
|
|
31
|
+
export { ZuoraOpenAIAgentToolkit as Z, createZuoraOpenAIAgentToolkit as c };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zuora/agent-toolkit",
|
|
3
|
+
"version": "0.0.1-alpha.0",
|
|
4
|
+
"description": "Zuora billing operations as callable tools for AI agent frameworks.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"./openai": {
|
|
12
|
+
"types": "./dist/openai/index.d.ts",
|
|
13
|
+
"import": "./dist/openai/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./openai-agents": {
|
|
16
|
+
"types": "./dist/openai-agents/index.d.ts",
|
|
17
|
+
"import": "./dist/openai-agents/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./langchain": {
|
|
20
|
+
"types": "./dist/langchain/index.d.ts",
|
|
21
|
+
"import": "./dist/langchain/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./vercel-ai": {
|
|
24
|
+
"types": "./dist/vercel-ai/index.d.ts",
|
|
25
|
+
"import": "./dist/vercel-ai/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./mcp": {
|
|
28
|
+
"types": "./dist/mcp/index.d.ts",
|
|
29
|
+
"import": "./dist/mcp/index.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"main": "./dist/index.js",
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"files": [
|
|
35
|
+
"dist"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsup",
|
|
39
|
+
"typecheck": "tsc --noEmit",
|
|
40
|
+
"typecheck:examples": "tsc -p tsconfig.examples.json",
|
|
41
|
+
"test": "jest --passWithNoTests",
|
|
42
|
+
"test:unit": "jest --passWithNoTests",
|
|
43
|
+
"lint": "eslint ./src"
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"zuora",
|
|
47
|
+
"mcp",
|
|
48
|
+
"agents",
|
|
49
|
+
"toolkit",
|
|
50
|
+
"typescript"
|
|
51
|
+
],
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=18"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"@langchain/core": ">=0.3.0",
|
|
58
|
+
"@openai/agents": ">=0.13.0",
|
|
59
|
+
"ai": ">=4.0.0",
|
|
60
|
+
"openai": ">=4.0.0",
|
|
61
|
+
"zod": ">=3.0.0"
|
|
62
|
+
},
|
|
63
|
+
"peerDependenciesOptional": {
|
|
64
|
+
"openai": true,
|
|
65
|
+
"@langchain/core": true,
|
|
66
|
+
"@openai/agents": true,
|
|
67
|
+
"ai": true,
|
|
68
|
+
"zod": true
|
|
69
|
+
},
|
|
70
|
+
"pnpm": {
|
|
71
|
+
"onlyBuiltDependencies": [
|
|
72
|
+
"esbuild"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@eslint/js": "^9.0.0",
|
|
77
|
+
"@openai/agents": "^0.13.4",
|
|
78
|
+
"@types/jest": "^29.0.0",
|
|
79
|
+
"@types/node": "^22.0.0",
|
|
80
|
+
"dotenv": "^17.4.2",
|
|
81
|
+
"eslint": "^9.0.0",
|
|
82
|
+
"jest": "^29.0.0",
|
|
83
|
+
"ts-jest": "^29.0.0",
|
|
84
|
+
"ts-node": "^10.9.2",
|
|
85
|
+
"tsup": "^8.0.0",
|
|
86
|
+
"typescript": "^5.5.0",
|
|
87
|
+
"typescript-eslint": "^8.0.0",
|
|
88
|
+
"zod": "^4.4.3"
|
|
89
|
+
},
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"@aws-sdk/credential-provider-node": "^3.972.72",
|
|
92
|
+
"@smithy/hash-node": "^4.4.14",
|
|
93
|
+
"@smithy/signature-v4": "^5.6.10"
|
|
94
|
+
}
|
|
95
|
+
}
|