Skip to content

feat!: v1.0.0 — the self engine is the only engine - #35

Open
Viserion77 wants to merge 16 commits into
mainfrom
lss-self-engine-v2
Open

feat!: v1.0.0 — the self engine is the only engine#35
Viserion77 wants to merge 16 commits into
mainfrom
lss-self-engine-v2

Conversation

@Viserion77

@Viserion77 Viserion77 commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Removes the LocalStack backend and the serverless-lss plugin, leaving one in-process
AWS emulator — no Docker, no container, no auth token. This is the 2.0.0 release.

285 files, +17,926 / −22,370 — a net −4,444 lines. v1 is mostly subtraction.

Migration: docs/MIGRATION-v1.md. A project already on
engine: "self" only deletes a few config keys.

Why this is safe to merge

The removal was decided on evidence, not preference. Both shipped LocalStack examples
were run end to end against the self engine first:

  • localstack-ultimate (45 resources, eu-west-1) — REST payload-v1 routes, DynamoDB
    composite key + GSI + stream, SQS with DLQ redrive at maxReceiveCount: 3, SNS Publish
    from a stream handler, EventBridge bus with a pattern rule, a rate(2 minutes) schedule,
    an S3 notification with a prefix filter, an OpenSearch Serverless catalog. Every path
    fired, zero errors.
  • localstack-free — REST v1 authorizer, httpApi v1 simple-response authorizer in
    TypeScript, cross-service authorizer resolved by ARN.

Nothing the project supported on LocalStack needed LocalStack.

⚠️ Please review this first

POST /api/services/install accepted any absolute directory and any command whose first
whitespace token was whitelisted. node -e "<js>" and npm exec -- <anything> pass that
check, and the endpoint returns the command's output — on a server that binds all
interfaces with permissive CORS, that was an execution and exfiltration primitive.

Both preparation endpoints now confine servicePath to the project root, and the install
command is validated by shape (package manager + install verb + flags, no positionals),
so those forms are unrepresentable rather than discouraged. Found in review before release;
the endpoints are new in this branch, so nothing released was ever exposed.

Breaking changes

  • LocalStack backend removed: localstack-backend.ts, localstack-manager.ts,
    aoss-sidecar.ts and the EngineBackend interface. EngineManager owns the one engine.
  • serverless-lss plugin retired (packages/serverless-plugin/, published separately).
    Services no longer announce themselves from inside sls package — a bare
    POST /api/services/register { servicePath } is a complete registration. Every
    plugins: - serverless-lss entry and custom.orchestrator block is dead config;
    custom.lss stays, now read server-side.
  • Config keys gone: engine, mode, localstackPort, localstackEndpoint,
    localstackEdition, localstackVersion, localstackImage, localstackAuthToken,
    services, aossSidecarPUT /api/config answers unknown config key.
  • Env vars gone: LSS_LOCALSTACK_*, LOCALSTACK_AUTH_TOKEN, LSS_SERVICES.
  • CLI flags gone: --self-engine, --external, --pro, --localstack-token.
  • API fields gone: GET /api/healthlocalstack (use engineRunning);
    GET /api/config → the localstack block, aossSidecar, services. LssClient:
    HealthStatus.localstack and lifecycle.start({ external, pro, localstackToken }).
  • serverless-offline compatibility gone: custom.serverless-offline.httpPort/lambdaPort
    are no longer read as port fallbacks — declare custom.lss.apiPort/invokePort.
  • Examples removed: examples/localstack-free, examples/localstack-ultimate (760 MB).
    Their raw AWS::ApiGatewayV1::* cross-stack topology survives at
    tests/integration/fixtures/apigw-raw/, where its end-to-end test still runs.

What's new

  • One port for everything — dashboard, REST API and the AWS wire protocols share one
    listener on 14566. Requests carrying positive AWS evidence (SigV4 Authorization,
    X-Amz-Target, any x-amz-* header, /_aoss, /2015-03-31/) demux to the engine,
    the rest to the dashboard. AWS_ENDPOINT, the dashboard URL and the registration URL
    are now the same string.
  • Lazy LambdaslambdaRuntime.lazy forks on first invocation, idleTimeoutMs (60 s)
    unloads when quiet, maxWarmWorkers (1/GB, clamped 2–12) caps residency. Measured on
    40 services / 400 lambdas / 400 tables: 2.0 GB → 128 MB at rest, ~20 ms cold start.
  • Guided onboarding — a 3-step flow (ports → branding → project scan) that takes a
    freshly cloned monorepo to registered without a terminal. This is the plugin's
    replacement for humans.
  • Service discoveryGET /api/services/scan + lss scan / lss register [path...],
    also exposed to code (LssClient.services.scan()) and to agents (MCP).
  • MCP server (lss mcp) — the running stack as 25 tools over hand-rolled JSON-RPC 2.0
    on stdio, zero new dependencies, off until a client is configured. See docs/MCP.md.
  • Three languages (en / pt-BR / es) in dashboard and CLI, hand-rolled and
    dependency-free. Also fixes CLI output that printed Brazilian Portuguese regardless of
    environment.
  • Live load panel on the Overview — resident workers against the ceiling, what ran in
    the last 1/2/10 min, how much overlapped, and what it costs the host. Parallelism is the
    peak per bucket, not the average, because an average hides the burst that saturates
    a laptop.
  • Official AWS service icons — 64 marks from AWS's Architecture Service Icons pack,
    vendored and registered into the TreeUI registry. A screen listing eight AWS services no
    longer distinguishes them by a database/inbox/target vocabulary.
  • LSS_ENGINE_DATA_DIR — a second instance needs only LSS_DASHBOARD_PORT +
    LSS_ENGINE_PORT + LSS_ENGINE_DATA_DIR.

