agentfootprint 9.65.0 → 9.66.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/adapters/identity/agentcore.js +118 -2
- package/dist/adapters/identity/agentcore.js.map +1 -1
- package/dist/adapters/observability/agentcore.js +61 -1
- package/dist/adapters/observability/agentcore.js.map +1 -1
- package/dist/adapters/observability/otel.js +12 -3
- package/dist/adapters/observability/otel.js.map +1 -1
- package/dist/esm/adapters/identity/agentcore.d.ts +115 -1
- package/dist/esm/adapters/identity/agentcore.js +117 -2
- package/dist/esm/adapters/identity/agentcore.js.map +1 -1
- package/dist/esm/adapters/observability/agentcore.d.ts +50 -0
- package/dist/esm/adapters/observability/agentcore.js +59 -0
- package/dist/esm/adapters/observability/agentcore.js.map +1 -1
- package/dist/esm/adapters/observability/otel.d.ts +73 -3
- package/dist/esm/adapters/observability/otel.js +12 -3
- package/dist/esm/adapters/observability/otel.js.map +1 -1
- package/dist/esm/identity.d.ts +1 -1
- package/dist/esm/identity.js +5 -1
- package/dist/esm/identity.js.map +1 -1
- package/dist/esm/observability-providers.d.ts +1 -1
- package/dist/esm/observability-providers.js +5 -1
- package/dist/esm/observability-providers.js.map +1 -1
- package/dist/identity.js +5 -1
- package/dist/identity.js.map +1 -1
- package/dist/observability-providers.js +6 -1
- package/dist/observability-providers.js.map +1 -1
- package/dist/types/adapters/identity/agentcore.d.ts +115 -1
- package/dist/types/adapters/identity/agentcore.d.ts.map +1 -1
- package/dist/types/adapters/observability/agentcore.d.ts +50 -0
- package/dist/types/adapters/observability/agentcore.d.ts.map +1 -1
- package/dist/types/adapters/observability/otel.d.ts +73 -3
- package/dist/types/adapters/observability/otel.d.ts.map +1 -1
- package/dist/types/identity.d.ts +1 -1
- package/dist/types/identity.d.ts.map +1 -1
- package/dist/types/observability-providers.d.ts +1 -1
- package/dist/types/observability-providers.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
* behind `agentfootprint/observe`, which re-exports every name here — same
|
|
45
45
|
* symbols, one door. Import from the door.
|
|
46
46
|
*/
|
|
47
|
-
export { agentcoreObservability, type AgentcoreObservabilityOptions, } from './adapters/observability/agentcore.js';
|
|
47
|
+
export { agentcoreObservability, agentCoreEvaluationSpans, AGENTCORE_EVALUATIONS_SCOPE_NAME, type AgentcoreObservabilityOptions, } from './adapters/observability/agentcore.js';
|
|
48
48
|
export { cloudwatchObservability, type CloudwatchObservabilityOptions, } from './adapters/observability/cloudwatch.js';
|
|
49
49
|
export { xrayObservability, type XrayObservabilityOptions, type XRayLikeClient, } from './adapters/observability/xray.js';
|
|
50
50
|
export { otelObservability, type OtelObservabilityOptions, type OtelObservabilityStrategy, type OtelDecisionEvidenceRecorder, type OtelTracerLike, type OtelSpanLike, type OtelSpanOptions, type OtelAttributeValue, } from './adapters/observability/otel.js';
|
|
@@ -44,7 +44,11 @@
|
|
|
44
44
|
* behind `agentfootprint/observe`, which re-exports every name here — same
|
|
45
45
|
* symbols, one door. Import from the door.
|
|
46
46
|
*/
|
|
47
|
-
export { agentcoreObservability,
|
|
47
|
+
export { agentcoreObservability,
|
|
48
|
+
// Spans shaped for AgentCore Evaluations (9.66.0) — a configuration of
|
|
49
|
+
// `otelObservability`, kept in the vendor's file because the requirement
|
|
50
|
+
// (the scope name their classifier routes on) is the vendor's.
|
|
51
|
+
agentCoreEvaluationSpans, AGENTCORE_EVALUATIONS_SCOPE_NAME, } from './adapters/observability/agentcore.js';
|
|
48
52
|
export { cloudwatchObservability, } from './adapters/observability/cloudwatch.js';
|
|
49
53
|
export { xrayObservability, } from './adapters/observability/xray.js';
|
|
50
54
|
export { otelObservability, } from './adapters/observability/otel.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observability-providers.js","sourceRoot":"","sources":["../../src/observability-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EACL,sBAAsB,
|
|
1
|
+
{"version":3,"file":"observability-providers.js","sourceRoot":"","sources":["../../src/observability-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EACL,sBAAsB;AACtB,uEAAuE;AACvE,yEAAyE;AACzE,+DAA+D;AAC/D,wBAAwB,EACxB,gCAAgC,GAEjC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,uBAAuB,GAExB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,iBAAiB,GAGlB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,iBAAiB,GAQlB,MAAM,kCAAkC,CAAC;AAC1C,qEAAqE;AACrE,yEAAyE;AACzE,wEAAwE;AACxE,OAAO,EACL,iBAAiB,GAGlB,MAAM,kCAAkC,CAAC;AAC1C,sEAAsE;AACtE,sEAAsE;AACtE,8CAA8C;AAC9C,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,GAOhB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,4EAA4E;AAC5E,6EAA6E;AAC7E,iEAAiE;AACjE,0EAA0E;AAC1E,4EAA4E;AAC5E,+EAA+E;AAC/E,4DAA4D;AAC5D,OAAO,EACL,iBAAiB,GAIlB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,kBAAkB,GAInB,MAAM,gDAAgD,CAAC"}
|
package/dist/identity.js
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* symbols, one door. Import from the door.
|
|
30
30
|
*/
|
|
31
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.MissingJwksSupportError = exports.jwksIdentity = exports.CLOUD_PLATFORM_SCOPE = exports.googleIdentity = exports.vaultCredentials = exports.agentCoreIdentity = exports.withCredentialRetry = exports.CredentialConsentRequiredError = exports.staticTokens = exports.headers = exports.basic = exports.apiKey = exports.bearer = exports.unconfiguredCredentialProvider = exports.isCredentialIssued = void 0;
|
|
32
|
+
exports.MissingJwksSupportError = exports.jwksIdentity = exports.CLOUD_PLATFORM_SCOPE = exports.googleIdentity = exports.vaultCredentials = exports.completeAgentCoreAuthorization = exports.agentCoreIdentity = exports.withCredentialRetry = exports.CredentialConsentRequiredError = exports.staticTokens = exports.headers = exports.basic = exports.apiKey = exports.bearer = exports.unconfiguredCredentialProvider = exports.isCredentialIssued = void 0;
|
|
33
33
|
var types_js_1 = require("./identity/types.js");
|
|
34
34
|
Object.defineProperty(exports, "isCredentialIssued", { enumerable: true, get: function () { return types_js_1.isCredentialIssued; } });
|
|
35
35
|
Object.defineProperty(exports, "unconfiguredCredentialProvider", { enumerable: true, get: function () { return types_js_1.unconfiguredCredentialProvider; } });
|
|
@@ -46,6 +46,10 @@ var withCredentialRetry_js_1 = require("./identity/withCredentialRetry.js");
|
|
|
46
46
|
Object.defineProperty(exports, "withCredentialRetry", { enumerable: true, get: function () { return withCredentialRetry_js_1.withCredentialRetry; } });
|
|
47
47
|
var agentcore_js_1 = require("./adapters/identity/agentcore.js");
|
|
48
48
|
Object.defineProperty(exports, "agentCoreIdentity", { enumerable: true, get: function () { return agentcore_js_1.agentCoreIdentity; } });
|
|
49
|
+
// The consent handshake (9.66.0) — called from YOUR callback route, not from
|
|
50
|
+
// the agent run, which is why it is a function of its own rather than a
|
|
51
|
+
// method on the provider that route never sees.
|
|
52
|
+
Object.defineProperty(exports, "completeAgentCoreAuthorization", { enumerable: true, get: function () { return agentcore_js_1.completeAgentCoreAuthorization; } });
|
|
49
53
|
// HashiCorp-Vault-compatible KV v2, over plain HTTP (9.8.0) — no SDK, no
|
|
50
54
|
// vendor client. V1 is token auth + KV v2 + no leases, and every other shape
|
|
51
55
|
// is refused by name rather than guessed at; see the module docstring.
|
package/dist/identity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;;;AAWH,gDAAyF;AAAhF,8GAAA,kBAAkB,OAAA;AAAE,0HAAA,8BAA8B,OAAA;AAC3D,gDAS6B;AAR3B,kGAAA,MAAM,OAAA;AACN,kGAAA,MAAM,OAAA;AACN,iGAAA,KAAK,OAAA;AACL,mGAAA,OAAO,OAAA;AAMT,8DAAoF;AAA3E,+GAAA,YAAY,OAAA;AAKrB,kGAGsD;AAFpD,mJAAA,8BAA8B,OAAA;AAGhC,4EAG2C;AAFzC,6HAAA,mBAAmB,OAAA;AAGrB,
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;;;AAWH,gDAAyF;AAAhF,8GAAA,kBAAkB,OAAA;AAAE,0HAAA,8BAA8B,OAAA;AAC3D,gDAS6B;AAR3B,kGAAA,MAAM,OAAA;AACN,kGAAA,MAAM,OAAA;AACN,iGAAA,KAAK,OAAA;AACL,mGAAA,OAAO,OAAA;AAMT,8DAAoF;AAA3E,+GAAA,YAAY,OAAA;AAKrB,kGAGsD;AAFpD,mJAAA,8BAA8B,OAAA;AAGhC,4EAG2C;AAFzC,6HAAA,mBAAmB,OAAA;AAGrB,iEAU0C;AATxC,iHAAA,iBAAiB,OAAA;AACjB,6EAA6E;AAC7E,wEAAwE;AACxE,gDAAgD;AAChD,8HAAA,8BAA8B,OAAA;AAMhC,yEAAyE;AACzE,6EAA6E;AAC7E,uEAAuE;AACvE,yDAA8F;AAArF,4GAAA,gBAAgB,OAAA;AAEzB,4EAA4E;AAC5E,uEAAuE;AACvE,6EAA6E;AAC7E,6DAA6D;AAC7D,2DAMuC;AALrC,2GAAA,cAAc,OAAA;AACd,iHAAA,oBAAoB,OAAA;AAMtB,8EAA8E;AAC9E,iEAAiE;AACjE,4EAA4E;AAC5E,sEAAsE;AACtE,4EAA4E;AAC5E,uDAKqC;AAJnC,uGAAA,YAAY,OAAA;AACZ,kHAAA,uBAAuB,OAAA"}
|
|
@@ -46,9 +46,14 @@
|
|
|
46
46
|
* symbols, one door. Import from the door.
|
|
47
47
|
*/
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
-
exports.githubDeviceSignIn = exports.githubBugReporter = exports.CANONICAL_JSON_VERSION = exports.canonicalJson = exports.AUDIT_ZERO_HASH = exports.AUDIT_GENESIS_EVENT_TYPE = exports.AUDIT_BUNDLE_FORMAT = exports.verifyAuditBundle = exports.auditExport = exports.fileObservability = exports.otelObservability = exports.xrayObservability = exports.cloudwatchObservability = exports.agentcoreObservability = void 0;
|
|
49
|
+
exports.githubDeviceSignIn = exports.githubBugReporter = exports.CANONICAL_JSON_VERSION = exports.canonicalJson = exports.AUDIT_ZERO_HASH = exports.AUDIT_GENESIS_EVENT_TYPE = exports.AUDIT_BUNDLE_FORMAT = exports.verifyAuditBundle = exports.auditExport = exports.fileObservability = exports.otelObservability = exports.xrayObservability = exports.cloudwatchObservability = exports.AGENTCORE_EVALUATIONS_SCOPE_NAME = exports.agentCoreEvaluationSpans = exports.agentcoreObservability = void 0;
|
|
50
50
|
var agentcore_js_1 = require("./adapters/observability/agentcore.js");
|
|
51
51
|
Object.defineProperty(exports, "agentcoreObservability", { enumerable: true, get: function () { return agentcore_js_1.agentcoreObservability; } });
|
|
52
|
+
// Spans shaped for AgentCore Evaluations (9.66.0) — a configuration of
|
|
53
|
+
// `otelObservability`, kept in the vendor's file because the requirement
|
|
54
|
+
// (the scope name their classifier routes on) is the vendor's.
|
|
55
|
+
Object.defineProperty(exports, "agentCoreEvaluationSpans", { enumerable: true, get: function () { return agentcore_js_1.agentCoreEvaluationSpans; } });
|
|
56
|
+
Object.defineProperty(exports, "AGENTCORE_EVALUATIONS_SCOPE_NAME", { enumerable: true, get: function () { return agentcore_js_1.AGENTCORE_EVALUATIONS_SCOPE_NAME; } });
|
|
52
57
|
var cloudwatch_js_1 = require("./adapters/observability/cloudwatch.js");
|
|
53
58
|
Object.defineProperty(exports, "cloudwatchObservability", { enumerable: true, get: function () { return cloudwatch_js_1.cloudwatchObservability; } });
|
|
54
59
|
var xray_js_1 = require("./adapters/observability/xray.js");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observability-providers.js","sourceRoot":"","sources":["../src/observability-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"observability-providers.js","sourceRoot":"","sources":["../src/observability-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;;;AAEH,sEAQ+C;AAP7C,sHAAA,sBAAsB,OAAA;AACtB,uEAAuE;AACvE,yEAAyE;AACzE,+DAA+D;AAC/D,wHAAA,wBAAwB,OAAA;AACxB,gIAAA,gCAAgC,OAAA;AAGlC,wEAGgD;AAF9C,wHAAA,uBAAuB,OAAA;AAGzB,4DAI0C;AAHxC,4GAAA,iBAAiB,OAAA;AAInB,4DAS0C;AARxC,4GAAA,iBAAiB,OAAA;AASnB,qEAAqE;AACrE,yEAAyE;AACzE,wEAAwE;AACxE,4DAI0C;AAHxC,4GAAA,iBAAiB,OAAA;AAInB,sEAAsE;AACtE,sEAAsE;AACtE,8CAA8C;AAC9C,8DAY2C;AAXzC,uGAAA,WAAW,OAAA;AACX,6GAAA,iBAAiB,OAAA;AACjB,+GAAA,mBAAmB,OAAA;AACnB,oHAAA,wBAAwB,OAAA;AACxB,2GAAA,eAAe,OAAA;AAQjB,2DAA+E;AAAtE,iHAAA,aAAa,OAAA;AAAE,0HAAA,sBAAsB,OAAA;AAC9C,4EAA4E;AAC5E,6EAA6E;AAC7E,iEAAiE;AACjE,0EAA0E;AAC1E,4EAA4E;AAC5E,+EAA+E;AAC/E,4DAA4D;AAC5D,sFAKuD;AAJrD,yHAAA,iBAAiB,OAAA;AAKnB,wFAKwD;AAJtD,2HAAA,kBAAkB,OAAA"}
|
|
@@ -103,7 +103,7 @@ export interface AgentCoreIdentityClientLike {
|
|
|
103
103
|
getResourceOauth2Token(input: {
|
|
104
104
|
readonly resourceCredentialProviderName: string;
|
|
105
105
|
readonly scopes: readonly string[];
|
|
106
|
-
readonly oauth2Flow: 'M2M' | 'USER_FEDERATION';
|
|
106
|
+
readonly oauth2Flow: 'M2M' | 'USER_FEDERATION' | 'ON_BEHALF_OF_TOKEN_EXCHANGE';
|
|
107
107
|
readonly forceAuthentication: boolean;
|
|
108
108
|
readonly workloadIdentityToken?: string;
|
|
109
109
|
}): Promise<AgentCoreOauthResponse>;
|
|
@@ -126,6 +126,25 @@ export interface AgentCoreIdentityClientLike {
|
|
|
126
126
|
}): Promise<{
|
|
127
127
|
readonly workloadAccessToken?: string;
|
|
128
128
|
}>;
|
|
129
|
+
/** Optional — required only for services named in `apiKeyServices`. AgentCore
|
|
130
|
+
* keeps API keys in the same vault as OAuth tokens, behind a different
|
|
131
|
+
* operation, so this is a sibling of `getResourceOauth2Token` rather than a
|
|
132
|
+
* mode of it. */
|
|
133
|
+
getResourceApiKey?(input: {
|
|
134
|
+
readonly resourceCredentialProviderName: string;
|
|
135
|
+
/** REQUIRED on the wire — `GetResourceApiKeyRequest` declares it non-optional. */
|
|
136
|
+
readonly workloadIdentityToken: string;
|
|
137
|
+
}): Promise<{
|
|
138
|
+
readonly apiKey?: string;
|
|
139
|
+
}>;
|
|
140
|
+
/** Optional — required only by {@link completeAgentCoreAuthorization}. Tells
|
|
141
|
+
* AgentCore that the person behind `sessionId` finished consenting, which is
|
|
142
|
+
* what releases the token into the vault for the next vend. */
|
|
143
|
+
completeResourceTokenAuth?(input: {
|
|
144
|
+
readonly sessionId: string;
|
|
145
|
+
readonly userToken?: string;
|
|
146
|
+
readonly userId?: string;
|
|
147
|
+
}): Promise<void>;
|
|
129
148
|
}
|
|
130
149
|
export interface AgentCoreIdentityOptions {
|
|
131
150
|
readonly region?: string;
|
|
@@ -165,6 +184,42 @@ export interface AgentCoreIdentityOptions {
|
|
|
165
184
|
readonly principal?: string;
|
|
166
185
|
readonly tenant?: string;
|
|
167
186
|
}) => string | undefined;
|
|
187
|
+
/**
|
|
188
|
+
* How a `mode: 'user'` request gets its token (9.66.0). Default `'consent'`.
|
|
189
|
+
*
|
|
190
|
+
* `'consent'` — AgentCore's `USER_FEDERATION`. If the vault has no grant
|
|
191
|
+
* for this (workload, user), the result is an
|
|
192
|
+
* `authorization-required` with a URL to send the person to.
|
|
193
|
+
* They approve once; later calls return a token directly.
|
|
194
|
+
* `'exchange'` — AgentCore's `ON_BEHALF_OF_TOKEN_EXCHANGE`. The person's
|
|
195
|
+
* own login is TRADED for a scoped downstream token, with no
|
|
196
|
+
* consent screen at any point.
|
|
197
|
+
*
|
|
198
|
+
* `'exchange'` is not simply the nicer one. It works only where the
|
|
199
|
+
* downstream provider was configured for it (an on-behalf-of exchange grant
|
|
200
|
+
* on the credential provider) and where trading the user's session for
|
|
201
|
+
* downstream access is a decision your organisation has already made — the
|
|
202
|
+
* consent screen is what asks the person, and this flow is the deployment
|
|
203
|
+
* saying it does not need to. Choose it deliberately.
|
|
204
|
+
*
|
|
205
|
+
* `mode: 'machine'` is unaffected: M2M has no user to act for.
|
|
206
|
+
*/
|
|
207
|
+
readonly userFlow?: 'consent' | 'exchange';
|
|
208
|
+
/**
|
|
209
|
+
* Services whose credential is an API KEY, not an OAuth token (9.66.0).
|
|
210
|
+
*
|
|
211
|
+
* AgentCore's vault holds both kinds behind two different operations, and the
|
|
212
|
+
* provider NAME alone does not say which — so a request for a service named
|
|
213
|
+
* here is vended with `GetResourceApiKey` and comes back as an
|
|
214
|
+
* {@link apiKey} credential. Everything else takes the OAuth path.
|
|
215
|
+
*
|
|
216
|
+
* There is no auto-detection on purpose: guessing would mean calling one
|
|
217
|
+
* operation, catching a failure, and retrying with the other, which turns a
|
|
218
|
+
* configuration mistake into two round-trips and an ambiguous error.
|
|
219
|
+
*/
|
|
220
|
+
readonly apiKeyServices?: readonly string[];
|
|
221
|
+
/** Header an API-key credential is sent in. Default `'x-api-key'`. */
|
|
222
|
+
readonly apiKeyHeader?: string;
|
|
168
223
|
/** Stable provider id (default 'agentcore-identity'). */
|
|
169
224
|
readonly id?: string;
|
|
170
225
|
/** Test seam — inject a client implementing {@link AgentCoreIdentityClientLike}.
|
|
@@ -184,7 +239,66 @@ export interface BedrockAgentCoreIdentitySdkModule {
|
|
|
184
239
|
readonly GetResourceOauth2TokenCommand?: new (input: unknown) => unknown;
|
|
185
240
|
readonly GetWorkloadAccessTokenForUserIdCommand?: new (input: unknown) => unknown;
|
|
186
241
|
readonly GetWorkloadAccessTokenForJWTCommand?: new (input: unknown) => unknown;
|
|
242
|
+
readonly GetResourceApiKeyCommand?: new (input: unknown) => unknown;
|
|
243
|
+
readonly CompleteResourceTokenAuthCommand?: new (input: unknown) => unknown;
|
|
187
244
|
}
|
|
188
245
|
/** Build a {@link CredentialProvider} backed by AWS Bedrock AgentCore Identity. */
|
|
189
246
|
export declare function agentCoreIdentity(options?: AgentCoreIdentityOptions): CredentialProvider;
|
|
247
|
+
/** Connection options for {@link completeAgentCoreAuthorization}. */
|
|
248
|
+
export interface CompleteAgentCoreAuthorizationOptions {
|
|
249
|
+
/** The 3LO round-trip this completes — the `sessionId` from the
|
|
250
|
+
* `authorization-required` result the agent returned. */
|
|
251
|
+
readonly sessionId: string;
|
|
252
|
+
/** The person's own IdP-issued JWT, if your callback has it. Preferred: it is
|
|
253
|
+
* the artifact their provider signed. */
|
|
254
|
+
readonly userToken?: string;
|
|
255
|
+
/** The user id you asserted for them, when no JWT is available. Exactly one
|
|
256
|
+
* of `userToken` / `userId` is required. */
|
|
257
|
+
readonly userId?: string;
|
|
258
|
+
readonly region?: string;
|
|
259
|
+
/** Test seam — same client surface the provider uses. */
|
|
260
|
+
readonly _client?: AgentCoreIdentityClientLike;
|
|
261
|
+
/** @internal Test injection — the AWS SDK module. */
|
|
262
|
+
readonly _sdk?: BedrockAgentCoreIdentitySdkModule;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Tell AgentCore the person finished consenting, so the token lands in the vault.
|
|
266
|
+
*
|
|
267
|
+
* ── Where this runs, and why it is not a provider method ─────────────────────
|
|
268
|
+
* A 3LO consent has three actors and two processes. The agent asks for a
|
|
269
|
+
* credential and gets back `authorization-required` with a URL and a session
|
|
270
|
+
* id; the PERSON opens that URL in their browser and approves; AgentCore then
|
|
271
|
+
* redirects their browser to a callback route **your web app** owns. That route
|
|
272
|
+
* is where this belongs — a different process from the agent run, often a
|
|
273
|
+
* different service — so it takes its own connection options rather than
|
|
274
|
+
* pretending to be a method on a provider that route has never seen.
|
|
275
|
+
*
|
|
276
|
+
* Your route's job before calling this is the part nobody else can do: confirm
|
|
277
|
+
* the browser session really belongs to the user you are about to name. This
|
|
278
|
+
* function is the handshake, not the authentication.
|
|
279
|
+
*
|
|
280
|
+
* ── After it returns ─────────────────────────────────────────────────────────
|
|
281
|
+
* Nothing is handed back — success is an empty acknowledgement. The token now
|
|
282
|
+
* exists in the vault for that (workload, user), and the way to obtain it is to
|
|
283
|
+
* run the agent's request again: the next `getCredential` for that service
|
|
284
|
+
* returns `issued` where the last one returned `authorization-required`. In
|
|
285
|
+
* agentfootprint terms the consent is a PAUSE, and this is what makes the
|
|
286
|
+
* resume succeed.
|
|
287
|
+
*
|
|
288
|
+
* The authorization URL and its session are short-lived (AWS documents ten
|
|
289
|
+
* minutes) — a person who wanders off has to start the consent again, and the
|
|
290
|
+
* refusal you get is AgentCore's, not this adapter's.
|
|
291
|
+
*
|
|
292
|
+
* @example An Express-style callback route
|
|
293
|
+
* app.get('/oauth/callback', async (req, res) => {
|
|
294
|
+
* const user = await requireSignedInUser(req); // yours, and load-bearing
|
|
295
|
+
* await completeAgentCoreAuthorization({
|
|
296
|
+
* sessionId: String(req.query.session),
|
|
297
|
+
* userId: user.id,
|
|
298
|
+
* region: 'us-east-1',
|
|
299
|
+
* });
|
|
300
|
+
* res.send('Approved — you can return to the assistant.');
|
|
301
|
+
* });
|
|
302
|
+
*/
|
|
303
|
+
export declare function completeAgentCoreAuthorization(options: CompleteAgentCoreAuthorizationOptions): Promise<void>;
|
|
190
304
|
//# sourceMappingURL=agentcore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentcore.d.ts","sourceRoot":"","sources":["../../../../src/adapters/identity/agentcore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AAGH,OAAO,KAAK,EACV,kBAAkB,EAGnB,MAAM,yBAAyB,CAAC;AAGjC,sEAAsE;AACtE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC;sDACkD;IAClD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;4EAEwE;IACxE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;iEAGiE;AACjE,MAAM,WAAW,2BAA2B;IAC1C,sBAAsB,CAAC,KAAK,EAAE;QAC5B,QAAQ,CAAC,8BAA8B,EAAE,MAAM,CAAC;QAChD,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;QACnC,QAAQ,CAAC,UAAU,EAAE,KAAK,GAAG,iBAAiB,CAAC;QAC/
|
|
1
|
+
{"version":3,"file":"agentcore.d.ts","sourceRoot":"","sources":["../../../../src/adapters/identity/agentcore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,yDAAyD;IACzD,QAAQ,CAAC,OAAO,CAAC,EAAE,2BAA2B,CAAC;IAC/C,qDAAqD;IACrD,QAAQ,CAAC,IAAI,CAAC,EAAE,iCAAiC,CAAC;CACnD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,qCAAqC,GAC7C,OAAO,CAAC,IAAI,CAAC,CAgCf"}
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
*/
|
|
51
51
|
import type { ObservabilityStrategy } from '../../strategies/types.js';
|
|
52
52
|
import { type CloudwatchObservabilityOptions } from './cloudwatch.js';
|
|
53
|
+
import { type OtelObservabilityOptions, type OtelObservabilityStrategy } from './otel.js';
|
|
53
54
|
/**
|
|
54
55
|
* AgentCore-specific options. Currently identical to the generic
|
|
55
56
|
* `CloudwatchObservabilityOptions` — kept as a separate type for
|
|
@@ -65,4 +66,53 @@ export type AgentcoreObservabilityOptions = CloudwatchObservabilityOptions;
|
|
|
65
66
|
* distinguish AgentCore-targeted shipping from generic CloudWatch.
|
|
66
67
|
*/
|
|
67
68
|
export declare function agentcoreObservability(opts: AgentcoreObservabilityOptions): ObservabilityStrategy;
|
|
69
|
+
/**
|
|
70
|
+
* The instrumentation-scope name AgentCore **Evaluations** classifies spans by.
|
|
71
|
+
*
|
|
72
|
+
* Their span classifier reads `scope.name` and considers only names beginning
|
|
73
|
+
* `opentelemetry.instrumentation.` (or `openinference.instrumentation.`);
|
|
74
|
+
* anything else is skipped without a message. This is the one spelling that
|
|
75
|
+
* makes agentfootprint's spans visible to it — and it lives HERE, in the
|
|
76
|
+
* vendor's own file, because the requirement is theirs, not
|
|
77
|
+
* OpenTelemetry's and not ours.
|
|
78
|
+
*/
|
|
79
|
+
export declare const AGENTCORE_EVALUATIONS_SCOPE_NAME = "opentelemetry.instrumentation.agentfootprint";
|
|
80
|
+
/**
|
|
81
|
+
* OTel spans shaped so AgentCore **Evaluations** can read and score them.
|
|
82
|
+
*
|
|
83
|
+
* ── What this is ─────────────────────────────────────────────────────────────
|
|
84
|
+
* A CONFIGURATION of {@link otelObservability}, not a second implementation:
|
|
85
|
+
* the same spans, the same attributes, with the two settings that vendor
|
|
86
|
+
* requires already correct — the scope name it classifies by, and the
|
|
87
|
+
* turn-level content its scorers read. Everything else is passed through
|
|
88
|
+
* untouched, so nothing about your telemetry becomes AgentCore-shaped except
|
|
89
|
+
* the two things that had to be.
|
|
90
|
+
*
|
|
91
|
+
* ── Why you would use it ─────────────────────────────────────────────────────
|
|
92
|
+
* Since July 2026 AgentCore Evaluations scores agents that DO NOT run on AWS —
|
|
93
|
+
* any agent whose spans reach CloudWatch and match its contract. That makes
|
|
94
|
+
* AWS's built-in evaluators available to an agentfootprint agent hosted
|
|
95
|
+
* anywhere. It does not make your agent an AWS agent, and it replaces nothing:
|
|
96
|
+
* their evaluators say what the score is, and agentfootprint's own trace is
|
|
97
|
+
* still what says why.
|
|
98
|
+
*
|
|
99
|
+
* ── Read this before enabling ────────────────────────────────────────────────
|
|
100
|
+
* It turns `captureContent` ON, which puts the turn's prompt and answer text on
|
|
101
|
+
* the span — that is the point (a scorer cannot grade a turn it cannot read),
|
|
102
|
+
* and it is also an export of raw content to your OTel backend. Pass
|
|
103
|
+
* `captureContent: false` to opt back out and keep the scope name alone;
|
|
104
|
+
* scores will then be based on an empty turn, which is worse than not scoring.
|
|
105
|
+
*
|
|
106
|
+
* Getting the spans to CloudWatch is separate and yours: point an OTLP exporter
|
|
107
|
+
* at the AgentCore log group per AWS's documented header contract, or run
|
|
108
|
+
* inside a runtime that does it for you.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* import { agentCoreEvaluationSpans } from 'agentfootprint/observe';
|
|
112
|
+
*
|
|
113
|
+
* agent.enable.observability({
|
|
114
|
+
* strategy: agentCoreEvaluationSpans({ serviceName: 'support-agent' }),
|
|
115
|
+
* });
|
|
116
|
+
*/
|
|
117
|
+
export declare function agentCoreEvaluationSpans(opts: OtelObservabilityOptions): OtelObservabilityStrategy;
|
|
68
118
|
//# sourceMappingURL=agentcore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentcore.d.ts","sourceRoot":"","sources":["../../../../src/adapters/observability/agentcore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"agentcore.d.ts","sourceRoot":"","sources":["../../../../src/adapters/observability/agentcore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC/B,MAAM,WAAW,CAAC;AAEnB;;;;;;GAMG;AACH,MAAM,MAAM,6BAA6B,GAAG,8BAA8B,CAAC;AAE3E;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,6BAA6B,GAAG,qBAAqB,CAEjG;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC,iDAAiD,CAAC;AAE/F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,wBAAwB,GAC7B,yBAAyB,CAS3B"}
|
|
@@ -124,10 +124,57 @@ export interface OtelObservabilityOptions {
|
|
|
124
124
|
/** Service name on every emitted span. Surfaces in your OTel
|
|
125
125
|
* backend's service map. Required. */
|
|
126
126
|
readonly serviceName: string;
|
|
127
|
-
/** OTel Tracer to use. Defaults to
|
|
128
|
-
* `trace
|
|
129
|
-
*
|
|
127
|
+
/** OTel Tracer to use. Defaults to `trace.getTracer(scopeName)` — where
|
|
128
|
+
* `trace` is the lazy-imported `@opentelemetry/api` and `scopeName` is the
|
|
129
|
+
* option below. */
|
|
130
130
|
readonly tracer?: OtelTracerLike;
|
|
131
|
+
/**
|
|
132
|
+
* The INSTRUMENTATION SCOPE name every span is recorded under — what a
|
|
133
|
+
* backend shows as `scope.name`. Default `'agentfootprint'`.
|
|
134
|
+
*
|
|
135
|
+
* ── Why this is a knob and not a constant ────────────────────────────────
|
|
136
|
+
* Some telemetry consumers ROUTE on this name rather than read it. AWS
|
|
137
|
+
* Bedrock AgentCore Evaluations is the case that forced the option: it will
|
|
138
|
+
* score any agent's traces, from anywhere, but only classifies spans whose
|
|
139
|
+
* scope name begins `opentelemetry.instrumentation.` or
|
|
140
|
+
* `openinference.instrumentation.` — everything else is skipped in silence,
|
|
141
|
+
* which is indistinguishable from "your agent was fine".
|
|
142
|
+
*
|
|
143
|
+
* The default does NOT change, because a rename moves every existing
|
|
144
|
+
* dashboard's spans out from under it. Consumers who need a routable name
|
|
145
|
+
* pass one; `agentCoreEvaluationSpans()` in the AgentCore adapter is that
|
|
146
|
+
* one consumer's spelling, kept in that vendor's own file.
|
|
147
|
+
*
|
|
148
|
+
* Ignored when `tracer` is supplied — a tracer you built already has a name.
|
|
149
|
+
*/
|
|
150
|
+
readonly scopeName?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Put the turn's PROMPT and ANSWER TEXT on the agent span (default
|
|
153
|
+
* `false`): `gen_ai.task.input` from the user's prompt and
|
|
154
|
+
* `gen_ai.task.output` from the final answer.
|
|
155
|
+
*
|
|
156
|
+
* ── Off by default, deliberately ─────────────────────────────────────────
|
|
157
|
+
* This adapter's standing rule is that content does not ride spans — the
|
|
158
|
+
* snapshot / audit-log channel carries it under the consumer's own
|
|
159
|
+
* redaction policy. Turning this on EXPORTS raw prompt and answer text to
|
|
160
|
+
* whatever backend the tracer points at, where it is typically retained and
|
|
161
|
+
* searchable, and no redaction of ours stands between the two.
|
|
162
|
+
*
|
|
163
|
+
* ── Why it exists ────────────────────────────────────────────────────────
|
|
164
|
+
* Trace-scoring services read the answer they are grading off the span.
|
|
165
|
+
* AgentCore Evaluations reads exactly these two attributes (after an event
|
|
166
|
+
* body it only emits in its own runtime), so a scorer sees an empty turn
|
|
167
|
+
* without them. Enable it when a consumer's whole purpose is to read the
|
|
168
|
+
* content, and not to make dashboards prettier.
|
|
169
|
+
*
|
|
170
|
+
* ── What it is NOT ───────────────────────────────────────────────────────
|
|
171
|
+
* Per-inference message arrays (`gen_ai.input.messages` /
|
|
172
|
+
* `gen_ai.output.messages`) are NOT emitted: this adapter's `llm_start` /
|
|
173
|
+
* `llm_end` events carry model, usage and stop reason, never the messages,
|
|
174
|
+
* so there is nothing truthful to put there. Turn-level input and output is
|
|
175
|
+
* what we have and all this claims.
|
|
176
|
+
*/
|
|
177
|
+
readonly captureContent?: boolean;
|
|
131
178
|
/** 0..1 — sample rate for turn-level spans. Default `1.0`.
|
|
132
179
|
* Sampling decisions are normally an OTel SDK concern (via
|
|
133
180
|
* `Sampler`); this option is a per-strategy override for cases
|
|
@@ -168,6 +215,13 @@ export interface OtelObservabilityOptions {
|
|
|
168
215
|
* construction, but visible at the call site.
|
|
169
216
|
*/
|
|
170
217
|
readonly onError?: (error: Error, event?: AgentfootprintEvent) => void;
|
|
218
|
+
/**
|
|
219
|
+
* @internal Pre-resolved `@opentelemetry/api` module, for tests that need
|
|
220
|
+
* the path where this adapter builds its OWN tracer — the only path on
|
|
221
|
+
* which {@link OtelObservabilityOptions.scopeName} is observable. Skips the
|
|
222
|
+
* lazy require, exactly as `_client` does on the SDK-backed adapters.
|
|
223
|
+
*/
|
|
224
|
+
readonly _otelApi?: OtelApiModule;
|
|
171
225
|
}
|
|
172
226
|
/** Attribute value union we emit. Matches OTel's `AttributeValue`
|
|
173
227
|
* subset: primitives + homogeneous string arrays
|
|
@@ -201,6 +255,21 @@ export interface OtelSpanLike {
|
|
|
201
255
|
* signals degrade to flattened attributes when absent. */
|
|
202
256
|
addEvent?(name: string, attributes?: Record<string, OtelAttributeValue>): unknown;
|
|
203
257
|
}
|
|
258
|
+
interface OtelApiModule {
|
|
259
|
+
readonly trace?: {
|
|
260
|
+
getTracer(name: string, version?: string): OtelTracerLike;
|
|
261
|
+
setSpan(context: unknown, span: OtelSpanLike): unknown;
|
|
262
|
+
};
|
|
263
|
+
readonly context?: {
|
|
264
|
+
active(): unknown;
|
|
265
|
+
with<T>(ctx: unknown, fn: () => T): T;
|
|
266
|
+
};
|
|
267
|
+
readonly SpanStatusCode?: {
|
|
268
|
+
OK: number;
|
|
269
|
+
ERROR: number;
|
|
270
|
+
UNSET: number;
|
|
271
|
+
};
|
|
272
|
+
}
|
|
204
273
|
/**
|
|
205
274
|
* footprintjs CombinedRecorder (FlowRecorder channel) that forwards
|
|
206
275
|
* decide()/select() operator-level evidence into the paired
|
|
@@ -249,4 +318,5 @@ export interface OtelObservabilityStrategy extends ObservabilityStrategy {
|
|
|
249
318
|
decisionEvidenceRecorder(): OtelDecisionEvidenceRecorder;
|
|
250
319
|
}
|
|
251
320
|
export declare function otelObservability(opts: OtelObservabilityOptions): OtelObservabilityStrategy;
|
|
321
|
+
export {};
|
|
252
322
|
//# sourceMappingURL=otel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otel.d.ts","sourceRoot":"","sources":["../../../../src/adapters/observability/otel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsHG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,M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AK,CAAC,EAAE;QACf,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;QAC1D,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC;KACxD,CAAC;IACF,QAAQ,CAAC,OAAO,CAAC,EAAE;QACjB,MAAM,IAAI,OAAO,CAAC;QAClB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;KACvC,CAAC;IACF,QAAQ,CAAC,cAAc,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACxE;AAID;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC3C,UAAU,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC5C;AAED;wEACwE;AACxE,MAAM,WAAW,yBAA0B,SAAQ,qBAAqB;IACtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,wBAAwB,IAAI,4BAA4B,CAAC;CAC1D;AA2GD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,wBAAwB,GAAG,yBAAyB,CA4tB3F"}
|
package/dist/types/identity.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export { staticTokens, type StaticTokensOptions } from './identity/staticTokens.
|
|
|
34
34
|
export type { AuthorizationRequiredMode, ConsentRequest } from './identity/consent.js';
|
|
35
35
|
export { CredentialConsentRequiredError, type CredentialConsentRequiredContext, } from './identity/CredentialConsentRequiredError.js';
|
|
36
36
|
export { withCredentialRetry, type WithCredentialRetryOptions, } from './identity/withCredentialRetry.js';
|
|
37
|
-
export { agentCoreIdentity, type AgentCoreIdentityOptions, type AgentCoreIdentityClientLike, type AgentCoreOauthResponse, } from './adapters/identity/agentcore.js';
|
|
37
|
+
export { agentCoreIdentity, completeAgentCoreAuthorization, type AgentCoreIdentityOptions, type AgentCoreIdentityClientLike, type AgentCoreOauthResponse, type CompleteAgentCoreAuthorizationOptions, } from './adapters/identity/agentcore.js';
|
|
38
38
|
export { vaultCredentials, type VaultCredentialsOptions } from './adapters/identity/vault.js';
|
|
39
39
|
export { googleIdentity, CLOUD_PLATFORM_SCOPE, type GoogleIdentityOptions, type GoogleImpersonation, type GoogleAuthClientLike, } from './adapters/identity/google.js';
|
|
40
40
|
export { jwksIdentity, MissingJwksSupportError, type JoseBackend, type JwksIdentityOptions, } from './adapters/identity/jwks.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,+BAA+B,EAC/B,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,OAAO,EACP,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAIpF,YAAY,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EACL,8BAA8B,EAC9B,KAAK,gCAAgC,GACtC,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,mBAAmB,EACnB,KAAK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KAAK,WAAW,EAChB,KAAK,mBAAmB,GACzB,MAAM,6BAA6B,CAAC"}
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
* behind `agentfootprint/observe`, which re-exports every name here — same
|
|
45
45
|
* symbols, one door. Import from the door.
|
|
46
46
|
*/
|
|
47
|
-
export { agentcoreObservability, type AgentcoreObservabilityOptions, } from './adapters/observability/agentcore.js';
|
|
47
|
+
export { agentcoreObservability, agentCoreEvaluationSpans, AGENTCORE_EVALUATIONS_SCOPE_NAME, type AgentcoreObservabilityOptions, } from './adapters/observability/agentcore.js';
|
|
48
48
|
export { cloudwatchObservability, type CloudwatchObservabilityOptions, } from './adapters/observability/cloudwatch.js';
|
|
49
49
|
export { xrayObservability, type XrayObservabilityOptions, type XRayLikeClient, } from './adapters/observability/xray.js';
|
|
50
50
|
export { otelObservability, type OtelObservabilityOptions, type OtelObservabilityStrategy, type OtelDecisionEvidenceRecorder, type OtelTracerLike, type OtelSpanLike, type OtelSpanOptions, type OtelAttributeValue, } from './adapters/observability/otel.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observability-providers.d.ts","sourceRoot":"","sources":["../../src/observability-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EACL,sBAAsB,
|
|
1
|
+
{"version":3,"file":"observability-providers.d.ts","sourceRoot":"","sources":["../../src/observability-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EACL,sBAAsB,EAItB,wBAAwB,EACxB,gCAAgC,EAChC,KAAK,6BAA6B,GACnC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,uBAAuB,EACvB,KAAK,8BAA8B,GACpC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,iBAAiB,EACjB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,GACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,iBAAiB,EACjB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EACL,iBAAiB,EACjB,KAAK,wBAAwB,EAC7B,KAAK,UAAU,GAChB,MAAM,kCAAkC,CAAC;AAI1C,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,EACf,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,iBAAiB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAQ/E,OAAO,EACL,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,wBAAwB,GAC9B,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,kBAAkB,EAClB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,GAC/B,MAAM,gDAAgD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentfootprint",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.66.0",
|
|
4
4
|
"description": "The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|