Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
657d034
feat: add initial browser demo setup with Vite and React components
frontegg-david Feb 24, 2026
b2ecf3c
feat: improve buffer shim and enhance execution control status handling
frontegg-david Feb 24, 2026
f4af313
feat: enhance execution controls and error handling in iframe adapter
frontegg-david Feb 24, 2026
c5b679d
feat: refine type definitions and enhance execution statistics handli…
frontegg-david Feb 25, 2026
e6ec07c
feat: enhance security and error handling in iframe communication and…
frontegg-david Feb 25, 2026
f22a263
feat: improve execution state management and enhance message handling…
frontegg-david Feb 25, 2026
cfde58e
feat: add comprehensive documentation for configuration, overview, se…
frontegg-david Feb 25, 2026
475e733
feat: enhance error handling and improve JSON serialization for ifram…
frontegg-david Feb 25, 2026
3ca2765
feat: implement OpenAPI integration with catalog handler and source m…
frontegg-david Mar 31, 2026
df1da3f
Merge branch 'main' into support-in-browser-enclave
frontegg-david Mar 31, 2026
66e029b
refactor: improve code formatting and consistency across multiple files
frontegg-david Mar 31, 2026
1c26e78
feat: enhance OpenAPI integration with improved tool-service mapping …
frontegg-david Mar 31, 2026
ca23f85
feat: add action catalog endpoint and improve OpenAPI spec handling
frontegg-david Mar 31, 2026
3362f22
feat: implement abortable polling and enhance OpenAPI tool loading wi…
frontegg-david Mar 31, 2026
7a62ca7
feat: enhance OpenAPI tool loading with base URL resolution and impro…
frontegg-david Apr 1, 2026
e79cd3e
feat: update event naming and improve polling error handling in OpenA…
frontegg-david Apr 1, 2026
7fd08fa
feat: update event naming and improve polling error handling in OpenA…
frontegg-david Apr 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# CLAUDE.md

## Setup

Before running any commands, install dependencies with:

```bash
yarn install
```

## Verification

After every code change, the following commands must all pass before considering the work complete:

```bash
pnpm lint
pnpm format:check
pnpm build
yarn lint
yarn format:check
yarn build
```

Run these from the repository root. Use `npx nx` to target individual projects (e.g., `npx nx build browser`).
87 changes: 87 additions & 0 deletions docs/enclave/api-reference/enclavejs-broker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,93 @@ Submit tool execution result.
}
```

### GET /code/actions

Returns the current action catalog derived from connected OpenAPI sources.

**Response:**
```ts
interface CatalogResponse {
/** Available actions from all connected OpenAPI sources */
actions: CatalogAction[];
/** Connected OpenAPI service descriptors */
services: CatalogService[];
/** Catalog version — changes when actions are added or removed */
version: string;
}

interface CatalogAction {
/** Tool name (e.g., "user-service_listUsers") */
name: string;
/** Human-readable description from the OpenAPI spec */
description?: string;
/** JSON Schema for the tool's input parameters */
inputSchema?: Record<string, unknown>;
/** Name of the service this action belongs to */
service: string;
/** Tags from the OpenAPI operation */
tags?: string[];
/** Whether the operation is deprecated */
deprecated?: boolean;
}

interface CatalogService {
/** Service name (from OpenApiSourceConfig.name) */
name: string;
/** Internal spec URL */
specUrl: string;
/** ISO 8601 timestamp of the last successful spec poll */
lastUpdated: string;
/** Number of actions from this service */
actionCount: number;
}
```

**Version semantics:** The `version` field is a deterministic hash of all source spec hashes. It changes whenever an OpenAPI spec is polled with additions or removals. Consumers can compare version strings to detect catalog changes.

**Example:**
```bash
curl http://localhost:3001/code/actions
```

```json
{
"actions": [
{
"name": "user-service_listUsers",
"description": "List all users",
"service": "user-service"
},
{
"name": "user-service_getUser",
"description": "Get user by ID",
"service": "user-service"
}
],
"services": [
{
"name": "user-service",
"specUrl": "",
"lastUpdated": "2026-03-31T12:00:00.000Z",
"actionCount": 2
}
],
"version": "a1b2c3d4..."
}
```

**Wiring:** Use `CatalogHandler` to register this route:
```ts
import { CatalogHandler } from '@enclave-vm/broker';

const catalog = new CatalogHandler(toolRegistry, openApiSources);
for (const route of catalog.getRoutes()) {
app[route.method.toLowerCase()](route.path, route.handler);
}
```

The types `CatalogAction`, `CatalogService`, `CatalogResponse`, and `CatalogHandler` are all exported from the `@enclave-vm/broker` package.

### GET /health

Health check endpoint.
Expand Down
2 changes: 1 addition & 1 deletion libs/broker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@enclave-vm/types": "2.11.0",
"@enclave-vm/stream": "2.11.0",
"@enclave-vm/core": "2.11.0",
"minimatch": "^10.1.1",
"minimatch": "^10.2.5",
"zod": "^4.3.6"
}
}
Loading
Loading