@felan-ai/daemon

中文文档
0.7.11发布于 2026/11/13MITTypeScriptES Module构建来源已验证近 30 天下载 4840

Felan session daemon with configured service providers

原始使用文档
文档目录3 节
  1. Supported platforms
  2. Contracts and configuration
  3. Presentation and verification

Felan session daemon

@felan-ai/daemon owns the session server, admission, registry, canonical persistence and execution lifetime. It has no dependency on the Felan client or extension implementations. @felan-ai/felan supplies local providers, default configuration and clients, and installs the exact daemon version.

Importing this package does not start a daemon. A managing package launches the installed entrypoint with trusted configuration. Provider modules resolve from that installation, never from the working directory or project content.

Supported platforms

The native ownership backend supports macOS, glibc Linux and Windows on x64 and arm64. Other platforms or unavailable native backends fail closed with platform_blocked; there is no TCP or lease-lock fallback. Keep Koffi's optional platform packages when installing or bundling the daemon.

Windows uses the process token SID, exclusive-share file handles and secret-authenticated Node named pipes. The production endpoint file is <OS account profile>\AppData\Local\felan-daemon-v1\production\ipc-endpoint.json. The coordinator path does not follow HOME, USERPROFILE or LOCALAPPDATA overrides. Private path DACLs allow the account, SYSTEM and Administrators. The pipe retains Node's default DACL, so authentication depends on the private secret, not a same-SID pipe check. See ADR 0048 for residual access and impersonation risks.

Windows skips directory fsync, but retains file fsync. File replacements retry EPERM, EACCES and EBUSY for up to two seconds. Daemon startup defaults child-process windowsHide to true unless the caller sets it. Windows CI exercises x64 and arm64 under an elevated Administrator account; it does not cover a standard non-admin account or interactive console-window behavior. See native ownership for paths, failure codes and verification scope.

Contracts and configuration

  • . exports DAEMON_VERSION and the configured SESSION_RUNTIME_SERVICE.
  • ./version exports DAEMON_VERSION without loading session runtime contracts.
  • ./host-config exposes host configuration schemas, loading and trusted provider resolution for managing packages.
  • ./session-runtime describes session composition and host operations for configuration, preferences, setup and root preparation. Providers supply these operations and credential storage; the daemon retains admission and shutdown ownership.
  • ./provider describes trusted provider definitions, restricted execution ports, process adapters and shared storage/locking helpers.
  • ./client exposes authenticated local transport, target resolution and managed daemon launch. ./daemon-bootstrap supports managing entrypoints.
  • Internal subpaths, including registry, stores, persistence and the runtime UI translator, are not exported.

Local settings parsing, keychain credentials, model defaults, HTTP bootstrap, system prompt loading, folder trust and authentication workers belong to @felan-ai/felan providers, not the daemon package.

The old ./daemon-profile export is removed. Daemon 0.1.0 and protocol 0.2.0 are coordinated with Agent Core 0.13.0. They are not published by local verification. New npm packages still require the manual 0.0.0 bootstrap and trusted-publisher setup in the release procedure.

host.json selects providers, extensions and policy. Precedence is an explicit absolute path, the agent-directory file, then a packaged default supplied by the manager. The generic daemon has no implicit local provider configuration. On Windows, configuration trust checks the file's DACL rather than POSIX mode bits. Write grants outside the account, SYSTEM, Administrators and TrustedInstaller cause unsafe_host_config. Native security-descriptor read failures and unsupported ACEs propagate unsafe_path instead. Provider changes require restart. Session configuration and storage identities are checked on restore; changed or missing identities require explicit reload. Control state uses version 1. Invalid or unsupported data fails closed and is preserved for recovery; there is no automatic migration, reset or replay.

Stdio transports and their persistent readers are session infrastructure, not active work. Their consumers report in-flight requests through the runtime lifetime service. Idle transports do not prevent reload or eviction; the daemon still terminates them and joins their readers before releasing the session. Shell jobs and interactive terminals continue to block eviction while running.

Presentation and verification

Clients render the shared UI vocabulary. Optional renderer hints do not grant authority. Capabilities and trusted transport facts determine eligibility; client-kind labels do not. Host setup applies policy before local-console approval, and strict ACP execution policy remains independent of presentation.

The pinned Pi SDK transitively includes pi-tui; this package is not claimed to be terminal-free. Run tests through scripts/test-isolated.sh, which gives each run a fresh HOME, agent directory and TMPDIR.

版本与发布记录

@felan-ai/daemon 共发布 28 个版本,首次发布于 2026/10/20;过去 12 个月发布了 28 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.7.11latest2026/11/13今天
0.7.102026/11/131 天前
0.7.92026/11/131 天前
0.7.82026/11/122 天前
0.7.72026/11/104 天前
0.7.62026/11/095 天前

其他发布通道:bootstrap → 0.0.0。

关于 @felan-ai/daemon 的常见问题

@felan-ai/daemon 是什么?

Felan session daemon with configured service providers

如何安装 @felan-ai/daemon?

在项目目录运行 npm install @felan-ai/daemon,或使用 pnpm add / yarn add / bun add。

@felan-ai/daemon 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@felan-ai/daemon 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@felan-ai/daemon 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.19.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@felan-ai/daemon 可以商用吗?

@felan-ai/daemon 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@felan-ai/daemon 的下载量有多少?

根据 npm 官方下载统计,@felan-ai/daemon 在 2026/10/15 – 2026/11/13 这 30 天内被下载 4,840 次,日均约 161 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@felan-ai/daemon 还在维护吗?

最新版本 0.7.11 发布于 2026/11/13(今天);至今共发布 28 个版本,其中过去 12 个月发布了 28 个;首次发布于 2026/10/20。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。