Skip to content

Releases

Kairos 1.1.0 — kairos-lang 1.1.0 · kairos-lang-mcp 1.1.0

Choose a tag to compare

@azathothx azathothx released this 04 Nov 01:02

Kairos 1.1.0 — 1.1 の追加拡張です。1.0 は凍結のまま——1.0 で合法だった式の意味は変わりません(新語 3 つと同名の束縛とラベル名を除く。1.0.12 系の最終スイート 880 本は無変更で緑)。新語 3 つと受理拡大 1 つ。参照実装と MCP の堅牢化で、1.0.12 で通っていた形のうち 1.1.0 で止まるものは下に列挙しました。

npm: kairos-lang 1.1.0 · kairos-lang-mcp 1.1.0 · MCP: npx -y kairos-lang-mcp@1.1.0

変更点

  • labelOrdinal(B, x)(core・射影一族の第 4 語)。束縛 B が宣言した値域(external の labels:・cycle・segmentBy の labels: cycle)の中で、ラベル x が第何番目かを返します(1 起点・宣言順)。
    点形 labelOrdinal(B, d) は labelOrdinal(B, B(d))。値域の外は明示エラー——三項のネストが黙って吸っていた値が止まります。everyDay |> filter(d => labelOrdinal(weekday, d) == 7) で日曜。
    リファレンス・ADR-54。
  • 時点どうしの順序比較。< <= > >= を、数値どうしに加えて時点どうしにも定義しました(1.0 では評価エラーだった形の合法化)。順序は chronos 上の瞬間の全順序で、単位を持ちません。
    型違いは両辺の型名で診断し、単独時刻は錨の明示へ、ラベルは labelOrdinal へ案内します。ADR-55。
    型違いの順序比較は 1.0 でも止まっていた形で、1.1 では診断の文言だけが誘導つきに変わります(1.0 の「数値ではない: point」など。終了コードは不変)。
  • since(p)/before(p)(stdlib 糖衣・Gregorian 公開語)。点集合を「p 以後(含む)」「p より前(含まず)」に切り出します=半開 [since, before)。展開は filter 1 段で、整列・窓・註釈はそのまま通ります。
    「締め切りまでの残り営業時間」は hourly |> filter(t => isOpen(t)) |> since(今) |> before(締め切り)——Playground に同じ例を置きました。
    since・before。
  • 予約語。labelOrdinal・since・before と同名の利用側 top-level 束縛と、これらをラベル名(cycle のラベル列・labels:)に使う定義は、改名を案内する静的エラーになります。premise ブロック内・派生 with の同名束縛は、since/before は従来どおり利用側が勝ち、core 語の labelOrdinal はそこでも静的エラーです(spec §4.8)。
  • 参照実装と MCP の堅牢化(言語不変。1.0.12 で通っていた次の形は 1.1.0 で止まります): (a) 窓列を点列に読む・split・span の全窓は上限 2^24 窓(紀元からの窓数で数える=chronos grid 60s を点列として全列挙する形は止まる。within 経由は軽い)・(b) strideBy の点列は上限 2^26(strideBy(1s) は 1 日の範囲で通る)・(c) 実在しない日付の --from/--to(2026-02-30 は 03-02 と読まれていた)は「日付が実在しない」・(d) 年 0000〜0099 の日付(1900 年代に読まれていた)は評価範囲の下限で止まる・(e) Gregorian with {…}・@Gregorian の下の at(2026-01-01T09:00)(日付つきの錨)と窓付き入力は calendar-system: 形と同じ at: の誘導で止まる・(f) MCP は tz を IANA 名・"±HH:MM"・"UTC" に限り、from/to の実在と 1 つの source の本体式 100 個の上限を検査し、引数の形の誤りは MCP エラー -32602 で返す。詳細は CHANGELOG の 1.1 節。
  • サイト: カレンダーページ /calendar/——暮らしの予定 5 本を穴埋めで決め、月めくりで見て、印刷するか .ics で取り込む。式は裏で組み(折りたたみで見える)、Playground と同じ評価器がブラウザの中で計算する(サーバー送信なし)。Playground と往復。共有 URL の形(#s=…&f=…&t=…&z=…)は公開の約束として recipes/README に明記。
  • 変わらないもの: 字句・文法(EBNF)・輸送表・整列表・供給契約(--supply・JSON Schema)・--json/--tsv/.ics/MCP の出力の形。MCP には新語 3 ページのリファレンスを同梱しました。

テスト: 981(1.0.12 系の最終スイート 880 に 101 本を加えた=新語の witness 56・doctest 12〈labelOrdinal 3・since/before 5・記述スキル 4〉・機械レビュー〈2026-10-29・10-30〉の所見の witness 10・カレンダーページの witness 6・殻のセキュリティレビュー〈10-31〉の所見の witness 2・ほか 15 本〈at の名指し検査の 9 本など 1.0.12 公開後の修正の witness と検査〉。内訳は CHANGELOG 1.1 節「テスト」)。導入: npm i -g kairos-lang@1.1.0


Kairos 1.1.0 — additive extensions. 1.0 stays frozen: every expression that was legal in 1.0 keeps its meaning (except a binding or a label named like one of the three new words; the 880 tests of the final 1.0.12-line suite pass unchanged). Three new words and one widened acceptance. The hardening of the reference implementation and the MCP server stops a few forms that 1.0.12 accepted — listed below.

npm: kairos-lang 1.1.0 · kairos-lang-mcp 1.1.0 · MCP: npx -y kairos-lang-mcp@1.1.0

  • labelOrdinal(B, x) (core; the fourth projection). The 1-based position of label x in the declared value domain of binding B (external with labels:, a cycle, or segmentBy with labels: cycle).
    The point form labelOrdinal(B, d) is labelOrdinal(B, B(d)). A value outside the domain is an explicit error — the nested ternary used to swallow it. everyDay |> filter(d => labelOrdinal(weekday, d) == 7) picks Sundays.
    Reference · ADR-54.
  • Ordering between instants. <, <=, >, >= are now defined between instants as well as between numbers (an evaluation error in 1.0): a total order on chronos, unit-free.
    Mixed types are diagnosed with both type names; a bare time of day is steered to an explicit anchor, labels to labelOrdinal. ADR-55.
    A mixed-type ordering comparison already failed in 1.0; 1.1 only changes the wording of the diagnostic (1.0 said e.g. "not a number: point"; the exit code is unchanged).
  • since(p) / before(p) (stdlib sugar, Gregorian). Keep the points at or after p / strictly before p: the half-open [since, before), one filter stage, so alignment, windows and annotations pass through.
    "Business hours left until a deadline" is hourly |> filter(t => isOpen(t)) |> since(now) |> before(deadline) — the Playground has it as an example.
    since · before.
  • Reserved words. A top-level binding named labelOrdinal, since or before — or a label with one of those names (a cycle label list, labels:) — is a static error that suggests renaming. Inside a premise block or a derived with, since/before behave as before (the consumer's definition wins); labelOrdinal is a core word and is a static error there too (spec §4.8).
  • Hardening of the reference implementation and MCP (the language is unchanged; these forms passed on 1.0.12 and stop on 1.1.0): (a) enumerating every window of a fine elapsed-time grid (reading a window list as points, split, span) is capped at 2^24 windows counted from the epoch — chronos grid 60s enumerated as points stops, while going through within stays cheap; (b) strideBy point lists are capped at 2^26 (strideBy(1s) over one day still passes); (c) a non-existent --from/--to date (2026-02-30 used to be read as 03-02) stops with "日付が実在しない"; (d) years 0000–0099 (used to be read as the 1900s) stop at the evaluation-range floor; (e) under Gregorian with {…} or @Gregorian, at(2026-01-01T09:00) (a dated anchor) and windowed input stop with the same at: guidance as the calendar-system: form; (f) MCP: tz accepts IANA names, "±HH:MM" and "UTC" only, from/to must be real dates, at most 100 body expressions per source, and a malformed argument comes back as MCP error -32602. Details in the 1.1 section of spec/CHANGELOG.md (Japanese).
  • Site: a calendar page, /en/calendar/ — fill in one of five everyday schedules, see it month by month, print it or import it as .ics. The expression is assembled behind the page (visible in a fold) and evaluated in the browser by the same evaluator as the Playground (nothing leaves the browser); round-trips with the Playground. The shape of a shared URL (#s=…&f=…&t=…&z=…) is a published commitment, written down in the recipes README.
  • Unchanged: lexis, grammar (EBNF), the transport and alignment tables, the supply contract (--supply, JSON Schema), and the shape of --json/--tsv/.ics/MCP output. The MCP package bundles the three new reference pages.

Tests: 981 — 101 added to the 880 of the final 1.0.12-line suite: 56 witnesses and 12 doctests for the new words (3 labelOrdinal, 5 since/before, 4 authoring skill), 10 witnesses from the 2026-10-29 and 2026-10-30 machine reviews, 6 for the calendar page, 2 from the 2026-10-31 security review of the shells, and 15 more (witnesses and checks for fixes made after the 1.0.12 release, e.g. the 9 for the at check). The breakdown is in the "テスト" part of the 1.1 section of the CHANGELOG. Upgrade: npm i -g kairos-lang@1.1.0. MCP: npx -y kairos-lang-mcp@1.1.0.

Kairos 1.0.12 — kairos-lang 1.0.12 · kairos-lang-mcp 1.0.12

Choose a tag to compare

@azathothx azathothx released this 26 Oct 00:00

Kairos 1.0.12 — 追補 29。言語は不変です。参照実装の 5 点の改善をまとめました。

npm: kairos-lang 1.0.12 · kairos-lang-mcp 1.0.12

変更点

  • 結果の出口にラベル。定義が参照するラベル付きの表(external の labels:・cycle・segmentBy の labels:)が 1 つのとき、結果の各点にそのラベルを添えます。
    --json は results[].labels(dates と並行・無い点は null・追加のみ)、--tsv は 8 列目 label、.ics は予定の題が「名前 · ラベル」になります(UID は不変)。MCP も同じ報告です。
    二十四節気や六曜の表をそのまま評価すると、カレンダーに「立春」「大安」が出ます。
  • 範囲外シグナルの構築を軽く。at 展開が覆域外の点を多数評価する形で、内部シグナルの構築が支配項でした。構築の間だけスタック採取を止め、出力は同じまま 2〜3 倍速くなります。
  • next の警告。確定再評価が自ら出していた window-clip 警告(利用者には直せない種類)を報告しません。値・残走路・終了コードは不変です。
  • .ics の註釈だけの範囲。評価範囲が丸ごと表の外(点 0・範囲外註釈あり)でも、註釈の予定だけの .ics を書き出して終了コード 0 にします。点も註釈も 0 のときだけ従来どおり書かずに 2。
  • 文言と文書の揃え。残走路の起点(covering 末尾の翌日 0 時=排他端)・範囲外註釈が表の最終日から始まる機序(shift(-1) と roll(Following) の像の和)・asof 欠落の診断 2 文言を witness で固定・終了コードの要約。
  • タグライン。README・サイト・Playground・npm の説明に「決めたら、いつでも。/Write the rule once; list the dates.」を掲げました。

テスト: 862。導入: npm i -g kairos-lang@1.0.12


Kairos 1.0.12 — addendum 29: labels in the output, a faster out-of-coverage path, a quieter next, annotation-only .ics, and wording fixes. The language is unchanged.

  • Labels in the output. When a definition refers to exactly one labeled table (external with labels:, cycle, or segmentBy with labels:), each resulting point carries its label:
    --json gets results[].labels (parallel to dates, null where there is none; additive), --tsv gets an eighth column label, and .ics event titles become "name · label" (UIDs unchanged). MCP returns the same report.
    Evaluate a solar-term or rokuyō table and the calendar shows "立春" or "大安".
  • Cheaper out-of-coverage signals. The at expansion evaluates many points outside coverage; building the internal signal dominated. Stack capture is now suspended during construction — same output, 2–3× faster.
  • A quieter next. The confirmation pass no longer reports the window-clip warning it provoked itself (a kind the user could not act on). Values, runway and exit codes are unchanged.
  • Annotation-only .ics. When the whole range lies outside the table (no points, an out-of-coverage annotation), the .ics is written with the annotation event and exit code 0. Only when there are neither points nor annotations does it skip the file with exit code 2, as before.
  • Wording and docs. Runway origin (the day after the covering end, exclusive), why an annotation starts on the table's last day, both "missing asof" diagnostics pinned by witnesses, exit-code summary.
  • Tagline. The README, the site, the Playground and the npm descriptions now carry “決めたら、いつでも。/Write the rule once; list the dates.”

Tests: 862. Upgrade: npm i -g kairos-lang@1.0.12. MCP: npx -y kairos-lang-mcp@1.0.12.


Windows 単体版: kairos-1.0.12-win-x64.zip(exe と README・SHA256 は .sha256)を公開 workflow が組んで添付しました。nodejs.org の Node v24.22.1(win-x64)に CLI を組み込み、
参照実装と出力が一致することを Windows 上で確かめてあります。署名はありません。使い方は Windows 管理者のための Kairos。

Windows standalone: kairos-1.0.12-win-x64.zip (exe + README; SHA256 in .sha256) was built and attached by the publish workflow — Node v24.22.1 (win-x64) from nodejs.org with the CLI
embedded, verified on Windows to produce the same output as the reference implementation. Unsigned. Guide: Kairos for Windows administrators.

zip SHA256: 6eabea0398b9bba606303ec300c0ad79a0dce33011cf819745af0746892b41ed

Kairos 1.0.11 — kairos-lang 1.0.11 · kairos-lang-mcp 1.0.11

Choose a tag to compare

@azathothx azathothx released this 19 Oct 01:31

Kairos 1.0.11 — 追補 28。言語は不変です。

npm: kairos-lang 1.0.11 · kairos-lang-mcp 1.0.11

変更点

  • --json の error.kind: 供給の解決値が契約を破る違反を supply に分類します。これまでは評価の途中で割れるため static(定義の誤り)に落ちていました。
    • 対象は評価器の契約検査が割るもの全部です: 昇順・重複なし、covering の包含、labels の同長と宣言値域、kind: dates/instants の形、covering/asof の欠落。
    • 変わらないもの: usage と static の範囲、メッセージの文言(「契約違反: …」)、終了コード 1。schema/cli-report.schema.json の説明文(supply: the supply contract (external) was violated)に実装が揃った形です。
    • 理由: 供給側が「自分のデータが悪い」と「定義が悪い」を kind で見分けられるように。発報層プロファイル(付録 A の A.4)の「supply では止めず劣化運転」が、契約違反のデータでも効きます。
    • MCP サーバ(kairos_list/kairos_next)は同じ関数を使うので、kairos-lang-mcp でも揃います。
  • Windows 単体版を CI が組みます。npm 公開の後に、nodejs.org の node.exe(SHASUMS256.txt で照合)に CLI を組み込み、参照実装と出力が一致することを Windows 上で確かめてから、kairos-1.0.11-win-x64.zip(exe と README・SHA256 は .sha256)をこの Release に添付します。1.0.10 では手作業でした。署名はありません。使い方は Windows 管理者のための Kairos。
  • MCP サーバの同梱 reference(resources で配る文書)の相対リンクと画像を、公開サイトの絶対 URL に書き換えて同梱します。文書だけを受け取ったクライアントでも参照先が切れません。README に公式 MCP Registry(io.github.azathothx/kairos-lang-mcp)への登録済みの 1 行。
  • 開発依存の更新(vitest 5・@types/node・esbuild・zod)と CI の actions の版上げ。配布物に影響はありません。

テスト: 827。導入: npm i -g kairos-lang@1.0.11


Kairos 1.0.11 — addendum 28: error.kind reports supply-contract violations as supply, the Windows standalone is now built by CI, and the MCP server's bundled reference uses absolute links. The language is unchanged.

  • error.kind in --json: violations of the supply contract by resolved values are now classified as supply. They used to surface as static (a defect in the definition) because they were caught in the middle of evaluation.
    • Covered: everything the evaluator's contract checks reject — ascending order and no duplicates, containment in covering, labels of the same length and within the declared domain, the shape of kind: dates/instants, and a missing covering/asof.
    • Unchanged: the scope of usage and static, the message text ("契約違反: …"), and exit code 1. The implementation now matches the description in schema/cli-report.schema.json (supply: the supply contract (external) was violated).
    • Why: a supplier could not tell "my data is wrong" from "the definition is wrong" by kind. The firing-layer profile's rule (appendix A, A.4: degrade on supply, do not stop) now applies to contract-violating data as well.
    • The MCP server (kairos_list/kairos_next) uses the same function, so kairos-lang-mcp follows.
  • The Windows standalone is built by CI. After the npm publish, a Windows runner embeds the CLI into node.exe from nodejs.org (verified against SHASUMS256.txt), checks on Windows that the output is byte-identical to the reference implementation, and attaches kairos-1.0.11-win-x64.zip (exe + README; SHA256 in .sha256) to this release. 1.0.10 was assembled by hand. Unsigned. Guide: Kairos for Windows administrators.
  • The MCP server's bundled reference (the documents served as resources) now carries absolute links and image URLs pointing at the public site, so a client that receives only the document does not lose its references. The README notes the listing in the official MCP Registry (io.github.azathothx/kairos-lang-mcp).
  • Dev-dependency updates (vitest 5, @types/node, esbuild, zod) and newer CI actions. Nothing in the published packages changes because of them.

Tests: 827 (4 witnesses for error.kind: unsorted values, a point outside covering, a labels length mismatch, an undeclared label — each goes red on the pre-addendum implementation).

Upgrade: npm i -g kairos-lang@1.0.11 (or npx kairos-lang@1.0.11 …). MCP: npx -y kairos-lang-mcp@1.0.11.


Windows 単体版: kairos-1.0.11-win-x64.zip(exe と README・SHA256 は .sha256)を公開 workflow が組んで添付しました。nodejs.org の Node v24.21.0(win-x64)に CLI を組み込み、
参照実装と出力が一致することを Windows 上で確かめてあります。署名はありません。使い方は Windows 管理者のための Kairos。

Windows standalone: kairos-1.0.11-win-x64.zip (exe + README; SHA256 in .sha256) was built and attached by the publish workflow — Node v24.21.0 (win-x64) from nodejs.org with the CLI
embedded, verified on Windows to produce the same output as the reference implementation. Unsigned. Guide: Kairos for Windows administrators.

zip SHA256: 4c046dac994c75d3d81f4483f6a1f8b656b70667c0036a70f41cefbf0f4a166b

Kairos 1.0.10 — kairos-lang 1.0.10 · kairos-lang-mcp 1.0.10

Choose a tag to compare

@azathothx azathothx released this 16 Oct 02:30

Kairos 1.0.10 — 追補 27。言語は不変です。

npm: kairos-lang 1.0.10 · kairos-lang-mcp 1.0.10

変更点

  • CLI に --tsv。list/next の結果を、1 点 1 行のタブ区切りで書き出します。Excel の利用者と、PowerShell や VBA から CLI を叩いて行単位で読む Windows 管理者向けの出力の橋です。
    • 列は固定順の 7 つ: expr(式の番号・1 起点)・source(式の字面)・uid(--json の results[].uid と同じ値)・date(YYYY-MM-DD)・time(時刻。日粒度の点は空)・epoch_ms(点の同一性)・note(その点が範囲外の区間に入るときの註釈文。無ければ空)。
    • 日付と時刻を分けているのは、Excel がそのまま日付型・時刻型に読むためです。DST の重複する時刻はオフセット込みで書きます(01:30-04:00)。
    • stdout に出るのは見出し行と点の行だけです。被覆サマリ・区間註釈・警告・# explain:・0 点の知らせは stderr に出ます(# で始まる行を Excel や Import-Csv が行として読んでしまうため)。0 点は見出し行だけで終了コード 0(list)。
    • --json・--ics・--ics-series とは排他です。--lang en は行に影響しません。UTF-8・BOM なし・クォートなし。
    • 読み方(Excel「データ→テキストまたは CSV から」・PowerShell の Import-Csv -Delimiter "`t" -Encoding utf8・VBA)は impl/README.md の --tsv 節に。
  • MCP サーバに登録簿の名札。kairos-lang-mcp の package.json に mcpName(io.github.azathothx/kairos-lang-mcp)を載せ、mcp/server.json を置きました。公式 MCP Registry(registry.modelcontextprotocol.io)への登録に使う名札です。tool の動作は変わりません。
  • npm への公開を GitHub Actions から(今回が初回)。kairos-lang と kairos-lang-mcp は、タグを打った commit から CI が組んで公開し、来歴(provenance)が付きます。npm のページの Provenance 欄で、どの commit とどのワークフローから作られたかを確かめられます(npm view kairos-lang@1.0.10 dist.attestations)。
  • Issue フォーム。参照実装(CLI・npm)・MCP サーバ・仕様/文書の 3 本を用意しました(日英併記)。再現に要る項目(定義・評価範囲・tz)が最初から入っています。

テスト: 816。導入: npm i -g kairos-lang@1.0.10


Kairos 1.0.10 — addendum 27: a tabular export for Excel and PowerShell, a registry name for the MCP server, and npm packages built and signed on GitHub Actions. The language is unchanged.

  • --tsv in the CLI. list and next can now write their results as tab-separated lines, one point per line — a bridge for Excel users and for Windows administrators who call the CLI from PowerShell or VBA and read it line by line.
    • Seven columns in a fixed order: expr (1-based index of the expression), source (its text), uid (the same value as results[].uid in --json), date (YYYY-MM-DD), time (empty for day-granular points), epoch_ms (the point's identity) and note (the annotation text when the point falls in an out-of-coverage interval; empty otherwise).
    • Date and time are separate columns so that Excel reads them as date and time cells as they are. A time in a DST overlap carries its offset (01:30-04:00).
    • Only the header and the point lines reach stdout. The coverage summary, interval annotations, warnings, # explain: lines and the "no points" notice go to stderr, because Excel and Import-Csv would otherwise read a # line as a row. Zero points means a header-only file and exit code 0 for list.
    • Exclusive with --json, --ics and --ics-series. --lang en does not change the rows. UTF-8, no BOM, no quoting.
    • How to read it (Excel "Data > From Text/CSV", PowerShell Import-Csv -Delimiter "`t" -Encoding utf8, VBA) is in the --tsv section of impl/README.md.
  • A registry name for the MCP server. kairos-lang-mcp now carries mcpName (io.github.azathothx/kairos-lang-mcp) in its package.json, and mcp/server.json describes the server for the official MCP Registry (registry.modelcontextprotocol.io). The tools behave as before.
  • Packages published from GitHub Actions (first time). kairos-lang and kairos-lang-mcp are built and published by CI from the tagged commit, with provenance attached. The Provenance panel on each npm page names the source commit and the workflow that built it (npm view kairos-lang@1.0.10 dist.attestations).
  • Issue forms. Three forms — reference implementation (CLI, npm), MCP server, and spec/docs — in Japanese and English, with the fields a reproduction needs (definition, range, tz) already in place.

Tests: 816 (30 witnesses for --tsv: 15 unit tests over the renderer and 15 end-to-end runs checking the stdout/stderr split and exit codes; each mutated to confirm it goes red).

Upgrade: npm i -g kairos-lang@1.0.10 (or npx kairos-lang@1.0.10 list --tsv …). MCP: npx -y kairos-lang-mcp@1.0.10.


Windows 単体版(2026-10-16 追加): Node.js を入れずに動く kairos.exe を添付しました。kairos-1.0.10-win-x64.zip(exe と README・SHA256 は .sha256)。
nodejs.org の Node v24.16.0(win-x64)に CLI を組み込んだもので、npm の kairos-lang@1.0.10 と同一のソースから作成(出力バイト一致を実測)。署名はありません。
ダウンロード直後の初回だけ SmartScreen の警告が出ることがあります。使い方は Windows 管理者のための Kairos。

Windows standalone (added 2026-10-16): kairos.exe runs without installing Node.js. kairos-1.0.10-win-x64.zip (exe + README; SHA256 in .sha256).
Node v24.16.0 (win-x64) from nodejs.org with the CLI embedded, built from the same source as npm kairos-lang@1.0.10 (byte-identical output verified). Unsigned;
SmartScreen may warn once after download. Guide: Kairos for Windows administrators.

zip SHA256: 95d793a2350712db4330e3f66df3ff7da7faaec18ad10206e86a127dc7e678d4

Kairos 1.0.9

Choose a tag to compare

@azathothx azathothx released this 09 Oct 15:55

Kairos 1.0.9 — 追補 26。言語は不変です。

変更点

  • --json に results[].uid。式ごとの指紋(FNV-1a 64・12 桁の hex)を kairos-<指紋>-series@kairos-lang.org の形で返します。--ics-series が書く繰り返し予定の UID と同じ値です。1 点ずつの UID は -series@ を -<ms>@ に置き換えた形です。
    • 用途: .ics を経由しないアプリが、同じ鍵で自分の予定を作り直せます。取り込み側の RDATE の扱いに依存しません。
    • 注意: 指紋であって同一性ではありません。式の字面・ファイル内の順番・tz のどれかを変えると別の値になります。アプリは自前の記録 id を正にしてください。
    • JSON Schema に必須項目 uid を追加しました。追加のみで後方互換ですが、additionalProperties: false で検証している場合は schema の更新が要ります。
  • Playground の例の祝日表を 2027 年まで延長。日本は内閣府の一覧(3/22 の休日を含む)、米国は OPM の observed の日付です。暮らしの例が年末年始をまたいでも ⚠ が出ません。
    • 表を延ばしても書き出した予定の UID は変わりません(鍵は表でなく式から決まります)。取り込み直しは更新になります。
    • 表が尽きる 88 日前に赤になる検査を足し、毎月 1 日に自動で走らせます。
    • CLI の例(impl/examples)は 2026 年の表のままです。表が尽きたときの ⚠ を見せるためです。

テスト: 783。導入: npm i -g kairos-lang@1.0.9


Kairos 1.0.9 — addendum 26: an identity key in --json, and the Playground's holiday tables extended through 2027. The language is unchanged.

  • results[].uid in --json. Each expression's result now carries a fingerprint: FNV-1a 64 over the expression's index in the file, its source text and the report's tz, as 12 hex digits in the form kairos-<key>-series@kairos-lang.org — identical to the UID of the expression's recurring VEVENT in --ics-series. In the one-event-per-point form (--ics) each point's UID is this value with -series@ replaced by -<ms>@; annotation events use -ann-<fromMs>-<toMs>@. A calendar app that embeds Kairos can create and update its own events from the JSON without going through .ics, and without depending on how a particular importer reads RDATE (the lesson of 1.0.8). It is a fingerprint, not a durable identity: editing the expression text, its order in the file or the tz yields a new value — keep your own record id and use uid to tell "same definition". The JSON Schema (schema/cli-report.schema.json) gains a required uid; the change is additive, but validators that enforce additionalProperties: false need the updated schema. The MCP server's reports carry the field too.
  • Playground examples carry 2027 holidays. The Japanese tables (Cabinet Office list, including the 3/22 substitute holiday) and the US federal table (OPM observed dates) now cover 2026–2027, so the everyday examples keep working across New Year without ⚠ annotations. The source is noted in each premise. Exported UIDs do not change — they depend on the expression, not the table — so re-importing a regenerated file updates in place. A freshness witness turns red 88 days before a table runs out, and a monthly workflow runs it even when nothing is pushed. The CLI examples under impl/examples keep their 2026-only tables on purpose: they show what "the table ran out" looks like.

Tests: 783 (two witnesses for uid — cross-checked against all three UID forms in .ics, and determinism/ordering/tz — plus two for the holiday tables; each mutated to confirm it goes red).

Upgrade: npm i -g kairos-lang@1.0.9 (or npx kairos-lang@1.0.9 list --json …).

Kairos 1.0.8

Choose a tag to compare

@azathothx azathothx released this 08 Oct 01:16

Kairos 1.0.8 — addendum 25: calendar-export fixes from the first day in the field. The language is unchanged.

What the 1.0.7 field test with Google Calendar (web on a PC, and the Google Calendar app on Android, 2026-10-08) taught us, and what changed:

  • Line folding never splits an escape sequence. The 75-octet folding no longer separates a \ from the character it escapes (no physical line ends in an odd number of backslashes). RFC 5545 allows folding anywhere; this is for the benefit of less tolerant importers.
  • Re-importing the same UID updates the event. Observed on Google Calendar (web): importing a regenerated series file with a longer range adds the new occurrences without duplicating anything, and re-importing after deleting works too. The 1.0.7 notes said "replaces it as a whole"; "updates in place" is the accurate wording.
  • Phone calendar apps ignore RDATE. The Google Calendar app on Android keeps only the first occurrence of a series as a single event — and once that single event exists, Google Calendar refuses the recurring import of the same UID even from the web ("Processed 0 events", also after deleting). One event per point imports fully everywhere. The Playground therefore preselects "one event per point" on phones (coarse pointer or a viewport narrower than 700px) and keeps one recurring event per expression as the default on a PC; the checkbox says so.
  • Docs updated accordingly (impl/README, both Playground pages, llms.txt; the 1.0.7 release notes were corrected in place).

Tests: 779 (one new witness for the phone default; folding-boundary cases and a whole-file check added to the existing folding witness; each reverted to the old code to confirm it goes red).

Upgrade: npm i -g kairos-lang@1.0.8 (or npx kairos-lang@1.0.8 list --ics …).

Kairos 1.0.7

Choose a tag to compare

@azathothx azathothx released this 07 Oct 15:27

Kairos 1.0.7 — addendum 24: calendar export and everyday examples. The language is unchanged (grammar, semantics and the spec text are the same as 1.0.6); this release adds one output format and one entry path for people who never want to read an expression.

Calendar export: --ics

  • kairos list --ics and kairos next --ics write the result as an iCalendar file (RFC 5545) on stdout (exclusive with --json). One point, one VEVENT. Day-granular points become all-day events (DTSTART;VALUE=DATE) when --tz equals the definition's premise tz (otherwise they are timed); timed points become zero-length events at instants in UTC — the points themselves, sub-second dropped — and carry a VALARM (TRIGGER:PT0M, a notification at the point itself), so a schedule with times doubles as an alarm clock or reminder list. DTEND equals DTSTART on purpose (without DTEND, Google Calendar shows an hour — a deliberate deviation from RFC 5545 §3.8.2.2). Events are TRANSP:TRANSPARENT (they do not block free/busy). With zero events nothing is written: the CLI says so on stderr and exits 2.
  • Out-of-coverage annotations become all-day events too (the half-open [from, to) of the annotation as DTSTART/DTEND, TRANSP:TRANSPARENT, with "update the table and regenerate" in the description). The data edge stays visible in the calendar instead of vanishing.
  • --ics-series groups each expression into one recurring event (DTSTART plus RDATE for the remaining points) — the calendar shows one series (verified in Google Calendar on the web: all occurrences import, deleting offers "all events" so one deletion removes the whole series, and re-importing a regenerated file with the same UID updates the series in place — observed 2026-10-08). Apps that ignore RDATE (Outlook, and the Google Calendar app on phones) keep only the first occurrence as a single event — and once that single event exists, Google Calendar refuses the recurring import of the same UID even from the web ("Processed 0 events"). On a phone use one event per point (1.0.8 preselects it there); the CLI keeps one event per point as its default. The Playground defaults to the series form, with "one event per point (for Outlook)" as the escape.
  • No RRULE is emitted. The file holds the expanded points only. The schedules Kairos exists for are the ones RRULE cannot express; approximating them with a rule would hide exactly that.
  • The event name is the definition's leading comment line (# …), else the file name. DTSTAMP equals each event's DTSTART, and UID is derived deterministically from the expression text, its position in the file, the zone and the point — re-importing the same definition does not duplicate events (the same UID updates the same event), updating only the table keeps the same UIDs, and the exporter never reads the clock. CRLF line endings, 75-octet folding (never inside a multi-byte character), TEXT escaping (\, ;, ,, newlines).
  • New export kairos-lang/cli: cmdList/cmdNext/supplyResolver/errorReport/todayIn and the CliReport types for programmatic use — the basis of kairos-lang-mcp, which follows as a separate package a few days later.

Playground

  • "Add to calendar (.ics)" builds the same file in the browser (same function as the CLI, nothing sent) and saves it — one recurring event per expression by default. Zero events: nothing is written.
  • A new group of everyday examples at the top of the example list — recycling pickup (1st and 3rd Wednesday), payday (15th and month-end, previous business day on holidays), alarm clock (weekdays 6:30, Saturdays and holidays 8:00) — so a schedule can be chosen, checked and exported without reading the expression. The English page uses US federal holidays and America/New_York. The previous five examples are grouped as business examples.

Docs: the CLI section of impl/README, llms.txt, both Playground pages.

Tests: 778 (15 new witnesses; each group mutation-tested — with folding removed, the alarm dropped, the annotation end closed or RDATE dropped, the witnesses go red; the four added by the pre-release review — ; escaping, zero-length annotation DTEND, UIDs of duplicate expressions, zero-event CLI — were checked the same way).

Upgrade: npm i -g kairos-lang@1.0.7 (or npx kairos-lang@1.0.7 list --ics …).

Kairos 1.0.6

Choose a tag to compare

@azathothx azathothx released this 06 Oct 02:59

Kairos 1.0.6 — one bundled release (addendum 23). Two threads: a refinement of out-of-coverage annotations at the end of a data-derived window sequence, and the first machine-readable contract for the CLI (JSON Schema, --explain, structured errors). The grammar (EBNF) is unchanged. A definition that evaluated under 1.0.5 yields the same points; what can change is the annotations (more of them, never fewer) and the civil labels of points on a DST fall-back day or at sub-second resolution.

Semantics (ADR-37 revision 6): the end of the final window is undetermined

  • A data-derived window sequence (a lunisolar calendar cut at new moons, segmentBy over a dated table) lays its final window up to the coverage edge. Its membership and start are settled, but its true end depends on the next marker — which lies outside the coverage. Stages that read the end now treat that window as touching the out-of-coverage interval: last, an nth the known part cannot satisfy, first/nth on an empty known part, and coincides without a witness (which is now out-of-coverage, never false). The point set is unchanged; the whole window gets an annotation.
  • Why: lunarMonth |> last used to return the coverage's last day as a "month-end" with no annotation, although the real month ran on for weeks. Leap-month detection (not coincides(chukiDay, lunarMonth, p)) could report a false leap month in the final month; it now reports out-of-coverage instead. Windows cut by the evaluation horizon (not by the coverage) are unaffected, as are rule-generated windows (month, week).
  • spec §4.8 states that sugar inherits the meaning of its expansion (annotation transport rows, DST conventions) — the standing answer to "why does at drop a point the combinator kept".

Machine-readable contract

  • JSON Schema (draft 2020-12) for the CLI's --json output, including its error form — https://kairos-lang.org/schema/cli-report.schema.json — and for the --supply input — https://kairos-lang.org/schema/supply.schema.json. Later revisions are backward compatible. The reference tests validate real CLI output and supply files against both (ajv, a dev dependency only; the published package still has zero runtime dependencies).
  • results[].source and line. Each result now carries the body expression as written and its 1-based line, so two identical expressions under different preambles can be told apart.
  • Errors are JSON too. With --json, a failure prints {"command", "version", "error": {"kind": "usage" | "supply" | "static", "message"}} on stdout (exit code 1 as before); without --json nothing changes.
  • --explain prints the pipeline's head and each stage with the point count after it, the first and last point, the windows and annotations involved — # explain: everyDay 59 → within(month) 59 [2 windows] → last 2 — the counterpart of a SQL execution plan (results[].stages with --json). Per-point provenance (where a roll landed, which way a shift went) is future work.
  • Labels are one-to-one with points. Sub-second points show milliseconds when non-zero (2026-01-02T00:39:35.244); on a DST fall-back day the wall-clock hour that occurs twice is printed with its UTC offset on both occurrences (2026-11-01T01:30-04:00, 2026-11-01T01:30-05:00). Previously the two instants printed identically. The derivation rule for wall-clock times is unchanged (at(T01:30) still yields the first occurrence); points are never merged.
  • asof in a supply is a version identifier, compared by identity only — never ordered or read as a date (spec §3.8). Use the observation date unless your source has a better version id.

CLI and Playground, small items

  • next starts its search window at 7 days and doubles (yearly steps after one year, capped by --horizon), so a daily schedule is not evaluated over a full year to find its next firing. The re-evaluation semantics are unchanged. (A one-second stream is still slow: materialisation runs to the implementation horizon of to + 400 days.)
  • The Playground prints the same line as the CLI for a definition with no body expression, and shows the reference implementation's version and fingerprint under the output — so a learner can check it is the version the textbook was verified against.

Docs: spec §3.8, §4.8, §4.9, §4.10 (both languages); reference pages for segmentBy, last, nth, first, coincides and everyInstant; stdlib/kyureki.md §7; the CLI section of impl/README; llms.txt.

Tests: 763 (33 new witnesses; each group was mutation-tested — with the change removed or the Schema broken, the witnesses go red).

Upgrade: npm i -g kairos-lang@1.0.6 (or npx kairos-lang@1.0.6 …).

Kairos 1.0.5

Choose a tag to compare

@azathothx azathothx released this 30 Sep 15:11

Kairos 1.0.5 — one bundled patch release (addendum 22). It collects the fixes from a red-team review and from three rounds of a mechanical boundary checklist (382 cases, plus a differential run against the Playground build and 30 invariants of the --json output). The grammar (EBNF) is unchanged, and a definition that evaluated under 1.0.4 and still evaluates yields the same points. What changes: the CLI says more, forms that used to pass silently are now errors, and two false errors are gone.

CLI

  • list no longer prints nothing for an empty result. A single expression with zero points prints # 0 点([from, to) に該当なし) (--lang en: # 0 points (nothing in [from, to))). The line starts with #, the exit code stays 0, and --json is unchanged. The Playground prints the same line: its output is now line-for-line what list prints.
  • window-clip warning. When roll, shift or snapTo moves a point from inside [from, to) to outside, the point is not in the output (spec §7.8, unchanged) — the CLI now says so instead of showing a silent gap.
  • Input files. A UTF-8 BOM is skipped in definition files (F119) and in --supply JSON (F142); a UTF-16 file — what PowerShell 5's > writes — gets an explicit "save as UTF-8" message instead of "unknown character"; an unreadable file names the argument it came from.
  • A reversed range (--to before --from) and a file with no body expression are errors (F117, F126). Argument errors are reported in Japanese (--lang en keeps the original text); flags may come before the file without a subcommand; --help exits 0.

False errors fixed

  • A lunar-calendar definition can be evaluated over a narrow window (F144). new-moon table |> snapTo(day) used as segmentBy markers with static labels: failed with "label count ≠ window count" whenever to + 400 days did not reach the end of the table — the bundled examples/rokuyo.kairos failed for a one-month window. snapTo onto civil days now also places points beyond the materialisation horizon (a day's start needs no materialisation), so the length check is exact for every range, as spec §4.2 says.
  • empties: error judges only windows inside the materialised range (F145). Date-table markers reaching past the horizon, or starting before 1970 (a table of era starts), no longer raise "empty window".

Now an error (previously passed silently, or crashed)

  • Numbers: shift with a non-integer n (F116); nth(0), nth(-1), nth(1.5) (F120); division and mod by zero (F125); non-integer span counts, split widths, phase: and rephase deltas (F127–F129).
  • Widths and literals: chronos grid 0d no longer hangs (F130); a civil width is a whole number of days — 1.5d silently meant "every 3 days" (F138); the reference implementation's resolution is 1 ms, so a sub-millisecond width or a seconds fraction beyond three digits is a lexical error rather than a silent rounding (F139); a five-digit year is rejected, in date literals and in covering: (F121, F141).
  • Declarations: tz: "" (F118); a preamble member declared twice in one block (F122); a premise or a binding defined twice (F123, F134); a lambda or projection called with the wrong number of arguments (F132, F133); cycle [] (F135); comparing values of different types with == (F124).
  • Supply (external): instants outside the representable time range (F140); a resolver that returns a Promise or a non-object is named as such instead of "covering is missing" (F143).
  • Resources: a covering: list of 130,000+ intervals no longer throws RangeError (F136); a materialisation that cannot fit in an array (strideBy(0.001s, …)) stops with a diagnostic — there is still no cap on the number of points (F137); expression nesting is limited to 200 levels instead of overflowing the parser's stack (F131).

Diagnostics

  • "Unresolved name" now points at the cause when it is a preamble member's value or a missing calendar-system:.
  • "Unknown character" names the code point and the fix for invisible and look-alike characters (no-break space, full-width space, zero-width characters, curly quotes) — the usual result of pasting from a web page or a document.
  • A diagnostic is cut at 2,000 characters (a 1 MB supplied value used to produce a 1 MB message).

Playground: "Pin to URL" works for large definitions (it threw at about 130 KB, F146).

Docs: a "Limits (what it does not do)" section and a "What an error looks like" section in README (English and Japanese) and llms.txt; spec §3.2, §4.8, §4.9, §5.5 and §7.8 state the rules above (both languages). The case lists and the measurements are in design/60-reviews/2026-09-29-boundary-checklist.md.

Tests: 730 (49 new witnesses; the boundary-checklist witnesses were mutation-tested — with the fix removed, the witness goes red).

Upgrade: npm i -g kairos-lang@1.0.5 (or npx kairos-lang@1.0.5 …).

Kairos 1.0.4

Choose a tag to compare

@azathothx azathothx released this 29 Sep 02:39

Kairos 1.0.4 — two evaluator fixes reported through the production feedback loop (addendum 21). The language, its lexis and grammar are unchanged (1.0 stays frozen).

Fixed

  • Memoization keys now include every preamble member and the enclosing premise (F114). The context key for memoized public words, top-level bindings and the standard bizDay/bizOpen derivations was a hand-written list of 8 members that omitted granularity: (and epoch:), so a right-hand side that reads within(granularity) could return a value that depended on what had been evaluated before it: evaluating bizDay under @Base (granularity month) first made a later @Mine (week) return the base's 27 points instead of its own 24. The bizDay key also ignored the enclosing premise, so a derived premise that overrides day lost its alignment error when the base was evaluated first. The key is now built from the parser's member list, and the standard derivations key on the enclosing premise as well. Determinism (§7.7) never allowed order-dependence; this was an implementation defect, present since before 1.0.
  • Self-referential preamble members are a guided error (F115). roll: roll, axis: axis, wkst: wkst or the mutual axis: roll; roll: axis — declared in a premise, inherited by a derivation or postfixed to the lightweight form — recursed in name resolution until RangeError: Maximum call stack size exceeded. Resolution now detects re-entry on the member's value and says what a member value may be (a convention, the name of a point stream or premise, a string). Spec §3.3 now states that a preamble member name is not a value.

Also: spec §3.7 lists all 10 inherited preamble members (calendar-system:, granularity: and asof: were missing from the parenthesis; the implementation always inherited them), and addendum 19's "6 tests go red if the fix is reverted" gets its breakdown (5 witnesses + the Playground fingerprint check).

Tests: 681 (21 new witnesses: 5 for order-independence across the four memoized paths, 9 for self-reference including three controls, 7 transcribed from the supplier's suite that pin the meaning of roll:; each group was mutation-tested).

Upgrade: npm i -g kairos-lang@1.0.4 (or npx kairos-lang@1.0.4 …).