"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultPersonaText = defaultPersonaText;
exports.noneText = noneText;
exports.noneRequiredFieldsText = noneRequiredFieldsText;
exports.funcToolUsageLabels = funcToolUsageLabels;
exports.funcToolRulesText = funcToolRulesText;
exports.taskdocCanonicalCopy = taskdocCanonicalCopy;
exports.memoryPreambleLabels = memoryPreambleLabels;
exports.sharedScopeLabel = sharedScopeLabel;
exports.personalScopeLabel = personalScopeLabel;
exports.memoriesSummaryTitle = memoriesSummaryTitle;
exports.memoriesSummarySectionShared = memoriesSummarySectionShared;
exports.memoriesSummarySectionPersonal = memoriesSummarySectionPersonal;
exports.memoriesSummaryLineShared = memoriesSummaryLineShared;
exports.memoriesSummaryLinePersonal = memoriesSummaryLinePersonal;
exports.sharedMemoriesHeader = sharedMemoriesHeader;
exports.personalMemoriesHeader = personalMemoriesHeader;
function defaultPersonaText(language) {
    return language === 'zh' ? '你是一个乐于助人的助手。' : 'You are a helpful assistant.';
}
function noneText(language) {
    return language === 'zh' ? '无。' : 'None.';
}
function noneRequiredFieldsText(language) {
    return language === 'zh' ? '无' : 'None';
}
function funcToolUsageLabels(language) {
    if (language === 'zh') {
        return {
            toolLabel: '函数工具',
            invocationLabel: '调用方式',
            invocationBody: '原生函数工具调用（严格 JSON 参数）',
            requiredLabel: '必填字段',
            parametersLabel: '参数',
        };
    }
    return {
        toolLabel: 'Function Tool',
        invocationLabel: 'Invocation',
        invocationBody: 'native function calling with strict JSON arguments',
        requiredLabel: 'Required fields',
        parametersLabel: 'Parameters',
    };
}
function funcToolRulesText(language) {
    return language === 'zh'
        ? '\n- 对所有函数工具使用标准工具调用方式。'
        : '\n- Use standard function tool calls for all function tools.';
}
function taskdocCanonicalCopy(language) {
    if (language === 'zh') {
        return [
            '**Taskdoc 封装与访问限制**',
            '',
            '- 任何 `.tsk/` 目录及其子路径（`**/*.tsk/**`）都是封装状态：禁止使用任何通用文件工具读取/写入/列目录（例如 `read_file` / `write_file` / `list_dir` 等）。',
            '- 更新 Taskdoc 只能使用函数工具 `do_mind` / `mind_more` / `change_mind` / `never_mind`：缺失章节用 `do_mind` 创建；少量新增用 `mind_more` 追加（默认 progress）；需要删除陈旧项、重排或压缩时用 `change_mind` 整章替换；确需删除整章文件时用 `never_mind`。',
            '- 读取章节或取得 `change_mind.previous_content_hash` 需要使用函数工具 `recall_taskdoc({ selector, category? })`；顶层三段省略 `category`，额外章节传入 `category`。',
            '',
            '**Taskdoc 自动注入规则（系统提示）**',
            '',
            '- 系统提示会把“有效 Taskdoc”自动注入到模型上下文中。',
            '- 一定会注入顶层三段：`goals.md`、`constraints.md`、`progress.md`（按此顺序）。',
            '- 可选注入 `bearinmind/`（仅固定白名单，最多 6 个文件）：`contracts.md`、`acceptance.md`、`grants.md`、`runbook.md`、`decisions.md`、`risks.md`。',
            '- 若存在 `bearinmind/` 注入块，它会以 `## Bear In Mind` 出现在 `## Constraints` 与 `## Progress` 之间，并按以上固定顺序拼接。',
            '- 除此之外，`.tsk/` 内任何其他目录/文件都不会被自动注入正文（系统只会注入一个“额外章节索引”用于提示；需要时用 `recall_taskdoc` 显式读取）。',
        ].join('\n');
    }
    return [
        '**Taskdoc encapsulation & access restrictions**',
        '',
        '- Any `.tsk/` directory and its subpaths (`**/*.tsk/**`) are encapsulated state: general file tools MUST NOT read/write/list them (e.g. `read_file` / `write_file` / `list_dir`).',
        '- Taskdoc updates MUST go through `do_mind` / `mind_more` / `change_mind` / `never_mind`: use `do_mind` to create missing sections, use `mind_more` for small append-only additions (defaults to progress), use `change_mind` for full-section replacement when cleanup, reordering, or compression is needed, and use `never_mind` when a whole section file should be deleted.',
        '- To read a section or get `change_mind.previous_content_hash`, use the function tool `recall_taskdoc({ selector, category? })`; omit `category` for top-level sections and pass it for extra sections.',
        '',
        '**Taskdoc auto-injection rules (system prompt)**',
        '',
        '- The system prompt auto-injects the “effective Taskdoc” into the model context.',
        '- It always injects the three top-level sections in order: `goals.md`, `constraints.md`, `progress.md`.',
        '- It may also inject `bearinmind/` (fixed whitelist only; max 6 files): `contracts.md`, `acceptance.md`, `grants.md`, `runbook.md`, `decisions.md`, `risks.md`.',
        '- If present, the injected block appears as `## Bear In Mind` between `## Constraints` and `## Progress`, and the files are concatenated in the fixed order above.',
        '- No other directories/files inside `.tsk/` are auto-injected as body content (only an “extra sections index” may be injected for discoverability; use `recall_taskdoc` when needed).',
    ].join('\n');
}
function memoryPreambleLabels(language) {
    if (language === 'zh') {
        return {
            pathLabel: '路径',
            lastModifiedLabel: '最后修改',
            sizeLabel: '大小',
            wordsLabel: '词数',
            bytesUnit: '字节',
            manageWithLabel: '可用工具',
        };
    }
    return {
        pathLabel: 'Path',
        lastModifiedLabel: 'Last modified',
        sizeLabel: 'Size',
        wordsLabel: 'Words',
        bytesUnit: 'bytes',
        manageWithLabel: 'Manage with',
    };
}
function sharedScopeLabel(language) {
    return language === 'zh' ? '团队共享记忆' : 'Team Shared Memory';
}
function personalScopeLabel(language, agentId) {
    return language === 'zh' ? `个人记忆 (@${agentId})` : `Personal Memory (@${agentId})`;
}
function memoriesSummaryTitle(language) {
    return language === 'zh' ? '## 记忆摘要\n' : '## Memories Summary\n';
}
function memoriesSummarySectionShared(language) {
    return language === 'zh' ? '### 共享' : '### Shared';
}
function memoriesSummarySectionPersonal(language) {
    return language === 'zh' ? '### 个人\n' : '### Personal\n';
}
function memoriesSummaryLineShared(language, path) {
    return language === 'zh' ? `- 共享: ${path}` : `- Shared: ${path}`;
}
function memoriesSummaryLinePersonal(language, path) {
    return language === 'zh' ? `- 个人: ${path}` : `- Personal: ${path}`;
}
function sharedMemoriesHeader(language) {
    return language === 'zh' ? '## 共享记忆' : '## Shared Memories';
}
function personalMemoriesHeader(language) {
    return language === 'zh' ? '## 个人记忆\n' : '## Personal Memories\n';
}
