@carlonicora/nestjs-neo4jsonapi 2.1.0 → 2.2.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/graph.module.d.ts.map +1 -1
- package/dist/agents/graph/graph.module.js +3 -0
- package/dist/agents/graph/graph.module.js.map +1 -1
- package/dist/agents/graph/interfaces/graph.catalog.interface.d.ts +24 -0
- package/dist/agents/graph/interfaces/graph.catalog.interface.d.ts.map +1 -1
- package/dist/agents/graph/services/graph.catalog.service.d.ts +9 -0
- package/dist/agents/graph/services/graph.catalog.service.d.ts.map +1 -1
- package/dist/agents/graph/services/graph.catalog.service.js +61 -1
- package/dist/agents/graph/services/graph.catalog.service.js.map +1 -1
- package/dist/agents/graph/services/graph.search.service.d.ts +16 -1
- package/dist/agents/graph/services/graph.search.service.d.ts.map +1 -1
- package/dist/agents/graph/services/graph.search.service.js +51 -4
- package/dist/agents/graph/services/graph.search.service.js.map +1 -1
- package/dist/agents/graph/services/humanize-tool.d.ts +17 -2
- package/dist/agents/graph/services/humanize-tool.d.ts.map +1 -1
- package/dist/agents/graph/services/humanize-tool.js +71 -6
- package/dist/agents/graph/services/humanize-tool.js.map +1 -1
- package/dist/agents/graph/services/materialise-bridge.d.ts +6 -0
- package/dist/agents/graph/services/materialise-bridge.d.ts.map +1 -1
- package/dist/agents/graph/services/materialise-bridge.js +17 -1
- package/dist/agents/graph/services/materialise-bridge.js.map +1 -1
- package/dist/agents/graph/services/scope.guard.d.ts +43 -0
- package/dist/agents/graph/services/scope.guard.d.ts.map +1 -0
- package/dist/agents/graph/services/scope.guard.js +91 -0
- package/dist/agents/graph/services/scope.guard.js.map +1 -0
- package/dist/agents/graph/tools/read-entity.tool.d.ts +9 -1
- package/dist/agents/graph/tools/read-entity.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/read-entity.tool.js +30 -5
- package/dist/agents/graph/tools/read-entity.tool.js.map +1 -1
- package/dist/agents/graph/tools/resolve-entity.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/resolve-entity.tool.js +8 -1
- package/dist/agents/graph/tools/resolve-entity.tool.js.map +1 -1
- package/dist/agents/graph/tools/search-entities.tool.d.ts +9 -1
- package/dist/agents/graph/tools/search-entities.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/search-entities.tool.js +37 -8
- package/dist/agents/graph/tools/search-entities.tool.js.map +1 -1
- package/dist/agents/graph/tools/tool.factory.d.ts +4 -0
- package/dist/agents/graph/tools/tool.factory.d.ts.map +1 -1
- package/dist/agents/graph/tools/tool.factory.js.map +1 -1
- package/dist/agents/graph/tools/traverse.tool.d.ts +9 -1
- package/dist/agents/graph/tools/traverse.tool.d.ts.map +1 -1
- package/dist/agents/graph/tools/traverse.tool.js +21 -5
- package/dist/agents/graph/tools/traverse.tool.js.map +1 -1
- package/dist/agents/operator/contexts/operator.context.d.ts +4 -0
- package/dist/agents/operator/contexts/operator.context.d.ts.map +1 -1
- package/dist/agents/operator/contexts/operator.context.js +4 -0
- package/dist/agents/operator/contexts/operator.context.js.map +1 -1
- package/dist/agents/operator/operator.module.d.ts.map +1 -1
- package/dist/agents/operator/operator.module.js +4 -0
- package/dist/agents/operator/operator.module.js.map +1 -1
- package/dist/agents/operator/services/operator.service.d.ts +8 -0
- package/dist/agents/operator/services/operator.service.d.ts.map +1 -1
- package/dist/agents/operator/services/operator.service.js +8 -0
- package/dist/agents/operator/services/operator.service.js.map +1 -1
- package/dist/agents/operator/tools/entity-write.tools.d.ts +124 -0
- package/dist/agents/operator/tools/entity-write.tools.d.ts.map +1 -0
- package/dist/agents/operator/tools/entity-write.tools.js +471 -0
- package/dist/agents/operator/tools/entity-write.tools.js.map +1 -0
- package/dist/agents/operator/tools/operator.tool.registry.d.ts +5 -1
- package/dist/agents/operator/tools/operator.tool.registry.d.ts.map +1 -1
- package/dist/agents/operator/tools/operator.tool.registry.js +19 -2
- package/dist/agents/operator/tools/operator.tool.registry.js.map +1 -1
- package/dist/agents/operator/tools/search-documents.tool.d.ts +16 -1
- package/dist/agents/operator/tools/search-documents.tool.d.ts.map +1 -1
- package/dist/agents/operator/tools/search-documents.tool.js +59 -3
- package/dist/agents/operator/tools/search-documents.tool.js.map +1 -1
- package/dist/agents/prompts/index.d.ts +1 -0
- package/dist/agents/prompts/index.d.ts.map +1 -1
- package/dist/agents/prompts/index.js +7 -1
- package/dist/agents/prompts/index.js.map +1 -1
- package/dist/agents/responder/contexts/responder.context.d.ts +12 -0
- package/dist/agents/responder/contexts/responder.context.d.ts.map +1 -1
- package/dist/agents/responder/contexts/responder.context.js +4 -0
- package/dist/agents/responder/contexts/responder.context.js.map +1 -1
- package/dist/agents/responder/factories/responder.context.factory.d.ts +4 -0
- package/dist/agents/responder/factories/responder.context.factory.d.ts.map +1 -1
- package/dist/agents/responder/factories/responder.context.factory.js +2 -0
- package/dist/agents/responder/factories/responder.context.factory.js.map +1 -1
- package/dist/agents/responder/nodes/graph.node.service.d.ts.map +1 -1
- package/dist/agents/responder/nodes/graph.node.service.js +18 -2
- package/dist/agents/responder/nodes/graph.node.service.js.map +1 -1
- package/dist/agents/responder/nodes/responder.answer.node.service.d.ts +32 -0
- package/dist/agents/responder/nodes/responder.answer.node.service.d.ts.map +1 -1
- package/dist/agents/responder/nodes/responder.answer.node.service.js +31 -19
- package/dist/agents/responder/nodes/responder.answer.node.service.js.map +1 -1
- package/dist/agents/responder/services/responder.service.d.ts +4 -0
- package/dist/agents/responder/services/responder.service.d.ts.map +1 -1
- package/dist/agents/responder/services/responder.service.js +2 -0
- package/dist/agents/responder/services/responder.service.js.map +1 -1
- package/dist/common/interfaces/entity.schema.interface.d.ts +16 -0
- package/dist/common/interfaces/entity.schema.interface.d.ts.map +1 -1
- package/dist/config/interfaces/config.prompts.interface.d.ts +12 -0
- package/dist/config/interfaces/config.prompts.interface.d.ts.map +1 -1
- package/dist/core/blocknote/services/blocknote.service.d.ts +23 -14
- package/dist/core/blocknote/services/blocknote.service.d.ts.map +1 -1
- package/dist/core/blocknote/services/blocknote.service.js +48 -32
- package/dist/core/blocknote/services/blocknote.service.js.map +1 -1
- package/dist/core/llm/services/llm.service.d.ts.map +1 -1
- package/dist/core/llm/services/llm.service.js +34 -2
- package/dist/core/llm/services/llm.service.js.map +1 -1
- package/dist/core/llm/services/tool-error-feedback.d.ts +40 -0
- package/dist/core/llm/services/tool-error-feedback.d.ts.map +1 -0
- package/dist/core/llm/services/tool-error-feedback.js +131 -0
- package/dist/core/llm/services/tool-error-feedback.js.map +1 -0
- package/dist/foundations/assistant/assistant.module.d.ts.map +1 -1
- package/dist/foundations/assistant/assistant.module.js +7 -1
- package/dist/foundations/assistant/assistant.module.js.map +1 -1
- package/dist/foundations/assistant/controllers/assistant.controller.d.ts +13 -1
- package/dist/foundations/assistant/controllers/assistant.controller.d.ts.map +1 -1
- package/dist/foundations/assistant/controllers/assistant.controller.js +37 -3
- package/dist/foundations/assistant/controllers/assistant.controller.js.map +1 -1
- package/dist/foundations/assistant/dtos/assistant-append.dto.d.ts +6 -0
- package/dist/foundations/assistant/dtos/assistant-append.dto.d.ts.map +1 -1
- package/dist/foundations/assistant/dtos/assistant-append.dto.js +1 -1
- package/dist/foundations/assistant/dtos/assistant-append.dto.js.map +1 -1
- package/dist/foundations/assistant/dtos/assistant-post.dto.d.ts +29 -0
- package/dist/foundations/assistant/dtos/assistant-post.dto.d.ts.map +1 -1
- package/dist/foundations/assistant/dtos/assistant-post.dto.js +47 -2
- package/dist/foundations/assistant/dtos/assistant-post.dto.js.map +1 -1
- package/dist/foundations/assistant/repositories/assistant.repository.d.ts +22 -0
- package/dist/foundations/assistant/repositories/assistant.repository.d.ts.map +1 -1
- package/dist/foundations/assistant/repositories/assistant.repository.js +28 -0
- package/dist/foundations/assistant/repositories/assistant.repository.js.map +1 -1
- package/dist/foundations/assistant/services/assistant-mention.extractor.d.ts +36 -0
- package/dist/foundations/assistant/services/assistant-mention.extractor.d.ts.map +1 -0
- package/dist/foundations/assistant/services/assistant-mention.extractor.js +99 -0
- package/dist/foundations/assistant/services/assistant-mention.extractor.js.map +1 -0
- package/dist/foundations/assistant/services/assistant.service.d.ts +84 -2
- package/dist/foundations/assistant/services/assistant.service.d.ts.map +1 -1
- package/dist/foundations/assistant/services/assistant.service.js +312 -60
- package/dist/foundations/assistant/services/assistant.service.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export declare class AssistantAppendAttributesDto {
|
|
2
|
+
/**
|
|
3
|
+
* This user message. Either plain text, or — following the host app's
|
|
4
|
+
* BlockNote convention — a JSON-serialised BlockNote document, which the
|
|
5
|
+
* server detects and converts. An append carries no binding; it inherits
|
|
6
|
+
* the thread's.
|
|
7
|
+
*/
|
|
2
8
|
content: string;
|
|
3
9
|
howToMode?: boolean;
|
|
4
10
|
limitToHowToId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-append.dto.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant/dtos/assistant-append.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,4BAA4B;
|
|
1
|
+
{"version":3,"file":"assistant-append.dto.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant/dtos/assistant-append.dto.ts"],"names":[],"mappings":"AAGA,qBAAa,4BAA4B;IACvC;;;;;OAKG;IAIH,OAAO,EAAG,MAAM,CAAC;IAIjB,SAAS,CAAC,EAAE,OAAO,CAAC;IAIpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,qBAAa,sBAAsB;IAEjC,IAAI,EAAG,MAAM,CAAC;IAId,UAAU,EAAG,4BAA4B,CAAC;CAC3C;AAED,qBAAa,kBAAkB;IAG7B,IAAI,EAAG,sBAAsB,CAAC;CAC/B"}
|
|
@@ -18,7 +18,7 @@ exports.AssistantAppendAttributesDto = AssistantAppendAttributesDto;
|
|
|
18
18
|
__decorate([
|
|
19
19
|
(0, class_validator_1.IsString)(),
|
|
20
20
|
(0, class_validator_1.IsNotEmpty)(),
|
|
21
|
-
(0, class_validator_1.MaxLength)(
|
|
21
|
+
(0, class_validator_1.MaxLength)(200_000),
|
|
22
22
|
__metadata("design:type", String)
|
|
23
23
|
], AssistantAppendAttributesDto.prototype, "content", void 0);
|
|
24
24
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-append.dto.js","sourceRoot":"","sources":["../../../../src/foundations/assistant/dtos/assistant-append.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyC;AACzC,qDAAiH;AAEjH,MAAa,4BAA4B;
|
|
1
|
+
{"version":3,"file":"assistant-append.dto.js","sourceRoot":"","sources":["../../../../src/foundations/assistant/dtos/assistant-append.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyC;AACzC,qDAAiH;AAEjH,MAAa,4BAA4B;CAmBxC;AAnBD,oEAmBC;AATC;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,OAAO,CAAC;;6DACF;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;+DACQ;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oEACa;AAG1B,MAAa,sBAAsB;CAOlC;AAPD,wDAOC;AALC;IADC,IAAA,wBAAM,EAAC,oBAAoB,CAAC;;oDACf;AAId;IAFC,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;8BAC5B,4BAA4B;0DAAC;AAG5C,MAAa,kBAAkB;CAI9B;AAJD,gDAIC;AADC;IAFC,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BAC5B,sBAAsB;gDAAC"}
|
|
@@ -1,4 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reference to the resource a thread is bound to (the `content` relationship,
|
|
3
|
+
* materialised as `(Assistant)-[:BOUND_TO]->(target)`).
|
|
4
|
+
*
|
|
5
|
+
* `type` is a plain `@IsString()` — NOT `@Equals(...)` — because the
|
|
6
|
+
* relationship is polymorphic: any registered model may be the target. The
|
|
7
|
+
* controller resolves the string against the model registry and rejects
|
|
8
|
+
* unknown types there, which is the only place that knows the full set.
|
|
9
|
+
*/
|
|
10
|
+
export declare class AssistantContentReferenceDto {
|
|
11
|
+
type: string;
|
|
12
|
+
id: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class AssistantContentRelationshipDto {
|
|
15
|
+
data: AssistantContentReferenceDto;
|
|
16
|
+
}
|
|
17
|
+
export declare class AssistantPostRelationshipsDto {
|
|
18
|
+
content?: AssistantContentRelationshipDto;
|
|
19
|
+
}
|
|
1
20
|
export declare class AssistantPostAttributesDto {
|
|
21
|
+
/**
|
|
22
|
+
* The first user message. Either plain text, or — following the host app's
|
|
23
|
+
* BlockNote convention — a JSON-serialised BlockNote document. The server
|
|
24
|
+
* detects the latter and derives the persisted markdown (and the pinned
|
|
25
|
+
* entity mentions) from it; see AssistantService.resolveUserTurnInput.
|
|
26
|
+
*
|
|
27
|
+
* The cap is generous because a serialised document carries block structure
|
|
28
|
+
* as well as prose.
|
|
29
|
+
*/
|
|
2
30
|
content: string;
|
|
3
31
|
title?: string;
|
|
4
32
|
howToMode?: boolean;
|
|
@@ -7,6 +35,7 @@ export declare class AssistantPostAttributesDto {
|
|
|
7
35
|
export declare class AssistantPostDataDto {
|
|
8
36
|
type: string;
|
|
9
37
|
attributes: AssistantPostAttributesDto;
|
|
38
|
+
relationships?: AssistantPostRelationshipsDto;
|
|
10
39
|
}
|
|
11
40
|
export declare class AssistantPostDto {
|
|
12
41
|
data: AssistantPostDataDto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-post.dto.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant/dtos/assistant-post.dto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assistant-post.dto.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant/dtos/assistant-post.dto.ts"],"names":[],"mappings":"AAcA;;;;;;;;GAQG;AACH,qBAAa,4BAA4B;IAGvC,IAAI,EAAG,MAAM,CAAC;IAGd,EAAE,EAAG,MAAM,CAAC;CACb;AAED,qBAAa,+BAA+B;IAI1C,IAAI,EAAG,4BAA4B,CAAC;CACrC;AAED,qBAAa,6BAA6B;IAIxC,OAAO,CAAC,EAAE,+BAA+B,CAAC;CAC3C;AAED,qBAAa,0BAA0B;IACrC;;;;;;;;OAQG;IAIH,OAAO,EAAG,MAAM,CAAC;IAKjB,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,SAAS,CAAC,EAAE,OAAO,CAAC;IAIpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,qBAAa,oBAAoB;IAE/B,IAAI,EAAG,MAAM,CAAC;IAId,UAAU,EAAG,0BAA0B,CAAC;IAKxC,aAAa,CAAC,EAAE,6BAA6B,CAAC;CAC/C;AAED,qBAAa,gBAAgB;IAG3B,IAAI,EAAG,oBAAoB,CAAC;CAC7B"}
|
|
@@ -9,17 +9,56 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AssistantPostDto = exports.AssistantPostDataDto = exports.AssistantPostAttributesDto = void 0;
|
|
12
|
+
exports.AssistantPostDto = exports.AssistantPostDataDto = exports.AssistantPostAttributesDto = exports.AssistantPostRelationshipsDto = exports.AssistantContentRelationshipDto = exports.AssistantContentReferenceDto = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const assistant_meta_1 = require("../entities/assistant.meta");
|
|
16
|
+
/**
|
|
17
|
+
* Reference to the resource a thread is bound to (the `content` relationship,
|
|
18
|
+
* materialised as `(Assistant)-[:BOUND_TO]->(target)`).
|
|
19
|
+
*
|
|
20
|
+
* `type` is a plain `@IsString()` — NOT `@Equals(...)` — because the
|
|
21
|
+
* relationship is polymorphic: any registered model may be the target. The
|
|
22
|
+
* controller resolves the string against the model registry and rejects
|
|
23
|
+
* unknown types there, which is the only place that knows the full set.
|
|
24
|
+
*/
|
|
25
|
+
class AssistantContentReferenceDto {
|
|
26
|
+
}
|
|
27
|
+
exports.AssistantContentReferenceDto = AssistantContentReferenceDto;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], AssistantContentReferenceDto.prototype, "type", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsUUID)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], AssistantContentReferenceDto.prototype, "id", void 0);
|
|
37
|
+
class AssistantContentRelationshipDto {
|
|
38
|
+
}
|
|
39
|
+
exports.AssistantContentRelationshipDto = AssistantContentRelationshipDto;
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.ValidateNested)(),
|
|
42
|
+
(0, class_validator_1.IsDefined)(),
|
|
43
|
+
(0, class_transformer_1.Type)(() => AssistantContentReferenceDto),
|
|
44
|
+
__metadata("design:type", AssistantContentReferenceDto)
|
|
45
|
+
], AssistantContentRelationshipDto.prototype, "data", void 0);
|
|
46
|
+
class AssistantPostRelationshipsDto {
|
|
47
|
+
}
|
|
48
|
+
exports.AssistantPostRelationshipsDto = AssistantPostRelationshipsDto;
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.ValidateNested)(),
|
|
51
|
+
(0, class_validator_1.IsOptional)(),
|
|
52
|
+
(0, class_transformer_1.Type)(() => AssistantContentRelationshipDto),
|
|
53
|
+
__metadata("design:type", AssistantContentRelationshipDto)
|
|
54
|
+
], AssistantPostRelationshipsDto.prototype, "content", void 0);
|
|
16
55
|
class AssistantPostAttributesDto {
|
|
17
56
|
}
|
|
18
57
|
exports.AssistantPostAttributesDto = AssistantPostAttributesDto;
|
|
19
58
|
__decorate([
|
|
20
59
|
(0, class_validator_1.IsString)(),
|
|
21
60
|
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
-
(0, class_validator_1.MaxLength)(
|
|
61
|
+
(0, class_validator_1.MaxLength)(200_000),
|
|
23
62
|
__metadata("design:type", String)
|
|
24
63
|
], AssistantPostAttributesDto.prototype, "content", void 0);
|
|
25
64
|
__decorate([
|
|
@@ -50,6 +89,12 @@ __decorate([
|
|
|
50
89
|
(0, class_transformer_1.Type)(() => AssistantPostAttributesDto),
|
|
51
90
|
__metadata("design:type", AssistantPostAttributesDto)
|
|
52
91
|
], AssistantPostDataDto.prototype, "attributes", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, class_validator_1.ValidateNested)(),
|
|
94
|
+
(0, class_validator_1.IsOptional)(),
|
|
95
|
+
(0, class_transformer_1.Type)(() => AssistantPostRelationshipsDto),
|
|
96
|
+
__metadata("design:type", AssistantPostRelationshipsDto)
|
|
97
|
+
], AssistantPostDataDto.prototype, "relationships", void 0);
|
|
53
98
|
class AssistantPostDto {
|
|
54
99
|
}
|
|
55
100
|
exports.AssistantPostDto = AssistantPostDto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-post.dto.js","sourceRoot":"","sources":["../../../../src/foundations/assistant/dtos/assistant-post.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"assistant-post.dto.js","sourceRoot":"","sources":["../../../../src/foundations/assistant/dtos/assistant-post.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAyC;AACzC,qDAUyB;AACzB,+DAA2D;AAE3D;;;;;;;;GAQG;AACH,MAAa,4BAA4B;CAOxC;AAPD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D,4CAIC;AADC;IAFC,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC;8BAC1B,oBAAoB;8CAAC"}
|
|
@@ -49,6 +49,28 @@ export declare class AssistantRepository extends AbstractRepository<Assistant, t
|
|
|
49
49
|
}>;
|
|
50
50
|
constructor(neo4j: Neo4jService, securityService: SecurityService, clsService: ClsService);
|
|
51
51
|
protected buildUserHasAccess(): string;
|
|
52
|
+
/**
|
|
53
|
+
* Attach the thread to the resource it is scoped to:
|
|
54
|
+
* `(Assistant)-[:BOUND_TO]->(target)`.
|
|
55
|
+
*
|
|
56
|
+
* This cannot go through the generic create path. `BOUND_TO` is declared
|
|
57
|
+
* polymorphic on the descriptor (any registered model may be the target), so
|
|
58
|
+
* `relationships.content.model` is only a placeholder — `assistantMeta`.
|
|
59
|
+
* `AbstractRepository.create` reads `rel.model.labelName` both to validate the
|
|
60
|
+
* target exists (abstract.repository.ts:713) and to build the edge MATCH
|
|
61
|
+
* (:822), so routing a Campaign id through it looks for
|
|
62
|
+
* `(:Assistant { id: <campaign-uuid> })` and fails with "One or more related
|
|
63
|
+
* nodes do not exist."
|
|
64
|
+
*
|
|
65
|
+
* The caller resolves the real label from the model registry, so the label
|
|
66
|
+
* interpolated here is always a registered one and never user input. The id
|
|
67
|
+
* stays parameterised.
|
|
68
|
+
*/
|
|
69
|
+
bindContent(params: {
|
|
70
|
+
assistantId: string;
|
|
71
|
+
targetLabel: string;
|
|
72
|
+
targetId: string;
|
|
73
|
+
}): Promise<void>;
|
|
52
74
|
/**
|
|
53
75
|
* Override delete to cascade through HAS_MESSAGE children so that
|
|
54
76
|
* `AssistantMessage` nodes (and their REFERENCES edges) are removed with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant.repository.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant/repositories/assistant.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;AACnF,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEvE;;;;;;;;;GASG;AACH,qBACa,mBAAoB,SAAQ,kBAAkB,CAAC,SAAS,EAAE,OAAO,mBAAmB,CAAC,aAAa,CAAC;IAC9G,SAAS,CAAC,QAAQ,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAuB;gBAExC,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU;IAIzF,SAAS,CAAC,kBAAkB,IAAI,MAAM;IAStC;;;;;;OAMG;IACG,MAAM,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAUpD"}
|
|
1
|
+
{"version":3,"file":"assistant.repository.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant/repositories/assistant.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;AACnF,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEvE;;;;;;;;;GASG;AACH,qBACa,mBAAoB,SAAQ,kBAAkB,CAAC,SAAS,EAAE,OAAO,mBAAmB,CAAC,aAAa,CAAC;IAC9G,SAAS,CAAC,QAAQ,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAuB;gBAExC,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU;IAIzF,SAAS,CAAC,kBAAkB,IAAI,MAAM;IAStC;;;;;;;;;;;;;;;;OAgBG;IACG,WAAW,CAAC,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAYxG;;;;;;OAMG;IACG,MAAM,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAUpD"}
|
|
@@ -39,6 +39,34 @@ let AssistantRepository = class AssistantRepository extends abstract_repository_
|
|
|
39
39
|
}
|
|
40
40
|
WITH ${nodeName}`;
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Attach the thread to the resource it is scoped to:
|
|
44
|
+
* `(Assistant)-[:BOUND_TO]->(target)`.
|
|
45
|
+
*
|
|
46
|
+
* This cannot go through the generic create path. `BOUND_TO` is declared
|
|
47
|
+
* polymorphic on the descriptor (any registered model may be the target), so
|
|
48
|
+
* `relationships.content.model` is only a placeholder — `assistantMeta`.
|
|
49
|
+
* `AbstractRepository.create` reads `rel.model.labelName` both to validate the
|
|
50
|
+
* target exists (abstract.repository.ts:713) and to build the edge MATCH
|
|
51
|
+
* (:822), so routing a Campaign id through it looks for
|
|
52
|
+
* `(:Assistant { id: <campaign-uuid> })` and fails with "One or more related
|
|
53
|
+
* nodes do not exist."
|
|
54
|
+
*
|
|
55
|
+
* The caller resolves the real label from the model registry, so the label
|
|
56
|
+
* interpolated here is always a registered one and never user input. The id
|
|
57
|
+
* stays parameterised.
|
|
58
|
+
*/
|
|
59
|
+
async bindContent(params) {
|
|
60
|
+
await this.neo4j.writeOne({
|
|
61
|
+
query: `
|
|
62
|
+
MATCH (assistant:Assistant {id: $assistantId})
|
|
63
|
+
MATCH (target:${params.targetLabel} {id: $targetId})
|
|
64
|
+
MERGE (assistant)-[rel:BOUND_TO]->(target)
|
|
65
|
+
SET rel.updatedAt = datetime()
|
|
66
|
+
`,
|
|
67
|
+
queryParams: { assistantId: params.assistantId, targetId: params.targetId },
|
|
68
|
+
});
|
|
69
|
+
}
|
|
42
70
|
/**
|
|
43
71
|
* Override delete to cascade through HAS_MESSAGE children so that
|
|
44
72
|
* `AssistantMessage` nodes (and their REFERENCES edges) are removed with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant.repository.js","sourceRoot":"","sources":["../../../../src/foundations/assistant/repositories/assistant.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAAwC;AACxC,2FAAuF;AACvF,8EAA0E;AAC1E,uFAAmF;AACnF,qDAAuE;AAEvE;;;;;;;;;GASG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,wCAAuE;IAG9G,YAAY,KAAmB,EAAE,eAAgC,EAAE,UAAsB;QACvF,KAAK,CAAC,KAAK,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;QAHzB,eAAU,GAAG,+BAAmB,CAAC;IAIpD,CAAC;IAES,kBAAkB;QAC1B,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;QAC3C,OAAO,QAAQ,QAAQ;;uBAEJ,QAAQ;;mBAEZ,QAAQ,EAAE,CAAC;IAC5B,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,CAAC,MAAsB;QACjC,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;YACxB,KAAK,EAAE;;;;OAIN;YACD,WAAW,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE;SAC/B,CAAC,CAAC;IACL,CAAC;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"assistant.repository.js","sourceRoot":"","sources":["../../../../src/foundations/assistant/repositories/assistant.repository.ts"],"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../../../agents/graph/services/graph.catalog.service";
|
|
2
|
+
import { ScopeGuard } from "../../../agents/graph/services/scope.guard";
|
|
3
|
+
import { UserContext } from "../../../agents/graph/tools/tool.factory";
|
|
4
|
+
import { EntityServiceRegistry } from "../../../common/registries/entity.service.registry";
|
|
5
|
+
export interface ExtractedMention {
|
|
6
|
+
/** JSON:API type, e.g. "npcs". */
|
|
7
|
+
type: string;
|
|
8
|
+
id: string;
|
|
9
|
+
/** Display text the user saw. */
|
|
10
|
+
alias: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Turns a BlockNote document into the entity references a user message pins.
|
|
14
|
+
*
|
|
15
|
+
* A mention arrives from the browser, so it is INPUT, not a trusted pointer:
|
|
16
|
+
* validate() re-checks catalog membership, scope and existence before any of
|
|
17
|
+
* it reaches the LLM or becomes a REFERENCES edge.
|
|
18
|
+
*/
|
|
19
|
+
export declare class AssistantMentionExtractor {
|
|
20
|
+
private readonly catalog;
|
|
21
|
+
private readonly scopeGuard;
|
|
22
|
+
private readonly entityServices;
|
|
23
|
+
private readonly logger;
|
|
24
|
+
constructor(catalog: GraphCatalogService, scopeGuard: ScopeGuard, entityServices: EntityServiceRegistry);
|
|
25
|
+
/** Walks a BlockNote document for inline nodes of type "mention". Never throws. */
|
|
26
|
+
extract(blocks: unknown[]): ExtractedMention[];
|
|
27
|
+
/**
|
|
28
|
+
* Drops mentions that are not in the catalog for these modules, are outside
|
|
29
|
+
* the run's scope, or no longer resolve to a record.
|
|
30
|
+
*/
|
|
31
|
+
validate(params: {
|
|
32
|
+
mentions: ExtractedMention[];
|
|
33
|
+
ctx: UserContext;
|
|
34
|
+
}): Promise<ExtractedMention[]>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=assistant-mention.extractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-mention.extractor.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant/services/assistant-mention.extractor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAE3F,MAAM,WAAW,gBAAgB;IAC/B,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,qBACa,yBAAyB;IAIlC,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,cAAc;IALjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8C;gBAGlD,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,qBAAqB;IAGxD,mFAAmF;IACnF,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,gBAAgB,EAAE;IAmC9C;;;OAGG;IACG,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC;QAAC,GAAG,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;CAoBxG"}
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
var AssistantMentionExtractor_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.AssistantMentionExtractor = void 0;
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const graph_catalog_service_1 = require("../../../agents/graph/services/graph.catalog.service");
|
|
16
|
+
const scope_guard_1 = require("../../../agents/graph/services/scope.guard");
|
|
17
|
+
const entity_service_registry_1 = require("../../../common/registries/entity.service.registry");
|
|
18
|
+
/**
|
|
19
|
+
* Turns a BlockNote document into the entity references a user message pins.
|
|
20
|
+
*
|
|
21
|
+
* A mention arrives from the browser, so it is INPUT, not a trusted pointer:
|
|
22
|
+
* validate() re-checks catalog membership, scope and existence before any of
|
|
23
|
+
* it reaches the LLM or becomes a REFERENCES edge.
|
|
24
|
+
*/
|
|
25
|
+
let AssistantMentionExtractor = AssistantMentionExtractor_1 = class AssistantMentionExtractor {
|
|
26
|
+
constructor(catalog, scopeGuard, entityServices) {
|
|
27
|
+
this.catalog = catalog;
|
|
28
|
+
this.scopeGuard = scopeGuard;
|
|
29
|
+
this.entityServices = entityServices;
|
|
30
|
+
this.logger = new common_1.Logger(AssistantMentionExtractor_1.name);
|
|
31
|
+
}
|
|
32
|
+
/** Walks a BlockNote document for inline nodes of type "mention". Never throws. */
|
|
33
|
+
extract(blocks) {
|
|
34
|
+
const out = [];
|
|
35
|
+
const seen = new Set();
|
|
36
|
+
const walk = (node) => {
|
|
37
|
+
if (!node || typeof node !== "object")
|
|
38
|
+
return;
|
|
39
|
+
if (Array.isArray(node)) {
|
|
40
|
+
node.forEach(walk);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (node.type === "mention") {
|
|
44
|
+
const id = node.props?.id;
|
|
45
|
+
const type = node.props?.entityType;
|
|
46
|
+
if (typeof id === "string" && typeof type === "string") {
|
|
47
|
+
const key = `${type}/${id}`;
|
|
48
|
+
if (!seen.has(key)) {
|
|
49
|
+
seen.add(key);
|
|
50
|
+
out.push({ type, id, alias: String(node.props?.alias ?? "") });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
walk(node.content);
|
|
56
|
+
walk(node.children);
|
|
57
|
+
};
|
|
58
|
+
try {
|
|
59
|
+
walk(blocks);
|
|
60
|
+
}
|
|
61
|
+
catch (err) {
|
|
62
|
+
this.logger.warn(`extract: malformed document — ${err instanceof Error ? err.message : String(err)}`);
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
return out;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Drops mentions that are not in the catalog for these modules, are outside
|
|
69
|
+
* the run's scope, or no longer resolve to a record.
|
|
70
|
+
*/
|
|
71
|
+
async validate(params) {
|
|
72
|
+
const kept = [];
|
|
73
|
+
for (const mention of params.mentions) {
|
|
74
|
+
if (!this.catalog.getEntityDetail(mention.type, params.ctx.userModuleIds)) {
|
|
75
|
+
this.logger.warn(`validate: dropping mention of uncatalogued type "${mention.type}".`);
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
if (!(await this.scopeGuard.isInScope({ type: mention.type, id: mention.id, ctx: params.ctx }))) {
|
|
79
|
+
this.logger.warn(`validate: dropping out-of-scope mention ${mention.type}/${mention.id}.`);
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
const service = this.entityServices.get(mention.type);
|
|
83
|
+
if (!service || !(await service.findRecordById({ id: mention.id }))) {
|
|
84
|
+
this.logger.warn(`validate: dropping unreadable mention ${mention.type}/${mention.id}.`);
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
kept.push(mention);
|
|
88
|
+
}
|
|
89
|
+
return kept;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
exports.AssistantMentionExtractor = AssistantMentionExtractor;
|
|
93
|
+
exports.AssistantMentionExtractor = AssistantMentionExtractor = AssistantMentionExtractor_1 = __decorate([
|
|
94
|
+
(0, common_1.Injectable)(),
|
|
95
|
+
__metadata("design:paramtypes", [graph_catalog_service_1.GraphCatalogService,
|
|
96
|
+
scope_guard_1.ScopeGuard,
|
|
97
|
+
entity_service_registry_1.EntityServiceRegistry])
|
|
98
|
+
], AssistantMentionExtractor);
|
|
99
|
+
//# sourceMappingURL=assistant-mention.extractor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-mention.extractor.js","sourceRoot":"","sources":["../../../../src/foundations/assistant/services/assistant-mention.extractor.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,gGAA2F;AAC3F,4EAAwE;AAExE,gGAA2F;AAU3F;;;;;;GAMG;AAEI,IAAM,yBAAyB,iCAA/B,MAAM,yBAAyB;IAGpC,YACmB,OAA4B,EAC5B,UAAsB,EACtB,cAAqC;QAFrC,YAAO,GAAP,OAAO,CAAqB;QAC5B,eAAU,GAAV,UAAU,CAAY;QACtB,mBAAc,GAAd,cAAc,CAAuB;QALvC,WAAM,GAAG,IAAI,eAAM,CAAC,2BAAyB,CAAC,IAAI,CAAC,CAAC;IAMlE,CAAC;IAEJ,mFAAmF;IACnF,OAAO,CAAC,MAAiB;QACvB,MAAM,GAAG,GAAuB,EAAE,CAAC;QACnC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;QAE/B,MAAM,IAAI,GAAG,CAAC,IAAS,EAAQ,EAAE;YAC/B,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;gBAAE,OAAO;YAC9C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC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from "nestjs-cls";
|
|
|
3
3
|
import { OperatorService } from "../../../agents/operator/services/operator.service";
|
|
4
4
|
import { ResponderService } from "../../../agents/responder/services/responder.service";
|
|
5
5
|
import { GraphCatalogService } from "../../../agents/graph/services/graph.catalog.service";
|
|
6
|
+
import { ScopeGuard } from "../../../agents/graph/services/scope.guard";
|
|
6
7
|
import { UserModulesRepository } from "../../../agents/graph/repositories/user-modules.repository";
|
|
7
8
|
import type { ToolCallRecord } from "../../../agents/graph/tools/tool.factory";
|
|
8
9
|
import { EntityServiceRegistry } from "../../../common/registries/entity.service.registry";
|
|
9
10
|
import { BaseConfigInterface } from "../../../config/interfaces/base.config.interface";
|
|
11
|
+
import { BlockNoteService } from "../../../core/blocknote/services/blocknote.service";
|
|
12
|
+
import { JsonApiDataInterface } from "../../../core/jsonapi/interfaces/jsonapi.data.interface";
|
|
10
13
|
import { JsonApiService } from "../../../core/jsonapi/services/jsonapi.service";
|
|
11
14
|
import { AbstractService } from "../../../core/neo4j/abstracts/abstract.service";
|
|
12
15
|
import { WebSocketService } from "../../../core/websocket/services/websocket.service";
|
|
@@ -18,6 +21,7 @@ import { AssistantMessageRepository } from "../../assistant-message/repositories
|
|
|
18
21
|
import { AssistantMessageService } from "../../assistant-message/services/assistant-message.service";
|
|
19
22
|
import { Assistant, AssistantDescriptor } from "../entities/assistant";
|
|
20
23
|
import { AssistantRepository } from "../repositories/assistant.repository";
|
|
24
|
+
import { AssistantMentionExtractor } from "./assistant-mention.extractor";
|
|
21
25
|
/**
|
|
22
26
|
* Maximum number of prior messages (turns) passed to the LLM on each turn.
|
|
23
27
|
* Keeps prompt size and cost bounded for long conversations.
|
|
@@ -50,6 +54,9 @@ export declare class AssistantService extends AbstractService<Assistant, typeof
|
|
|
50
54
|
private readonly assistantActionRepo;
|
|
51
55
|
private readonly webSocketService;
|
|
52
56
|
private readonly configService;
|
|
57
|
+
private readonly mentions;
|
|
58
|
+
private readonly blockNote;
|
|
59
|
+
private readonly scopeGuard;
|
|
53
60
|
protected readonly descriptor: import("../../..").EntityDescriptor<Assistant, {
|
|
54
61
|
owner: {
|
|
55
62
|
model: import("../../..").DataMeta;
|
|
@@ -84,7 +91,7 @@ export declare class AssistantService extends AbstractService<Assistant, typeof
|
|
|
84
91
|
};
|
|
85
92
|
}>;
|
|
86
93
|
private readonly assistantLogger;
|
|
87
|
-
constructor(jsonApiService: JsonApiService, assistantRepository: AssistantRepository, clsService: ClsService, userModuleIdsRepository: UserModulesRepository, responder: ResponderService, assistantMessages: AssistantMessageService, assistantMessageRepo: AssistantMessageRepository, graphCatalog: GraphCatalogService, entityServices: EntityServiceRegistry, operator: OperatorService, assistantActions: AssistantActionService, assistantActionRepo: AssistantActionRepository, webSocketService: WebSocketService, configService: ConfigService<BaseConfigInterface
|
|
94
|
+
constructor(jsonApiService: JsonApiService, assistantRepository: AssistantRepository, clsService: ClsService, userModuleIdsRepository: UserModulesRepository, responder: ResponderService, assistantMessages: AssistantMessageService, assistantMessageRepo: AssistantMessageRepository, graphCatalog: GraphCatalogService, entityServices: EntityServiceRegistry, operator: OperatorService, assistantActions: AssistantActionService, assistantActionRepo: AssistantActionRepository, webSocketService: WebSocketService, configService: ConfigService<BaseConfigInterface>, mentions: AssistantMentionExtractor, blockNote: BlockNoteService, scopeGuard: ScopeGuard);
|
|
88
95
|
createWithFirstMessage(params: {
|
|
89
96
|
companyId: string;
|
|
90
97
|
userId: string;
|
|
@@ -92,6 +99,10 @@ export declare class AssistantService extends AbstractService<Assistant, typeof
|
|
|
92
99
|
title?: string;
|
|
93
100
|
howToMode?: boolean;
|
|
94
101
|
limitToHowToId?: string;
|
|
102
|
+
boundContent?: {
|
|
103
|
+
type: string;
|
|
104
|
+
id: string;
|
|
105
|
+
};
|
|
95
106
|
}): Promise<{
|
|
96
107
|
assistant: Assistant;
|
|
97
108
|
userMessage: AssistantMessage;
|
|
@@ -124,6 +135,10 @@ export declare class AssistantService extends AbstractService<Assistant, typeof
|
|
|
124
135
|
title?: string;
|
|
125
136
|
howToMode?: boolean;
|
|
126
137
|
limitToHowToId?: string;
|
|
138
|
+
boundContent?: {
|
|
139
|
+
type: string;
|
|
140
|
+
id: string;
|
|
141
|
+
};
|
|
127
142
|
}): Promise<{
|
|
128
143
|
assistant: Assistant;
|
|
129
144
|
userMessage: AssistantMessage;
|
|
@@ -163,9 +178,76 @@ export declare class AssistantService extends AbstractService<Assistant, typeof
|
|
|
163
178
|
assistantMessage: AssistantMessage;
|
|
164
179
|
action: AssistantAction;
|
|
165
180
|
}>;
|
|
181
|
+
/**
|
|
182
|
+
* List the threads bound to one resource (e.g. every assistant thread for a
|
|
183
|
+
* campaign). Delegates to the inherited `findByRelated` over the `content`
|
|
184
|
+
* relationship — the BOUND_TO traversal already exists, so there is no new
|
|
185
|
+
* Cypher here and company/owner RBAC still comes from the repository.
|
|
186
|
+
*/
|
|
187
|
+
findByBoundContent(params: {
|
|
188
|
+
boundType: string;
|
|
189
|
+
boundId: string;
|
|
190
|
+
query: any;
|
|
191
|
+
}): Promise<JsonApiDataInterface>;
|
|
192
|
+
/**
|
|
193
|
+
* Build the run's UserContext once per turn. `scopeId`/`scopeType` are set
|
|
194
|
+
* only when the thread is bound to a catalogued scope ROOT (a descriptor
|
|
195
|
+
* whose compiled scope chain is empty, e.g. a campaign). A thread bound to
|
|
196
|
+
* something further down a chain still gets content scope, but not a
|
|
197
|
+
* transitive run scope — the guard has no root to confine the run to.
|
|
198
|
+
*/
|
|
199
|
+
private buildTurnContext;
|
|
200
|
+
/**
|
|
201
|
+
* Write the `BOUND_TO` edge that scopes a thread to a resource.
|
|
202
|
+
*
|
|
203
|
+
* Deliberately NOT part of the `createFromDTO` call above: `BOUND_TO` is
|
|
204
|
+
* polymorphic, so its descriptor entry carries `assistantMeta` as a
|
|
205
|
+
* placeholder model. The generic create path reads `rel.model.labelName` to
|
|
206
|
+
* validate the target and to build the edge, so a Campaign id sent that way
|
|
207
|
+
* is looked up as `(:Assistant { id: … })` and 400s with "One or more
|
|
208
|
+
* related nodes do not exist."
|
|
209
|
+
*
|
|
210
|
+
* The label is resolved from the model registry — the same registry the
|
|
211
|
+
* descriptor's own polymorphic discriminator uses on the read path — so an
|
|
212
|
+
* unregistered type fails loudly here rather than writing a dangling edge.
|
|
213
|
+
*/
|
|
214
|
+
private attachBoundContent;
|
|
215
|
+
private toContentScope;
|
|
216
|
+
private toBoundContent;
|
|
217
|
+
/**
|
|
218
|
+
* A BlockNote-backed field arrives as a JSON string in its own string
|
|
219
|
+
* attribute — the convention every host-app entity already uses (e.g.
|
|
220
|
+
* `Npc.description`: `JSON.stringify` out, `JSON.parse` back). Detect that
|
|
221
|
+
* shape without trusting it: a plain-text message must never be mistaken for
|
|
222
|
+
* a document, so this requires an array whose first entry is an object with
|
|
223
|
+
* a string `type`, which is the minimal shape of a BlockNote block.
|
|
224
|
+
*/
|
|
225
|
+
private parseBlockNoteDocument;
|
|
226
|
+
/**
|
|
227
|
+
* Derive from a user message: the markdown to persist (mention links kept, so
|
|
228
|
+
* the thread can re-render them), a plain-text form for the thread title, and
|
|
229
|
+
* the validated entity mentions to pin into the turn's focus context.
|
|
230
|
+
*
|
|
231
|
+
* Plain-text input passes straight through, so apps without a rich composer
|
|
232
|
+
* are unaffected.
|
|
233
|
+
*/
|
|
234
|
+
private resolveUserTurnInput;
|
|
235
|
+
/**
|
|
236
|
+
* Materialise REFERENCES edges from the USER message to the entities that
|
|
237
|
+
* message named. The reference metadata is fixed: a mention is an explicit,
|
|
238
|
+
* maximally relevant pointer, not a ranked retrieval hit.
|
|
239
|
+
*/
|
|
240
|
+
private linkPinnedMentions;
|
|
241
|
+
/**
|
|
242
|
+
* Drop records that fall outside the run's scope root, grouping by JSON:API
|
|
243
|
+
* type so `ScopeGuard` can build one predicate per type. A no-op for an
|
|
244
|
+
* unscoped run — `ScopeGuard.filter` returns everything in that case, so the
|
|
245
|
+
* short-circuit only avoids a pointless round trip.
|
|
246
|
+
*/
|
|
247
|
+
private filterByScope;
|
|
166
248
|
/**
|
|
167
249
|
* Resolve the content scope from the assistant's BOUND_TO relationship if
|
|
168
|
-
* loaded.
|
|
250
|
+
* loaded.
|
|
169
251
|
*/
|
|
170
252
|
private resolveContentScope;
|
|
171
253
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assistant.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant/services/assistant.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAqB,eAAe,EAAE,MAAM,oDAAoD,CAAC;AACxG,OAAO,EAAE,gBAAgB,EAAE,MAAM,sDAAsD,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAEnG,OAAO,KAAK,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"assistant.service.d.ts","sourceRoot":"","sources":["../../../../src/foundations/assistant/services/assistant.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAqB,eAAe,EAAE,MAAM,oDAAoD,CAAC;AACxG,OAAO,EAAE,gBAAgB,EAAE,MAAM,sDAAsD,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAEnG,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,0CAA0C,CAAC;AAI5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AAEvF,OAAO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