Sync latest code from src/shared/gateway-sdk/ into packages/sdk/,
update all backend imports to use @multica/sdk, and remove the
duplicate src/shared/gateway-sdk/ directory.
- Translate Chinese comments to English in SDK source
- Fix package.json exports with default condition
- Add @multica/sdk as workspace dependency for backend
- Update imports in gateway, test-client, and hub
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Direct Perplexity API (pplx-*) uses "sonar-pro" model name
- OpenRouter (sk-or-*) uses "perplexity/sonar-pro" model name
- Refactor inferPerplexityBaseUrl to inferPerplexityConfig returning both baseUrl and model
- Export internal functions for potential reuse
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When loading skills, automatically check if bundled skills have a higher
version than managed skills. If so, update the managed skill to the
newer bundled version.
This ensures users get skill updates when upgrading multica, without
needing manual intervention.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add `multica profile setup <id>` command for interactive profile setup
- Create profile-setup skill with conversational setup wizard
- Agent collects user info through natural dialogue and updates profile files
- Supports updating user.md, workspace.md, and config.json
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove identity.md and bootstrap.md from profile files
- Merge identity content into soul.md (now contains identity, personality, and behavior)
- Update templates, storage, and types to reflect new structure
- Update tests to match new profile structure
Profile now has 4 files: soul.md, user.md, workspace.md, memory.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create unified entry point at src/agent/cli/index.ts
- Add subcommand modules: run, chat, session, profile, skills, tools, credentials, dev
- Support both 'multica' and 'mu' aliases
- Add session management commands (list, show, delete)
- Integrate dev server commands into CLI
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update workspace.md template with Profile Files table explaining
when to update each file
- Inject actual profile directory path in buildSystemPrompt()
- Add getProfileDir() method to ProfileManager
- Agent can now use edit/write tools to update profile files
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Enrich soul.md with core truths, boundaries, and continuity guidance
inspired by moltbot's template design
- Add user.md template for building user profile and preferences
- Add workspace.md template for workspace behavior guidelines
- Update memory.md and bootstrap.md with more structured content
- Update all related storage, types, and test files
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The tools.md template content duplicated information already present in
each tool's schema description, causing maintenance burden and potential
inconsistencies. Tool usage guidelines can be added to soul.md if needed.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added 36 tests covering toolDisplayName, formatToolArgs, extractResultDetails, and formatResultSummary functions. Also refactored code to eliminate duplicate truncate function and remove unused variable.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* feat(agent): improve interactive CLI with colors, spinner, and status bar
- Add colors.ts module with ANSI terminal color utilities
- Add spinner animation for tool execution feedback
- Add persistent status bar showing session/provider/model
- Apply colors to welcome banner, prompts, commands, and suggestions
- Support NO_COLOR env for accessibility
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(agent): correct cursor position with ANSI-colored prompts
Strip ANSI escape codes when calculating visual length of prompt
to ensure cursor is positioned correctly after colored text.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(agent): prevent duplicate input echo in interactive CLI
Lazy-initialize readline.Interface only when multiline mode is active.
This prevents readline from interfering with autocomplete's raw mode,
which was causing user input to be echoed twice.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor(agent): move CLI files to dedicated cli/ directory
Reorganize CLI-related files into src/agent/cli/ for better separation:
- interactive.ts (was interactive-cli.ts)
- non-interactive.ts (was cli.ts)
- profile.ts, skills.ts, tools.ts (was *-cli.ts)
- autocomplete.ts, colors.ts, output.ts (CLI utilities)
Update all imports, package.json scripts, and build configuration.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Add 'list' action to process tool that displays all registered processes
with their ID, command, status, duration, and source (exec/process).
Example output:
ID COMMAND STATUS DURATION SOURCE
019c139c-dbb7-70ec-ab91-0a7fd2711043 curl -X POST running 15.2s [exec]
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Handle tool_execution_update events in CLI output to show live progress
while commands are running. Shows the last 60 characters of output on
a single line that updates in place.
This completes the real-time streaming feature added to exec tool.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Utilize the onUpdate callback from pi-agent-core's AgentTool interface
to stream output updates in real-time while commands are executing.
- Accept onUpdate as 4th parameter in execute function
- Emit tailBuffer updates on each stdout/stderr data event
- Stop emitting updates once command is backgrounded (yielded)
This enables UI to show live command output progress via the
tool_execution_update agent event.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously, when a command exceeded yieldMs (default 5s) and was
auto-backgrounded, exec returned an empty output string. This caused
agents to misinterpret slow commands (like curl) as failed, leading
to infinite retry loops.
Changes:
- Implement three-layer buffer system (pending 30KB + aggregated 200KB + tail 1KB)
- Return collected output snapshot when backgrounding instead of empty string
- Increase default yieldMs from 5s to 10s for better coverage
- Add auto sweeper for terminated process cleanup (30min TTL)
- Register process immediately on spawn to capture all output
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When input exceeds terminal width, the text wraps to new lines but the
old code only cleared one line, causing screen flashing and duplicate
lines. Now tracks input line count and cursor position across wrapped
lines for proper rendering.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatically initialize managed skills directory with bundled skills
on first load. This ensures bundled skills are available without
requiring explicit initialization.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove bundled, extraDirs, and plugin skill sources
- Skills now load from only two sources:
1. managed (~/.super-multica/skills/) - global skills
2. profile (~/.super-multica/agent-profiles/<id>/skills/) - profile-specific
- Add initializeManagedSkills() to copy bundled skills on first run
- Delete plugin.ts (multica.plugin.json discovery)
- Update documentation and tests
This simplifies the architecture by treating bundled skills as
managed skills that are initialized once, rather than maintaining
multiple loading sources with complex precedence.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace phased roadmap with simple future tools list
- Add Chinese README (README.zh-CN.md)
- Add language switching links between EN/CN docs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use spread operator to conditionally add description property
instead of assigning undefined to optional fields.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use `validation.valid === false` instead of `!validation.valid`
to properly narrow the discriminated union type.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update createAllTools to accept options object with profileId
- Add memory tools when profileId is provided
- Add group:memory tool group for memory tools
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add architecture diagram showing Hub-Agent-Client relationship and
document how Profile config.json integrates with tools configuration.
Mark Phase 2 as complete.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add mergeToolsConfig function to combine Profile tools config with
CLI options. Profile config serves as base, CLI options override.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add ProfileConfig interface with tools, provider, model, and
thinkingLevel settings. ProfileManager now exposes getToolsConfig()
and getProfileConfig() methods.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the 4-layer policy filter system, tool groups, profiles,
and usage examples for both CLI and programmatic interfaces.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Handle undefined values correctly in optional object properties
for TypeScript strict mode compatibility.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New CLI commands:
- pnpm tools:cli list - list available tools with optional filtering
- pnpm tools:cli groups - show all tool groups
- pnpm tools:cli profiles - show all profiles
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add --tools-profile, --tools-allow, and --tools-deny CLI options
to configure tool policy from command line.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ToolsConfig to AgentOptions for policy configuration
- Add isSubagent flag for subagent tool restrictions
- Refactor resolveTools to apply 4-layer policy filtering
- Add createAllTools and getAllToolNames utility functions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- First Tab: highlights first suggestion
- Second Tab: completes highlighted suggestion to input with trailing space
- Use arrow keys to navigate between suggestions
- Add English/Chinese language switch links to skills READMEs
- Update root README.md with new skills features and CLI examples
- Link to full skills documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Document plugin system in Loading & Precedence section
- Add guidance on when to use plugins vs `add` command
- Create README.zh-CN.md with full Chinese translation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add plugin.ts with manifest loading and plugin discovery
- Scan node_modules for packages with multica.plugin.json
- Auto-discover and load skills from installed npm packages
- Integrate plugin skills into SkillManager via loader.ts
- Add workspaceDir and pluginPaths options to SkillManagerOptions
- Export plugin types and functions from index.ts
This enables users to install skill packages via npm and have them
automatically discovered without running `skills add`.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document new Phase 5 features:
- Status diagnostics with diagnostic types table
- Async serialization API and utilities
- Updated troubleshooting section
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Export checkEligibilityDetailed, DiagnosticItem, serialize, and
related utilities from skills index.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Apply async serialization to prevent concurrent operations:
- addSkill: serialized by target skill name
- removeSkill: serialized by skill name
- installSkill: serialized by skill ID
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>