@naylence/agent-sdk 0.3.8 → 0.3.9
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/browser/index.js +15 -6
- package/dist/browser/index.js.map +1 -1
- package/dist/cjs/naylence/agent/base-agent.js +6 -2
- package/dist/cjs/naylence/agent/base-agent.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/naylence/agent/base-agent.js +6 -2
- package/dist/esm/naylence/agent/base-agent.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +2 -2
- package/dist/types/naylence/agent/base-agent.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/browser/index.js
CHANGED
|
@@ -15692,12 +15692,12 @@
|
|
|
15692
15692
|
// --- END ENV SHIM ---
|
|
15693
15693
|
|
|
15694
15694
|
// This file is auto-generated during build - do not edit manually
|
|
15695
|
-
// Generated from package.json version: 0.3.
|
|
15695
|
+
// Generated from package.json version: 0.3.10
|
|
15696
15696
|
/**
|
|
15697
15697
|
* The package version, injected at build time.
|
|
15698
15698
|
* @internal
|
|
15699
15699
|
*/
|
|
15700
|
-
const VERSION$1 = '0.3.
|
|
15700
|
+
const VERSION$1 = '0.3.10';
|
|
15701
15701
|
|
|
15702
15702
|
/**
|
|
15703
15703
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -19210,13 +19210,18 @@
|
|
|
19210
19210
|
this.sidFn = sidFn;
|
|
19211
19211
|
}
|
|
19212
19212
|
createEnvelope(options) {
|
|
19213
|
-
const { frame, id, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
|
|
19213
|
+
const { frame, id, sid, traceId, to, capabilities, replyTo, flowId, windowId, flags, timestamp, corrId, responseType, } = options;
|
|
19214
19214
|
const optionsRecord = isPlainRecord$8(options)
|
|
19215
19215
|
? options
|
|
19216
19216
|
: {};
|
|
19217
19217
|
validateFrame(frame);
|
|
19218
19218
|
const sidValue = this.sidFn();
|
|
19219
|
-
|
|
19219
|
+
let sanitizedSid = typeof sidValue === 'string' ? sidValue.trim() : sidValue;
|
|
19220
|
+
const sidInput = pickAlias(sid ?? null, optionsRecord, 'sid', 'source_id');
|
|
19221
|
+
if ((!sanitizedSid || sanitizedSid.length === 0) &&
|
|
19222
|
+
typeof sidInput === 'string') {
|
|
19223
|
+
sanitizedSid = sidInput.trim();
|
|
19224
|
+
}
|
|
19220
19225
|
const idInput = pickAlias(id ?? null, optionsRecord, 'envelope_id');
|
|
19221
19226
|
const traceIdInput = pickAlias(traceId ?? null, optionsRecord, 'trace_id');
|
|
19222
19227
|
const toInput = pickAlias(to ?? null, optionsRecord, 'to', 'recipient', 'target', 'address');
|
|
@@ -56112,7 +56117,9 @@
|
|
|
56112
56117
|
if (rpcRequest.id != null) {
|
|
56113
56118
|
envelopeOptions.corrId = String(rpcRequest.id);
|
|
56114
56119
|
}
|
|
56115
|
-
const envelopeResponse =
|
|
56120
|
+
const envelopeResponse = this._node
|
|
56121
|
+
? this._node.envelopeFactory.createEnvelope(envelopeOptions)
|
|
56122
|
+
: createFameEnvelope(envelopeOptions);
|
|
56116
56123
|
yield createMessageResponse(envelopeResponse);
|
|
56117
56124
|
}
|
|
56118
56125
|
}.bind(this);
|
|
@@ -56168,7 +56175,9 @@
|
|
|
56168
56175
|
if (rpcRequest.id != null) {
|
|
56169
56176
|
envelopeOptions.corrId = String(rpcRequest.id);
|
|
56170
56177
|
}
|
|
56171
|
-
const envelope =
|
|
56178
|
+
const envelope = this._node
|
|
56179
|
+
? this._node.envelopeFactory.createEnvelope(envelopeOptions)
|
|
56180
|
+
: createFameEnvelope(envelopeOptions);
|
|
56172
56181
|
const fabricToUse = this._fabric ?? FameFabric.current();
|
|
56173
56182
|
await fabricToUse.send(envelope);
|
|
56174
56183
|
}
|