新增内置工具 mint_public_link,退役内网签发端口 8081

- mint_public_link:AI 只传文件名,core 在进程内直接 publicFiles.mint() 签出短命公网链接,返回单行 URL;校验 = base_url 已配 + resolveInTask 沙箱 + 确认是文件 + realpath 未跳出任务
目录

    - 删除 routes/public-link.js 与 server.js 里的签发端口(PUBLIC_LINK_PORT/8081):该接口对 AI 已冗余(进程内签发不绕 HTTP,也不存在带不了凭据的问题);public_link 配置项收窄为 mint_public_link 的开关,不再监听额外端口

    - 跟进:definitions.json/HANDLERS 注册;config.example.yml、config.js、public-files.js、download-token.js、routes/files.js 注释;ARCHITECTURE(目录树/部署图/关键约束/5.4 工具表)、DEPLOY 4.1、init.sh 自检改探 /p/<id>、两个 README(工具数 16、公网链接说明)

    - 注:docker-compose.yml 一并带上此前工作区的 VIRTUAL_HOST/my-app-network 改动
This commit is contained in:
2026-09-17 20:12:56 +08:00
parent ec587480d6
commit b65485b7e5
16 changed files with 79 additions and 130 deletions
+17
View File
@@ -178,6 +178,23 @@
}
}
},
{
"type": "function",
"function": {
"name": "mint_public_link",
"description": "Create a short-lived, publicly reachable URL for a local file, so an external service that cannot authenticate can download it.\nUse this when another tool or API needs to fetch a local file by URL. Returns the URL as plain text on a single line.",
"parameters": {
"type": "object",
"required": ["path"],
"properties": {
"path": {
"type": "string",
"description": "Path of the file to publish, relative to the session working directory. Absolute paths inside the session working directory are also accepted."
}
}
}
}
},
{
"type": "function",
"function": {