agentfootprint 7.14.0 → 7.15.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.
Files changed (94) hide show
  1. package/dist/adapters/hosting/agentcore.js +350 -0
  2. package/dist/adapters/hosting/agentcore.js.map +1 -0
  3. package/dist/adapters/memory/agentcore.js +125 -1
  4. package/dist/adapters/memory/agentcore.js.map +1 -1
  5. package/dist/adapters/security/agentcore.js +0 -0
  6. package/dist/adapters/security/agentcore.js.map +1 -0
  7. package/dist/esm/adapters/hosting/agentcore.d.ts +199 -0
  8. package/dist/esm/adapters/hosting/agentcore.js +321 -0
  9. package/dist/esm/adapters/hosting/agentcore.js.map +1 -0
  10. package/dist/esm/adapters/memory/agentcore.d.ts +88 -2
  11. package/dist/esm/adapters/memory/agentcore.js +125 -1
  12. package/dist/esm/adapters/memory/agentcore.js.map +1 -1
  13. package/dist/esm/adapters/security/agentcore.d.ts +157 -0
  14. package/dist/esm/adapters/security/agentcore.js +0 -0
  15. package/dist/esm/adapters/security/agentcore.js.map +1 -0
  16. package/dist/esm/hosting/httpHost.d.ts +121 -0
  17. package/dist/esm/hosting/httpHost.js +248 -0
  18. package/dist/esm/hosting/httpHost.js.map +1 -0
  19. package/dist/esm/hosting/index.d.ts +8 -1
  20. package/dist/esm/hosting/index.js +7 -1
  21. package/dist/esm/hosting/index.js.map +1 -1
  22. package/dist/esm/hosting/nodeHost.d.ts +23 -16
  23. package/dist/esm/hosting/nodeHost.js +32 -199
  24. package/dist/esm/hosting/nodeHost.js.map +1 -1
  25. package/dist/esm/hosting-providers.d.ts +50 -0
  26. package/dist/esm/hosting-providers.js +50 -0
  27. package/dist/esm/hosting-providers.js.map +1 -0
  28. package/dist/esm/lib/mcp/gatewayTransport.d.ts +103 -0
  29. package/dist/esm/lib/mcp/gatewayTransport.js +123 -0
  30. package/dist/esm/lib/mcp/gatewayTransport.js.map +1 -0
  31. package/dist/esm/lib/mcp/index.d.ts +2 -1
  32. package/dist/esm/lib/mcp/index.js +1 -0
  33. package/dist/esm/lib/mcp/index.js.map +1 -1
  34. package/dist/esm/lib/mcp/mcpClient.js +10 -2
  35. package/dist/esm/lib/mcp/mcpClient.js.map +1 -1
  36. package/dist/esm/lib/mcp/types.d.ts +45 -1
  37. package/dist/esm/memory/store/types.d.ts +22 -0
  38. package/dist/esm/memory-providers.d.ts +1 -1
  39. package/dist/esm/memory-providers.js.map +1 -1
  40. package/dist/esm/security/index.d.ts +10 -1
  41. package/dist/esm/security/index.js +14 -1
  42. package/dist/esm/security/index.js.map +1 -1
  43. package/dist/esm/tool-providers/index.d.ts +6 -2
  44. package/dist/esm/tool-providers/index.js +5 -1
  45. package/dist/esm/tool-providers/index.js.map +1 -1
  46. package/dist/hosting/httpHost.js +276 -0
  47. package/dist/hosting/httpHost.js.map +1 -0
  48. package/dist/hosting/index.js +10 -1
  49. package/dist/hosting/index.js.map +1 -1
  50. package/dist/hosting/nodeHost.js +34 -224
  51. package/dist/hosting/nodeHost.js.map +1 -1
  52. package/dist/hosting-providers.js +57 -0
  53. package/dist/hosting-providers.js.map +1 -0
  54. package/dist/lib/mcp/gatewayTransport.js +129 -0
  55. package/dist/lib/mcp/gatewayTransport.js.map +1 -0
  56. package/dist/lib/mcp/index.js +4 -1
  57. package/dist/lib/mcp/index.js.map +1 -1
  58. package/dist/lib/mcp/mcpClient.js +10 -2
  59. package/dist/lib/mcp/mcpClient.js.map +1 -1
  60. package/dist/memory-providers.js.map +1 -1
  61. package/dist/security/index.js +16 -2
  62. package/dist/security/index.js.map +1 -1
  63. package/dist/tool-providers/index.js +7 -1
  64. package/dist/tool-providers/index.js.map +1 -1
  65. package/dist/types/adapters/hosting/agentcore.d.ts +200 -0
  66. package/dist/types/adapters/hosting/agentcore.d.ts.map +1 -0
  67. package/dist/types/adapters/memory/agentcore.d.ts +88 -2
  68. package/dist/types/adapters/memory/agentcore.d.ts.map +1 -1
  69. package/dist/types/adapters/security/agentcore.d.ts +158 -0
  70. package/dist/types/adapters/security/agentcore.d.ts.map +1 -0
  71. package/dist/types/hosting/httpHost.d.ts +122 -0
  72. package/dist/types/hosting/httpHost.d.ts.map +1 -0
  73. package/dist/types/hosting/index.d.ts +8 -1
  74. package/dist/types/hosting/index.d.ts.map +1 -1
  75. package/dist/types/hosting/nodeHost.d.ts +23 -16
  76. package/dist/types/hosting/nodeHost.d.ts.map +1 -1
  77. package/dist/types/hosting-providers.d.ts +51 -0
  78. package/dist/types/hosting-providers.d.ts.map +1 -0
  79. package/dist/types/lib/mcp/gatewayTransport.d.ts +104 -0
  80. package/dist/types/lib/mcp/gatewayTransport.d.ts.map +1 -0
  81. package/dist/types/lib/mcp/index.d.ts +2 -1
  82. package/dist/types/lib/mcp/index.d.ts.map +1 -1
  83. package/dist/types/lib/mcp/mcpClient.d.ts.map +1 -1
  84. package/dist/types/lib/mcp/types.d.ts +45 -1
  85. package/dist/types/lib/mcp/types.d.ts.map +1 -1
  86. package/dist/types/memory/store/types.d.ts +22 -0
  87. package/dist/types/memory/store/types.d.ts.map +1 -1
  88. package/dist/types/memory-providers.d.ts +1 -1
  89. package/dist/types/memory-providers.d.ts.map +1 -1
  90. package/dist/types/security/index.d.ts +10 -1
  91. package/dist/types/security/index.d.ts.map +1 -1
  92. package/dist/types/tool-providers/index.d.ts +6 -2
  93. package/dist/types/tool-providers/index.d.ts.map +1 -1
  94. package/package.json +14 -1
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ /**
3
+ * agentfootprint/hosting-providers — adapters for the two hosting ports.
4
+ *
5
+ * agentfootprint/hosting ← the PORTS (`AgentHost`, `SessionLifecycle`),
6
+ * the composer, and the local adapters
7
+ * agentfootprint/hosting-providers ← adapters for somewhere you deploy (this file)
8
+ *
9
+ * Same split as `agentfootprint/memory` ↔ `agentfootprint/memory-providers`, and
10
+ * for the same reason. `agentfootprint/hosting` promises that not one field,
11
+ * name or assumption in it comes from any cloud, and a test greps its sources
12
+ * for vendor names to keep that honest — including the barrel. So the cloud
13
+ * adapters get their own subpath, and the port subpath stays a file you can
14
+ * read without learning anybody's product names.
15
+ *
16
+ * One subpath that grows: an adapter for the next runtime lands here beside
17
+ * this one rather than minting `agentfootprint/hosting-<vendor>`.
18
+ *
19
+ * ── What ships here ──────────────────────────────────────────────────────────
20
+ * • `agentCoreRuntimeHost({ port?, hostname?, busy? })` — an `AgentHost` for
21
+ * AWS Bedrock AgentCore Runtime's container contract: `POST /invocations`,
22
+ * `GET /ping`, port 8080, and the conversation id read from the
23
+ * `X-Amzn-Bedrock-AgentCore-Runtime-Session-Id` header.
24
+ * • `agentCoreSessions({ store })` — a `SessionLifecycle` whose checkpoint
25
+ * home you choose at construction: a JSON file in the runtime's own session
26
+ * storage (survives a stop/resume, needs no SDK), or one AgentCore Memory
27
+ * event per persist (outlives the session).
28
+ *
29
+ * ── How much of this is verified ─────────────────────────────────────────────
30
+ * `agentCoreRuntimeHost` is plain HTTP with no SDK on its path, and it passes
31
+ * the same host conformance suite as `nodeHost` over a real socket — that is
32
+ * real verification, not a mapping asserted in prose.
33
+ *
34
+ * Everything that talks to AWS — `agentCoreSessions({ store: 'memory' })` — is
35
+ * **contract-mapped and injection-tested**: the SDK calls are exercised through
36
+ * the `_client` seam and no test pretends to have reached AWS. Real-cloud
37
+ * verification lands with a field deployment.
38
+ *
39
+ * @example An agent in an AgentCore Runtime container
40
+ * import { standingAgent } from 'agentfootprint/hosting';
41
+ * import { agentCoreRuntimeHost, agentCoreSessions } from 'agentfootprint/hosting-providers';
42
+ *
43
+ * const handle = await standingAgent({
44
+ * agent,
45
+ * host: agentCoreRuntimeHost(),
46
+ * sessions: agentCoreSessions({ store: 'session-storage' }),
47
+ * });
48
+ * process.on('SIGTERM', () => void handle.close());
49
+ */
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.DEFAULT_SESSION_STORAGE_PATH = exports.agentCoreSessions = exports.agentCoreRuntimeWire = exports.agentCoreRuntimeHost = void 0;
52
+ var agentcore_js_1 = require("./adapters/hosting/agentcore.js");
53
+ Object.defineProperty(exports, "agentCoreRuntimeHost", { enumerable: true, get: function () { return agentcore_js_1.agentCoreRuntimeHost; } });
54
+ Object.defineProperty(exports, "agentCoreRuntimeWire", { enumerable: true, get: function () { return agentcore_js_1.agentCoreRuntimeWire; } });
55
+ Object.defineProperty(exports, "agentCoreSessions", { enumerable: true, get: function () { return agentcore_js_1.agentCoreSessions; } });
56
+ Object.defineProperty(exports, "DEFAULT_SESSION_STORAGE_PATH", { enumerable: true, get: function () { return agentcore_js_1.DEFAULT_SESSION_STORAGE_PATH; } });
57
+ //# sourceMappingURL=hosting-providers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hosting-providers.js","sourceRoot":"","sources":["../src/hosting-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;;;AAEH,gEAKyC;AAJvC,oHAAA,oBAAoB,OAAA;AACpB,oHAAA,oBAAoB,OAAA;AACpB,iHAAA,iBAAiB,OAAA;AACjB,4HAAA,4BAA4B,OAAA"}
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ /**
3
+ * gatewayTransport — an MCP transport whose auth headers are vended per
4
+ * request, not per connection.
5
+ *
6
+ * const gateway = await mcpClient({
7
+ * name: 'gateway',
8
+ * transport: gatewayTransport({ url, credentials, service: 'gateway' }),
9
+ * });
10
+ *
11
+ * ── Why this exists ──────────────────────────────────────────────────────────
12
+ * The `http` transport takes headers once and reuses them for the life of the
13
+ * connection. That is right for a static API key and wrong for anything with an
14
+ * expiry: a standing agent outlives its bearer token, and the failure mode is a
15
+ * burst of 401s an hour into a session that worked perfectly when you tested
16
+ * it. Managed gateways — AgentCore's among them — hand out exactly that kind of
17
+ * token, so "get a fresh one before each request" is not an optimisation, it is
18
+ * the only way the connection stays up.
19
+ *
20
+ * Nothing here is vendor-specific. It is the {@link CredentialProvider} port on
21
+ * one side and Streamable HTTP on the other; who vends is your choice.
22
+ *
23
+ * ── The secrecy invariant, and how it is kept ────────────────────────────────
24
+ * **A vended token is used once and dropped.** It is not cached between
25
+ * requests, not stored on the transport object, not put in an event payload,
26
+ * not written to a log, and not included in any error this module throws —
27
+ * including the errors it throws WHILE holding one. A test asserts that: a
28
+ * hostile logger subscribed to everything the library can say never sees the
29
+ * header value.
30
+ *
31
+ * That is why the vend happens inside `fetch` rather than at construction. A
32
+ * token resolved at construction has to live somewhere for the connection to
33
+ * use it later, and "somewhere" is what leaks.
34
+ *
35
+ * Pattern: Adapter + Decorator over `fetch`. Role: Layer-3 tool integration.
36
+ */
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.createVendingFetch = exports.GatewayAuthorizationRequiredError = exports.gatewayTransport = void 0;
39
+ const types_js_1 = require("../../identity/types.js");
40
+ const DEFAULT_SERVICE = 'gateway';
41
+ /**
42
+ * Describe an MCP connection whose auth headers are vended per request.
43
+ *
44
+ * @example A managed gateway with a token vault behind it
45
+ * import { agentCoreIdentity } from 'agentfootprint/identity';
46
+ * import { gatewayTransport, mcpClient } from 'agentfootprint/tool-providers';
47
+ *
48
+ * const gateway = await mcpClient({
49
+ * name: 'gateway',
50
+ * transport: gatewayTransport({
51
+ * url: process.env.GATEWAY_MCP_URL!,
52
+ * credentials: agentCoreIdentity({ region: 'us-west-2' }),
53
+ * service: 'gateway',
54
+ * }),
55
+ * });
56
+ * const agent = Agent.create({ provider, model }).tools(await gateway.tools()).build();
57
+ */
58
+ function gatewayTransport(options) {
59
+ if (!options.url)
60
+ throw new Error(`gatewayTransport requires 'url'.`);
61
+ if (!options.credentials)
62
+ throw new Error(`gatewayTransport requires 'credentials'.`);
63
+ return {
64
+ transport: 'gateway',
65
+ url: options.url,
66
+ credentials: options.credentials,
67
+ service: options.service ?? DEFAULT_SERVICE,
68
+ ...(options.scopes !== undefined && { scopes: options.scopes }),
69
+ ...(options.mode !== undefined && { mode: options.mode }),
70
+ ...(options.headers !== undefined && { headers: options.headers }),
71
+ };
72
+ }
73
+ exports.gatewayTransport = gatewayTransport;
74
+ /**
75
+ * Raised when the provider needs a human to authorize before it can vend.
76
+ *
77
+ * The URL is carried so the caller can surface it (pause the run, show a
78
+ * link); **the token is not, because there is not one yet** — that is the whole
79
+ * meaning of this error.
80
+ */
81
+ class GatewayAuthorizationRequiredError extends Error {
82
+ code = 'ERR_GATEWAY_AUTHORIZATION_REQUIRED';
83
+ /** Send the user here, then retry. */
84
+ authorizationUrl;
85
+ constructor(service, authorizationUrl) {
86
+ super(`[mcp] the credential provider needs a person to authorize '${service}' before it can ` +
87
+ `vend a token for this gateway. A transport cannot run a consent flow mid-request — ` +
88
+ `surface the authorization URL to the user (pause the run), then call the tool again ` +
89
+ `once they have authorized.`);
90
+ this.name = 'GatewayAuthorizationRequiredError';
91
+ this.authorizationUrl = authorizationUrl;
92
+ }
93
+ }
94
+ exports.GatewayAuthorizationRequiredError = GatewayAuthorizationRequiredError;
95
+ /**
96
+ * Build the `fetch` the MCP SDK will use: one that vends a credential, applies
97
+ * it to this one request, and keeps nothing.
98
+ *
99
+ * Exported for tests — the secrecy invariant is asserted against this function
100
+ * directly, because that is where a leak would happen and driving a whole SDK
101
+ * to reach it would test less while looking like it tested more.
102
+ *
103
+ * @internal
104
+ */
105
+ function createVendingFetch(transport, baseFetch = globalThis.fetch.bind(globalThis)) {
106
+ return async (input, init) => {
107
+ const result = await transport.credentials.getCredential({
108
+ service: transport.service,
109
+ ...(transport.scopes !== undefined && { scopes: transport.scopes }),
110
+ ...(transport.mode !== undefined && { mode: transport.mode }),
111
+ });
112
+ if (!(0, types_js_1.isCredentialIssued)(result)) {
113
+ throw new GatewayAuthorizationRequiredError(transport.service, result.authorizationUrl);
114
+ }
115
+ // Static headers first, vended ones last: a vended auth header always wins,
116
+ // so a stale static one can never quietly shadow the live credential.
117
+ const headers = new Headers(init?.headers ?? {});
118
+ for (const [key, value] of Object.entries(transport.headers ?? {}))
119
+ headers.set(key, value);
120
+ for (const [key, value] of Object.entries(result.credential.toHeaders())) {
121
+ headers.set(key, value);
122
+ }
123
+ // The vended value exists only inside this call, on this Headers object,
124
+ // for the duration of this request. Nothing above closes over it.
125
+ return baseFetch(input, { ...init, headers });
126
+ };
127
+ }
128
+ exports.createVendingFetch = createVendingFetch;
129
+ //# sourceMappingURL=gatewayTransport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gatewayTransport.js","sourceRoot":"","sources":["../../../src/lib/mcp/gatewayTransport.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;;;AAEH,sDAAsF;AA0BtF,MAAM,eAAe,GAAG,SAAS,CAAC;AAElC;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,gBAAgB,CAAC,OAAgC;IAC/D,IAAI,CAAC,OAAO,CAAC,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtE,IAAI,CAAC,OAAO,CAAC,WAAW;QAAE,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IACtF,OAAO;QACL,SAAS,EAAE,SAAS;QACpB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,eAAe;QAC3C,GAAG,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;QAC/D,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;QACzD,GAAG,CAAC,OAAO,CAAC,OAAO,KAAK,SAAS,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;KACnE,CAAC;AACJ,CAAC;AAZD,4CAYC;AAED;;;;;;GAMG;AACH,MAAa,iCAAkC,SAAQ,KAAK;IACjD,IAAI,GAAG,oCAA6C,CAAC;IAC9D,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AC5F,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC;YACzE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC1B,CAAC;QAED,yEAAyE;QACzE,kEAAkE;QAClE,OAAO,SAAS,CAAC,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC;AA1BD,gDA0BC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mockMcpClient = exports.mcpServe = exports.mcpClient = void 0;
3
+ exports.GatewayAuthorizationRequiredError = exports.gatewayTransport = exports.mockMcpClient = exports.mcpServe = exports.mcpClient = void 0;
4
4
  /**
5
5
  * MCP — Model Context Protocol, both directions. `mcpClient` connects to
6
6
  * someone else's MCP server and registers its tools on your Agent;
@@ -13,4 +13,7 @@ var mcpServe_js_1 = require("./mcpServe.js");
13
13
  Object.defineProperty(exports, "mcpServe", { enumerable: true, get: function () { return mcpServe_js_1.mcpServe; } });
14
14
  var mockMcpClient_js_1 = require("./mockMcpClient.js");
15
15
  Object.defineProperty(exports, "mockMcpClient", { enumerable: true, get: function () { return mockMcpClient_js_1.mockMcpClient; } });
16
+ var gatewayTransport_js_1 = require("./gatewayTransport.js");
17
+ Object.defineProperty(exports, "gatewayTransport", { enumerable: true, get: function () { return gatewayTransport_js_1.gatewayTransport; } });
18
+ Object.defineProperty(exports, "GatewayAuthorizationRequiredError", { enumerable: true, get: function () { return gatewayTransport_js_1.GatewayAuthorizationRequiredError; } });
16
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/mcp/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,+CAA2C;AAAlC,yGAAA,SAAS,OAAA;AAClB,6CAAyC;AAAhC,uGAAA,QAAQ,OAAA;AACjB,uDAAgG;AAAvF,iHAAA,aAAa,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/mcp/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,+CAA2C;AAAlC,yGAAA,SAAS,OAAA;AAClB,6CAAyC;AAAhC,uGAAA,QAAQ,OAAA;AACjB,uDAAgG;AAAvF,iHAAA,aAAa,OAAA;AACtB,6DAI+B;AAH7B,uHAAA,gBAAgB,OAAA;AAChB,wIAAA,iCAAiC,OAAA"}
@@ -36,6 +36,7 @@
36
36
  */
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
38
  exports.mcpClient = void 0;
