mercury-agent 0.5.0 → 0.5.2
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 +452 -451
- package/container/Dockerfile +127 -127
- package/container/Dockerfile.base +109 -109
- package/container/Dockerfile.power +17 -17
- package/container/agent-package.json +8 -8
- package/container/build.sh +54 -54
- package/docs/ROADMAP.md +3 -4
- package/docs/archive/summarization/2026-07-02-recent-dev-summary.md +71 -0
- package/docs/auth/dashboard.md +28 -28
- package/docs/auth/overview.md +109 -109
- package/docs/auth/whatsapp.md +173 -173
- package/docs/authoring-profiles.md +174 -174
- package/docs/configuration.md +54 -54
- package/docs/container-lifecycle.md +349 -349
- package/docs/{bugs/bwrap-privileged-linux-docker.md → debug/major/2026-07-02-bwrap-privileged-linux-docker.md} +21 -1
- package/docs/{bugs/e2big-prompt-delivery-fix.md → debug/major/2026-07-02-e2big-prompt-delivery-fix.md} +27 -1
- package/docs/{bugs/registry-pull-no-local-fallback.md → debug/major/2026-07-02-registry-pull-no-local-fallback.md} +27 -1
- package/docs/debug/summarization/2026-07-02-common-bug-patterns.md +72 -0
- package/docs/deployment.md +199 -199
- package/docs/extensions.md +375 -375
- package/docs/graceful-shutdown.md +62 -62
- package/docs/kb-distillation.md +77 -77
- package/docs/media/overview.md +140 -140
- package/docs/media/whatsapp.md +171 -171
- package/docs/memory.md +137 -137
- package/docs/permissions.md +217 -217
- package/docs/pipeline.md +228 -228
- package/docs/prd-chat-memory.md +76 -76
- package/docs/prd-config-load.md +82 -82
- package/docs/rate-limiting.md +229 -229
- package/docs/runbooks/publish-checklist.md +9 -1
- package/docs/scheduler.md +288 -288
- package/docs/setup-discord.md +100 -100
- package/docs/setup-slack.md +119 -119
- package/docs/setup-whatsapp.md +94 -94
- package/docs/subagents.md +166 -166
- package/docs/web-search.md +62 -62
- package/examples/extensions/README.md +12 -12
- package/examples/extensions/charts/index.ts +13 -13
- package/examples/extensions/charts/skill/SKILL.md +98 -98
- package/examples/extensions/gws/README.md +52 -52
- package/examples/extensions/gws/skill/SKILL.md +57 -57
- package/examples/extensions/gws/skill/references/calendar.md +101 -101
- package/examples/extensions/gws/skill/references/docs.md +65 -65
- package/examples/extensions/gws/skill/references/drive.md +79 -79
- package/examples/extensions/gws/skill/references/gmail.md +85 -85
- package/examples/extensions/gws/skill/references/sheets.md +60 -60
- package/examples/extensions/napkin/skill/SKILL.md +728 -728
- package/examples/extensions/pdf/skill/LICENSE.txt +30 -30
- package/examples/extensions/pdf/skill/SKILL.md +314 -314
- package/examples/extensions/pdf/skill/forms.md +294 -294
- package/examples/extensions/pdf/skill/reference.md +611 -611
- package/examples/extensions/pdf/skill/scripts/check_bounding_boxes.py +65 -65
- package/examples/extensions/pdf/skill/scripts/check_fillable_fields.py +11 -11
- package/examples/extensions/pdf/skill/scripts/convert_pdf_to_images.py +33 -33
- package/examples/extensions/pdf/skill/scripts/create_validation_image.py +37 -37
- package/examples/extensions/pdf/skill/scripts/extract_form_field_info.py +122 -122
- package/examples/extensions/pdf/skill/scripts/extract_form_structure.py +115 -115
- package/examples/extensions/pdf/skill/scripts/fill_fillable_fields.py +98 -98
- package/examples/extensions/pdf/skill/scripts/fill_pdf_form_with_annotations.py +107 -107
- package/examples/extensions/permission-guard/index.ts +65 -65
- package/examples/extensions/pinchtab/skill/SKILL.md +224 -224
- package/examples/extensions/pinchtab/skill/TRUST.md +69 -69
- package/examples/extensions/pinchtab/skill/references/api.md +297 -297
- package/examples/extensions/pinchtab/skill/references/env.md +45 -45
- package/examples/extensions/pinchtab/skill/references/profiles.md +107 -107
- package/examples/extensions/tradestation/host/refresh.ts +102 -102
- package/examples/extensions/tradestation/index.ts +153 -153
- package/examples/extensions/tradestation/skill/SKILL.md +67 -67
- package/examples/extensions/voice-synth/index.ts +94 -94
- package/examples/extensions/voice-synth/skill/SKILL.md +38 -38
- package/examples/extensions/voice-transcribe/requirements.txt +8 -8
- package/examples/extensions/voice-transcribe/scripts/transcribe.py +179 -179
- package/examples/extensions/voice-transcribe/skill/SKILL.md +53 -53
- package/examples/extensions/yahoo-mail/cli/package.json +13 -13
- package/examples/extensions/yahoo-mail/skill/SKILL.md +78 -78
- package/package.json +106 -106
- package/resources/agents/explore.md +50 -50
- package/resources/agents/worker.md +24 -24
- package/resources/connection-env-vars.json +25 -25
- package/resources/pi-extensions/subagent/agents.ts +126 -126
- package/resources/pi-extensions/subagent/index.ts +964 -964
- package/resources/profiles/coding/AGENTS.md +43 -43
- package/resources/profiles/coding/mercury-profile.yaml +15 -15
- package/resources/profiles/general/AGENTS.md +31 -31
- package/resources/profiles/general/mercury-profile.yaml +15 -15
- package/resources/profiles/research/AGENTS.md +40 -40
- package/resources/profiles/research/mercury-profile.yaml +15 -15
- package/resources/skills/config/SKILL.md +25 -25
- package/resources/skills/context/SKILL.md +33 -33
- package/resources/skills/conversation-recap/SKILL.md +19 -19
- package/resources/skills/mutes/SKILL.md +31 -31
- package/resources/skills/permissions/SKILL.md +19 -19
- package/resources/skills/preferences/SKILL.md +31 -31
- package/resources/skills/recall/SKILL.md +24 -24
- package/resources/skills/roles/SKILL.md +18 -18
- package/resources/skills/spaces/SKILL.md +18 -18
- package/resources/skills/tasks/SKILL.md +45 -45
- package/resources/templates/AGENTS.md +157 -157
- package/resources/templates/env.template +38 -38
- package/resources/templates/mercury.example.yaml +99 -99
- package/src/agent/container-entry.ts +1 -1
- package/src/agent/container-runner.ts +1345 -1346
- package/src/cli/mercury.ts +39 -7
- package/src/cli/mrctl.ts +636 -636
- package/src/config-file.ts +540 -540
- package/src/config.ts +339 -339
- package/src/core/api.ts +125 -125
- package/src/core/caller-token.ts +101 -101
- package/src/core/permissions.ts +228 -228
- package/src/core/profiles.ts +271 -271
- package/src/core/routes/capability.ts +70 -70
- package/src/core/routes/index.ts +15 -15
- package/src/core/runtime.ts +1530 -1530
- package/src/dashboard/index.html +729 -729
- package/src/extensions/api.ts +273 -273
- package/src/extensions/loader.ts +286 -286
- package/src/extensions/types.ts +517 -517
- package/src/main.ts +605 -605
- package/docs/pending-updates/applicative-profiles.md +0 -15
- package/docs/pending-updates/caller-bound-capability-token.md +0 -15
- package/docs/pending-updates/dm-auto-space.md +0 -15
- /package/docs/archive/{2026-07-01-applicative-profiles.md → applicative-profiles/2026-07-01-applicative-profiles.md} +0 -0
- /package/docs/archive/{2026-07-01-caller-bound-capability-token.md → applicative-profiles/2026-07-01-caller-bound-capability-token.md} +0 -0
- /package/docs/archive/{2026-07-01-dm-auto-space.md → applicative-profiles/2026-07-01-dm-auto-space.md} +0 -0
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
# Copy to mercury.yaml in your project root (optional).
|
|
2
|
-
# Precedence: MERCURY_* env vars override this file when the env key is set.
|
|
3
|
-
# Secrets (API keys, tokens, MERCURY_API_SECRET, etc.) belong in .env only — not here.
|
|
4
|
-
|
|
5
|
-
# server:
|
|
6
|
-
# port: 8787
|
|
7
|
-
# bot_username: mercury
|
|
8
|
-
|
|
9
|
-
# model:
|
|
10
|
-
# chain:
|
|
11
|
-
# - provider: anthropic
|
|
12
|
-
# model: claude-
|
|
13
|
-
# # Legacy single primary + optional fallback (when chain is omitted):
|
|
14
|
-
# # provider: anthropic
|
|
15
|
-
# # model: claude-
|
|
16
|
-
# # fallback_provider: openai
|
|
17
|
-
# # fallback: gpt-4o-mini
|
|
18
|
-
# # max_retries_per_leg: 2
|
|
19
|
-
# # chain_budget_ms: 120000
|
|
20
|
-
# # capabilities: { tools: false }
|
|
21
|
-
|
|
22
|
-
# Top-level alias for model.chain (optional; model.chain wins if both are set):
|
|
23
|
-
# model_chain:
|
|
24
|
-
# - provider: google
|
|
25
|
-
# model: gemini-2.5-flash
|
|
26
|
-
|
|
27
|
-
# ingress:
|
|
28
|
-
# discord: false
|
|
29
|
-
# slack: false
|
|
30
|
-
# teams: false
|
|
31
|
-
# whatsapp: false
|
|
32
|
-
# telegram: false
|
|
33
|
-
|
|
34
|
-
# runtime:
|
|
35
|
-
# data_dir: .mercury
|
|
36
|
-
# # auth_path: ...
|
|
37
|
-
# # whatsapp_auth_dir: .mercury/whatsapp-auth
|
|
38
|
-
# max_concurrency: 2
|
|
39
|
-
# log_level: info
|
|
40
|
-
# log_format: text
|
|
41
|
-
# rate_limit_per_user: 10
|
|
42
|
-
# rate_limit_window_ms: 60000
|
|
43
|
-
# rate_limit_daily_member: 0 # 0 = unlimited; global daily message cap for members
|
|
44
|
-
# rate_limit_daily_admin: 0 # 0 = unlimited; global daily message cap for admins
|
|
45
|
-
|
|
46
|
-
# trigger:
|
|
47
|
-
# patterns: "@Mercury,Mercury"
|
|
48
|
-
# match: mention
|
|
49
|
-
|
|
50
|
-
# conditional_context:
|
|
51
|
-
# enabled: true
|
|
52
|
-
# classifier: heuristic
|
|
53
|
-
# # classifier_provider: groq
|
|
54
|
-
# # classifier_model: llama-3.3-70b-versatile
|
|
55
|
-
|
|
56
|
-
# compaction:
|
|
57
|
-
# keep_recent_tokens: 20000
|
|
58
|
-
# # After each full-session run, auto-compact if the pi session has more than this many entries (10–10000). Omit to disable.
|
|
59
|
-
# # auto_compact_threshold: 50
|
|
60
|
-
|
|
61
|
-
# agent:
|
|
62
|
-
# image: ghcr.io/avishai-tsabari/mercury-agent:latest
|
|
63
|
-
# container_timeout_ms: 300000
|
|
64
|
-
# container_bwrap_docker_compat: false
|
|
65
|
-
|
|
66
|
-
# discord:
|
|
67
|
-
# gateway_duration_ms: 600000
|
|
68
|
-
|
|
69
|
-
# telegram:
|
|
70
|
-
# format_enabled: true
|
|
71
|
-
|
|
72
|
-
# media:
|
|
73
|
-
# enabled: true
|
|
74
|
-
# max_size_mb: 10
|
|
75
|
-
|
|
76
|
-
# permissions:
|
|
77
|
-
# admins: ""
|
|
78
|
-
|
|
79
|
-
# dm_auto_space:
|
|
80
|
-
# enabled: false
|
|
81
|
-
# admin_ids: # auto-link to "main" space
|
|
82
|
-
# - "972501234567"
|
|
83
|
-
# default_system_prompt: "" # seeded into auto-created customer spaces
|
|
84
|
-
# default_member_permissions: "prompt,prefs.get" # restrict customers to chat only
|
|
85
|
-
|
|
86
|
-
# ─── Applicative profile ────────────────────────────────────────────────────
|
|
87
|
-
# A profile wraps raw capabilities with deterministic business logic and scopes
|
|
88
|
-
# what members may do. Apply one with `mercury profile apply <name|path|git-url>`
|
|
89
|
-
# (it persists to .mercury/active-profile.json and is loaded at startup).
|
|
90
|
-
# The active profile's member_permissions become the EXHAUSTIVE member set, and
|
|
91
|
-
# its capabilities run host-side via `mrctl capability <name> <action>` so
|
|
92
|
-
# credentials never enter the agent container.
|
|
93
|
-
#
|
|
94
|
-
# Env-only override of the active profile name (informational):
|
|
95
|
-
# MERCURY_PROFILE=barber-appointments
|
|
96
|
-
#
|
|
97
|
-
# Host-only signing key for per-turn caller tokens (auto-generated if unset;
|
|
98
|
-
# only set when the API and container-runner run in separate processes):
|
|
99
|
-
# MERCURY_CALLER_TOKEN_KEY=<random-secret>
|
|
1
|
+
# Copy to mercury.yaml in your project root (optional).
|
|
2
|
+
# Precedence: MERCURY_* env vars override this file when the env key is set.
|
|
3
|
+
# Secrets (API keys, tokens, MERCURY_API_SECRET, etc.) belong in .env only — not here.
|
|
4
|
+
|
|
5
|
+
# server:
|
|
6
|
+
# port: 8787
|
|
7
|
+
# bot_username: mercury
|
|
8
|
+
|
|
9
|
+
# model:
|
|
10
|
+
# chain:
|
|
11
|
+
# - provider: anthropic
|
|
12
|
+
# model: claude-opus-4-8
|
|
13
|
+
# # Legacy single primary + optional fallback (when chain is omitted):
|
|
14
|
+
# # provider: anthropic
|
|
15
|
+
# # model: claude-opus-4-8
|
|
16
|
+
# # fallback_provider: openai
|
|
17
|
+
# # fallback: gpt-4o-mini
|
|
18
|
+
# # max_retries_per_leg: 2
|
|
19
|
+
# # chain_budget_ms: 120000
|
|
20
|
+
# # capabilities: { tools: false }
|
|
21
|
+
|
|
22
|
+
# Top-level alias for model.chain (optional; model.chain wins if both are set):
|
|
23
|
+
# model_chain:
|
|
24
|
+
# - provider: google
|
|
25
|
+
# model: gemini-2.5-flash
|
|
26
|
+
|
|
27
|
+
# ingress:
|
|
28
|
+
# discord: false
|
|
29
|
+
# slack: false
|
|
30
|
+
# teams: false
|
|
31
|
+
# whatsapp: false
|
|
32
|
+
# telegram: false
|
|
33
|
+
|
|
34
|
+
# runtime:
|
|
35
|
+
# data_dir: .mercury
|
|
36
|
+
# # auth_path: ...
|
|
37
|
+
# # whatsapp_auth_dir: .mercury/whatsapp-auth
|
|
38
|
+
# max_concurrency: 2
|
|
39
|
+
# log_level: info
|
|
40
|
+
# log_format: text
|
|
41
|
+
# rate_limit_per_user: 10
|
|
42
|
+
# rate_limit_window_ms: 60000
|
|
43
|
+
# rate_limit_daily_member: 0 # 0 = unlimited; global daily message cap for members
|
|
44
|
+
# rate_limit_daily_admin: 0 # 0 = unlimited; global daily message cap for admins
|
|
45
|
+
|
|
46
|
+
# trigger:
|
|
47
|
+
# patterns: "@Mercury,Mercury"
|
|
48
|
+
# match: mention
|
|
49
|
+
|
|
50
|
+
# conditional_context:
|
|
51
|
+
# enabled: true
|
|
52
|
+
# classifier: heuristic
|
|
53
|
+
# # classifier_provider: groq
|
|
54
|
+
# # classifier_model: llama-3.3-70b-versatile
|
|
55
|
+
|
|
56
|
+
# compaction:
|
|
57
|
+
# keep_recent_tokens: 20000
|
|
58
|
+
# # After each full-session run, auto-compact if the pi session has more than this many entries (10–10000). Omit to disable.
|
|
59
|
+
# # auto_compact_threshold: 50
|
|
60
|
+
|
|
61
|
+
# agent:
|
|
62
|
+
# image: ghcr.io/avishai-tsabari/mercury-agent:latest
|
|
63
|
+
# container_timeout_ms: 300000
|
|
64
|
+
# container_bwrap_docker_compat: false
|
|
65
|
+
|
|
66
|
+
# discord:
|
|
67
|
+
# gateway_duration_ms: 600000
|
|
68
|
+
|
|
69
|
+
# telegram:
|
|
70
|
+
# format_enabled: true
|
|
71
|
+
|
|
72
|
+
# media:
|
|
73
|
+
# enabled: true
|
|
74
|
+
# max_size_mb: 10
|
|
75
|
+
|
|
76
|
+
# permissions:
|
|
77
|
+
# admins: ""
|
|
78
|
+
|
|
79
|
+
# dm_auto_space:
|
|
80
|
+
# enabled: false
|
|
81
|
+
# admin_ids: # auto-link to "main" space
|
|
82
|
+
# - "972501234567"
|
|
83
|
+
# default_system_prompt: "" # seeded into auto-created customer spaces
|
|
84
|
+
# default_member_permissions: "prompt,prefs.get" # restrict customers to chat only
|
|
85
|
+
|
|
86
|
+
# ─── Applicative profile ────────────────────────────────────────────────────
|
|
87
|
+
# A profile wraps raw capabilities with deterministic business logic and scopes
|
|
88
|
+
# what members may do. Apply one with `mercury profile apply <name|path|git-url>`
|
|
89
|
+
# (it persists to .mercury/active-profile.json and is loaded at startup).
|
|
90
|
+
# The active profile's member_permissions become the EXHAUSTIVE member set, and
|
|
91
|
+
# its capabilities run host-side via `mrctl capability <name> <action>` so
|
|
92
|
+
# credentials never enter the agent container.
|
|
93
|
+
#
|
|
94
|
+
# Env-only override of the active profile name (informational):
|
|
95
|
+
# MERCURY_PROFILE=barber-appointments
|
|
96
|
+
#
|
|
97
|
+
# Host-only signing key for per-turn caller tokens (auto-generated if unset;
|
|
98
|
+
# only set when the API and container-runner run in separate processes):
|
|
99
|
+
# MERCURY_CALLER_TOKEN_KEY=<random-secret>
|