Skip to content

Commit fc879ed

Browse files
nieblaranbouvrettecursoragent
committed
feat: add get-audit-log-entries MCP tool
Runs speakeasy generation after enabling GET /api/v2/auditlog in the MCP overlay. Adds the auditLogListEntries tool, func, request/response models, and server registration. Co-authored-by: Nicolas Bouvrette <bouvrette.nicolas@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d2d430e commit fc879ed

44 files changed

Lines changed: 1703 additions & 54 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.speakeasy/gen.lock

Lines changed: 126 additions & 30 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ generation:
3232
generateNewTests: false
3333
skipResponseBodyAssertions: false
3434
typescript:
35-
version: 0.6.1
35+
version: 0.6.2
3636
acceptHeaderEnum: true
3737
additionalDependencies:
3838
dependencies:

.speakeasy/workflow.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ speakeasyVersion: 1.736.1
22
sources:
33
LaunchDarkly REST API:
44
sourceNamespace: launchdarkly-rest-api
5-
sourceRevisionDigest: sha256:128c9ec8c3aebbfed6add712e78fef0bc2570e04e60d65200a7f0ff107fac27d
6-
sourceBlobDigest: sha256:5e904711ebc11f383579ff58b5c2c5f0d5c341c3d92c48bb1d93b4f5f4b1e5c6
5+
sourceRevisionDigest: sha256:80bb48911dd638c18fe0922e126ce82954788ee0f92414f7e77fbaeb1b070465
6+
sourceBlobDigest: sha256:41a2ad76bc47436d617aecac155c7d1874739e72207edc2c639db000485d710d
77
tags:
88
- latest
99
- "2.0"
1010
targets:
1111
launchdarkly-mcp-server:
1212
source: LaunchDarkly REST API
1313
sourceNamespace: launchdarkly-rest-api
14-
sourceRevisionDigest: sha256:128c9ec8c3aebbfed6add712e78fef0bc2570e04e60d65200a7f0ff107fac27d
15-
sourceBlobDigest: sha256:5e904711ebc11f383579ff58b5c2c5f0d5c341c3d92c48bb1d93b4f5f4b1e5c6
14+
sourceRevisionDigest: sha256:80bb48911dd638c18fe0922e126ce82954788ee0f92414f7e77fbaeb1b070465
15+
sourceBlobDigest: sha256:41a2ad76bc47436d617aecac155c7d1874739e72207edc2c639db000485d710d
1616
codeSamplesNamespace: launchdarkly-rest-api-typescript-code-samples
17-
codeSamplesRevisionDigest: sha256:c2540075e36bdfdb4e66c7d37c308acd737c0808f87ca56bd0cd6ab36e7aee02
17+
codeSamplesRevisionDigest: sha256:594386a19cb5768d0df5661cb11aff3fd325048da020daa36e5ade1dfb0f5f5d
1818
workflow:
1919
workflowVersion: 1.0.0
2020
speakeasyVersion: 1.736.1

FUNCTIONS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ specific category of applications.
2020