39
+ const gatewayTransport_js_1 = require("./gatewayTransport.js");
39
40
  const lazyRequire_js_1 = require("../lazyRequire.js");
40
41
  // Version-less identity. The MCP `clientInfo` field is informational
41
42
  // (server logs it); a hardcoded number drifts every release. Consumers
@@ -135,15 +136,22 @@ async function buildTransport(t) {
135
136
  ...(t.cwd !== undefined && { cwd: t.cwd }),
136
137
  });
137
138
  }
138
- // http transport
139
+ // http + gateway transports both ride Streamable HTTP. They differ only in
140
+ // WHEN the auth headers are decided: `http` fixes them at construction,
141
+ // `gateway` vends them inside every request (see gatewayTransport.ts).
139
142
  let httpMod;
140
143
  try {
141
144
  httpMod = (0, lazyRequire_js_1.lazyRequire)('@modelcontextprotocol/sdk/client/streamableHttp.js');
142
145
  }
143
146
  catch {
144
- throw new Error('mcpClient(http) requires @modelcontextprotocol/sdk/client/streamableHttp.js — ' +
147
+ throw new Error(`mcpClient(${t.transport}) requires @modelcontextprotocol/sdk/client/streamableHttp.js — ` +
145
148
  'check that @modelcontextprotocol/sdk is installed at the latest version.');
146
149
  }
150
+ if (t.transport === 'gateway') {
151
+ return new httpMod.StreamableHTTPClientTransport(new URL(t.url), {
152
+ fetch: (0, gatewayTransport_js_1.createVendingFetch)(t),
153
+ });
154
+ }
147
155
  return new httpMod.StreamableHTTPClientTransport(new URL(t.url), {
148
156
  ...(t.headers && { requestInit: { headers: { ...t.headers } } }),
149
157
  });
@@ -1 +1 @@
1
- {"version":3,"file":"mcpClient.js","sourceRoot":"","sources":["../../../src/lib/mcp/mcpClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;;;AAIH,sDAAgD;AAEhD,qEAAqE;AACrE,uEAAuE;AACvE,mEAAmE;AACnE,MAAM,mBAAmB,GAAG;IAC1B,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,OAAO;CACjB,CAAC;AAEF;;;;;;;;GAQG;AACI,KAAK,UAAU,SAAS,CAAC,IAAsB;IACpD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC;IAChC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,IAAI,CAAC,MAAM,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAEhG,kEAAkE;IAClE,kDAAkD;IAClD,IAAI,KAAK,GAA2B,IAAI,CAAC;IACzC,IAAI,MAAM,GAAG,KAAK,CAAC;IAEnB,MAAM,UAAU,GAAG,CAAC,EAAU,EAAQ,EAAE;QACtC,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CACb,aAAa,IAAI,KAAK,EAAE,+DAA+D,CACxF,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,UAAU,GAAG,KAAK,IAA8B,EAAE;QACtD,sEAAsE;QACtE,0CAA0C;QAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM;YACxB,CAAC,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;YACzD,CAAC,CAAC,MAAM,GAAG,CAAC,SAAS,EA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AAU,OAAA;AAMZ,+DAIwC;AAHtC,8GAAA,cAAc,OAAA;AAKhB,8EAA8E;AAC9E,yEAAyE;AACzE,iFAKiD;AAJ/C,2HAAA,kBAAkB,OAAA"}
1
+ {"version":3,"file":"memory-providers.js","sourceRoot":"","sources":["../src/memory-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;;;AAEH,sEAAsE;AACtE,sEAAsE;AACtE,wDAAwD;AACxD,uDAKoC;AAJlC,sGAAA,UAAU,OAAA;AAMZ,+DAMwC;AALtC,8GAAA,cAAc,OAAA;AAOhB,8EAA8E;AAC9E,yEAAyE;AACzE,iFAKiD;AAJ/C,2HAAA,kBAAkB,OAAA"}
@@ -11,7 +11,15 @@
11
11
  * Today's surface is small and data-driven on purpose: one role
12
12
  * allowlist primitive that satisfies BOTH the v2.4 `PermissionChecker`
13
13
  * interface AND a sync `isAllowed(toolId)` predicate for use with
14
- * `gatedTools` from `agentfootprint/tool-providers`.
14
+ * `gatedTools` from `agentfootprint/tool-providers` — plus
15
+ * `agentCorePolicy()`, the same port answered by a remote policy store.
16
+ *
17
+ * A local allowlist and a remote policy engine differ in one way that
18
+ * matters here: the local one can answer synchronously, so it doubles
19
+ * as a `gatedTools` predicate; a remote one cannot, so it plugs in ONLY
20
+ * as `permissionChecker`. That is not a limitation of either — the gate
21
+ * decides what the model is shown, the checker decides what actually
22
+ * runs, and they compose without knowing about each other.
15
23
  *
16
24
  * Future additions (capability gating, gate_open flows, audit logs)
17
25
  * land here without expanding the public root barrel.
@@ -36,7 +44,7 @@
36
44
  * const agent = Agent.create({ provider, model, permissionChecker: policy }).build();
37
45
  */
38
46
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.REDACTED_PLACEHOLDER = exports.redactThinkingBlocks = exports.SYNTHETIC_DENY_PREFIX = exports.extractSequence = exports.PolicyHaltError = exports.PermissionPolicy = void 0;
47
+ exports.agentCorePolicy = exports.REDACTED_PLACEHOLDER = exports.redactThinkingBlocks = exports.SYNTHETIC_DENY_PREFIX = exports.extractSequence = exports.PolicyHaltError = exports.PermissionPolicy = void 0;
40
48
  var PermissionPolicy_js_1 = require("./PermissionPolicy.js");
41
49
  Object.defineProperty(exports, "PermissionPolicy", { enumerable: true, get: function () { return PermissionPolicy_js_1.PermissionPolicy; } });
42
50
  var PolicyHaltError_js_1 = require("./PolicyHaltError.js");
@@ -47,4 +55,10 @@ Object.defineProperty(exports, "SYNTHETIC_DENY_PREFIX", { enumerable: true, get:
47
55
  var thinkingRedaction_js_1 = require("./thinkingRedaction.js");
48
56
  Object.defineProperty(exports, "redactThinkingBlocks", { enumerable: true, get: function () { return thinkingRedaction_js_1.redactThinkingBlocks; } });
49
57
  Object.defineProperty(exports, "REDACTED_PLACEHOLDER", { enumerable: true, get: function () { return thinkingRedaction_js_1.REDACTED_PLACEHOLDER; } });
58
+ // A remote policy engine behind the same port. Lazy peer-dep: importing this
59
+ // barrel loads no AWS SDK — only constructing the checker and letting it
60
+ // evaluate does. Same home as `PermissionPolicy` because it is the same job,
61
+ // just asked of somebody else.
62
+ var agentcore_js_1 = require("../adapters/security/agentcore.js");
63
+ Object.defineProperty(exports, "agentCorePolicy", { enumerable: true, get: function () { return agentcore_js_1.agentCorePolicy; } });
50
64
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/security/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;;;AAEH,6DAAyD;AAAhD,uHAAA,gBAAgB,OAAA;AAGzB,2DAAuD;AAA9C,qHAAA,eAAe,OAAA;AAGxB,2DAA8E;AAArE,qHAAA,eAAe,OAAA;AAAE,2HAAA,qBAAqB,OAAA;AAG/C,+DAAoF;AAA3E,4HAAA,oBAAoB,OAAA;AAAE,4HAAA,oBAAoB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/security/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;;;AAEH,6DAAyD;AAAhD,uHAAA,gBAAgB,OAAA;AAGzB,2DAAuD;AAA9C,qHAAA,eAAe,OAAA;AAGxB,2DAA8E;AAArE,qHAAA,eAAe,OAAA;AAAE,2HAAA,qBAAqB,OAAA;AAG/C,+DAAoF;AAA3E,4HAAA,oBAAoB,OAAA;AAAE,4HAAA,oBAAoB,OAAA;AAEnD,6EAA6E;AAC7E,yEAAyE;AACzE,6EAA6E;AAC7E,+BAA+B;AAC/B,kEAO2C;AANzC,+GAAA,eAAe,OAAA"}
@@ -13,6 +13,10 @@
13
13
  * 2. Tool sources (re-exported from existing modules)
14
14
  * - `mcpClient(opts)` — connect to an MCP server (real)
15
15
  * - `mockMcpClient({ tools })` — in-memory MCP source for dev / tests
16
+ * - `gatewayTransport({ url, credentials, service })` — an MCP
17
+ * transport whose auth headers are vended PER REQUEST by a
18
+ * `CredentialProvider`, for endpoints behind a token with an
19
+ * expiry. The token is used once and never stored.
16
20
  *
17
21
  * 3. Tool sink — the other direction
18
22
  * - `mcpServe(tools, opts)` — expose your own `Tool[]` AS an MCP
@@ -41,7 +45,7 @@
41
45
  * const provider = gatedTools(staticTools(slackTools), (name) => allowed(name));
42
46
  */
43
47
  Object.defineProperty(exports, "__esModule", { value: true });
44
- exports.mockMcpClient = exports.mcpServe = exports.mcpClient = exports.skillScopedTools = exports.gatedTools = exports.staticTools = void 0;
48
+ exports.GatewayAuthorizationRequiredError = exports.gatewayTransport = exports.mockMcpClient = exports.mcpServe = exports.mcpClient = exports.skillScopedTools = exports.gatedTools = exports.staticTools = void 0;
45
49
  var staticTools_js_1 = require("./staticTools.js");
46
50
  Object.defineProperty(exports, "staticTools", { enumerable: true, get: function () { return staticTools_js_1.staticTools; } });
47
51
  var gatedTools_js_1 = require("./gatedTools.js");
@@ -55,4 +59,6 @@ var index_js_1 = require("../lib/mcp/index.js");
55
59
  Object.defineProperty(exports, "mcpClient", { enumerable: true, get: function () { return index_js_1.mcpClient; } });
56
60
  Object.defineProperty(exports, "mcpServe", { enumerable: true, get: function () { return index_js_1.mcpServe; } });
57
61
  Object.defineProperty(exports, "mockMcpClient", { enumerable: true, get: function () { return index_js_1.mockMcpClient; } });
62
+ Object.defineProperty(exports, "gatewayTransport", { enumerable: true, get: function () { return index_js_1.gatewayTransport; } });
63
+ Object.defineProperty(exports, "GatewayAuthorizationRequiredError", { enumerable: true, get: function () { return index_js_1.GatewayAuthorizationRequiredError; } });
58
64
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tool-providers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;;;AAEH,mDAA+C;AAAtC,6GAAA,WAAW,OAAA;AACpB,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,6DAAyD;AAAhD,uHAAA,gBAAgB,OAAA;AAGzB,uEAAuE;AACvE,wEAAwE;AACxE,0CAA0C;AAC1C,gDAAyE;AAAhE,qGAAA,SAAS,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAAE,yGAAA,aAAa,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tool-providers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;;;AAEH,mDAA+C;AAAtC,6GAAA,WAAW,OAAA;AACpB,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,6DAAyD;AAAhD,uHAAA,gBAAgB,OAAA;AAGzB,uEAAuE;AACvE,wEAAwE;AACxE,0CAA0C;AAC1C,gDAM6B;AAL3B,qGAAA,SAAS,OAAA;AACT,oGAAA,QAAQ,OAAA;AACR,yGAAA,aAAa,OAAA;AACb,4GAAA,gBAAgB,OAAA;AAChB,6HAAA,iCAAiC,OAAA"}
@@ -0,0 +1,200 @@
1
+ /**
2
+ * adapters/hosting/agentcore — AWS Bedrock **AgentCore Runtime** adapters for
3
+ * the two hosting ports.
4
+ *
5
+ * import { agentCoreRuntimeHost, agentCoreSessions } from 'agentfootprint/hosting-providers';
6
+ * import { standingAgent } from 'agentfootprint/hosting';
7
+ *
8
+ * const handle = await standingAgent({
9
+ * agent,
10
+ * host: agentCoreRuntimeHost(),
11
+ * sessions: agentCoreSessions({ store: 'session-storage' }),
12
+ * });
13
+ *
14
+ * ── What this file actually is ───────────────────────────────────────────────
15
+ * Vendor paths, a header name, and two JSON body shapes. That is the whole
16
+ * adapter, and it is the claim the hosting ports were designed to make: a
17
+ * container runtime's contract is a CONFIGURATION of HTTP work that already
18
+ * exists, not a second implementation of it. Nothing here reaches into the
19
+ * ports, and nothing here needed the ports to change.
20
+ *
21
+ * AgentCore Runtime is a **container contract**: an ARM64 image serving HTTP on
22
+ * `0.0.0.0:8080` —
23
+ *
24
+ * POST /invocations JSON `{ "prompt": "..." }` → JSON `{ "response", "status" }`
25
+ * GET /ping → `{ "status": "Healthy", "time_of_last_update": <unix seconds> }`
26
+ *
27
+ * and the caller's conversation arrives in the
28
+ * `X-Amzn-Bedrock-AgentCore-Runtime-Session-Id` header rather than in the body,
29
+ * which is the one thing paths-and-bodies configuration alone could not
30
+ * express before this release.
31
+ *
32
+ * ── Verification status, stated plainly ──────────────────────────────────────
33
+ * `agentCoreRuntimeHost` is **plain HTTP and is really verified**: it runs the
34
+ * same host conformance suite as `nodeHost`, over a real socket, in
35
+ * `test/hosting/host-contract.test.ts`. There is no AWS SDK on its path.
36
+ *
37
+ * `agentCoreSessions({ store: 'memory' })` is **contract-mapped and
38
+ * injection-tested**: its AgentCore Memory calls are exercised through the
39
+ * `_client` seam, never against AWS. Confirm the command and field names
40
+ * against your installed `@aws-sdk/client-bedrock-agentcore` before you rely
41
+ * on it; real-cloud verification lands with a field deployment.
42
+ *
43
+ * Pattern: Adapter (GoF). Role: outer ring. The file-backed session store uses
44
+ * `node:fs` and nothing else; the event-backed one lazy-loads the AWS SDK, so
45
+ * importing this module costs zero peer-dep load.
46
+ */
47
+ import type { HttpHost, HttpWire } from '../../hosting/httpHost.js';
48
+ import type { CheckpointEnvelope, SessionLifecycle } from '../../hosting/types.js';
49
+ /** Options for {@link agentCoreRuntimeHost}. */
50
+ export interface AgentCoreRuntimeHostOptions {
51
+ /**
52
+ * Port to bind. Default `8080` — the port the container contract specifies.
53
+ * Pass `0` in tests to take an ephemeral one.
54
+ */
55
+ readonly port?: number;
56
+ /**
57
+ * Interface to bind. Default `'0.0.0.0'`, which the contract requires: bind
58
+ * to loopback inside the container and the runtime's health probe cannot
59
+ * reach you.
60
+ */
61
+ readonly hostname?: string;
62
+ /**
63
+ * Report `'HealthyBusy'` instead of `'Healthy'` on the health path.
64
+ *
65
+ * A function, not a flag, because busy is a live fact about the process, not
66
+ * a setting: the runtime reads it on every probe to decide whether to send
67
+ * you more work. Omit it and the host reports `'Healthy'`, which is the
68
+ * honest answer for an agent that answers synchronously.
69
+ */
70
+ readonly busy?: () => boolean;
71
+ }
72
+ /**
73
+ * The AgentCore Runtime contract as an {@link HttpWire}.
74
+ *
75
+ * Exported so the body shapes are inspectable and testable without binding a
76
+ * socket, and so a deployment that must serve the same bodies from somewhere
77
+ * else can reuse them by name.
78
+ */
79
+ export declare function agentCoreRuntimeWire(busy?: () => boolean): HttpWire;
80
+ /**
81
+ * An `AgentHost` that speaks AgentCore Runtime's container contract.
82
+ *
83
+ * Passes the same conformance suite as `nodeHost` — it is the same HTTP host
84
+ * with this runtime's two paths, its header, and its two body shapes.
85
+ *
86
+ * @example The container's entry point
87
+ * const handle = await standingAgent({
88
+ * agent,
89
+ * host: agentCoreRuntimeHost(),
90
+ * sessions: agentCoreSessions({ store: 'session-storage' }),
91
+ * });
92
+ * process.on('SIGTERM', () => void handle.close());
93
+ */
94
+ export declare function agentCoreRuntimeHost(options?: AgentCoreRuntimeHostOptions): HttpHost;
95
+ /**
96
+ * Where {@link agentCoreSessions} keeps a conversation between requests.
97
+ *
98
+ * - `'session-storage'` — a JSON file under the container's own storage. The
99
+ * runtime keeps that storage for the life of a session, INCLUDING across a
100
+ * stop/resume of the container, so a conversation survives the thing most
101
+ * likely to interrupt it. It does not survive the session ending.
102
+ * - `'memory'` — one AgentCore Memory event per persist. Outlives the session,
103
+ * the container and the deployment; costs an API call per turn and the
104
+ * `@aws-sdk/client-bedrock-agentcore` peer dependency.
105
+ *
106
+ * Chosen at construction, never per call: a store that silently changed where
107
+ * it wrote would be a store you cannot reason about after an incident.
108
+ */
109
+ export type AgentCoreSessionStore = 'session-storage' | 'memory';
110
+ /** The default file the `'session-storage'` mode writes to. */
111
+ export declare const DEFAULT_SESSION_STORAGE_PATH = "/tmp/agentcore-session";
112
+ /** Options for the file-backed mode. */
113
+ export interface AgentCoreFileSessionsOptions {
114
+ readonly store: 'session-storage';
115
+ /**
116
+ * Where to write. Default {@link DEFAULT_SESSION_STORAGE_PATH}. One file
117
+ * holds every session this container has seen, keyed by session id — the
118
+ * runtime already gives each session its own storage, so the keying is
119
+ * belt-and-braces for the case where it does not.
120
+ */
121
+ readonly path?: string;
122
+ }
123
+ /** One AgentCore Memory event, as this adapter cares about it. */
124
+ export interface AgentCoreSessionEvent {
125
+ /** Server-assigned event id. */
126
+ readonly eventId: string;
127
+ /** The envelope decoded from the event's blob payload, or `null` when unreadable. */
128
+ readonly envelope: unknown;
129
+ }
130
+ /**
131
+ * The minimal AgentCore Memory surface the session store calls. The real SDK is
132
+ * adapted to this shape in one function below; tests inject a fake via
133
+ * `_client` and never touch AWS.
134
+ */
135
+ export interface AgentCoreSessionClientLike {
136
+ /** Append one envelope as an event (the server assigns the event id). */
137
+ createEvent(input: {
138
+ memoryId: string;
139
+ actorId: string;
140
+ sessionId: string;
141
+ envelope: CheckpointEnvelope;
142
+ }): Promise<void>;
143
+ /** The session's events, newest first — the adapter reads only the newest. */
144
+ listEvents(input: {
145
+ memoryId: string;
146
+ actorId: string;
147
+ sessionId: string;
148
+ maxResults?: number;
149
+ }): Promise<{
150
+ events: readonly AgentCoreSessionEvent[];
151
+ }>;
152
+ }
153
+ /** Options for the event-backed mode. */
154
+ export interface AgentCoreMemorySessionsOptions {
155
+ readonly store: 'memory';
156
+ /** AgentCore Memory ARN or id. Required. */
157
+ readonly memoryId: string;
158
+ /** AWS region, when the adapter constructs the SDK client itself. */
159
+ readonly region?: string;
160
+ /**
161
+ * The AgentCore `actorId` these conversations belong to. Default
162
+ * `'afp-standing-agent'`. One actor per deployed agent is the usual shape.
163
+ */
164
+ readonly actorId?: string;
165
+ /** Pre-built client, to share one SDK config across the host app. */
166
+ readonly client?: AgentCoreSessionClientLike;
167
+ /** @internal Test injection — skips the SDK require entirely. */
168
+ readonly _client?: AgentCoreSessionClientLike;
169
+ /** @internal Test injection — the AWS SDK module, to exercise the real shim with a fake SDK. */
170
+ readonly _sdk?: BedrockAgentCoreSessionSdkModule;
171
+ }
172
+ /** Options for {@link agentCoreSessions}. */
173
+ export type AgentCoreSessionsOptions = AgentCoreFileSessionsOptions | AgentCoreMemorySessionsOptions;
174
+ /**
175
+ * A `SessionLifecycle` backed by AgentCore, with the checkpoint's home chosen
176
+ * at construction.
177
+ *
178
+ * Both modes store the SAME `CheckpointEnvelope` the port defines, and both
179
+ * refuse an unknown `format` by name through the shared `readEnvelope` — a
180
+ * conversation written by a newer runtime is refused, never half-restored.
181
+ * That law is inherited, not re-implemented.
182
+ *
183
+ * @example Survive a stop/resume, no AWS SDK required
184
+ * agentCoreSessions({ store: 'session-storage' });
185
+ *
186
+ * @example Outlive the session entirely
187
+ * agentCoreSessions({ store: 'memory', memoryId: process.env.MEMORY_ID!, region: 'us-west-2' });
188
+ */
189
+ export declare function agentCoreSessions(options: AgentCoreSessionsOptions): SessionLifecycle;
190
+ /** The slice of `@aws-sdk/client-bedrock-agentcore` this shim touches. */
191
+ export interface BedrockAgentCoreSessionSdkModule {
192
+ readonly BedrockAgentCoreClient?: new (config: {
193
+ region?: string;
194
+ }) => {
195
+ send(cmd: unknown): Promise<unknown>;
196
+ };
197
+ readonly CreateEventCommand?: new (input: unknown) => unknown;
198
+ readonly ListEventsCommand?: new (input: unknown) => unknown;
199
+ }
200
+ //# sourceMappingURL=agentcore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentcore.d.ts","sourceRoot":"","sources":["../../../../src/adapters/hosting/agentcore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAoB,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAkBnF,gDAAgD;AAChD,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,CAAC,EAAE,MAAM,OAAO,GAAG,QAAQ,CA+BnE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,2BAAgC,GAAG,QAAQ,CASxF;AAID;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,GAAG,QAAQ,CAAC;AAEjE,+DAA+D;AAC/D,eAAO,MAAM,4BAA4B,2BAA2B,CAAC;AAErE,wCAAwC;AACxC,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;C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