agentfootprint 9.64.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/hosting/foundryResponses.js +110 -0
- package/dist/adapters/hosting/foundryResponses.js.map +1 -0
- package/dist/adapters/hosting/responsesWire.js +322 -0
- package/dist/adapters/hosting/responsesWire.js.map +1 -0
- 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/hosting/foundryResponses.d.ts +89 -0
- package/dist/esm/adapters/hosting/foundryResponses.js +106 -0
- package/dist/esm/adapters/hosting/foundryResponses.js.map +1 -0
- package/dist/esm/adapters/hosting/responsesWire.d.ts +75 -0
- package/dist/esm/adapters/hosting/responsesWire.js +316 -0
- package/dist/esm/adapters/hosting/responsesWire.js.map +1 -0
- 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/hosting/errors.d.ts +43 -0
- package/dist/esm/hosting/errors.js +52 -0
- package/dist/esm/hosting/errors.js.map +1 -1
- package/dist/esm/hosting/httpHost.d.ts +133 -4
- package/dist/esm/hosting/httpHost.js +120 -22
- package/dist/esm/hosting/httpHost.js.map +1 -1
- package/dist/esm/hosting/index.d.ts +2 -2
- package/dist/esm/hosting/index.js +1 -1
- package/dist/esm/hosting/index.js.map +1 -1
- package/dist/esm/hosting-providers.d.ts +17 -0
- package/dist/esm/hosting-providers.js +19 -0
- package/dist/esm/hosting-providers.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/hosting/errors.js +55 -1
- package/dist/hosting/errors.js.map +1 -1
- package/dist/hosting/httpHost.js +119 -21
- package/dist/hosting/httpHost.js.map +1 -1
- package/dist/hosting/index.js +4 -2
- package/dist/hosting/index.js.map +1 -1
- package/dist/hosting-providers.js +30 -1
- package/dist/hosting-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/hosting/foundryResponses.d.ts +90 -0
- package/dist/types/adapters/hosting/foundryResponses.d.ts.map +1 -0
- package/dist/types/adapters/hosting/responsesWire.d.ts +76 -0
- package/dist/types/adapters/hosting/responsesWire.d.ts.map +1 -0
- 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/hosting/errors.d.ts +43 -0
- package/dist/types/hosting/errors.d.ts.map +1 -1
- package/dist/types/hosting/httpHost.d.ts +133 -4
- package/dist/types/hosting/httpHost.d.ts.map +1 -1
- package/dist/types/hosting/index.d.ts +2 -2
- package/dist/types/hosting/index.d.ts.map +1 -1
- package/dist/types/hosting-providers.d.ts +17 -0
- package/dist/types/hosting-providers.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
package/dist/hosting/index.js
CHANGED
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
* process.on('SIGTERM', () => void handle.close());
|
|
95
95
|
*/
|
|
96
96
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
97
|
-
exports.
|
|
98
|
-
exports.ARTIFACT_GET_OP = exports.ARTIFACT_HEAD_OP = exports.artifactWireBody = exports.readArtifactWireOp = exports.WIRE_OPS = exports.refuseUnknownWireOp = exports.isWireOp = exports.ALL_WIRE_OPS = exports.SESSION_TRANSCRIPT_OP = exports.SESSION_LIST_OP = exports.sessionWireBody = exports.readSessionWireOp = exports.turnsPerHour = exports.spendLedger = exports.spendKeyFor = exports.verifyRequestIdentity = void 0;
|
|
97
|
+
exports.runSessionLifecycleConformance = exports.runSessionLifecycleCase = exports.formatConformanceReport = exports.resolveSessionOwner = exports.sessionRetention = exports.WireRequestRefusal = exports.RequestTooLargeError = exports.SessionsNotCarriedError = exports.SessionOwnershipConflictError = exports.SessionNotFoundError = exports.SessionRetentionUnavailableError = exports.SessionIndexUnavailableError = exports.SessionOpNeedsIdentityError = exports.AdmissionRefusedError = exports.VerifierUnavailableError = exports.IdentityNotVerifiedError = exports.ArtifactNotCarriedError = exports.ArtifactNotFoundError = exports.NoArtifactStoreError = exports.ArtifactSessionRequiredError = exports.InvalidWireOpError = exports.FrameTooLargeError = exports.ConversationClosedError = exports.UnreadableEnvelopeError = exports.NoPendingAskError = exports.AwaitingDecisionError = exports.PauseNotCarriedError = exports.ConcurrentRunError = exports.HostClosedError = exports.requireCapability = exports.DEFAULT_SWEEP_LIMIT = exports.DEFAULT_MAX_ACTIVE_SESSIONS = exports.standingAgent = exports.checkEnvelope = exports.readPausedRun = exports.readEnvelope = exports.toPausedEnvelope = exports.envelopeTranscript = exports.envelopeOwner = exports.toEnvelope = exports.UnreadableSessionFileError = exports.SqliteUnavailableError = exports.sqliteSessions = exports.memorySessions = exports.headerValue = exports.httpHost = exports.DEFAULT_SESSION_HEADER = exports.jsonWireWith = exports.jsonWire = exports.nodeHost = void 0;
|
|
98
|
+
exports.ARTIFACT_GET_OP = exports.ARTIFACT_HEAD_OP = exports.artifactWireBody = exports.readArtifactWireOp = exports.WIRE_OPS = exports.refuseUnknownWireOp = exports.isWireOp = exports.ALL_WIRE_OPS = exports.SESSION_TRANSCRIPT_OP = exports.SESSION_LIST_OP = exports.sessionWireBody = exports.readSessionWireOp = exports.turnsPerHour = exports.spendLedger = exports.spendKeyFor = exports.verifyRequestIdentity = exports.bearerToken = exports.sessionLifecycleConformance = void 0;
|
|
99
99
|
var nodeHost_js_1 = require("./nodeHost.js");
|
|
100
100
|
Object.defineProperty(exports, "nodeHost", { enumerable: true, get: function () { return nodeHost_js_1.nodeHost; } });
|
|
101
101
|
Object.defineProperty(exports, "jsonWire", { enumerable: true, get: function () { return nodeHost_js_1.jsonWire; } });
|
|
@@ -153,6 +153,8 @@ Object.defineProperty(exports, "SessionRetentionUnavailableError", { enumerable:
|
|
|
153
153
|
Object.defineProperty(exports, "SessionNotFoundError", { enumerable: true, get: function () { return errors_js_1.SessionNotFoundError; } });
|
|
154
154
|
Object.defineProperty(exports, "SessionOwnershipConflictError", { enumerable: true, get: function () { return errors_js_1.SessionOwnershipConflictError; } });
|
|
155
155
|
Object.defineProperty(exports, "SessionsNotCarriedError", { enumerable: true, get: function () { return errors_js_1.SessionsNotCarriedError; } });
|
|
156
|
+
Object.defineProperty(exports, "RequestTooLargeError", { enumerable: true, get: function () { return errors_js_1.RequestTooLargeError; } });
|
|
157
|
+
Object.defineProperty(exports, "WireRequestRefusal", { enumerable: true, get: function () { return errors_js_1.WireRequestRefusal; } });
|
|
156
158
|
// Retention (9.42.0) — the ONE feature detection for the port's optional
|
|
157
159
|
// `retention()` member, and the refusal a store without one produces. A door
|
|
158
160
|
// rather than `sessions.retention?.()`, because `undefined` there reads as
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hosting/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;;;;AAEH,6CAAyF;AAAhF,uGAAA,QAAQ,OAAA;AAAE,uGAAA,QAAQ,OAAA;AAAE,2GAAA,YAAY,OAAA;AAAE,qHAAA,sBAAsB,OAAA;AAEjE,6EAA6E;AAC7E,2EAA2E;AAC3E,+EAA+E;AAC/E,0EAA0E;AAC1E,+EAA+E;AAC/E,oCAAoC;AAEpC,6CAAsD;AAA7C,uGAAA,QAAQ,OAAA;AAAE,0GAAA,WAAW,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hosting/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;;;;AAEH,6CAAyF;AAAhF,uGAAA,QAAQ,OAAA;AAAE,uGAAA,QAAQ,OAAA;AAAE,2GAAA,YAAY,OAAA;AAAE,qHAAA,sBAAsB,OAAA;AAEjE,6EAA6E;AAC7E,2EAA2E;AAC3E,+EAA+E;AAC/E,0EAA0E;AAC1E,+EAA+E;AAC/E,oCAAoC;AAEpC,6CAAsD;AAA7C,uGAAA,QAAQ,OAAA;AAAE,0GAAA,WAAW,OAAA;AAc9B,yDAAqD;AAA5C,mHAAA,cAAc,OAAA;AACvB,yDAI6B;AAH3B,mHAAA,cAAc,OAAA;AACd,2HAAA,sBAAsB,OAAA;AACtB,+HAAA,0BAA0B,OAAA;AAM5B,6CAQuB;AAPrB,yGAAA,UAAU,OAAA;AACV,4GAAA,aAAa,OAAA;AACb,iHAAA,kBAAkB,OAAA;AAClB,+GAAA,gBAAgB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AA;AACvB,mHAAA,uBAAuB,OAAA;AACvB,0HAAA,8BAA8B,OAAA;AAC9B,uHAAA,2BAA2B,OAAA;AAY7B,2EAA2E;AAC3E,iEAAiE;AACjE,8EAA8E;AAC9E,yDAAyD;AACzD,qEAA+E;AAAtE,sHAAA,WAAW,OAAA;AAAE,gIAAA,qBAAqB,OAAA;AAO3C,+EAA+E;AAC/E,uEAAuE;AACvE,2DAA2D;AAC3D,+CAAwE;AAA/D,2GAAA,WAAW,OAAA;AAAE,2GAAA,WAAW,OAAA;AAAE,4GAAA,YAAY,OAAA;AAuB/C,+EAA+E;AAC/E,yEAAyE;AACzE,qBAAqB;AACrB,mDAK0B;AAJxB,mHAAA,iBAAiB,OAAA;AACjB,iHAAA,eAAe,OAAA;AACf,iHAAA,eAAe,OAAA;AACf,uHAAA,qBAAqB,OAAA;AAQvB,2CAAqF;AAA5E,0GAAA,YAAY,OAAA;AAAE,sGAAA,QAAQ,OAAA;AAAE,iHAAA,mBAAmB,OAAA;AAAE,sGAAA,QAAQ,OAAA;AAG9D,8EAA8E;AAC9E,6EAA6E;AAC7E,yEAAyE;AACzE,0EAA0E;AAC1E,2EAA2E;AAC3E,2BAA2B;AAC3B,qDAK2B;AAJzB,qHAAA,kBAAkB,OAAA;AAClB,mHAAA,gBAAgB,OAAA;AAChB,mHAAA,gBAAgB,OAAA;AAChB,kHAAA,eAAe,OAAA"}
|
|
@@ -26,6 +26,19 @@
|
|
|
26
26
|
* idleMs: 900000 }` declared, session affinity readable from header or
|
|
27
27
|
* query, and a `Sec-WebSocket-Protocol` bearer mapped into
|
|
28
28
|
* `headers.authorization`.
|
|
29
|
+
* • `foundryResponsesHost({ port?, hostname?, model?, maxBodyBytes? })` — an
|
|
30
|
+
* `AgentHost` for Microsoft Foundry's hosted-agent contract: `POST
|
|
31
|
+
* /responses`, a `HEAD` capability probe on the same path, `GET /readiness`
|
|
32
|
+
* answering `{"status":"healthy"}`, port 8088, and the session read from
|
|
33
|
+
* `conversation` / `agent_session_id` / `session_id` in that order. It
|
|
34
|
+
* streams when the BODY says `stream: true` — not the `Accept` header —
|
|
35
|
+
* and frames that stream as the Responses lifecycle.
|
|
36
|
+
* **Inbound only:** it is the door callers arrive at, and says nothing
|
|
37
|
+
* about which model the agent calls. It does NOT provide Workflow
|
|
38
|
+
* Visualizer topology; see the adapter's header.
|
|
39
|
+
* • `responsesWire({ defaultModel?, sessionFields?, health? })` — the
|
|
40
|
+
* Responses PROTOCOL as an `HttpWire`, with no vendor in it, for the next
|
|
41
|
+
* runtime that speaks it on paths of its own.
|
|
29
42
|
* • `agentCoreSessions({ store })` — a `SessionLifecycle` whose checkpoint
|
|
30
43
|
* home you choose at construction: a JSON file in the runtime's own session
|
|
31
44
|
* storage (survives a stop/resume, needs no SDK), or one AgentCore Memory
|
|
@@ -88,13 +101,29 @@
|
|
|
88
101
|
* symbols, one door. Import from the door.
|
|
89
102
|
*/
|
|
90
103
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
91
|
-
exports.FirestoreIndexMissingError = exports.EnvelopeTooLargeError = exports.FIRESTORE_MAX_ENVELOPE_BYTES = exports.FIRESTORE_MAX_DOCUMENT_BYTES = exports.EXPIRES_AT_FIELD = exports.DEFAULT_SESSION_COLLECTION = exports.firestoreSessions = exports.SESSION_EVENT_AUTHOR = exports.SESSION_STATE_KEY = exports.DEFAULT_USER_ID = exports.agentEngineSessions = exports.DEFAULT_SESSION_STORAGE_PATH = exports.agentCoreSessions = exports.readAgentCoreConversation = exports.agentCoreRuntimeWire = exports.agentCoreRuntimeHost = void 0;
|
|
104
|
+
exports.FirestoreIndexMissingError = exports.EnvelopeTooLargeError = exports.FIRESTORE_MAX_ENVELOPE_BYTES = exports.FIRESTORE_MAX_DOCUMENT_BYTES = exports.EXPIRES_AT_FIELD = exports.DEFAULT_SESSION_COLLECTION = exports.firestoreSessions = exports.SESSION_EVENT_AUTHOR = exports.SESSION_STATE_KEY = exports.DEFAULT_USER_ID = exports.agentEngineSessions = exports.PUBLIC_FAILURE_MESSAGE = exports.DEFAULT_SESSION_FIELDS = exports.readResponsesSession = exports.readResponsesInput = exports.responsesWire = exports.FOUNDRY_SESSION_FIELDS = exports.FOUNDRY_READINESS_PATH = exports.FOUNDRY_INVOKE_PATH = exports.DEFAULT_FOUNDRY_PORT = exports.foundryResponsesHost = exports.DEFAULT_SESSION_STORAGE_PATH = exports.agentCoreSessions = exports.readAgentCoreConversation = exports.agentCoreRuntimeWire = exports.agentCoreRuntimeHost = void 0;
|
|
92
105
|
var agentcore_js_1 = require("./adapters/hosting/agentcore.js");
|
|
93
106
|
Object.defineProperty(exports, "agentCoreRuntimeHost", { enumerable: true, get: function () { return agentcore_js_1.agentCoreRuntimeHost; } });
|
|
94
107
|
Object.defineProperty(exports, "agentCoreRuntimeWire", { enumerable: true, get: function () { return agentcore_js_1.agentCoreRuntimeWire; } });
|
|
95
108
|
Object.defineProperty(exports, "readAgentCoreConversation", { enumerable: true, get: function () { return agentcore_js_1.readAgentCoreConversation; } });
|
|
96
109
|
Object.defineProperty(exports, "agentCoreSessions", { enumerable: true, get: function () { return agentcore_js_1.agentCoreSessions; } });
|
|
97
110
|
Object.defineProperty(exports, "DEFAULT_SESSION_STORAGE_PATH", { enumerable: true, get: function () { return agentcore_js_1.DEFAULT_SESSION_STORAGE_PATH; } });
|
|
111
|
+
var foundryResponses_js_1 = require("./adapters/hosting/foundryResponses.js");
|
|
112
|
+
Object.defineProperty(exports, "foundryResponsesHost", { enumerable: true, get: function () { return foundryResponses_js_1.foundryResponsesHost; } });
|
|
113
|
+
Object.defineProperty(exports, "DEFAULT_FOUNDRY_PORT", { enumerable: true, get: function () { return foundryResponses_js_1.DEFAULT_FOUNDRY_PORT; } });
|
|
114
|
+
Object.defineProperty(exports, "FOUNDRY_INVOKE_PATH", { enumerable: true, get: function () { return foundryResponses_js_1.FOUNDRY_INVOKE_PATH; } });
|
|
115
|
+
Object.defineProperty(exports, "FOUNDRY_READINESS_PATH", { enumerable: true, get: function () { return foundryResponses_js_1.FOUNDRY_READINESS_PATH; } });
|
|
116
|
+
Object.defineProperty(exports, "FOUNDRY_SESSION_FIELDS", { enumerable: true, get: function () { return foundryResponses_js_1.FOUNDRY_SESSION_FIELDS; } });
|
|
117
|
+
// The protocol under it, on the barrel in its own right: a deployment that
|
|
118
|
+
// speaks Responses on paths of its own is a `httpHost` away, and having to
|
|
119
|
+
// import a vendor-named module to reach a vendor-neutral dialect would be the
|
|
120
|
+
// split this pair exists to make.
|
|
121
|
+
var responsesWire_js_1 = require("./adapters/hosting/responsesWire.js");
|
|
122
|
+
Object.defineProperty(exports, "responsesWire", { enumerable: true, get: function () { return responsesWire_js_1.responsesWire; } });
|
|
123
|
+
Object.defineProperty(exports, "readResponsesInput", { enumerable: true, get: function () { return responsesWire_js_1.readResponsesInput; } });
|
|
124
|
+
Object.defineProperty(exports, "readResponsesSession", { enumerable: true, get: function () { return responsesWire_js_1.readResponsesSession; } });
|
|
125
|
+
Object.defineProperty(exports, "DEFAULT_SESSION_FIELDS", { enumerable: true, get: function () { return responsesWire_js_1.DEFAULT_SESSION_FIELDS; } });
|
|
126
|
+
Object.defineProperty(exports, "PUBLIC_FAILURE_MESSAGE", { enumerable: true, get: function () { return responsesWire_js_1.PUBLIC_FAILURE_MESSAGE; } });
|
|
98
127
|
var googleAgentEngine_js_1 = require("./adapters/hosting/googleAgentEngine.js");
|
|
99
128
|
Object.defineProperty(exports, "agentEngineSessions", { enumerable: true, get: function () { return googleAgentEngine_js_1.agentEngineSessions; } });
|
|
100
129
|
Object.defineProperty(exports, "DEFAULT_USER_ID", { enumerable: true, get: function () { return googleAgentEngine_js_1.DEFAULT_USER_ID; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosting-providers.js","sourceRoot":"","sources":["../src/hosting-providers.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"hosting-providers.js","sourceRoot":"","sources":["../src/hosting-providers.ts"],"names":[],"mappings":";AAAA;;;;;;;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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"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* adapters/hosting/foundryResponses — an agent behind Microsoft Foundry's
|
|
3
|
+
* hosted-agent contract.
|
|
4
|
+
*
|
|
5
|
+
* ── The split, and why it is here ────────────────────────────────────────────
|
|
6
|
+
* Two different things are needed to serve a Foundry hosted agent, and only one
|
|
7
|
+
* of them is Microsoft's:
|
|
8
|
+
*
|
|
9
|
+
* • The **Responses protocol** — `input` items, a `response` object, the
|
|
10
|
+
* named streaming lifecycle. That is a protocol several runtimes speak, so
|
|
11
|
+
* it lives in `responsesWire.ts` with no vendor in it.
|
|
12
|
+
* • The **hosting contract** — port 8088, `POST /responses`, a `HEAD` probe
|
|
13
|
+
* on the same path, `GET /readiness` answering `{"status":"healthy"}`, and
|
|
14
|
+
* `agent_session_id` as a session alias. That IS this runtime's contract,
|
|
15
|
+
* the same way `/invocations` and `X-Amzn-…` are another's, and it is what
|
|
16
|
+
* this file supplies.
|
|
17
|
+
*
|
|
18
|
+
* So this file is a configuration, not an implementation. Everything hard —
|
|
19
|
+
* draining on close, aborting when the caller hangs up, failing a handler that
|
|
20
|
+
* throws or answers nothing — is `httpHost`'s, shared with every other adapter
|
|
21
|
+
* rather than reimplemented here where the two would drift.
|
|
22
|
+
*
|
|
23
|
+
* ── What it does NOT do ──────────────────────────────────────────────────────
|
|
24
|
+
* **Workflow Visualizer topology is not provided.** The Inspector can invoke
|
|
25
|
+
* this host and render its answer; it does not learn that the answer came from
|
|
26
|
+
* four composed agents, because nothing in the Responses protocol carries that
|
|
27
|
+
* and inventing a channel for it would be claiming a compatibility this has
|
|
28
|
+
* never demonstrated. An agent's internal structure is readable from
|
|
29
|
+
* agentfootprint's own recorders.
|
|
30
|
+
*
|
|
31
|
+
* Everything the protocol does not carry — tool calls, image and file input,
|
|
32
|
+
* function-call output, structured output — is refused by name. See
|
|
33
|
+
* `responsesWire.ts`.
|
|
34
|
+
*
|
|
35
|
+
* This is an **inbound hosting adapter**: it is the door callers arrive at. It
|
|
36
|
+
* is not a model provider, and it has nothing to do with which model the agent
|
|
37
|
+
* calls — for Foundry models, that is `openai()` with the endpoint's base URL.
|
|
38
|
+
*
|
|
39
|
+
* @example An agent behind the Inspector
|
|
40
|
+
* import { foundryResponsesHost, memorySessions, standingAgent } from 'agentfootprint/hosting';
|
|
41
|
+
*
|
|
42
|
+
* const handle = await standingAgent({
|
|
43
|
+
* agent,
|
|
44
|
+
* sessions: memorySessions(),
|
|
45
|
+
* host: foundryResponsesHost(),
|
|
46
|
+
* });
|
|
47
|
+
* process.on('SIGTERM', () => void handle.close());
|
|
48
|
+
*/
|
|
49
|
+
/// <reference types="node" />
|
|
50
|
+
import type { IncomingMessage, Server, ServerResponse } from 'node:http';
|
|
51
|
+
import { type HttpHost } from '../../hosting/httpHost.js';
|
|
52
|
+
/** The port a Foundry hosted agent is expected on. */
|
|
53
|
+
export declare const DEFAULT_FOUNDRY_PORT = 8088;
|
|
54
|
+
/** The path that takes a turn. */
|
|
55
|
+
export declare const FOUNDRY_INVOKE_PATH = "/responses";
|
|
56
|
+
/** The path a Foundry hosted agent answers a readiness probe on. */
|
|
57
|
+
export declare const FOUNDRY_READINESS_PATH = "/readiness";
|
|
58
|
+
/**
|
|
59
|
+
* Session aliases this contract accepts, in precedence order.
|
|
60
|
+
*
|
|
61
|
+
* `conversation` is the protocol's own; `agent_session_id` is this runtime's;
|
|
62
|
+
* `session_id` is the spelling several clients send anyway. First one present
|
|
63
|
+
* wins, so a caller using any of the three reaches the same session.
|
|
64
|
+
*/
|
|
65
|
+
export declare const FOUNDRY_SESSION_FIELDS: readonly string[];
|
|
66
|
+
export interface FoundryResponsesHostOptions {
|
|
67
|
+
/** Port to bind. Default {@link DEFAULT_FOUNDRY_PORT}. Pass `0` for an ephemeral test port. */
|
|
68
|
+
readonly port?: number;
|
|
69
|
+
/** Interface to bind. Default `'0.0.0.0'` — a container's door has to be reachable from outside it. */
|
|
70
|
+
readonly hostname?: string;
|
|
71
|
+
/** Model label echoed in `response` objects when the request names none. */
|
|
72
|
+
readonly model?: string;
|
|
73
|
+
/** Ceiling on a request body. Default one mebibyte. */
|
|
74
|
+
readonly maxBodyBytes?: number;
|
|
75
|
+
/**
|
|
76
|
+
* A `node:http` server you own, to ATTACH these routes to rather than binding
|
|
77
|
+
* one. Refused together with `port`/`hostname`, which would name a socket
|
|
78
|
+
* this host does not bind.
|
|
79
|
+
*/
|
|
80
|
+
readonly server?: Server;
|
|
81
|
+
/** Answer a path this host does not own. Private-server mode only. */
|
|
82
|
+
readonly onUnhandled?: (req: IncomingMessage, res: ServerResponse) => void;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* An {@link HttpHost} speaking Foundry's hosted-agent contract.
|
|
86
|
+
*
|
|
87
|
+
* @param options - Port, interface, model label and body ceiling.
|
|
88
|
+
*/
|
|
89
|
+
export declare function foundryResponsesHost(options?: FoundryResponsesHostOptions): HttpHost;
|
|
90
|
+
//# sourceMappingURL=foundryResponses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foundryResponses.d.ts","sourceRoot":"","sources":["../../../../src/adapters/hosting/foundryResponses.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzE,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAGpE,sDAAsD;AACtD,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,kCAAkC;AAClC,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAEhD,oEAAoE;AACpE,eAAO,MAAM,sBAAsB,eAAe,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAInD,CAAC;AAQF,MAAM,WAAW,2BAA2B;IAC1C,+FAA+F;IAC/F,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,uGAAuG;IACvG,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,uDAAuD;IACvD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,sEAAsE;IACtE,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,KAAK,IAAI,CAAC;CAC5E;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,2BAAgC,GAAG,QAAQ,CA2BxF"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* adapters/hosting/responsesWire — the Responses protocol, as an `HttpWire`.
|
|
3
|
+
*
|
|
4
|
+
* ── What this is, and what it deliberately is not ────────────────────────────
|
|
5
|
+
* This file speaks the **Responses** wire protocol: a request carries `input`
|
|
6
|
+
* as text or as message items, a reply is a `response` object with an id and a
|
|
7
|
+
* status, and a stream is a LIFECYCLE of named events that open the response,
|
|
8
|
+
* announce output, carry deltas, and close each part before closing the
|
|
9
|
+
* response itself.
|
|
10
|
+
*
|
|
11
|
+
* That protocol is nobody's product. It is the shape a Responses-speaking
|
|
12
|
+
* client sends and expects, and several hosted runtimes speak it. So it lives
|
|
13
|
+
* here as a dialect on its own, and the runtimes that CONFIGURE it — their
|
|
14
|
+
* paths, their ports, their probe bodies, their session aliases — live in their
|
|
15
|
+
* own files beside this one. Keeping the split means the next runtime that
|
|
16
|
+
* speaks Responses is a configuration rather than a copy, and it means no
|
|
17
|
+
* vendor's spelling ends up in the protocol.
|
|
18
|
+
*
|
|
19
|
+
* ── The subset ───────────────────────────────────────────────────────────────
|
|
20
|
+
* A text turn, streamed or not, with a session. Deliberately not the whole
|
|
21
|
+
* Responses API: tool calls, reasoning items, image/file input, structured
|
|
22
|
+
* output and function-call output are NOT carried, and each is REFUSED by name
|
|
23
|
+
* rather than dropped — a request whose content this dialect cannot represent
|
|
24
|
+
* is answered 400 before a turn is paid for, never answered 200 with the parts
|
|
25
|
+
* it happened to understand.
|
|
26
|
+
*
|
|
27
|
+
* @example A host that speaks Responses on paths of its own choosing
|
|
28
|
+
* httpHost({
|
|
29
|
+
* name: 'myResponsesHost',
|
|
30
|
+
* wire: responsesWire({ defaultModel: 'my-agent' }),
|
|
31
|
+
* invokePath: '/responses',
|
|
32
|
+
* healthPath: '/health',
|
|
33
|
+
* });
|
|
34
|
+
*/
|
|
35
|
+
import type { HttpWire } from '../../hosting/httpHost.js';
|
|
36
|
+
/** Body fields that may carry a session id, in the order they are consulted. */
|
|
37
|
+
export declare const DEFAULT_SESSION_FIELDS: readonly string[];
|
|
38
|
+
/**
|
|
39
|
+
* What a caller is told when a handler THREW.
|
|
40
|
+
*
|
|
41
|
+
* A thrown error's message is the author's note to their own logs — a query, a
|
|
42
|
+
* path, a token in a connection string — and none of it is the caller's. A
|
|
43
|
+
* handler that CHOSE to fail chose its words for the caller, so those travel
|
|
44
|
+
* unchanged. The host tells this dialect which happened; it never guesses from
|
|
45
|
+
* the message.
|
|
46
|
+
*/
|
|
47
|
+
export declare const PUBLIC_FAILURE_MESSAGE = "The agent could not complete this request.";
|
|
48
|
+
export interface ResponsesWireOptions {
|
|
49
|
+
/** Model label echoed in `response` objects when the request names none. */
|
|
50
|
+
readonly defaultModel?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Body fields that carry a session id, in precedence order. The first one
|
|
53
|
+
* present and non-empty wins. Default `['conversation', 'session_id']`.
|
|
54
|
+
*
|
|
55
|
+
* A runtime with its own spelling passes its own list — that is the seam a
|
|
56
|
+
* hosting contract configures rather than forks this file for.
|
|
57
|
+
*/
|
|
58
|
+
readonly sessionFields?: readonly string[];
|
|
59
|
+
/** Body for the health probe. Default `{ status: 'ok' }`. */
|
|
60
|
+
readonly health?: unknown;
|
|
61
|
+
}
|
|
62
|
+
type JsonObject = Readonly<Record<string, unknown>>;
|
|
63
|
+
/** The turn's text: a bare string, or the user message items that carry it. */
|
|
64
|
+
export declare function readResponsesInput(input: unknown): string;
|
|
65
|
+
/** The session this request claims, by whichever of its aliases it used. */
|
|
66
|
+
export declare function readResponsesSession(body: JsonObject, fields: readonly string[]): string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* An `HttpWire` speaking the Responses protocol.
|
|
69
|
+
*
|
|
70
|
+
* Pair it with `httpHost` and the paths your deployment contract names. The
|
|
71
|
+
* host keeps its own promises — draining, aborting on disconnect, failing a
|
|
72
|
+
* handler that throws or answers nothing — and this supplies only the dialect.
|
|
73
|
+
*/
|
|
74
|
+
export declare function responsesWire(options?: ResponsesWireOptions): HttpWire;
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=responsesWire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsesWire.d.ts","sourceRoot":"","sources":["../../../../src/adapters/hosting/responsesWire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAKH,OAAO,KAAK,EAGV,QAAQ,EAGT,MAAM,2BAA2B,CAAC;AAEnC,gFAAgF;AAChF,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAAmC,CAAC;AAExF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,+CAA+C,CAAC;AAInF,MAAM,WAAW,oBAAoB;IACnC,4EAA4E;IAC5E,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;;;OAMG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,6DAA6D;IAC7D,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,KAAK,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAuCpD,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAgCzD;AAED,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB,MAAM,GAAG,SAAS,CAUpB;AAqMD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,QAAQ,CAuC1E"}
|
|
@@ -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,EAA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,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IAC/E,QAAQ,CAAC,wBAAwB,CAAC,EAAE,KAAK,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IACpE,QAAQ,CAAC,gCAAgC,CAAC,EAAE,KAAK,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CAC7E;AAwND,mFAAmF;AACnF,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,wBAA6B,GAAG,kBAAkB,CAuK5F;AAED,qEAAqE;AACrE,MAAM,WAAW,qCAAqC;IACpD;8DAC0D;IAC1D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;8CAC0C;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;iDAC6C;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,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"}
|