metame-cli 1.3.13 β 1.3.14
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.
- package/README.md +50 -2
- package/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -47,10 +47,11 @@
|
|
|
47
47
|
* **πͺ Metacognition Layer (v1.3):** MetaMe now observes *how* you think, not just *what* you say. Behavioral pattern detection runs inside the existing Haiku distill call (zero extra cost). It tracks decision patterns, cognitive load, comfort zones, and avoidance topics across sessions. When persistent patterns emerge, MetaMe injects a one-line mirror observation β e.g., *"You tend to avoid testing until forced"* β with a 14-day cooldown per pattern. Conditional reflection prompts appear only when triggered (every 7th distill or 3x consecutive comfort zone). All injection logic runs in Node.js; Claude receives only pre-decided directives, never rules to self-evaluate.
|
|
48
48
|
* **π± Remote Claude Code (v1.3):** Full Claude Code from your phone via Telegram or Feishu (Lark). Stateful sessions with `--resume` β same conversation history, tool use, and file editing as your terminal. Interactive buttons for project/session picking, directory browser, and macOS launchd auto-start.
|
|
49
49
|
* **π Workflow Engine (v1.3):** Define multi-step skill chains as heartbeat tasks. Each workflow runs in a single Claude Code session via `--resume`, so step outputs flow as context to the next step. Example: `deep-research` β `tech-writing` β `wechat-publisher` β fully automated content pipeline.
|
|
50
|
-
* **βΉ Full Terminal Control from Mobile (v1.3.
|
|
51
|
-
* **π₯ Emergency Recovery (v1.3.13):** `/doctor` interactive diagnostics with one-tap fix buttons, `/sh` direct shell access from your phone (bypasses Claude entirely β the lifeline when everything else is broken), automatic config backup before any setting change, `/fix` to restore last known good config.
|
|
50
|
+
* **βΉ Full Terminal Control from Mobile (v1.3.10):** `/stop` (ESC), `/undo` (ESCΓ2) with native file-history restoration, concurrent task protection, daemon auto-restart, and `metame continue` for seamless mobile-to-desktop sync.
|
|
52
51
|
* **π― Goal Alignment & Drift Detection (v1.3.11):** MetaMe now tracks whether your sessions align with your declared goals. Each distill assesses `goal_alignment` (aligned/partial/drifted) at zero extra API cost. When you drift for 2+ consecutive sessions, a mirror observation is injected passively; after 3+ sessions, a reflection prompt gently asks: "Was this an intentional pivot, or did you lose track?" Session logs now record project, branch, intent, and file directories for richer retrospective analysis. Pattern detection can spot sustained drift trends across your session history.
|
|
52
|
+
* **π Provider Relay (v1.3.11):** Use any Anthropic-compatible API relay as your backend β no file mutation, no invasion. MetaMe injects `ANTHROPIC_BASE_URL` + `ANTHROPIC_API_KEY` at spawn time. Separate provider roles for `active`, `distill`, and `daemon` tasks. CLI: `metame provider add/use/remove/test`. Config stored in `~/.metame/providers.yaml`.
|
|
53
53
|
* **π Session History Bootstrap (v1.3.12):** Solves the cold-start problem β MetaMe previously needed 5-7 sessions before producing any visible feedback. Now, on first launch it auto-bootstraps your session history from existing Claude Code JSONL transcripts (zero API cost). Three complementary data layers: **Skeleton** (structural facts extracted locally β tools, duration, project, branch, intent), **Facets** (interaction quality from `/insights` β outcome, friction, satisfaction, when available), and **Haiku** (metacognitive judgments β cognitive load, zones, goal alignment, from the existing distill call). Patterns and mirror observations can appear from your very first MetaMe session.
|
|
54
|
+
* **π₯ Emergency Recovery (v1.3.13):** `/doctor` interactive diagnostics with one-tap fix buttons, `/sh` direct shell access from your phone (bypasses Claude entirely β the lifeline when everything else is broken), automatic config backup before any setting change, `/fix` to restore last known good config. `/model` interactive model switcher with auto-backup.
|
|
54
55
|
|
|
55
56
|
## π Prerequisites
|
|
56
57
|
|
|
@@ -386,6 +387,41 @@ Each step runs in the same Claude Code session. Step outputs automatically becom
|
|
|
386
387
|
* `~/.metame/` directory set to mode 700
|
|
387
388
|
* Bot tokens stored locally, never transmitted
|
|
388
389
|
|
|
390
|
+
### Provider Relay β Third-Party Model Support (v1.3.11)
|
|
391
|
+
|
|
392
|
+
MetaMe supports any Anthropic-compatible API relay as a backend. This means you can route Claude Code through a third-party relay that maps `sonnet`/`opus`/`haiku` to any model (GPT-4, DeepSeek, Gemini, etc.) β MetaMe passes standard model names and the relay handles translation.
|
|
393
|
+
|
|
394
|
+
**How it works:** At spawn time, MetaMe injects `ANTHROPIC_BASE_URL` + `ANTHROPIC_API_KEY` environment variables. Zero file mutation β `~/.claude/settings.json` is never touched.
|
|
395
|
+
|
|
396
|
+
**CLI commands:**
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
metame provider # List all providers
|
|
400
|
+
metame provider add <name> # Add a relay (prompts for URL & key)
|
|
401
|
+
metame provider use <name> # Switch active provider
|
|
402
|
+
metame provider remove <name> # Remove a provider (can't remove 'anthropic')
|
|
403
|
+
metame provider test [name] # Test connectivity
|
|
404
|
+
metame provider set-role distill <name> # Use a different provider for background distill
|
|
405
|
+
metame provider set-role daemon <name> # Use a different provider for daemon tasks
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**Configuration** (`~/.metame/providers.yaml`):
|
|
409
|
+
|
|
410
|
+
```yaml
|
|
411
|
+
active: 'anthropic'
|
|
412
|
+
providers:
|
|
413
|
+
anthropic:
|
|
414
|
+
label: 'Anthropic (Official)'
|
|
415
|
+
my-relay:
|
|
416
|
+
label: 'My Relay'
|
|
417
|
+
base_url: 'https://api.relay.example.com/v1'
|
|
418
|
+
api_key: 'sk-xxx'
|
|
419
|
+
distill_provider: null # null = use active
|
|
420
|
+
daemon_provider: null # null = use active
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
Three independent provider roles let you optimize cost: e.g., use an official Anthropic key for active work, a cheaper relay for background distill, and another for daemon heartbeat tasks.
|
|
424
|
+
|
|
389
425
|
### Hot Reload (Refresh)
|
|
390
426
|
|
|
391
427
|
If you update your profile or need to fix a broken context **without restarting your session**:
|
|
@@ -544,6 +580,18 @@ A: No. It *prepends* its meta-cognitive protocol to your existing `CLAUDE.md`. Y
|
|
|
544
580
|
**Q: Is my data sent to a third party?**
|
|
545
581
|
A: No. Your profile stays local at `~/.claude_profile.yaml`. MetaMe simply passes text to the official Claude Code tool.
|
|
546
582
|
|
|
583
|
+
## π Changelog
|
|
584
|
+
|
|
585
|
+
| Version | Highlights |
|
|
586
|
+
|---------|------------|
|
|
587
|
+
| **v1.3.13** | `/doctor` diagnostics, `/sh` direct shell, `/fix` config restore, `/model` interactive switcher with auto-backup, daemon state caching & config backup/restore |
|
|
588
|
+
| **v1.3.12** | Session history bootstrap (cold-start fix), three-layer data architecture (Skeleton + Facets + Haiku), session summary extraction |
|
|
589
|
+
| **v1.3.11** | Goal alignment & drift detection, provider relay system for third-party models, `/insights` facet integration |
|
|
590
|
+
| **v1.3.10** | `/stop`, `/undo` with file restoration, `/model`, concurrent task protection, `metame continue`, daemon auto-restart on code change |
|
|
591
|
+
| **v1.3.8** | Bidirectional file transfer (phone β computer) |
|
|
592
|
+
| **v1.3.7** | Real-time streaming status on mobile |
|
|
593
|
+
| **v1.3** | Metacognition layer, remote Claude Code (Telegram & Feishu), workflow engine, heartbeat tasks, launchd auto-start |
|
|
594
|
+
|
|
547
595
|
## π License
|
|
548
596
|
|
|
549
597
|
MIT License. Feel free to fork, modify, and evolve your own Meta-Cognition.
|
package/index.js
CHANGED
|
@@ -23,7 +23,7 @@ if (!fs.existsSync(METAME_DIR)) {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
// Auto-deploy bundled scripts to ~/.metame/
|
|
26
|
-
const BUNDLED_SCRIPTS = ['signal-capture.js', 'distill.js', 'schema.js', 'pending-traits.js', 'migrate-v2.js', 'daemon.js', 'telegram-adapter.js', 'feishu-adapter.js', 'daemon-default.yaml', 'providers.js', 'session-analytics.js'];
|
|
26
|
+
const BUNDLED_SCRIPTS = ['signal-capture.js', 'distill.js', 'schema.js', 'pending-traits.js', 'migrate-v2.js', 'daemon.js', 'telegram-adapter.js', 'feishu-adapter.js', 'daemon-default.yaml', 'providers.js', 'session-analytics.js', 'resolve-yaml.js', 'utils.js'];
|
|
27
27
|
const scriptsDir = path.join(__dirname, 'scripts');
|
|
28
28
|
|
|
29
29
|
for (const script of BUNDLED_SCRIPTS) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "metame-cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.14",
|
|
4
4
|
"description": "The Cognitive Profile Layer for Claude Code. Knows how you think, not just what you said.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"test": "node --test scripts/*.test.js",
|
|
15
15
|
"start": "node index.js",
|
|
16
|
-
"sync:plugin": "cp scripts/schema.js scripts/pending-traits.js scripts/signal-capture.js scripts/distill.js scripts/daemon.js scripts/telegram-adapter.js scripts/feishu-adapter.js scripts/daemon-default.yaml scripts/providers.js scripts/utils.js plugin/scripts/ && echo 'β
Plugin scripts synced'",
|
|
16
|
+
"sync:plugin": "cp scripts/schema.js scripts/pending-traits.js scripts/signal-capture.js scripts/distill.js scripts/daemon.js scripts/telegram-adapter.js scripts/feishu-adapter.js scripts/daemon-default.yaml scripts/providers.js scripts/utils.js scripts/resolve-yaml.js plugin/scripts/ && echo 'β
Plugin scripts synced'",
|
|
17
17
|
"restart:daemon": "node index.js stop 2>/dev/null; sleep 1; node index.js start 2>/dev/null || echo 'β οΈ Daemon not running or restart failed'",
|
|
18
18
|
"precommit": "npm run sync:plugin && npm run restart:daemon"
|
|
19
19
|
},
|