@clubs.place/cli 0.1.18 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/PROVENANCE.json +53 -47
  2. package/README.md +20 -11
  3. package/bin/clubs-nippo +0 -5
  4. package/bin/clubs-nippo-web.mjs +0 -5
  5. package/bin/clubs-nippo.mjs +1 -526
  6. package/bin/clubs.mjs +643 -0
  7. package/docs/events-schema.md +1 -1
  8. package/package.json +6 -5
  9. package/src/aggregate.mjs +32 -5
  10. package/src/aggregate.slots.test.mjs +23 -0
  11. package/src/autorun.mjs +1 -6
  12. package/src/autorun.test.mjs +2 -7
  13. package/src/cards.mjs +0 -5
  14. package/src/collect.mjs +0 -5
  15. package/src/config.mjs +10 -6
  16. package/src/generators/claude.mjs +0 -5
  17. package/src/generators/cli.mjs +0 -5
  18. package/src/generators/codex.mjs +0 -5
  19. package/src/generators/copilot.mjs +0 -5
  20. package/src/generators/gemini.mjs +0 -5
  21. package/src/generators/openai-compat.mjs +0 -5
  22. package/src/generators/openrouter.mjs +0 -5
  23. package/src/history.mjs +2 -5
  24. package/src/ingest.mjs +0 -5
  25. package/src/lemma.docHash.test.mjs +0 -5
  26. package/src/lemma.mjs +0 -5
  27. package/src/mask.mjs +0 -5
  28. package/src/mcp.mjs +26 -9
  29. package/src/narrative.blockRepos.test.mjs +48 -0
  30. package/src/narrative.mjs +47 -8
  31. package/src/profiles.mjs +121 -0
  32. package/src/profiles.test.mjs +73 -0
  33. package/src/prompt.mjs +99 -24
  34. package/src/prompt.test.mjs +87 -20
  35. package/src/remote-config.mjs +5 -6
  36. package/src/render.mjs +1 -5
  37. package/src/routines.mjs +61 -0
  38. package/src/routines.test.mjs +29 -0
  39. package/src/send.mjs +0 -5
  40. package/src/settings.mjs +0 -5
  41. package/src/sources/claude-code.mjs +0 -5
  42. package/src/sources/codex-cli.mjs +0 -5
  43. package/src/sources/copilot-cli.mjs +0 -5
  44. package/src/sources/cowork.mjs +0 -5
  45. package/src/sources/events-file.mjs +0 -5
  46. package/src/sources/gemini-cli.mjs +0 -5
  47. package/src/sources/hermes.mjs +0 -5
  48. package/src/store.mjs +0 -5
  49. package/src/tasks.mjs +0 -5
  50. package/src/tool-name.mjs +0 -5
  51. package/web/assets/qr.js +0 -5
  52. package/web/assets/sidebar.js +0 -5
  53. package/web/assets/twemoji.js +0 -5
