LinaPro Release v0.3.0
Highlights
-
Plugin architecture consolidation: Restructured plugin service boundaries with clear separation between host plugin system private implementation (
internal/service/plugin) and public contracts (pkg/plugin). Introduced a stable facade pattern for the plugin root package, eliminating circular dependencies and improving code maintainability. The migration included static verification of import paths and removal of deprecated directories. -
Workspace and plugin route decoupling: Introduced a configurable default workspace entry path (
/admin) to prevent the root path from being occupied by the workspace SPA fallback. Source plugins can now register their own HTTP routes independently. Established a unified plugin API namespace/x/{plugin-id}/api/v1/...for both source and dynamic plugins, ensuring clear separation from non-API routes. -
External governance rules system: Introduced 14 dedicated rule files under
.agents/rules/covering API contracts, architecture, backend Go, cache consistency, data permissions, database, dev tooling, documentation, frontend UI, i18n, OpenSpec, plugin, and testing. These rules are now the single source of truth for their respective domains, with mandatory loading requirements defined inAGENTS.md. -
Zero-reflection WASM dispatcher: Enhanced the dynamic plugin runtime with a generated dispatcher that avoids runtime reflection and directly calls typed controllers. The dispatcher is generated during the WASM build process, ensuring type safety and improving execution performance.
Improvements
-
Plugin manifest lifecycle: Introduced plugin manifest resources supporting read-only access for plugins, with metadata reading and path safety enforcement. Enhanced the plugin runtime resource view to include configuration and manifest resources from active release artifacts.
-
Plugin management list caching: Implemented
PrewarmManagementListmethod to build the complete plugin management list read model, avoiding repeated scans. Added context-based manifest snapshots to optimize dependency resolution. -
Plugin source checkout caching: Implemented caching for plugin source checkouts in
temp/plugin-sources/<source>, reusing cached Git checkouts for installation and update operations instead of cloning repositories each time. -
Plugin resource data-scope filtering: Enhanced resource data-scope filtering with comprehensive unit tests, improving data access control for plugin resources.
-
Plugin page routing and sidebar menu: Enhanced plugin page routing and sidebar menu handling for improved visibility and accessibility, including authoritative state handling and menu filtering tests.
-
Plugin upgrade governance: Added requirements for dynamic plugin upgrade failure handling, ensuring old valid releases are retained and diagnostic information is logged. Runtime caches must not point to failed targets after upgrade failures.
-
Dynamic plugin runtime safety: Introduced per-plugin distributed locking for dynamic plugin coordinators in cluster mode. Enforced transactional consistency for plugin lifecycle SQL executions and migration logs. Implemented default resource boundaries (timeout and memory limits) for WASM executions.
-
API timestamp standardization: Standardized API response timestamps to Unix milliseconds across all models (SysConfig, DictData, DictType, FileInfo, JobRecord, JobLogRecord, etc.). Introduced
formatTimestamputility and governance rules for API response DTOs. -
API file naming normalization: Standardized API source file naming across modules (jobgroup, joblog, jobhandler, i18n, health, publicconfig, sysinfo) to follow consistent prefix conventions.
-
Upload size increase: Increased default upload size from 20MB to 100MB across configuration files, SQL seed data, and runtime parameters.
-
Workspace base path configuration: Updated workspace base path configuration to allow root path (
/) for dedicated admin domains while maintaining default as/admin. Reserved paths (/api,/x) remain protected. -
Frontend asset routing: Enhanced frontend asset routing and improved WASM output handling in linactl. Added
.gitkeepplaceholder for embedded frontend assets. -
Version update command: Added a version update command that changes
framework.versionand refreshes README image cache keys together, reducing manual release preparation errors. -
Plugin management table layout: Enhanced plugin management table layout with runtime state column and improved alignment for better visibility.
-
Plugin installation configuration: Added ability to specify plugin items for installation in
config.yaml, streamlining plugin setup. -
Session hot state requirements: Introduced session hot state requirements to maintain tenant and token dimensions, including client type consistency during login.
-
Tenant permission boundaries: Hardened tenant permission boundaries for config, dict, menu, role, cron job, and plugin management modules. Plugin lifecycle governance actions are restricted to platform context only.
Bug Fixes
-
Plugin status switch feedback: Optimistically update the plugin status switch while enable/disable requests are pending. Added per-plugin loading/disabled state to prevent duplicate status changes.
-
E2E test proxy configuration: Added frontend proxy backend origin to resolve API request mismatch in E2E tests.
-
CI workflow on pull requests: Fixed main CI workflow to run on pull requests in addition to pushes.
-
GitHub Actions dependencies: Updated GitHub Actions workflows to include necessary lina-core dependencies for plugin and make command smoke tests.
-
linactl port release: Enhanced port release handling during service restart to prevent port conflicts.
-
Default server port documentation: Updated default server port from 8080 to 9120 in various documentation and specs.
-
Dockerfile cleanup: Removed initialization and mock commands from Dockerfile to streamline container setup.
-
Plugin host service authorization: Enhanced host service specs to reject legacy runtime names, ensuring compliance with current standards.
Tooling and Experience
-
External rules loading governance: Introduced mandatory loading of external rules from
.agents/rules/*.mdinAGENTS.md. Defined scenarios for rule retention, execution phases, and handling missing or conflicting rules. -
OpenSpec monthly archive workflow: Implemented shared monthly OpenSpec auto-archive prompt execution for AI tool runtimes. Introduced fail-fast behavior to halt workflows immediately when auto-archive leaves active changes unarchived.
-
E2E test suite optimization: Split plugin-full CI job into five shards to optimize E2E testing runtime. Added proxy configuration and improved role management interactions in E2E tests.
-
Playwright environment setup: Introduced a new setup process that downloads only the Chromium headless shell, reducing initial setup time and download size.
-
linactl agent improvements: Standardized on lower-case variable names (
agent,action,force) in Makefile and documentation. Clarified agent name normalization and simplified resource path descriptions. -
Agents force option: Added force option for
make agentscommands to forcefully replace agent configurations. -
Go unit test optimization: Optimized Go unit test runtime by refining test execution strategy and reducing overhead.
-
Plugin CI sharding: Split plugin-full CI job into five shards to parallelize E2E testing and reduce overall runtime.
-
Monthly archive consolidation: Enhanced monthly OpenSpec archive workflow with snapshot and rollback capabilities for deterministic states.
主要亮点
-
插件架构整合:重构插件服务边界,将宿主插件系统私有实现(
internal/service/plugin)与公共契约(pkg/plugin)清晰分离。引入插件根包的稳定门面模式,消除循环依赖,提升代码可维护性。迁移过程包括导入路径的静态验证和废弃目录的清理。 -
工作台与插件路由解耦:引入可配置的默认工作台入口路径(
/admin),防止根路径被工作台 SPA 回退占用。源码插件现在可以独立注册自己的 HTTP 路由。为源码插件和动态插件建立了统一的插件 API 命名空间/x/{plugin-id}/api/v1/...,确保与非 API 路由的清晰分离。 -
外部治理规则体系:在
.agents/rules/下引入 14 个专用规则文件,覆盖 API 契约、架构、Go 后端、缓存一致性、数据权限、数据库、开发工具、文档、前端 UI、国际化、OpenSpec、插件和测试等领域。这些规则现在是各自领域的唯一事实来源,在AGENTS.md中定义了强制加载要求。 -
插件自有规范支持:插件可以声明自己的规范文件AGENTS.md,AI在开发插件时该规范文件的规则优先于全局项目规范。
-
零反射 WASM 调度器:通过生成的调度器增强动态插件运行时,避免运行时反射并直接调用类型化控制器。调度器在 WASM 构建过程中生成,确保类型安全并提升执行性能。
功能改进
-
插件清单生命周期:引入插件清单资源,支持插件的只读访问,包含元数据读取和路径安全检查。增强插件运行时资源视图,包含来自活动发布产物的配置和清单资源。
-
插件管理列表缓存:实现
PrewarmManagementList方法构建完整的插件管理列表读模型,避免重复扫描。添加基于上下文的清单快照以优化依赖解析。 -
插件源码检出缓存:在
temp/plugin-sources/<source>中实现插件源码检出缓存,在安装和更新操作中复用缓存的 Git 检出,而不是每次都克隆仓库。 -
插件资源数据作用域过滤:增强资源数据作用域过滤并添加全面的单元测试,改进插件资源的数据访问控制。
-
插件页面路由与侧边栏菜单:增强插件页面路由和侧边栏菜单处理,提升可见性和可访问性,包括权威状态处理和菜单过滤测试。
-
插件升级治理:添加动态插件升级失败处理要求,确保旧的有效发布被保留并记录诊断信息。运行时缓存不得在升级失败后指向失败目标。
-
动态插件运行时安全:为集群模式下的动态插件协调器引入逐插件分布式锁。对插件生命周期 SQL 执行和迁移日志强制事务一致性。为 WASM 执行实现默认资源边界(超时和内存限制)。
-
API 时间戳标准化:将所有模型(SysConfig、DictData、DictType、FileInfo、JobRecord、JobLogRecord 等)的 API 响应时间戳标准化为 Unix 毫秒。引入
formatTimestamp工具函数和 API 响应 DTO 的治理规则。 -
API 文件命名规范化:标准化各模块(jobgroup、joblog、jobhandler、i18n、health、publicconfig、sysinfo)的 API 源文件命名,遵循一致的前缀约定。
-
上传大小增加:将默认上传大小从 20MB 增加到 100MB,涉及配置文件、SQL 种子数据和运行时参数。
-
工作台基础路径配置:更新工作台基础路径配置,支持专用管理域名使用根路径(
/),同时保持默认为/admin。保留路径(/api、/x)仍受保护。 -
前端资产路由:增强前端资产路由并改进 linactl 中的 WASM 输出处理。为嵌入式前端资产添加
.gitkeep占位文件。 -
版本更新命令:添加版本更新命令,可同步修改
framework.version并刷新 README 图片缓存参数,降低发布准备过程中的人工遗漏风险。 -
插件管理表格布局:增强插件管理表格布局,添加运行时状态列并改进对齐方式,提升可见性。
-
插件安装配置:添加在
config.yaml中指定安装插件项的能力,简化插件设置流程。 -
会话热状态要求:引入会话热状态要求以维护租户和令牌维度,包括登录时的客户端类型一致性。
-
租户权限边界:加固配置、字典、菜单、角色、定时任务和插件管理模块的租户权限边界。插件生命周期治理操作仅限平台上下文。
Bug 修复
-
插件状态切换反馈:在启用/禁用请求待处理时乐观更新插件状态开关。添加逐插件加载/禁用状态以防止重复状态变更。
-
E2E 测试代理配置:添加前端代理后端源以解决 E2E 测试中的 API 请求不匹配问题。
-
CI 工作流拉取请求支持:修复主 CI 工作流,使其除推送外也在拉取请求上运行。
-
GitHub Actions 依赖:更新 GitHub Actions 工作流,包含插件和 make 命令冒烟测试所需的核心依赖。
-
linactl 端口释放:增强服务重启期间的端口释放处理,防止端口冲突。
-
默认服务器端口文档:在各种文档和规范中将默认服务器端口从 8080 更新为 9120。
-
Dockerfile 清理:从 Dockerfile 中移除初始化和模拟命令,简化容器设置。
-
插件宿主服务授权:增强宿主服务规范以拒绝旧版运行时名称,确保符合当前标准。
开发体验与工具链
-
外部规则加载治理:在
AGENTS.md中引入从.agents/rules/*.md强制加载外部规则的要求。定义规则保留、执行阶段以及处理缺失或冲突规则的场景。 -
OpenSpec 月度归档工作流:为 AI 工具运行时实现共享的月度 OpenSpec 自动归档提示执行。引入快速失败行为,在自动归档留下未归档活动变更时立即停止工作流。
-
E2E 测试套件优化:将插件完整 CI 作业拆分为五个分片以优化 E2E 测试运行时。在 E2E 测试中添加代理配置并改进角色管理交互。
-
Playwright 环境设置:引入新的设置流程,仅下载 Chromium 无头 shell,减少初始设置时间和下载大小。
-
linactl 代理改进:在 Makefile 和文档中标准化为小写变量名(
agent、action、force)。澄清代理名称规范化并简化资源路径描述。 -
agents 强制选项:为
make agents命令添加强制选项,可强制替换代理配置。 -
Go 单元测试优化:通过优化测试执行策略和减少开销来优化 Go 单元测试运行时。
-
插件 CI 分片:将插件完整 CI 作业拆分为五个分片以并行化 E2E 测试并减少总体运行时。
-
月度归档整合:通过快照和回滚能力增强月度 OpenSpec 归档工作流,确保确定性状态。