irises 1.0.4 → 1.0.6
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/data/configs.example/cloudflare.yaml +17 -0
- package/data/configs.example/mcp.yaml +22 -1
- package/data/configs.example/memory.yaml +33 -0
- package/data/configs.example/modes.yaml +13 -3
- package/data/configs.example/net.yaml +26 -0
- package/data/configs.example/ocr.yaml +15 -7
- package/data/configs.example/storage.yaml +14 -2
- package/package.json +6 -6
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Cloudflare 管理配置
|
|
2
|
+
# 用于通过 Web GUI 管理 DNS 记录和 SSL 设置
|
|
3
|
+
#
|
|
4
|
+
# API Token 解析优先级:apiToken > apiTokenEnv > apiTokenFile
|
|
5
|
+
# 三者都不配置则视为未配置 Cloudflare
|
|
6
|
+
|
|
7
|
+
# 方式一:直接填写 API Token(不推荐,明文存储)
|
|
8
|
+
# apiToken: your-cloudflare-api-token
|
|
9
|
+
|
|
10
|
+
# 方式二:从环境变量读取(推荐)
|
|
11
|
+
# apiTokenEnv: IRIS_CF_API_TOKEN
|
|
12
|
+
|
|
13
|
+
# 方式三:从文件读取(绝对路径,或相对于配置目录)
|
|
14
|
+
# apiTokenFile: /etc/iris/cf-token.txt
|
|
15
|
+
|
|
16
|
+
# Zone ID(不填则自动选择账号下的第一个 zone)
|
|
17
|
+
# zoneId: auto
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# MCP 服务器配置
|
|
2
2
|
# 连接外部 MCP 服务器,自动将其工具注入 LLM 工具列表
|
|
3
|
+
# 启动时后台异步连接,不阻塞启动
|
|
4
|
+
#
|
|
5
|
+
# 每个服务器支持以下字段:
|
|
6
|
+
# transport - 传输方式: stdio | sse | streamable-http
|
|
7
|
+
# enabled - 是否启用(默认 true)
|
|
8
|
+
# timeout - 连接/listTools 超时,单位 ms(默认 30000)
|
|
9
|
+
#
|
|
10
|
+
# stdio 模式专用:
|
|
11
|
+
# command - 要执行的命令
|
|
12
|
+
# args - 命令参数数组
|
|
13
|
+
# env - 额外环境变量
|
|
14
|
+
# cwd - 工作目录
|
|
15
|
+
#
|
|
16
|
+
# sse / streamable-http 模式专用:
|
|
17
|
+
# url - MCP 服务器 URL
|
|
18
|
+
# headers - 自定义 HTTP 请求头
|
|
3
19
|
|
|
4
20
|
# servers:
|
|
5
21
|
# # stdio 传输示例(本地进程)
|
|
@@ -7,11 +23,16 @@
|
|
|
7
23
|
# transport: stdio
|
|
8
24
|
# command: npx
|
|
9
25
|
# args: ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"]
|
|
26
|
+
# timeout: 30000
|
|
27
|
+
# enabled: true
|
|
10
28
|
#
|
|
11
29
|
# # HTTP 传输示例(远程服务器)
|
|
12
30
|
# remote_tools:
|
|
13
31
|
# transport: streamable-http
|
|
14
|
-
# url: https://mcp.example.com/
|
|
32
|
+
# url: https://mcp.example.com/mcp
|
|
33
|
+
# headers:
|
|
34
|
+
# Authorization: Bearer your-token
|
|
35
|
+
# timeout: 30000
|
|
15
36
|
#
|
|
16
37
|
# # 企微官方文档 MCP(智能表格 + 文档 CRUD,8 个工具)
|
|
17
38
|
# # 在企微管理后台创建智能机器人后,MCP 端点页面可获取 apikey
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# 记忆插件配置
|
|
2
|
+
#
|
|
3
|
+
# 启用后,LLM 可通过 memory_search / memory_add / memory_update / memory_delete 工具
|
|
4
|
+
# 读写长期记忆,实现跨会话的信息持久化。
|
|
5
|
+
#
|
|
6
|
+
# 存储后端:SQLite + FTS5 全文检索
|
|
7
|
+
# 数据库文件默认存放在数据目录下的 memory.db
|
|
8
|
+
|
|
9
|
+
# 是否启用记忆
|
|
10
|
+
enabled: false
|
|
11
|
+
|
|
12
|
+
# 数据库路径(相对于数据目录,或绝对路径)
|
|
13
|
+
# dbPath: ./memory.db
|
|
14
|
+
|
|
15
|
+
# ── 自动提取(对话结束后自动从对话中提取值得记住的信息)──
|
|
16
|
+
autoExtract: true
|
|
17
|
+
# 每 N 轮对话后提取一次
|
|
18
|
+
extractInterval: 1
|
|
19
|
+
|
|
20
|
+
# ── 智能检索(每轮对话前自动注入相关记忆到上下文)──
|
|
21
|
+
autoRecall: true
|
|
22
|
+
# 每轮注入记忆的最大大小(字节)
|
|
23
|
+
maxContextBytes: 20480
|
|
24
|
+
# 会话级记忆注入总上限(字节)
|
|
25
|
+
sessionBudgetBytes: 61440
|
|
26
|
+
|
|
27
|
+
# ── 跨会话归纳(定期整理合并冗余记忆)──
|
|
28
|
+
consolidation:
|
|
29
|
+
enabled: true
|
|
30
|
+
# 两次归纳之间的最小间隔(小时)
|
|
31
|
+
minHours: 24
|
|
32
|
+
# 触发归纳的最少新会话数
|
|
33
|
+
minSessions: 3
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# 模式配置
|
|
2
2
|
# 不同模式可定义不同的系统提示词和工具策略
|
|
3
|
+
# 通过 /mode 命令切换模式
|
|
4
|
+
#
|
|
5
|
+
# 每个模式支持以下字段:
|
|
6
|
+
# description - 模式描述(供人类和 LLM 了解用途)
|
|
7
|
+
# systemPrompt - 该模式的系统提示词(覆盖默认提示词)
|
|
8
|
+
# tools - 工具过滤规则
|
|
9
|
+
# include - 白名单:仅允许这些工具(优先于 exclude)
|
|
10
|
+
# exclude - 黑名单:排除这些工具
|
|
11
|
+
#
|
|
12
|
+
# 模式名 "default" 为内置默认模式(全部工具可用),无需定义
|
|
3
13
|
|
|
4
14
|
# code:
|
|
5
15
|
# description: "代码开发模式"
|
|
@@ -8,11 +18,11 @@
|
|
|
8
18
|
# exclude: [memory_add, memory_delete]
|
|
9
19
|
#
|
|
10
20
|
# readonly:
|
|
11
|
-
# description: "只读分析模式"
|
|
21
|
+
# description: "只读分析模式 — 只能读取文件和搜索,不能修改"
|
|
12
22
|
# tools:
|
|
13
|
-
# include: [read_file, memory_search, get_current_time]
|
|
23
|
+
# include: [read_file, search_in_files, find_files, list_files, memory_search, get_current_time]
|
|
14
24
|
#
|
|
15
25
|
# chat:
|
|
16
|
-
# description: "纯聊天模式"
|
|
26
|
+
# description: "纯聊天模式 — 不使用任何文件操作工具"
|
|
17
27
|
# tools:
|
|
18
28
|
# include: [get_current_time]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# 多端互联配置
|
|
2
|
+
# 启用后可从远程设备控制本 Iris 实例
|
|
3
|
+
|
|
4
|
+
# 直连模式:启动 WebSocket 服务器
|
|
5
|
+
# enabled: true
|
|
6
|
+
# port: 9100
|
|
7
|
+
# host: 0.0.0.0
|
|
8
|
+
# token: your-secret-token-here
|
|
9
|
+
|
|
10
|
+
# 局域网发现:启用后可被同网络的 Iris 实例自动发现
|
|
11
|
+
# 发现使用 UDP 端口 (port + 1),默认 9101
|
|
12
|
+
# 发现响应不包含 token,安全可靠
|
|
13
|
+
|
|
14
|
+
# 已保存的远程连接(/remote 命令中显示为快捷列表)
|
|
15
|
+
# remotes:
|
|
16
|
+
# my-linux:
|
|
17
|
+
# url: ws://192.168.1.100:9100
|
|
18
|
+
# token: my-secret-token
|
|
19
|
+
# my-server:
|
|
20
|
+
# url: ws://10.0.0.5:9100
|
|
21
|
+
|
|
22
|
+
# 中继模式:注册到中继服务器(用于 NAT 穿透)
|
|
23
|
+
# relay:
|
|
24
|
+
# url: wss://your-relay-server:9001
|
|
25
|
+
# nodeId: my-iris
|
|
26
|
+
# token: relay-secret-token
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
# OCR 配置(可选)
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
2
|
+
#
|
|
3
|
+
# 当主模型不支持图片输入(supportsVision: false)时,
|
|
4
|
+
# Iris 会调用这里配置的 vision 模型提取图片中的文字和内容,
|
|
5
|
+
# 再把提取结果作为文本注入主对话模型的上下文。
|
|
6
|
+
#
|
|
7
|
+
# 何时需要配置:
|
|
8
|
+
# - 主模型是纯文本模型(如 gpt-4o-mini 文本版),但用户会上传图片
|
|
9
|
+
# - 主模型本身支持图片输入时,通常不需要配置 OCR
|
|
10
|
+
#
|
|
11
|
+
# 删除整个文件或注释掉所有字段即可关闭 OCR 回退。
|
|
12
|
+
# 关闭后,不支持图片的模型会收到"无法查看图片内容"的占位提示。
|
|
5
13
|
|
|
6
|
-
provider: openai-compatible
|
|
7
|
-
apiKey: your-api-key-here
|
|
8
|
-
baseUrl: https://api.openai.com/v1
|
|
9
|
-
model: gpt-4o-mini
|
|
14
|
+
# provider: openai-compatible # 当前仅支持 openai-compatible
|
|
15
|
+
# apiKey: your-api-key-here # OCR 模型的 API Key
|
|
16
|
+
# baseUrl: https://api.openai.com/v1 # API 基地址
|
|
17
|
+
# model: gpt-4o-mini # 推荐使用轻量 vision 模型,成本低、速度快
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
# 存储配置
|
|
2
|
+
#
|
|
3
|
+
# 会话数据的持久化后端,支持两种模式:
|
|
4
|
+
#
|
|
5
|
+
# json-file(默认):
|
|
6
|
+
# - 每个会话一个 .json 文件,存放在 dir 目录下
|
|
7
|
+
# - 可直接阅读/编辑 JSON 文件,适合小规模使用
|
|
8
|
+
# - 并发控制通过 per-session 写锁实现
|
|
9
|
+
#
|
|
10
|
+
# sqlite:
|
|
11
|
+
# - 单个 SQLite 数据库文件,WAL 模式,天然支持并发
|
|
12
|
+
# - 大量会话时性能更优
|
|
13
|
+
# - 需要 SQLite 工具查看数据
|
|
2
14
|
|
|
3
15
|
# 类型: json-file | sqlite
|
|
4
16
|
type: json-file
|
|
5
17
|
|
|
6
|
-
# 会话数据目录(默认 ~/.iris/sessions
|
|
18
|
+
# 会话数据目录(默认 ~/.iris/sessions/,type 为 json-file 时使用)
|
|
7
19
|
# dir: ~/.iris/sessions
|
|
8
20
|
|
|
9
|
-
# SQLite
|
|
21
|
+
# SQLite 数据库路径(默认 ~/.iris/iris.db,type 为 sqlite 时使用)
|
|
10
22
|
# dbPath: ~/.iris/iris.db
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "irises",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "模块化、可解耦的 AI 聊天框架,支持多平台、多 LLM、工具调用",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"bin": {
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
|
|
11
11
|
},
|
|
12
12
|
"optionalDependencies": {
|
|
13
|
-
"irises-darwin-x64": "1.0.
|
|
14
|
-
"irises-linux-x64": "1.0.
|
|
15
|
-
"irises-darwin-arm64": "1.0.
|
|
16
|
-
"irises-windows-x64": "1.0.
|
|
17
|
-
"irises-linux-arm64": "1.0.
|
|
13
|
+
"irises-darwin-x64": "1.0.6",
|
|
14
|
+
"irises-linux-x64": "1.0.6",
|
|
15
|
+
"irises-darwin-arm64": "1.0.6",
|
|
16
|
+
"irises-windows-x64": "1.0.6",
|
|
17
|
+
"irises-linux-arm64": "1.0.6"
|
|
18
18
|
}
|
|
19
19
|
}
|