@murphai/murph 0.1.1 → 0.1.13

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 (100) hide show
  1. package/CHANGELOG.md +154 -0
  2. package/README.md +103 -60
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/assistant/ui/ink.d.ts.map +1 -1
  5. package/dist/assistant/ui/ink.js +2 -3
  6. package/dist/assistant/ui/ink.js.map +1 -1
  7. package/dist/assistant-runtime.d.ts +0 -2
  8. package/dist/assistant-runtime.d.ts.map +1 -1
  9. package/dist/assistant-runtime.js +0 -1
  10. package/dist/assistant-runtime.js.map +1 -1
  11. package/dist/commands/device.js +1 -1
  12. package/dist/commands/device.js.map +1 -1
  13. package/dist/commands/export-intake-read-helpers.d.ts +1 -1
  14. package/dist/commands/knowledge.d.ts +3 -0
  15. package/dist/commands/knowledge.d.ts.map +1 -0
  16. package/dist/commands/knowledge.js +164 -0
  17. package/dist/commands/knowledge.js.map +1 -0
  18. package/dist/commands/wearables.d.ts +4985 -0
  19. package/dist/commands/wearables.d.ts.map +1 -0
  20. package/dist/commands/wearables.js +355 -0
  21. package/dist/commands/wearables.js.map +1 -0
  22. package/dist/commands/workout.d.ts.map +1 -1
  23. package/dist/commands/workout.js +330 -28
  24. package/dist/commands/workout.js.map +1 -1
  25. package/dist/incur-error-bridge.d.ts +2 -0
  26. package/dist/incur-error-bridge.d.ts.map +1 -0
  27. package/dist/incur-error-bridge.js +25 -0
  28. package/dist/incur-error-bridge.js.map +1 -0
  29. package/dist/incur.generated.d.ts +118 -1
  30. package/dist/incur.generated.d.ts.map +1 -1
  31. package/dist/index.d.ts +2 -0
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +2 -0
  34. package/dist/index.js.map +1 -1
  35. package/dist/knowledge-cli-contracts.d.ts +179 -0
  36. package/dist/knowledge-cli-contracts.d.ts.map +1 -0
  37. package/dist/knowledge-cli-contracts.js +78 -0
  38. package/dist/knowledge-cli-contracts.js.map +1 -0
  39. package/dist/knowledge-documents.d.ts +44 -0
  40. package/dist/knowledge-documents.d.ts.map +1 -0
  41. package/dist/knowledge-documents.js +195 -0
  42. package/dist/knowledge-documents.js.map +1 -0
  43. package/dist/knowledge-lint.d.ts +11 -0
  44. package/dist/knowledge-lint.d.ts.map +1 -0
  45. package/dist/knowledge-lint.js +254 -0
  46. package/dist/knowledge-lint.js.map +1 -0
  47. package/dist/knowledge-runtime.d.ts +49 -0
  48. package/dist/knowledge-runtime.d.ts.map +1 -0
  49. package/dist/knowledge-runtime.js +227 -0
  50. package/dist/knowledge-runtime.js.map +1 -0
  51. package/dist/research-runtime.d.ts +3 -40
  52. package/dist/research-runtime.d.ts.map +1 -1
  53. package/dist/research-runtime.js +54 -253
  54. package/dist/research-runtime.js.map +1 -1
  55. package/dist/review-gpt-runtime.d.ts +85 -0
  56. package/dist/review-gpt-runtime.d.ts.map +1 -0
  57. package/dist/review-gpt-runtime.js +239 -0
  58. package/dist/review-gpt-runtime.js.map +1 -0
  59. package/dist/setup-assistant.d.ts +1 -0
  60. package/dist/setup-assistant.d.ts.map +1 -1
  61. package/dist/setup-assistant.js +2 -1
  62. package/dist/setup-assistant.js.map +1 -1
  63. package/dist/setup-cli.d.ts.map +1 -1
  64. package/dist/setup-cli.js +10 -1
  65. package/dist/setup-cli.js.map +1 -1
  66. package/dist/setup-wizard.d.ts.map +1 -1
  67. package/dist/setup-wizard.js +26 -7
  68. package/dist/setup-wizard.js.map +1 -1
  69. package/dist/usecases/workout-artifacts.d.ts +21 -0
  70. package/dist/usecases/workout-artifacts.d.ts.map +1 -0
  71. package/dist/usecases/workout-artifacts.js +149 -0
  72. package/dist/usecases/workout-artifacts.js.map +1 -0
  73. package/dist/usecases/workout-format.d.ts +92 -10
  74. package/dist/usecases/workout-format.d.ts.map +1 -1
  75. package/dist/usecases/workout-format.js +211 -391
  76. package/dist/usecases/workout-format.js.map +1 -1
  77. package/dist/usecases/workout-import.d.ts +36 -0
  78. package/dist/usecases/workout-import.d.ts.map +1 -0
  79. package/dist/usecases/workout-import.js +587 -0
  80. package/dist/usecases/workout-import.js.map +1 -0
  81. package/dist/usecases/workout-measurement.d.ts +66 -0
  82. package/dist/usecases/workout-measurement.d.ts.map +1 -0
  83. package/dist/usecases/workout-measurement.js +285 -0
  84. package/dist/usecases/workout-measurement.js.map +1 -0
  85. package/dist/usecases/workout-model.d.ts +15 -0
  86. package/dist/usecases/workout-model.d.ts.map +1 -0
  87. package/dist/usecases/workout-model.js +161 -0
  88. package/dist/usecases/workout-model.js.map +1 -0
  89. package/dist/usecases/workout.d.ts +57 -20
  90. package/dist/usecases/workout.d.ts.map +1 -1
  91. package/dist/usecases/workout.js +360 -214
  92. package/dist/usecases/workout.js.map +1 -1
  93. package/dist/vault-cli-command-manifest.d.ts +5179 -3
  94. package/dist/vault-cli-command-manifest.d.ts.map +1 -1
  95. package/dist/vault-cli-command-manifest.js +140 -3
  96. package/dist/vault-cli-command-manifest.js.map +1 -1
  97. package/dist/vault-cli.d.ts.map +1 -1
  98. package/dist/vault-cli.js +2 -0
  99. package/dist/vault-cli.js.map +1 -1
  100. package/package.json +22 -13
