679 Commits

Author SHA1 Message Date
0xmrpeter
ba6dced3ca feat(sdk): export all types and values needed by external adapter plugins
Add missing exports: PlanEntry, DisplayVerbosity, Attachment, OpenACPCore,
Session, SessionManager, CommandRegistry, IRenderer, MessagingAdapterConfig,
RenderedMessage, ToolCallMeta, ToolUpdateMeta, ViewerLinks, InstallProgress,
log, createChildLogger, PRODUCT_GUIDE, DoctorEngine, DoctorReport, PendingFix.

Add new SDK sub-path exports:
- @openacp/plugin-sdk/config (DoctorEngine, config registry utils)
- @openacp/plugin-sdk/formatting (STATUS_ICONS, KIND_ICONS, format utils)
- @openacp/plugin-sdk/testing (runAdapterConformanceTests)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 16:48:19 +07:00
0xmrpeter
f9d156f683 docs: migrate documentation links from gitbook to docs.openacp.ai
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:32:26 +07:00
0xmrpeter
a68f8a6b29 fix(api): add --channel value guard and fix adapter type
- Guard against missing --channel value in CLI with clear error message
- Replace InstanceType<any> with proper IChannelAdapter type

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:08:49 +07:00
dylan
2b3247b4ac fix(api): wire --channel flag in CLI and assistant prompts (#76)
The API endpoint accepted `channel` but the CLI `openacp api new` didn't
pass it through. Add --channel flag to CLI and update Discord/Telegram
assistant prompts to include --channel so sessions are created on the
correct platform.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 27c1f141d0c1
2026-03-27 14:16:46 +07:00
dylan
e229c8e447 fix(api): respect channel param in POST /api/sessions (#76)
Session creation always used the first registered adapter. Add optional
`channel` field so callers can target a specific platform (e.g. discord).
Falls back to first-adapter behavior when omitted for backward compat.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 14:16:46 +07:00
0xmrpeter
daa6f087dd docs: add OpenACP description and docs links to plugin template CLAUDE.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 12:32:01 +07:00
lngdao
e430af2845
fix(tunnel): allow viewer-store paths in sibling directories (#79)
* fix(tunnel): allow viewer-store paths in sibling directories of workspace

Agent may spawn in a subdirectory but edit files in sibling directories
(e.g., workspace=/a/b/openacp, file=/a/b/OpenACP/src/foo.ts). The old
check only allowed files strictly inside workingDirectory, rejecting
valid sibling paths. Now allows files under the parent directory (1 level
up) with case-insensitive comparison on macOS.

* fix(tunnel): address PR #79 review — use realpathSync, remove scope expansion

- Replace parent-directory expansion with fs.realpathSync for canonical
  path resolution (fixes case-insensitive FS without widening access)
- Restore path.resolve(workingDirectory, filePath) for correct relative
  path handling
- Remove darwin-only platform check — realpathSync works cross-platform
- Add workspace + path.sep boundary check to prevent prefix collisions
- Add tests: sibling rejected, parent rejected, shallow workspace,
  relative paths, relative traversal, storeDiff sibling/relative paths
2026-03-27 11:38:04 +07:00
0xmrpeter
5e94c1a742 docs: update versioning format to YYYY.MDD.patch (no leading zeros)
Semver strips leading zeros, so 2026.0327.1 becomes 2026.327.1
on npm. Adopt this as the canonical format.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 11:04:16 +07:00
0xmrpeter
14d7d7f226 chore: bump version to 2026.0327.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v2026.0327.1
2026-03-27 11:00:53 +07:00
0xmrpeter
034ea9ab1a docs: add English-only rule to CLAUDE.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:59:34 +07:00
0xmrpeter
14fb687172 docs: convert remaining docs to English
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:58:35 +07:00
0xmrpeter
d1ca0e36d1 docs: convert all content to English
- CLAUDE.md: fully rewritten in English, updated project layout
- integrate.ts: remove non-English text from trigger examples
- assistant.ts: translate example text to English

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:51:43 +07:00
0xmrpeter
34b9390b83 docs: add plugin template sync rule to CLAUDE.md
When plugin API/architecture changes, plugin template files
(especially claude-md.ts and plugin-guide.ts) must be updated
to reflect current API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:49:04 +07:00
0xmrpeter
463992b180 rename: templates/ → plugin-template/ for clarity
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:48:06 +07:00
0xmrpeter
9de2cec7fb refactor(scaffold): extract template generators to src/cli/templates/
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:46:52 +07:00
0xmrpeter
340b7bdc34 feat(scaffold): add CLAUDE.md and PLUGIN_GUIDE.md to plugin template
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:41:56 +07:00
0xmrpeter
e7f925b055 feat(cli): support community npm install, @version syntax, and compatibility check
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:37:29 +07:00
0xmrpeter
2bdccd25a4 revert(ci): remove direct registry push, use PR-based approach instead
Plugin registry updates should go through PR → validate → auto-merge,
same flow as community plugins. Each plugin repo handles its own
registry PR via CI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:13:45 +07:00
0xmrpeter
b356772f3a feat(ci): auto-update plugin registry on release
After publishing to npm, CI clones plugin-registry repo,
updates version in all built-in plugin entries, rebuilds
registry.json + README, and pushes. Requires REGISTRY_PAT secret.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:09:35 +07:00
0xmrpeter
0898fe6e37 docs: add plugin registry submission guide to GitBook
- contributing.md: full step-by-step guide for publishing to registry
- getting-started-plugin.md: brief mention with link after npm publish step

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:03:27 +07:00
0xmrpeter
a0f0050d60 Merge branch 'redesign/microkernel-plugin-architecture' of github.com:Open-ACP/OpenACP into redesign/microkernel-plugin-architecture 2026-03-27 09:59:26 +07:00
0xmrpeter
36470765e0 refactor: remove usage plugin and related functionality
- Deleted the usage plugin and its associated tests, including usage tracking and budget management.
- Removed references to usage-related methods and types from core components.
- Updated session handling to emit usage events via the event bus instead of directly interacting with the usage store.
- Adjusted tests to reflect the removal of usage tracking and ensure proper event emission.
2026-03-27 09:59:16 +07:00
0xmrpeter
5061676cc4 docs: add usage plugin extraction implementation plan 2026-03-27 02:26:11 +07:00
0xmrpeter
3b10909ce6 docs: update usage plugin extraction spec after review
- Fix EventBus: add usage:recorded to EventBusEvents interface
- Fix notifications: use getService('notifications').notifyAll() instead of event emit
- Fix UsageRecord schema: include id, agentName, contextSize fields
- Fix budget.check(): make async since storage is async
- Add in-memory cache + debounced flush to UsageStore (avoid perf regression)
- Drop query() API surface (Telegram handleUsage removed, plugin /usage command replaces it)
- Use @openacp/usage-plugin as plugin name
2026-03-27 02:08:14 +07:00
0xmrpeter
b12b07438f feat(cli): add plugin registry search + smart install from registry
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 02:07:26 +07:00
0xmrpeter
02ecfb31e5 chore: add plugin-registry/ to .gitignore
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 02:07:26 +07:00
0xmrpeter
81dc30f6f1 docs: add plugin registry design spec
GitHub-based community plugin registry with auto-merge PRs,
daily version sync from npm, CLI search + smart install,
and verified badge system.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 02:07:03 +07:00
0xmrpeter
ebde61d46b docs: add usage plugin extraction design spec 2026-03-27 01:34:12 +07:00
0xmrpeter
0f98cec81b refactor(commands): update session command handlers to return silent responses
- Modified session command handlers to return a 'silent' response type instead of text, allowing for better integration with adapter-specific logic.
- Adjusted command registration for 'new', 'status', 'list', 'newchat', 'resume', 'summary', and 'handoff' commands to reflect this change.
- Updated command name extraction logic in the command registry to improve clarity and functionality.
- Enhanced tests to verify the new silent response behavior for session commands.
2026-03-27 01:21:12 +07:00
0xmrpeter
fb18bdb9b2 fix(docs): update Twitter handle in README and build script
- Changed Twitter handle from Open_ACP to openacp_ai in README.md and build-publish.ts.
- Ensured consistency across documentation and scripts for social media links.
2026-03-27 00:55:18 +07:00
0xmrpeter
e30c683b02 feat(plugin): enhance logging and migration handling
- Added a logger for each plugin to improve migration error reporting.
- Updated the lifecycle manager to append to the existing load order during hot-reloads.
- Implemented abort functionality in the terminal for silent migrations to prevent interactive prompts.
- Enhanced the plugin context to ensure proper logging behavior.

These changes aim to improve the robustness of plugin management and migration processes.
2026-03-27 00:42:54 +07:00
0xmrpeter
c62185c328 chore: bump version to 2026.0326.4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v2026.0326.4
2026-03-26 23:52:11 +07:00
0xmrpeter
1010b73856 fix(scaffold): use createTestInstallContext for install() test
install() needs terminal/settings (InstallContext), not PluginContext.
Test template now uses createTestInstallContext with auto-answer prompts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:51:20 +07:00
0xmrpeter
26edf2fd5f chore: bump version to 2026.0326.3
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v2026.0326.3
2026-03-26 23:40:58 +07:00
0xmrpeter
a6b6412673 fix(scaffold): use getCurrentVersion() for SDK version detection
Was using hardcoded fallback '0.6.10' and fragile require path.
Now uses the same version detection as CLI --version command.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:40:21 +07:00
0xmrpeter
c519650444 Merge branch 'redesign/microkernel-plugin-architecture' of github.com-peter:Open-ACP/OpenACP into redesign/microkernel-plugin-architecture
# Conflicts:
#	package.json
#	packages/plugin-sdk/package.json
v2026.0326.2
2026-03-26 23:31:26 +07:00
0xmrpeter
289858d385 chore: bump version to 2026.0326.2
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:30:41 +07:00
0xmrpeter
b29878fae1 chore: bump version to 2026.0326.1 2026-03-26 23:27:13 +07:00
0xmrpeter
dd5ed7151d fix(ci): ensure CLI types built before SDK in publish pipeline
SDK needs dist/index.d.ts from CLI tsc build. In CI, build:publish
runs after fresh install with no dist/. Now build-publish.ts auto-runs
tsc if dist/index.d.ts missing, and CI runs pnpm build first.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:26:37 +07:00
0xmrpeter
e6237eaa51 chore: bump version to 2026.0326.0 v2026.0326.0 2026-03-26 23:23:00 +07:00
0xmrpeter
fc83c0bbaa Merge branch 'redesign/microkernel-plugin-architecture' of github.com:Open-ACP/OpenACP into redesign/microkernel-plugin-architecture 2026-03-26 23:22:12 +07:00
0xmrpeter
2a688f4278 fix(scaffold): sync plugin SDK/CLI versions, fix peerDependencies
- peerDependencies: @openacp/cli (not plugin-sdk)
- devDependencies: @openacp/plugin-sdk (version from CLI)
- Auto-detect CLI version instead of hardcoded ^1.0.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:21:08 +07:00
0xmrpeter
4d79ee1e01 feat: add build:dev script for local development
- Introduced a new script `build:dev` in package.json to streamline local development by building the project and linking it with npm.
2026-03-26 23:20:51 +07:00
0xmrpeter
75d776f373 fix: rename root package to @openacp/cli, fix SDK imports
- Root package.json name: openacp → @openacp/cli (private, not published directly)
- SDK imports: 'openacp' → '@openacp/cli' (matches published name)
- SDK devDependencies: workspace:* resolves to @openacp/cli
- Consumers install @openacp/cli → SDK re-exports work correctly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:08:25 +07:00
0xmrpeter
e6de94347e feat: setup dual-package publish for @openacp/cli + @openacp/plugin-sdk
- SDK peerDependencies: @openacp/cli (not workspace name)
- build-publish.ts builds and prepares both packages
- GitHub Actions publishes both on tag push
- SDK version synced with CLI version
- Template string deps excluded from build verification

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:03:57 +07:00
0xmrpeter
63bee61daa fix: update outdated docs + add system command tests
- Fix adapter-reference.md and building-adapters.md (AdapterFactory → plugin pattern)
- Fix contributing.md (src/adapters/ → src/plugins/)
- Fix for-contributors.md (plugin-manager → PluginRegistry)
- Update configuration.md for per-plugin settings
- Update environment-variables.md for plugin-level env vars
- Add system command handler tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 22:14:52 +07:00
0xmrpeter
4121840b84 docs: add plugin dev tooling guides (getting started, SDK reference, dev mode)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 21:07:56 +07:00
0xmrpeter
ec4408b4cc feat(cli): add openacp dev command with hot-reload for local plugins
New `openacp dev <plugin-path>` command that:
- Compiles TypeScript if tsconfig.json exists
- Starts tsc --watch in background for live compilation
- Loads the dev plugin via DevPluginLoader after core plugins boot
- Watches dist/ directory for changes with debounced hot-reload
- Supports --no-watch and --verbose flags

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 20:54:21 +07:00
0xmrpeter
9a3149754a feat(plugin): add DevPluginLoader for loading local plugins
Loads plugins from local directories by importing dist/index.js. Uses
temp file copy strategy to bust Node.js ESM module cache, enabling
reliable hot-reload during development.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 20:52:45 +07:00
0xmrpeter
709aedec27 feat(cli): add openacp plugin create scaffold generator
Interactive scaffold generator that creates a complete plugin project with
src/index.ts (all hooks), test template, package.json, tsconfig.json, and
config files. Uses @openacp/plugin-sdk for imports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 20:51:32 +07:00