@integrity-labs/cloud-broker 0.6.5 → 0.7.1

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.
Files changed (2) hide show
  1. package/dist/index.js +23 -13
  2. 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 && config2.apiPathPrefix.trim() || "/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
- "/aws/scope",
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
- "/aws/scope/preview",
21113
+ `${this.apiPathPrefix}/scope/preview`,
21111
21114
  { body }
21112
21115
  );
21113
21116
  }
@@ -21121,10 +21124,12 @@ 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", "/aws/grants", { body });
21127
+ return this.request("POST", `${this.apiPathPrefix}/grants`, { body });
21125
21128
  }
21126
21129
  pollGrant(args) {
21127
- return this.request("GET", `/aws/grants/${encodeURIComponent(args.grant_id)}`);
21130
+ return this.request("GET", `${this.apiPathPrefix}/grants/${encodeURIComponent(args.grant_id)}`, {
21131
+ query: this.agentId ? { agent_id: this.agentId } : void 0
21132
+ });
21128
21133
  }
21129
21134
  /**
21130
21135
  * ENG-4824: pre-flight check that the agent's Slack bot can actually
@@ -21139,14 +21144,15 @@ var BrokerClient = class {
21139
21144
  }
21140
21145
  return this.request(
21141
21146
  "GET",
21142
- "/aws/approval-channel-status",
21147
+ `${this.apiPathPrefix}/approval-channel-status`,
21143
21148
  { query: { account_id: args.account_id, agent_id: this.agentId } }
21144
21149
  );
21145
21150
  }
21146
21151
  releaseAccess(args) {
21147
21152
  return this.request(
21148
21153
  "POST",
21149
- `/aws/grants/${encodeURIComponent(args.grant_id)}/release`
21154
+ `${this.apiPathPrefix}/grants/${encodeURIComponent(args.grant_id)}/release`,
21155
+ { query: this.agentId ? { agent_id: this.agentId } : void 0 }
21150
21156
  );
21151
21157
  }
21152
21158
  /**
@@ -21161,7 +21167,7 @@ var BrokerClient = class {
21161
21167
  }
21162
21168
  return this.request(
21163
21169
  "GET",
21164
- "/aws/inventory",
21170
+ `${this.apiPathPrefix}/inventory`,
21165
21171
  { query: { agent_id: this.agentId } }
21166
21172
  );
21167
21173
  }
@@ -21172,7 +21178,8 @@ var BrokerClient = class {
21172
21178
  getCredentials(args) {
21173
21179
  return this.request(
21174
21180
  "POST",
21175
- `/aws/grants/${encodeURIComponent(args.grant_id)}/credentials`
21181
+ `${this.apiPathPrefix}/grants/${encodeURIComponent(args.grant_id)}/credentials`,
21182
+ { query: this.agentId ? { agent_id: this.agentId } : void 0 }
21176
21183
  );
21177
21184
  }
21178
21185
  };
@@ -21271,8 +21278,8 @@ var listAccountsShape = listAccountsSchema.shape;
21271
21278
  // package.json
21272
21279
  var package_default = {
21273
21280
  name: "@integrity-labs/cloud-broker",
21274
- version: "0.6.5",
21275
- description: "Cloud Access Broker \u2014 MCP server that mints scoped, TTL-bounded cloud credentials per agent task. v1 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.",
21281
+ version: "0.7.1",
21282
+ 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
21283
  type: "module",
21277
21284
  bin: {
21278
21285
  "cloud-broker": "./dist/index.js"
@@ -21297,7 +21304,8 @@ var package_default = {
21297
21304
  typecheck: "tsc --noEmit",
21298
21305
  test: "vitest run",
21299
21306
  clean: "rm -rf dist",
21300
- "publish:templates": "bash cloudformation/publish.sh"
21307
+ "publish:templates": "bash cloudformation/publish.sh",
21308
+ "check-published": "bash cloudformation/check-published.sh"
21301
21309
  },
21302
21310
  dependencies: {
21303
21311
  "@modelcontextprotocol/sdk": "1.27.1",
@@ -21308,7 +21316,8 @@ var package_default = {
21308
21316
  tsup: "8.5.1",
21309
21317
  tsx: "4.21.0",
21310
21318
  typescript: "5.9.3",
21311
- vitest: "3.2.4"
21319
+ vitest: "3.2.4",
21320
+ yaml: "2.8.4"
21312
21321
  }
21313
21322
  };
21314
21323
 
@@ -21337,7 +21346,8 @@ var broker = new BrokerClient({
21337
21346
  // on requestAccess if a non-empty value is provided.
21338
21347
  runId: AGT_RUN_ID || void 0,
21339
21348
  initialToken: AGT_TOKEN || void 0,
21340
- apiKey: AGT_API_KEY || void 0
21349
+ apiKey: AGT_API_KEY || void 0,
21350
+ apiPathPrefix: "/aws"
21341
21351
  });
21342
21352
  function formatBrokerError(err) {
21343
21353
  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.6.5",
4
- "description": "Cloud Access Broker — MCP server that mints scoped, TTL-bounded cloud credentials per agent task. v1 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.",
3
+ "version": "0.7.1",
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
  }