LinaPro Release v0.4.0
Highlights
-
AI Core capability system: Introduced a typed AI capability namespace in the plugin framework, exposing sub-capabilities for text generation, image generation, embedding, audio transcription/synthesis, vision analysis, document understanding, safety moderation, and video generation. Each sub-capability maintains independent DTOs, status, fallback behavior, and provider contracts. The host only defines abstract capability contracts; concrete channel, model, and tier management is delegated to the new
linapro-ai-coresource plugin. -
linapro-ai-core plugin ("Smart Center"): Delivered a new official source plugin that provides provider management, model identity management, tier configuration, and multimodal invocation logging. Providers support extensible endpoint tables compatible with OpenAI, Anthropic, Voyage, and other protocols. Tiers are organized by capability type with
basic,standard, andadvancedlevels. Invocation logs cover multimodal methods with pagination, filtering, and cleanup. -
Plugin capability system refactoring: Reorganized the plugin capability contracts from a flat
contract/package into domain-oriented capability packages (aicap/,authcap/,bizctxcap/,cachecap/,configcap/,dictcap/,filecap/,hostconfigcap/,i18ncap/,infracap/,jobcap/,manifestcap/,notifycap/,plugincap/,recordstore/,routecap/,sessioncap/,tenantcap/,usercap/). Each package owns its own domain contract, host implementation surface, and guest-side bridge helpers. This eliminates cross-domain coupling and makes capability boundaries explicit for both source plugins and dynamic plugins. -
WASM AI host services for dynamic plugins: Extended the dynamic plugin
hostServicesprotocol with full AI method mapping, enabling WASM-based dynamic plugins to call text, image, embedding, audio, vision, document, safety, and video capabilities through governed host service calls with method-level authorization, payload limits, asset references, and audit trails.
Improvements
-
Plugin management list cache: Added a prewarm and locale-sensitive read-model cache for the plugin management list. The cache keys incorporate locale, runtime bundle version, and plugin-runtime revision, ensuring the first administrator request reuses hot discovery projections and invalidates correctly when plugins or translations change.
-
Plugin capability revision tracking: Plugin capability availability now stays synchronized with lifecycle revisions. After install, enable, disable, or uninstall transitions, the in-memory enablement snapshot is refreshed from the registry and runtime changes are published, keeping capability providers aligned with current state.
-
Plugin topology contract: Introduced a
Topologyinterface for plugin runtime orchestration, supporting clustered mode with primary/secondary node semantics and a single-node fallback for non-clustered deployments. -
Platform governance guards: Centralized platform-governance guards that verify the current request can mutate platform plugin governance state before lifecycle, package, sync, or provisioning operations proceed.
-
Plugin governance scanner: Added
linactl plugins.checkcommand that scans plugin production paths underapps/lina-plugins/for host core table generation, direct host storage access, legacy host-service declarations, and dynamic data-service grants that would bypass domain capabilities. Supports text and JSON output formats. -
Database upgrade command: Added
lina-core upgradecommand andlinactl db.upgradefor replaying all idempotent host SQL assets against the configured database with explicit--confirm=upgradesafety confirmation. -
Version release command: Added
linactl versioncommand that updatesframework.versionin metadata.yaml and refreshes README image cache keys together, reducing manual release preparation errors. -
Log retention configuration: Added runtime log retention settings backed by protected
sys_configparameters, providing a governed maximum log retention period in days. -
Vben frontend reference skill: Added a comprehensive Vben 5 component and framework reference skill covering business components (alert, API component, drawer, form, modal, page, table), common components (count-to, ellipsis-text), core modules (access, API, icons, locale, login, preferences, route, theme), deployment guides, and feature documentation.
-
OpenSpec archive document governance: Implemented archive document governance with compression strategy, requiring
openspec/specsas the sole source of truth for current capability contracts,openspec/changes/archivefor historical context, and unique owner assignment for cross-group duplicate capabilities. -
Plugin host service protocol enhancement: Enhanced the host service protocol with typed descriptors, validation layers, AI codec support, and capability synchronization, improving reliability and consistency between host and plugin runtimes.
-
Plugin manifest resource access: Unified manifest resource access for plugins, removing legacy metadata handling and ensuring all relevant manifest files are collected during plugin builds.
-
Config raw access service: Added raw config access service for direct
sys_configvalue retrieval, supporting internal service consumers that need unprocessed configuration values. -
Session coordination service: Added session coordination service for plugin runtime, providing centralized session state management across plugin lifecycle events.
-
Community collaboration skills: Added three repository-level skills:
lina-community-issue-reviewfor automated GitHub Issue classification and response,lina-community-pr-reviewfor code review against project conventions, andlina-community-release-changelogfor manual bilingual changelog generation. -
Frontend expandable form: Enhanced form expandable behavior with improved collapse/expand transitions and form action button alignment.
-
E2E test coverage: Enhanced E2E quality review rules and added new test scenarios covering dictionary label synchronization with tab pagination, dashboard search collapse visibility, expired session logout loops, plugin host service authorization, and API docs localization.
-
Plugin submodule improvements: All official plugins received dedicated Makefile targets for code generation. Removed direct host table DAOs from plugins (login log, online users, content notice, org core, tenant core) in favor of host-provided capability services. The
linapro-demo-dynamicplugin added manifest host service demo functionality.
Bug Fixes
-
HTTP startup error handling: Replaced
logger.Panicfwithlogger.Errorfin HTTP startup error paths, preventing process crashes when frontend assets are missing or runtime initialization fails and allowing graceful error reporting instead. -
Dictionary store cache synchronization: Implemented a refresh mechanism in the dictionary store that updates cached options without replacing array references, ensuring mounted components see the latest labels and styles after add, update, or delete operations.
-
Tab pagination state retention: Adjusted the built-in menu seed to enable caching for paginated routed menus, preserving tab pagination state when switching between tabs.
-
Manifest resource collection: Fixed manifest resource collection logic to include all relevant files during plugin builds, improving test coverage for edge cases.
-
Plugin uninstallation: Streamlined the plugin uninstallation process and enhanced state restoration logic to handle edge cases more reliably.
-
Demo URLs and badges: Updated live demo URLs and license badges in README files for consistency across English and Chinese versions.
-
Redis cluster smoke script: Updated Redis cluster smoke script to use
db.initinstead of the removedinittarget. -
Error handling in tests: Enhanced error handling in the
expectSuccesstest helper function for better debugging output.
Tooling and Experience
-
Database command refactoring: Refactored database initialization commands from
make inittomake db.initacross all specifications, documentation, CI workflows, and Makefiles. Addedlinactl db.initandlinactl db.mockas explicit sub-commands. -
linactl code generation targets: Enhanced
linactl ctrlandlinactl daoto support explicit target directories, improving code generation flexibility for plugins and multi-module projects. -
Plugin codegen Makefile: Added
hack/makefiles/plugin.codegen.mkwith standardized targets for plugin code generation. -
Release Makefile: Added
hack/makefiles/release.mkwith version update and release preparation targets. -
CI workflow updates: Updated all reusable CI workflows (
backend-unit-tests,e2e-tests,host-only-build-smoke,make-command-smoke,plugin-command-smoke,redis-cluster-smoke,redis-integration-tests) to use the newdb.initcommand naming. -
i18n scan enhancement: Enhanced the runtime i18n scanner to detect frontend translation key usage, improving coverage of untranslated strings.
-
WASM builder improvements: Enhanced the WASM builder with improved embed handling, manifest processing, runtime support, and demo plugin test coverage.
-
Process list support: Added cross-platform process list support (Darwin and Linux) for the
linactldevelopment tool. -
Documentation: Added comprehensive README documentation for the plugin package (
pkg/plugin/README.mdandREADME.zh-CN.md) explaining the contract boundary, directory structure, and capability package responsibilities.
主要亮点
-
AI Core 能力体系:在插件框架中引入类型化 AI 能力命名空间,暴露文本生成、图片生成、向量嵌入、音频转录/合成、视觉分析、文档理解、安全审核和视频生成等子能力。每个子能力维护独立的 DTO、状态、降级行为和 provider 契约。宿主仅定义抽象能力契约,具体的渠道、模型和档位管理由新的
linapro-ai-core源码插件承载。 -
linapro-ai-core 插件("智能中心"):交付全新官方源码插件,提供渠道管理、模型身份管理、档位配置和多模态调用日志。渠道支持可扩展的端点表,兼容 OpenAI、Anthropic、Voyage 等多协议端点。档位按能力类型组织,固定提供基础、标准和高级三档。调用日志覆盖多模态方法,支持分页筛选和日志清理。
-
插件能力体系重构:将插件能力契约从扁平的
contract/包重组为领域导向的能力包(aicap/、authcap/、bizctxcap/、cachecap/、configcap/、dictcap/、filecap/、hostconfigcap/、i18ncap/、infracap/、jobcap/、manifestcap/、notifycap/、plugincap/、recordstore/、routecap/、sessioncap/、tenantcap/、usercap/)。每个包自行管理领域契约、宿主实现接口和动态插件桥接辅助逻辑,消除了跨领域耦合,使源码插件和动态插件的能力边界更加清晰。 -
动态插件 WASM AI 主机服务:扩展了动态插件
hostServices协议,支持完整的 AI 方法映射,使基于 WASM 的动态插件可以通过受治理的主机服务调用访问文本、图片、嵌入、音频、视觉、文档、安全和视频能力,具备方法级授权、payload 上限、资产引用和审计追踪。
功能改进
-
插件管理列表缓存:为插件管理列表新增预热和语言敏感的读模型缓存。缓存键包含语言、运行时包版本和插件运行时修订号,确保首个管理员请求复用热发现投影,并在插件或翻译变更时正确失效。
-
插件能力修订追踪:插件能力可用性现在与生命周期修订保持同步。在安装、启用、禁用或卸载转换后,内存中的启用快照从注册表刷新并发布运行时变更,确保能力提供者与当前状态对齐。
-
插件拓扑契约:引入
Topology接口用于插件运行时编排,支持集群模式下的主从节点语义和非集群部署的单节点回退。 -
平台治理守卫:集中化平台治理守卫,在生命周期、包管理、同步或配置变更操作执行前验证当前请求是否有权修改平台插件治理状态。
-
插件治理扫描器:新增
linactl plugins.check命令,扫描apps/lina-plugins/下的插件生产路径,检测宿主核心表生成、直接宿主存储访问、遗留主机服务声明和绕过领域能力的动态数据服务授权。支持文本和 JSON 输出格式。 -
数据库升级命令:新增
lina-core upgrade命令和linactl db.upgrade,在显式--confirm=upgrade安全确认后重放所有幂等宿主 SQL 资源。 -
版本发布命令:新增
linactl version命令,同步更新 metadata.yaml 中的framework.version并刷新 README 图片缓存参数,降低发布准备过程中的人工遗漏风险。 -
日志保留配置:新增受保护
sys_config参数支撑的运行时日志保留设置,提供受治理的最大日志保留天数。 -
Vben 前端参考技能:新增全面的 Vben 5 组件和框架参考技能,涵盖业务组件(alert、API 组件、drawer、form、modal、page、table)、通用组件(count-to、ellipsis-text)、核心模块(access、API、icons、locale、login、preferences、route、theme)、部署指南和功能文档。
-
OpenSpec 归档文档治理:实现归档文档治理和压缩策略,要求
openspec/specs作为当前能力契约的唯一事实来源,openspec/changes/archive用于历史上下文,并为跨分组重复出现的能力分配唯一归属。 -
插件主机服务协议增强:增强主机服务协议,新增类型化描述符、验证层、AI 编解码器支持和能力同步,提高宿主与插件运行时之间的一致性和可靠性。
-
插件 manifest 资源访问:统一插件的 manifest 资源访问,移除遗留的元数据处理,确保插件构建期间收集所有相关 manifest 文件。
-
配置原始访问服务:新增原始配置访问服务,支持直接检索
sys_config值,服务于需要未处理配置值的内部服务消费者。 -
会话协调服务:新增插件运行时会话协调服务,在插件生命周期事件中提供集中的会话状态管理。
-
社区协作技能:新增三个仓库级技能:
lina-community-issue-review用于自动化 GitHub Issue 分类和回复,lina-community-pr-review用于按项目规范进行代码审查,lina-community-release-changelog用于手动生成双语版本更新日志。 -
前端可展开表单:增强表单展开/折叠行为的过渡效果和操作按钮对齐。
-
E2E 测试覆盖:增强 E2E 质量审查规则,新增字典标签同步与标签页分页、仪表盘搜索折叠可见性、过期会话登出循环、插件主机服务授权和 API 文档本地化等测试场景。
-
插件子模块改进:所有官方插件获得专用的 Makefile 代码生成目标。移除了插件中对宿主表的直接 DAO 访问(登录日志、在线用户、内容通知、组织核心、租户核心),改用宿主提供的能力服务。
linapro-demo-dynamic插件新增 manifest 主机服务演示功能。
Bug 修复
-
HTTP 启动错误处理:将 HTTP 启动错误路径中的
logger.Panicf替换为logger.Errorf,在前端资源缺失或运行时初始化失败时避免进程崩溃,改为优雅的错误报告。 -
字典存储缓存同步:在字典存储中实现刷新机制,更新缓存选项时不替换数组引用,确保挂载的组件在添加、更新或删除操作后能看到最新的标签和样式。
-
标签页分页状态保持:调整内置菜单种子,为分页路由菜单启用缓存,在切换标签页时保持标签页分页状态。
-
manifest 资源收集:修复 manifest 资源收集逻辑,确保插件构建期间包含所有相关文件,改进了边界情况的测试覆盖。
-
插件卸载:优化插件卸载流程并增强状态恢复逻辑,更可靠地处理边界情况。
-
演示 URL 和徽章:更新 README 文件中的在线演示 URL 和许可证徽章,确保英文和中文版本的一致性。
-
Redis 集群冒烟脚本:更新 Redis 集群冒烟脚本,使用
db.init替代已移除的init目标。 -
测试错误处理:增强
expectSuccess测试辅助函数的错误处理,提供更好的调试输出。
开发体验与工具链
-
数据库命令重构:将数据库初始化命令从
make init重构为make db.init,涵盖所有规范文档、CI 工作流和 Makefile。新增linactl db.init和linactl db.mock显式子命令。 -
linactl 代码生成目标:增强
linactl ctrl和linactl dao以支持显式目标目录,提高插件和多模块项目的代码生成灵活性。 -
插件代码生成 Makefile:新增
hack/makefiles/plugin.codegen.mk,提供标准化的插件代码生成目标。 -
发布 Makefile:新增
hack/makefiles/release.mk,包含版本更新和发布准备目标。 -
CI 工作流更新:更新所有可复用 CI 工作流(后端单元测试、E2E 测试、仅宿主构建冒烟、Make 命令冒烟、插件命令冒烟、Redis 集群冒烟、Redis 集成测试),使用新的
db.init命令命名。 -
i18n 扫描增强:增强运行时 i18n 扫描器以检测前端翻译键使用情况,提高未翻译字符串的覆盖率。
-
WASM 构建器改进:增强 WASM 构建器的嵌入处理、manifest 处理、运行时支持和演示插件测试覆盖。
-
进程列表支持:为
linactl开发工具添加跨平台进程列表支持(Darwin 和 Linux)。 -
文档:为插件包(
pkg/plugin/README.md和README.zh-CN.md)添加全面的 README 文档,说明契约边界、目录结构和能力包职责。