@purpleschool/gptbot 0.13.13 → 0.13.15-stage2
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/api/controllers/http/agents/agent-tool.ts +1 -2
- package/api/controllers/http/index.ts +0 -1
- package/api/routes.ts +2 -4
- package/build/api/controllers/http/agents/agent-tool.js +1 -2
- package/build/api/controllers/http/index.js +0 -1
- package/build/api/routes.js +1 -2
- package/build/commands/agents/agent-tool/find-agent-tools-catalog.command.js +0 -2
- package/build/commands/agents/agent-tool/find-agent-tools.command.js +0 -2
- package/build/commands/ai-studio/canvas-tool/index.js +0 -1
- package/build/commands/payment/check.command.js +1 -1
- package/build/commands/payment/pay.command.js +1 -1
- package/build/commands/payment/receipt.command.js +1 -1
- package/build/models/canvas-node.schema.js +2 -2
- package/commands/agents/agent-tool/find-agent-tools-catalog.command.ts +0 -2
- package/commands/agents/agent-tool/find-agent-tools.command.ts +0 -2
- package/commands/ai-studio/canvas-tool/index.ts +0 -1
- package/commands/payment/check.command.ts +1 -1
- package/commands/payment/pay.command.ts +1 -1
- package/commands/payment/receipt.command.ts +1 -1
- package/models/canvas-node.schema.ts +2 -2
- package/package.json +1 -1
- package/api/controllers/http/canvas-var-generation.ts +0 -7
- package/build/api/controllers/http/canvas-var-generation.js +0 -9
- package/build/commands/ai-studio/canvas-tool/var-gen/generate-variables.command.js +0 -18
- package/build/commands/ai-studio/canvas-tool/var-gen/get-var-gen-config.command.js +0 -11
- package/build/commands/ai-studio/canvas-tool/var-gen/get-var-gen-price.command.js +0 -18
- package/build/commands/ai-studio/canvas-tool/var-gen/index.js +0 -19
- package/commands/ai-studio/canvas-tool/var-gen/generate-variables.command.ts +0 -20
- package/commands/ai-studio/canvas-tool/var-gen/get-var-gen-config.command.ts +0 -9
- package/commands/ai-studio/canvas-tool/var-gen/get-var-gen-price.command.ts +0 -18
- package/commands/ai-studio/canvas-tool/var-gen/index.ts +0 -3
|
@@ -2,8 +2,7 @@ export const AGENT_TOOL_CONTROLLER_PRIVATE = 'private/agents-tools' as const;
|
|
|
2
2
|
|
|
3
3
|
export const AGENT_TOOL_ROUTES = {
|
|
4
4
|
CATALOG: 'catalog',
|
|
5
|
-
|
|
6
|
-
CONNECT_AGENT_TOOL: (agentId: string) => `${agentId}`,
|
|
5
|
+
LIST_OR_CONNECT: (agentId: string) => `${agentId}`,
|
|
7
6
|
UPDATE: (agentId: string, id: string) => `${agentId}/${id}`,
|
|
8
7
|
DISCONNECT: (agentId: string, id: string) => `${agentId}/${id}`,
|
|
9
8
|
} as const;
|
package/api/routes.ts
CHANGED
|
@@ -173,10 +173,8 @@ export const REST_API = {
|
|
|
173
173
|
},
|
|
174
174
|
AGENT_TOOL_PRIVATE: {
|
|
175
175
|
CATALOG: `${ROOT}/${CONTROLLERS.AGENT_TOOL_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_TOOL_ROUTES.CATALOG}`,
|
|
176
|
-
|
|
177
|
-
`${ROOT}/${CONTROLLERS.AGENT_TOOL_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_TOOL_ROUTES.
|
|
178
|
-
CONNECT_AGENT_TOOL: (agentId: string): string =>
|
|
179
|
-
`${ROOT}/${CONTROLLERS.AGENT_TOOL_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_TOOL_ROUTES.CONNECT_AGENT_TOOL(agentId)}`,
|
|
176
|
+
LIST_OR_CONNECT: (agentId: string): string =>
|
|
177
|
+
`${ROOT}/${CONTROLLERS.AGENT_TOOL_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_TOOL_ROUTES.LIST_OR_CONNECT(agentId)}`,
|
|
180
178
|
UPDATE: (agentId: string, id: string): string =>
|
|
181
179
|
`${ROOT}/${CONTROLLERS.AGENT_TOOL_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_TOOL_ROUTES.UPDATE(agentId, id)}`,
|
|
182
180
|
DISCONNECT: (agentId: string, id: string): string =>
|
|
@@ -4,8 +4,7 @@ exports.AGENT_TOOL_ROUTES = exports.AGENT_TOOL_CONTROLLER_PRIVATE = void 0;
|
|
|
4
4
|
exports.AGENT_TOOL_CONTROLLER_PRIVATE = 'private/agents-tools';
|
|
5
5
|
exports.AGENT_TOOL_ROUTES = {
|
|
6
6
|
CATALOG: 'catalog',
|
|
7
|
-
|
|
8
|
-
CONNECT_AGENT_TOOL: (agentId) => `${agentId}`,
|
|
7
|
+
LIST_OR_CONNECT: (agentId) => `${agentId}`,
|
|
9
8
|
UPDATE: (agentId, id) => `${agentId}/${id}`,
|
|
10
9
|
DISCONNECT: (agentId, id) => `${agentId}/${id}`,
|
|
11
10
|
};
|
|
@@ -91,5 +91,4 @@ __exportStar(require("./spell-corrector"), exports);
|
|
|
91
91
|
__exportStar(require("./tool-workspace"), exports);
|
|
92
92
|
__exportStar(require("./html-page-builder"), exports);
|
|
93
93
|
__exportStar(require("./palette"), exports);
|
|
94
|
-
__exportStar(require("./canvas-var-generation"), exports);
|
|
95
94
|
__exportStar(require("./canvas-template"), exports);
|
package/build/api/routes.js
CHANGED
|
@@ -168,8 +168,7 @@ exports.REST_API = {
|
|
|
168
168
|
},
|
|
169
169
|
AGENT_TOOL_PRIVATE: {
|
|
170
170
|
CATALOG: `${exports.ROOT}/${CONTROLLERS.AGENT_TOOL_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_TOOL_ROUTES.CATALOG}`,
|
|
171
|
-
|
|
172
|
-
CONNECT_AGENT_TOOL: (agentId) => `${exports.ROOT}/${CONTROLLERS.AGENT_TOOL_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_TOOL_ROUTES.CONNECT_AGENT_TOOL(agentId)}`,
|
|
171
|
+
LIST_OR_CONNECT: (agentId) => `${exports.ROOT}/${CONTROLLERS.AGENT_TOOL_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_TOOL_ROUTES.LIST_OR_CONNECT(agentId)}`,
|
|
173
172
|
UPDATE: (agentId, id) => `${exports.ROOT}/${CONTROLLERS.AGENT_TOOL_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_TOOL_ROUTES.UPDATE(agentId, id)}`,
|
|
174
173
|
DISCONNECT: (agentId, id) => `${exports.ROOT}/${CONTROLLERS.AGENT_TOOL_CONTROLLER_PRIVATE}/${CONTROLLERS.AGENT_TOOL_ROUTES.DISCONNECT(agentId, id)}`,
|
|
175
174
|
},
|
|
@@ -11,7 +11,5 @@ var FindAgentToolsCatalogCommand;
|
|
|
11
11
|
});
|
|
12
12
|
FindAgentToolsCatalogCommand.ResponseSchema = zod_1.z.object({
|
|
13
13
|
data: zod_1.z.array(agent_tool_catalog_schema_1.AgentToolCatalogSchema),
|
|
14
|
-
totalPages: zod_1.z.number(),
|
|
15
|
-
page: zod_1.z.number(),
|
|
16
14
|
});
|
|
17
15
|
})(FindAgentToolsCatalogCommand || (exports.FindAgentToolsCatalogCommand = FindAgentToolsCatalogCommand = {}));
|
|
@@ -10,7 +10,5 @@ var FindAgentToolsCommand;
|
|
|
10
10
|
});
|
|
11
11
|
FindAgentToolsCommand.ResponseSchema = zod_1.z.object({
|
|
12
12
|
data: zod_1.z.array(agent_tool_schema_1.AgentToolSchema),
|
|
13
|
-
totalPages: zod_1.z.number(),
|
|
14
|
-
page: zod_1.z.number(),
|
|
15
13
|
});
|
|
16
14
|
})(FindAgentToolsCommand || (exports.FindAgentToolsCommand = FindAgentToolsCommand = {}));
|
|
@@ -16,4 +16,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./palette"), exports);
|
|
18
18
|
__exportStar(require("./text-gen"), exports);
|
|
19
|
-
__exportStar(require("./var-gen"), exports);
|
|
@@ -7,7 +7,7 @@ var CheckCommand;
|
|
|
7
7
|
CheckCommand.RequestSchema = zod_1.z
|
|
8
8
|
.object({
|
|
9
9
|
TransactionId: zod_1.z.string().transform((transactionId) => parseInt(transactionId, 10)),
|
|
10
|
-
Amount: zod_1.z.
|
|
10
|
+
Amount: zod_1.z.coerce.number(),
|
|
11
11
|
Currency: zod_1.z.string(),
|
|
12
12
|
PaymentAmount: zod_1.z.string(),
|
|
13
13
|
PaymentCurrency: zod_1.z.string(),
|
|
@@ -7,7 +7,7 @@ var PayCommand;
|
|
|
7
7
|
PayCommand.RequestSchema = zod_1.z
|
|
8
8
|
.object({
|
|
9
9
|
TransactionId: zod_1.z.string().transform((transactionId) => parseInt(transactionId, 10)),
|
|
10
|
-
Amount: zod_1.z.
|
|
10
|
+
Amount: zod_1.z.coerce.number(),
|
|
11
11
|
Currency: zod_1.z.string(),
|
|
12
12
|
PaymentAmount: zod_1.z.string(),
|
|
13
13
|
PaymentCurrency: zod_1.z.string(),
|
|
@@ -21,7 +21,7 @@ var ReceiptCommand;
|
|
|
21
21
|
Url: zod_1.z.string(),
|
|
22
22
|
QrCodeUrl: zod_1.z.string(),
|
|
23
23
|
TransactionId: zod_1.z.string(),
|
|
24
|
-
Amount: zod_1.z.
|
|
24
|
+
Amount: zod_1.z.coerce.number(),
|
|
25
25
|
DateTime: zod_1.z.string(),
|
|
26
26
|
InvoiceId: zod_1.z.string().optional(),
|
|
27
27
|
SubscriptionId: zod_1.z.string().optional(),
|
|
@@ -68,7 +68,7 @@ exports.MotionControlParamsSchema = strictObject({
|
|
|
68
68
|
mode: zod_1.z.union([zod_1.z.literal('720p'), zod_1.z.literal('1080p')]),
|
|
69
69
|
});
|
|
70
70
|
exports.VarGenParamsSchema = strictObject({
|
|
71
|
-
prompt: zod_1.z.string()
|
|
71
|
+
prompt: zod_1.z.string(),
|
|
72
72
|
modelId: zod_1.z.string(),
|
|
73
73
|
modelName: zod_1.z.string(),
|
|
74
74
|
});
|
|
@@ -101,7 +101,7 @@ exports.MotionControlOutputSchema = strictObject({
|
|
|
101
101
|
resultUrl: zod_1.z.string(),
|
|
102
102
|
});
|
|
103
103
|
exports.VarGenOutputSchema = strictObject({
|
|
104
|
-
variables: zod_1.z.record(zod_1.z.string()
|
|
104
|
+
variables: zod_1.z.record(zod_1.z.string()),
|
|
105
105
|
});
|
|
106
106
|
exports.HtmlGenOutputSchema = strictObject({
|
|
107
107
|
sessionId: zod_1.z.string(),
|
|
@@ -4,7 +4,7 @@ export namespace CheckCommand {
|
|
|
4
4
|
export const RequestSchema = z
|
|
5
5
|
.object({
|
|
6
6
|
TransactionId: z.string().transform((transactionId) => parseInt(transactionId, 10)),
|
|
7
|
-
Amount: z.
|
|
7
|
+
Amount: z.coerce.number(),
|
|
8
8
|
Currency: z.string(),
|
|
9
9
|
PaymentAmount: z.string(),
|
|
10
10
|
PaymentCurrency: z.string(),
|
|
@@ -4,7 +4,7 @@ export namespace PayCommand {
|
|
|
4
4
|
export const RequestSchema = z
|
|
5
5
|
.object({
|
|
6
6
|
TransactionId: z.string().transform((transactionId) => parseInt(transactionId, 10)),
|
|
7
|
-
Amount: z.
|
|
7
|
+
Amount: z.coerce.number(),
|
|
8
8
|
Currency: z.string(),
|
|
9
9
|
PaymentAmount: z.string(),
|
|
10
10
|
PaymentCurrency: z.string(),
|
|
@@ -18,7 +18,7 @@ export namespace ReceiptCommand {
|
|
|
18
18
|
Url: z.string(),
|
|
19
19
|
QrCodeUrl: z.string(),
|
|
20
20
|
TransactionId: z.string(),
|
|
21
|
-
Amount: z.
|
|
21
|
+
Amount: z.coerce.number(),
|
|
22
22
|
DateTime: z.string(),
|
|
23
23
|
InvoiceId: z.string().optional(),
|
|
24
24
|
SubscriptionId: z.string().optional(),
|
|
@@ -84,7 +84,7 @@ export const MotionControlParamsSchema = strictObject({
|
|
|
84
84
|
export type MotionControlParams = z.infer<typeof MotionControlParamsSchema>;
|
|
85
85
|
|
|
86
86
|
export const VarGenParamsSchema = strictObject({
|
|
87
|
-
prompt: z.string()
|
|
87
|
+
prompt: z.string(),
|
|
88
88
|
modelId: z.string(),
|
|
89
89
|
modelName: z.string(),
|
|
90
90
|
});
|
|
@@ -137,7 +137,7 @@ export const MotionControlOutputSchema = strictObject({
|
|
|
137
137
|
export type MotionControlOutput = z.infer<typeof MotionControlOutputSchema>;
|
|
138
138
|
|
|
139
139
|
export const VarGenOutputSchema = strictObject({
|
|
140
|
-
variables: z.record(z.string()
|
|
140
|
+
variables: z.record(z.string()),
|
|
141
141
|
});
|
|
142
142
|
export type VarGenOutput = z.infer<typeof VarGenOutputSchema>;
|
|
143
143
|
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CANVAS_VAR_GENERATION_ROUTES = exports.CANVAS_VAR_GENERATION_PRIVATE = void 0;
|
|
4
|
-
exports.CANVAS_VAR_GENERATION_PRIVATE = 'private/ai-canvas/tools/var-gen';
|
|
5
|
-
exports.CANVAS_VAR_GENERATION_ROUTES = {
|
|
6
|
-
CONFIG: 'config',
|
|
7
|
-
PRICE: 'price',
|
|
8
|
-
GENERATE: 'generate',
|
|
9
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GenerateVariablesCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../../../models");
|
|
6
|
-
var GenerateVariablesCommand;
|
|
7
|
-
(function (GenerateVariablesCommand) {
|
|
8
|
-
GenerateVariablesCommand.OutputSchema = models_1.VarGenOutputSchema;
|
|
9
|
-
GenerateVariablesCommand.RequestSchema = zod_1.z.object({
|
|
10
|
-
nodeUuid: zod_1.z.string().uuid(),
|
|
11
|
-
canvasId: zod_1.z.string().uuid(),
|
|
12
|
-
modelId: zod_1.z.string().uuid(),
|
|
13
|
-
prompt: zod_1.z.string().min(1),
|
|
14
|
-
});
|
|
15
|
-
GenerateVariablesCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
-
data: GenerateVariablesCommand.OutputSchema,
|
|
17
|
-
});
|
|
18
|
-
})(GenerateVariablesCommand || (exports.GenerateVariablesCommand = GenerateVariablesCommand = {}));
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetVarGenConfigCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../../../models");
|
|
6
|
-
var GetVarGenConfigCommand;
|
|
7
|
-
(function (GetVarGenConfigCommand) {
|
|
8
|
-
GetVarGenConfigCommand.ResponseSchema = zod_1.z.object({
|
|
9
|
-
data: zod_1.z.array(models_1.AiModelSchema),
|
|
10
|
-
});
|
|
11
|
-
})(GetVarGenConfigCommand || (exports.GetVarGenConfigCommand = GetVarGenConfigCommand = {}));
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetVarGenPriceCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
var GetVarGenPriceCommand;
|
|
6
|
-
(function (GetVarGenPriceCommand) {
|
|
7
|
-
GetVarGenPriceCommand.RequestSchema = zod_1.z.object({
|
|
8
|
-
modelId: zod_1.z.string().uuid(),
|
|
9
|
-
promptLength: zod_1.z.coerce.number().int().positive(),
|
|
10
|
-
});
|
|
11
|
-
GetVarGenPriceCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
-
data: zod_1.z.object({
|
|
13
|
-
price: zod_1.z.number(),
|
|
14
|
-
charsUntilNextPriceIncrease: zod_1.z.number().int().nonnegative().nullable().optional(),
|
|
15
|
-
charsUntilNextPriceDecrease: zod_1.z.number().int().nonnegative().nullable().optional(),
|
|
16
|
-
}),
|
|
17
|
-
});
|
|
18
|
-
})(GetVarGenPriceCommand || (exports.GetVarGenPriceCommand = GetVarGenPriceCommand = {}));
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./generate-variables.command"), exports);
|
|
18
|
-
__exportStar(require("./get-var-gen-config.command"), exports);
|
|
19
|
-
__exportStar(require("./get-var-gen-price.command"), exports);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { VarGenOutputSchema } from '../../../../models';
|
|
3
|
-
|
|
4
|
-
export namespace GenerateVariablesCommand {
|
|
5
|
-
export const OutputSchema = VarGenOutputSchema;
|
|
6
|
-
export type Output = z.infer<typeof OutputSchema>;
|
|
7
|
-
|
|
8
|
-
export const RequestSchema = z.object({
|
|
9
|
-
nodeUuid: z.string().uuid(),
|
|
10
|
-
canvasId: z.string().uuid(),
|
|
11
|
-
modelId: z.string().uuid(),
|
|
12
|
-
prompt: z.string().min(1),
|
|
13
|
-
});
|
|
14
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
15
|
-
|
|
16
|
-
export const ResponseSchema = z.object({
|
|
17
|
-
data: OutputSchema,
|
|
18
|
-
});
|
|
19
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { AiModelSchema } from '../../../../models';
|
|
3
|
-
|
|
4
|
-
export namespace GetVarGenConfigCommand {
|
|
5
|
-
export const ResponseSchema = z.object({
|
|
6
|
-
data: z.array(AiModelSchema),
|
|
7
|
-
});
|
|
8
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
9
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
export namespace GetVarGenPriceCommand {
|
|
4
|
-
export const RequestSchema = z.object({
|
|
5
|
-
modelId: z.string().uuid(),
|
|
6
|
-
promptLength: z.coerce.number().int().positive(),
|
|
7
|
-
});
|
|
8
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
9
|
-
|
|
10
|
-
export const ResponseSchema = z.object({
|
|
11
|
-
data: z.object({
|
|
12
|
-
price: z.number(),
|
|
13
|
-
charsUntilNextPriceIncrease: z.number().int().nonnegative().nullable().optional(),
|
|
14
|
-
charsUntilNextPriceDecrease: z.number().int().nonnegative().nullable().optional(),
|
|
15
|
-
}),
|
|
16
|
-
});
|
|
17
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
-
}
|