ttc-ai-chat-sdk 0.0.1-beta
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 +2 -0
- package/dist/construct.d.ts +8 -0
- package/dist/construct.d.ts.map +1 -0
- package/dist/construct.js +39 -0
- package/dist/construct.js.map +1 -0
- package/dist/core.d.ts +61 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +460 -0
- package/dist/core.js.map +1 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -0
- package/dist/internal.d.ts +53 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +157 -0
- package/dist/internal.js.map +1 -0
- package/dist/ttcAI.d.ts +61 -0
- package/dist/ttcAI.d.ts.map +1 -0
- package/dist/ttcAI.js +132 -0
- package/dist/ttcAI.js.map +1 -0
- package/dist/ttc_server.d.ts +222 -0
- package/dist/ttc_server.d.ts.map +1 -0
- package/dist/ttc_server.js +311 -0
- package/dist/ttc_server.js.map +1 -0
- package/dist/types.d.ts +46 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/eventEmitter.d.ts +17 -0
- package/dist/utils/eventEmitter.d.ts.map +1 -0
- package/dist/utils/eventEmitter.js +47 -0
- package/dist/utils/eventEmitter.js.map +1 -0
- package/dist/utils/zodToTs.d.ts +25 -0
- package/dist/utils/zodToTs.d.ts.map +1 -0
- package/dist/utils/zodToTs.js +85 -0
- package/dist/utils/zodToTs.js.map +1 -0
- package/package.json +68 -0
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class TTCContruct {
|
|
2
|
+
description: string;
|
|
3
|
+
callbacks: Record<string, (data: any) => void>;
|
|
4
|
+
constructor(description: string);
|
|
5
|
+
randId: () => string;
|
|
6
|
+
run(conversation_id: string, instruction: string): Promise<any>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=construct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"construct.d.ts","sourceRoot":"","sources":["../src/construct.ts"],"names":[],"mappings":"AAOA,qBAAa,WAAW;IAEpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC,CAAM;gBACxC,WAAW,EAAE,MAAM;IAI/B,MAAM,eAKL;IAED,GAAG,CAAC,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;CAsBnD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TTCContruct = void 0;
|
|
4
|
+
const core_1 = require("./core");
|
|
5
|
+
class TTCContruct {
|
|
6
|
+
constructor(description) {
|
|
7
|
+
this.callbacks = {};
|
|
8
|
+
this.randId = () => {
|
|
9
|
+
return 'xxxxxx'.replace(/[x]/g, () => {
|
|
10
|
+
const r = Math.random() * 16 | 0;
|
|
11
|
+
return r.toString(16);
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
this.description = description;
|
|
15
|
+
}
|
|
16
|
+
run(conversation_id, instruction) {
|
|
17
|
+
const request_id = this.randId();
|
|
18
|
+
core_1.ttc.server.TCC.invoke_construct(conversation_id, {
|
|
19
|
+
description: this.description,
|
|
20
|
+
instruction: instruction,
|
|
21
|
+
construct_id: request_id
|
|
22
|
+
});
|
|
23
|
+
return new Promise((resolve, reject) => {
|
|
24
|
+
this.callbacks[request_id] = (data) => {
|
|
25
|
+
resolve(data);
|
|
26
|
+
delete this.callbacks[request_id];
|
|
27
|
+
};
|
|
28
|
+
// Optionally, you can add a timeout to reject the promise if no response is received
|
|
29
|
+
setTimeout(() => {
|
|
30
|
+
if (this.callbacks[request_id]) {
|
|
31
|
+
reject(new Error('Timeout waiting for construct response'));
|
|
32
|
+
delete this.callbacks[request_id];
|
|
33
|
+
}
|
|
34
|
+
}, 30000); // 30 seconds timeout
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.TTCContruct = TTCContruct;
|
|
39
|
+
//# sourceMappingURL=construct.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"construct.js","sourceRoot":"","sources":["../src/construct.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAO7B,MAAa,WAAW;IAIpB,YAAY,WAAmB;QAD/B,cAAS,GAAwC,EAAE,CAAC;QAKpD,WAAM,GAAG,GAAG,EAAE;YACV,OAAO,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE;gBACjC,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;gBACjC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAC1B,CAAC,CAAC,CAAC;QACP,CAAC,CAAA;QARG,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;IASD,GAAG,CAAC,eAAuB,EAAE,WAAmB;QAC5C,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACjC,UAAG,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,eAAe,EAAE;YAC7C,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,WAAW;YACxB,YAAY,EAAE,UAAU;SAC3B,CAAC,CAAA;QAEF,OAAO,IAAI,OAAO,CAAM,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACxC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,IAAS,EAAE,EAAE;gBACvC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACd,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YACtC,CAAC,CAAC;YACF,qFAAqF;YACrF,UAAU,CAAC,GAAG,EAAE;gBACZ,IAAI,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE;oBAC5B,MAAM,CAAC,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC,CAAC;oBAC5D,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;iBACrC;YACL,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,qBAAqB;QACpC,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AArCD,kCAqCC"}
|
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { ZodSchema } from "zod";
|
|
3
|
+
import { Socket } from "socket.io-client";
|
|
4
|
+
import { ttcAI } from "./ttcAI";
|
|
5
|
+
import { ClassType, f_call, RegistryEntry, RPCMethodInfo, rpcResponseType, ttc_event } from "./types";
|
|
6
|
+
import { RPCClient } from "./ttc_server";
|
|
7
|
+
import { TTCContruct } from "./construct";
|
|
8
|
+
export declare class ttc {
|
|
9
|
+
private static publickKey;
|
|
10
|
+
private static rpcRegistry;
|
|
11
|
+
static server: RPCClient;
|
|
12
|
+
static socket?: Socket;
|
|
13
|
+
private static event;
|
|
14
|
+
static ai: ttcAI;
|
|
15
|
+
static app_id: string;
|
|
16
|
+
static permissions: Record<string, (permitted: boolean) => void>;
|
|
17
|
+
private static socketCb;
|
|
18
|
+
private static createZodSchemaFromParams;
|
|
19
|
+
private static getZodTypeName;
|
|
20
|
+
static instance<T extends ClassType | string>(name: T): T extends ClassType ? InstanceType<T> : T extends string ? any : never;
|
|
21
|
+
static describe: (config?: {
|
|
22
|
+
doc?: string;
|
|
23
|
+
inputSchema?: ZodSchema<any>;
|
|
24
|
+
outputSchema?: ZodSchema<any>;
|
|
25
|
+
validate?: boolean;
|
|
26
|
+
}) => (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
27
|
+
static requestContext(args: IArguments): {
|
|
28
|
+
socket?: Socket;
|
|
29
|
+
_scid: string;
|
|
30
|
+
};
|
|
31
|
+
static invoke(method: string, args: any[], requestConfig: {
|
|
32
|
+
socket?: Socket;
|
|
33
|
+
_scid: string;
|
|
34
|
+
}): Promise<rpcResponseType>;
|
|
35
|
+
static init(config: {
|
|
36
|
+
app_id: string;
|
|
37
|
+
publickKey?: string;
|
|
38
|
+
modules: any[];
|
|
39
|
+
socketCb?: (socket: Socket) => Promise<any>;
|
|
40
|
+
}): typeof ttc;
|
|
41
|
+
private static handleSocket;
|
|
42
|
+
static hook(modules: ClassType[]): void;
|
|
43
|
+
static connect(): void;
|
|
44
|
+
static getRegistry(): Record<string, RegistryEntry>;
|
|
45
|
+
static generateRPCMethodsList(): Promise<RPCMethodInfo[]>;
|
|
46
|
+
private static getOriginFunctions;
|
|
47
|
+
private static fetchOriginFunction;
|
|
48
|
+
private static invoke_origin;
|
|
49
|
+
static createConstruct(description: string): Promise<TTCContruct>;
|
|
50
|
+
static approveFunction(id: string, approval: boolean): Promise<void>;
|
|
51
|
+
static askPermission(id: string, func: f_call, cb: (permitted: boolean) => void): Promise<void>;
|
|
52
|
+
static subscribe(event: ttc_event, cb: (payload: {
|
|
53
|
+
id: string;
|
|
54
|
+
payload: any;
|
|
55
|
+
}) => void): Promise<void>;
|
|
56
|
+
static emit(event: ttc_event, data: {
|
|
57
|
+
id: string;
|
|
58
|
+
payload: any;
|
|
59
|
+
}): Promise<void>;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAU,SAAS,EAAK,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,OAAO,EAAE,SAAS,EAAE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}
|
package/dist/core.js
ADDED
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
var _a;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.ttc = void 0;
|
|
8
|
+
require("reflect-metadata");
|
|
9
|
+
const typedi_1 = __importDefault(require("typedi"));
|
|
10
|
+
const zod_1 = require("zod");
|
|
11
|
+
const ttcAI_1 = require("./ttcAI");
|
|
12
|
+
// Choose appropriate EventEmitter for runtime (Node or Browser)
|
|
13
|
+
const eventEmitter_1 = require("./utils/eventEmitter");
|
|
14
|
+
const ttc_server_1 = require("./ttc_server");
|
|
15
|
+
const zodToTs_1 = require("./utils/zodToTs");
|
|
16
|
+
const construct_1 = require("./construct");
|
|
17
|
+
const EventEmitter = (0, eventEmitter_1.getEventEmitterClass)();
|
|
18
|
+
const zodToJsonSchema = zod_1.z.toJSONSchema;
|
|
19
|
+
class ttc {
|
|
20
|
+
// Helper function to convert TypeScript types to Zod schemas
|
|
21
|
+
static createZodSchemaFromParams(paramNames, paramTypes) {
|
|
22
|
+
if (paramNames.length === 0) {
|
|
23
|
+
return zod_1.z.object({});
|
|
24
|
+
}
|
|
25
|
+
const schemaFields = {};
|
|
26
|
+
paramNames.forEach((name, index) => {
|
|
27
|
+
const type = paramTypes[index];
|
|
28
|
+
const typeName = type?.name?.toLowerCase() || 'unknown';
|
|
29
|
+
switch (typeName) {
|
|
30
|
+
case 'string':
|
|
31
|
+
schemaFields[name] = zod_1.z.string();
|
|
32
|
+
break;
|
|
33
|
+
case 'number':
|
|
34
|
+
schemaFields[name] = zod_1.z.number();
|
|
35
|
+
break;
|
|
36
|
+
case 'boolean':
|
|
37
|
+
schemaFields[name] = zod_1.z.boolean();
|
|
38
|
+
break;
|
|
39
|
+
case 'array':
|
|
40
|
+
schemaFields[name] = zod_1.z.array(zod_1.z.any());
|
|
41
|
+
break;
|
|
42
|
+
case 'object':
|
|
43
|
+
schemaFields[name] = zod_1.z.object({}).passthrough();
|
|
44
|
+
break;
|
|
45
|
+
case 'date':
|
|
46
|
+
schemaFields[name] = zod_1.z.date();
|
|
47
|
+
break;
|
|
48
|
+
default:
|
|
49
|
+
// For unknown types, use z.any()
|
|
50
|
+
schemaFields[name] = zod_1.z.any();
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return zod_1.z.object(schemaFields);
|
|
55
|
+
}
|
|
56
|
+
// Helper function to extract type names from Zod schemas
|
|
57
|
+
static getZodTypeName(properties) {
|
|
58
|
+
const params = {};
|
|
59
|
+
for (const key in properties) {
|
|
60
|
+
if (properties.hasOwnProperty(key)) {
|
|
61
|
+
if (properties[key].type === 'object' && properties[key].properties) {
|
|
62
|
+
params[key] = _a.getZodTypeName(properties[key].properties);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
params[key] = properties[key].type || "any";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return params;
|
|
70
|
+
}
|
|
71
|
+
static instance(name) {
|
|
72
|
+
const finalName = typeof name === 'string' ? name : name.name;
|
|
73
|
+
const cls = typedi_1.default.get(finalName);
|
|
74
|
+
if (!cls) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return cls;
|
|
78
|
+
}
|
|
79
|
+
static requestContext(args) {
|
|
80
|
+
const context = args[args.length - 1];
|
|
81
|
+
if (!context) {
|
|
82
|
+
return {};
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
socket: context.socket,
|
|
86
|
+
_scid: context._scid
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
static async invoke(method, args, requestConfig) {
|
|
90
|
+
const parts = method.split(".");
|
|
91
|
+
// console.log(parts, 'Method parts');
|
|
92
|
+
if (parts.length === 3) {
|
|
93
|
+
// this is an origin function
|
|
94
|
+
return await this.invoke_origin(parts, { function: method, arguments: args }, requestConfig._scid);
|
|
95
|
+
}
|
|
96
|
+
const [className, methodName] = parts;
|
|
97
|
+
// let auth_data = null;
|
|
98
|
+
if (!typedi_1.default.has(className)) {
|
|
99
|
+
// throw new Error(`Service ${className} not found`);
|
|
100
|
+
return {
|
|
101
|
+
status: "error",
|
|
102
|
+
data: `${className} does not exist in api`,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
const serviceInstance = typedi_1.default.get(className);
|
|
106
|
+
if (!serviceInstance[methodName]) {
|
|
107
|
+
return {
|
|
108
|
+
status: "error",
|
|
109
|
+
data: `function ${methodName} does not exist in ${className} module`,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
const funcRegistry = this.rpcRegistry[method];
|
|
113
|
+
// Ensure args is an array
|
|
114
|
+
if (!Array.isArray(args)) {
|
|
115
|
+
args = args ? [args] : [];
|
|
116
|
+
}
|
|
117
|
+
// Validate input using schema if available
|
|
118
|
+
if (funcRegistry.validate && funcRegistry.inputSchema && args.length > 0) {
|
|
119
|
+
try {
|
|
120
|
+
// For single parameter methods, validate the first argument directly
|
|
121
|
+
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null) {
|
|
122
|
+
const validatedArgs = funcRegistry.inputSchema.parse(args[0]);
|
|
123
|
+
args[0] = validatedArgs;
|
|
124
|
+
}
|
|
125
|
+
else if (args.length > 1) {
|
|
126
|
+
// For multiple parameters, create an object from parameter names and validate
|
|
127
|
+
const paramNames = Object.keys(funcRegistry.params);
|
|
128
|
+
const paramObj = {};
|
|
129
|
+
paramNames.forEach((name, index) => {
|
|
130
|
+
if (index < args.length) {
|
|
131
|
+
paramObj[name] = args[index];
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
const validatedObj = funcRegistry.inputSchema.parse(paramObj);
|
|
135
|
+
// Update args array with validated values
|
|
136
|
+
paramNames.forEach((name, index) => {
|
|
137
|
+
if (index < args.length) {
|
|
138
|
+
args[index] = validatedObj[name];
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
catch (validationError) {
|
|
144
|
+
return {
|
|
145
|
+
status: 'error',
|
|
146
|
+
data: `Validation error: ${validationError.message}`
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// console.log(args, 'VALIDATED INPUT ARGS')
|
|
151
|
+
args[funcRegistry.param_index] = {
|
|
152
|
+
socket: requestConfig.socket
|
|
153
|
+
};
|
|
154
|
+
// const args_ =
|
|
155
|
+
try {
|
|
156
|
+
const response = await serviceInstance[methodName](...args);
|
|
157
|
+
if (response) {
|
|
158
|
+
return {
|
|
159
|
+
status: 'success',
|
|
160
|
+
data: response
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
catch (error) {
|
|
165
|
+
return {
|
|
166
|
+
status: 'error',
|
|
167
|
+
data: error.message
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
static init(config) {
|
|
172
|
+
const { modules, socketCb, publickKey, app_id } = config;
|
|
173
|
+
this.app_id = app_id;
|
|
174
|
+
if (!app_id) {
|
|
175
|
+
throw new Error("app_id is required");
|
|
176
|
+
}
|
|
177
|
+
if (!publickKey) {
|
|
178
|
+
throw new Error("publickKey is required");
|
|
179
|
+
}
|
|
180
|
+
this.socketCb = socketCb;
|
|
181
|
+
this.publickKey = publickKey;
|
|
182
|
+
// instantiate emitter appropriate for environment
|
|
183
|
+
_a.event = (0, eventEmitter_1.createEmitter)();
|
|
184
|
+
_a.ai = new ttcAI_1.ttcAI();
|
|
185
|
+
this.server = new ttc_server_1.RPCClient(ttcAI_1.ttcAI.ttc_Uri, async () => {
|
|
186
|
+
const apikey = this.publickKey || '';
|
|
187
|
+
return apikey;
|
|
188
|
+
}, async (socket) => {
|
|
189
|
+
this.handleSocket(socket);
|
|
190
|
+
if (socketCb)
|
|
191
|
+
await socketCb(socket);
|
|
192
|
+
});
|
|
193
|
+
_a.ai.init();
|
|
194
|
+
// just to trick TypeScript into recognizing the service decorators
|
|
195
|
+
return this;
|
|
196
|
+
}
|
|
197
|
+
static hook(modules) {
|
|
198
|
+
// just for decorator processing and registring
|
|
199
|
+
}
|
|
200
|
+
static connect() {
|
|
201
|
+
}
|
|
202
|
+
static getRegistry() {
|
|
203
|
+
return this.rpcRegistry;
|
|
204
|
+
}
|
|
205
|
+
static async generateRPCMethodsList() {
|
|
206
|
+
const methods = [];
|
|
207
|
+
// Get the registry through the public method
|
|
208
|
+
const registry = _a.getRegistry();
|
|
209
|
+
for (const [fullMethodName, registryEntryRaw] of Object.entries(registry)) {
|
|
210
|
+
const registryEntry = registryEntryRaw;
|
|
211
|
+
const [serviceName, methodName] = fullMethodName.split('.');
|
|
212
|
+
const methodInfo = {
|
|
213
|
+
name: fullMethodName,
|
|
214
|
+
description: registryEntry.doc,
|
|
215
|
+
permission: registryEntry.auth
|
|
216
|
+
};
|
|
217
|
+
// Convert input schema to TypeScript type if it exists
|
|
218
|
+
if (registryEntry.inputSchema) {
|
|
219
|
+
try {
|
|
220
|
+
methodInfo.input_schema = (0, zodToTs_1.zodToTs)(registryEntry.inputSchema);
|
|
221
|
+
}
|
|
222
|
+
catch (error) {
|
|
223
|
+
// console.warn(`Failed to convert input schema for ${fullMethodName}:`, error);
|
|
224
|
+
methodInfo.input_schema = null;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
// Convert output schema to TypeScript type if it exists
|
|
228
|
+
if (registryEntry.outputSchema) {
|
|
229
|
+
try {
|
|
230
|
+
methodInfo.output_schema = (0, zodToTs_1.zodToTs)(registryEntry.outputSchema);
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
// console.warn(`Failed to convert output schema for ${fullMethodName}:`, error);
|
|
234
|
+
methodInfo.output_schema = null;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
methods.push(methodInfo);
|
|
238
|
+
}
|
|
239
|
+
const origin_functions = await this.getOriginFunctions();
|
|
240
|
+
// console.log(origin_functions, 'Origin functions fetched and added to method list.');
|
|
241
|
+
return [...methods, ...origin_functions];
|
|
242
|
+
}
|
|
243
|
+
static async getOriginFunctions() {
|
|
244
|
+
// fetch origins from server if not already fetched
|
|
245
|
+
try {
|
|
246
|
+
if (Object.keys(ttcAI_1.ttcAI.origins).length === 0) {
|
|
247
|
+
try {
|
|
248
|
+
const response = await _a.server.ttcCore.fetchOrigins(_a.app_id);
|
|
249
|
+
// console.log(response, 'Fetched origins from server:');
|
|
250
|
+
if (response.status === 'success') {
|
|
251
|
+
ttcAI_1.ttcAI.origins = response.data.reduce((acc, origin) => {
|
|
252
|
+
acc[origin.name] = origin;
|
|
253
|
+
return acc;
|
|
254
|
+
}, {});
|
|
255
|
+
// console.log(ttcAI.origins, 'Stored origins:');
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
catch (error) {
|
|
259
|
+
console.log('Error fetching origins:', error);
|
|
260
|
+
return [];
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
let origin_functions = [];
|
|
264
|
+
for (const origin of Object.values(ttcAI_1.ttcAI.origins)) {
|
|
265
|
+
const origin_result = await this.fetchOriginFunction(origin.url);
|
|
266
|
+
const edited_origin_result = origin_result.map((func) => ({
|
|
267
|
+
...func,
|
|
268
|
+
name: `${origin.name}.${func.name}` // Prefix function name with origin name
|
|
269
|
+
}));
|
|
270
|
+
origin_functions = [...origin_functions, ...edited_origin_result];
|
|
271
|
+
}
|
|
272
|
+
// console.log(origin_functions, 'Fetched origin functions:');
|
|
273
|
+
return origin_functions;
|
|
274
|
+
}
|
|
275
|
+
catch (error) {
|
|
276
|
+
// console.log('Unable to fetch origins from server, confirm the server is running and the URL is correct.');
|
|
277
|
+
return [];
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
static async fetchOriginFunction(url) {
|
|
281
|
+
try {
|
|
282
|
+
const query = `?sapikey=attaboy_bullshit`;
|
|
283
|
+
const response = await fetch(`${url}/api-docs${query}`, {
|
|
284
|
+
method: 'GET',
|
|
285
|
+
headers: {
|
|
286
|
+
'Content-Type': 'application/json',
|
|
287
|
+
'Authorization': `Bearer ${_a.publickKey}`
|
|
288
|
+
},
|
|
289
|
+
});
|
|
290
|
+
const result = await response.json();
|
|
291
|
+
// convert to array
|
|
292
|
+
const final_array = Object.entries(result.services).flatMap(([serviceName, funcs]) => funcs.map(func => ({ ...func, name: `${serviceName}.${func.name}` })));
|
|
293
|
+
return final_array;
|
|
294
|
+
}
|
|
295
|
+
catch (error) {
|
|
296
|
+
// console.log('Unable to fetch functions from server, confirm the server is running and the URL is correct and ask ttc to fetch functions again.');
|
|
297
|
+
return [];
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
static async invoke_origin(parts, call, _scid) {
|
|
301
|
+
try {
|
|
302
|
+
const [originName, className, methodName] = parts;
|
|
303
|
+
const origin = ttcAI_1.ttcAI.origins[originName];
|
|
304
|
+
if (!origin.url)
|
|
305
|
+
throw new Error(`Unknown origin: ${originName}`);
|
|
306
|
+
const response = await fetch(`${origin.url}/rpc`, {
|
|
307
|
+
method: 'POST',
|
|
308
|
+
headers: {
|
|
309
|
+
'Content-Type': 'application/json',
|
|
310
|
+
Authorization: `Bearer ${origin.apikey}`
|
|
311
|
+
},
|
|
312
|
+
body: JSON.stringify({
|
|
313
|
+
method: `${className}.${methodName}`,
|
|
314
|
+
params: Object.values(call.arguments)
|
|
315
|
+
})
|
|
316
|
+
});
|
|
317
|
+
if (!response.ok) {
|
|
318
|
+
// console.log(url, call, response);
|
|
319
|
+
return response.statusText;
|
|
320
|
+
// throw new Error(`API error: ${response.status} ${response.statusText}`);
|
|
321
|
+
}
|
|
322
|
+
return await response.json();
|
|
323
|
+
}
|
|
324
|
+
catch (error) {
|
|
325
|
+
console.error("Error calling API:", error);
|
|
326
|
+
throw error;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
static async createConstruct(description) {
|
|
330
|
+
let construct = new construct_1.TTCContruct(description);
|
|
331
|
+
return construct;
|
|
332
|
+
}
|
|
333
|
+
static async approveFunction(id, approval) {
|
|
334
|
+
const cb = this.permissions[id];
|
|
335
|
+
// console.log(cb, 'Approved');
|
|
336
|
+
if (cb) {
|
|
337
|
+
cb(approval);
|
|
338
|
+
delete this.permissions[id];
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
static async askPermission(id, func, cb) {
|
|
342
|
+
const key = `${id}-${func.function}`;
|
|
343
|
+
if (!this.permissions[key]) {
|
|
344
|
+
this.permissions[key] = cb;
|
|
345
|
+
}
|
|
346
|
+
await this.emit('permission', { id: key, payload: func });
|
|
347
|
+
}
|
|
348
|
+
static async subscribe(event, cb) {
|
|
349
|
+
this.event.on(event, cb);
|
|
350
|
+
}
|
|
351
|
+
static async emit(event, data) {
|
|
352
|
+
this.event.emit(event, data);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
exports.ttc = ttc;
|
|
356
|
+
_a = ttc;
|
|
357
|
+
ttc.rpcRegistry = {};
|
|
358
|
+
ttc.permissions = {};
|
|
359
|
+
ttc.describe = (config) => (target, propertyKey, descriptor) => {
|
|
360
|
+
const className = target.constructor.name;
|
|
361
|
+
const method = descriptor.value;
|
|
362
|
+
let params = {};
|
|
363
|
+
let generatedInputSchema;
|
|
364
|
+
const paramRegex = /\(([^)]*)\)/;
|
|
365
|
+
const paramsMatch = paramRegex.exec(method.toString());
|
|
366
|
+
const paramNames = paramsMatch
|
|
367
|
+
? paramsMatch[1]
|
|
368
|
+
.split(",")
|
|
369
|
+
.map((p) => p.trim())
|
|
370
|
+
.filter(Boolean)
|
|
371
|
+
: [];
|
|
372
|
+
// Get parameter types from reflection
|
|
373
|
+
const types = Reflect.getMetadata("design:paramtypes", target, propertyKey) || [];
|
|
374
|
+
const paramTypes = types.map((type) => type?.name || "unknown");
|
|
375
|
+
if (config?.inputSchema) {
|
|
376
|
+
// Use provided schema
|
|
377
|
+
const schemaAsJson = zodToJsonSchema(config.inputSchema);
|
|
378
|
+
const schemaProperties = _a.getZodTypeName(schemaAsJson.properties || {});
|
|
379
|
+
// If the method has one argument, assume the schema defines its type.
|
|
380
|
+
if (paramNames.length === 1) {
|
|
381
|
+
const singleParam = paramNames[0];
|
|
382
|
+
// If the schemaProperties describes the inner fields of the single parameter
|
|
383
|
+
// (e.g. { name: 'string', email: 'string' }) keep it as the param value.
|
|
384
|
+
// If schemaProperties describes a single primitive (e.g. { userId: 'string' }),
|
|
385
|
+
// unwrap it to avoid double-nesting: { userId: { userId: 'string' } } -> { userId: 'string' }.
|
|
386
|
+
if (Object.keys(schemaProperties).length === 1 && schemaProperties.hasOwnProperty(singleParam)) {
|
|
387
|
+
params[singleParam] = schemaProperties[singleParam];
|
|
388
|
+
}
|
|
389
|
+
else {
|
|
390
|
+
params[singleParam] = schemaProperties;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
else {
|
|
394
|
+
// Otherwise, map schema properties to parameter names.
|
|
395
|
+
params = schemaProperties;
|
|
396
|
+
}
|
|
397
|
+
generatedInputSchema = config.inputSchema;
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
// Generate schema from parameter types
|
|
401
|
+
if (paramNames.length > 0) {
|
|
402
|
+
generatedInputSchema = _a.createZodSchemaFromParams(paramNames, types);
|
|
403
|
+
// Extract params from generated schema for compatibility
|
|
404
|
+
const schemaAsJson = zodToJsonSchema(generatedInputSchema);
|
|
405
|
+
const schemaProperties = _a.getZodTypeName(schemaAsJson.properties || {});
|
|
406
|
+
if (paramNames.length === 1) {
|
|
407
|
+
const singleParam = paramNames[0];
|
|
408
|
+
if (Object.keys(schemaProperties).length === 1 && schemaProperties.hasOwnProperty(singleParam)) {
|
|
409
|
+
params[singleParam] = schemaProperties[singleParam];
|
|
410
|
+
}
|
|
411
|
+
else {
|
|
412
|
+
params[singleParam] = schemaProperties;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
else {
|
|
416
|
+
params = schemaProperties;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
420
|
+
// No parameters, create empty schema
|
|
421
|
+
generatedInputSchema = zod_1.z.object({});
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
if (!typedi_1.default.has(className)) {
|
|
425
|
+
typedi_1.default.set(className, new target.constructor());
|
|
426
|
+
}
|
|
427
|
+
const key = `${className}.${propertyKey}`;
|
|
428
|
+
_a.rpcRegistry[key] = {
|
|
429
|
+
params,
|
|
430
|
+
param_index: paramNames.length,
|
|
431
|
+
inputSchema: generatedInputSchema,
|
|
432
|
+
outputSchema: config?.outputSchema,
|
|
433
|
+
doc: config?.doc,
|
|
434
|
+
validate: config?.validate
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
ttc.handleSocket = async (socket) => {
|
|
438
|
+
_a.socket = socket;
|
|
439
|
+
socket.on("connect_error", (err) => {
|
|
440
|
+
console.error("Socket connection error:", err.message || err);
|
|
441
|
+
});
|
|
442
|
+
socket.on("function_call", async (data) => {
|
|
443
|
+
const { conversation_id, functions } = data;
|
|
444
|
+
await _a.ai.processFunctionCall(conversation_id, functions);
|
|
445
|
+
});
|
|
446
|
+
socket.on('sentinel_dispatch', async (data) => {
|
|
447
|
+
_a.emit('sentinel_dispatch', data);
|
|
448
|
+
});
|
|
449
|
+
socket.on('sentinel_terminated', async (data) => {
|
|
450
|
+
_a.emit('sentinel_terminated', data);
|
|
451
|
+
});
|
|
452
|
+
socket.on("construct", async (data) => {
|
|
453
|
+
const { conversation_id, construct_id, response } = data;
|
|
454
|
+
_a.emit("construct", {
|
|
455
|
+
id: construct_id,
|
|
456
|
+
payload: response
|
|
457
|
+
});
|
|
458
|
+
});
|
|
459
|
+
};
|
|
460
|
+
//# sourceMappingURL=core.js.map
|
package/dist/core.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";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