@markus-global/cli 0.11.2 → 0.11.3

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 (104) hide show
  1. package/dist/commands/start.js +5 -2
  2. package/dist/commands/start.js.map +1 -1
  3. package/dist/markus.mjs +1254 -1121
  4. package/dist/web-ui/assets/{CommentInput-Cgu8208h.js → CommentInput-DN3Cichs.js} +1 -1
  5. package/dist/web-ui/assets/{ContentRenderer-rzRUDj8T.js → ContentRenderer-CjHOyYgJ.js} +2 -2
  6. package/dist/web-ui/assets/{DeliverableShareModal-BvfmqTNG.js → DeliverableShareModal-CBSvxB-X.js} +1 -1
  7. package/dist/web-ui/assets/{Deliverables-DKTLnaF8.js → Deliverables-BaAF4-w0.js} +1 -1
  8. package/dist/web-ui/assets/{Notifications-CWaO9onn.js → Notifications-CCsdBfdg.js} +1 -1
  9. package/dist/web-ui/assets/{Search-D_C5Eyed.js → Search-BiBdevAU.js} +1 -1
  10. package/dist/web-ui/assets/{Settings-B5Ib6SFf.js → Settings-CawBnWuy.js} +6 -6
  11. package/dist/web-ui/assets/{Store-D__pfqoc.js → Store-BWi97VP9.js} +1 -1
  12. package/dist/web-ui/assets/Team-CfUDkdc3.js +84 -0
  13. package/dist/web-ui/assets/{Work-BJ7kXixx.js → Work-DrIXOW-P.js} +1 -1
  14. package/dist/web-ui/assets/{arc-BN0GMYN6.js → arc-Cg0-C295.js} +1 -1
  15. package/dist/web-ui/assets/{architectureDiagram-3BPJPVTR-BP5Nnl2Y.js → architectureDiagram-3BPJPVTR-BctEHNLp.js} +1 -1
  16. package/dist/web-ui/assets/{blockDiagram-GPEHLZMM-nKHUCU_z.js → blockDiagram-GPEHLZMM-hxr2ZwOV.js} +1 -1
  17. package/dist/web-ui/assets/{c4Diagram-AAUBKEIU-DoS0wcHh.js → c4Diagram-AAUBKEIU-CfIRo1GE.js} +1 -1
  18. package/dist/web-ui/assets/channel-DAQ2Rbxq.js +1 -0
  19. package/dist/web-ui/assets/{chunk-2J33WTMH-CP54_XNl.js → chunk-2J33WTMH-T0bENsqX.js} +1 -1
  20. package/dist/web-ui/assets/{chunk-4BX2VUAB-DMvJaJb7.js → chunk-4BX2VUAB-ChLLkyYx.js} +1 -1
  21. package/dist/web-ui/assets/{chunk-55IACEB6-DQnZgoOO.js → chunk-55IACEB6-BD3ENYp9.js} +1 -1
  22. package/dist/web-ui/assets/{chunk-727SXJPM-B5_3LI53.js → chunk-727SXJPM-BAes4atE.js} +1 -1
  23. package/dist/web-ui/assets/{chunk-AQP2D5EJ-B5Mh5bI_.js → chunk-AQP2D5EJ-FymM7gfT.js} +1 -1
  24. package/dist/web-ui/assets/{chunk-FMBD7UC4-mjYTpuBm.js → chunk-FMBD7UC4-N5sRT0m9.js} +1 -1
  25. package/dist/web-ui/assets/{chunk-ND2GUHAM-BxTrseJg.js → chunk-ND2GUHAM-BSjS3JyS.js} +1 -1
  26. package/dist/web-ui/assets/{chunk-QZHKN3VN-C1do5brE.js → chunk-QZHKN3VN-Dkwitdbr.js} +1 -1
  27. package/dist/web-ui/assets/classDiagram-4FO5ZUOK-BZyCVtJb.js +1 -0
  28. package/dist/web-ui/assets/classDiagram-v2-Q7XG4LA2-BZyCVtJb.js +1 -0
  29. package/dist/web-ui/assets/{cose-bilkent-S5V4N54A-DMn7aSDK.js → cose-bilkent-S5V4N54A-BLuYATCK.js} +1 -1
  30. package/dist/web-ui/assets/{dagre-BM42HDAG-CE-tTagY.js → dagre-BM42HDAG-DGLiqiH2.js} +1 -1
  31. package/dist/web-ui/assets/{diagram-2AECGRRQ-BwyvxbJa.js → diagram-2AECGRRQ-Cq_GnNKs.js} +1 -1
  32. package/dist/web-ui/assets/{diagram-5GNKFQAL-Nopndxl0.js → diagram-5GNKFQAL-CHNz-2dA.js} +1 -1
  33. package/dist/web-ui/assets/{diagram-KO2AKTUF-CGTjHHnD.js → diagram-KO2AKTUF-D8eKa7jh.js} +1 -1
  34. package/dist/web-ui/assets/{diagram-LMA3HP47-DhC3AqLA.js → diagram-LMA3HP47-RkDgQcLr.js} +1 -1
  35. package/dist/web-ui/assets/{diagram-OG6HWLK6-BIuzyWJO.js → diagram-OG6HWLK6-LqxQrIwa.js} +1 -1
  36. package/dist/web-ui/assets/{docx-preview-ClO_djcO.js → docx-preview-Be-Qo_ag.js} +1 -1
  37. package/dist/web-ui/assets/{erDiagram-TEJ5UH35-Nmfi9Wv0.js → erDiagram-TEJ5UH35-BX0zZgYQ.js} +1 -1
  38. package/dist/web-ui/assets/{flowDiagram-I6XJVG4X-BVAM5QzO.js → flowDiagram-I6XJVG4X-DKnfIFA4.js} +1 -1
  39. package/dist/web-ui/assets/{ganttDiagram-6RSMTGT7-BGdTbY0A.js → ganttDiagram-6RSMTGT7-DjBURmY-.js} +1 -1
  40. package/dist/web-ui/assets/{gitGraphDiagram-PVQCEYII-BMfug5mp.js → gitGraphDiagram-PVQCEYII-BvSi7SvS.js} +1 -1
  41. package/dist/web-ui/assets/{index-1X1Ykov8.js → index-D8vskks7.js} +72 -72
  42. package/dist/web-ui/assets/index-DEN_qReg.css +1 -0
  43. package/dist/web-ui/assets/{infoDiagram-5YYISTIA-DAqSLNMU.js → infoDiagram-5YYISTIA-CwtIgim2.js} +1 -1
  44. package/dist/web-ui/assets/{ishikawaDiagram-YF4QCWOH-Bro4RrlG.js → ishikawaDiagram-YF4QCWOH-CWhXJfSa.js} +1 -1
  45. package/dist/web-ui/assets/{journeyDiagram-JHISSGLW-CdRHOaID.js → journeyDiagram-JHISSGLW-DN9rorlL.js} +1 -1
  46. package/dist/web-ui/assets/{kanban-definition-UN3LZRKU-9iLNl-rB.js → kanban-definition-UN3LZRKU-Burf5FE8.js} +1 -1
  47. package/dist/web-ui/assets/{mermaid.core-BRHCbDDt.js → mermaid.core-Dx4rzlyC.js} +5 -5
  48. package/dist/web-ui/assets/{mindmap-definition-RKZ34NQL-BLm-XQ6W.js → mindmap-definition-RKZ34NQL-DqZ21Siw.js} +1 -1
  49. package/dist/web-ui/assets/{pieDiagram-4H26LBE5-ith90T5A.js → pieDiagram-4H26LBE5-C_4ksu-T.js} +1 -1
  50. package/dist/web-ui/assets/{quadrantDiagram-W4KKPZXB-Cb08oHG7.js → quadrantDiagram-W4KKPZXB-Dl6Rjg1X.js} +1 -1
  51. package/dist/web-ui/assets/{requirementDiagram-4Y6WPE33-DzMKi4w8.js → requirementDiagram-4Y6WPE33-CzmWi02d.js} +1 -1
  52. package/dist/web-ui/assets/{sankeyDiagram-5OEKKPKP-C0Wv4A7m.js → sankeyDiagram-5OEKKPKP-D8K7e8we.js} +1 -1
  53. package/dist/web-ui/assets/{sequenceDiagram-3UESZ5HK-C_HL9WB0.js → sequenceDiagram-3UESZ5HK-1z9rqtVx.js} +1 -1
  54. package/dist/web-ui/assets/{stateDiagram-AJRCARHV-BFfTVEYQ.js → stateDiagram-AJRCARHV-nneYkkHa.js} +1 -1
  55. package/dist/web-ui/assets/stateDiagram-v2-BHNVJYJU-C-hpzcms.js +1 -0
  56. package/dist/web-ui/assets/{timeline-definition-PNZ67QCA-cyPnAADn.js → timeline-definition-PNZ67QCA-D6GmLlRi.js} +1 -1
  57. package/dist/web-ui/assets/{vennDiagram-CIIHVFJN-Cb82-9OZ.js → vennDiagram-CIIHVFJN-TVefhiCa.js} +1 -1
  58. package/dist/web-ui/assets/{wardley-L42UT6IY-BTW1NXXR.js → wardley-L42UT6IY-BgUuAeiM.js} +1 -1
  59. package/dist/web-ui/assets/{wardleyDiagram-YWT4CUSO-C_F_dT6n.js → wardleyDiagram-YWT4CUSO-CyJ_l94o.js} +1 -1
  60. package/dist/web-ui/assets/{xychartDiagram-2RQKCTM6-clcfplhG.js → xychartDiagram-2RQKCTM6-kajbbx7a.js} +1 -1
  61. package/dist/web-ui/index.html +2 -2
  62. package/docs/README.md +93 -0
  63. package/docs/api/api.md +353 -0
  64. package/docs/architecture/agent-runtime.md +341 -0
  65. package/docs/architecture/architecture-fragility.md +184 -0
  66. package/docs/architecture/architecture.md +938 -0
  67. package/docs/architecture/cognitive-architecture.md +322 -0
  68. package/docs/architecture/concurrent-processing.md +550 -0
  69. package/docs/architecture/frontend/team-chat.md +312 -0
  70. package/docs/architecture/learning-loop.md +340 -0
  71. package/docs/architecture/llm-provider-timeouts.md +60 -0
  72. package/docs/architecture/mailbox-system.md +1635 -0
  73. package/docs/architecture/memory-system.md +533 -0
  74. package/docs/architecture/prompt-engineering.md +1377 -0
  75. package/docs/architecture/state-machines.md +665 -0
  76. package/docs/architecture/state-ownership.md +83 -0
  77. package/docs/architecture/streaming-and-reattach.md +193 -0
  78. package/docs/architecture/tool-system.md +266 -0
  79. package/docs/design/deliverable-sharing.md +238 -0
  80. package/docs/guides/coding-tools.md +765 -0
  81. package/docs/guides/community.md +104 -0
  82. package/docs/guides/development.md +179 -0
  83. package/docs/guides/guide.md +362 -0
  84. package/docs/guides/release-and-distribution.md +165 -0
  85. package/docs/guides/remote-access.md +286 -0
  86. package/docs/guides/skill-ecosystem.md +129 -0
  87. package/docs/records/agent-platform-friction-2026-10.md +98 -0
  88. package/docs/records/animation-budget-focus-vs-visibility-2026-10-08.md +110 -0
  89. package/docs/records/audit-fixes-2026-09.md +173 -0
  90. package/docs/records/branch-consolidation.md +597 -0
  91. package/docs/records/file-edit-literal-replacement-fix.md +132 -0
  92. package/docs/records/message-stop-cancel-fix-plan.md +209 -0
  93. package/docs/records/platform-hardening-2026-10.md +1365 -0
  94. package/docs/records/session-identity-plan.md +130 -0
  95. package/docs/records/settings-model-routing-first-visit-fix.md +101 -0
  96. package/docs/records/team-chat-stream-transport-vs-turn-2026-10-08.md +152 -0
  97. package/package.json +2 -1
  98. package/templates/roles/HANDBOOK.md +12 -7
  99. package/dist/web-ui/assets/Team-FFbGLcXj.js +0 -84
  100. package/dist/web-ui/assets/channel-C_kHFvaW.js +0 -1
  101. package/dist/web-ui/assets/classDiagram-4FO5ZUOK-UF2PuXCi.js +0 -1
  102. package/dist/web-ui/assets/classDiagram-v2-Q7XG4LA2-UF2PuXCi.js +0 -1
  103. package/dist/web-ui/assets/index-3PQIqBtv.css +0 -1
  104. package/dist/web-ui/assets/stateDiagram-v2-BHNVJYJU-DuO1A2q2.js +0 -1
@@ -0,0 +1,165 @@
1
+ # Markus Release and Distribution Guide
2
+
3
+ ## Overview
4
+
5
+ Markus offers three installation methods:
6
+
7
+ | Installation method | Audience | Auto-update | Requires Node.js |
8
+ |---------|---------|---------|-------------|
9
+ | **Desktop App** (Electron) | Desktop users who prefer a GUI | ✅ electron-updater | ❌ bundled |
10
+ | **npm install** | Developers, server deployments | ❌ manual | ✅ requires Node 22+ |
11
+ | **Server Binary** (Linux) | Linux servers / headless deployments | ❌ manual | ❌ embeds Node.js |
12
+
13
+ ---
14
+
15
+ ## 1. Desktop App (Electron)
16
+
17
+ The installation method primarily aimed at desktop users.
18
+
19
+ ### Artifacts
20
+
21
+ | Platform | Format | File name |
22
+ |------|------|--------|
23
+ | macOS (Apple Silicon) | DMG | `Markus-{VER}-arm64.dmg` |
24
+ | macOS (Intel) | DMG | `Markus-{VER}.dmg` |
25
+ | Windows x64 | NSIS EXE | `Markus-Setup-{VER}.exe` |
26
+ | Linux x64 | AppImage | `Markus-{VER}.AppImage` |
27
+
28
+ ### Signing and Notarization
29
+
30
+ | Platform | Signing | Notarization |
31
+ |------|------|------|
32
+ | macOS | Developer ID Application | Apple Notarization |
33
+ | Windows | Certum SimplySign (SHA-256) | — |
34
+ | Linux | — | — |
35
+
36
+ ### Auto-update
37
+
38
+ - `electron-updater`, published to GitHub Releases
39
+ - Update check: on app launch (after a 10 s delay), then every 4 hours
40
+
41
+ ### Local Development
42
+
43
+ ```bash
44
+ cd packages/desktop && pnpm dev
45
+
46
+ # Packaging test (no signing)
47
+ CSC_IDENTITY_AUTO_DISCOVERY=false pnpm exec electron-builder --mac --dir
48
+ open dist-electron/mac-arm64/Markus.app
49
+ ```
50
+
51
+ ---
52
+
53
+ ## 2. npm Package
54
+
55
+ ### Installation
56
+
57
+ ```bash
58
+ npm install -g @markus-global/cli
59
+ npm install -g @markus-global/cli@next # pre-release
60
+ ```
61
+
62
+ ### Release Tags
63
+
64
+ | Version format | npm tag | Description |
65
+ |---------|---------|------|
66
+ | `0.8.3` | `latest` | Stable release |
67
+ | `0.8.4-rc.0` | `next` | Pre-release |
68
+
69
+ ---
70
+
71
+ ## 3. Server Binary (Linux only)
72
+
73
+ For headless deployment on Linux servers, with an embedded Node.js runtime. macOS / Windows no longer provide standalone binaries; use the Desktop App or npm instead.
74
+
75
+ ### Artifacts
76
+
77
+ | Format | File name |
78
+ |------|--------|
79
+ | DEB | `markus-setup-linux-x64.deb` |
80
+ | tar.gz | `markus-v{VER}-linux-x64.tar.gz` |
81
+
82
+ ### One-line Install Script
83
+
84
+ ```bash
85
+ curl -fsSL https://markus.global/install.sh | bash
86
+ ```
87
+
88
+ On Linux, this script auto-detects Node.js: if present it installs via npm; if not it downloads the standalone binary. macOS users who run this script are prompted to install Node.js or download the Desktop App.
89
+
90
+ ---
91
+
92
+ ## CI/CD Pipeline
93
+
94
+ ### Trigger
95
+
96
+ Pushing a Git tag in the `v*` format.
97
+
98
+ ### Pipeline
99
+
100
+ ```
101
+ push tag v*
102
+ │
103
+ ├─→ publish-npm Publish to npm
104
+ │ │
105
+ │ ├─→ build-server-binary Linux x64 (.deb + .tar.gz)
106
+ │ │
107
+ │ ├─→ build-desktop 3-platform Electron desktop build (macOS + Linux)
108
+ │ │ ├── macOS arm64 (.dmg)
109
+ │ │ ├── macOS x64 (.dmg)
110
+ │ │ └── Linux x64 (.AppImage)
111
+ │ │
112
+ │ └─→ build-desktop-windows Windows x64 (.exe, signed)
113
+ │
114
+ ├─→ github-release Create GitHub Release
115
+ │
116
+ └─→ upload-to-hub Upload to R2 (stable releases only)
117
+ ```
118
+
119
+ **6 CI jobs, 7 artifacts.**
120
+
121
+ ### Required Secrets
122
+
123
+ | Secret | Purpose |
124
+ |--------|------|
125
+ | `GITHUB_TOKEN` | Release creation, Electron update feed |
126
+ | `APPLE_CERTIFICATE_P12` | macOS code signing |
127
+ | `APPLE_CERTIFICATE_PASSWORD` | P12 password |
128
+ | `APPLE_ID` | Apple notarization |
129
+ | `APPLE_ID_PASSWORD` | Apple App-Specific Password |
130
+ | `APPLE_TEAM_ID` | Apple Team ID |
131
+ | `CERTUM_EMAIL` | Windows code signing — SimplySign login email |
132
+ | `CERTUM_OTP` | Windows code signing — SimplySign TOTP seed |
133
+ | `R2_ACCESS_KEY_ID` | Cloudflare R2 |
134
+ | `R2_SECRET_ACCESS_KEY` | Cloudflare R2 |
135
+ | `R2_ACCOUNT_ID` | Cloudflare R2 |
136
+ | `R2_BUCKET_NAME` | Cloudflare R2 |
137
+
138
+ ---
139
+
140
+ ## Distribution Channels
141
+
142
+ | Channel | Content | URL |
143
+ |------|------|-----|
144
+ | GitHub Releases | All artifacts | `github.com/markus-global/markus/releases` |
145
+ | npm | CLI package | `npmjs.com/package/@markus-global/cli` |
146
+ | Cloudflare R2 | Binaries + Desktop (CN acceleration) | `markus.global/releases/` |
147
+ | install.sh | Linux one-line install script | `curl -fsSL https://markus.global/install.sh \| bash` |
148
+
149
+ ---
150
+
151
+ ## Platform Support
152
+
153
+ | Platform | Desktop App | Server Binary | npm |
154
+ |------|-------------|--------------|-----|
155
+ | macOS arm64 | ✅ DMG | — | ✅ |
156
+ | macOS x64 | ✅ DMG | — | ✅ |
157
+ | Windows x64 | ✅ NSIS | — | ✅ |
158
+ | Linux x64 | ✅ AppImage | ✅ DEB | ✅ |
159
+
160
+ ---
161
+
162
+ ## Known Limitations
163
+
164
+ 1. **Windows code signing** — implemented via Certum SimplySign (`build/sign.cjs`); builds without the `CERTUM_*` secrets are left unsigned and trigger a SmartScreen warning
165
+ 2. **Linux arm64** — not supported yet
@@ -0,0 +1,286 @@
1
+ # Remote Access Guide
2
+
3
+ This guide covers how to make your local Markus instance accessible from the internet — for remote team collaboration, external agent (OpenClaw) integration, or mobile access.
4
+
5
+ ---
6
+
7
+ ## Quick Comparison
8
+
9
+ | Method | Setup Time | Requires Domain | Requires Public Server | Security | Best For |
10
+ |--------|-----------|-----------------|----------------------|----------|----------|
11
+ | **Cloudflare Tunnel** | 5 min | Yes (free) | No | High (built-in WAF + DDoS) | Recommended default |
12
+ | **Tailscale** | 3 min | No | No | Very High (WireGuard mesh) | Private team access |
13
+ | **FRP** | 15 min | Optional | Yes (need a VPS) | Medium | China mainland, self-hosted |
14
+ | **ngrok** | 2 min | No | No | Medium | Quick demos / testing |
15
+
16
+ ---
17
+
18
+ ## Option 1: Cloudflare Tunnel (Recommended)
19
+
20
+ Zero-trust tunnel — no open inbound ports, free HTTPS, built-in DDoS protection. Works with WebSocket out of the box.
21
+
22
+ ### Prerequisites
23
+
24
+ - A domain name (can use a free one via Cloudflare registrar)
25
+ - A free Cloudflare account
26
+
27
+ ### Setup
28
+
29
+ ```bash
30
+ # 1. Install cloudflared
31
+ # macOS
32
+ brew install cloudflared
33
+ # Linux
34
+ curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o /usr/local/bin/cloudflared
35
+ chmod +x /usr/local/bin/cloudflared
36
+
37
+ # 2. Authenticate with Cloudflare
38
+ cloudflared tunnel login
39
+
40
+ # 3. Create a tunnel
41
+ cloudflared tunnel create markus
42
+
43
+ # 4. Route your subdomain to the tunnel
44
+ cloudflared tunnel route dns markus markus.yourdomain.com
45
+
46
+ # 5. Create config file
47
+ mkdir -p ~/.cloudflared
48
+ cat > ~/.cloudflared/config.yml << 'EOF'
49
+ tunnel: markus
50
+ credentials-file: ~/.cloudflared/<TUNNEL_ID>.json
51
+
52
+ ingress:
53
+ - hostname: markus.yourdomain.com
54
+ service: http://localhost:8056
55
+ - service: http_status:404
56
+ EOF
57
+
58
+ # 6. Run the tunnel
59
+ cloudflared tunnel run markus
60
+ ```
61
+
62
+ ### Run as a System Service (Recommended)
63
+
64
+ ```bash
65
+ # Install as a system service so it auto-starts
66
+ sudo cloudflared service install
67
+ ```
68
+
69
+ ### Access Markus
70
+
71
+ Once the tunnel is running, visit `https://markus.yourdomain.com` from anywhere.
72
+
73
+ ### Add Authentication with Cloudflare Access (Optional but Recommended)
74
+
75
+ 1. Go to [Cloudflare Zero Trust Dashboard](https://one.dash.cloudflare.com/)
76
+ 2. Navigate to **Access > Applications > Add an application**
77
+ 3. Set the application domain to `markus.yourdomain.com`
78
+ 4. Add an authentication policy (e.g., email OTP, Google SSO, GitHub SSO)
79
+
80
+ This adds a login page in front of your Markus instance — even before traffic reaches your server.
81
+
82
+ ---
83
+
84
+ ## Option 2: Tailscale (Best for Private Teams)
85
+
86
+ Creates a WireGuard-based mesh VPN. Every device gets a stable IP. No ports exposed to the public internet at all.
87
+
88
+ ### Setup
89
+
90
+ ```bash
91
+ # 1. Install Tailscale on your server
92
+ # macOS
93
+ brew install tailscale
94
+ # Linux
95
+ curl -fsSL https://tailscale.com/install.sh | sh
96
+
97
+ # 2. Start and authenticate
98
+ sudo tailscale up
99
+
100
+ # 3. Note your Tailscale IP
101
+ tailscale ip -4
102
+ # e.g., 100.64.x.x
103
+
104
+ # 4. Start Markus normally
105
+ pnpm dev
106
+ ```
107
+
108
+ ### Access Markus
109
+
110
+ Each team member installs Tailscale on their device and joins the same Tailnet. Then access:
111
+
112
+ ```
113
+ http://100.64.x.x:8056 # API
114
+ http://100.64.x.x:8057 # Web UI (dev mode)
115
+ ```
116
+
117
+ ### Enable HTTPS (Optional)
118
+
119
+ ```bash
120
+ # Tailscale provides free HTTPS certificates for your machine name
121
+ tailscale cert your-machine.tailnet-name.ts.net
122
+
123
+ # Then access via:
124
+ # https://your-machine.tailnet-name.ts.net:8056
125
+ ```
126
+
127
+ ### Share with External Users (Tailscale Funnel)
128
+
129
+ ```bash
130
+ # Expose port 8056 to the public internet through Tailscale's infrastructure
131
+ tailscale funnel 8056
132
+ ```
133
+
134
+ This gives you a public URL like `https://your-machine.tailnet-name.ts.net/`.
135
+
136
+ ---
137
+
138
+ ## Option 3: FRP (Best for China Mainland / Self-Hosted)
139
+
140
+ If you have a VPS with a public IP (e.g., Alibaba Cloud, Tencent Cloud), FRP is a reliable and fast option.
141
+
142
+ ### Server Side (VPS with public IP)
143
+
144
+ ```bash
145
+ # Download frps
146
+ wget https://github.com/fatedier/frp/releases/latest/download/frp_0.61.1_linux_amd64.tar.gz
147
+ tar xzf frp_*.tar.gz
148
+ cd frp_*
149
+
150
+ # Create frps config
151
+ cat > frps.toml << 'EOF'
152
+ bindPort = 7000
153
+ auth.token = "your-secret-token-change-me"
154
+
155
+ # Dashboard (optional)
156
+ webServer.addr = "0.0.0.0"
157
+ webServer.port = 7500
158
+ webServer.user = "admin"
159
+ webServer.password = "admin"
160
+
161
+ vhostHTTPPort = 80
162
+ vhostHTTPSPort = 443
163
+ EOF
164
+
165
+ # Run
166
+ ./frps -c frps.toml
167
+ ```
168
+
169
+ ### Client Side (Your Machine Running Markus)
170
+
171
+ ```bash
172
+ # Download frpc
173
+ # macOS: brew install frpc
174
+ # Or download from https://github.com/fatedier/frp/releases
175
+
176
+ cat > frpc.toml << 'EOF'
177
+ serverAddr = "your-vps-ip"
178
+ serverPort = 7000
179
+ auth.token = "your-secret-token-change-me"
180
+
181
+ [[proxies]]
182
+ name = "markus-api"
183
+ type = "tcp"
184
+ localIP = "127.0.0.1"
185
+ localPort = 8056
186
+ remotePort = 8056
187
+
188
+ [[proxies]]
189
+ name = "markus-web"
190
+ type = "tcp"
191
+ localIP = "127.0.0.1"
192
+ localPort = 8057
193
+ remotePort = 8057
194
+ EOF
195
+
196
+ ./frpc -c frpc.toml
197
+ ```
198
+
199
+ ### Access Markus
200
+
201
+ ```
202
+ http://your-vps-ip:8056 # API
203
+ http://your-vps-ip:8057 # Web UI
204
+ ```
205
+
206
+ For HTTPS, add nginx with Let's Encrypt on your VPS as a reverse proxy.
207
+
208
+ ---
209
+
210
+ ## Option 4: ngrok (Quick Testing)
211
+
212
+ Simplest setup for temporary access. Not recommended for production.
213
+
214
+ ```bash
215
+ # Install
216
+ brew install ngrok # macOS
217
+ # or: snap install ngrok # Linux
218
+
219
+ # Authenticate (free account at ngrok.com)
220
+ ngrok config add-authtoken <your-token>
221
+
222
+ # Expose Markus API
223
+ ngrok http 8056
224
+ ```
225
+
226
+ ngrok gives you a random URL like `https://abc123.ngrok-free.app`. Share it for testing.
227
+
228
+ ---
229
+
230
+ ## Security Checklist
231
+
232
+ Before exposing Markus to the internet, ensure:
233
+
234
+ - [ ] **Change the admin password** — complete the onboarding wizard to set your own credentials, or set `ADMIN_PASSWORD` in your `.env` or `markus.json` (initial default is `markus123`)
235
+ - [ ] **Change the gateway secret** — set `GATEWAY_SECRET` in your `.env` (default is `markus-gateway-default-secret-change-me`)
236
+ - [ ] **Use HTTPS** — Cloudflare Tunnel and Tailscale provide this automatically; for FRP, add nginx + Let's Encrypt
237
+ - [ ] **Enable authentication layer** — Cloudflare Access (free), Tailscale ACLs, or nginx basic auth in front
238
+ - [ ] **Review CORS** — current default allows all origins (`*`); for production, restrict to your domain
239
+ - [ ] **Firewall** — do not expose ports 8056/8058 directly to `0.0.0.0`; always use a tunnel or reverse proxy
240
+
241
+ ### Recommended Architecture
242
+
243
+ ```
244
+ Internet
245
+ │
246
+ ▼
247
+ ┌─────────────────────────┐
248
+ │ Cloudflare / Tailscale │ ← TLS termination + auth
249
+ │ (Zero-trust tunnel) │
250
+ └────────────┬────────────┘
251
+ │ (localhost only)
252
+ ▼
253
+ ┌─────────────────────────┐
254
+ │ Markus API (:8056) │ ← HTTP + WebSocket
255
+ │ Markus Web UI (:8057) │ ← Vite dev / static files
256
+ │ Comm Adapter (:8058) │ ← Internal only
257
+ └─────────────────────────┘
258
+ ```
259
+
260
+ ---
261
+
262
+ ## External Agent (OpenClaw) Gateway Access
263
+
264
+ If you need external AI agents to connect to your Markus instance:
265
+
266
+ 1. Expose only the API port (8056) via your chosen tunnel method
267
+ 2. Set a strong `GATEWAY_SECRET` in your environment
268
+ 3. External agents register via `POST /api/gateway/register` and authenticate via `POST /api/gateway/auth`
269
+ 4. All gateway communication uses HMAC-SHA256 signed Bearer tokens with 24-hour expiry
270
+ 5. See [API Reference](../api/api.md) for full gateway endpoint documentation
271
+
272
+ ---
273
+
274
+ ## FAQ
275
+
276
+ **Q: Can I run Markus on a cloud VPS directly?**
277
+ A: Yes. Install with the official one-liner (`curl -fsSL https://markus.global/install.sh | bash`) or the desktop/CLI packages, then put nginx or Caddy in front for HTTPS. No tunnel needed since the VPS already has a public IP.
278
+
279
+ **Q: Which option works best in China?**
280
+ A: FRP with a domestic cloud VPS (Alibaba Cloud / Tencent Cloud). Cloudflare and Tailscale may have connectivity issues behind the GFW.
281
+
282
+ **Q: Can I combine Tailscale + Cloudflare?**
283
+ A: Yes. Use Tailscale for daily team access (zero-config, fast), and Cloudflare Tunnel for public-facing endpoints (external agents, webhooks).
284
+
285
+ **Q: Do I need a domain name?**
286
+ A: Only for Cloudflare Tunnel. Tailscale, FRP, and ngrok work without one.
@@ -0,0 +1,129 @@
1
+ # Skill Ecosystem Adapter
2
+
3
+ > **In one sentence**: Markus skills are "bidirectionally compatible" with mainstream external skill ecosystems — `markus skill import` normalizes
4
+ > external skills such as skills.sh / SkillHub / OpenClaw / SOUL.md / AgentScope / MCP-server into
5
+ > the Markus format (skill.json + SKILL.md), while `markus skill export` renders
6
+ > Markus skills back into external formats for publishing to the community. Together with the existing `discover_tools` modes (`activate` / `list_skills` / `search_registry` / `install`),
7
+ > the Markus ecosystem can directly consume **80,000+ community skills**, and your own skills can be published outward in return.
8
+
9
+ ---
10
+
11
+ ## 1. Supported Ecosystem Formats
12
+
13
+ | Format | Identifier | Detection signature | Description |
14
+ | --- | --- | --- | --- |
15
+ | Claude Code / skills.sh | `claude` | Directory contains `SKILL.md` (with YAML frontmatter) | The mainstream form of the 80,000+ skills on skills.sh |
16
+ | SkillHub / ClawHub | `skillhub` | `SKILL.md` or a `skills/` subdirectory, `clawhub.json` | Packages may include icons/assets/multiple skills |
17
+ | OpenClaw | `openclaw` | `config.json5` / `AGENTS.md` / `agents/` | OpenClaw skill directory, possibly with MCP config |
18
+ | OpenClaw SOUL | `soul` | Directory contains `SOUL.md` | Soul package (persona + instructions) |
19
+ | AgentScope | `agentscope` | `.py` decorated with `@tool` + `README.md` | Alibaba AgentScope tool-script skills (approximate adaptation) |
20
+ | Generic MCP-server | `mcp-server` | `mcp.json` / `.mcp.json` (containing `mcpServers`) | Pure MCP server config-style skills |
21
+
22
+ > **Note on AgentScope**: the AgentScope community has not yet settled on a unified "skill package" standard, so this adapter treats it approximately as
23
+ > "tool scripts + documentation": on import it keeps the `.py` tool files and writes the `@tool` functions into the
24
+ > instructions; on export it generates `README.md + SKILL.md (+ tool_stub.py)` for developers to plug into an AgentScope environment.
25
+
26
+ ---
27
+
28
+ ## 2. Field Mapping (External → Markus)
29
+
30
+ | External field | Markus field | Notes |
31
+ | --- | --- | --- |
32
+ | `SKILL.md` frontmatter `name` | `skill.json.name` | kebab-case normalized |
33
+ | `description` | `description` | |
34
+ | `version` / `license` / `author` | same names | Auto-detected from the `LICENSE` file / `package.json` |
35
+ | `allowed-tools` | `skill.requiredPermissions` | `shell*→shell`, `file/read/write→file`, `web/http→network`, `browser*→browser` |
36
+ | `mcp.json` / `config.json5.mcpServers` | `skill.mcpServers` | Auto-parses JSON5 (strips comments/trailing commas/key quotes) |
37
+ | `tags` | `tags` | |
38
+ | Description keywords | `category` | Keyword inference (development/devops/data/browser/...) |
39
+ | `SOUL.md` body | `SKILL.md` instructions | Preserve the original text |
40
+ | Icons / README / LICENSE / scripts | Attached files | Copied along on import |
41
+
42
+ ---
43
+
44
+ ## 3. CLI Usage
45
+
46
+ ```bash
47
+ # List installed skills
48
+ markus skill list
49
+
50
+ # Import an external skill package (auto-detect format → normalize to the Markus format)
51
+ markus skill import ~/Downloads/clawhub-skill.zip --force
52
+ markus skill import ./skills/pdf-tables --name pdf-tools
53
+ markus skill import ~/projects/agent-scope-skill --to ~/.markus/skills/my-scope
54
+
55
+ # Export a Markus skill to an external ecosystem (default output ./<name>-<format>/)
56
+ markus skill export pdf-tools --format claude
57
+ markus skill export pdf-tools --format openclaw --out ~/publish
58
+ markus skill export pdf-tools --format soul
59
+ markus skill export pdf-tools --format mcp-server
60
+ markus skill export pdf-tools --format agentscope
61
+ markus skill export pdf-tools --from ~/.markus/skills/pdf-tools # or specify a directory directly
62
+
63
+ # Show supported formats and detection rules
64
+ markus skill formats
65
+ ```
66
+
67
+ All commands support `--json` machine-readable output.
68
+
69
+ ---
70
+
71
+ ## 4. Using Inside an Agent (discover_tools)
72
+
73
+ An agent activates an already-installed skill directly in a conversation — the skill's instructions (and any MCP
74
+ servers it ships) are injected on demand, no restart needed:
75
+
76
+ ```json
77
+ { "name": ["<skill-name>"] }
78
+ ```
79
+
80
+ `"activate"` is the default `mode`, so the object above is enough. The other modes are
81
+ `{ "mode": "list_skills" }` (browse installed skills), `{ "mode": "search_registry", "query": "..." }`
82
+ (search remote registries such as SkillHub / skills.sh for uninstalled skills), and
83
+ `{ "mode": "install", "name": ["<skill-name>"], "source": "skillhub" }` (install one from a registry).
84
+
85
+ ---
86
+
87
+ ## 5. Architecture
88
+
89
+ ```
90
+ packages/core/src/skills/codec/
91
+ ├── types.ts # Format enum + NormalizedSkill intermediate representation
92
+ ├── detect.ts # Detect format from directory signatures (priority order: see markus skill formats)
93
+ ├── frontmatter.ts # Minimal YAML frontmatter parse/render (no yaml dependency)
94
+ ├── parse.ts # Each format → NormalizedSkill (with permission mapping / JSON5 / MCP extraction)
95
+ ├── render.ts # NormalizedSkill → external format files (pure function)
96
+ ├── import-export.ts # Persistence: write skill.json + SKILL.md + attached files / render output
97
+ └── index.ts # Public API
98
+ ```
99
+
100
+ - The entry point is `packages/core/src/skills/codec/index.ts`, exported via `@markus/core`.
101
+ - Service-layer wrapping: `@markus/org-manager`'s `importSkillFromDirectory / exportSkillToFormat`
102
+ (including runtime registry refresh); the CLI and the in-agent `discover_tools` flow share the same implementation.
103
+ - Adding a format only requires: add a signal in `detect.ts` → add a parse function in `parse.ts` → add a renderer in `render.ts`.
104
+
105
+ ---
106
+
107
+ ## 6. README Snippet (Ready to Copy)
108
+
109
+ ```markdown
110
+ ### 🌍 Ecosystem compatibility: 80,000+ community skills, plug and play
111
+
112
+ Markus ships with a skill ecosystem adapter that **connects both ways** with mainstream AI skill ecosystems:
113
+
114
+ - **Import**: `markus skill import <path>` automatically detects and normalizes
115
+ skills.sh (80,000+ community skills), SkillHub/ClawHub, OpenClaw, SOUL.md, AgentScope,
116
+ MCP-server, and other formats into Markus skills — no code changes, ready to use once installed.
117
+ - **Export**: `markus skill export <name> --format claude` renders a Markus skill into external
118
+ standard formats, ready to publish to skills.sh / SkillHub / OpenClaw and other communities.
119
+ - **In-agent loop**: in a conversation, `discover_tools({ name: ["<skill-name>"] })` activates an installed
120
+ skill's instructions immediately (and `mode: "install"` pulls one in from a registry), no restart needed.
121
+ ```
122
+
123
+ ---
124
+
125
+ ## 7. Known Limitations
126
+
127
+ - An external skill's `mcpServers` depends on a working local runtime (e.g. `npx`/`uvx` installed) to take effect.
128
+ - AgentScope is an approximate adaptation (no community-wide standard); for MCP server instruction-style skills, prefer the `mcp-server` format.
129
+ - Import does not execute remote code — it only copies files and normalizes metadata; assess the trust boundary yourself before running an external skill's scripts.
@@ -0,0 +1,98 @@
1
+ # Agent Platform Friction — field notes from a working agent (2026-10)
2
+
3
+ > **Status: open.** Nothing here has been actioned yet — the file exists so that the platform
4
+ > refactor has these in one place.
5
+
6
+ Written by an agent that runs on Markus and used its own delegation, background-exec and test
7
+ tooling for a multi-hour real task. Every item below is something that cost real time and that a
8
+ future refactor of the agent platform should consider. Each is stated as **observed behaviour →
9
+ why it is a problem → suggested change**, with the evidence that produced it.
10
+
11
+ This is a *dated record* (see `docs/records/`). It is not a specification.
12
+
13
+ ---
14
+
15
+ ## 1. Platform issues (Markus itself)
16
+
17
+ ### F1 — `spawn_subagents` iteration budgets are shared, not per-child, and the sharing is invisible
18
+
19
+ **Observed.** Dispatching 6 children, each with `max_iterations: 30/70/80/…`, returned
20
+ `"aggregateIterationBudget": 100` and killed **all six** mid-work (they had used 11–22 iterations
21
+ each, summing to 100). Re-dispatching 3 children with a per-child `iteration_budget: 30` stopped the
22
+ aggregate ceiling from firing at all.
23
+
24
+ **Why it is a problem.** `max_iterations` reads like "how much this child may do". It is not. A
25
+ caller who fans out N children and sizes `max_iterations` per child gets a shared pool of ~100 —
26
+ so *adding a child silently starves the others*, and the failure appears in a different child than
27
+ the one that caused it. This is the same class of defect the platform elsewhere calls out for
28
+ memory: one concept, two meanings.
29
+
30
+ **Suggested change.** Either make `max_iterations` genuinely per-child, or reject it at the tool
31
+ boundary with "use `iteration_budget` for per-child limits". Whatever is chosen, the aggregate
32
+ ceiling must be documented in the tool description, and the response should state which budget was
33
+ hit (`own` vs `aggregate`) — today it only reports `aggregateCeilingReached` on some children.
34
+
35
+ ### F2 — A budget-exhausted child leaves silent partial writes
36
+
37
+ **Observed.** A child stopped at its budget returned exactly
38
+ `"[INCOMPLETE: subagent stopped early — own iteration budget (30) exhausted …]"`. It said nothing
39
+ about what it had already written. I had to run `git status` by hand to discover whether the
40
+ workspace had been modified.
41
+
42
+ **Why it is a problem.** With a fan-out of N children editing a shared repo, "budget exhausted" is
43
+ indistinguishable from "budget exhausted *after* half-applying an edit". On a larger fan-out this is
44
+ a correctness hazard: the parent cannot tell a clean no-op from a half-finished mutation, and the
45
+ children cannot know about each other.
46
+
47
+ **Suggested change.** Include a structured `filesTouched` / diff-stat in the child result, and make
48
+ the default behaviour for a child that ends `budget_exhausted` *without* a completion report either
49
+ (a) revert its writes, or (b) explicitly mark them as unverified in the parent's context.
50
+
51
+ ### F3 — No signal that a task is too large for one child
52
+
53
+ **Observed.** Two attempts to audit a ~900-line document each burned the full budget (30 then 35
54
+ iterations) and returned **zero** edits — the child kept exploring. A third, tightly scoped attempt
55
+ on the same file kind finished in 24 iterations.
56
+
57
+ **Why it is a problem.** The failure mode is silent: the parent pays full cost and learns nothing.
58
+ There is no feedback that says "this child spent 90 % of its budget on reads".
59
+
60
+ **Suggested change.** Return an iteration breakdown (reads vs writes) in the result, and surface a
61
+ hint when a child exhausts its budget without a single write.
62
+
63
+ ### F4 — Delegation results have no schema
64
+
65
+ The free-text `result` is fine for a summary, but the parent needs machine-checkable fields
66
+ (what changed, what was verified, what was left). Right now the only reliable audit path is to
67
+ ignore the report and diff the workspace — which works, but means the report is decoration.
68
+
69
+ ---
70
+
71
+ ## 2. Repo tooling papercuts (not platform bugs, but they cost the same time)
72
+
73
+ - **`npx vitest run` at the package level lies.** Run from `packages/web-ui` without a project it
74
+ reports ~42 failures (`document is not defined`) because jsdom is not enabled. The failures are
75
+ artefacts, not regressions — and they are convincing enough to send you chasing a phantom. Correct
76
+ entry points are `pnpm test:web-ui` / `pnpm test:node`, or `--project web-ui`.
77
+ - **`pnpm pack` is shadowed by pnpm's own `pack`.** Running it in `packages/desktop` does not run
78
+ the package's `pack` script; it silently produces a ~140 MB tarball of the workspace instead. Use
79
+ `pnpm --filter @markus/desktop run pack`.
80
+ - **`pnpm --filter <dir>` does not work by directory.** The CLI package lives at `packages/cli` but
81
+ is named `@markus-global/cli`; filtering by the path matches nothing and the error ("No projects
82
+ matched the filters") does not suggest the package name.
83
+ - **Gitignored builds shadow their sources.** `packages/cli/templates/` and `packages/desktop/dist/`
84
+ hold stale copies of files that actually live in the repo root (`templates/`,
85
+ `packages/web-ui/dist`). Grepping the repo finds the stale copy first. Symptom seen: a shipped
86
+ `HANDBOOK.md` with links pointing at paths that no longer existed.
87
+ - **`docs/api/` was gitignored while holding a hand-written file.** The ignore rule was added for a
88
+ typedoc generator that no longer exists anywhere in the repo, so the directory that holds the
89
+ API reference was silently ignoring any new file added to it.
90
+
91
+ ---
92
+
93
+ ## 3. What I would fix first
94
+
95
+ 1. **F1**, because it is a correctness trap that looks like a sizing parameter.
96
+ 2. **F2**, because it is the difference between "safe to fan out" and "must diff after every
97
+ dispatch".
98
+ 3. Then the repo tooling items — they are cheap and each one has already burned time twice.