Also fixed

  • The UI was never type-checked. src/ui/tsconfig.json extends the root config, which
    excludes src/ui — and exclude resolves against the root file, so the dashboard
    excluded itself from its own project and vue-tsc --noEmit silently checked nothing.
    12 real pre-existing errors surfaced and were fixed.
  • Per-service overrides were unreachable when the config file was not in the project
    root (symlinked checkout, config loaded from ~) — two spellings of the same key.
  • installed in the scan lied in a workspaces monorepo — it checked the service's own
    node_modules, which a hoisted workspace package legitimately lacks.

Verification

  • validate: pre-prod green: lint (0 errors), 4× tsc, vue-tsc, build.
  • 2,535 unit tests, 99 suites, 100% coverage (statements / branches / functions / lines).
  • The integration suite now runs everywhere — it boots an isolated orchestrator on the
    self engine instead of a LocalStack container: 19 end-to-end assertions in ~20 s,
    unconditional locally and in CI. Under v1 it skipped itself whenever the LocalStack token
    was absent, which was most of the time — the project's only end-to-end coverage usually
    did not run.

Reviewing 285 files

Most of the diff is deletion and mechanical rename (LocalStack → engine) across tests and
docs. The parts worth real attention:

  1. src/server/routes/services.ts — the install/package endpoint hardening above.
  2. src/server/services/engine-manager.ts — the single-engine lifecycle.
  3. src/server/index.ts — the single-listener demux on 14566.
  4. src/server/services/lambda-runtime-manager.ts — lazy forking, idle unload, residency cap.
  5. docs/MIGRATION-v1.md — is the removal list complete for a real v1 user?

Dependabot

Merging closes #30, #33 and #34 automatically: examples/localstack-ultimate no longer
exists, velocityjs is no longer in any lockfile, and fast-uri is now 3.1.4 across all
six lockfiles that carry it. #32 (adm-zip) is already satisfied on main and is stale
independently of this branch.

Note for follow-up: .github/dependabot.yml configures only the devcontainers
ecosystem, so these npm PRs come from security updates and are ungrouped and unthrottled.
npm audit on the root still reports 3 advisories in dev tooling (js-yaml,
brace-expansion, @babel/core) — all npm audit fix-able, all out of scope here.

- Introduced a new engine service to manage engine kind and labels.
- Updated health check to apply engine kind based on server response.
- Replaced deprecated localstack references with dynamic engine labels across UI components.
- Enhanced descriptions in various views to reflect the active engine type.
- Implemented pagination handling for DynamoDB and SQS resources to ensure complete data retrieval.
- Added tests for new engine functionality and pagination logic.
- Improved memory store tests to ensure isolation and reproducibility.
…tion

- Created a new TypeScript configuration file for the MCP module.
- Updated the UI to reflect the new project branding with a new favicon and title.
- Added a new SVG favicon for the project.
- Implemented unit tests for the MCP CLI commands, ensuring proper resolution of the MCP server path and package version handling.
- Introduced unit tests for the MCP HTTP layer, covering base URL resolution and HTTP request handling.
- Developed tests for the MCP JSON-RPC protocol, including handshake and tool invocation.
- Added tests for the MCP server's stdio handling, ensuring correct response framing and error reporting.
- Created tests for various MCP tools, validating their endpoint mappings and input handling.
- Updated seed-manager-guard tests to use EngineManager instead of LocalStackManager.
- Modified config-manager tests to remove deprecated LocalStack configurations and adjust expected values.
- Adjusted OpenSearch Explorer tests to target the engine endpoint directly, removing sidecar references.
- Refactored resource-provisioner tests to eliminate sidecar endpoint logic, focusing on engine endpoint.
- Updated seed-manager tests to reflect changes in error messages and endpoint handling related to the engine.
- Updated configuration files to set serverPort and selfEngine.port to 14566.
- Adjusted orchestrator URLs in service configurations to point to the new port.
- Refactored code to ensure all references to the previous port (3100) are updated to 14566.
- Introduced isAwsRequest utility to differentiate between AWS SDK calls and regular API requests.
- Enhanced the EngineManager to support embedded engine start without binding a separate port.
- Updated tests to reflect the new default port and ensure consistent behavior across the application.
…registration

