- Implement Zod schemas for strict input validation on notify, tunnel, and topic routes.
- Block absolute workspace paths in CreateSession to prevent path injection.
- Validate scope strings and enforce limits on token lifetime and command strings.
- Sanitize output in file-viewer template to prevent XSS attacks.
- Adjust CORS settings and apply rate limiting for unauthenticated requests.
- Cap SSE connections and prompt body size to mitigate DoS risks.
- Restrict public health endpoint information to enhance security.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Updated CLI to register `instances` in `noInstanceCommands` map, allowing access without an existing instance root.
- Refactored instance creation to use `generateSlug` instead of `slugify`.
- Added `POST /exchange` route in the API server for exchanging one-time codes for JWTs, ensuring proper authentication bypass handling.
- Improved error handling for port detection in the API server, simplifying retry logic for available ports.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers: instances list/create commands, start --json extension,
POST /auth/exchange endpoint, GET /api/v1/workspace route.
TDD with vitest, step-by-step with exact code and commands.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Added `--json` flag descriptions to various CLI commands in the help text.
- Updated command usage examples to include `--json` for machine-readable output.
- Clarified that commands supporting `--json` will output results in a consistent JSON format.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Clarify instances list vs status --all distinction
- Fix --from flag convention (parent dir, not .openacp subdir)
- Extend start --json output spec to include name/directory/port
- Clarify --json on onboarding: controls output format, not interactivity
- Fix CLI registration files: src/cli.ts + src/cli/commands/index.ts
- Add note on backward compat: keep dir field in start --json output
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Spec for two core additions supporting the Add Workspace app feature:
- `openacp instances list/create` CLI subcommands with --json output
- Auth code exchange endpoints (POST /auth/codes, POST /auth/exchange)
- GET /api/v1/workspace endpoint for workspace identity info
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Workspace paths use numeric cache IDs instead of base64 in callback
data (Telegram 64-byte limit)
- Clarify that m: handler must call ns: logic directly since grammY
cannot re-dispatch callbacks
- Add explicit callback case handling for both s:settings and ns:start
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Addresses broken menu buttons (Settings, Update, Doctor), degraded UX
(Sessions, Agents, Help), and adds button-driven New Session flow.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Task 9: add full code for each command handler (/new, /cancel, /status, etc.)
- Task 10: fix broken build — remove adapter imports of deleted functions before committing
- Task 7: add connectSessionBridge() method to OpenACPCore
- Task 11: fix placeholder for assistantTopicId in menu callback handler
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
13-task plan covering MenuRegistry, AssistantRegistry, AssistantManager,
SessionBridge simplification, command handler migration, and Telegram
adapter cleanup. TDD approach with tests before implementation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Design doc for refactoring the three intertwined systems (command dispatch,
assistant session management, bot/chat flows) into clean, separated concerns
with plugin extensibility for assistant context and menu items.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Updated all references from 'dangerous mode' to 'bypass permissions' in CLI commands, API documentation, and internal logic.
- Adjusted command usage and descriptions to reflect the new terminology for clarity and consistency.
- Removed warmup functionality from session management as part of the refactor.
Changes include:
- Updated `.gitignore` to include `.openacp` for local workspace secrets.
- Refactored CLI commands to replace "instance" with "workspace" for consistency.
- Enhanced workspace setup and registration logic, including deduplication of entries.
- Improved user prompts and error messages related to workspaces.
- Added functionality to protect local workspace secrets from being tracked by git.
This commit aims to clarify the distinction between workspaces and instances, enhancing user experience and code maintainability.
Added Section 6 covering Telegram/Discord/Slack button rendering,
command response format, and agent-initiated notification handling.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- B4: Remove createThread:false override from createFullSession callback
- B5: Add createThread to createFullSession type signature
- B6: Fix createSessionWithContext to pick fields, not spread params
- B2: Use optional chaining for middleware, preserve original semantics
- I2: Note handleNewChat as dead code
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Phase 1d: Move 4 loose instance-* files into core/instance/ directory.
All belong to multi-instance management domain.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Added system messages and structured events for agent switching, including "starting", "succeeded", and "failed" statuses.
- Updated the event bus to handle new `session:agentSwitch` events, allowing UIs to display loading and error states during agent transitions.
- Enhanced error handling during agent startup to provide users with clear guidance on resolving issues.
This change improves user experience by providing real-time feedback during agent switches.
- Changed the behavior of the `/archive` command to stop the agent session and permanently delete the Telegram topic without recreating it.
- Updated related tests to reflect the new confirmation messages and ensure accurate descriptions of the archiving process.
- Adjusted the interface and implementation of the `archiveSessionTopic` method to return void instead of a new thread ID, aligning with the new functionality.
This change clarifies the archiving process and ensures that users are aware that the deletion is permanent and cannot be undone.
- Add restart CLI command (stop + start in one step)
- Disable tsup code splitting to prevent ERR_MODULE_NOT_FOUND when
daemon is running during a global npm upgrade (hash-named chunks
get replaced, breaking dynamic imports in the old process)
- Update help, docs, and README
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Changed 'plugins' to 'plugin' in installation, configuration, enabling, and disabling commands for uniformity.
- Updated Node.js version requirements in install script to reflect the minimum supported version.
Registry only stores id + root path. All details (name, ports,
channels, mode, PID) are read from each instance's own config and
state files. This avoids stale data and keeps the registry simple.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Status table Directory column shows parent path without .openacp suffix
- API and Tunnel port columns clearly labeled with actual port numbers
- Mode column shows daemon/fg/— for clarity
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add instance id (slug) and name to InstanceContext and Registry
- Paths in flags use parent dir, system appends .openacp internally
- Copy from any existing setup, not just global
- Show step-by-step progress with spinner during copy
- Status table includes id, name, mode, channels columns
- Add --name flag, status --id subcommand
- Clearer user-facing language throughout
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Clone now includes plugins/node_modules, agents/, bin/ directories
- Clone source can be any existing instance, not just global
- Add --from <path> CLI flag to specify clone source
- All prompts show full paths for clarity
- Show equivalent CLI command as tip after interactive selection
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Defines architecture for running multiple OpenACP instances on the same
machine with independent config, sessions, ports, and lifecycle.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Mark Discord and Slack as "coming soon" in agent-switch docs and chat-commands table since those adapter integrations were reverted. In the rollback path of switchSessionAgent(), attempt agentManager.resume() with the saved fromAgentSessionId before falling back to a fresh spawn, preserving conversation history on rollback when possible.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Documents the /switch command, mid-conversation agent switching behavior,
history label injection, session resume logic, and the agentSwitch.labelHistory
config option. Adds a dedicated feature page and updates chat-commands,
agents, configuration-schema, README, and SUMMARY.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>