@carlonicora/nestjs-neo4jsonapi 1.96.0 → 1.98.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/dist/agents/graph/tools/search-entities.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/search-entities.tool.js +14 -3
- package/dist/agents/graph/tools/search-entities.tool.js.map +1 -1
- package/dist/agents/graph/tools/tool.factory.d.ts.map +1 -1
- package/dist/agents/graph/tools/tool.factory.js +16 -2
- package/dist/agents/graph/tools/tool.factory.js.map +1 -1
- package/dist/agents/graph/tools/traverse.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/traverse.tool.js +14 -4
- package/dist/agents/graph/tools/traverse.tool.js.map +1 -1
- package/dist/agents/index.d.ts +15 -0
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +28 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/operator/contexts/operator.context.d.ts +54 -0
- package/dist/agents/operator/contexts/operator.context.d.ts.map +1 -0
- package/dist/agents/operator/contexts/operator.context.js +23 -0
- package/dist/agents/operator/contexts/operator.context.js.map +1 -0
- package/dist/agents/operator/controllers/operator.controller.d.ts +37 -0
- package/dist/agents/operator/controllers/operator.controller.d.ts.map +1 -0
- package/dist/agents/operator/controllers/operator.controller.js +142 -0
- package/dist/agents/operator/controllers/operator.controller.js.map +1 -0
- package/dist/agents/operator/entities/operator.meta.d.ts +8 -0
- package/dist/agents/operator/entities/operator.meta.d.ts.map +1 -0
- package/dist/agents/operator/entities/operator.meta.js +15 -0
- package/dist/agents/operator/entities/operator.meta.js.map +1 -0
- package/dist/agents/operator/interfaces/operator.tool.interface.d.ts +42 -0
- package/dist/agents/operator/interfaces/operator.tool.interface.d.ts.map +1 -0
- package/dist/agents/operator/interfaces/operator.tool.interface.js +6 -0
- package/dist/agents/operator/interfaces/operator.tool.interface.js.map +1 -0
- package/dist/agents/operator/operator.module.d.ts +3 -0
- package/dist/agents/operator/operator.module.d.ts.map +1 -0
- package/dist/agents/operator/operator.module.js +44 -0
- package/dist/agents/operator/operator.module.js.map +1 -0
- package/dist/agents/operator/prompts/operator.system.prompt.d.ts +2 -0
- package/dist/agents/operator/prompts/operator.system.prompt.d.ts.map +1 -0
- package/dist/agents/operator/prompts/operator.system.prompt.js +25 -0
- package/dist/agents/operator/prompts/operator.system.prompt.js.map +1 -0
- package/dist/agents/operator/services/operator.checkpointer.service.d.ts +57 -0
- package/dist/agents/operator/services/operator.checkpointer.service.d.ts.map +1 -0
- package/dist/agents/operator/services/operator.checkpointer.service.js +171 -0
- package/dist/agents/operator/services/operator.checkpointer.service.js.map +1 -0
- package/dist/agents/operator/services/operator.service.d.ts +81 -0
- package/dist/agents/operator/services/operator.service.d.ts.map +1 -0
- package/dist/agents/operator/services/operator.service.js +341 -0
- package/dist/agents/operator/services/operator.service.js.map +1 -0
- package/dist/agents/operator/tools/operator-test-action.tool.d.ts +12 -0
- package/dist/agents/operator/tools/operator-test-action.tool.d.ts.map +1 -0
- package/dist/agents/operator/tools/operator-test-action.tool.js +46 -0
- package/dist/agents/operator/tools/operator-test-action.tool.js.map +1 -0
- package/dist/agents/operator/tools/operator.tool.registry.d.ts +32 -0
- package/dist/agents/operator/tools/operator.tool.registry.d.ts.map +1 -0
- package/dist/agents/operator/tools/operator.tool.registry.js +95 -0
- package/dist/agents/operator/tools/operator.tool.registry.js.map +1 -0
- package/dist/agents/operator/tools/search-communities.tool.d.ts +16 -0
- package/dist/agents/operator/tools/search-communities.tool.d.ts.map +1 -0
- package/dist/agents/operator/tools/search-communities.tool.js +51 -0
- package/dist/agents/operator/tools/search-communities.tool.js.map +1 -0
- package/dist/agents/operator/tools/search-documents.tool.d.ts +17 -0
- package/dist/agents/operator/tools/search-documents.tool.d.ts.map +1 -0
- package/dist/agents/operator/tools/search-documents.tool.js +76 -0
- package/dist/agents/operator/tools/search-documents.tool.js.map +1 -0
- package/dist/common/interfaces/token.usage.interface.d.ts +2 -0
- package/dist/common/interfaces/token.usage.interface.d.ts.map +1 -1
- package/dist/config/base.config.d.ts +6 -0
- package/dist/config/base.config.d.ts.map +1 -1
- package/dist/config/base.config.js +19 -2
- package/dist/config/base.config.js.map +1 -1
- package/dist/config/interfaces/base.config.interface.d.ts +2 -0
- package/dist/config/interfaces/base.config.interface.d.ts.map +1 -1
- package/dist/config/interfaces/config.ai.interface.d.ts +6 -0
- package/dist/config/interfaces/config.ai.interface.d.ts.map +1 -1
- package/dist/config/interfaces/config.operator.interface.d.ts +9 -0
- package/dist/config/interfaces/config.operator.interface.d.ts.map +1 -0
- package/dist/config/interfaces/config.operator.interface.js +3 -0
- package/dist/config/interfaces/config.operator.interface.js.map +1 -0
- package/dist/config/interfaces/config.prompts.interface.d.ts +1 -0
- package/dist/config/interfaces/config.prompts.interface.d.ts.map +1 -1
- package/dist/config/interfaces/index.d.ts +1 -0
- package/dist/config/interfaces/index.d.ts.map +1 -1
- package/dist/config/interfaces/index.js +1 -0
- package/dist/config/interfaces/index.js.map +1 -1
- package/dist/core/llm/common/llm-raw-response.d.ts +4 -0
- package/dist/core/llm/common/llm-raw-response.d.ts.map +1 -1
- package/dist/core/llm/common/llm-raw-response.js.map +1 -1
- package/dist/core/llm/services/llm-call-dumper.service.d.ts +3 -0
- package/dist/core/llm/services/llm-call-dumper.service.d.ts.map +1 -1
- package/dist/core/llm/services/llm.service.d.ts +35 -0
- package/dist/core/llm/services/llm.service.d.ts.map +1 -1
- package/dist/core/llm/services/llm.service.js +118 -17
- package/dist/core/llm/services/llm.service.js.map +1 -1
- package/dist/foundations/assistant/assistant.module.d.ts.map +1 -1
- package/dist/foundations/assistant/assistant.module.js +14 -1
- package/dist/foundations/assistant/assistant.module.js.map +1 -1
- package/dist/foundations/assistant/entities/assistant.d.ts +1 -0
- package/dist/foundations/assistant/entities/assistant.d.ts.map +1 -1
- package/dist/foundations/assistant/entities/assistant.js +1 -0
- package/dist/foundations/assistant/entities/assistant.js.map +1 -1
- package/dist/foundations/assistant/services/assistant.service.d.ts +88 -1
- package/dist/foundations/assistant/services/assistant.service.d.ts.map +1 -1
- package/dist/foundations/assistant/services/assistant.service.js +365 -2
- package/dist/foundations/assistant/services/assistant.service.js.map +1 -1
- package/dist/foundations/assistant-action/assistant-action.module.d.ts +5 -0
- package/dist/foundations/assistant-action/assistant-action.module.d.ts.map +1 -0
- package/dist/foundations/assistant-action/assistant-action.module.js +43 -0
- package/dist/foundations/assistant-action/assistant-action.module.js.map +1 -0
- package/dist/foundations/assistant-action/controllers/assistant-action.controller.d.ts +30 -0
- package/dist/foundations/assistant-action/controllers/assistant-action.controller.d.ts.map +1 -0
- package/dist/foundations/assistant-action/controllers/assistant-action.controller.js +119 -0
- package/dist/foundations/assistant-action/controllers/assistant-action.controller.js.map +1 -0
- package/dist/foundations/assistant-action/cron/assistant-action.expiry.cron.d.ts +9 -0
- package/dist/foundations/assistant-action/cron/assistant-action.expiry.cron.d.ts.map +1 -0
- package/dist/foundations/assistant-action/cron/assistant-action.expiry.cron.js +46 -0
- package/dist/foundations/assistant-action/cron/assistant-action.expiry.cron.js.map +1 -0
- package/dist/foundations/assistant-action/entities/assistant-action.d.ts +49 -0
- package/dist/foundations/assistant-action/entities/assistant-action.d.ts.map +1 -0
- package/dist/foundations/assistant-action/entities/assistant-action.js +43 -0
- package/dist/foundations/assistant-action/entities/assistant-action.js.map +1 -0
- package/dist/foundations/assistant-action/entities/assistant-action.meta.d.ts +3 -0
- package/dist/foundations/assistant-action/entities/assistant-action.meta.d.ts.map +1 -0
- package/dist/foundations/assistant-action/entities/assistant-action.meta.js +10 -0
- package/dist/foundations/assistant-action/entities/assistant-action.meta.js.map +1 -0
- package/dist/foundations/assistant-action/index.d.ts +7 -0
- package/dist/foundations/assistant-action/index.d.ts.map +1 -0
- package/dist/foundations/assistant-action/index.js +23 -0
- package/dist/foundations/assistant-action/index.js.map +1 -0
- package/dist/foundations/assistant-action/repositories/assistant-action.repository.d.ts +81 -0
- package/dist/foundations/assistant-action/repositories/assistant-action.repository.d.ts.map +1 -0
- package/dist/foundations/assistant-action/repositories/assistant-action.repository.js +131 -0
- package/dist/foundations/assistant-action/repositories/assistant-action.repository.js.map +1 -0
- package/dist/foundations/assistant-action/services/assistant-action.service.d.ts +48 -0
- package/dist/foundations/assistant-action/services/assistant-action.service.d.ts.map +1 -0
- package/dist/foundations/assistant-action/services/assistant-action.service.js +67 -0
- package/dist/foundations/assistant-action/services/assistant-action.service.js.map +1 -0
- package/dist/foundations/assistant-message/entities/assistant-message.d.ts +12 -0
- package/dist/foundations/assistant-message/entities/assistant-message.d.ts.map +1 -1
- package/dist/foundations/assistant-message/entities/assistant-message.js +11 -0
- package/dist/foundations/assistant-message/entities/assistant-message.js.map +1 -1
- package/dist/foundations/assistant-message/repositories/assistant-message.repository.d.ts +9 -0
- package/dist/foundations/assistant-message/repositories/assistant-message.repository.d.ts.map +1 -1
- package/dist/foundations/assistant-message/services/assistant-message.service.d.ts +9 -0
- package/dist/foundations/assistant-message/services/assistant-message.service.d.ts.map +1 -1
- package/dist/foundations/index.d.ts +1 -0
- package/dist/foundations/index.d.ts.map +1 -1
- package/dist/foundations/index.js +1 -0
- package/dist/foundations/index.js.map +1 -1
- package/dist/foundations/tokenusage/entities/tokenusage.entity.d.ts +1 -0
- package/dist/foundations/tokenusage/entities/tokenusage.entity.d.ts.map +1 -1
- package/dist/foundations/tokenusage/entities/tokenusage.map.d.ts.map +1 -1
- package/dist/foundations/tokenusage/entities/tokenusage.map.js +1 -0
- package/dist/foundations/tokenusage/entities/tokenusage.map.js.map +1 -1
- package/dist/foundations/tokenusage/repositories/tokenusage.repository.d.ts +1 -0
- package/dist/foundations/tokenusage/repositories/tokenusage.repository.d.ts.map +1 -1
- package/dist/foundations/tokenusage/repositories/tokenusage.repository.js +2 -0
- package/dist/foundations/tokenusage/repositories/tokenusage.repository.js.map +1 -1
- package/dist/foundations/tokenusage/services/tokenusage.service.d.ts.map +1 -1
- package/dist/foundations/tokenusage/services/tokenusage.service.js +9 -3
- package/dist/foundations/tokenusage/services/tokenusage.service.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AssistantActionRepository = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const nestjs_cls_1 = require("nestjs-cls");
|
|
15
|
+
const abstract_repository_1 = require("../../../core/neo4j/abstracts/abstract.repository");
|
|
16
|
+
const neo4j_service_1 = require("../../../core/neo4j/services/neo4j.service");
|
|
17
|
+
const security_service_1 = require("../../../core/security/services/security.service");
|
|
18
|
+
const assistant_action_1 = require("../entities/assistant-action");
|
|
19
|
+
const assistant_action_meta_1 = require("../entities/assistant-action.meta");
|
|
20
|
+
/**
|
|
21
|
+
* AssistantActionRepository
|
|
22
|
+
*
|
|
23
|
+
* Owner-RBAC is inherited from the parent Assistant (a user may only see the
|
|
24
|
+
* actions that belong to their own assistants). Company scope is applied
|
|
25
|
+
* automatically via `buildDefaultMatch()` (`isCompanyScoped: true`).
|
|
26
|
+
*/
|
|
27
|
+
let AssistantActionRepository = class AssistantActionRepository extends abstract_repository_1.AbstractRepository {
|
|
28
|
+
constructor(neo4j, securityService, clsService) {
|
|
29
|
+
super(neo4j, securityService, clsService);
|
|
30
|
+
this.descriptor = assistant_action_1.AssistantActionDescriptor;
|
|
31
|
+
}
|
|
32
|
+
buildUserHasAccess() {
|
|
33
|
+
const { nodeName } = this.descriptor.model;
|
|
34
|
+
return `WITH ${nodeName}
|
|
35
|
+
WHERE EXISTS {
|
|
36
|
+
MATCH (${nodeName})<-[:HAS_ACTION]-(:Assistant)-[:CREATED_BY]->(:User {id: $currentUserId})
|
|
37
|
+
}
|
|
38
|
+
WITH ${nodeName}`;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Atomically transition the action's status from `from` to `to`, guarded in
|
|
42
|
+
* Cypher so that only one of N concurrent attempts wins (`WHERE status =
|
|
43
|
+
* $from`). Also requires `expiresAt` to be in the future — expired actions
|
|
44
|
+
* can no longer be resolved.
|
|
45
|
+
*
|
|
46
|
+
* Under Neo4j's read-committed isolation a plain `MATCH … WHERE … SET` is
|
|
47
|
+
* check-then-set: the WHERE is evaluated before the write lock is acquired
|
|
48
|
+
* at SET and is NOT re-evaluated afterwards, so two concurrent approves
|
|
49
|
+
* could both pass the guard. The no-op `SET updatedAt = updatedAt` acquires
|
|
50
|
+
* the node's write lock BEFORE the guard (standard Neo4j CAS idiom), making
|
|
51
|
+
* the guard + transition atomic.
|
|
52
|
+
*
|
|
53
|
+
* Owner-RBAC (`buildUserHasAccess`) is injected via
|
|
54
|
+
* `securityService.userHasAccess()`, mirroring the framework's standard
|
|
55
|
+
* write path in AbstractRepository.
|
|
56
|
+
*
|
|
57
|
+
* Returns true when this call won the transition, false otherwise.
|
|
58
|
+
*/
|
|
59
|
+
async resolveStatus(params) {
|
|
60
|
+
const query = this.neo4j.initQuery({ serialiser: assistant_action_1.AssistantActionDescriptor.model });
|
|
61
|
+
query.queryParams = { ...query.queryParams, searchValue: params.id, from: params.from, to: params.to };
|
|
62
|
+
query.query += `
|
|
63
|
+
${this.buildDefaultMatch({ searchField: "id" })}
|
|
64
|
+
${this.securityService.userHasAccess({ validator: () => this.buildUserHasAccess() })}
|
|
65
|
+
SET ${assistant_action_meta_1.assistantActionMeta.nodeName}.updatedAt = ${assistant_action_meta_1.assistantActionMeta.nodeName}.updatedAt
|
|
66
|
+
WITH ${assistant_action_meta_1.assistantActionMeta.nodeName}
|
|
67
|
+
WHERE ${assistant_action_meta_1.assistantActionMeta.nodeName}.status = $from AND ${assistant_action_meta_1.assistantActionMeta.nodeName}.expiresAt > datetime()
|
|
68
|
+
SET ${assistant_action_meta_1.assistantActionMeta.nodeName}.status = $to,
|
|
69
|
+
${assistant_action_meta_1.assistantActionMeta.nodeName}.resolvedAt = datetime(),
|
|
70
|
+
${assistant_action_meta_1.assistantActionMeta.nodeName}.updatedAt = datetime()
|
|
71
|
+
WITH ${assistant_action_meta_1.assistantActionMeta.nodeName}
|
|
72
|
+
${this.buildReturnStatement()}
|
|
73
|
+
`;
|
|
74
|
+
// writeOne (not readOne): the query contains SET, which Neo4j rejects
|
|
75
|
+
// inside a read transaction. writeOne shares QueryType and returns the
|
|
76
|
+
// serialised entity (or null when the guard did not match).
|
|
77
|
+
const updated = await this.neo4j.writeOne(query);
|
|
78
|
+
return !!updated;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Cross-company sweep used by AssistantActionExpiryCron (runs outside any
|
|
82
|
+
* request, so there is no CLS company context). Mirrors
|
|
83
|
+
* CommunityRepository.findAllStaleCommunities(): the read returns
|
|
84
|
+
* id + companyId pairs so that every subsequent write stays company-scoped.
|
|
85
|
+
*/
|
|
86
|
+
async findAllOverduePendingActions() {
|
|
87
|
+
const query = this.neo4j.initQuery();
|
|
88
|
+
query.queryParams = { ...query.queryParams, pendingStatus: "pending" };
|
|
89
|
+
query.query += `
|
|
90
|
+
MATCH (${assistant_action_meta_1.assistantActionMeta.nodeName}:${assistant_action_meta_1.assistantActionMeta.labelName} {status: $pendingStatus})-[:BELONGS_TO]->(company:Company)
|
|
91
|
+
WHERE ${assistant_action_meta_1.assistantActionMeta.nodeName}.expiresAt < datetime()
|
|
92
|
+
RETURN ${assistant_action_meta_1.assistantActionMeta.nodeName}.id AS assistantActionId, company.id AS companyId
|
|
93
|
+
ORDER BY ${assistant_action_meta_1.assistantActionMeta.nodeName}.expiresAt ASC
|
|
94
|
+
`;
|
|
95
|
+
const result = await this.neo4j.read(query.query, query.queryParams);
|
|
96
|
+
return result.records.map((record) => ({
|
|
97
|
+
assistantActionId: record.get("assistantActionId"),
|
|
98
|
+
companyId: record.get("companyId"),
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Company-scoped expiry write for a single overdue pending action, called by
|
|
103
|
+
* AssistantActionExpiryCron with the companyId resolved by the sweep above.
|
|
104
|
+
* Guarded on status AND expiresAt so a concurrent approval/denial between
|
|
105
|
+
* the sweep read and this write is never overwritten.
|
|
106
|
+
*/
|
|
107
|
+
async expireAction(params) {
|
|
108
|
+
const query = this.neo4j.initQuery();
|
|
109
|
+
query.queryParams = {
|
|
110
|
+
...query.queryParams,
|
|
111
|
+
assistantActionId: params.assistantActionId,
|
|
112
|
+
companyId: params.companyId,
|
|
113
|
+
pendingStatus: "pending",
|
|
114
|
+
expiredStatus: "expired",
|
|
115
|
+
};
|
|
116
|
+
query.query += `
|
|
117
|
+
MATCH (${assistant_action_meta_1.assistantActionMeta.nodeName}:${assistant_action_meta_1.assistantActionMeta.labelName} {id: $assistantActionId})-[:BELONGS_TO]->(company:Company {id: $companyId})
|
|
118
|
+
WHERE ${assistant_action_meta_1.assistantActionMeta.nodeName}.status = $pendingStatus AND ${assistant_action_meta_1.assistantActionMeta.nodeName}.expiresAt < datetime()
|
|
119
|
+
SET ${assistant_action_meta_1.assistantActionMeta.nodeName}.status = $expiredStatus,
|
|
120
|
+
${assistant_action_meta_1.assistantActionMeta.nodeName}.resolvedAt = datetime(),
|
|
121
|
+
${assistant_action_meta_1.assistantActionMeta.nodeName}.updatedAt = datetime()
|
|
122
|
+
`;
|
|
123
|
+
await this.neo4j.writeOne(query);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
exports.AssistantActionRepository = AssistantActionRepository;
|
|
127
|
+
exports.AssistantActionRepository = AssistantActionRepository = __decorate([
|
|
128
|
+
(0, common_1.Injectable)(),
|
|
129
|
+
__metadata("design:paramtypes", [neo4j_service_1.Neo4jService, security_service_1.SecurityService, nestjs_cls_1.ClsService])
|
|
130
|
+
], AssistantActionRepository);
|
|
131
|
+
//# sourceMappingURL=assistant-action.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-action.repository.js","sourceRoot":"","sources":["../../../../src/foundations/assistant-action/repositories/assistant-action.repository.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ClsService } from "nestjs-cls";
|
|
2
|
+
import { JsonApiService } from "../../../core/jsonapi/services/jsonapi.service";
|
|
3
|
+
import { AbstractService } from "../../../core/neo4j/abstracts/abstract.service";
|
|
4
|
+
import { AssistantAction, AssistantActionDescriptor } from "../entities/assistant-action";
|
|
5
|
+
import { AssistantActionRepository } from "../repositories/assistant-action.repository";
|
|
6
|
+
export declare class AssistantActionService extends AbstractService<AssistantAction, typeof AssistantActionDescriptor.relationships> {
|
|
7
|
+
private readonly assistantActionRepository;
|
|
8
|
+
protected readonly descriptor: import("../../..").EntityDescriptor<AssistantAction, {
|
|
9
|
+
assistant: {
|
|
10
|
+
model: import("../../..").DataMeta;
|
|
11
|
+
direction: "in";
|
|
12
|
+
relationship: string;
|
|
13
|
+
cardinality: "one";
|
|
14
|
+
required: true;
|
|
15
|
+
dtoKey: string;
|
|
16
|
+
immutable: true;
|
|
17
|
+
};
|
|
18
|
+
message: {
|
|
19
|
+
model: import("../../..").DataMeta;
|
|
20
|
+
direction: "in";
|
|
21
|
+
relationship: string;
|
|
22
|
+
cardinality: "one";
|
|
23
|
+
required: false;
|
|
24
|
+
dtoKey: string;
|
|
25
|
+
immutable: true;
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
28
|
+
constructor(jsonApiService: JsonApiService, assistantActionRepository: AssistantActionRepository, clsService: ClsService);
|
|
29
|
+
/**
|
|
30
|
+
* Internal creation of a pending action (used by the operator turn flow when
|
|
31
|
+
* a run interrupts on a destructive tool call). Goes through `createFromDTO`
|
|
32
|
+
* — the framework path — so `expiresAt` (ISO string) is auto-cast to a Neo4j
|
|
33
|
+
* datetime by the descriptor.
|
|
34
|
+
*/
|
|
35
|
+
createPendingAction(params: {
|
|
36
|
+
id?: string;
|
|
37
|
+
toolName: string;
|
|
38
|
+
toolArgs: string;
|
|
39
|
+
summary: string;
|
|
40
|
+
threadId: string;
|
|
41
|
+
userModuleIds: string;
|
|
42
|
+
contentScope?: string;
|
|
43
|
+
expiresAt: string;
|
|
44
|
+
assistantId: string;
|
|
45
|
+
messageId?: string;
|
|
46
|
+
}): Promise<AssistantAction>;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=assistant-action.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-action.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant-action/services/assistant-action.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAGjF,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAE1F,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAExF,qBACa,sBAAuB,SAAQ,eAAe,CACzD,eAAe,EACf,OAAO,yBAAyB,CAAC,aAAa,CAC/C;IAKG,OAAO,CAAC,QAAQ,CAAC,yBAAyB;IAJ5C,SAAS,CAAC,QAAQ,CAAC,UAAU;;;;;;;;;;;;;;;;;;;OAA6B;gBAGxD,cAAc,EAAE,cAAc,EACb,yBAAyB,EAAE,yBAAyB,EACrE,UAAU,EAAE,UAAU;IAKxB;;;;;OAKG;IACG,mBAAmB,CAAC,MAAM,EAAE;QAChC,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,eAAe,CAAC;CA0B7B"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AssistantActionService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const crypto_1 = require("crypto");
|
|
15
|
+
const nestjs_cls_1 = require("nestjs-cls");
|
|
16
|
+
const jsonapi_service_1 = require("../../../core/jsonapi/services/jsonapi.service");
|
|
17
|
+
const abstract_service_1 = require("../../../core/neo4j/abstracts/abstract.service");
|
|
18
|
+
const assistant_meta_1 = require("../../assistant/entities/assistant.meta");
|
|
19
|
+
const assistant_message_meta_1 = require("../../assistant-message/entities/assistant-message.meta");
|
|
20
|
+
const assistant_action_1 = require("../entities/assistant-action");
|
|
21
|
+
const assistant_action_meta_1 = require("../entities/assistant-action.meta");
|
|
22
|
+
const assistant_action_repository_1 = require("../repositories/assistant-action.repository");
|
|
23
|
+
let AssistantActionService = class AssistantActionService extends abstract_service_1.AbstractService {
|
|
24
|
+
constructor(jsonApiService, assistantActionRepository, clsService) {
|
|
25
|
+
super(jsonApiService, assistantActionRepository, clsService, assistant_action_1.AssistantActionDescriptor.model);
|
|
26
|
+
this.assistantActionRepository = assistantActionRepository;
|
|
27
|
+
this.descriptor = assistant_action_1.AssistantActionDescriptor;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Internal creation of a pending action (used by the operator turn flow when
|
|
31
|
+
* a run interrupts on a destructive tool call). Goes through `createFromDTO`
|
|
32
|
+
* — the framework path — so `expiresAt` (ISO string) is auto-cast to a Neo4j
|
|
33
|
+
* datetime by the descriptor.
|
|
34
|
+
*/
|
|
35
|
+
async createPendingAction(params) {
|
|
36
|
+
const id = params.id ?? (0, crypto_1.randomUUID)();
|
|
37
|
+
await this.createFromDTO({
|
|
38
|
+
data: {
|
|
39
|
+
type: assistant_action_meta_1.assistantActionMeta.type,
|
|
40
|
+
id,
|
|
41
|
+
attributes: {
|
|
42
|
+
status: "pending",
|
|
43
|
+
toolName: params.toolName,
|
|
44
|
+
toolArgs: params.toolArgs,
|
|
45
|
+
summary: params.summary,
|
|
46
|
+
threadId: params.threadId,
|
|
47
|
+
userModuleIds: params.userModuleIds,
|
|
48
|
+
...(params.contentScope !== undefined ? { contentScope: params.contentScope } : {}),
|
|
49
|
+
expiresAt: params.expiresAt,
|
|
50
|
+
},
|
|
51
|
+
relationships: {
|
|
52
|
+
assistant: { data: { type: assistant_meta_1.assistantMeta.type, id: params.assistantId } },
|
|
53
|
+
...(params.messageId ? { message: { data: { type: assistant_message_meta_1.assistantMessageMeta.type, id: params.messageId } } } : {}),
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
return this.assistantActionRepository.findById({ id });
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
exports.AssistantActionService = AssistantActionService;
|
|
61
|
+
exports.AssistantActionService = AssistantActionService = __decorate([
|
|
62
|
+
(0, common_1.Injectable)(),
|
|
63
|
+
__metadata("design:paramtypes", [jsonapi_service_1.JsonApiService,
|
|
64
|
+
assistant_action_repository_1.AssistantActionRepository,
|
|
65
|
+
nestjs_cls_1.ClsService])
|
|
66
|
+
], AssistantActionService);
|
|
67
|
+
//# sourceMappingURL=assistant-action.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-action.service.js","sourceRoot":"","sources":["../../../../src/foundations/assistant-action/services/assistant-action.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mCAAoC;AACpC,2CAAwC;AACxC,oFAAgF;AAChF,qFAAiF;AACjF,4EAAwE;AACxE,oGAA+F;AAC/F,mEAA0F;AAC1F,6EAAwE;AACxE,6FAAwF;AAGjF,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,kCAG3C;IAGC,YACE,cAA8B,EACb,yBAAoD,EACrE,UAAsB;QAEtB,KAAK,CAAC,cAAc,EAAE,yBAAyB,EAAE,UAAU,EAAE,4CAAyB,CAAC,KAAK,CAAC,CAAC;QAH7E,8BAAyB,GAAzB,yBAAyB,CAA2B;QAJpD,eAAU,GAAG,4CAAyB,CAAC;IAQ1D,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,mBAAmB,CAAC,MAWzB;QACC,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,IAAI,IAAA,mBAAU,GAAE,CAAC;QAErC,MAAM,IAAI,CAAC,aAAa,CAAC;YACvB,IAAI,EAAE;gBACJ,IAAI,EAAE,2CAAmB,CAAC,IAAI;gBAC9B,EAAE;gBACF,UAAU,EAAE;oBACV,MAAM,EAAE,SAAS;oBACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;oBACzB,QAAQ,EAAE,MAAM,CAAC,QAAQ;oBACzB,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;oBACzB,aAAa,EAAE,MAAM,CAAC,aAAa;oBACnC,GAAG,CAAC,MAAM,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;oBACnF,SAAS,EAAE,MAAM,CAAC,SAAS;iBAC5B;gBACD,aAAa,EAAE;oBACb,SAAS,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,8BAAa,CAAC,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,WAAW,EAAE,EAAE;oBACzE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,6CAAoB,CAAC,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBAC9G;aACF;SACF,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC;CACF,CAAA;AAzDY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;qCAQO,gCAAc;QACc,uDAAyB;QACzD,uBAAU;GATb,sBAAsB,CAyDlC"}
|
|
@@ -3,6 +3,7 @@ import { PolymorphicDiscriminatorData } from "../../../common/interfaces/entity.
|
|
|
3
3
|
import type { Company } from "../../company/entities/company";
|
|
4
4
|
import type { Assistant } from "../../assistant/entities/assistant";
|
|
5
5
|
import type { Chunk } from "../../chunk/entities/chunk.entity";
|
|
6
|
+
import type { AssistantAction } from "../../assistant-action/entities/assistant-action";
|
|
6
7
|
export type AssistantMessageRole = "user" | "assistant" | "system";
|
|
7
8
|
export type AssistantMessage = Entity & {
|
|
8
9
|
role: AssistantMessageRole;
|
|
@@ -12,10 +13,12 @@ export type AssistantMessage = Entity & {
|
|
|
12
13
|
inputTokens?: number;
|
|
13
14
|
outputTokens?: number;
|
|
14
15
|
trace?: string;
|
|
16
|
+
messageType?: string;
|
|
15
17
|
company: Company;
|
|
16
18
|
assistant: Assistant;
|
|
17
19
|
references?: unknown[];
|
|
18
20
|
citations?: Chunk[];
|
|
21
|
+
action?: AssistantAction;
|
|
19
22
|
};
|
|
20
23
|
export declare const AssistantMessageDescriptor: import("../../../common").EntityDescriptor<AssistantMessage, {
|
|
21
24
|
assistant: {
|
|
@@ -64,6 +67,15 @@ export declare const AssistantMessageDescriptor: import("../../../common").Entit
|
|
|
64
67
|
required: false;
|
|
65
68
|
})[];
|
|
66
69
|
};
|
|
70
|
+
action: {
|
|
71
|
+
model: import("../../../common").DataMeta;
|
|
72
|
+
direction: "out";
|
|
73
|
+
relationship: string;
|
|
74
|
+
cardinality: "one";
|
|
75
|
+
required: false;
|
|
76
|
+
dtoKey: string;
|
|
77
|
+
immutable: true;
|
|
78
|
+
};
|
|
67
79
|
}>;
|
|
68
80
|
export type AssistantMessageDescriptorType = typeof AssistantMessageDescriptor;
|
|
69
81
|
//# sourceMappingURL=assistant-message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-message.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant-message/entities/assistant-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAElG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAEpE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"assistant-message.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant-message/entities/assistant-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAC;AAElG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAEpE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAIxF,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEnE,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG;IACtC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAmCT,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BxD,CAAC;AAEH,MAAM,MAAM,8BAA8B,GAAG,OAAO,0BAA0B,CAAC"}
|
|
@@ -5,6 +5,7 @@ const common_1 = require("../../../common");
|
|
|
5
5
|
const registry_1 = require("../../../common/registries/registry");
|
|
6
6
|
const assistant_meta_1 = require("../../assistant/entities/assistant.meta");
|
|
7
7
|
const chunk_meta_1 = require("../../chunk/entities/chunk.meta");
|
|
8
|
+
const assistant_action_meta_1 = require("../../assistant-action/entities/assistant-action.meta");
|
|
8
9
|
const assistant_message_meta_1 = require("./assistant-message.meta");
|
|
9
10
|
exports.AssistantMessageDescriptor = (0, common_1.defineEntity)()({
|
|
10
11
|
...assistant_message_meta_1.assistantMessageMeta,
|
|
@@ -17,6 +18,7 @@ exports.AssistantMessageDescriptor = (0, common_1.defineEntity)()({
|
|
|
17
18
|
inputTokens: { type: "number" },
|
|
18
19
|
outputTokens: { type: "number" },
|
|
19
20
|
trace: { type: "string" },
|
|
21
|
+
messageType: { type: "string" },
|
|
20
22
|
},
|
|
21
23
|
relationships: {
|
|
22
24
|
assistant: {
|
|
@@ -62,6 +64,15 @@ exports.AssistantMessageDescriptor = (0, common_1.defineEntity)()({
|
|
|
62
64
|
{ name: "reason", type: "string", required: false },
|
|
63
65
|
],
|
|
64
66
|
},
|
|
67
|
+
action: {
|
|
68
|
+
model: assistant_action_meta_1.assistantActionMeta,
|
|
69
|
+
direction: "out", // (AssistantMessage)-[:REQUESTED_IN]->(AssistantAction) — mirror of AssistantAction.message
|
|
70
|
+
relationship: "REQUESTED_IN",
|
|
71
|
+
cardinality: "one",
|
|
72
|
+
required: false,
|
|
73
|
+
dtoKey: "action",
|
|
74
|
+
immutable: true,
|
|
75
|
+
},
|
|
65
76
|
},
|
|
66
77
|
});
|
|
67
78
|
//# sourceMappingURL=assistant-message.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-message.js","sourceRoot":"","sources":["../../../../src/foundations/assistant-message/entities/assistant-message.ts"],"names":[],"mappings":";;;AAAA,4CAAuD;AAEvD,kEAAoE;AAGpE,4EAAwE;AAExE,gEAA4D;
|
|
1
|
+
{"version":3,"file":"assistant-message.js","sourceRoot":"","sources":["../../../../src/foundations/assistant-message/entities/assistant-message.ts"],"names":[],"mappings":";;;AAAA,4CAAuD;AAEvD,kEAAoE;AAGpE,4EAAwE;AAExE,gEAA4D;AAE5D,iGAA4F;AAC5F,qEAAgE;AAoBnD,QAAA,0BAA0B,GAAG,IAAA,qBAAY,GAAoB,CAAC;IACzE,GAAG,6CAAoB;IACvB,eAAe,EAAE,IAAI;IACrB,MAAM,EAAE;QACN,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACxC,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC5C,kBAAkB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;QACxC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC/B,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAChC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzB,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAChC;IACD,aAAa,EAAE;QACb,SAAS,EAAE;YACT,KAAK,EAAE,8BAAa;YACpB,SAAS,EAAE,IAAI;YACf,YAAY,EAAE,aAAa;YAC3B,WAAW,EAAE,KAAK;YAClB,MAAM,EAAE,WAAW;YACnB,QAAQ,EAAE,IAAI;YACd,SAAS,EAAE,IAAI;SAChB;QACD,UAAU,EAAE;YACV,KAAK,EAAE,6CAAoB;YAC3B,SAAS,EAAE,KAAK;YAChB,YAAY,EAAE,YAAY;YAC1B,WAAW,EAAE,MAAM;YACnB,MAAM,EAAE,YAAY;YACpB,MAAM,EAAE;gBACN,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;gBACtD,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;aACpD;YACD,WAAW,EAAE;gBACX,UAAU,EAAE,EAAE;gBACd,aAAa,EAAE,CAAC,IAAkC,EAAE,EAAE;oBACpD,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;wBAChC,MAAM,KAAK,GAAG,wBAAa,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;wBAClD,IAAI,KAAK;4BAAE,OAAO,KAAK,CAAC;oBAC1B,CAAC;oBACD,MAAM,IAAI,KAAK,CAAC,yDAAyD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;gBAC1G,CAAC;aACF;SACF;QACD,SAAS,EAAE;YACT,KAAK,EAAE,sBAAS;YAChB,SAAS,EAAE,KAAK;YAChB,YAAY,EAAE,OAAO;YACrB,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,WAAW;YACnB,MAAM,EAAE;gBACN,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;gBACrD,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;aACpD;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,2CAAmB;YAC1B,SAAS,EAAE,KAAK,EAAE,4FAA4F;YAC9G,YAAY,EAAE,cAAc;YAC5B,WAAW,EAAE,KAAK;YAClB,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,IAAI;SAChB;KACF;CACF,CAAC,CAAC"}
|
|
@@ -59,6 +59,15 @@ export declare class AssistantMessageRepository extends AbstractRepository<Assis
|
|
|
59
59
|
required: false;
|
|
60
60
|
})[];
|
|
61
61
|
};
|
|
62
|
+
action: {
|
|
63
|
+
model: import("../../..").DataMeta;
|
|
64
|
+
direction: "out";
|
|
65
|
+
relationship: string;
|
|
66
|
+
cardinality: "one";
|
|
67
|
+
required: false;
|
|
68
|
+
dtoKey: string;
|
|
69
|
+
immutable: true;
|
|
70
|
+
};
|
|
62
71
|
}>;
|
|
63
72
|
constructor(neo4j: Neo4jService, securityService: SecurityService, clsService: ClsService);
|
|
64
73
|
protected buildUserHasAccess(): string;
|
package/dist/foundations/assistant-message/repositories/assistant-message.repository.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-message.repository.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant-message/repositories/assistant-message.repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAEnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iEAAiE,CAAC;AACvG,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAE7F;;;;;;GAMG;AACH,qBACa,0BAA2B,SAAQ,kBAAkB,CAChE,gBAAgB,EAChB,OAAO,0BAA0B,CAAC,aAAa,CAChD;IACC,SAAS,CAAC,QAAQ,CAAC,UAAU
|
|
1
|
+
{"version":3,"file":"assistant-message.repository.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant-message/repositories/assistant-message.repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAEnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iEAAiE,CAAC;AACvG,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAE7F;;;;;;GAMG;AACH,qBACa,0BAA2B,SAAQ,kBAAkB,CAChE,gBAAgB,EAChB,OAAO,0BAA0B,CAAC,aAAa,CAChD;IACC,SAAS,CAAC,QAAQ,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAA8B;gBAE/C,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU;IAIzF,SAAS,CAAC,kBAAkB,IAAI,MAAM;IAStC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA+C;IAEzE;;;OAGG;IACG,eAAe,CAAC,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAcvE;;;;;;OAMG;IACG,cAAc,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,eAAe,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA6BjG;;;;;;OAMG;IACG,aAAa,CAAC,MAAM,EAAE;QAC1B,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,KAAK,CAAC;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAC3E,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBjB;;;OAGG;IACG,QAAQ,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAO3E;;;OAGG;IACG,yBAAyB,CAAC,MAAM,EAAE;QACtC,UAAU,EAAE,MAAM,EAAE,CAAC;KACtB,GAAG,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAuB/D"}
|
|
@@ -51,6 +51,15 @@ export declare class AssistantMessageService extends AbstractService<AssistantMe
|
|
|
51
51
|
required: false;
|
|
52
52
|
})[];
|
|
53
53
|
};
|
|
54
|
+
action: {
|
|
55
|
+
model: import("../../..").DataMeta;
|
|
56
|
+
direction: "out";
|
|
57
|
+
relationship: string;
|
|
58
|
+
cardinality: "one";
|
|
59
|
+
required: false;
|
|
60
|
+
dtoKey: string;
|
|
61
|
+
immutable: true;
|
|
62
|
+
};
|
|
54
63
|
}>;
|
|
55
64
|
constructor(jsonApiService: JsonApiService, assistantMessageRepository: AssistantMessageRepository, clsService: ClsService);
|
|
56
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-message.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant-message/services/assistant-message.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAE1F,qBACa,uBAAwB,SAAQ,eAAe,CAC1D,gBAAgB,EAChB,OAAO,0BAA0B,CAAC,aAAa,CAChD;IACC,SAAS,CAAC,QAAQ,CAAC,UAAU
|
|
1
|
+
{"version":3,"file":"assistant-message.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant-message/services/assistant-message.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC7F,OAAO,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAE1F,qBACa,uBAAwB,SAAQ,eAAe,CAC1D,gBAAgB,EAChB,OAAO,0BAA0B,CAAC,aAAa,CAChD;IACC,SAAS,CAAC,QAAQ,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAA8B;gBAGzD,cAAc,EAAE,cAAc,EAC9B,0BAA0B,EAAE,0BAA0B,EACtD,UAAU,EAAE,UAAU;CAIzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,uBAAuB,CAAC;AAGtC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,uBAAuB,CAAC;AAGtC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
|
|
@@ -21,6 +21,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
21
21
|
__exportStar(require("./foundations.modules"), exports);
|
|
22
22
|
// Individual foundation modules with entities, metas, repositories, and services
|
|
23
23
|
__exportStar(require("./assistant"), exports);
|
|
24
|
+
__exportStar(require("./assistant-action"), exports);
|
|
24
25
|
__exportStar(require("./assistant-message"), exports);
|
|
25
26
|
__exportStar(require("./atomicfact"), exports);
|
|
26
27
|
__exportStar(require("./audit"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,sFAAsF;AACtF,wDAAsC;AAEtC,iFAAiF;AACjF,8CAA4B;AAC5B,sDAAoC;AACpC,+CAA6B;AAC7B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,iDAA+B;AAC/B,4CAA0B;AAC1B,2CAAyB;AACzB,+CAA6B;AAC7B,2CAAyB;AACzB,iDAA+B;AAC/B,0CAAwB;AACxB,yCAAuB;AACvB,6CAA2B;AAC3B,8CAA4B;AAC5B,yCAAuB;AACvB,uCAAqB;AACrB,2CAAyB;AACzB,+CAA6B;AAC7B,+CAA6B;AAC7B,yCAAuB;AACvB,yCAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/foundations/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,sFAAsF;AACtF,wDAAsC;AAEtC,iFAAiF;AACjF,8CAA4B;AAC5B,qDAAmC;AACnC,sDAAoC;AACpC,+CAA6B;AAC7B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,iDAA+B;AAC/B,4CAA0B;AAC1B,2CAAyB;AACzB,+CAA6B;AAC7B,2CAAyB;AACzB,iDAA+B;AAC/B,0CAAwB;AACxB,yCAAuB;AACvB,6CAA2B;AAC3B,8CAA4B;AAC5B,yCAAuB;AACvB,uCAAqB;AACrB,2CAAyB;AACzB,+CAA6B;AAC7B,+CAA6B;AAC7B,yCAAuB;AACvB,yCAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenusage.entity.d.ts","sourceRoot":"","sources":["../../../../src/foundations/tokenusage/entities/tokenusage.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAEzD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IAEvB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC"}
|
|
1
|
+
{"version":3,"file":"tokenusage.entity.d.ts","sourceRoot":"","sources":["../../../../src/foundations/tokenusage/entities/tokenusage.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAEzD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IAEvB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenusage.map.d.ts","sourceRoot":"","sources":["../../../../src/foundations/tokenusage/entities/tokenusage.map.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAEzE,eAAO,MAAM,aAAa,GAAI,QAAQ;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,MAAM,EAAE,GAAG,CAAC;IAAC,aAAa,EAAE,aAAa,CAAA;CAAE,KAAG,
|
|
1
|
+
{"version":3,"file":"tokenusage.map.d.ts","sourceRoot":"","sources":["../../../../src/foundations/tokenusage/entities/tokenusage.map.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAEzE,eAAO,MAAM,aAAa,GAAI,QAAQ;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,MAAM,EAAE,GAAG,CAAC;IAAC,aAAa,EAAE,aAAa,CAAA;CAAE,KAAG,UAUhG,CAAC"}
|
|
@@ -7,6 +7,7 @@ const mapTokenUsage = (params) => {
|
|
|
7
7
|
...(0, entity_1.mapEntity)({ record: params.data }),
|
|
8
8
|
inputTokens: params.data.inputTokens,
|
|
9
9
|
outputTokens: params.data.outputTokens,
|
|
10
|
+
cachedInputTokens: params.data.cachedInputTokens,
|
|
10
11
|
cost: params.data.cost,
|
|
11
12
|
tokenUsageType: params.data.tokenUsageType,
|
|
12
13
|
company: undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenusage.map.js","sourceRoot":"","sources":["../../../../src/foundations/tokenusage/entities/tokenusage.map.ts"],"names":[],"mappings":";;;AAAA,6DAA6D;AAItD,MAAM,aAAa,GAAG,CAAC,MAAgE,EAAc,EAAE;IAC5G,OAAO;QACL,GAAG,IAAA,kBAAS,EAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;QACrC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW;QACpC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY;QACtC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI;QACtB,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,cAAc;QAC1C,OAAO,EAAE,SAAS;KACnB,CAAC;AACJ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"tokenusage.map.js","sourceRoot":"","sources":["../../../../src/foundations/tokenusage/entities/tokenusage.map.ts"],"names":[],"mappings":";;;AAAA,6DAA6D;AAItD,MAAM,aAAa,GAAG,CAAC,MAAgE,EAAc,EAAE;IAC5G,OAAO;QACL,GAAG,IAAA,kBAAS,EAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;QACrC,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW;QACpC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY;QACtC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,iBAAiB;QAChD,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI;QACtB,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,cAAc;QAC1C,OAAO,EAAE,SAAS;KACnB,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,aAAa,iBAUxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenusage.repository.d.ts","sourceRoot":"","sources":["../../../../src/foundations/tokenusage/repositories/tokenusage.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAG1E,qBACa,oBAAqB,YAAW,YAAY;IAC3C,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,YAAY;IAE1C,YAAY;IAMZ,MAAM,CAAC,MAAM,EAAE;QACnB,EAAE,EAAE,MAAM,CAAC;QACX,cAAc,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,cAAc,EAAE,MAAM,CAAC;QACvB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"tokenusage.repository.d.ts","sourceRoot":"","sources":["../../../../src/foundations/tokenusage/repositories/tokenusage.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAG1E,qBACa,oBAAqB,YAAW,YAAY;IAC3C,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,YAAY;IAE1C,YAAY;IAMZ,MAAM,CAAC,MAAM,EAAE;QACnB,EAAE,EAAE,MAAM,CAAC;QACX,cAAc,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,cAAc,EAAE,MAAM,CAAC;QACvB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,GAAG,OAAO,CAAC,IAAI,CAAC;CAkClB"}
|
|
@@ -30,6 +30,7 @@ let TokenUsageRepository = class TokenUsageRepository {
|
|
|
30
30
|
tokenUsageType: params.tokenUsageType,
|
|
31
31
|
inputTokens: params.inputTokens,
|
|
32
32
|
outputTokens: params.outputTokens,
|
|
33
|
+
cachedInputTokens: params.cachedInputTokens ?? 0,
|
|
33
34
|
relationshipId: params.relationshipId,
|
|
34
35
|
cost: params.cost ?? 0,
|
|
35
36
|
};
|
|
@@ -39,6 +40,7 @@ let TokenUsageRepository = class TokenUsageRepository {
|
|
|
39
40
|
tokenUsageType: $tokenUsageType,
|
|
40
41
|
inputTokens: $inputTokens,
|
|
41
42
|
outputTokens: $outputTokens,
|
|
43
|
+
cachedInputTokens: $cachedInputTokens,
|
|
42
44
|
cost: $cost,
|
|
43
45
|
createdAt: datetime(),
|
|
44
46
|
updatedAt: datetime()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenusage.repository.js","sourceRoot":"","sources":["../../../../src/foundations/tokenusage/repositories/tokenusage.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA0D;AAC1D,8EAA0E;AAC1E,+EAA2E;AAGpE,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAA6B,KAAmB;QAAnB,UAAK,GAAL,KAAK,CAAc;IAAG,CAAC;IAEpD,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;YACxB,KAAK,EAAE,qBAAqB,gCAAc,CAAC,QAAQ,0BAA0B,gCAAc,CAAC,QAAQ,IAAI,gCAAc,CAAC,SAAS,aAAa,gCAAc,CAAC,QAAQ,eAAe;SACpL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"tokenusage.repository.js","sourceRoot":"","sources":["../../../../src/foundations/tokenusage/repositories/tokenusage.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA0D;AAC1D,8EAA0E;AAC1E,+EAA2E;AAGpE,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAA6B,KAAmB;QAAnB,UAAK,GAAL,KAAK,CAAc;IAAG,CAAC;IAEpD,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;YACxB,KAAK,EAAE,qBAAqB,gCAAc,CAAC,QAAQ,0BAA0B,gCAAc,CAAC,QAAQ,IAAI,gCAAc,CAAC,SAAS,aAAa,gCAAc,CAAC,QAAQ,eAAe;SACpL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MASZ;QACC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;QAErC,KAAK,CAAC,WAAW,GAAG;YAClB,GAAG,KAAK,CAAC,WAAW;YACpB,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,IAAI,CAAC;YAChD,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,CAAC;SACvB,CAAC;QAEF,KAAK,CAAC,KAAK,IAAI;;;;;;;;;;;;;;yBAcM,MAAM,CAAC,gBAAgB;;KAE3C,CAAC;QAEF,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;CACF,CAAA;AApDY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAEyB,4BAAY;GADrC,oBAAoB,CAoDhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenusage.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/tokenusage/services/tokenusage.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,mBAAmB,EAAqB,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qDAAqD,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAGnE,qBACa,iBAAiB;IAI1B,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAL/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsC;gBAG1C,oBAAoB,EAAE,oBAAoB,EAC1C,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC,EACjD,YAAY,EAAE,aAAa;IAG9C,OAAO,KAAK,QAAQ,GAEnB;IAED,OAAO,CAAC,eAAe;IAWvB;;;;OAIG;IACH,WAAW,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,mBAAmB,CAAC;QAAC,cAAc,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"tokenusage.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/tokenusage/services/tokenusage.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,mBAAmB,EAAqB,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qDAAqD,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAGnE,qBACa,iBAAiB;IAI1B,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAL/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsC;gBAG1C,oBAAoB,EAAE,oBAAoB,EAC1C,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC,EACjD,YAAY,EAAE,aAAa;IAG9C,OAAO,KAAK,QAAQ,GAEnB;IAED,OAAO,CAAC,eAAe;IAWvB;;;;OAIG;IACH,WAAW,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,mBAAmB,CAAC;QAAC,cAAc,CAAC,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,MAAM;IAY3G,gBAAgB,CAAC,MAAM,EAAE;QAC7B,MAAM,EAAE,mBAAmB,CAAC;QAC5B,IAAI,EAAE,MAAM,CAAC;QACb,cAAc,EAAE,MAAM,CAAC;QACvB,gBAAgB,EAAE,MAAM,CAAC;QACzB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,WAAW,CAAC,EAAE,WAAW,CAAC;KAC3B,GAAG,OAAO,CAAC,IAAI,CAAC;CAiClB"}
|
|
@@ -45,9 +45,14 @@ let TokenUsageService = TokenUsageService_1 = class TokenUsageService {
|
|
|
45
45
|
*/
|
|
46
46
|
computeCost(params) {
|
|
47
47
|
const costConfig = params.useVisionCosts ? this.aiConfig.vision : this.configForWeight(params.modelWeight);
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
|
|
48
|
+
const inputRate = costConfig.inputCostPer1MTokens ?? 0;
|
|
49
|
+
const outputRate = costConfig.outputCostPer1MTokens ?? 0;
|
|
50
|
+
// vision/audio configs have no cached rate → falls back to the full input rate (no discount).
|
|
51
|
+
const cachedRate = costConfig.cachedInputCostPer1MTokens ?? inputRate;
|
|
52
|
+
const cached = Math.min(params.tokens.cached ?? 0, params.tokens.input);
|
|
53
|
+
const uncachedInput = params.tokens.input - cached;
|
|
54
|
+
const cost = uncachedInput * inputRate + cached * cachedRate + params.tokens.output * outputRate;
|
|
55
|
+
return cost / 1_000_000;
|
|
51
56
|
}
|
|
52
57
|
async recordTokenUsage(params) {
|
|
53
58
|
const cost = this.computeCost({
|
|
@@ -60,6 +65,7 @@ let TokenUsageService = TokenUsageService_1 = class TokenUsageService {
|
|
|
60
65
|
tokenUsageType: params.type,
|
|
61
66
|
inputTokens: params.tokens.input,
|
|
62
67
|
outputTokens: params.tokens.output,
|
|
68
|
+
cachedInputTokens: params.tokens.cached ?? 0,
|
|
63
69
|
cost: cost,
|
|
64
70
|
relationshipId: params.relationshipId,
|
|
65
71
|
relationshipType: params.relationshipType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenusage.service.js","sourceRoot":"","sources":["../../../../src/foundations/tokenusage/services/tokenusage.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,2CAA+C;AAC/C,yDAAsD;AACtD,mCAAoC;AAGpC,+FAA2F;AAC3F,uEAAmE;AACnE,mEAAoG;AAG7F,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IAG5B,YACmB,oBAA0C,EAC1C,aAAiD,EACjD,YAA2B;QAF3B,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,kBAAa,GAAb,aAAa,CAAoC;QACjD,iBAAY,GAAZ,YAAY,CAAe;QAL7B,WAAM,GAAG,IAAI,eAAM,CAAC,mBAAiB,CAAC,IAAI,CAAC,CAAC;IAM1D,CAAC;IAEJ,IAAY,QAAQ;QAClB,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAoB,IAAI,CAAC,CAAC;IACzD,CAAC;IAEO,eAAe,CAAC,MAAoB;QAC1C,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,0BAAW,CAAC,IAAI;gBACnB,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;YAC9B,KAAK,0BAAW,CAAC,KAAK;gBACpB,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YAC/B;gBACE,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,WAAW,CAAC,MAA4F;QACtG,MAAM,UAAU,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAC3G,MAAM,SAAS,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"tokenusage.service.js","sourceRoot":"","sources":["../../../../src/foundations/tokenusage/services/tokenusage.service.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carlonicora/nestjs-neo4jsonapi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.98.0",
|
|
4
4
|
"description": "NestJS foundation package with JSON:API, Neo4j, Redis, LangChain agents, and common utilities",
|
|
5
5
|
"author": "Carlo Nicora",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"@langchain/core": "^1.1.48",
|
|
73
73
|
"@langchain/google-vertexai": "^2.1.31",
|
|
74
74
|
"@langchain/langgraph": "^1.3.2",
|
|
75
|
+
"@langchain/langgraph-checkpoint-redis": "^1.0.7",
|
|
75
76
|
"@langchain/openai": "^1.4.7",
|
|
76
77
|
"@langchain/textsplitters": "^1.0.1",
|
|
77
78
|
"langsmith": "^0.7.5",
|