@alvin0/ai-agent-sdk-protocol-responses 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +455 -388
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -343,7 +343,7 @@ interface ResponsesProtocolDefinition {
|
|
|
343
343
|
/** The OpenAI Responses wire protocol. */
|
|
344
344
|
declare const openAiResponsesProtocol: ProtocolDefinition<ResponsesDialect> & ResponsesProtocolDefinition;
|
|
345
345
|
//#endregion
|
|
346
|
-
//#region src/serialize.d.ts
|
|
346
|
+
//#region src/serialize-types.d.ts
|
|
347
347
|
/**
|
|
348
348
|
* Adapter-private state kept on a {@link ReasoningBlock} so a reasoning item can
|
|
349
349
|
* be echoed back byte-identically on the next request of a tool-use loop.
|
|
@@ -356,26 +356,11 @@ interface ResponsesReasoningState {
|
|
|
356
356
|
/** Summary paragraphs, in order. */
|
|
357
357
|
summary?: readonly string[];
|
|
358
358
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
* @param request - the resolved request, model, and connection.
|
|
362
|
-
* @param dialect - which optional fields this endpoint accepts.
|
|
363
|
-
* @returns the wire body, ready to serialize.
|
|
364
|
-
*/
|
|
359
|
+
//#endregion
|
|
360
|
+
//#region src/serialize.d.ts
|
|
365
361
|
declare function serializeResponsesRequest(request: ProtocolRequest, dialect: ResponsesDialect): WireRequest;
|
|
366
362
|
//#endregion
|
|
367
363
|
//#region src/translate.d.ts
|
|
368
|
-
/**
|
|
369
|
-
* Translate one Responses SSE stream.
|
|
370
|
-
*
|
|
371
|
-
* Owns termination. This API sends no `[DONE]` sentinel: the stream ends on
|
|
372
|
-
* `response.completed`, `response.failed`, or `response.incomplete`, and a body
|
|
373
|
-
* that ends without one of those was truncated — which is a failure, not an
|
|
374
|
-
* empty success, because a truncated turn cannot be trusted.
|
|
375
|
-
* @param events - decoded SSE events.
|
|
376
|
-
* @param displayName - provider name, used in diagnostics.
|
|
377
|
-
* @returns the chunk stream.
|
|
378
|
-
*/
|
|
379
364
|
declare function translateResponsesStream(events: AsyncIterable<ProtocolSseEvent>, displayName: string, request?: ProtocolRequest): AsyncGenerator<ProtocolStreamChunk>;
|
|
380
365
|
//#endregion
|
|
381
366
|
export { OPENAI_RESPONSES_PROTOCOL_ID, type ProtocolDefinition, type ProtocolRequest, type ProtocolSseEvent, type ProtocolStreamChunk, type ResponsesDialect, type ResponsesProtocolDefinition, type ResponsesReasoningState, type WireContentPart, type WireErrorBody, type WireFunctionTool, type WireImageDetail, type WireIncompleteDetails, type WireInputItem, type WireInputTokensDetails, type WireNativeTool, type WireOutputItem, type WireOutputTokensDetails, type WireReasoning, type WireReasoningContent, type WireReasoningSummary, type WireRequest, type WireResponse, type WireStreamEvent, type WireTextAnnotation, type WireTextControls, type WireTextFormat, type WireTool, type WireToolChoice, type WireUsage, openAiResponsesProtocol, serializeResponsesRequest, translateResponsesStream };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/contract.ts","../src/wire.ts","../src/protocol.ts","../src/serialize.ts","../src/translate.ts"],"mappings":";;;;UAGiB;WACN,SAAS;;WAET;;;UAIM;WACN;WACA;;;KAIC,sBACR,QAAQ;WAAwB;;WACrB;WAAwB,OAAO;;;UAG7B,mBAAmB;WACzB;WACA,gBAAgB;EACzB,aAAa,SAAS,iBAAiB,SAAS;EAChD,iBAAiB,SAAS,UAAU;EACpC,UAAU,SAAS,iBAAiB,SAAS,oBAAoB;EACjE,UACE,QAAQ,cAAc,mBACtB,SAAS,iBACT,sBACC,eAAe;;;;;;;;;;;;;;;;;;;KCfR;;KAGA;EACN;EAAoB;;EACpB;EAAqB;EAAmB,SAAS;;EACjD;EAAqB;EAAiB,SAAS;;;;;;;EAK/C;EAAoB;EAA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SAAS,qBAAqB,SAAS;WAC1D,YACP,SAAS,wBACT,SAAS,qBACN,SAAS;WACL,YACP,QAAQ,cAAc,mBACtB,SAAS,wBACT,wBACG,eAAe;;;cAIT,yBAAyB,mBAAmB,oBACrD;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/contract.ts","../src/wire.ts","../src/protocol.ts","../src/serialize-types.ts","../src/serialize.ts","../src/translate.ts"],"mappings":";;;;UAGiB;WACN,SAAS;;WAET;;;UAIM;WACN;WACA;;;KAIC,sBACR,QAAQ;WAAwB;;WACrB;WAAwB,OAAO;;;UAG7B,mBAAmB;WACzB;WACA,gBAAgB;EACzB,aAAa,SAAS,iBAAiB,SAAS;EAChD,iBAAiB,SAAS,UAAU;EACpC,UAAU,SAAS,iBAAiB,SAAS,oBAAoB;EACjE,UACE,QAAQ,cAAc,mBACtB,SAAS,iBACT,sBACC,eAAe;;;;;;;;;;;;;;;;;;;KCfR;;KAGA;EACN;EAAoB;;EACpB;EAAqB;EAAmB,SAAS;;EACjD;EAAqB;EAAiB,SAAS;;;;;;;EAK/C;EAAoB;EAAkB;;EACtC;EAAoB;;EACpB;EAAoB;;EACpB;EAAqB;EAAc,cAAc;;UAEtC;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;;;UAIe;EACf;EACA;;;;;;;;;;;KAYU;EAER;EACA;EACA,SAAS;EACT;;EAGA;;EAEA;EACA;;EAEA;;EAEA;;EAGA;EACA;;EAEA,iBAAiB;;EAGjB;EACA;EACA,SAAS;EACT,UAAU;;;;;;;EAOV;;;EAIA;EACA;EACA;EACA;;;EAIA;EACA;EACA;EACA;;;UAIa;EACf;EACA;EACA;EACA;EACA,YAAY;;UAGG;EACf;GACC;;KAGS,WAAW,mBAAmB;;KAG9B;EAIN;EAAkB;;EAClB;;;UAGW;EACf;EACA;;;UAIe;EACf,SAAS;EACT;;KAGU;EACN;;EAEF;EACA;EACA,QAAQ,SAAS;EACjB;;;UAIa;EACf;;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