@forsion/calendar

中文文档
0.1.13发布于 2026/11/16UNLICENSEDES Module零依赖近 30 天下载 5438

Forsion core Calendar and Tasks: quick capture, scheduling, completion feedback and undo.

原始使用文档

Forsion Calendar and tasks

@forsion/calendar is Forsion’s core Calendar and Tasks plugin. Source repository access is private; the npm package contains the bundled renderer, Space recipes and notices. Requires Forsion 2.13.8-beta.3 or later with the public calendar record APIs.

  • Calendar keeps its existing native Space identity, saved layout, calendar settings and right-side task list. A dedicated Tasks Space uses the same task view and the native workspace sidebar. Mini uses the same renderer.
  • Task lists (Tasks Space, Calendar companion, Mini) hold tasks only: note checkboxes with a date, - [ ] … @todo note lines (Unscheduled, hosts from 2026-11-15) and rows of tables with a Done column. Dated note lines without a checkbox are events: they appear on the calendar and open a card there, not in the lists. Plain checkboxes without @ stay in the note.
  • Capture a task with Enter and keep typing. Dates are optional; text such as “tomorrow 3pm” supplies a date. Without a writable list, the first add explicitly creates an ordinary database under the plugin’s working folder. There is no separate task database format or parallel task store.
  • Completion gives immediate visual feedback, a short in-place pause and an eight-second Undo action. Native mobile hosts request one system tick for an accepted completion; undo and data refreshes stay silent. Touch feedback can be turned off in the task menu. System preferences still apply. Desktop and browser hosts do not pretend to vibrate.
  • Event menus, record copy/paste, conditional undo/redo and complete note/record copies use the host’s public calendar.events API. Field editing uses the real ui.mountRecord editor. Calendar/Todo data comes from databases, noteTasks and calendar; no host runtime imports are used.
  • The host pins the npm version in desktop/package.json, seeds it through builtinBundles.json, classifies it through CORE_BUNDLE_IDS and checks npm updates through the existing core updater. Android bundles the same npm renderer; a newer compatible installed version takes precedence. It is not a marketplace entry.
  • skills/calendar-todos/SKILL.md ships in the package. The local Agent engine scans an installed plugin's skills/ folder, so the Agent learns that the user's to-dos are rows of their calendar (default human://CALENDAR.db), may have no date, and are added and ticked with the amadeus_* calendar tools — never written as a note. Cloud sessions don't load plugin skills; there the calendar tool definitions carry the same three facts.

Development

npm ci
npm run typecheck
npm run check:all-day # Real plugin entry: timed/all-day transitions, remounts, task/date-marker source semantics
npm test            # 先 build,再跑单测(含按宿主装法跑 main.js 的入口测试)
npm run install:dev # 装进 ~/.forsion-dev/plugins/forsion-calendar

All-day visibility against the real desktop host: build this plugin and Genesis desktop, then run GENESIS_DESKTOP_DIR=/absolute/path/to/Forsion-Genesis/desktop npm run check:all-day:gui. The isolated fixture includes a checkbox-backed calendar and checks timed/all-day transitions and reloads without editing user data.

Note items in the lists and on the calendar: after building this plugin and Genesis desktop, run GENESIS_DESKTOP_DIR=/absolute/path/to/Forsion-Genesis/desktop npm run check:note-items:gui. The isolated fixture checks that dated note events stay off the Tasks Space, Calendar companion and Mini while note tasks stay in them, source filters, completion undo, date-only Markdown changes, and that events remain on the calendar after reload. Screenshots and report.json default to /tmp/forsion-calendar-note-items; set CALENDAR_NOTE_ITEMS_ARTIFACT_DIR to retain another run. Set CALENDAR_PLUGIN_DIR to the 0.1.9 release checkout for the expected-failing visibility baseline.

事件详情 / 草稿浮层定位回归:先构建插件与 Genesis desktop,再运行 GENESIS_DESKTOP_DIR=/absolute/path/to/Forsion-Genesis/desktop npm run check:card-placement。 使用隔离 home,在主窗口和独立日历窗口检查真实卡高、滚动、80% / 100% / 120% 缩放与窗口尺寸变化; 检查覆盖主窗 / 独立窗的实际卡片高度、滚动、缩放、分隔线命中,以及切换 View 后浮层隐藏与清理。 截图和 report.json 默认输出到系统临时目录 forsion-calendar-card-placement。

待办输入框 × 宿主版本(真 Electron,隔离 home):先在一份 Genesis 检出里 cd desktop && npm run build,再跑 node scripts/todo-dock.check.cjs <那份检出>/desktop --host old|new。old = 没有 addColumn / chatBoxCapabilities 的宿主 (如 v2.13.8-beta.3),new = 都有。加 --plugin <旧版目录> 跑负对照,应该挂。

主页小组件(今天 / 待办)× 宿主(真 Electron):先 npm run build,在 Genesis 检出的 desktop 里 npx electron-vite build,再跑 CALENDAR_PLUGIN_DIR=<本检出> node scripts/home-widgets.check.cjs(台架把本检出以 99.0.0 装进临时家目录,免得被随包的旧版顶掉)。

npm pack --pack-destination artifacts prepares the release archive. Publishing to npm requires explicit approval of the package version. Preparing an archive or pushing a feature branch does not publish it.

版本与发布记录

@forsion/calendar 共发布 15 个版本,首次发布于 2026/10/21;过去 12 个月发布了 15 个版本。

版本发布日期距今
0.1.13latest2026/11/16今天
0.1.122026/11/15今天
0.1.112026/11/132 天前
0.1.102026/11/132 天前
0.1.92026/11/133 天前
0.1.82026/11/087 天前

关于 @forsion/calendar 的常见问题

@forsion/calendar 是什么?

Forsion core Calendar and Tasks: quick capture, scheduling, completion feedback and undo.

如何安装 @forsion/calendar?

在项目目录运行 npm install @forsion/calendar,或使用 pnpm add / yarn add / bun add。

@forsion/calendar 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/forsion__calendar 是否存在。

@forsion/calendar 支持 ESM 还是 CommonJS?

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

@forsion/calendar 可以商用吗?

@forsion/calendar 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@forsion/calendar 的下载量有多少?

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

@forsion/calendar 还在维护吗?

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