Commit Graph
7 Commits
Author SHA1 Message Date
ars9 e85acc8fb2 feat(scenario): shared browser per run, sign step type, key loading helper
- all steps in a run share one browser/page instance so wizard state persists
- add 'sign' step type: execCode is {keyId} and signs via EDS widget on current page
- extract AuthService.loadKeyDescriptor() to deduplicate key file parsing
- extend StepType, DTOs, and MCP enums to include 'sign'
2026-04-08 15:42:42 +03:00
ars9 7f5a2bfe18 refactor(mcp): hoist McpServer to singleton, read name/version from package.json
- server instantiated once in constructor, tools registered once
- per-request transport created fresh and closed in finally to reset server state
- name and version sourced from package.json instead of hard-coded strings
2026-04-08 11:45:52 +03:00
ars9 f0437d9390 refactor(browser): make sessionName optional, add selector filter, deduplicate session setup
- sessionName is now optional in open/exec; skips session restore when omitted
- add selector param to open: returns outerHTML or textContent of matched element
- extract session restore logic into private setupSession() to remove duplication
- replace per-exception instanceof checks with single HttpException base class check
- embed label into InternalServerErrorException message instead of logging separately
- update MCP tool schemas and HTTP DTOs to reflect optional sessionName and new selector
- add integration tests: sessionless open/exec, selector, selector+readerMode
2026-04-08 11:10:08 +03:00
ars9 36f8b8c0ca feat(pagination): add generic typed pagination with ordering to all list endpoints
- add PaginationQueryDto<TOrderBy> generic with orderBy and orderDir fields
- add SessionOrderBy, EnvironmentOrderBy, ScenarioOrderBy type aliases
- update session, environment, scenario services and controllers to use typed pagination
- update MCP list_sessions, list_environments, list_scenarios tools to expose orderBy/orderDir
- update tests for all list endpoints to cover page, limit, ordering, and invalid param rejection
2026-04-07 17:54:23 +03:00
ars9 d9cdb64ee2 feat(mcp): add scenario tools and fix per-request server lifecycle
- add list_scenarios, get_scenario, create_scenario, update_scenario, delete_scenario
- add create_scenario_step, get_scenario_step, update_scenario_step, delete_scenario_step
- add list_scenario_runs, run_scenario
- import ScenarioModule into McpModule so ScenarioService is injectable
- move tool registration to private registerTools(server) method; create
  fresh McpServer per request in handle() to satisfy SDK one-connection rule
- fix mcp.controller.spec: parse SSE data line instead of res.body; assert
  exact status 200 everywhere; remove vague toBeLessThan(500) guards
2026-04-07 17:25:55 +03:00
ars9 5ac26ecb3a feat(observability): add exception filter, logging interceptor, and CodeExecutorModule
- add HttpExceptionFilter logging BadRequestException at warn and InternalServerErrorException at error with cause chain
- add LoggingInterceptor logging request/response pairs at debug level with method, path, body, status, and duration
- extract CodeExecutorService into standalone CodeExecutorModule imported by BrowserModule and McpModule
- thread { cause: err } into all catch blocks across auth, browser, and code-executor services
2026-04-07 13:49:02 +03:00
ars9 bf1b6249a9 feat(mcp): add MCP endpoint; fix TODOs (pkg.json name/version, NestJS Logger) 2026-04-07 13:20:15 +03:00