Skip to content

feat(mgmt): add engine management API#757

Merged
dorsha merged 2 commits into
mainfrom
feat/engine-management
Jun 28, 2026
Merged

feat(mgmt): add engine management API#757
dorsha merged 2 commits into
mainfrom
feat/engine-management

Conversation

@dorsha

@dorsha dorsha commented Jun 28, 2026

Copy link
Copy Markdown
Member

What

Adds descopeClient.management.engine with:

  • create(name) → returns the new engine incl. its generated id and secret
  • update(id, name)
  • delete(id)
  • load(id) / loadAll() — secret is always empty
  • rotateSecret(id) → returns the new secret (previous one invalidated)

Engines are managed via the management API (e.g. by the Terraform provider). The backend management endpoints live in descope/backend#1614.

Notes

  • The engine secret is returned only by create and rotateSecret; load/loadAll never include it (matches backend behavior).
  • Engine numeric fields (version/createdTime/...) are typed string because the management gateway serializes proto int64 as JSON strings.

Includes

lib/management/engine.ts, paths, Engine/EngineSecretResponse types, management wiring (index.ts), README section, and unit tests.

Testing

  • eslint + prettier clean, npm run build (types) clean
  • Full suite green (373 tests); 6 engine unit tests with engine.ts at 100% coverage
  • Verified end-to-end against a local stack via the go-sdk + integration test (descope/integrationtests)

🤖 Generated with Claude Code

Add descopeClient.management.engine with create / update / delete / load /
loadAll / rotateSecret, mirroring the other management resources. Engines are
managed via the management API (e.g. by the Terraform provider); see
descope/backend#1614 for the backend endpoints.

The engine secret is returned only by create and rotateSecret — load/loadAll
never include it. Engine numeric fields are typed as string because the
management gateway serializes proto int64 values as JSON strings.

Includes the engine module, paths, types, management wiring, README docs, and
unit tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@shuni-bot-dev

shuni-bot-dev Bot commented Jun 28, 2026

Copy link
Copy Markdown

🐕 Review complete — View session on Shuni Portal 🐾

@shuni-bot-dev

shuni-bot-dev Bot commented Jun 28, 2026

Copy link
Copy Markdown

🐕 Suggested Reviewers

The review assignment strategy prioritized recent contributors to files directly involved in the management API and related modules. This ensures reviewers are familiar with the latest changes and the specific areas impacted by this PR.

Reviewer Reason
aviadl Modified multiple files related to the management API, including core files and tests. Their recent changes across various management files suggest strong familiarity with this part of the codebase.
orius123 Contributed to several of the same files as aviadl, indicating ongoing work and understanding of the management module, making them well-suited to review these updates.
talaharoni Focused on types related to the management engine, so their review would ensure data structures and type definitions are correct.
ckiee Also contributed to key management files, which indicates familiarity with the code's structure and implementation details, especially in index and paths files.
guyp-descope Has recent commits to index and paths files, providing a perspective on the integration points and overall architecture of the management module.

Suggested by Shuni based on git history and PR context. Names are not @-mentioned to avoid notifying anyone — request a review from whoever fits best.

@shuni-bot-dev shuni-bot-dev Bot 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.

🐕 Shuni's Review

Adds management.engine with create/update/delete/load/loadAll/rotateSecret, types, paths, README, and full unit tests.

No issues found — good bones! Clean wrapper that mirrors the existing managementKey pattern, secret handling matches documented backend behavior, and all six methods are tested. Woof!

Match the dedicated management Engine message (descope/backend#1614): drop the
EngineService-internal fields (projectId, version, modifiedTime, lastSync,
imageVersion, contentVersion) that are no longer returned. createdTime is now a
numeric epoch-seconds value.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dorsha dorsha enabled auto-merge (squash) June 28, 2026 15:34
@dorsha dorsha disabled auto-merge June 28, 2026 19:52
@dorsha dorsha merged commit e0bc769 into main Jun 28, 2026
28 checks passed
@dorsha dorsha deleted the feat/engine-management branch June 28, 2026 19:52
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.

1 participant