@@ -0,0 +1,29 @@
1
+ import { test } from "node:test";
2
+ import assert from "node:assert/strict";
3
+ import { localRoutines } from "./routines.mjs";
4
+
5
+ // 2026-09-14・21・28 は月曜。
6
+ const history = [
7
+ { date: "2026-09-14", projects: ["clubsx", "lemma"], toolCounts: { Bash: 9, mcp__clubs__clubs_leave: 2 } },
8
+ { date: "2026-09-21", projects: ["clubsx"], toolCounts: { Read: 3, mcp__clubs__clubs_leave: 1 } },
9
+ { date: "2026-09-28", projects: ["clubsx"], toolCounts: { Edit: 1 } },
10
+ { date: "2026-09-30", projects: ["lemma"], toolCounts: {} },
11
+ { date: "2026-08-01", projects: ["old"], toolCounts: {} },
12
+ { date: "2026-08-02", projects: ["old"], toolCounts: {} },
13
+ ];
14
+
15
+ test("4週のくり返し:2日以上だけ・日数の多い順・曜日の偏り・ふだんの道具は数えない・古い日は入れない", () => {
16
+ const r = localRoutines("2026-10-04", history);
17
+ assert.equal(r.days, 4);
18
+ assert.deepEqual(r.projects, [
19
+ { name: "clubsx", days: 3, weekdays: [["月", 3]] },
20
+ { name: "lemma", days: 2, weekdays: [] },
21
+ ]);
22
+ assert.deepEqual(r.tools, [{ name: "mcp__clubs__clubs_leave", days: 2, weekdays: [["月", 2]] }]);
23
+ });
24
+
25
+ test("古い履歴(projects の無い行)でも落ちない", () => {
26
+ const r = localRoutines("2026-10-04", [{ date: "2026-10-01" }, { date: "2026-10-02" }]);
27
+ assert.deepEqual(r.projects, []);
28
+ assert.deepEqual(r.tools, []);
29
+ });
package/src/send.mjs CHANGED
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  /**
7
2
  * 送信するのは「本文(マスク済)+集計数字+(あれば)署名」だけ。
8
3
  * activity.events / activity.prompts(生ログ由来)はここに渡ってこない。
package/src/settings.mjs CHANGED
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  import { readFileSync, writeFileSync, existsSync } from "node:fs";
7
2
  import { join } from "node:path";
8
3
  import { APP_HOME } from "./config.mjs";
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  import { readFileSync, readdirSync, statSync } from "node:fs";
7
2
  import { join, basename } from "node:path";
8
3
  import { maskText } from "../mask.mjs";
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  import { readdirSync, readFileSync, statSync } from "node:fs";
7
2
  import { join } from "node:path";
8
3
  import { homedir } from "node:os";
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  import { readdirSync, readFileSync, statSync } from "node:fs";
7
2
  import { join } from "node:path";
8
3
  import { homedir } from "node:os";
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  import { readFileSync, readdirSync, statSync, existsSync } from "node:fs";
7
2
  import { join, dirname, basename } from "node:path";
8
3
  import { homedir, platform } from "node:os";
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  import { readFileSync } from "node:fs";
7
2
  import { maskText } from "../mask.mjs";
8
3
 
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  import { readdirSync, readFileSync } from "node:fs";
7
2
  import { join } from "node:path";
8
3
  import { homedir } from "node:os";
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  import { readFileSync, readdirSync, statSync, existsSync } from "node:fs";
7
2
  import { join } from "node:path";
8
3
  import { homedir } from "node:os";
package/src/store.mjs CHANGED
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  import { readFileSync, writeFileSync, readdirSync, mkdirSync, existsSync } from "node:fs";
7
2
  import { join } from "node:path";
8
3
  import { APP_HOME } from "./config.mjs";
package/src/tasks.mjs CHANGED
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  import { readFileSync, writeFileSync, mkdirSync } from "node:fs";
7
2
  import { join } from "node:path";
8
3
  import { createHash } from "node:crypto";
package/src/tool-name.mjs CHANGED
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  /**
7
2
  * ツール名を人が読める形にする。
8
3
  *
package/web/assets/qr.js CHANGED
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  /**
7
2
  * QR コード生成(依存ゼロ・バイトモード・誤り訂正レベル M)。
8
3
  *
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  /* CLUBS Console の共通サイドバー。
7
2
  3画面(日報一覧・日報編集・設定)から読む。ビルドは無し・依存も無し。
8
3
  AI名は /api/settings の実データから入れる。固定値を出すと誰の日報か嘘になる。 */
@@ -1,8 +1,3 @@
1
- // clubs-nippo — AI業務日報 (CLUBS)
2
- // Copyright (c) 2026 FRAME00 Inc.
3
- // SPDX-License-Identifier: MIT
4
- // https://github.com/frame00/clubs-nippo
5
-
6
1
  /**
7
2
  * カードの主アイコン(Twemoji・インライン SVG)。
8
3
  *