package/CHANGELOG.md CHANGED
@@ -2,6 +2,160 @@
2
2
 
3
3
  All notable changes to `@murphai/murph` will be documented in this file.
4
4
 
5
+ ## [0.1.13] - 2026-04-04
6
+
7
+ ### Changed
8
+ - No user-facing changes recorded.
9
+
10
+ ## [0.1.12] - 2026-04-04
11
+
12
+ ### Changed
13
+ - No user-facing changes recorded.
14
+
15
+ ## [0.1.11] - 2026-04-04
16
+
17
+ ### Fixed
18
+ - harden hosted storage confidentiality
19
+ - restore knowledge metadata fallback
20
+ - align refresh semantics and guidance
21
+
22
+ ### Changed
23
+ - set npm scope for publish
24
+ - use latest node and npm
25
+ - make knowledge compile assistant-authored
26
+ - bootstrap package trust bindings
27
+ - finish knowledge helper extraction
28
+
29
+ ## [0.1.10] - 2026-04-04
30
+
31
+ ### Changed
32
+ - restore trusted publishing flow
33
+ - speed up release checks
34
+ - share canonical knowledge model
35
+
36
+ ## [0.1.9] - 2026-04-04
37
+
38
+ ### Fixed
39
+ - clear empty npm auth fallback
40
+
41
+ ## [0.1.8] - 2026-04-03
42
+
43
+ ### Fixed
44
+ - drop npm self-update from publish workflow
45
+
46
+ ## [0.1.7] - 2026-04-03
47
+
48
+ ### Fixed
49
+ - restore npm token fallback
50
+
51
+ ## [0.1.6] - 2026-04-03
52
+
53
+ ### Added
54
+ - harden wiki runtime
55
+ - add wiki search surface
56
+ - add derived knowledge wiki
57
+ - add calm device sync sources
58
+ - add wearables query surfaces
59
+ - add workout measurements media and units
60
+ - add web pdf read tool
61
+ - add guarded web fetch tool
62
+ - land data model cutover
63
+ - add web search tool
64
+ - land Garmin provider and green checks
65
+ - move hosted auth to privy request tokens
66
+
67
+ ### Fixed
68
+ - expose time helpers for package verification
69
+ - harden public sender ingress
70
+ - tighten hosted callback/runtime guards
71
+ - encrypt hosted gateway durable state
72
+ - land pro cleanup patch
73
+ - simplify hosted email routes
74
+ - land crypto hardening patch
75
+ - add hosted email public sender routing
76
+ - keep next config self-contained
77
+ - allow Privy custom auth domains in csp
78
+ - wire hosted brave web search
79
+ - default hosted web reads on
80
+ - pin vetted web fetch destinations
81
+ - defer node require helpers
82
+ - prebuild workspace before rollout
83
+ - inherit canonical script path aliases
84
+ - keep web fetch tools always on
85
+ - align inbox subpath ts paths
86
+ - narrow inbox runtime bundle surface
87
+ - harden web fetch and pdf tools
88
+ - stabilize repo green checks
89
+ - remove hosted agentmail env
90
+ - bake whisper into hosted runner
91
+ - wire hosted email deploy config
92
+
93
+ ### Changed
94
+ - split query search helpers
95
+ - hard cut over ingress routes
96
+ - land queued web and runtime updates
97
+ - update review-gpt to 0.5.30
98
+ - record wearables semantic correctness completion
99
+ - unify descriptor and wearables policy seams
100
+ - remove transcript distillation
101
+ - remove docs drift from default test lane
102
+ - add contribution kit
103
+ - unify shared descriptors
104
+ - hard-cut hosted web control host allowlist
105
+ - remove stale paddleocr deploy residue
106
+ - align deploy workflow default
107
+ - raise hosted runner baseline
108
+ - remove hosted assistant automation opt-out
109
+ - clear stale coordination ledger
110
+ - clear completed ledger row
111
+ - remove doc inventory
112
+ - remove legacy fallback paths
113
+ - split web search module
114
+ - normalize runner bundle slot storage
115
+ - bump review-gpt to v0.5.24
116
+ - remove npm token fallback
117
+ - remove hosted session helpers
118
+ - narrow shared export surfaces
119
+ - clear completed review-gpt row
120
+ - land pro audit patch set
121
+
122
+ ## [0.1.5] - 2026-04-02
123
+
124
+ ### Fixed
125
+ - unblock hosted web and package publish
126
+
127
+ ### Changed
128
+ - disable dependabot
129
+
130
+ ## [0.1.4] - 2026-04-02
131
+
132
+ ### Fixed
133
+ - tune first-turn onboarding prompt
134
+ - default codex reasoning to medium
135
+ - omit empty npm tag in publish workflow
136
+ - drop onboarding tone prompt
137
+
138
+ ### Changed
139
+ - clear finished boundary-cleanup ledger row
140
+ - clean parser and gateway boundaries
141
+
142
+ ## [0.1.3] - 2026-04-02
143
+
144
+ ### Fixed
145
+ - soften first-turn and memory prompt guidance
146
+ - support hosted inbound attachments
147
+
148
+ ### Changed
149
+ - move gateway and assistant schemas to zod
150
+ - centralize system prompt
151
+ - clarify npm package messaging
152
+
153
+ ## [0.1.2] - 2026-04-02
154
+
155
+ ### Changed
156
+ - stop tracking generated doc inventory
157
+ - add patch rc shortcut
158
+
5
159
  ## [0.1.1] - 2026-04-02
