"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    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;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.InstanceAiObservationalMemory = void 0;
const db_1 = require("@n8n/db");
const typeorm_1 = require("@n8n/typeorm");
let InstanceAiObservationalMemory = class InstanceAiObservationalMemory extends db_1.WithTimestamps {
};
exports.InstanceAiObservationalMemory = InstanceAiObservationalMemory;
__decorate([
    (0, typeorm_1.PrimaryColumn)({ type: 'varchar', length: 36 }),
    __metadata("design:type", String)
], InstanceAiObservationalMemory.prototype, "id", void 0);
__decorate([
    (0, typeorm_1.Index)(),
    (0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
    __metadata("design:type", String)
], InstanceAiObservationalMemory.prototype, "lookupKey", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'varchar', length: 16 }),
    __metadata("design:type", String)
], InstanceAiObservationalMemory.prototype, "scope", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
    __metadata("design:type", Object)
], InstanceAiObservationalMemory.prototype, "threadId", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
    __metadata("design:type", String)
], InstanceAiObservationalMemory.prototype, "resourceId", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'text', default: '' }),
    __metadata("design:type", String)
], InstanceAiObservationalMemory.prototype, "activeObservations", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'varchar', length: 32 }),
    __metadata("design:type", String)
], InstanceAiObservationalMemory.prototype, "originType", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'text' }),
    __metadata("design:type", String)
], InstanceAiObservationalMemory.prototype, "config", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'int', default: 0 }),
    __metadata("design:type", Number)
], InstanceAiObservationalMemory.prototype, "generationCount", void 0);
__decorate([
    (0, db_1.DateTimeColumn)({ nullable: true }),
    __metadata("design:type", Object)
], InstanceAiObservationalMemory.prototype, "lastObservedAt", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'int', default: 0 }),
    __metadata("design:type", Number)
], InstanceAiObservationalMemory.prototype, "pendingMessageTokens", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'int', default: 0 }),
    __metadata("design:type", Number)
], InstanceAiObservationalMemory.prototype, "totalTokensObserved", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'int', default: 0 }),
    __metadata("design:type", Number)
], InstanceAiObservationalMemory.prototype, "observationTokenCount", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'boolean', default: false }),
    __metadata("design:type", Boolean)
], InstanceAiObservationalMemory.prototype, "isObserving", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'boolean', default: false }),
    __metadata("design:type", Boolean)
], InstanceAiObservationalMemory.prototype, "isReflecting", void 0);
__decorate([
    (0, db_1.JsonColumn)({ nullable: true }),
    __metadata("design:type", Object)
], InstanceAiObservationalMemory.prototype, "observedMessageIds", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
    __metadata("design:type", Object)
], InstanceAiObservationalMemory.prototype, "observedTimezone", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'text', nullable: true }),
    __metadata("design:type", Object)
], InstanceAiObservationalMemory.prototype, "bufferedObservations", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'int', nullable: true }),
    __metadata("design:type", Object)
], InstanceAiObservationalMemory.prototype, "bufferedObservationTokens", void 0);
__decorate([
    (0, db_1.JsonColumn)({ nullable: true }),
    __metadata("design:type", Object)
], InstanceAiObservationalMemory.prototype, "bufferedMessageIds", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'text', nullable: true }),
    __metadata("design:type", Object)
], InstanceAiObservationalMemory.prototype, "bufferedReflection", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'int', nullable: true }),
    __metadata("design:type", Object)
], InstanceAiObservationalMemory.prototype, "bufferedReflectionTokens", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'int', nullable: true }),
    __metadata("design:type", Object)
], InstanceAiObservationalMemory.prototype, "bufferedReflectionInputTokens", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'int', nullable: true }),
    __metadata("design:type", Object)
], InstanceAiObservationalMemory.prototype, "reflectedObservationLineCount", void 0);
__decorate([
    (0, db_1.JsonColumn)({ nullable: true }),
    __metadata("design:type", Object)
], InstanceAiObservationalMemory.prototype, "bufferedObservationChunks", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'boolean', default: false }),
    __metadata("design:type", Boolean)
], InstanceAiObservationalMemory.prototype, "isBufferingObservation", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'boolean', default: false }),
    __metadata("design:type", Boolean)
], InstanceAiObservationalMemory.prototype, "isBufferingReflection", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: 'int', default: 0 }),
    __metadata("design:type", Number)
], InstanceAiObservationalMemory.prototype, "lastBufferedAtTokens", void 0);
__decorate([
    (0, db_1.DateTimeColumn)({ nullable: true }),
    __metadata("design:type", Object)
], InstanceAiObservationalMemory.prototype, "lastBufferedAtTime", void 0);
__decorate([
    (0, db_1.JsonColumn)({ nullable: true }),
    __metadata("design:type", Object)
], InstanceAiObservationalMemory.prototype, "metadata", void 0);
exports.InstanceAiObservationalMemory = InstanceAiObservationalMemory = __decorate([
    (0, typeorm_1.Entity)({ name: 'instance_ai_observational_memory' }),
    (0, typeorm_1.Index)('IDX_instance_ai_om_scope_thread_resource', ['scope', 'threadId', 'resourceId'], {
        unique: true,
    })
], InstanceAiObservationalMemory);
//# sourceMappingURL=instance-ai-observational-memory.entity.js.map