mercury-agent 0.4.23 → 0.4.25

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 (60) hide show
  1. package/README.md +5 -0
  2. package/docs/ARCHITECTURE.md +30 -0
  3. package/docs/DESIGN.md +42 -0
  4. package/docs/ROADMAP.md +41 -0
  5. package/docs/VISION.md +32 -0
  6. package/docs/archive/.gitkeep +0 -0
  7. package/docs/backlog/.gitkeep +0 -0
  8. package/docs/bugs/.gitkeep +0 -0
  9. package/docs/bugs/bwrap-privileged-linux-docker.md +140 -0
  10. package/docs/debug/major/.gitkeep +0 -0
  11. package/docs/debug/minor/.gitkeep +0 -0
  12. package/docs/debug/moderate/.gitkeep +0 -0
  13. package/docs/html-slides/.gitkeep +0 -0
  14. package/docs/ideas/.gitkeep +0 -0
  15. package/docs/in-progress/.gitkeep +0 -0
  16. package/docs/notes/.gitkeep +0 -0
  17. package/docs/pending-updates/.gitkeep +0 -0
  18. package/docs/runbooks/publish-checklist.md +46 -0
  19. package/docs/templates/TEMPLATE-AUTOPILOT-CONFIG.yaml +35 -0
  20. package/docs/templates/TEMPLATE-BUG.md +71 -0
  21. package/docs/templates/TEMPLATE-CI.yml +25 -0
  22. package/docs/templates/TEMPLATE-DECISIONS.md +11 -0
  23. package/docs/templates/TEMPLATE-FEATURE.md +127 -0
  24. package/docs/templates/TEMPLATE-GOAL.md +31 -0
  25. package/docs/templates/TEMPLATE-IDEA.md +31 -0
  26. package/docs/templates/TEMPLATE-NOTE.md +27 -0
  27. package/docs/templates/TEMPLATE-ROADMAP.md +21 -0
  28. package/examples/extensions/pinchtab/index.ts +1 -1
  29. package/package.json +1 -1
  30. package/src/adapters/whatsapp.ts +635 -635
  31. package/src/agent/container-entry.ts +1021 -1021
  32. package/src/agent/container-runner.ts +18 -12
  33. package/src/agent/model-capabilities.ts +231 -231
  34. package/src/bridges/discord.ts +178 -178
  35. package/src/bridges/slack.ts +179 -179
  36. package/src/bridges/teams.ts +162 -162
  37. package/src/bridges/telegram.ts +579 -579
  38. package/src/cli/mercury.ts +2587 -2585
  39. package/src/cli/whatsapp-auth.ts +263 -263
  40. package/src/config.ts +316 -316
  41. package/src/core/commands.ts +110 -110
  42. package/src/core/permissions.ts +196 -196
  43. package/src/core/router.ts +211 -204
  44. package/src/core/routes/chat.ts +175 -175
  45. package/src/core/routes/dashboard.ts +2493 -2493
  46. package/src/core/routes/messages.ts +37 -37
  47. package/src/core/routes/mutes.ts +95 -95
  48. package/src/core/routes/roles.ts +135 -135
  49. package/src/core/runtime.ts +1508 -1508
  50. package/src/core/task-scheduler.ts +139 -139
  51. package/src/extensions/catalog.ts +117 -117
  52. package/src/extensions/hooks.ts +161 -161
  53. package/src/extensions/installer.ts +306 -306
  54. package/src/extensions/loader.ts +271 -271
  55. package/src/extensions/permission-guard.ts +52 -52
  56. package/src/server.ts +391 -391
  57. package/src/storage/db.ts +1684 -1687
  58. package/src/storage/pi-auth.ts +95 -95
  59. package/src/tts/azure.ts +52 -52
  60. package/src/tts/synthesize.ts +133 -133
