@vectorx/agent-runtime 0.0.0-beta-20251112071515
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/lib/agent-runner.d.ts +14 -0
- package/lib/agent-runner.js +123 -0
- package/lib/agent-types.d.ts +118 -0
- package/lib/agent-types.js +2 -0
- package/lib/agent.d.ts +40 -0
- package/lib/agent.js +785 -0
- package/lib/codes.d.ts +6 -0
- package/lib/codes.js +9 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +23 -0
- package/lib/schema/conversation.schema.d.ts +126 -0
- package/lib/schema/conversation.schema.js +35 -0
- package/lib/schema/file.schema.d.ts +18 -0
- package/lib/schema/file.schema.js +10 -0
- package/lib/schema/index.d.ts +6 -0
- package/lib/schema/index.js +22 -0
- package/lib/schema/knowledge.schema.d.ts +37 -0
- package/lib/schema/knowledge.schema.js +13 -0
- package/lib/schema/memory.schema.d.ts +35 -0
- package/lib/schema/memory.schema.js +15 -0
- package/lib/schema/message.schema.d.ts +1050 -0
- package/lib/schema/message.schema.js +79 -0
- package/lib/schema/task.schema.d.ts +9 -0
- package/lib/schema/task.schema.js +7 -0
- package/lib/sse-sender.d.ts +32 -0
- package/lib/sse-sender.js +33 -0
- package/lib/types.d.ts +71 -0
- package/lib/types.js +2 -0
- package/lib/utils/agent-helper.d.ts +9 -0
- package/lib/utils/agent-helper.js +111 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +17 -0
- package/lib/utils/integration-response.d.ts +20 -0
- package/lib/utils/integration-response.js +17 -0
- package/package.json +47 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendMessageInputSchema = exports.messageHistorySchema = exports.messageItemSchema = exports.toolResultMessageSchema = exports.toolCallMessageSchema = exports.baseMessageSchema = exports.messageContentSchema = exports.docUrlContentSchema = exports.videoUrlContentSchema = exports.videoContentSchema = exports.audioContentSchema = exports.imageContentSchema = exports.textContentSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.textContentSchema = zod_1.z.object({
|
|
6
|
+
type: zod_1.z.literal("text"),
|
|
7
|
+
text: zod_1.z.string(),
|
|
8
|
+
});
|
|
9
|
+
exports.imageContentSchema = zod_1.z.object({
|
|
10
|
+
type: zod_1.z.literal("image_url"),
|
|
11
|
+
image_url: zod_1.z.object({
|
|
12
|
+
url: zod_1.z.string(),
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
exports.audioContentSchema = zod_1.z.object({
|
|
16
|
+
type: zod_1.z.literal("input_audio"),
|
|
17
|
+
input_audio: zod_1.z.object({
|
|
18
|
+
data: zod_1.z.string(),
|
|
19
|
+
format: zod_1.z.string(),
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
22
|
+
exports.videoContentSchema = zod_1.z.object({
|
|
23
|
+
type: zod_1.z.literal("video"),
|
|
24
|
+
video: zod_1.z.array(zod_1.z.string()),
|
|
25
|
+
});
|
|
26
|
+
exports.videoUrlContentSchema = zod_1.z.object({
|
|
27
|
+
type: zod_1.z.literal("video_url"),
|
|
28
|
+
video_url: zod_1.z.object({
|
|
29
|
+
url: zod_1.z.string(),
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
32
|
+
exports.docUrlContentSchema = zod_1.z.object({
|
|
33
|
+
type: zod_1.z.literal("doc_url"),
|
|
34
|
+
doc_url: zod_1.z.array(zod_1.z.string()),
|
|
35
|
+
file_parsing_strategy: zod_1.z.string().optional(),
|
|
36
|
+
});
|
|
37
|
+
exports.messageContentSchema = zod_1.z.union([
|
|
38
|
+
exports.textContentSchema,
|
|
39
|
+
exports.imageContentSchema,
|
|
40
|
+
exports.audioContentSchema,
|
|
41
|
+
exports.videoContentSchema,
|
|
42
|
+
exports.videoUrlContentSchema,
|
|
43
|
+
exports.docUrlContentSchema,
|
|
44
|
+
]);
|
|
45
|
+
exports.baseMessageSchema = zod_1.z.object({
|
|
46
|
+
role: zod_1.z.union([zod_1.z.literal("system"), zod_1.z.literal("user"), zod_1.z.literal("assistant")]),
|
|
47
|
+
content: zod_1.z.union([
|
|
48
|
+
zod_1.z.string(),
|
|
49
|
+
zod_1.z.array(exports.messageContentSchema),
|
|
50
|
+
]),
|
|
51
|
+
});
|
|
52
|
+
exports.toolCallMessageSchema = zod_1.z.object({
|
|
53
|
+
role: zod_1.z.literal("tool"),
|
|
54
|
+
function: zod_1.z.string(),
|
|
55
|
+
arguments: zod_1.z.record(zod_1.z.any()).optional(),
|
|
56
|
+
});
|
|
57
|
+
exports.toolResultMessageSchema = zod_1.z.object({
|
|
58
|
+
role: zod_1.z.literal("tool"),
|
|
59
|
+
function: zod_1.z.string(),
|
|
60
|
+
name: zod_1.z.string(),
|
|
61
|
+
content: zod_1.z.union([zod_1.z.string(), zod_1.z.record(zod_1.z.any()), zod_1.z.array(zod_1.z.any())]),
|
|
62
|
+
});
|
|
63
|
+
exports.messageItemSchema = zod_1.z.union([exports.baseMessageSchema, exports.toolCallMessageSchema, exports.toolResultMessageSchema]);
|
|
64
|
+
exports.messageHistorySchema = zod_1.z.array(exports.messageItemSchema);
|
|
65
|
+
exports.sendMessageInputSchema = zod_1.z.object({
|
|
66
|
+
msg: zod_1.z.string(),
|
|
67
|
+
history: exports.messageHistorySchema,
|
|
68
|
+
files: zod_1.z
|
|
69
|
+
.array(zod_1.z
|
|
70
|
+
.object({
|
|
71
|
+
id: zod_1.z.string(),
|
|
72
|
+
filename: zod_1.z.string(),
|
|
73
|
+
purpose: zod_1.z.string(),
|
|
74
|
+
bytes: zod_1.z.number(),
|
|
75
|
+
created_at: zod_1.z.number(),
|
|
76
|
+
})
|
|
77
|
+
.passthrough())
|
|
78
|
+
.optional(),
|
|
79
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const queryTasksParamsSchema: z.ZodObject<{
|
|
3
|
+
task_id: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
task_id?: string;
|
|
6
|
+
}, {
|
|
7
|
+
task_id?: string;
|
|
8
|
+
}>;
|
|
9
|
+
export type QueryTasksParams = z.infer<typeof queryTasksParamsSchema>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { EventEmitter } from "events";
|
|
2
|
+
import type { RcbContext, ServerSentEvent } from "@vectorx/functions-framework";
|
|
3
|
+
export type Primitive = number | string | boolean | undefined | null;
|
|
4
|
+
export type BufferLike = number | string | Buffer | ArrayBuffer | ArrayBufferView | DataView;
|
|
5
|
+
export declare namespace sse {
|
|
6
|
+
interface SseEvent<T = Primitive | object | Buffer> {
|
|
7
|
+
data: T;
|
|
8
|
+
comment?: string;
|
|
9
|
+
event?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
retry?: number;
|
|
12
|
+
}
|
|
13
|
+
type Event<T> = SseEvent<T> | string | Buffer;
|
|
14
|
+
interface IServerSentEvent extends EventEmitter {
|
|
15
|
+
closed: boolean;
|
|
16
|
+
setEncoder(encoder: TextEncoder): void;
|
|
17
|
+
send<T>(event: Event<T> | Event<T>[]): boolean;
|
|
18
|
+
end(msg: SseEvent): void;
|
|
19
|
+
on(event: "close", listener: () => void): this;
|
|
20
|
+
on(event: "error", listener: (errorEvent: SseEvent) => void): this;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export declare class SSESender<T> {
|
|
24
|
+
readonly context: RcbContext;
|
|
25
|
+
private _status;
|
|
26
|
+
private _sse;
|
|
27
|
+
get status(): "initial" | "started" | "ended";
|
|
28
|
+
constructor(context: RcbContext);
|
|
29
|
+
get sse(): ServerSentEvent;
|
|
30
|
+
send(data: sse.Event<T>): void;
|
|
31
|
+
end(): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SSESender = void 0;
|
|
4
|
+
class SSESender {
|
|
5
|
+
get status() {
|
|
6
|
+
return this._status;
|
|
7
|
+
}
|
|
8
|
+
constructor(context) {
|
|
9
|
+
this.context = context;
|
|
10
|
+
this._status = "initial";
|
|
11
|
+
this._sse = null;
|
|
12
|
+
}
|
|
13
|
+
get sse() {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
if (!this._sse) {
|
|
16
|
+
const sse = (_b = (_a = this.context) === null || _a === void 0 ? void 0 : _a.sse) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
17
|
+
if (!sse) {
|
|
18
|
+
throw new Error("Invalid sse");
|
|
19
|
+
}
|
|
20
|
+
this._sse = sse;
|
|
21
|
+
this._status = "started";
|
|
22
|
+
}
|
|
23
|
+
return this._sse;
|
|
24
|
+
}
|
|
25
|
+
send(data) {
|
|
26
|
+
this.sse.send(data);
|
|
27
|
+
}
|
|
28
|
+
end() {
|
|
29
|
+
this.sse.end({ data: "[DONE]" });
|
|
30
|
+
this._status = "ended";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.SSESender = SSESender;
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { SSESender } from "./sse-sender";
|
|
2
|
+
export interface SendMessageInput {
|
|
3
|
+
msg: string;
|
|
4
|
+
history?: {
|
|
5
|
+
role: "user" | "assistant";
|
|
6
|
+
content: string;
|
|
7
|
+
}[];
|
|
8
|
+
searchEnable?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface GetLoneMemoryInput {
|
|
11
|
+
userId: string;
|
|
12
|
+
limit?: number;
|
|
13
|
+
filter?: {
|
|
14
|
+
startTime?: number;
|
|
15
|
+
endTime?: number;
|
|
16
|
+
type?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface KnowledgeSearchInput {
|
|
20
|
+
collectionView: string;
|
|
21
|
+
search: {
|
|
22
|
+
content: string;
|
|
23
|
+
documentSetName?: string[];
|
|
24
|
+
options?: {
|
|
25
|
+
chunkExpand?: number[];
|
|
26
|
+
filter?: string;
|
|
27
|
+
limit?: number;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface UserProfile {
|
|
32
|
+
tags?: string[];
|
|
33
|
+
preferences?: Record<string, any>;
|
|
34
|
+
}
|
|
35
|
+
export interface DocumentSet {
|
|
36
|
+
documentSetId: string;
|
|
37
|
+
documentSetName: string;
|
|
38
|
+
author: string;
|
|
39
|
+
fileTitle: string;
|
|
40
|
+
fileMetaData: string;
|
|
41
|
+
}
|
|
42
|
+
export interface DocumentData {
|
|
43
|
+
text: string;
|
|
44
|
+
startPos: number;
|
|
45
|
+
endPos: number;
|
|
46
|
+
pre: string[];
|
|
47
|
+
next: string[];
|
|
48
|
+
paragraphTitle: string;
|
|
49
|
+
allParentParagraphTitles: string[];
|
|
50
|
+
documentSet: DocumentSet;
|
|
51
|
+
}
|
|
52
|
+
export interface KnowledgeSearchResult {
|
|
53
|
+
score: number;
|
|
54
|
+
data: DocumentData;
|
|
55
|
+
}
|
|
56
|
+
export interface KnowledgeSearchResponse {
|
|
57
|
+
data: {
|
|
58
|
+
documents: KnowledgeSearchResult[];
|
|
59
|
+
requestId: string;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export interface ErrorResponse {
|
|
63
|
+
code: string;
|
|
64
|
+
message: string;
|
|
65
|
+
requestId: string;
|
|
66
|
+
}
|
|
67
|
+
export type AgentCoreSseSender = SSESender<{
|
|
68
|
+
content: string;
|
|
69
|
+
[key: string]: unknown;
|
|
70
|
+
}>;
|
|
71
|
+
export type PickRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
package/lib/types.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RcbContext } from "@vectorx/functions-framework";
|
|
2
|
+
import queryString from "query-string";
|
|
3
|
+
export declare function parseAgentId(url: string): string;
|
|
4
|
+
export declare function parseAgentTag(url: string): string;
|
|
5
|
+
export declare function parseApiName(url: string): string;
|
|
6
|
+
export declare function parseQueryFromCtx(ctx: RcbContext): queryString.ParsedQuery<string | boolean>;
|
|
7
|
+
export declare function parseTaskIdFromPath(url: string): string | null;
|
|
8
|
+
export declare function genRecordId(): string;
|
|
9
|
+
export declare function genRandomStr(length: number): string;
|
|
@@ -0,0 +1,111 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.parseAgentId = parseAgentId;
|
|
40
|
+
exports.parseAgentTag = parseAgentTag;
|
|
41
|
+
exports.parseApiName = parseApiName;
|
|
42
|
+
exports.parseQueryFromCtx = parseQueryFromCtx;
|
|
43
|
+
exports.parseTaskIdFromPath = parseTaskIdFromPath;
|
|
44
|
+
exports.genRecordId = genRecordId;
|
|
45
|
+
exports.genRandomStr = genRandomStr;
|
|
46
|
+
const crypto = __importStar(require("crypto"));
|
|
47
|
+
const query_string_1 = __importDefault(require("query-string"));
|
|
48
|
+
const AGENT_REG = /\/v1\/aiagent\/agents\/([^\/]+)\/(.+)/;
|
|
49
|
+
function parseAgentId(url) {
|
|
50
|
+
return parseUrl(url).agentId;
|
|
51
|
+
}
|
|
52
|
+
function parseAgentTag(url) {
|
|
53
|
+
const agentId = parseAgentId(url);
|
|
54
|
+
const agentTag = agentId.split("-")[2];
|
|
55
|
+
return agentTag;
|
|
56
|
+
}
|
|
57
|
+
function parseApiName(url) {
|
|
58
|
+
try {
|
|
59
|
+
return parseUrl(url).apiName;
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function parseUrl(url) {
|
|
66
|
+
const { pathname } = new URL(url);
|
|
67
|
+
const regResult = pathname.match(AGENT_REG);
|
|
68
|
+
if (!regResult) {
|
|
69
|
+
throw new Error("Invalid pathname");
|
|
70
|
+
}
|
|
71
|
+
const [_, agentId, remainingPath] = regResult;
|
|
72
|
+
let apiName = remainingPath;
|
|
73
|
+
if (remainingPath.startsWith("query-tasks/")) {
|
|
74
|
+
apiName = "query-tasks";
|
|
75
|
+
}
|
|
76
|
+
return { agentId, apiName };
|
|
77
|
+
}
|
|
78
|
+
function parseQueryFromCtx(ctx) {
|
|
79
|
+
var _a;
|
|
80
|
+
const url = (_a = ctx.httpContext) === null || _a === void 0 ? void 0 : _a.url;
|
|
81
|
+
if (!url) {
|
|
82
|
+
throw new Error("Invalid url: " + url);
|
|
83
|
+
}
|
|
84
|
+
const [_, queryStr] = url.split("?");
|
|
85
|
+
return query_string_1.default.parse(queryStr, {
|
|
86
|
+
parseBooleans: true,
|
|
87
|
+
parseFragmentIdentifier: true,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function parseTaskIdFromPath(url) {
|
|
91
|
+
try {
|
|
92
|
+
const { pathname } = new URL(url);
|
|
93
|
+
const parts = pathname.split("/").filter(Boolean);
|
|
94
|
+
const agentsIdx = parts.findIndex((p) => p === "agents");
|
|
95
|
+
if (agentsIdx >= 0 && parts[agentsIdx + 2] === "query-tasks" && parts[agentsIdx + 3]) {
|
|
96
|
+
return parts[agentsIdx + 3];
|
|
97
|
+
}
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
catch (_a) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function genRecordId() {
|
|
105
|
+
return "record-" + genRandomStr(8);
|
|
106
|
+
}
|
|
107
|
+
function genRandomStr(length) {
|
|
108
|
+
const randomBytes = crypto.randomBytes(Math.ceil(length / 2));
|
|
109
|
+
const hexString = randomBytes.toString("hex").slice(0, length);
|
|
110
|
+
return hexString;
|
|
111
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./agent-helper";
|
|
@@ -0,0 +1,17 @@
|
|
|
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("./agent-helper"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface IntegrationResponse {
|
|
2
|
+
statusCode: number;
|
|
3
|
+
headers: Record<string, string>;
|
|
4
|
+
body: {
|
|
5
|
+
code: string;
|
|
6
|
+
message: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export interface ErrorResponse {
|
|
10
|
+
code: string;
|
|
11
|
+
message: string;
|
|
12
|
+
requestId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface BaseResponse<T = any> {
|
|
15
|
+
code: number;
|
|
16
|
+
msg: string;
|
|
17
|
+
data?: T;
|
|
18
|
+
}
|
|
19
|
+
export declare function createIntegrationResponse(statusCode: number, code: string, message: string): IntegrationResponse;
|
|
20
|
+
export declare const OK_MESSAGE = "OK";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OK_MESSAGE = void 0;
|
|
4
|
+
exports.createIntegrationResponse = createIntegrationResponse;
|
|
5
|
+
function createIntegrationResponse(statusCode, code, message) {
|
|
6
|
+
return {
|
|
7
|
+
statusCode,
|
|
8
|
+
headers: {
|
|
9
|
+
"Content-Type": "application/json",
|
|
10
|
+
},
|
|
11
|
+
body: {
|
|
12
|
+
code,
|
|
13
|
+
message,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
exports.OK_MESSAGE = "OK";
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vectorx/agent-runtime",
|
|
3
|
+
"version": "0.0.0-beta-20251112071515",
|
|
4
|
+
"description": "Cloud AI agent runtime",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"lib",
|
|
8
|
+
"types",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"keywords": [
|
|
12
|
+
"ai",
|
|
13
|
+
"agent",
|
|
14
|
+
"cloud",
|
|
15
|
+
"framework"
|
|
16
|
+
],
|
|
17
|
+
"author": "",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=18.0.0"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@vectorx/ai-sdk": "0.0.0-beta-20251112071515",
|
|
24
|
+
"@vectorx/functions-framework": "0.0.0-beta-20251112071515",
|
|
25
|
+
"form-data": "^4.0.0",
|
|
26
|
+
"langfuse": "^3.38.4",
|
|
27
|
+
"query-string": "^6.14.1",
|
|
28
|
+
"zod": "^3.24.2"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/form-data": "^2.5.0",
|
|
32
|
+
"@types/jest": "^29.5.12",
|
|
33
|
+
"@types/node": "^20.11.24",
|
|
34
|
+
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
|
35
|
+
"@typescript-eslint/parser": "^7.1.0",
|
|
36
|
+
"eslint": "^8.57.0",
|
|
37
|
+
"jest": "^29.7.0",
|
|
38
|
+
"ts-node-dev": "^2.0.0",
|
|
39
|
+
"typescript": "^5.3.3"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"dev": "tsc -w",
|
|
43
|
+
"build": "rimraf lib types && tsc",
|
|
44
|
+
"lint": "eslint 'src/**/*.ts'",
|
|
45
|
+
"fix": "eslint 'src/**/*.ts' --fix"
|
|
46
|
+
}
|
|
47
|
+
}
|