50 Commits

Author SHA1 Message Date
0xmrpeter
b563a47af4 fix: add instanceRoot to plugin SDK test context
The TestPluginContext was missing the instanceRoot field added to
PluginContext in Task 7, causing build:publish to fail.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 23:27:55 +07:00
0xmrpeter
10a7bd8c73 merge: integrate fix/setup-wizard-plugin-init into develop
Combines setup wizard fixes (settingsManager/pluginRegistry passing,
ESM plugin resolution, path centralization) with develop's shell
injection validation and community adapter flow. Adds error handling
and tests for importFromDir.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 17:42:42 +07:00
0xmrpeter
c3691909b8 refactor(speech): remove Edge TTS integration and related tests; update TTS provider handling
- Removed the Edge TTS provider implementation and its associated tests.
- Updated the SpeechService to support dynamic registration and unregistration of TTS providers.
- Enhanced the speech plugin to install the Edge TTS plugin dynamically if not already available.
- Adjusted configuration to exclude specific test directories and removed unnecessary dependencies from package.json.
2026-03-27 21:24:39 +07:00
0xmrpeter
a9e3e8d516 fix(sdk): remove duplicate type exports causing build failure 2026-03-27 18:44:02 +07:00
0xmrpeter
ba096e4102 chore: bump version to 2026.0327.4 2026-03-27 18:34:45 +07:00
dylan-112
cf184c78d5
fix: setup wizard fails with 'Plugin system not initialized' (#92)
* 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>

* 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

* docs: add session cleanup feature design spec

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 8de760ac911e

* docs: address spec review feedback for session cleanup

- Reference existing TopicManager and archiveSession() instead of reimplementing
- Add parseDuration utility for --older-than flag
- Fix API route collision (/api/cleanup/ instead of /api/sessions/cleanable)
- Add CleanupFlowState for Telegram selection state with TTL
- Clarify default filter excludes active/initializing
- Add archiving flag edge case to test plan

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 98610f1a27c8

* docs: add design spec for extracting Discord plugin to standalone package

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 10f437186acf

* docs: address spec review feedback for Discord plugin extraction

- Fix npm scope to @openacp (not @open-acp) for consistency
- Fix peerDependency version to match date-based versioning
- Move misclassified exports to "Need to add" section
- Add ConfigManager, AgentCatalog, requestRestart to SDK exports list
- Add essential: false, pluginDependencies notes
- Add tsconfig.json template
- Add exports field and .npmignore to package.json
- Add runAdapterConformanceTests to SDK testing exports
- Add legacy migration map update for backward compat
- Add boot order note for pluginDependencies

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

* docs: add implementation plan for extracting Discord plugin

9 tasks: extend CLI exports, extend SDK, migration map, scaffold
project, copy+refactor source, verify build, remove from OpenACP,
update README, push repos.

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

* feat(core): export format-utils, message-formatter, CommandRegistry, Doctor, PRODUCT_GUIDE for plugin SDK

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 27b04551e9a7

* feat(plugin-sdk): export all symbols needed by adapter plugins

Entire-Checkpoint: a1ed33612eb6

* fix(plugin): add @openacp/plugin-discord migration alias for backward compat

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

* fix(sdk): add missing adapter-primitive exports and testing entry point

- Add MessagingAdapterConfig, IRenderer, RenderedMessage type exports to src/core/index.ts
- Add DisplayVerbosity, ToolCallMeta, ToolUpdateMeta, ViewerLinks type exports
- Add STATUS_ICONS, KIND_ICONS, progressBar, formatTokens, truncateContent, stripCodeFences, splitMessage exports
- Add extractContentText, formatToolSummary, formatToolTitle, resolveToolIcon exports
- Create src/testing.ts as a separate entry point exporting runAdapterConformanceTests
- Add ./testing export map to @openacp/cli package.json
- Fix @openacp/plugin-sdk/testing.ts to import from @openacp/cli/testing
- Fix version strings to use valid semver (2026.326.4 not 2026.0326.4)

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

* fix: restore original version format YYYY.MMDD.patch

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

* feat: remove built-in Discord plugin (now available as @openacp/plugin-discord)

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

* fix(plugin): resolve 3 bugs preventing dev plugins from loading

- lifecycle-manager: include already-loaded plugins in dependency resolution
  so late-booted dev plugins aren't cascade-skipped
- dev-loader: use URL query string for ESM cache busting instead of copying
  to temp dir, which broke relative imports (e.g., './adapter.js')
- adapter-primitives: remove runAdapterConformanceTests from main barrel
  to prevent vitest from leaking into runtime bundle

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 64f604573bb7

* fix(review): address PR #80 code review feedback

- Remove core→plugin-discord import in config-editor (architecture violation):
  inline Discord token validation using REST API /users/@me instead of
  importing from @openacp/plugin-discord/validators
- Mark legacyMap in lifecycle-manager as @deprecated with migration notes
- Remove 98 planning artifacts from docs/superpowers/ (72k+ lines)

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

* Revert "fix(plugin): resolve 3 bugs preventing dev plugins from loading"

This reverts commit 031464640560628dd8c093a4d8d30895c775ef98.

Entire-Checkpoint: 6ed1a02a0cb5

* Reapply "fix(plugin): resolve 3 bugs preventing dev plugins from loading"

This reverts commit 5707bf1c240f52baab277d21333cd7d92c191fac.

Entire-Checkpoint: bfaaa263a765

* revert: restore docs/superpowers/ plans and specs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 9195220e9172

* fix(review): revert unrelated changes and organize SDK sub-paths

- Revert --channel flag, assistant prompt changes, and session route
  changes that don't belong in Discord extraction PR (#82)
- Add SDK sub-path exports: @openacp/plugin-sdk/formatting,
  @openacp/plugin-sdk/config (alongside existing /testing) (#83)
- Mark SDK exports as @stable vs @experimental
- Fix plugin count test (10 → 9 after Discord removal)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 9bd5c44d98c4

* fix(review): address round 2 feedback on PR #80

- Rename @openacp/plugin-discord → @openacp/adapter-discord in all refs
  (setup-channels, wizard, lifecycle-manager, docs)
- Keep @openacp/plugin-discord as legacy alias in lifecycle-manager
- Remove unrelated session-cleanup-design.md spec from PR
- SDK: deduplicate main barrel by re-exporting from sub-path modules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 4454289e400f

* fix(review): remove remaining Discord references from core

- Remove Discord doctor check from core (plugin registers its own)
- Dynamic adapter discovery via ServiceRegistry instead of hardcoded list
- Remove @openacp/discord from auto-register built-in plugins list

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

* fix(config): auto-install Discord plugin when enabling via config editor

When user enables or configures Discord through `openacp config` (not
onboarding), check if @openacp/adapter-discord is installed. If not,
prompt to install it automatically via npm.

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

* fix(review): round 3 cleanup — extensible ChannelId, update CLAUDE.md

- Change ChannelId from fixed union to string for extensibility
- Remove discord/ from CLAUDE.md project layout (now external plugin)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 66d8d185cda7

* fix(review): resolve all remaining Discord coupling in core

- Remove DiscordPlatformData from core types (plugin defines its own)
- Remove DiscordPlatformData from SDK re-exports
- Config editor: delegate Discord config to plugin configure() instead
  of 100+ lines of inline Discord logic
- Update integrate.ts help text to be adapter-agnostic
- Clean absolute local paths from planning docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 094cc484aaae

* fix: replace execSync npm install with async utility

Extract installNpmPlugin() into a shared utility that uses async exec
instead of execSync, preventing event loop blocking. Used by both
config-editor.ts and wizard.ts instead of inline execSync calls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: replace execSync with async installNpmPlugin utility

Extract shared plugin install logic into plugin-installer.ts using
promisify(exec) to avoid blocking the event loop during npm install.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 09c3d8b93ec9

* fix: pass settingsManager and pluginRegistry to setup wizard from CLI commands

cmdDefault and cmdOnboard called runSetup() without the required
settingsManager/pluginRegistry opts, causing "Plugin system not
initialized" error on first-run setup. Now both paths create these
dependencies before invoking the wizard, matching main.ts behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 4cb5e64819c9

* fix: resolve npm plugins from plugins dir instead of project root

import(packageName) resolves from the project root, not from the
~/.openacp/plugins/node_modules where npm packages are actually
installed. Use createRequire + pathToFileURL to resolve from the
correct directory.

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

* fix: resolve ESM-only npm plugins by reading package.json exports

createRequire cannot resolve packages that only define ESM exports
(no "require" condition). Instead, read the package's package.json
to find the entry point (exports["."].import > main > index.js)
and import by file URL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 512775b194fb

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: 0xmrpeter <0xmrpeter@gmail.com>
2026-03-27 18:21:34 +07:00
dylan
f2de50fe89 merge: sync with upstream redesign/microkernel-plugin-architecture
Resolves conflicts in plugin-sdk exports and core index files.
Upstream extracted Discord to standalone package and refined SDK exports.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 385aad6258f7
2026-03-27 17:53:19 +07:00
0xmrpeter
b5ebcc6038 refactor(sdk): prefer export type for core classes used only as type annotations
OpenACPCore, Session, SessionManager, CommandRegistry are only imported
as types by external plugins — no need for runtime value exports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 16:59:39 +07:00
0xmrpeter
a09d8296ba 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:58:51 +07:00
0xmrpeter
fea82adeeb chore: bump version to 2026.0327.2
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 16:24:29 +07:00
0xmrpeter
f1a34c51a9 refactor(plugin-sdk): reduce main barrel surface area
- Change OpenACPCore, Session, SessionManager, CommandRegistry to
  type-only exports (plugins consume, not instantiate)
- Stop re-exporting formatting/config values from main barrel — plugins
  should import from sub-paths (@openacp/plugin-sdk/formatting, /config)
- Keep type re-exports from sub-paths in main barrel for convenience

Main barrel: ~25 symbols (down from ~50+)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 16:23:21 +07:00
dylan-112
1cb9b38388
feat: extract Discord plugin to standalone package
* 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>

* 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

* docs: add session cleanup feature design spec

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 8de760ac911e

* docs: address spec review feedback for session cleanup

- Reference existing TopicManager and archiveSession() instead of reimplementing
- Add parseDuration utility for --older-than flag
- Fix API route collision (/api/cleanup/ instead of /api/sessions/cleanable)
- Add CleanupFlowState for Telegram selection state with TTL
- Clarify default filter excludes active/initializing
- Add archiving flag edge case to test plan

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 98610f1a27c8

* docs: add design spec for extracting Discord plugin to standalone package

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 10f437186acf

* docs: address spec review feedback for Discord plugin extraction

- Fix npm scope to @openacp (not @open-acp) for consistency
- Fix peerDependency version to match date-based versioning
- Move misclassified exports to "Need to add" section
- Add ConfigManager, AgentCatalog, requestRestart to SDK exports list
- Add essential: false, pluginDependencies notes
- Add tsconfig.json template
- Add exports field and .npmignore to package.json
- Add runAdapterConformanceTests to SDK testing exports
- Add legacy migration map update for backward compat
- Add boot order note for pluginDependencies

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

* docs: add implementation plan for extracting Discord plugin

9 tasks: extend CLI exports, extend SDK, migration map, scaffold
project, copy+refactor source, verify build, remove from OpenACP,
update README, push repos.

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

* feat(core): export format-utils, message-formatter, CommandRegistry, Doctor, PRODUCT_GUIDE for plugin SDK

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 27b04551e9a7

* feat(plugin-sdk): export all symbols needed by adapter plugins

Entire-Checkpoint: a1ed33612eb6

* fix(plugin): add @openacp/plugin-discord migration alias for backward compat

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

* fix(sdk): add missing adapter-primitive exports and testing entry point

- Add MessagingAdapterConfig, IRenderer, RenderedMessage type exports to src/core/index.ts
- Add DisplayVerbosity, ToolCallMeta, ToolUpdateMeta, ViewerLinks type exports
- Add STATUS_ICONS, KIND_ICONS, progressBar, formatTokens, truncateContent, stripCodeFences, splitMessage exports
- Add extractContentText, formatToolSummary, formatToolTitle, resolveToolIcon exports
- Create src/testing.ts as a separate entry point exporting runAdapterConformanceTests
- Add ./testing export map to @openacp/cli package.json
- Fix @openacp/plugin-sdk/testing.ts to import from @openacp/cli/testing
- Fix version strings to use valid semver (2026.326.4 not 2026.0326.4)

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

* fix: restore original version format YYYY.MMDD.patch

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

* feat: remove built-in Discord plugin (now available as @openacp/plugin-discord)

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

* fix(plugin): resolve 3 bugs preventing dev plugins from loading

- lifecycle-manager: include already-loaded plugins in dependency resolution
  so late-booted dev plugins aren't cascade-skipped
- dev-loader: use URL query string for ESM cache busting instead of copying
  to temp dir, which broke relative imports (e.g., './adapter.js')
- adapter-primitives: remove runAdapterConformanceTests from main barrel
  to prevent vitest from leaking into runtime bundle

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 64f604573bb7

* fix(review): address PR #80 code review feedback

- Remove core→plugin-discord import in config-editor (architecture violation):
  inline Discord token validation using REST API /users/@me instead of
  importing from @openacp/plugin-discord/validators
- Mark legacyMap in lifecycle-manager as @deprecated with migration notes
- Remove 98 planning artifacts from docs/superpowers/ (72k+ lines)

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

* Revert "fix(plugin): resolve 3 bugs preventing dev plugins from loading"

This reverts commit 031464640560628dd8c093a4d8d30895c775ef98.

Entire-Checkpoint: 6ed1a02a0cb5

* Reapply "fix(plugin): resolve 3 bugs preventing dev plugins from loading"

This reverts commit 5707bf1c240f52baab277d21333cd7d92c191fac.

Entire-Checkpoint: bfaaa263a765

* revert: restore docs/superpowers/ plans and specs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 9195220e9172

* fix(review): revert unrelated changes and organize SDK sub-paths

- Revert --channel flag, assistant prompt changes, and session route
  changes that don't belong in Discord extraction PR (#82)
- Add SDK sub-path exports: @openacp/plugin-sdk/formatting,
  @openacp/plugin-sdk/config (alongside existing /testing) (#83)
- Mark SDK exports as @stable vs @experimental
- Fix plugin count test (10 → 9 after Discord removal)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 9bd5c44d98c4

* fix(review): address round 2 feedback on PR #80

- Rename @openacp/plugin-discord → @openacp/adapter-discord in all refs
  (setup-channels, wizard, lifecycle-manager, docs)
- Keep @openacp/plugin-discord as legacy alias in lifecycle-manager
- Remove unrelated session-cleanup-design.md spec from PR
- SDK: deduplicate main barrel by re-exporting from sub-path modules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 4454289e400f

* fix(review): remove remaining Discord references from core

- Remove Discord doctor check from core (plugin registers its own)
- Dynamic adapter discovery via ServiceRegistry instead of hardcoded list
- Remove @openacp/discord from auto-register built-in plugins list

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

* fix(config): auto-install Discord plugin when enabling via config editor

When user enables or configures Discord through `openacp config` (not
onboarding), check if @openacp/adapter-discord is installed. If not,
prompt to install it automatically via npm.

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

* fix(review): round 3 cleanup — extensible ChannelId, update CLAUDE.md

- Change ChannelId from fixed union to string for extensibility
- Remove discord/ from CLAUDE.md project layout (now external plugin)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 66d8d185cda7

* fix(review): resolve all remaining Discord coupling in core

- Remove DiscordPlatformData from core types (plugin defines its own)
- Remove DiscordPlatformData from SDK re-exports
- Config editor: delegate Discord config to plugin configure() instead
  of 100+ lines of inline Discord logic
- Update integrate.ts help text to be adapter-agnostic
- Clean absolute local paths from planning docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 094cc484aaae

* fix: replace execSync npm install with async utility

Extract installNpmPlugin() into a shared utility that uses async exec
instead of execSync, preventing event loop blocking. Used by both
config-editor.ts and wizard.ts instead of inline execSync calls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: 0xmrpeter <0xmrpeter@gmail.com>
2026-03-27 16:05:50 +07:00
dylan
7bca214900 fix(review): resolve all remaining Discord coupling in core
- Remove DiscordPlatformData from core types (plugin defines its own)
- Remove DiscordPlatformData from SDK re-exports
- Config editor: delegate Discord config to plugin configure() instead
  of 100+ lines of inline Discord logic
- Update integrate.ts help text to be adapter-agnostic
- Clean absolute local paths from planning docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 094cc484aaae
2026-03-27 15:40:25 +07:00
dylan
57ed3a2fd3 fix(review): address round 2 feedback on PR #80
- Rename @openacp/plugin-discord → @openacp/adapter-discord in all refs
  (setup-channels, wizard, lifecycle-manager, docs)
- Keep @openacp/plugin-discord as legacy alias in lifecycle-manager
- Remove unrelated session-cleanup-design.md spec from PR
- SDK: deduplicate main barrel by re-exporting from sub-path modules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 4454289e400f
2026-03-27 15:10:28 +07:00
dylan
a62655d711 fix(review): revert unrelated changes and organize SDK sub-paths
- Revert --channel flag, assistant prompt changes, and session route
  changes that don't belong in Discord extraction PR (#82)
- Add SDK sub-path exports: @openacp/plugin-sdk/formatting,
  @openacp/plugin-sdk/config (alongside existing /testing) (#83)
- Mark SDK exports as @stable vs @experimental
- Fix plugin count test (10 → 9 after Discord removal)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 9bd5c44d98c4
2026-03-27 14:12:45 +07:00
dylan
f3be31d4a8 Merge branch 'redesign/microkernel-plugin-architecture' of https://github.com/Open-ACP/OpenACP into redesign/microkernel-plugin-architecture
# Conflicts:
#	docs/superpowers/plans/2026-03-20-assistant-action-detect.md
#	docs/superpowers/specs/2026-03-20-assistant-action-detect-design.md
#	docs/superpowers/specs/2026-03-23-generic-handoff-design.md
2026-03-27 13:52:07 +07:00
0xmrpeter
14d7d7f226 chore: bump version to 2026.0327.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 11:00:53 +07:00
dylan
969c4e6898 fix: restore original version format YYYY.MMDD.patch
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 10:42:46 +07:00
dylan
31bb536859 fix(sdk): add missing adapter-primitive exports and testing entry point
- Add MessagingAdapterConfig, IRenderer, RenderedMessage type exports to src/core/index.ts
- Add DisplayVerbosity, ToolCallMeta, ToolUpdateMeta, ViewerLinks type exports
- Add STATUS_ICONS, KIND_ICONS, progressBar, formatTokens, truncateContent, stripCodeFences, splitMessage exports
- Add extractContentText, formatToolSummary, formatToolTitle, resolveToolIcon exports
- Create src/testing.ts as a separate entry point exporting runAdapterConformanceTests
- Add ./testing export map to @openacp/cli package.json
- Fix @openacp/plugin-sdk/testing.ts to import from @openacp/cli/testing
- Fix version strings to use valid semver (2026.326.4 not 2026.0326.4)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 10:41:32 +07:00
dylan
68680bcbeb feat(plugin-sdk): export all symbols needed by adapter plugins
Entire-Checkpoint: a1ed33612eb6
2026-03-27 10:23:18 +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
c62185c328 chore: bump version to 2026.0326.4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:52:11 +07:00
0xmrpeter
26edf2fd5f chore: bump version to 2026.0326.3
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:40:58 +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
e6237eaa51 chore: bump version to 2026.0326.0 2026-03-26 23:23:00 +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
e136f7359f feat(sdk): add createTestInstallContext + mockServices testing utilities
createTestInstallContext provides auto-answering terminal prompts and
in-memory settings for testing plugin install/configure/uninstall flows.
mockServices provides factory functions for all service interfaces with
sensible defaults and override support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 20:48:49 +07:00
0xmrpeter
0305a45580 feat(sdk): add createTestContext testing utility
Provides an in-memory PluginContext for unit-testing plugins with
tracking of registered services, commands, middleware, and emitted
events. Includes executeCommand() helper for dispatching commands.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 20:47:14 +07:00
0xmrpeter
2129ad9528 feat(sdk): add type and base class re-exports
Add adapter-primitives and plugin type exports to the main package,
and create SDK index.ts that re-exports all plugin-facing types and
base classes from openacp.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 20:45:39 +07:00
0xmrpeter
ce42534eca chore: setup monorepo with pnpm workspace for @openacp/plugin-sdk
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 20:44:21 +07:00
0xmrpeter
40777e75e2 chore: update package.json and pnpm-lock.yaml for dependency management and build configuration
- Added new dependencies: @agentclientprotocol/sdk, @inquirer/prompts, grammy, nanoid, and zod.
- Updated build scripts to use TypeScript compiler directly and modified entry points for the CLI.
- Removed outdated pnpm workspace and TypeScript configuration files.
- Adjusted tsup configuration for improved output structure and TypeScript declaration generation.
2026-03-19 19:03:47 +07:00
0xmrpeter
c26657b4d8 feat: enhance TypeScript configuration and main.ts for Telegram adapter integration
- Updated tsconfig.publish.json to exclude build artifacts and test files.
- Modified tsup.config.ts to include the Telegram adapter as a separate entry point and removed unnecessary noExternal configuration.
- Refactored main.ts to load the Telegram adapter using a dedicated function for improved modularity and clarity.
2026-03-19 18:46:46 +07:00
dylan
37794db457 feat: interactive CLI onboarding setup wizard
- Auto-detect agents from PATH and node_modules/.bin (prefer claude-agent-acp)
- Validate Telegram bot token and chat ID against API
- Streamlined 3-step setup: Telegram, Agents, Workspace
- Auto-save config and auto-start after setup
- Fix bin entry to use cli.js for proper command routing
- Update setup-guide.md and README.md to match new flow
- Security defaults applied automatically (editable in config)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 605d217b3192
2026-03-19 18:26:29 +07:00
dylan
3feaf9a92d test: add integration test for full setup flow with mocked prompts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 7e8b554cd9a9
2026-03-19 18:26:29 +07:00
dylan
b03bed24cf feat: integrate interactive setup into main.ts for first-run detection
Entire-Checkpoint: ccd84bff2fb9
2026-03-19 18:26:29 +07:00
dylan
b170820471 feat: add interactive setup steps and runSetup() orchestrator
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: fe76785f3d6b
2026-03-19 18:26:29 +07:00
dylan
4004cc77eb feat: add Telegram and agent validation helpers for setup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 0483b929fe16
2026-03-19 18:26:29 +07:00
dylan
298e96c786 chore: add @inquirer/prompts dependency to core
Entire-Checkpoint: 555e99a5a7b3
2026-03-19 18:26:29 +07:00
dylan
9af14523dc feat: add exists(), getConfigPath(), writeNew() to ConfigManager
Entire-Checkpoint: 1879a5c8bbe7
2026-03-19 18:26:29 +07:00
dylan
41a92aa685 chore: add vitest test infrastructure to core package
Entire-Checkpoint: 72ef8d5f3dd8
2026-03-19 18:26:28 +07:00
liam
46da695cc0 Fix permission button deadlock and improve tool call display
- Fix deadlock: message handler was blocking grammy polling with await,
  preventing callback_query updates from being received. Changed to
  fire-and-forget pattern so polling remains unblocked.
- Fix middleware: callback queries were dropped because ctx.chat was
  undefined; now falls back to ctx.callbackQuery.message.chat.id.
- Fix race condition: set session.pendingPermission before sending
  permission UI to prevent timing issues.
- Fix allowed_updates: force inclusion of callback_query on every
  getUpdates call via API config transformer.
- Improve tool display: pass content from ACP events through to
  formatting, show tool name/kind/content in code blocks instead of
  bare status text. Fix [object Object] by properly extracting nested
  ACP content structures.
- Add bot error handler to prevent unhandled errors from crashing.
- Remove duplicate permission notification (adapter already sends it).
- Handle expired callback queries gracefully with try/catch.
2026-03-19 18:26:28 +07:00
Mr.Peter
ec851411c5
Merge pull request #1 from rex-qa-bot/develop
Fix Telegram adapter and add interactive menu
2026-03-19 17:41:17 +07:00
Leo Agent
d1f8583844 fix(telegram): address PR review feedback
- Replace `as never` with proper type inference via `Parameters<typeof fn>[0]`
- Fix `bot.catch()` to use `err.error` (grammy BotError root cause)
- Clean up orphaned forum topic when session creation fails
- Clarify assistant.ts comment: enqueuePrompt awaits full response,
  system prompt response is intentionally discarded (not a race)
- Switch welcome message from Vietnamese to English for consistency
- Add CLAUDE.md for codebase guidance

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: d6de879eb433
2026-03-19 17:38:38 +07:00
0xmrpeter
d19032d779 Enhance OpenACP setup by adding support for plugin adapters and improving configuration management. Update .gitignore to exclude dist-publish, modify package.json to include versioning and new build scripts, and expand README with installation and plugin instructions. Refactor config schema to support dynamic channel configurations and improve main execution flow for better adapter registration. 2026-03-19 17:29:37 +07:00
Leo Agent
7bc4a660d9 revert(telegram): inline assistant spawn instead of onBotReady
The onBotReady/retry approach caused build issues. Revert to the
simpler inline pattern that is confirmed working.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 103f5e24c518
2026-03-19 17:06:36 +07:00
Leo Agent
01b96e1484 fix(telegram): defer assistant spawn until bot is fully ready
Move spawnAssistant and welcome message into onStart callback so
sendMessage is only called after the bot's polling connection is
established, preventing HttpError network failures on startup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: da7a404aae60
2026-03-19 16:57:52 +07:00
Leo Agent
93775348de feat(telegram): dynamic welcome message with menu keyboard
Show available agents, default agent, workspace from config in the
welcome message, and attach the inline menu keyboard so users can
take action immediately on startup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 5440da1e2275
2026-03-19 16:54:39 +07:00
Leo Agent
98df60b1b3 feat(telegram): apply all adapter fixes on clean develop branch
- Use native fetch to fix ETIMEDOUT on Node 20
- Add global bot.catch() error handler to prevent crashes
- Fix menu/permission callbacks using bot.callbackQuery() filter pattern
- Fix race condition: create topic before session so threadId is set
- Add threadId guard in sendMessage to drop early events
- Add inline keyboard menu system with /menu command
- Separate assistant spawn and welcome message error handling
- Suppress assistant system prompt response by deferring event wiring
- Fix ctx.match type handling for callback query context
- Wrap answerCallbackQuery in try-catch for expired callbacks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: e1b57053426b
2026-03-19 16:50:40 +07:00
0xmrpeter
f81d96892e Initialize OpenACP project with core structure, including package.json, pnpm workspace, and essential configurations. Add .gitignore, README, and TypeScript settings. Implement initial ACP documentation and roadmap. 2026-03-19 15:55:33 +07:00