@mulmoclaude/core 0.1.0

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 (122) hide show
  1. package/assets/helps/billing-clients-worklog.md +215 -0
  2. package/assets/helps/billing-invoice.md +458 -0
  3. package/assets/helps/business.md +104 -0
  4. package/assets/helps/collection-skills.md +810 -0
  5. package/assets/helps/custom-view.md +433 -0
  6. package/assets/helps/feeds.md +114 -0
  7. package/assets/helps/gemini.md +57 -0
  8. package/assets/helps/github.md +23 -0
  9. package/assets/helps/guide.md +61 -0
  10. package/assets/helps/index.md +89 -0
  11. package/assets/helps/lessons-collection.md +400 -0
  12. package/assets/helps/mulmoscript.md +249 -0
  13. package/assets/helps/portfolio-tracker.md +211 -0
  14. package/assets/helps/presentation-deck.md +828 -0
  15. package/assets/helps/presenthtml.md +89 -0
  16. package/assets/helps/sandbox.md +97 -0
  17. package/assets/helps/spreadsheet.md +43 -0
  18. package/assets/helps/storyteller.md +101 -0
  19. package/assets/helps/telegram.md +136 -0
  20. package/assets/helps/todo-collection.md +140 -0
  21. package/assets/helps/vocabulary.md +109 -0
  22. package/assets/helps/wiki.md +168 -0
  23. package/assets/skills-preset/mc-cooking-coach/SKILL.md +217 -0
  24. package/assets/skills-preset/mc-library/SKILL.md +188 -0
  25. package/assets/skills-preset/mc-manage-automations/SKILL.md +119 -0
  26. package/assets/skills-preset/mc-manage-skills/SKILL.md +141 -0
  27. package/assets/skills-preset/mc-wiki-deep-lint/SKILL.md +108 -0
  28. package/assets/skills-preset/mc-wiki-health-check/SKILL.md +61 -0
  29. package/assets/skills-preset/mc-wiki-ingest/SKILL.md +182 -0
  30. package/assets/skills-preset/mc-wiki-promote/SKILL.md +175 -0
  31. package/assets/skills-preset/mc-zenn/SKILL.md +136 -0
  32. package/dist/chunk-CKQMccvm.cjs +28 -0
  33. package/dist/collection/core/actionVisible.d.ts +34 -0
  34. package/dist/collection/core/calendarGrid.d.ts +120 -0
  35. package/dist/collection/core/deriveAll.d.ts +38 -0
  36. package/dist/collection/core/derivedFormula.d.ts +18 -0
  37. package/dist/collection/core/draft.d.ts +18 -0
  38. package/dist/collection/core/enumColors.d.ts +33 -0
  39. package/dist/collection/core/errorMessage.d.ts +4 -0
  40. package/dist/collection/core/itemLabel.d.ts +12 -0
  41. package/dist/collection/core/presentCollection.d.ts +13 -0
  42. package/dist/collection/core/promptSafety.d.ts +1 -0
  43. package/dist/collection/core/schema.d.ts +355 -0
  44. package/dist/collection/core/shortHexId.d.ts +8 -0
  45. package/dist/collection/core/sortItems.d.ts +29 -0
  46. package/dist/collection/core/uiTypes.d.ts +106 -0
  47. package/dist/collection/index.cjs +793 -0
  48. package/dist/collection/index.cjs.map +1 -0
  49. package/dist/collection/index.d.ts +14 -0
  50. package/dist/collection/index.js +740 -0
  51. package/dist/collection/index.js.map +1 -0
  52. package/dist/collection/paths.cjs +44 -0
  53. package/dist/collection/paths.cjs.map +1 -0
  54. package/dist/collection/paths.js +41 -0
  55. package/dist/collection/paths.js.map +1 -0
  56. package/dist/collection/server/atomic.d.ts +1 -0
  57. package/dist/collection/server/delete.d.ts +38 -0
  58. package/dist/collection/server/derive.d.ts +8 -0
  59. package/dist/collection/server/discoveredCollection.d.ts +18 -0
  60. package/dist/collection/server/discovery.d.ts +227 -0
  61. package/dist/collection/server/host.d.ts +77 -0
  62. package/dist/collection/server/index.cjs +1721 -0
  63. package/dist/collection/server/index.cjs.map +1 -0
  64. package/dist/collection/server/index.d.ts +11 -0
  65. package/dist/collection/server/index.js +1671 -0
  66. package/dist/collection/server/index.js.map +1 -0
  67. package/dist/collection/server/io.d.ts +114 -0
  68. package/dist/collection/server/paths.d.ts +52 -0
  69. package/dist/collection/server/spawn.d.ts +55 -0
  70. package/dist/collection/server/templatePath.d.ts +25 -0
  71. package/dist/collection/server/util.d.ts +3 -0
  72. package/dist/collection/server/validate.d.ts +19 -0
  73. package/dist/collection/server/views.d.ts +20 -0
  74. package/dist/deriveAll-C15OpM3K.cjs +399 -0
  75. package/dist/deriveAll-C15OpM3K.cjs.map +1 -0
  76. package/dist/deriveAll-C6BYnpBL.js +364 -0
  77. package/dist/deriveAll-C6BYnpBL.js.map +1 -0
  78. package/dist/file-change/index.cjs +72 -0
  79. package/dist/file-change/index.cjs.map +1 -0
  80. package/dist/file-change/index.d.ts +43 -0
  81. package/dist/file-change/index.js +66 -0
  82. package/dist/file-change/index.js.map +1 -0
  83. package/dist/notifier/engine.d.ts +72 -0
  84. package/dist/notifier/index.cjs +484 -0
  85. package/dist/notifier/index.cjs.map +1 -0
  86. package/dist/notifier/index.d.ts +3 -0
  87. package/dist/notifier/index.js +464 -0
  88. package/dist/notifier/index.js.map +1 -0
  89. package/dist/notifier/store.d.ts +18 -0
  90. package/dist/notifier/types.d.ts +118 -0
  91. package/dist/notifier/validate.d.ts +17 -0
  92. package/dist/scheduler/adapter.d.ts +48 -0
  93. package/dist/scheduler/index.cjs +352 -0
  94. package/dist/scheduler/index.cjs.map +1 -0
  95. package/dist/scheduler/index.d.ts +2 -0
  96. package/dist/scheduler/index.js +343 -0
  97. package/dist/scheduler/index.js.map +1 -0
  98. package/dist/scheduler/task-manager.d.ts +51 -0
  99. package/dist/whisper/client.cjs +241 -0
  100. package/dist/whisper/client.cjs.map +1 -0
  101. package/dist/whisper/client.d.ts +35 -0
  102. package/dist/whisper/client.js +239 -0
  103. package/dist/whisper/client.js.map +1 -0
  104. package/dist/whisper/ffmpeg.d.ts +6 -0
  105. package/dist/whisper/index.cjs +433 -0
  106. package/dist/whisper/index.cjs.map +1 -0
  107. package/dist/whisper/index.d.ts +5 -0
  108. package/dist/whisper/index.js +425 -0
  109. package/dist/whisper/index.js.map +1 -0
  110. package/dist/whisper/internal.d.ts +11 -0
  111. package/dist/whisper/models.d.ts +49 -0
  112. package/dist/whisper/sidecar.d.ts +8 -0
  113. package/dist/whisper/whisper.d.ts +28 -0
  114. package/dist/workspace-setup/assets.d.ts +10 -0
  115. package/dist/workspace-setup/index.d.ts +3 -0
  116. package/dist/workspace-setup/index.js +556 -0
  117. package/dist/workspace-setup/index.js.map +1 -0
  118. package/dist/workspace-setup/slug.d.ts +6 -0
  119. package/dist/workspace-setup/slug.js +13 -0
  120. package/dist/workspace-setup/slug.js.map +1 -0
  121. package/dist/workspace-setup/sync.d.ts +94 -0
  122. package/package.json +95 -0
