@integrity-labs/cloud-broker 0.6.4 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +19 -13
- package/package.json +6 -4
package/dist/index.js
CHANGED
|
@@ -20994,6 +20994,7 @@ function makeBrokerError(status, message, detail) {
|
|
|
20994
20994
|
}
|
|
20995
20995
|
var BrokerClient = class {
|
|
20996
20996
|
host;
|
|
20997
|
+
apiPathPrefix;
|
|
20997
20998
|
agentId;
|
|
20998
20999
|
runId;
|
|
20999
21000
|
apiKey;
|
|
@@ -21003,6 +21004,8 @@ var BrokerClient = class {
|
|
|
21003
21004
|
exchangeInFlight = null;
|
|
21004
21005
|
constructor(config2) {
|
|
21005
21006
|
this.host = config2.host.replace(/\/+$/, "");
|
|
21007
|
+
const rawPrefix = config2.apiPathPrefix ?? "/cloud/aws";
|
|
21008
|
+
this.apiPathPrefix = (rawPrefix.startsWith("/") ? rawPrefix : `/${rawPrefix}`).replace(/\/+$/, "");
|
|
21006
21009
|
this.agentId = config2.agentId;
|
|
21007
21010
|
this.runId = config2.runId;
|
|
21008
21011
|
this.apiKey = config2.apiKey;
|
|
@@ -21095,7 +21098,7 @@ var BrokerClient = class {
|
|
|
21095
21098
|
}
|
|
21096
21099
|
return this.request(
|
|
21097
21100
|
"GET",
|
|
21098
|
-
|
|
21101
|
+
`${this.apiPathPrefix}/scope`,
|
|
21099
21102
|
{ query: { account_id: args.account_id, agent_id: this.agentId } }
|
|
21100
21103
|
);
|
|
21101
21104
|
}
|
|
@@ -21107,7 +21110,7 @@ var BrokerClient = class {
|
|
|
21107
21110
|
if (body.agent_id === void 0) body.agent_id = this.agentId;
|
|
21108
21111
|
return this.request(
|
|
21109
21112
|
"POST",
|
|
21110
|
-
|
|
21113
|
+
`${this.apiPathPrefix}/scope/preview`,
|
|
21111
21114
|
{ body }
|
|
21112
21115
|
);
|
|
21113
21116
|
}
|
|
@@ -21121,10 +21124,10 @@ var BrokerClient = class {
|
|
|
21121
21124
|
throw makeBrokerError(400, "BrokerClient.requestAccess requires run_id (pass it in args, or set runId on BrokerClientConfig)");
|
|
21122
21125
|
}
|
|
21123
21126
|
const body = { ...args, agent_id: agentId, run_id: runId };
|
|
21124
|
-
return this.request("POST",
|
|
21127
|
+
return this.request("POST", `${this.apiPathPrefix}/grants`, { body });
|
|
21125
21128
|
}
|
|
21126
21129
|
pollGrant(args) {
|
|
21127
|
-
return this.request("GET",
|
|
21130
|
+
return this.request("GET", `${this.apiPathPrefix}/grants/${encodeURIComponent(args.grant_id)}`);
|
|
21128
21131
|
}
|
|
21129
21132
|
/**
|
|
21130
21133
|
* ENG-4824: pre-flight check that the agent's Slack bot can actually
|
|
@@ -21139,14 +21142,14 @@ var BrokerClient = class {
|
|
|
21139
21142
|
}
|
|
21140
21143
|
return this.request(
|
|
21141
21144
|
"GET",
|
|
21142
|
-
|
|
21145
|
+
`${this.apiPathPrefix}/approval-channel-status`,
|
|
21143
21146
|
{ query: { account_id: args.account_id, agent_id: this.agentId } }
|
|
21144
21147
|
);
|
|
21145
21148
|
}
|
|
21146
21149
|
releaseAccess(args) {
|
|
21147
21150
|
return this.request(
|
|
21148
21151
|
"POST",
|
|
21149
|
-
|
|
21152
|
+
`${this.apiPathPrefix}/grants/${encodeURIComponent(args.grant_id)}/release`
|
|
21150
21153
|
);
|
|
21151
21154
|
}
|
|
21152
21155
|
/**
|
|
@@ -21161,7 +21164,7 @@ var BrokerClient = class {
|
|
|
21161
21164
|
}
|
|
21162
21165
|
return this.request(
|
|
21163
21166
|
"GET",
|
|
21164
|
-
|
|
21167
|
+
`${this.apiPathPrefix}/inventory`,
|
|
21165
21168
|
{ query: { agent_id: this.agentId } }
|
|
21166
21169
|
);
|
|
21167
21170
|
}
|
|
@@ -21172,7 +21175,7 @@ var BrokerClient = class {
|
|
|
21172
21175
|
getCredentials(args) {
|
|
21173
21176
|
return this.request(
|
|
21174
21177
|
"POST",
|
|
21175
|
-
|
|
21178
|
+
`${this.apiPathPrefix}/grants/${encodeURIComponent(args.grant_id)}/credentials`
|
|
21176
21179
|
);
|
|
21177
21180
|
}
|
|
21178
21181
|
};
|
|
@@ -21271,8 +21274,8 @@ var listAccountsShape = listAccountsSchema.shape;
|
|
|
21271
21274
|
// package.json
|
|
21272
21275
|
var package_default = {
|
|
21273
21276
|
name: "@integrity-labs/cloud-broker",
|
|
21274
|
-
version: "0.
|
|
21275
|
-
description: "Cloud Access Broker \u2014 MCP server that mints scoped, TTL-bounded cloud credentials per agent task.
|
|
21277
|
+
version: "0.7.0",
|
|
21278
|
+
description: "Cloud Access Broker \u2014 MCP server that mints scoped, TTL-bounded cloud credentials per agent task. Ships AWS support (aws_request_access, aws_poll_grant, aws_release_access, aws_describe_scope, aws_preview_request, aws_get_credentials \u2014 STS AssumeRole under the hood); GCP, Azure, and Cloudflare land alongside in the same package as the broker grows.",
|
|
21276
21279
|
type: "module",
|
|
21277
21280
|
bin: {
|
|
21278
21281
|
"cloud-broker": "./dist/index.js"
|
|
@@ -21297,7 +21300,8 @@ var package_default = {
|
|
|
21297
21300
|
typecheck: "tsc --noEmit",
|
|
21298
21301
|
test: "vitest run",
|
|
21299
21302
|
clean: "rm -rf dist",
|
|
21300
|
-
"publish:templates": "bash cloudformation/publish.sh"
|
|
21303
|
+
"publish:templates": "bash cloudformation/publish.sh",
|
|
21304
|
+
"check-published": "bash cloudformation/check-published.sh"
|
|
21301
21305
|
},
|
|
21302
21306
|
dependencies: {
|
|
21303
21307
|
"@modelcontextprotocol/sdk": "1.27.1",
|
|
@@ -21308,7 +21312,8 @@ var package_default = {
|
|
|
21308
21312
|
tsup: "8.5.1",
|
|
21309
21313
|
tsx: "4.21.0",
|
|
21310
21314
|
typescript: "5.9.3",
|
|
21311
|
-
vitest: "3.2.4"
|
|
21315
|
+
vitest: "3.2.4",
|
|
21316
|
+
yaml: "2.8.4"
|
|
21312
21317
|
}
|
|
21313
21318
|
};
|
|
21314
21319
|
|
|
@@ -21337,7 +21342,8 @@ var broker = new BrokerClient({
|
|
|
21337
21342
|
// on requestAccess if a non-empty value is provided.
|
|
21338
21343
|
runId: AGT_RUN_ID || void 0,
|
|
21339
21344
|
initialToken: AGT_TOKEN || void 0,
|
|
21340
|
-
apiKey: AGT_API_KEY || void 0
|
|
21345
|
+
apiKey: AGT_API_KEY || void 0,
|
|
21346
|
+
apiPathPrefix: "/cloud/aws"
|
|
21341
21347
|
});
|
|
21342
21348
|
function formatBrokerError(err) {
|
|
21343
21349
|
if (err && typeof err === "object" && "status" in err && "message" in err) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@integrity-labs/cloud-broker",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Cloud Access Broker — MCP server that mints scoped, TTL-bounded cloud credentials per agent task.
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "Cloud Access Broker — MCP server that mints scoped, TTL-bounded cloud credentials per agent task. Ships AWS support (aws_request_access, aws_poll_grant, aws_release_access, aws_describe_scope, aws_preview_request, aws_get_credentials — STS AssumeRole under the hood); GCP, Azure, and Cloudflare land alongside in the same package as the broker grows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"cloud-broker": "./dist/index.js"
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"typecheck": "tsc --noEmit",
|
|
27
27
|
"test": "vitest run",
|
|
28
28
|
"clean": "rm -rf dist",
|
|
29
|
-
"publish:templates": "bash cloudformation/publish.sh"
|
|
29
|
+
"publish:templates": "bash cloudformation/publish.sh",
|
|
30
|
+
"check-published": "bash cloudformation/check-published.sh"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
33
|
"@modelcontextprotocol/sdk": "1.27.1",
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
"tsup": "8.5.1",
|
|
38
39
|
"tsx": "4.21.0",
|
|
39
40
|
"typescript": "5.9.3",
|
|
40
|
-
"vitest": "3.2.4"
|
|
41
|
+
"vitest": "3.2.4",
|
|
42
|
+
"yaml": "2.8.4"
|
|
41
43
|
}
|
|
42
44
|
}
|