@mitralab.io/sdk-core 0.2.3 → 0.2.4
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/contracts/README.md +4 -0
- package/contracts/manifest.json +6 -1
- package/contracts/v0.2.4/sdk-parity.json +2902 -0
- package/dist/index.cjs +12 -7
- package/dist/index.js +12 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3344,7 +3344,17 @@ var CoreAgentTaskSession = class {
|
|
|
3344
3344
|
}
|
|
3345
3345
|
if (this.isClosed() || waiter?.settled) return;
|
|
3346
3346
|
await this.ensureTask();
|
|
3347
|
-
|
|
3347
|
+
const input = {
|
|
3348
|
+
type: "message",
|
|
3349
|
+
content: prompt,
|
|
3350
|
+
...options.agentType ? { agentType: options.agentType } : {},
|
|
3351
|
+
...options.reasoningEffort ? { reasoningEffort: options.reasoningEffort } : {}
|
|
3352
|
+
};
|
|
3353
|
+
if (this.isClosed()) {
|
|
3354
|
+
await this.sendInput(input).catch(() => void 0);
|
|
3355
|
+
return;
|
|
3356
|
+
}
|
|
3357
|
+
if (waiter?.settled) return;
|
|
3348
3358
|
await this.ensureChannel();
|
|
3349
3359
|
if (this.isClosed() || waiter?.settled) return;
|
|
3350
3360
|
await this.captureTurnBaseline();
|
|
@@ -3355,12 +3365,7 @@ var CoreAgentTaskSession = class {
|
|
|
3355
3365
|
this.activeWaiter = waiter;
|
|
3356
3366
|
this.setStatus("streaming");
|
|
3357
3367
|
this.emit("turnStart", {});
|
|
3358
|
-
await this.sendInput(
|
|
3359
|
-
type: "message",
|
|
3360
|
-
content: prompt,
|
|
3361
|
-
...options.agentType ? { agentType: options.agentType } : {},
|
|
3362
|
-
...options.reasoningEffort ? { reasoningEffort: options.reasoningEffort } : {}
|
|
3363
|
-
});
|
|
3368
|
+
await this.sendInput(input);
|
|
3364
3369
|
}
|
|
3365
3370
|
async ensureTask() {
|
|
3366
3371
|
if (this._taskId) return;
|
package/dist/index.js
CHANGED
|
@@ -3272,7 +3272,17 @@ var CoreAgentTaskSession = class {
|
|
|
3272
3272
|
}
|
|
3273
3273
|
if (this.isClosed() || waiter?.settled) return;
|
|
3274
3274
|
await this.ensureTask();
|
|
3275
|
-
|
|
3275
|
+
const input = {
|
|
3276
|
+
type: "message",
|
|
3277
|
+
content: prompt,
|
|
3278
|
+
...options.agentType ? { agentType: options.agentType } : {},
|
|
3279
|
+
...options.reasoningEffort ? { reasoningEffort: options.reasoningEffort } : {}
|
|
3280
|
+
};
|
|
3281
|
+
if (this.isClosed()) {
|
|
3282
|
+
await this.sendInput(input).catch(() => void 0);
|
|
3283
|
+
return;
|
|
3284
|
+
}
|
|
3285
|
+
if (waiter?.settled) return;
|
|
3276
3286
|
await this.ensureChannel();
|
|
3277
3287
|
if (this.isClosed() || waiter?.settled) return;
|
|
3278
3288
|
await this.captureTurnBaseline();
|
|
@@ -3283,12 +3293,7 @@ var CoreAgentTaskSession = class {
|
|
|
3283
3293
|
this.activeWaiter = waiter;
|
|
3284
3294
|
this.setStatus("streaming");
|
|
3285
3295
|
this.emit("turnStart", {});
|
|
3286
|
-
await this.sendInput(
|
|
3287
|
-
type: "message",
|
|
3288
|
-
content: prompt,
|
|
3289
|
-
...options.agentType ? { agentType: options.agentType } : {},
|
|
3290
|
-
...options.reasoningEffort ? { reasoningEffort: options.reasoningEffort } : {}
|
|
3291
|
-
});
|
|
3296
|
+
await this.sendInput(input);
|
|
3292
3297
|
}
|
|
3293
3298
|
async ensureTask() {
|
|
3294
3299
|
if (this._taskId) return;
|