@@ -0,0 +1,94 @@
1
+ export interface SyncPresetSkillsOptions {
2
+ /** Source directory: `<launcher>/server/workspace/skills-preset/`. */
3
+ sourceDir: string;
4
+ /** Destination directory:
5
+ * `<workspaceRoot>/data/skills/catalog/preset/`. The catalog
6
+ * half of the catalog-vs-active split — entries here are visible
7
+ * to UI but NOT to Claude Code's prompt-time skill resolver. */
8
+ destDir: string;
9
+ /** Logger callbacks — kept injectable so tests don't need to
10
+ * spin up the structured logger. The boot-side wrapper threads
11
+ * these through to `log.info` / `log.warn`. */
12
+ onInfo?: (message: string, data?: Record<string, unknown>) => void;
13
+ onWarn?: (message: string, data?: Record<string, unknown>) => void;
14
+ }
15
+ export interface SyncPresetSkillsResult {
16
+ /** Slugs successfully copied (or refreshed) from source to dest. */
17
+ copied: string[];
18
+ /** Slugs removed from dest because they no longer exist in source.
19
+ * Bounded to `mc-*` entries — user-authored slugs are never
20
+ * considered for removal. */
21
+ removed: string[];
22
+ /** Source entries that failed validation (wrong prefix, missing
23
+ * SKILL.md, etc.) and were skipped. Each entry is human-readable. */
24
+ skipped: string[];
25
+ }
26
+ /** Filesystem ops `_replaceSlugTree` depends on — injectable so the
27
+ * mid-swap failure path can be regression-tested without real IO faults. */
28
+ export interface SlugTreeFsOps {
29
+ copyTree: (src: string, dest: string) => void;
30
+ rename: (from: string, dest: string) => void;
31
+ remove: (target: string) => void;
32
+ exists: (target: string) => boolean;
33
+ }
34
+ /** Refresh one preset slot as a rollback-safe stage-and-swap. Wipe-and-replace
35
+ * (not merge) so stale sibling assets — e.g. a schema.json dropped between
36
+ * releases — don't linger; the catalog preset slot is launcher-owned, so user
37
+ * edits there are not preserved across boots.
38
+ *
39
+ * The live slot is never left without a recoverable copy:
40
+ * 1. Stage: copy the source into a temp sibling. A copy failure leaves the
41
+ * existing preset untouched (temp dir removed).
42
+ * 2. Move the existing tree ASIDE to a backup (rename, not delete), so the
43
+ * old contents survive even if the next step fails.
44
+ * 3. Move the staged copy into place. On failure, restore from the backup;
45
+ * if even the restore fails, BOTH backup and staging are preserved for
46
+ * manual recovery rather than deleted.
47
+ * 4. On success, drop the backup.
48
+ *
49
+ * Exported with a `_` prefix only so the rename-failure-after-move path can be
50
+ * regression-tested via the injected `fsOps`. Throws on failure (caller records
51
+ * + skips). */
52
+ export declare function _replaceSlugTree(sourceSlugDir: string, destSlugDir: string, fsOps?: SlugTreeFsOps): void;
53
+ /** Copy every preset slug from `sourceDir` into `destDir` (the
54
+ * preset slot under the catalog root), then remove any `mc-*`
55
+ * entries in `destDir` that no longer have a source. The catalog
56
+ * preset subdir is fully launcher-owned, so the `mc-*` prefix
57
+ * check at destination is defence-in-depth: a stray non-preset
58
+ * slug landing in `catalog/preset/` is unexpected, and we'd
59
+ * rather skip it than silently delete a directory we don't
60
+ * recognise. */
61
+ export declare function syncPresetSkills(opts: SyncPresetSkillsOptions): SyncPresetSkillsResult;
62
+ export interface SyncActivePresetSkillsOptions {
63
+ /** Source directory: `<launcher>/server/workspace/skills-preset/`. */
64
+ sourceDir: string;
65
+ /** Active skills directory: `<workspaceRoot>/.claude/skills/`. */
66
+ activeDir: string;
67
+ onInfo?: (message: string, data?: Record<string, unknown>) => void;
68
+ onWarn?: (message: string, data?: Record<string, unknown>) => void;
69
+ }
70
+ export interface SyncActivePresetSkillsResult {
71
+ /** Slugs whose active copy had at least one file overwritten. */
72
+ updated: string[];
73
+ /** Slugs whose active copy already matched the source — no-op. */
74
+ unchanged: string[];
75
+ /** Slugs that haven't been starred yet (no active dir present).
76
+ * Listed for diagnostics; the function never auto-stars. */
77
+ notActive: string[];
78
+ /** Active `mc-*` slugs pruned because the launcher no longer ships a
79
+ * source preset for them (a retired preset). Bounded to `mc-*` —
80
+ * user-authored skills are never removed. */
81
+ removed: string[];
82
+ /** Per-slug failure messages (permission errors, etc.). */
83
+ skipped: string[];
84
+ /** Common timestamp suffix used for every backup file produced by
85
+ * this run. Exposed so the boot-time log can point a user at the
86
+ * exact glob to inspect. */
87
+ backupSuffix: string | null;
88
+ }
89
+ /** Refresh every already-starred `mc-*` preset's active copy in
90
+ * `<workspaceRoot>/.claude/skills/<slug>/` to match the source.
91
+ * Per-file diff with `.bak.<timestamp>` backup on overwrite. Slugs
92
+ * that aren't starred yet are listed in `notActive` but never
93
+ * auto-created. */
94
+ export declare function syncActivePresetSkills(opts: SyncActivePresetSkillsOptions): SyncActivePresetSkillsResult;
package/package.json ADDED
@@ -0,0 +1,95 @@
1
+ {
2
+ "name": "@mulmoclaude/core",
3
+ "version": "0.1.0",
4
+ "description": "Shared server-side core for MulmoClaude and MulmoTerminal — the always-shipped-together subsystems consolidated behind subpath exports so the two hosts can't drift. Server-only except the browser-safe ./whisper/client and ./workspace-setup/slug entries. All host specifics are injected.",
5
+ "type": "module",
6
+ "exports": {
7
+ "./collection": {
8
+ "types": "./dist/collection/index.d.ts",
9
+ "import": "./dist/collection/index.js",
10
+ "require": "./dist/collection/index.cjs",
11
+ "default": "./dist/collection/index.js"
12
+ },
13
+ "./collection/server": {
14
+ "types": "./dist/collection/server/index.d.ts",
15
+ "import": "./dist/collection/server/index.js",
16
+ "require": "./dist/collection/server/index.cjs",
17
+ "default": "./dist/collection/server/index.js"
18
+ },
19
+ "./collection/paths": {
20
+ "types": "./dist/collection/server/templatePath.d.ts",
21
+ "import": "./dist/collection/paths.js",
22
+ "require": "./dist/collection/paths.cjs",
23
+ "default": "./dist/collection/paths.js"
24
+ },
25
+ "./file-change": {
26
+ "types": "./dist/file-change/index.d.ts",
27
+ "import": "./dist/file-change/index.js",
28
+ "require": "./dist/file-change/index.cjs",
29
+ "default": "./dist/file-change/index.js"
30
+ },
31
+ "./notifier": {
32
+ "types": "./dist/notifier/index.d.ts",
33
+ "import": "./dist/notifier/index.js",
34
+ "require": "./dist/notifier/index.cjs",
35
+ "default": "./dist/notifier/index.js"
36
+ },
37
+ "./scheduler": {
38
+ "types": "./dist/scheduler/index.d.ts",
39
+ "import": "./dist/scheduler/index.js",
40
+ "require": "./dist/scheduler/index.cjs",
41
+ "default": "./dist/scheduler/index.js"
42
+ },
43
+ "./whisper": {
44
+ "types": "./dist/whisper/index.d.ts",
45
+ "import": "./dist/whisper/index.js",
46
+ "require": "./dist/whisper/index.cjs",
47
+ "default": "./dist/whisper/index.js"
48
+ },
49
+ "./whisper/client": {
50
+ "types": "./dist/whisper/client.d.ts",
51
+ "import": "./dist/whisper/client.js",
52
+ "require": "./dist/whisper/client.cjs",
53
+ "default": "./dist/whisper/client.js"
54
+ },
55
+ "./workspace-setup": {
56
+ "types": "./dist/workspace-setup/index.d.ts",
57
+ "import": "./dist/workspace-setup/index.js",
58
+ "default": "./dist/workspace-setup/index.js"
59
+ },
60
+ "./workspace-setup/slug": {
61
+ "types": "./dist/workspace-setup/slug.d.ts",
62
+ "import": "./dist/workspace-setup/slug.js",
63
+ "default": "./dist/workspace-setup/slug.js"
64
+ }
65
+ },
66
+ "files": [
67
+ "dist",
68
+ "assets"
69
+ ],
70
+ "publishConfig": {
71
+ "access": "public"
72
+ },
73
+ "scripts": {
74
+ "build": "vite build && vite build -c vite.esm.config.ts",
75
+ "typecheck": "tsc --noEmit",
76
+ "test": "tsx --test test/**/test_*.ts"
77
+ },
78
+ "dependencies": {
79
+ "zod": "^4.4.3"
80
+ },
81
+ "peerDependencies": {
82
+ "@receptron/task-scheduler": "*",
83
+ "gui-chat-protocol": "^0.4.0"
84
+ },
85
+ "devDependencies": {
86
+ "@receptron/task-scheduler": "*",
87
+ "@types/node": "^26.0.1",
88
+ "gui-chat-protocol": "^0.4.0",
89
+ "tsx": "^4.22.4",
90
+ "typescript": "^6.0.3",
91
+ "vite": "^8.0.13",
92
+ "vite-plugin-dts": "^5.0.0"
93
+ },
94
+ "license": "MIT"
95
+ }