"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.SystemPrompt = void 0;
const typeorm_1 = require("typeorm");
const swagger_1 = require("@nestjs/swagger");
const base_entity_1 = require("./base.entity");
const session_entity_1 = require("./session.entity");
let SystemPrompt = class SystemPrompt extends base_entity_1.BaseEntity {
};
exports.SystemPrompt = SystemPrompt;
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Human-readable name for this system prompt',
        example: 'Default Assistant',
    }),
    (0, typeorm_1.Column)({ type: 'text' }),
    __metadata("design:type", String)
], SystemPrompt.prototype, "prompt_name", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Prompt content (Eta template syntax supported). Tool definitions are injected when rendered.',
    }),
    (0, typeorm_1.Column)({ type: 'text' }),
    __metadata("design:type", String)
], SystemPrompt.prototype, "prompt_content", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Whether this is the default system prompt for new sessions',
        example: true,
        default: false,
    }),
    (0, typeorm_1.Column)({ type: 'boolean', default: false }),
    __metadata("design:type", Boolean)
], SystemPrompt.prototype, "is_default", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'URL link for this prompt',
        example: 'https://claude.ai',
    }),
    (0, typeorm_1.Column)({ type: 'text', nullable: true }),
    __metadata("design:type", String)
], SystemPrompt.prototype, "url", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Enabled tools: "all" or JSON array of tool names',
        example: 'all',
    }),
    (0, typeorm_1.Column)({ type: 'text', nullable: true }),
    __metadata("design:type", String)
], SystemPrompt.prototype, "enabledTools", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Enabled MCP tools: "all" or JSON array of serverName__toolName identifiers. "all" inherits globally active MCP tools.',
        example: 'all',
    }),
    (0, typeorm_1.Column)({ type: 'text', nullable: true }),
    __metadata("design:type", String)
], SystemPrompt.prototype, "enabledMcpTools", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Token limit for follow-up context generation',
        example: 8000,
    }),
    (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
    __metadata("design:type", Number)
], SystemPrompt.prototype, "followup_token_limit", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({
        description: 'Whether this is a built-in seed prompt (immutable)',
        example: false,
        default: false,
    }),
    (0, typeorm_1.Column)({ type: 'boolean', default: false }),
    __metadata("design:type", Boolean)
], SystemPrompt.prototype, "is_builtin", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Unique key for built-in prompts (used for version updates)',
        example: 'default-native-tool-agent',
    }),
    (0, typeorm_1.Column)({ type: 'text', nullable: true, unique: true }),
    __metadata("design:type", String)
], SystemPrompt.prototype, "builtin_key", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        description: 'Sessions using this system prompt',
        type: () => [session_entity_1.Session],
    }),
    (0, typeorm_1.OneToMany)(() => session_entity_1.Session, (session) => session.systemPrompt),
    __metadata("design:type", Array)
], SystemPrompt.prototype, "sessions", void 0);
exports.SystemPrompt = SystemPrompt = __decorate([
    (0, typeorm_1.Entity)('system_prompts')
], SystemPrompt);
//# sourceMappingURL=system-prompt.entity.js.map