@xpert-ai/plugin-live-dashboard 0.7.0 → 0.7.2
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/.xpertai-plugin/plugin.json +1 -1
- package/README.md +2 -2
- package/dist/lib/analysis-scene-tool.d.ts +8 -8
- package/dist/lib/analysis-scene.schema.d.ts +6 -6
- package/dist/lib/artifact-type.provider.js +38 -1
- package/dist/lib/bundled-example-source.d.ts +11 -0
- package/dist/lib/bundled-example-source.js +60 -0
- package/dist/lib/certification.schema.d.ts +4 -0
- package/dist/lib/certification.schema.js +14 -0
- package/dist/lib/content-capability.js +1 -0
- package/dist/lib/dashboard-delivery.d.ts +11 -0
- package/dist/lib/dashboard-delivery.js +55 -0
- package/dist/lib/dashboard-download-policy.d.ts +4 -0
- package/dist/lib/dashboard-download-policy.js +7 -0
- package/dist/lib/dashboard-navigation.d.ts +5 -5
- package/dist/lib/dashboard-queries.d.ts +2 -2
- package/dist/lib/dashboard-queries.js +2 -2
- package/dist/lib/dashboard-view.schema.d.ts +10 -10
- package/dist/lib/dashboard.schema.d.ts +18 -0
- package/dist/lib/dashboard.schema.js +2 -1
- package/dist/lib/dashboard.service.d.ts +11 -2
- package/dist/lib/dashboard.service.js +17 -4
- package/dist/lib/definition-tools.d.ts +14 -54
- package/dist/lib/definition-tools.js +29 -9
- package/dist/lib/document-host.d.ts +1 -1
- package/dist/lib/document-host.js +2 -1
- package/dist/lib/editing-session.d.ts +4 -4
- package/dist/lib/evidence/evidence-diff.d.ts +17 -0
- package/dist/lib/evidence/evidence-diff.js +30 -0
- package/dist/lib/evidence/evidence-transfers.d.ts +14 -0
- package/dist/lib/evidence/evidence-transfers.js +41 -0
- package/dist/lib/evidence/evidence-view.provider.d.ts +91 -0
- package/dist/lib/evidence/evidence-view.provider.js +92 -0
- package/dist/lib/evidence/evidence.entity.d.ts +14 -0
- package/dist/lib/evidence/evidence.entity.js +62 -0
- package/dist/lib/evidence/evidence.provider.d.ts +43 -0
- package/dist/lib/evidence/evidence.provider.js +91 -0
- package/dist/lib/evidence/evidence.service.d.ts +67 -0
- package/dist/lib/evidence/evidence.service.js +218 -0
- package/dist/lib/middleware.d.ts +6 -2
- package/dist/lib/middleware.js +95 -11
- package/dist/lib/monitor.js +2 -2
- package/dist/lib/plugin.js +6 -1
- package/dist/lib/query-session.d.ts +1 -1
- package/dist/lib/query-session.js +13 -8
- package/dist/lib/remote-entry.d.ts +1 -1
- package/dist/lib/runtime-context.d.ts +2 -0
- package/dist/lib/runtime-context.js +21 -0
- package/dist/lib/source-executions.d.ts +36 -18
- package/dist/lib/source-executions.js +2 -1
- package/dist/lib/templates.js +5 -5
- package/dist/lib/view.provider.js +7 -1
- package/dist/remote/app.css +1 -1
- package/dist/remote/app.js +23 -23
- package/dist/remote/build-manifest.json +48 -37
- package/dist/sandbox-actions/action.json +1 -1
- package/dist/sandbox-actions/bundle/host.js +2 -2
- package/docs/editing.mdx +6 -0
- package/docs/html-mode.md +1 -1
- package/package.json +5 -5
- package/skills/live-dashboard/SKILL.md +1 -1
- package/skills/live-dashboard/examples/README.md +2 -2
- package/skills/live-dashboard/examples/production-quality/README.md +2 -2
- package/skills/live-dashboard/examples/regional-sales/README.md +3 -3
- package/skills/live-dashboard/examples/regional-sales/query.json +49 -1
- package/skills/live-dashboard/examples/sales-overview/README.md +2 -2
|
@@ -0,0 +1,62 @@
|
|
|
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.AnalysisEvidenceRecord = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const resource_contract_1 = require("../library/resource-contract");
|
|
15
|
+
/** Immutable snapshot; only the derived Artifact pointer may be completed after a retry. */
|
|
16
|
+
let AnalysisEvidenceRecord = class AnalysisEvidenceRecord {
|
|
17
|
+
};
|
|
18
|
+
exports.AnalysisEvidenceRecord = AnalysisEvidenceRecord;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], AnalysisEvidenceRecord.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], AnalysisEvidenceRecord.prototype, "tenantId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], AnalysisEvidenceRecord.prototype, "organizationId", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'uuid' }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], AnalysisEvidenceRecord.prototype, "projectId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'uuid' }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], AnalysisEvidenceRecord.prototype, "createdById", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'uuid' }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], AnalysisEvidenceRecord.prototype, "requestId", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64 }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], AnalysisEvidenceRecord.prototype, "requestHash", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'jsonb' }),
|
|
49
|
+
__metadata("design:type", Object)
|
|
50
|
+
], AnalysisEvidenceRecord.prototype, "snapshot", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], AnalysisEvidenceRecord.prototype, "artifactId", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.CreateDateColumn)({ type: 'timestamptz' }),
|
|
57
|
+
__metadata("design:type", Date)
|
|
58
|
+
], AnalysisEvidenceRecord.prototype, "createdAt", void 0);
|
|
59
|
+
exports.AnalysisEvidenceRecord = AnalysisEvidenceRecord = __decorate([
|
|
60
|
+
(0, typeorm_1.Entity)((0, resource_contract_1.libraryTable)('analysis_evidence_v1')),
|
|
61
|
+
(0, typeorm_1.Index)(['tenantId', 'organizationId', 'projectId', 'requestId'], { unique: true })
|
|
62
|
+
], AnalysisEvidenceRecord);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ArtifactTypeSource, type ArtifactTypeActor, type ContentOperation, type IArtifactTypeProvider, type ContentCatalogProvider, type IContentResourceProvider, type ContentResourceRequest } from '@xpert-ai/plugin-sdk';
|
|
2
|
+
import { AnalysisEvidenceService } from './evidence.service';
|
|
3
|
+
export declare class AnalysisEvidenceArtifactType implements IArtifactTypeProvider {
|
|
4
|
+
private readonly evidence;
|
|
5
|
+
constructor(evidence: AnalysisEvidenceService);
|
|
6
|
+
readonly definition: {
|
|
7
|
+
versioning: {
|
|
8
|
+
mode: "draft-only";
|
|
9
|
+
};
|
|
10
|
+
title: {
|
|
11
|
+
en_US: string;
|
|
12
|
+
zh_Hans: string;
|
|
13
|
+
};
|
|
14
|
+
kinds: "file"[];
|
|
15
|
+
content: {
|
|
16
|
+
mimeTypes: string[];
|
|
17
|
+
maxBytes: number;
|
|
18
|
+
};
|
|
19
|
+
collection: {
|
|
20
|
+
allowCopy: boolean;
|
|
21
|
+
};
|
|
22
|
+
presentation: {
|
|
23
|
+
mode: "file";
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
authorize(source: ArtifactTypeSource, actor: ArtifactTypeActor, operation: ContentOperation): Promise<void>;
|
|
27
|
+
authorizeDraft(source: ArtifactTypeSource, actor: ArtifactTypeActor, operation: ContentOperation): Promise<void>;
|
|
28
|
+
validateContent(buffer: Buffer, mimeType: string): Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
export declare class AnalysisEvidenceContent implements IContentResourceProvider {
|
|
31
|
+
private readonly evidence;
|
|
32
|
+
readonly title = "Immutable analysis evidence";
|
|
33
|
+
constructor(evidence: AnalysisEvidenceService);
|
|
34
|
+
readonly catalog: ContentCatalogProvider;
|
|
35
|
+
authorize(input: ContentResourceRequest): Promise<{
|
|
36
|
+
providerKey: string;
|
|
37
|
+
resourceId: string;
|
|
38
|
+
title: string;
|
|
39
|
+
role: "editor" | "viewer";
|
|
40
|
+
canWrite: boolean;
|
|
41
|
+
canManage: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
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.AnalysisEvidenceContent = exports.AnalysisEvidenceArtifactType = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const plugin_sdk_1 = require("@xpert-ai/plugin-sdk");
|
|
15
|
+
const evidence_service_1 = require("./evidence.service");
|
|
16
|
+
const evidence_view_provider_1 = require("./evidence-view.provider");
|
|
17
|
+
const dashboard_service_1 = require("../dashboard.service");
|
|
18
|
+
const model = { typeId: 'analysis-evidence', modelId: 'xpert.analysis-evidence', schemaVersion: '1', editProtocol: { id: 'immutable.snapshot', version: '1' } };
|
|
19
|
+
let AnalysisEvidenceArtifactType = class AnalysisEvidenceArtifactType {
|
|
20
|
+
constructor(evidence) {
|
|
21
|
+
this.evidence = evidence;
|
|
22
|
+
this.definition = { versioning: { mode: 'draft-only' }, title: { en_US: 'Analysis evidence', zh_Hans: '分析证据快照' },
|
|
23
|
+
kinds: ['file'], content: { mimeTypes: ['application/json'], maxBytes: 2_000_000 }, collection: { allowCopy: false }, presentation: { mode: 'file' } };
|
|
24
|
+
}
|
|
25
|
+
async authorize(source, actor, operation) {
|
|
26
|
+
if (!actor.tenantId || !actor.userId || actor.tenantId !== source.tenantId || !source.organizationId || !source.projectId ||
|
|
27
|
+
source.pluginName !== dashboard_service_1.PLUGIN_NAME || source.resourceType !== evidence_service_1.EVIDENCE_TYPE)
|
|
28
|
+
throw new common_1.ForbiddenException('EVIDENCE_SCOPE_DENIED');
|
|
29
|
+
await this.evidence.authorize((0, evidence_service_1.evidenceContext)({ actor: { tenantId: actor.tenantId, userId: actor.userId, organizationId: source.organizationId }, projectId: source.projectId }), source.resourceId, operation !== 'read');
|
|
30
|
+
}
|
|
31
|
+
authorizeDraft(source, actor, operation) { return this.authorize(source, actor, operation); }
|
|
32
|
+
async validateContent(buffer, mimeType) {
|
|
33
|
+
if (mimeType !== 'application/json')
|
|
34
|
+
throw new common_1.BadRequestException('EVIDENCE_FORMAT_INVALID');
|
|
35
|
+
await this.evidence.validateBytes(buffer);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.AnalysisEvidenceArtifactType = AnalysisEvidenceArtifactType;
|
|
39
|
+
exports.AnalysisEvidenceArtifactType = AnalysisEvidenceArtifactType = __decorate([
|
|
40
|
+
(0, common_1.Injectable)(),
|
|
41
|
+
(0, plugin_sdk_1.ArtifactTypeProvider)(evidence_service_1.EVIDENCE_TYPE),
|
|
42
|
+
__metadata("design:paramtypes", [evidence_service_1.AnalysisEvidenceService])
|
|
43
|
+
], AnalysisEvidenceArtifactType);
|
|
44
|
+
let AnalysisEvidenceContent = class AnalysisEvidenceContent {
|
|
45
|
+
constructor(evidence) {
|
|
46
|
+
this.evidence = evidence;
|
|
47
|
+
this.title = 'Immutable analysis evidence';
|
|
48
|
+
this.catalog = {
|
|
49
|
+
types: [{ ...model, title: { en_US: 'Analysis evidence', zh_Hans: '分析证据快照' }, implementationKey: evidence_service_1.EVIDENCE_TYPE,
|
|
50
|
+
defaultEditorKey: evidence_view_provider_1.EVIDENCE_EDITOR, implementationTitle: { en_US: 'Captured query results', zh_Hans: '已保存查询结果' }, creatable: false }],
|
|
51
|
+
discover: async (scope) => {
|
|
52
|
+
const page = await this.evidence.list((0, evidence_service_1.evidenceContext)(scope), Number(scope.cursor ?? 0));
|
|
53
|
+
return { resourceIds: page.items.map(item => item.id), ...(page.nextCursor === undefined ? {} : { nextCursor: String(page.nextCursor) }) };
|
|
54
|
+
},
|
|
55
|
+
describe: async (scope) => {
|
|
56
|
+
const record = await this.evidence.authorize((0, evidence_service_1.evidenceContext)(scope), scope.sourceResourceId);
|
|
57
|
+
const snapshot = record.snapshot;
|
|
58
|
+
return { ...model, projectId: scope.projectId, title: snapshot.title, revision: snapshot.sha256, updatedAt: snapshot.capturedAt,
|
|
59
|
+
deleted: false, defaultEditorKey: evidence_view_provider_1.EVIDENCE_EDITOR, source: { kind: 'managed' }, allowedActions: [],
|
|
60
|
+
preview: { kind: 'outline', revision: snapshot.sha256, lines: [snapshot.title, snapshot.capturedAt, ...snapshot.statements.slice(0, 3).map(item => item.text.slice(0, 160))] } };
|
|
61
|
+
},
|
|
62
|
+
extract: async (scope) => {
|
|
63
|
+
const snapshot = await this.evidence.read((0, evidence_service_1.evidenceContext)(scope), scope.sourceResourceId);
|
|
64
|
+
if (snapshot.sha256 !== scope.expectedRevision)
|
|
65
|
+
throw new common_1.BadRequestException('EVIDENCE_REVISION_CONFLICT');
|
|
66
|
+
return { revision: snapshot.sha256, sections: snapshot.statements.map((statement, index) => ({ anchor: { kind: statement.kind, id: String(index) }, text: statement.text })) };
|
|
67
|
+
},
|
|
68
|
+
transfer: async (scope) => {
|
|
69
|
+
if (!scope.acceptedSchemas.includes('xpert.content-analysis-transfer@1'))
|
|
70
|
+
throw new common_1.BadRequestException('EVIDENCE_TARGET_UNSUPPORTED');
|
|
71
|
+
const snapshot = await this.evidence.read((0, evidence_service_1.evidenceContext)(scope), scope.sourceResourceId);
|
|
72
|
+
if (snapshot.sha256 !== scope.expectedRevision)
|
|
73
|
+
throw new common_1.BadRequestException('EVIDENCE_REVISION_CONFLICT');
|
|
74
|
+
return { schema: 'xpert.content-analysis-transfer@1', source: { providerKey: evidence_service_1.EVIDENCE_PROVIDER, resourceId: snapshot.id, revision: snapshot.sha256, title: snapshot.title }, evidence: snapshot };
|
|
75
|
+
},
|
|
76
|
+
create: async () => { throw new common_1.BadRequestException('EVIDENCE_CAPTURE_REQUIRED'); }
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
async authorize(input) {
|
|
80
|
+
const context = await this.evidence.contextFor(input.actor, input.resourceId);
|
|
81
|
+
const record = await this.evidence.authorize(context, input.resourceId, input.operation !== 'read');
|
|
82
|
+
return { providerKey: evidence_service_1.EVIDENCE_PROVIDER, resourceId: input.resourceId, title: record.snapshot.title, role: input.operation === 'read' ? 'viewer' : 'editor',
|
|
83
|
+
canWrite: input.operation !== 'read', canManage: false };
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
exports.AnalysisEvidenceContent = AnalysisEvidenceContent;
|
|
87
|
+
exports.AnalysisEvidenceContent = AnalysisEvidenceContent = __decorate([
|
|
88
|
+
(0, common_1.Injectable)(),
|
|
89
|
+
(0, plugin_sdk_1.ContentResourceProvider)(evidence_service_1.EVIDENCE_PROVIDER),
|
|
90
|
+
__metadata("design:paramtypes", [evidence_service_1.AnalysisEvidenceService])
|
|
91
|
+
], AnalysisEvidenceContent);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
|
+
import type { AnalysisEvidenceSnapshot, AnalyticalDataset, XpertResolvedViewHostContext } from '@xpert-ai/contracts';
|
|
3
|
+
import { type ContentActor, type ContentDocumentScope, type RuntimeCapabilityRegistry } from '@xpert-ai/plugin-sdk';
|
|
4
|
+
import { z } from 'zod/v3';
|
|
5
|
+
import { DashboardService } from '../dashboard.service';
|
|
6
|
+
import { AnalysisEvidenceRecord } from './evidence.entity';
|
|
7
|
+
export declare const EVIDENCE_TYPE = "analysis-evidence";
|
|
8
|
+
export declare const EVIDENCE_PROVIDER = "live-dashboard.analysis-evidence";
|
|
9
|
+
export declare const captureEvidenceSchema: z.ZodObject<{
|
|
10
|
+
requestId: z.ZodString;
|
|
11
|
+
artifactId: z.ZodString;
|
|
12
|
+
versionId: z.ZodString;
|
|
13
|
+
title: z.ZodString;
|
|
14
|
+
controls: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>;
|
|
15
|
+
}, "strict", z.ZodTypeAny, {
|
|
16
|
+
title: string;
|
|
17
|
+
artifactId: string;
|
|
18
|
+
controls: Record<string, string | number | boolean | null>;
|
|
19
|
+
versionId: string;
|
|
20
|
+
requestId: string;
|
|
21
|
+
}, {
|
|
22
|
+
title: string;
|
|
23
|
+
artifactId: string;
|
|
24
|
+
controls: Record<string, string | number | boolean | null>;
|
|
25
|
+
versionId: string;
|
|
26
|
+
requestId: string;
|
|
27
|
+
}>;
|
|
28
|
+
export declare const evidenceContext: (scope: ContentDocumentScope) => XpertResolvedViewHostContext;
|
|
29
|
+
/** Exclude execution clocks while retaining source versions, certification and exact row scope.
|
|
30
|
+
* If current results differ, old cells cannot be newly disclosed under potentially changed row-level permissions. */
|
|
31
|
+
export declare function evidenceDataDigest(datasets: AnalyticalDataset[]): string;
|
|
32
|
+
export declare class AnalysisEvidenceService {
|
|
33
|
+
private readonly records;
|
|
34
|
+
private readonly dashboards;
|
|
35
|
+
private readonly runtime;
|
|
36
|
+
constructor(records: Repository<AnalysisEvidenceRecord>, dashboards: DashboardService, runtime: RuntimeCapabilityRegistry);
|
|
37
|
+
private scope;
|
|
38
|
+
private query;
|
|
39
|
+
authorize(context: XpertResolvedViewHostContext, id: string, write?: boolean): Promise<AnalysisEvidenceRecord>;
|
|
40
|
+
contextFor(actor: ContentActor, id: string): Promise<XpertResolvedViewHostContext>;
|
|
41
|
+
validateBytes(buffer: Buffer): Promise<void>;
|
|
42
|
+
canCapture(context: XpertResolvedViewHostContext): Promise<boolean>;
|
|
43
|
+
read(context: XpertResolvedViewHostContext, id: string): Promise<AnalysisEvidenceSnapshot>;
|
|
44
|
+
refresh(context: XpertResolvedViewHostContext, id: string, requestId: string, title: string): Promise<{
|
|
45
|
+
previousId: string;
|
|
46
|
+
id: string;
|
|
47
|
+
artifactId: string;
|
|
48
|
+
sha256: string;
|
|
49
|
+
capturedAt: string;
|
|
50
|
+
}>;
|
|
51
|
+
list(context: XpertResolvedViewHostContext, cursor?: number): Promise<{
|
|
52
|
+
nextCursor?: number | undefined;
|
|
53
|
+
items: {
|
|
54
|
+
id: string;
|
|
55
|
+
title: string;
|
|
56
|
+
sha256: string;
|
|
57
|
+
capturedAt: string;
|
|
58
|
+
artifactId: string | null;
|
|
59
|
+
}[];
|
|
60
|
+
}>;
|
|
61
|
+
capture(context: XpertResolvedViewHostContext, raw: z.infer<typeof captureEvidenceSchema>): Promise<{
|
|
62
|
+
id: string;
|
|
63
|
+
artifactId: string;
|
|
64
|
+
sha256: string;
|
|
65
|
+
capturedAt: string;
|
|
66
|
+
}>;
|
|
67
|
+
}
|
|
@@ -0,0 +1,218 @@
|
|
|
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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AnalysisEvidenceService = exports.evidenceContext = exports.captureEvidenceSchema = exports.EVIDENCE_PROVIDER = exports.EVIDENCE_TYPE = void 0;
|
|
16
|
+
exports.evidenceDataDigest = evidenceDataDigest;
|
|
17
|
+
const node_crypto_1 = require("node:crypto");
|
|
18
|
+
const common_1 = require("@nestjs/common");
|
|
19
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
20
|
+
const typeorm_2 = require("typeorm");
|
|
21
|
+
const plugin_sdk_1 = require("@xpert-ai/plugin-sdk");
|
|
22
|
+
const analytics_1 = require("@xpert-ai/plugin-sdk/analytics");
|
|
23
|
+
const v3_1 = require("zod/v3");
|
|
24
|
+
const dashboard_service_1 = require("../dashboard.service");
|
|
25
|
+
const evidence_entity_1 = require("./evidence.entity");
|
|
26
|
+
exports.EVIDENCE_TYPE = 'analysis-evidence';
|
|
27
|
+
exports.EVIDENCE_PROVIDER = 'live-dashboard.analysis-evidence';
|
|
28
|
+
exports.captureEvidenceSchema = v3_1.z.object({ requestId: v3_1.z.string().uuid(), artifactId: v3_1.z.string().uuid(), versionId: v3_1.z.string().uuid(),
|
|
29
|
+
title: v3_1.z.string().min(1).max(200), controls: v3_1.z.record(v3_1.z.string().min(1).max(80), v3_1.z.union([v3_1.z.string().max(4000), v3_1.z.number().finite(), v3_1.z.boolean(), v3_1.z.null()]))
|
|
30
|
+
.refine(value => Object.keys(value).length <= 32) }).strict();
|
|
31
|
+
const evidenceContext = (scope) => ({ ...scope.actor, hostType: 'project', hostId: scope.projectId, slots: [] });
|
|
32
|
+
exports.evidenceContext = evidenceContext;
|
|
33
|
+
const digest = (value) => (0, node_crypto_1.createHash)('sha256').update(value).digest('hex');
|
|
34
|
+
/** Exclude execution clocks while retaining source versions, certification and exact row scope.
|
|
35
|
+
* If current results differ, old cells cannot be newly disclosed under potentially changed row-level permissions. */
|
|
36
|
+
function evidenceDataDigest(datasets) {
|
|
37
|
+
return digest((0, analytics_1.canonicalEvidenceJson)(datasets.map(({ freshness: _clock, provenance, ...data }) => {
|
|
38
|
+
const { executionId: _id, upstreamExecutionId: _upstream, auditRef: _audit, certification, ...source } = provenance;
|
|
39
|
+
const proof = certification ? (({ verifiedAt: _checked, ...value }) => value)(certification) : undefined;
|
|
40
|
+
return { ...data, dataAsOf: _clock.dataAsOf, provenance: { ...source, certification: proof } };
|
|
41
|
+
})));
|
|
42
|
+
}
|
|
43
|
+
let AnalysisEvidenceService = class AnalysisEvidenceService {
|
|
44
|
+
constructor(records, dashboards, runtime) {
|
|
45
|
+
this.records = records;
|
|
46
|
+
this.dashboards = dashboards;
|
|
47
|
+
this.runtime = runtime;
|
|
48
|
+
}
|
|
49
|
+
scope(context) {
|
|
50
|
+
const project = (0, dashboard_service_1.projectId)(context);
|
|
51
|
+
if (!context.tenantId || !context.organizationId || !context.userId || !project)
|
|
52
|
+
throw new common_1.ForbiddenException('EVIDENCE_PROJECT_REQUIRED');
|
|
53
|
+
return { tenantId: context.tenantId, organizationId: context.organizationId, projectId: project };
|
|
54
|
+
}
|
|
55
|
+
async query(context, source, controls) {
|
|
56
|
+
if (this.scope(context).projectId !== source.projectId)
|
|
57
|
+
throw new common_1.ForbiddenException('EVIDENCE_SCOPE_DENIED');
|
|
58
|
+
const result = await this.dashboards.query(context, source.artifactId, source.versionId, controls);
|
|
59
|
+
if (result.failures.length || !result.datasets.length)
|
|
60
|
+
throw new common_1.ForbiddenException('EVIDENCE_SOURCE_UNAVAILABLE');
|
|
61
|
+
return result.datasets;
|
|
62
|
+
}
|
|
63
|
+
async authorize(context, id, write = false) {
|
|
64
|
+
await this.dashboards.authorizeProject(context, write ? 'write' : 'read');
|
|
65
|
+
const row = await this.records.findOneBy({ ...this.scope(context), id });
|
|
66
|
+
if (!row)
|
|
67
|
+
throw new common_1.ForbiddenException('EVIDENCE_UNAVAILABLE');
|
|
68
|
+
if (write && row.artifactId)
|
|
69
|
+
throw new common_1.ForbiddenException('EVIDENCE_IMMUTABLE');
|
|
70
|
+
const snapshot = (0, analytics_1.parseAnalysisEvidence)(row.snapshot);
|
|
71
|
+
if (snapshot.id !== row.id || snapshot.source.projectId !== row.projectId || digest((0, analytics_1.analysisEvidenceDigestInput)(snapshot)) !== snapshot.sha256)
|
|
72
|
+
throw new common_1.ForbiddenException('EVIDENCE_INTEGRITY_FAILED');
|
|
73
|
+
const current = await this.query(context, snapshot.source, snapshot.controls);
|
|
74
|
+
if (evidenceDataDigest(current) !== evidenceDataDigest(snapshot.datasets))
|
|
75
|
+
throw new common_1.ConflictException('EVIDENCE_SOURCE_CHANGED_CAPTURE_NEW_SNAPSHOT');
|
|
76
|
+
await this.dashboards.authorizeProject(context);
|
|
77
|
+
return row;
|
|
78
|
+
}
|
|
79
|
+
async contextFor(actor, id) {
|
|
80
|
+
const row = await this.records.findOneBy({ tenantId: actor.tenantId, organizationId: actor.organizationId, id });
|
|
81
|
+
if (!row)
|
|
82
|
+
throw new common_1.ForbiddenException('EVIDENCE_UNAVAILABLE');
|
|
83
|
+
return (0, exports.evidenceContext)({ actor, projectId: row.projectId });
|
|
84
|
+
}
|
|
85
|
+
async validateBytes(buffer) {
|
|
86
|
+
if (buffer.length > 2_000_000)
|
|
87
|
+
throw new common_1.BadRequestException('EVIDENCE_SIZE_LIMIT');
|
|
88
|
+
const snapshot = (0, analytics_1.parseAnalysisEvidence)(JSON.parse(buffer.toString('utf8')));
|
|
89
|
+
const row = await this.records.findOneBy({ id: snapshot.id });
|
|
90
|
+
if (!row || (0, analytics_1.canonicalEvidenceJson)(row.snapshot) !== (0, analytics_1.canonicalEvidenceJson)(snapshot))
|
|
91
|
+
throw new common_1.ForbiddenException('EVIDENCE_IMMUTABLE');
|
|
92
|
+
}
|
|
93
|
+
async canCapture(context) {
|
|
94
|
+
try {
|
|
95
|
+
await this.dashboards.authorizeProject(context, 'write');
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
if (error instanceof common_1.ForbiddenException)
|
|
100
|
+
return false;
|
|
101
|
+
throw error;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async read(context, id) { return (await this.authorize(context, id)).snapshot; }
|
|
105
|
+
async refresh(context, id, requestId, title) {
|
|
106
|
+
await this.dashboards.authorizeProject(context, 'write');
|
|
107
|
+
const row = await this.records.findOneBy({ ...this.scope(context), id });
|
|
108
|
+
if (!row)
|
|
109
|
+
throw new common_1.ForbiddenException('EVIDENCE_UNAVAILABLE');
|
|
110
|
+
const snapshot = (0, analytics_1.parseAnalysisEvidence)(row.snapshot);
|
|
111
|
+
if (snapshot.id !== row.id || snapshot.source.projectId !== row.projectId || digest((0, analytics_1.analysisEvidenceDigestInput)(snapshot)) !== snapshot.sha256)
|
|
112
|
+
throw new common_1.ForbiddenException('EVIDENCE_INTEGRITY_FAILED');
|
|
113
|
+
// A changed row scope must never disclose the old rows. Only reuse source
|
|
114
|
+
// coordinates internally; capture authorizes and queries the current source.
|
|
115
|
+
const receipt = await this.capture(context, { requestId, title, artifactId: snapshot.source.artifactId,
|
|
116
|
+
versionId: snapshot.source.versionId, controls: snapshot.controls });
|
|
117
|
+
return { ...receipt, previousId: id };
|
|
118
|
+
}
|
|
119
|
+
async list(context, cursor = 0) {
|
|
120
|
+
await this.dashboards.authorizeProject(context);
|
|
121
|
+
if (!Number.isSafeInteger(cursor) || cursor < 0)
|
|
122
|
+
throw new common_1.BadRequestException('EVIDENCE_CURSOR_INVALID');
|
|
123
|
+
const rows = await this.records.find({ where: this.scope(context), order: { createdAt: 'DESC', id: 'ASC' }, skip: cursor, take: 50 });
|
|
124
|
+
const items = [];
|
|
125
|
+
for (const row of rows) {
|
|
126
|
+
if (!row.artifactId)
|
|
127
|
+
continue;
|
|
128
|
+
try {
|
|
129
|
+
const current = await this.authorize(context, row.id);
|
|
130
|
+
items.push({ id: row.id, title: current.snapshot.title, sha256: current.snapshot.sha256, capturedAt: current.snapshot.capturedAt, artifactId: current.artifactId });
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
if (!(error instanceof common_1.ForbiddenException || error instanceof common_1.ConflictException))
|
|
134
|
+
throw error;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return { items, ...(rows.length === 50 ? { nextCursor: cursor + 50 } : {}) };
|
|
138
|
+
}
|
|
139
|
+
async capture(context, raw) {
|
|
140
|
+
const input = exports.captureEvidenceSchema.parse(raw), scope = this.scope(context);
|
|
141
|
+
await this.dashboards.authorizeProject(context, 'write');
|
|
142
|
+
const requestHash = digest((0, analytics_1.canonicalEvidenceJson)(input));
|
|
143
|
+
let row = await this.records.findOneBy({ ...scope, requestId: input.requestId });
|
|
144
|
+
if (row && (row.requestHash !== requestHash || row.createdById !== context.userId))
|
|
145
|
+
throw new common_1.ConflictException('EVIDENCE_REQUEST_CONFLICT');
|
|
146
|
+
if (!row) {
|
|
147
|
+
const source = { artifactId: input.artifactId, versionId: input.versionId, projectId: scope.projectId };
|
|
148
|
+
const saved = await this.dashboards.open(context, source.artifactId, source.versionId);
|
|
149
|
+
if (saved.isDraft || saved.versionId !== source.versionId)
|
|
150
|
+
throw new common_1.BadRequestException('EVIDENCE_PUBLISHED_VERSION_REQUIRED');
|
|
151
|
+
const known = new Set(saved.manifest.controls.map(control => control.controlId));
|
|
152
|
+
if (Object.keys(input.controls).some(key => !known.has(key)))
|
|
153
|
+
throw new common_1.BadRequestException('EVIDENCE_CONTROL_UNKNOWN');
|
|
154
|
+
const controls = { ...input.controls };
|
|
155
|
+
for (const binding of saved.manifest.bindings) {
|
|
156
|
+
const parameters = (0, analytics_1.resolveAnalyticsParameters)(binding, input.controls);
|
|
157
|
+
for (const parameter of binding.parameters ?? []) {
|
|
158
|
+
const value = parameters[parameter.name];
|
|
159
|
+
if (value !== undefined) {
|
|
160
|
+
if (parameter.controlId in controls && controls[parameter.controlId] !== value)
|
|
161
|
+
throw new common_1.BadRequestException('EVIDENCE_CONTROL_DEFAULT_CONFLICT');
|
|
162
|
+
controls[parameter.controlId] = value;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
const datasets = await this.query(context, source, controls);
|
|
167
|
+
if (datasets.reduce((n, dataset) => n + dataset.rows.length, 0) > 1000)
|
|
168
|
+
throw new common_1.BadRequestException('EVIDENCE_ROW_LIMIT');
|
|
169
|
+
const snapshot = { schema: 'xpert.analysis-evidence@1', id: (0, node_crypto_1.randomUUID)(), title: input.title,
|
|
170
|
+
capturedAt: new Date().toISOString(), source, controls, datasets,
|
|
171
|
+
statements: datasets.flatMap(dataset => dataset.rows.map((cells, row) => ({ kind: 'fact',
|
|
172
|
+
text: dataset.fields.map(field => `${field.label}: ${String(cells[field.id])}${field.unit ? ' ' + field.unit : ''}`).join('; '),
|
|
173
|
+
citations: dataset.fields.map(field => ({ datasetId: dataset.datasetId, row, field: field.id })) }))), sha256: '0'.repeat(64) };
|
|
174
|
+
snapshot.sha256 = digest((0, analytics_1.analysisEvidenceDigestInput)(snapshot));
|
|
175
|
+
(0, analytics_1.parseAnalysisEvidence)(snapshot);
|
|
176
|
+
await this.records.createQueryBuilder().insert().values({ ...scope, id: snapshot.id, createdById: context.userId,
|
|
177
|
+
requestId: input.requestId, requestHash, snapshot, artifactId: null }).orIgnore().execute();
|
|
178
|
+
row = await this.records.findOneByOrFail({ ...scope, requestId: input.requestId });
|
|
179
|
+
if (row.requestHash !== requestHash || row.createdById !== context.userId)
|
|
180
|
+
throw new common_1.ConflictException('EVIDENCE_REQUEST_CONFLICT');
|
|
181
|
+
}
|
|
182
|
+
// Recheck even on retries. Never regenerate bytes of an existing snapshot.
|
|
183
|
+
await this.authorize(context, row.id);
|
|
184
|
+
const api = this.runtime.require(plugin_sdk_1.ArtifactsRuntimeCapability);
|
|
185
|
+
const source = { pluginName: dashboard_service_1.PLUGIN_NAME, resourceType: exports.EVIDENCE_TYPE, resourceId: row.id };
|
|
186
|
+
const artifact = await api.findArtifactBySource(source) ?? await api.createArtifact({ source,
|
|
187
|
+
type: { pluginName: dashboard_service_1.PLUGIN_NAME, resourceType: exports.EVIDENCE_TYPE }, authorizationProviderKey: exports.EVIDENCE_PROVIDER,
|
|
188
|
+
kind: 'file', title: row.snapshot.title, scope: { ...scope, userId: null } });
|
|
189
|
+
const drafts = this.runtime.require(plugin_sdk_1.ArtifactDraftsRuntimeCapability);
|
|
190
|
+
let draft = await drafts.get(artifact.id);
|
|
191
|
+
if (!draft) {
|
|
192
|
+
const buffer = Buffer.from(JSON.stringify(row.snapshot));
|
|
193
|
+
const ref = await this.runtime.require(plugin_sdk_1.ArtifactContentRuntimeCapability).write({ artifactId: artifact.id, buffer });
|
|
194
|
+
try {
|
|
195
|
+
draft = await drafts.save({ artifactId: artifact.id, expectedRevision: 0, expectedCurrentVersionId: null,
|
|
196
|
+
workspaceFileRef: ref, mimeType: 'application/json', fileName: 'analysis-evidence.json', title: row.snapshot.title, sha256: digest(buffer.toString()) });
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
if (!(error instanceof common_1.ConflictException))
|
|
200
|
+
throw error;
|
|
201
|
+
draft = await drafts.get(artifact.id);
|
|
202
|
+
if (!draft)
|
|
203
|
+
throw error;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
await this.records.update({ id: row.id, ...scope }, { artifactId: artifact.id });
|
|
207
|
+
await this.authorize(context, row.id);
|
|
208
|
+
return { id: row.id, artifactId: artifact.id, sha256: row.snapshot.sha256, capturedAt: row.snapshot.capturedAt };
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
exports.AnalysisEvidenceService = AnalysisEvidenceService;
|
|
212
|
+
exports.AnalysisEvidenceService = AnalysisEvidenceService = __decorate([
|
|
213
|
+
(0, common_1.Injectable)(),
|
|
214
|
+
__param(0, (0, typeorm_1.InjectRepository)(evidence_entity_1.AnalysisEvidenceRecord)),
|
|
215
|
+
__param(2, (0, common_1.Inject)(plugin_sdk_1.XPERT_RUNTIME_CAPABILITIES_TOKEN)),
|
|
216
|
+
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
217
|
+
dashboard_service_1.DashboardService, Object])
|
|
218
|
+
], AnalysisEvidenceService);
|
package/dist/lib/middleware.d.ts
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
+
import { AnalysisEvidenceService } from './evidence/evidence.service';
|
|
2
|
+
import { AnalysisEvidenceTransfers } from './evidence/evidence-transfers';
|
|
1
3
|
import { LibraryTemplateExecutionService } from './library/template-execution.service';
|
|
2
4
|
import { DashboardSaveRequests } from './save-requests';
|
|
3
5
|
import type { TAgentMiddlewareMeta } from '@xpert-ai/contracts';
|
|
4
6
|
import { type AgentMiddleware, type IAgentMiddlewareStrategy, type IAgentMiddlewareContext } from '@xpert-ai/plugin-sdk';
|
|
5
7
|
import { DashboardService } from './dashboard.service';
|
|
6
|
-
export declare const DASHBOARD_GUIDANCE = "When asked which dashboards are available, use platform resource_search with typeId \"xpert.live-dashboard\" and omit query to enumerate this conversation's Project content and accepted group shares. Follow nextCursor until null; dashboard_list only lists dashboards authored in the current Project and an empty result does not mean there are no shared dashboards. ResourceAssistant must be enabled for discovery and navigation; if absent, explain that capability is unavailable rather than declaring the shared directory empty. When the user asks to open, show or display an existing dashboard, prefer the platform resource_open tool with the requested title. It opens the authorized Workbench resource or asks the user to select a match. In groups it uses accepted shared references; never switch to the source Project or use dashboard_open merely to show a shared dashboard. dashboard_open reads source content for editing and may prepare an editing file; it is not the UI navigation tool. For an explicitly selected library template or task, read its recipe and use dashboard_instantiate_template with the declared arguments. Follow the returned save request until succeeded before reporting a saved dashboard; do not regenerate the layout unless requested. For a new independent dashboard, use a new unused HTML file path. An existing filename or matching title is not authorization to edit another Artifact; do not switch from creation to dashboard_open/update because a file already exists. For a new dashboard, call dashboard_list_sources before searching raw files, reading old scripts or creating transformations. Named governed sources may already provide the required query; inspect their provider contracts first. File-backed sources do not imply that a script must be written. For creating or editing live dashboards,
|
|
8
|
+
export declare const DASHBOARD_GUIDANCE = "When asked which dashboards are available, use platform resource_search with typeId \"xpert.live-dashboard\" and omit query to enumerate this conversation's Project content and accepted group shares. Follow nextCursor until null; dashboard_list only lists dashboards authored in the current Project and an empty result does not mean there are no shared dashboards. ResourceAssistant must be enabled for discovery and navigation; if absent, explain that capability is unavailable rather than declaring the shared directory empty. When the user asks to open, show or display an existing dashboard, prefer the platform resource_open tool with the requested title. It opens the authorized Workbench resource or asks the user to select a match. In groups it uses accepted shared references; never switch to the source Project or use dashboard_open merely to show a shared dashboard. dashboard_open reads source content for editing and may prepare an editing file; it is not the UI navigation tool. For an explicitly selected library template or task, read its recipe and use dashboard_instantiate_template with the declared arguments. Follow the returned save request until succeeded before reporting a saved dashboard; do not regenerate the layout unless requested. For a new independent dashboard, use a new unused HTML file path. An existing filename or matching title is not authorization to edit another Artifact; do not switch from creation to dashboard_open/update because a file already exists. For a new dashboard using an existing governed source, call dashboard_list_sources before searching raw files, reading old scripts or creating transformations. Named governed sources may already provide the required query; inspect their provider contracts first. File-backed sources do not imply that a script must be written. For creating or editing live dashboards, read live-dashboard using the exact SKILL.md path in the Available Skills list. Read relevant references relative to that entry. If the skill is absent, report it as unavailable; never construct a path from the skill name. Use SandboxFile tools for all source-file authoring; HTML alone is not a saved dashboard. Follow preview.validation.checks immediately before authoring HTML; each suggestedCall must actually succeed. Business definitions, real data previews and nullable-filter tests are required before saving new or changed Bindings. Do not invent business data or substitute a different metric without agreement. Report completion only from a successful dashboard_create/dashboard_create_html/dashboard_update draft receipt or a succeeded template save request with a dashboard receipt. Human publication is separate. Successful create, update and open tools emit a chat resource card automatically; resourceCard.status reports emission. Its Open button selects the exact dashboard in Workbench. Never fabricate a link, call present_files for dashboard HTML, or output card JSON as text. If card delivery is unavailable, report the saved receipt and use the Workbench picker.";
|
|
7
9
|
export declare class DashboardMiddleware implements IAgentMiddlewareStrategy {
|
|
8
10
|
private readonly service;
|
|
9
11
|
private readonly saveRequests?;
|
|
10
12
|
private readonly libraryExecution?;
|
|
13
|
+
private readonly evidenceSnapshots?;
|
|
14
|
+
private readonly evidenceTransfers?;
|
|
11
15
|
readonly meta: TAgentMiddlewareMeta;
|
|
12
|
-
constructor(service: DashboardService, saveRequests?: DashboardSaveRequests | undefined, libraryExecution?: LibraryTemplateExecutionService | undefined);
|
|
16
|
+
constructor(service: DashboardService, saveRequests?: DashboardSaveRequests | undefined, libraryExecution?: LibraryTemplateExecutionService | undefined, evidenceSnapshots?: AnalysisEvidenceService | undefined, evidenceTransfers?: AnalysisEvidenceTransfers | undefined);
|
|
13
17
|
createMiddleware(_options: unknown, context: IAgentMiddlewareContext): AgentMiddleware;
|
|
14
18
|
}
|