2121
```typescript
2222
import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
23-
import { codeReferencesListRepositories } from "@launchdarkly/mcp-server/funcs/codeReferencesListRepositories.js";
23+
import { auditLogListEntries } from "@launchdarkly/mcp-server/funcs/auditLogListEntries.js";
2424

2525
// Use `LaunchDarklyCore` for best tree-shaking performance.
2626
// You can create one instance of it to use across an application.
@@ -29,12 +29,12 @@ const launchDarkly = new LaunchDarklyCore({
2929
});
3030

3131
async function run() {
32-
const res = await codeReferencesListRepositories(launchDarkly, {});
32+
const res = await auditLogListEntries(launchDarkly, {});
3333
if (res.ok) {
3434
const { value: result } = res;
3535
console.log(result);
3636
} else {
37-
console.log("codeReferencesListRepositories failed:", res.error);
37+
console.log("auditLogListEntries failed:", res.error);
3838
}
3939
}
4040

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
233233
* [getVariation](docs/sdks/aiconfigs/README.md#getvariation) - Get AI Config variation
234234
* [updateVariation](docs/sdks/aiconfigs/README.md#updatevariation) - Update AI Config variation
235235

236+
### [AuditLog](docs/sdks/auditlog/README.md)
237+
238+
* [listEntries](docs/sdks/auditlog/README.md#listentries) - List audit log entries
239+
236240
### [CodeReferences](docs/sdks/codereferences/README.md)
237241

238242
* [listRepositories](docs/sdks/codereferences/README.md#listrepositories) - List repositories

USAGE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const launchDarkly = new LaunchDarkly({
77
});
88

99
async function run() {
10-
const result = await launchDarkly.codeReferences.listRepositories({});
10+
const result = await launchDarkly.auditLog.listEntries({});
1111

1212
console.log(result);
1313
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# AuditLogEntryListingRep
2+
3+
## Example Usage
4+
5+
```typescript
6+
import { AuditLogEntryListingRep } from "@launchdarkly/mcp-server/models/components";
7+
8+
let value: AuditLogEntryListingRep = {
9+
links: {
10+
"key": {},
11+
},
12+
id: "1234a56b7c89d012345e678f",
13+
accountId: "1234a56b7c89d012345e678f",
14+
date: 175774,
15+
accesses: [
16+
{},
17+
],
18+
kind: "<value>",
19+
name: "Example feature flag",
20+
description: "Example, turning on the flag for testing",
21+
shortDescription: "Example, turning on the flag",
22+
comment: "This is an automated test",
23+
member: {
24+
id: "507f1f77bcf86cd799439011",
25+
email: "ariel@acme.com",
26+
firstName: "Ariel",
27+
lastName: "Flores",
28+
},
29+
token: {
30+
name: "DevOps token",
31+
ending: "2345",
32+
serviceToken: false,
33+
},
34+
titleVerb: "turned on the flag",
35+
target: {
36+
name: "Example flag name",
37+
resources: [
38+
"proj/example-project:env/production:flag/example-flag",
39+
],
40+
},
41+
};
42+
```
43+
44+
## Fields
45+
46+
| Field | Type | Required | Description | Example |
47+
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
48+
| `links` | Record<string, [components.Link](../../models/components/link.md)> | :heavy_check_mark: | The location and content type of related resources | |
49+
| `id` | *string* | :heavy_check_mark: | The ID of the audit log entry | 1234a56b7c89d012345e678f |
50+
| `accountId` | *string* | :heavy_check_mark: | The ID of the account to which this audit log entry belongs | 1234a56b7c89d012345e678f |
51+
| `date` | *number* | :heavy_check_mark: | N/A | |
52+
| `accesses` | [components.ResourceAccess](../../models/components/resourceaccess.md)[] | :heavy_check_mark: | Details on the actions performed and resources acted on in this audit log entry | |
53+
| `kind` | *string* | :heavy_check_mark: | N/A | |
54+
| `name` | *string* | :heavy_check_mark: | The name of the resource this audit log entry refers to | Example feature flag |
55+
| `description` | *string* | :heavy_check_mark: | Description of the change recorded in the audit log entry | Example, turning on the flag for testing |
56+
| `shortDescription` | *string* | :heavy_check_mark: | Shorter version of the change recorded in the audit log entry | Example, turning on the flag |
57+
| `comment` | *string* | :heavy_minus_sign: | Optional comment for the audit log entry | This is an automated test |
58+
| `subject` | [components.SubjectDataRep](../../models/components/subjectdatarep.md) | :heavy_minus_sign: | N/A | |
59+
| `member` | [components.MemberDataRep](../../models/components/memberdatarep.md) | :heavy_minus_sign: | N/A | |
60+
| `token` | [components.TokenSummary](../../models/components/tokensummary.md) | :heavy_minus_sign: | N/A | |
61+
| `app` | [components.AuthorizedAppDataRep](../../models/components/authorizedappdatarep.md) | :heavy_minus_sign: | N/A | |
62+
| `titleVerb` | *string* | :heavy_minus_sign: | The action and resource recorded in this audit log entry | turned on the flag |
63+
| `title` | *string* | :heavy_minus_sign: | A description of what occurred, in the format <code>member</code> <code>titleVerb</code> <code>target</code> | |
64+
| `target` | [components.TargetResourceRep](../../models/components/targetresourcerep.md) | :heavy_minus_sign: | N/A | |
65+
| `parent` | [components.ParentResourceRep](../../models/components/parentresourcerep.md) | :heavy_minus_sign: | N/A | |
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# AuditLogEntryListingRepCollection
2+
3+
## Example Usage
4+
5+
```typescript
6+
import { AuditLogEntryListingRepCollection } from "@launchdarkly/mcp-server/models/components";
7+
8+
let value: AuditLogEntryListingRepCollection = {
9+
items: [],
10+
links: {},
11+
};
12+
```
13+
14+
## Fields
15+
16+
| Field | Type | Required | Description |
17+
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
18+
| `items` | [components.AuditLogEntryListingRep](../../models/components/auditlogentrylistingrep.md)[] | :heavy_check_mark: | An array of audit log entries |
19+
| `links` | Record<string, [components.Link](../../models/components/link.md)> | :heavy_check_mark: | The location and content type of related resources |
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# AuthorizedAppDataRep
2+
3+
## Example Usage
4+
5+
```typescript
6+
import { AuthorizedAppDataRep } from "@launchdarkly/mcp-server/models/components";
7+
8+
let value: AuthorizedAppDataRep = {};
9+
```
10+
11+
## Fields
12+
13+
| Field | Type | Required | Description |
14+
| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ |
15+
| `links` | Record<string, [components.Link](../../models/components/link.md)> | :heavy_minus_sign: | N/A |
16+
| `id` | *string* | :heavy_minus_sign: | The ID of the authorized application |
17+
| `isScim` | *boolean* | :heavy_minus_sign: | Whether the application is authorized through SCIM |
18+
| `name` | *string* | :heavy_minus_sign: | The authorized application name |
19+
| `maintainerName` | *string* | :heavy_minus_sign: | The name of the maintainer for this authorized application |

0 commit comments

Comments
 (0)