6
160
 
7
161
  ### Added
package/README.md CHANGED
@@ -1,31 +1,89 @@
1
- # `@murphai/murph` (`packages/cli`)
2
-
3
- Owns the `vault-cli` command surface. The CLI may validate inputs and format outputs, but it must delegate all canonical writes to core.
4
-
5
- ## Status
6
-
7
- - Package-local Incur command structure is present under `src/`.
8
- - Command handlers are thin and dependency-injected through `createVaultCli()`.
9
- - Machine-facing callers should rely on Incur's native envelope via `--verbose --format json` instead of a Murph-specific wrapper contract.
10
- - Built-in Incur surfaces such as `--help`, `--schema`, `--llms`, `completions bash`, and the root `--config` / `--no-config` flags are part of the package verification surface and should remain truthful as command metadata evolves.
11
- - Library exports and the executable bin are now split: `src/index.ts` is the package entrypoint, and `src/bin.ts` is the CLI launcher.
12
- - Default runtime services now lazy-load the workspace `@murphai/core`, `@murphai/importers`, and `@murphai/query` package boundaries instead of reaching into sibling `src/` trees.
13
- - `packages/cli` now extends the shared `../../tsconfig.base.json`; `tsconfig.json` is the buildable package project, `tsconfig.build.json` stays as the local build alias, and `tsconfig.typecheck.json` covers package-local scripts and tests.
14
- - Package-local verification scripts and runtime tests now live in TypeScript under `scripts/` and `test/`.
15
- - Local build now runs in this workspace, and the built binary can be exercised with `node dist/bin.js ...` after `pnpm --dir packages/cli build`.
16
- - Top-level retrieval commands now include `search` for lexical read-model search, `search index status` / `search index rebuild` for the optional SQLite FTS index stored in `.runtime/search.sqlite`, with CLI code importing the headless query helpers from `@murphai/assistant-core` instead of keeping a local compatibility layer.
17
- - The inbox CLI runtime now resolves `.runtime` paths through `@murphai/runtime-state`, so inbox config/state/promotions JSON and `inboxd.sqlite` stay aligned with inboxd itself.
18
- - The CLI now also owns an `inbox` command group for local runtime init/source management, diagnostics, backfill, foreground daemon control, and inbox capture review/promotion while importing the underlying headless inbox services from `@murphai/assistant-core`.
19
- - The CLI now also owns an `assistant` command group for provider-backed local chat turns, Ink-backed local chat UI fallback, assistant-session metadata plus local transcripts outside the vault, outbound channel delivery, and an always-on inbox triage loop via `src/assistant-runtime.ts`.
20
- - The dedicated `@murphai/assistant-core` package owns the headless assistant/inbox/vault/operator-config modules plus the shared inbox-app, usecase, and setup/runtime helper layers directly; the CLI now imports that package in place and keeps only command/setup orchestration plus the daemon-aware wrappers that genuinely belong at the CLI transport boundary.
21
- - iMessage-backed inbox and assistant delivery flows now depend directly on `@photon-ai/imessage-kit` instead of late-loading that package at call time, while Telegram delivery and ingestion share the same assistant channel binding abstraction.
22
- - The published CLI package is `@murphai/murph`, and it exposes both `vault-cli` and an onboarding-focused `murph` alias from the same entrypoint; `murph`, `murph --help`, and `murph onboard ...` land on the setup surface, while other operator/data-plane commands stay under `vault-cli`.
1
+ # Murph - Personal Health Assistant
2
+
3
+ Murph is your personal health assistant.
4
+
5
+ Install this package to get the main `murph` command and the full local Murph experience: onboarding, vault setup, local assistant chat, inbox capture, parser tooling, and the always-on assistant loop.
6
+
7
+ The repo implementation happens to live in `packages/cli`, but that is a maintainer detail. For users, `@murphai/murph` is the installable Murph package.
8
+
9
+ [Repository](https://github.com/cobuildwithus/murph) · [Architecture](https://github.com/cobuildwithus/murph/blob/main/ARCHITECTURE.md) · [Hosted control plane](https://github.com/cobuildwithus/murph/blob/main/apps/web/README.md) · [Hosted execution](https://github.com/cobuildwithus/murph/blob/main/apps/cloudflare/README.md)
10
+
11
+ If you want a local, inspectable assistant that keeps durable truth in normal files you can read, this is the package you install.
12
+
13
+ Runtime: Node `>= 22.16.0`.
14
+
15
+ Supported host setup path: macOS and Linux. iMessage remains macOS-only.
16
+
17
+ ## Install
18
+
19
+ ```bash
20
+ npm install -g @murphai/murph@latest
21
+ # or
22
+ pnpm add -g @murphai/murph@latest
23
+ ```
24
+
25
+ ## Quick start
26
+
27
+ ```bash
28
+ murph onboard
29
+ ```
30
+
31
+ `murph onboard` installs or reuses the local parser dependencies, initializes a vault, saves that vault as the default Murph vault for later commands, and walks through assistant, channel, and optional wearable setup.
32
+
33
+ Once setup is complete, the main commands are:
34
+
35
+ ```bash
36
+ murph chat
37
+ murph run
38
+ murph status
39
+ vault-cli inbox doctor
40
+ ```
41
+
42
+ `vault-cli` is still available as a secondary alias for the operator surface, but `murph` is the primary command this package installs.
43
+
44
+ For durable local synthesis that should keep adding up inside the vault, use the derived knowledge wiki commands:
45
+
46
+ ```bash
47
+ vault-cli knowledge compile "Summarize my current sleep notes" --body "# Sleep notes\n\nMagnesium looked helpful for sleep continuity.\n" --source-path research/2026/04/sleep-note.md
48
+ vault-cli knowledge search "sleep magnesium"
49
+ vault-cli knowledge list
50
+ vault-cli knowledge lint
51
+ ```
52
+
53
+ ## What you get
54
+
55
+ - a file-native health vault with canonical writes owned by `@murphai/core`
56
+ - local assistant chat, automation, status, cron, and outbox commands
57
+ - a non-canonical derived knowledge wiki you can compile and inspect under `derived/knowledge/**`
58
+ - inbox capture, review, backfill, and parser-driven attachment extraction
59
+ - optional local device sync through `@murphai/device-syncd`
60
+ - optional local assistant daemon support through `@murphai/assistantd`
61
+
62
+ `@murphai/murph` is the installable local Murph product entrypoint. The wider monorepo also contains hosted control and execution apps, but those are repo internals rather than something npm users need to install directly.
63
+
64
+ ## From source
65
+
66
+ If you are developing from a checkout instead of installing the published package:
67
+
68
+ ```bash
69
+ pnpm install --frozen-lockfile
70
+ pnpm onboard --vault ./vault
71
+ ```
72
+
73
+ If `pnpm` is not available yet, use:
74
+
75
+ ```bash
76
+ ./scripts/setup-host.sh --vault ./vault
77
+ ```
23
78
 
24
79
  ## Config defaults
25
80
 
26
- The root CLI now supports incur's built-in config loading for command option defaults. By default it searches `~/.config/murph/config.json` and then `~/.config/vault-cli/config.json`; `vault-cli --config <path> ...` selects an explicit file, including a repo-local JSON file, and `vault-cli --no-config ...` disables config loading for a single run.
81
+ The CLI supports incur's built-in config loading for command option defaults. By default it searches `~/.config/murph/config.json` and then `~/.config/vault-cli/config.json`.
82
+
83
+ - `murph --config <path> ...` selects an explicit config file
84
+ - `murph --no-config ...` disables config loading for a single run
27
85
 
28
- Config files only supply command `options`, following incur's nested `commands` shape. For example, this file makes `vault-cli init` default to a chosen vault path:
86
+ Config files only supply command `options`, following incur's nested `commands` shape. For example:
29
87
 
30
88
  ```json
31
89
  {
@@ -39,29 +97,26 @@ Config files only supply command `options`, following incur's nested `commands`
39
97
  }
40
98
  ```
41
99
 
42
- ## Host setup (macOS and Linux)
43
-
44
- Once `@murphai/murph` is published, the installed-package onboarding path will be:
45
-
46
- ```bash
47
- murph onboard
48
- ```
100
+ ## Maintainer notes
49
101
 
50
- That command installs or reuses the local parser dependencies (`ffmpeg`, `poppler`/`pdftotext`, `whisper-cpp`), downloads a Whisper model into `~/.murph/toolchain/models/whisper/`, initializes the default `./vault` target unless you override it, saves that vault as the default Murph CLI vault for later commands, runs inbox bootstrap, and then launches `assistant run` automatically when at least one selected channel is fully configured for auto-reply, falling back to `assistant chat` otherwise.
102
+ The package exports the CLI runtime plus assistant helper subpaths from `dist/**`, exposes both `murph` and `vault-cli` bins from the same built entrypoint, and keeps `src/index.ts` as the package entrypoint with `src/bin.ts` as the launcher.
51
103
 
52
- Setup also installs user-level `murph` and `vault-cli` shims into `~/.local/bin`. If that directory is not already on `PATH`, setup appends a managed PATH block to the active shell profile and tells the operator to reload the shell. Once setup has run, the main CLI can omit `--vault` when the saved default is the intended target.
104
+ Machine-facing callers should rely on incur's native envelope via `--verbose --format json` instead of a Murph-specific wrapper contract.
53
105
 
54
- Useful flags include `--dry-run` and `--whisperModel small.en`.
106
+ Current repo-local package responsibilities include:
55
107
 
56
- From a checkout, the supported onboarding path is the repo-local `scripts/setup-host.sh` wrapper. On macOS it delegates to the existing Homebrew-based bootstrap path; on Linux it can reuse or download Node locally, activate pnpm through corepack, install dependencies with the frozen lockfile, build the workspace, and then run the same CLI setup flow. `./scripts/setup-host.sh --dry-run ...` now prints the wrapper bootstrap plan without mutating Homebrew, Node, pnpm, dependencies, or the workspace build. A successful non-dry-run setup now leaves behind working `murph` and `vault-cli` commands for future shells via those user-level shims. iMessage remains macOS-only even though the rest of the host setup now supports Linux.
108
+ - the command graph and onboarding flow
109
+ - local assistant command orchestration and Ink chat UI
110
+ - inbox and device command surfaces that delegate to headless owner packages
111
+ - CLI-only wrappers around shared packages such as `@murphai/assistant-core`, `@murphai/query`, `@murphai/inboxd`, and `@murphai/runtime-state`
57
112
 
58
- ## Release Flow
113
+ ## Release flow
59
114
 
60
- Release/version/publish actions remain user-operated. The monorepo release source of truth is `scripts/release-manifest.json`, and the normal entrypoints are root commands:
115
+ Release and publish actions remain user-operated. The monorepo release source of truth is `scripts/release-manifest.json`, and the normal entrypoints are:
61
116
 
62
117
  ```bash
63
118
  pnpm release:check
64
- pnpm release:patch # or: pnpm release:minor / pnpm release:major
119
+ pnpm release:patch
65
120
  ```
66
121
 
67
122
  Pre-release and exact-version flows use the same root script:
@@ -73,25 +128,13 @@ bash scripts/release.sh 0.1.0-rc.1 --dry-run
73
128
 
74
129
  The release flow bumps every publishable package in the manifest to one shared version, updates `packages/cli/CHANGELOG.md`, writes `packages/cli/release-notes/v<version>.md`, and then creates a repository tag so `.github/workflows/release.yml` can pack and publish all tarballs in dependency order.
75
130
 
76
- The first publish set is:
77
-
78
- - `@murphai/contracts`
79
- - `@murphai/hosted-execution`
80
- - `@murphai/messaging-ingress`
81
- - `@murphai/runtime-state`
82
- - `@murphai/assistant-core`
83
- - `@murphai/gateway-core`
84
- - `@murphai/gateway-local`
85
- - `@murphai/core`
86
- - `@murphai/query`
87
- - `@murphai/importers`
88
- - `@murphai/device-syncd`
89
- - `@murphai/inboxd`
90
- - `@murphai/parsers`
91
- - `@murphai/assistant-runtime`
92
- - `@murphai/assistantd`
93
- - `@murphai/murph`
94
-
95
- `pnpm release:check` now installs with the frozen lockfile, builds the workspace, runs the repo checks, verifies that every workspace dependency in the publish set stays inside the publish set, and packs every publishable package with `pnpm pack`.
96
-
97
- Trusted publishing still has to be configured on npm for each published package entry that this workflow will publish.
131
+ npm trusted publishing is configured per package on npm, not once per repository. Because this monorepo publishes multiple `@murphai/*` packages, maintainers should bootstrap those package-level trust bindings before relying on tag-driven release publication:
132
+
133
+ ```bash
134
+ pnpm release:trust:github -- --dry-run
135
+ pnpm release:trust:github -- --yes
136
+ ```
137
+
138
+ Those commands target the current publishable package set in `scripts/release-manifest.json` and bind each package to `cobuildwithus/murph` via `.github/workflows/release.yml`.
139
+
140
+ If a package is already bound to the wrong workflow or repository in npm, revoke that package's existing trust entry with `npm trust list` and `npm trust revoke`, then rerun `pnpm release:trust:github -- --yes`.