@@ -0,0 +1,31 @@
1
+ # {Idea Title}
2
+
3
+ **Status**: Idea | Considering | Promoted | Dropped
4
+ **Slug**: {slug}
5
+ **Created**: {YYYY-MM-DD}
6
+
7
+ ---
8
+
9
+ ## Problem
10
+
11
+ > What pain or opportunity does this address? For whom?
12
+
13
+ ## Idea
14
+
15
+ > One paragraph. What's the rough solution or approach?
16
+
17
+ ## How It Might Work
18
+
19
+ > Optional rough sketch — not architecture, just enough to evaluate feasibility.
20
+
21
+ | What | Where |
22
+ |------|-------|
23
+ | … | … |
24
+
25
+ ## Why Now
26
+
27
+ > What makes this worth capturing? Urgency, dependencies, strategic fit.
28
+
29
+ ## Open Questions
30
+
31
+ - [ ] …
@@ -0,0 +1,27 @@
1
+ # {Title}
2
+
3
+ **Date**: {YYYY-MM-DD}
4
+ **Context**: {What triggered this note — a question, comparison, research session, or discussion.}
5
+
6
+ ---
7
+
8
+ ## Summary
9
+
10
+ > 2–3 sentences. What was explored and what's the takeaway?
11
+
12
+ ## Findings
13
+
14
+ > Main content. Structure freely — tables, sections, bullet lists, whatever fits the topic.
15
+
16
+ ## Decisions
17
+
18
+ > Optional. Concrete decisions made during or after this session. Omit if the note is purely informational.
19
+
20
+ - {Decision 1}
21
+ - {Decision 2}
22
+
23
+ ## Open Questions
24
+
25
+ > Optional. Unresolved items worth revisiting. Omit if none.
26
+
27
+ - [ ] {Question 1}
@@ -0,0 +1,21 @@
1
+ # Roadmap: {Goal Title}
2
+
3
+ **Goal**: [{goal-slug}](goal.md)
4
+ **Last updated**: {YYYY-MM-DD}
5
+
6
+ ## Milestones
7
+
8
+ ### Milestone 1: {name}
9
+ > {One-line description of what's testable after this milestone}
10
+
11
+ | ID | Story | Slug | Depends on | Status |
12
+ |----|-------|------|------------|--------|
13
+ | M1.1 | {story title} | {feature-slug} | — | backlog |
14
+ | M1.2 | {story title} | {feature-slug} | M1.1 | blocked |
15
+
16
+ **Checkpoint:** {What the human should test after this milestone completes}
17
+
18
+ ## Dependency Graph
19
+
20
+ {ASCII or text description of which stories block which. Can be as simple as
21
+ "1 → 2 → 3, 1 → 4" for linear + parallel branches.}
@@ -8,7 +8,7 @@ export default function (mercury: {
8
8
  mercury.cli({
9
9
  name: "pinchtab",
10
10
  install:
11
- 'npm install -g pinchtab playwright && npx playwright install --with-deps chromium && CHROMIUM=$(NODE_PATH="$(npm root -g)" node -e "try{process.stdout.write(require(\'playwright\').chromium.executablePath())}catch(e){}" 2>/dev/null) && { test -x "$CHROMIUM" || CHROMIUM=$(find /home/mercury/.cache/ms-playwright -type f -path \'*/chrome-linux/chrome\' ! -path \'*headless_shell*\' 2>/dev/null | head -1); } && test -n "$CHROMIUM" && test -x "$CHROMIUM" && ln -sf "$CHROMIUM" /usr/local/bin/chromium && ln -sf "$CHROMIUM" /usr/bin/chromium && rm -rf /var/lib/apt/lists/*',
11
+ 'npm install -g pinchtab@0.13.2 playwright && npx playwright install --with-deps chromium && CHROMIUM=$(NODE_PATH="$(npm root -g)" node -e "try{process.stdout.write(require(\'playwright\').chromium.executablePath())}catch(e){}" 2>/dev/null) && { test -x "$CHROMIUM" || CHROMIUM=$(find /home/mercury/.cache/ms-playwright -type f -path \'*/chrome-linux/chrome\' ! -path \'*headless_shell*\' 2>/dev/null | head -1); } && test -n "$CHROMIUM" && test -x "$CHROMIUM" && ln -sf "$CHROMIUM" /usr/local/bin/chromium && ln -sf "$CHROMIUM" /usr/bin/chromium && rm -rf /var/lib/apt/lists/*',
12
12
  });
13
13
  mercury.permission({ defaultRoles: ["admin", "member"] });
14
14
  mercury.skill("./skill");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mercury-agent",
3
- "version": "0.4.23",
3
+ "version": "0.4.25",
4
4
  "description": "Personal AI assistant for chat platforms (WhatsApp, Slack, Discord, Telegram)",
5
5
  "license": "MIT",
6
6
  "author": "Avishai Tsabari",