- Removed local references to the serverless-lss plugin from package.json and package-lock.json in both users-service and sample-microservice fixtures.
- Updated serverless.yml files to eliminate plugin configurations related to serverless-lss.
- Introduced new service registration and scanning functionality in the CLI, allowing for service registration without the plugin.
- Added tests for the new service registration and scanning features, ensuring proper functionality and error handling.
- Updated existing tests to reflect changes in service discovery and registration processes.
- Implemented POST /api/services/install and /api/services/package endpoints to handle service installation and packaging.
- Added validation for servicePath input, ensuring it is a valid directory within the project root.
- Enhanced error handling for various failure scenarios during installation and packaging processes.
- Updated service scanning logic to include installation status and warnings for unpackaged services.
- Introduced tests for new endpoints and updated existing tests to cover new functionality and edge cases.
…sPage

- Added i18n support to ServiceDetailPage.vue, translating service-related messages and statuses.
- Updated SettingsPage.vue to use localized strings for configuration options and hints.
- Introduced a new test suite for validating i18n message catalogs, ensuring all keys are present across languages and correctly formatted.
…nd CLI

- Added i18n support to DynamoTableSettings.vue, replacing hardcoded strings with translation keys.
- Updated OnboardingPage.vue to ensure branding colors are preserved during updates.
- Refactored CLI tests to replace Portuguese error messages with English equivalents for consistency.
- Introduced unit tests for the CLI's i18n module, verifying locale detection and translation fallback mechanisms.
…tion

- Introduced a new `ScanWarning` interface to standardize warning messages across services.
- Updated the CLI to render localized scan warnings using the new structure.
- Enhanced the i18n module with additional translations for scan warnings in English, Portuguese, and Spanish.
- Modified service scanning logic to generate structured warnings for various scenarios (e.g., not installed, not packaged, unreadable config).
- Updated tests to reflect changes in warning structure and ensure proper localization handling.
- Implemented ActivityPanel.vue to display live load metrics including resident workers, invocation timeline, and host pressure.
- Introduced ActivitySnapshot API to fetch runtime activity data.
- Enhanced LambdaRuntimeManager to record invocation activities for better monitoring.
- Added internationalization support for activity panel messages in English, Portuguese, and Spanish.
- Updated OverviewPage.vue to include the new ActivityPanel component.
- Created tests for the new invocation activity tracking and API endpoints.
- Removed deprecated CLI flags and configurations related to localstack engine.
- Added a new module for AWS resource icons, mapping resource types to their respective AWS service marks.
- Registered AWS service icons in the TreeUI registry during application initialization.
- Updated OverviewPage, ServiceDetailPage, and other components to utilize the new AWS service icons for better visual representation.
- Ensured accessibility by maintaining proper labeling for icons and tags.
- Refactored existing components to replace generic icons with specific AWS service icons, enhancing clarity and consistency across the application.
- Updated documentation to reflect the integration of AWS Architecture Service Icons and their usage guidelines.
@Viserion77
Viserion77 requested a review from Copilot July 31, 2026 19:41
@Viserion77 Viserion77 self-assigned this Jul 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@Viserion77 Viserion77 changed the title feat!: v2.0.0 — the self engine is the only engine feat!: v1.0.0 — the self engine is the only engine Jul 31, 2026
- Updated the release documentation to reflect the retirement of the `serverless-lss` plugin package in version 1.0 instead of v2.
- Bumped various Babel dependencies to version 7.29.7 and 7.29.8, ensuring compatibility and security.
- Updated `js-yaml` to version 3.15.1 and `brace-expansion` to version 2.1.4, along with other dependency updates for improved functionality and security.
- Added license information for several packages in the package-lock.json.
- Introduced comprehensive unit tests for the bind-host service, covering functionalities such as getBindHost, isLoopbackBind, isOriginAllowed, and getExposureWarning.
- Ensured that the bind-host service correctly handles environment variables and validates binding addresses.
- Enhanced config-manager tests to include a packageCommand runner allowlist, ensuring security against arbitrary code execution.
- Added tests to reject unsafe package commands and environment variables that could lead to code injection vulnerabilities.
- Verified that the API and invoke listeners bind to the correct process-wide host, preventing unintended exposure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants