Commit graph

985 commits

Author SHA1 Message Date
yushen
4dba1cfdf0 refactor: unify API URL env var to MULTICA_API_URL
Replace scattered API_URL, MAIN_VITE_API_URL, and RENDERER_VITE_API_URL
with a single MULTICA_API_URL across all apps and packages.

- Desktop: use envPrefix to expose MULTICA_* to main process, rename
  RENDERER_VITE_API_URL → RENDERER_VITE_MULTICA_API_URL, remove
  MAIN_VITE_API_URL (now read directly via MULTICA_API_URL)
- Web: add .env.development with MULTICA_API_URL, enforce required check
  in next.config.ts, update .gitignore to allow .env.development
- Core: make MULTICA_API_URL required in api-client (no silent fallback)
- Scripts: pass MULTICA_API_URL in dev-local.sh for web process
- Turbo: update globalEnv from API_URL to MULTICA_API_URL
- Docs: update references to the new env var name

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 06:31:00 +08:00
yushen
25629f97ca fix(gateway): add build stage for workspace packages in Dockerfile
Add intermediate build stage to compile @multica/types, @multica/utils,
and @multica/core before the runtime stage so dist/ artifacts are
available. Also adds @multica/utils as an explicit gateway dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 05:46:41 +08:00
Jiayuan Zhang
0fba476b57
Merge pull request #194 from multica-ai/forrestchang/telegram-bot-menu
feat(telegram): add inline keyboard onboarding and menu button
2026-02-15 04:15:39 +08:00
Jiayuan Zhang
e9d54e94ab feat(telegram): add inline keyboard onboarding and menu button
Replace plain-text bot messages with HTML-formatted messages and
inline keyboard buttons. Users are now guided through connection
with interactive buttons (How to connect, What is Multica?, Check
status, Help, Reconnect) that edit messages in-place. Add
setChatMenuButton to show commands in the hamburger menu.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 04:11:56 +08:00
Jiayuan Zhang
f781d27177
docs: refactor README and clean up obsolete docs (#193)
* docs: slim down README and split into topic-specific docs

Add local full-stack development section (pnpm dev:local) and
move detailed content (credentials, CLI, skills/tools, time
injection, development guide) into separate docs/ files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: remove openclaw research notes and add doc index to README

Delete docs/channel/openclaw-research.md (1187-line research dump,
insights already absorbed into implementation). Expand README
documentation section with categorized links to all docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: remove obsolete design proposals and plans

Delete auto-memory-refresh, cron-job-tool, and dashboard-design
docs that were never implemented. Remove Design Proposals section
from README.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 03:35:54 +08:00
Jiayuan Zhang
00aa2d26ef docs: remove obsolete design proposals and plans
Delete auto-memory-refresh, cron-job-tool, and dashboard-design
docs that were never implemented. Remove Design Proposals section
from README.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 03:32:47 +08:00
Jiayuan Zhang
a91e6b7a08 docs: remove openclaw research notes and add doc index to README
Delete docs/channel/openclaw-research.md (1187-line research dump,
insights already absorbed into implementation). Expand README
documentation section with categorized links to all docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 03:26:51 +08:00
Jiayuan Zhang
18a6996c97 docs: slim down README and split into topic-specific docs
Add local full-stack development section (pnpm dev:local) and
move detailed content (credentials, CLI, skills/tools, time
injection, development guide) into separate docs/ files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 03:23:54 +08:00
Jiayuan Zhang
7a92f716d9
refactor(skills): remove unused SkillConfig.apiKey/env/primaryEnv (#192)
These fields were only checked during eligibility but never injected
at runtime via credentialManager.getEnv(). Remove the half-implemented
per-skill credential config to reduce confusion.

API key configuration remains supported via skills.env.json5 and
process.env.

Refs: MUL-246, MUL-255

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 03:22:02 +08:00
Jiayuan Zhang
058af56d47
fix(ui): show generating indicator while agent is processing (#191)
When the user sends a message and the agent hasn't started streaming
yet, the chat area showed no visual feedback. Now a "Generating..."
spinner appears between message send and the first streaming content,
matching the existing indicator style used in StreamingMarkdown.

Closes MUL-224

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 03:13:18 +08:00
Jiayuan Zhang
a131f3b7f5
Remove Multica App tab from Clients page (#190)
* feat(desktop): remove Multica App tab from Clients page

Only Telegram is currently available as a connection method.
Remove the unused "Multica App" tab, tabs UI, and related
components (QRCodeCard, DevicesCard, MulticaAppTab) to simplify
the page.

MUL-252

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(desktop): restore authorized devices list on Clients page

The devices list was accidentally removed along with the Multica App
tab. Add it back below the Telegram card.

MUL-252

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 03:04:53 +08:00
Jiayuan Zhang
a8ef4061cd
chore(ci): remove dependabot configuration (#189)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:57:31 +08:00
Jiayuan Zhang
8c5ff8c6ff
Merge pull request #186 from multica-ai/dependabot/github_actions/actions/cache-5
chore(deps): Bump actions/cache from 4 to 5
2026-02-15 02:40:44 +08:00
Jiayuan Zhang
828c32f5e5
Merge pull request #185 from multica-ai/dependabot/github_actions/actions/setup-node-6
chore(deps): Bump actions/setup-node from 4 to 6
2026-02-15 02:40:10 +08:00
Jiayuan Zhang
ab2f411ca7
Merge pull request #184 from multica-ai/dependabot/github_actions/actions/checkout-6
chore(deps): Bump actions/checkout from 4 to 6
2026-02-15 02:39:52 +08:00
dependabot[bot]
40be100c1c
chore(deps): Bump actions/cache from 4 to 5
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-14 18:15:23 +00:00
dependabot[bot]
2a7cbfa45d
chore(deps): Bump actions/setup-node from 4 to 6
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-14 18:15:20 +00:00
dependabot[bot]
72249254bc
chore(deps): Bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-14 18:15:17 +00:00
Jiayuan Zhang
606bcd31f4
Merge pull request #182 from multica-ai/forrestchang/speed-up-ci-build
ci: parallelize CI jobs and add turbo cache
2026-02-15 02:14:46 +08:00
Jiayuan Zhang
1a85cc104a fix(ci): use pnpm --filter for lint instead of turbo
turbo lint fails for all packages due to eslint binary resolution
issues. Fall back to pnpm --filter which handles node_modules/.bin
PATH correctly. Scope matches original CI (web + desktop).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:09:47 +08:00
Jiayuan Zhang
418282da15
Merge pull request #183 from multica-ai/forrestchang/optimize-office-skills
refactor(skills): deduplicate office module and merge PDF scripts
2026-02-15 02:05:04 +08:00
Jiayuan Zhang
97270de025 chore: add dependabot for automated dependency updates
Configure weekly npm and GitHub Actions dependency updates. Groups
dev and production dependencies separately for easier review.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:03:35 +08:00
Jiayuan Zhang
8c51cf9f9a ci: add test step to CI pipeline
Add test task to turbo.json and include it in the build-and-typecheck
job. Turbo handles the dependency graph: builds deps first, then runs
typecheck and test in parallel for each package.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 02:03:33 +08:00
Jiayuan Zhang
1140f09632 refactor(skills): merge check_fillable_fields into extract_form_field_info
The 12-line check_fillable_fields.py was a subset of
extract_form_field_info.py. Add a --check flag to the latter and
remove the standalone script. Update forms.md reference accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 01:32:32 +08:00
Jiayuan Zhang
7fdd0dbd3d chore: add __pycache__ to gitignore and remove committed cache
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 01:32:24 +08:00
Jiayuan Zhang
2727ecd803 ci: parallelize jobs and add turbo cache persistence
Split single CI job into parallel lint + build-and-typecheck jobs.
Add turbo cache via actions/cache for faster subsequent runs.
Use single turbo invocation for build+typecheck to optimize task
scheduling. Add concurrency group to cancel stale PR runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 01:32:19 +08:00
Jiayuan Zhang
4caa038469 chore(turbo): remove ^lint dependency for parallel lint execution
Lint tasks don't need dependencies to be linted first. Removing the
^lint dependency lets turbo run all lint tasks in parallel. Also adds
eslint config files to inputs for correct cache invalidation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 01:32:13 +08:00
Jiayuan Zhang
6234ba6139 refactor(skills): deduplicate office/ module across docx, xlsx, pptx
Move the shared office/ directory (pack/unpack, validators, schemas,
soffice wrapper) to skills/_shared/office/ and replace the three
identical copies with symlinks. Update skill loader to dereference
symlinks during copy to managed directory, and skip _-prefixed
directories in the bundled skills scan.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 01:31:53 +08:00
Jiayuan Zhang
e08a1e8e89
Merge pull request #181 from multica-ai/forrestchang/dev-config-isolation
feat(dev): isolate dev:local data and workspace directories
2026-02-15 01:27:31 +08:00
Jiayuan Zhang
1bfd206217
docs: add architecture and module diagram (draw.io) (#180)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 01:09:26 +08:00
Jiayuan Zhang
af7deb5a02 feat(scripts): add dev:local:archive to snapshot dev data for debugging
Archives ~/.super-multica-dev and ~/Documents/Multica-dev into
~/.super-multica-dev-archives/<timestamp>/ before cleaning, so the
state can be fed to AI for post-mortem analysis.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 00:58:39 +08:00
Jiayuan Zhang
9e40e8ca76 chore: update reset scripts and docs for dev data directory
- dev:desktop:reset now cleans both ~/.super-multica and ~/.super-multica-dev
- reset-user-data.sh handles dev directory
- .env.example documents SMC_DATA_DIR

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 00:39:25 +08:00
Jiayuan Zhang
ca8c8e5e9c feat(scripts): isolate dev:local data and workspace directories
Sets SMC_DATA_DIR=~/.super-multica-dev and
MULTICA_WORKSPACE_DIR=~/Documents/Multica-dev for gateway and
desktop processes in dev:local, preventing dev/prod data mixing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 00:39:19 +08:00
Jiayuan Zhang
40fb94e3c3 feat(utils): add SMC_DATA_DIR env var to override root data directory
Allows isolating dev and prod data by setting SMC_DATA_DIR (e.g.
~/.super-multica-dev). Also fixes cron/store.ts which bypassed
DATA_DIR with a hardcoded path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 00:39:13 +08:00
Jiayuan Zhang
b1d6a6ee9a
Merge pull request #179 from multica-ai/forrestchang/desktop-menubar
feat(desktop): add system tray menu for background operation
2026-02-14 23:38:45 +08:00
Jiayuan Zhang
9bfef7126b feat(desktop): add version, gateway, and update check to tray menu
Tray menu now shows:
- Agent status (Idle/Running/Streaming)
- Hub connection status
- Gateway URL
- Show Main Window
- Version number
- Check for Updates
- Quit Multica (⌘Q)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 23:27:10 +08:00
Jiayuan Zhang
c50bdd0f84 fix(desktop): reduce tray icon size to match menu bar conventions
Shrink asterisk glyph from 22x22 to 14x14 within the 22x22 canvas
(28x28 within 44x44 @2x), adding proper padding to align with
other macOS menu bar icons.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 23:18:27 +08:00
Jiayuan Zhang
5e03b4d76b fix(desktop): use asterisk tray icon and show-only menu
- Replace resized app icon with dedicated tray icon matching MulticaIcon
- Remove click-to-toggle behavior, add "Show Main Window" menu item
- Include tray icon PNGs in electron-builder files config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 23:16:56 +08:00
Jiayuan Zhang
d2e22a6ec7 feat(desktop): add system tray for background agent status
When the main window is closed, the app now stays running with a
menu bar tray icon showing agent/hub status. Users can toggle the
window visibility and quit from the tray menu.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 22:40:28 +08:00
yushen
0b50400a45 fix(desktop): read error body instead of statusText for gateway errors
res.statusText is always empty under HTTP/2, causing "Gateway error: "
with no detail. Now reads the JSON response body to surface the
server's actual error message and always includes the status code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 08:51:46 +08:00
yushen
b3a179971e chore: bump version to 0.1.1
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 08:19:15 +08:00
yushen
1a9e915d49 fix(hub): skip text processing after MessageAggregator reset
Add an `active` flag so that message_update/message_end events are
ignored after reset() until the next message_start, preventing stale
accumulated text from being re-emitted as a block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 07:49:20 +08:00
LinYushen
733798f2a9
Merge pull request #178 from multica-ai/fix/api-url-env-bridge
fix(desktop): bridge MULTICA_API_URL for staging/test packaged builds
2026-02-14 07:40:29 +08:00
yushen
eb07f12c49 chore(desktop): add env files for dev/production and update dev scripts
- Track .env.development and .env.production for desktop app
- Add MAIN_VITE_API_URL to all env files
- Remove hardcoded GATEWAY_URL from dev scripts (now in .env.development)
- Update .env.example with full documentation of all env vars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 07:30:54 +08:00
yushen
ef32078b3c fix(desktop): use RENDERER_VITE_API_URL for renderer API host
Read API host from import.meta.env.RENDERER_VITE_API_URL instead of
hardcoding it, so staging/dev builds point to the correct backend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 07:30:48 +08:00
yushen
b7477cb646 feat(desktop): bridge MAIN_VITE_API_URL to process.env for packaged builds
In packaged Electron builds, @multica/core is externalized and .env
files are excluded. Bridge import.meta.env.MAIN_VITE_API_URL (injected
at build time by electron-vite) to process.env.MULTICA_API_URL so that
getApiBaseUrl() reads the correct value in staging/test environments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 07:30:42 +08:00
yushen
b8aa5ad7e6 refactor(core): convert MULTICA_API_URL constant to getApiBaseUrl() function
Lazy-read process.env at call time instead of module import time.
This ensures the env bridge in the Electron main process has time to
set process.env.MULTICA_API_URL before the first API request.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 07:30:36 +08:00
Jiayuan Zhang
87c03c1368
Merge pull request #177 from multica-ai/forrestchang/telegram-table-fmt
fix(telegram): improve Telegram bot UX — tables, tool narration, typing
2026-02-14 03:38:03 +08:00
Jiayuan Zhang
ef8b38899a fix(core): check for "toolCall" type in hasToolUse() to match pi-ai types
The hasToolUse() function was checking for "tool_use" (raw Anthropic format)
but pi-ai normalizes tool call blocks to type "toolCall". This made tool
narration non-functional in the ChannelManager (Desktop/embedded) path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 03:32:16 +08:00
Jiayuan Zhang
d1570698ac fix(telegram): fix tool narration detection and typing indicator during tool execution
- Detect both "tool_use" (Anthropic) and "toolCall" (Hub) content types
- Re-send typing indicator after sending/editing status message since
  Telegram clears typing state on any message send/edit
- Remove debug file logging (appendFileSync to /tmp)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 03:14:48 +08:00