@deepagents/experimental 7.6.0 → 7.7.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/index.js +9 -8
- package/dist/index.js.map +2 -2
- package/dist/zukhruf/agent.d.ts +6 -2
- package/dist/zukhruf/agent.d.ts.map +1 -1
- package/dist/zukhruf/index.js +9 -8
- package/dist/zukhruf/index.js.map +2 -2
- package/dist/zukhruf/plugins/conversation-scheduling/index.js +1 -1
- package/dist/zukhruf/plugins/conversation-scheduling/index.js.map +2 -2
- package/dist/zukhruf/plugins/http/index.d.ts.map +1 -1
- package/dist/zukhruf/plugins/http/index.js +11 -13
- package/dist/zukhruf/plugins/http/index.js.map +2 -2
- package/dist/zukhruf/plugins/schedules/http.js +1 -0
- package/dist/zukhruf/plugins/schedules/http.js.map +2 -2
- package/dist/zukhruf/plugins/schedules/index.js +1 -1
- package/dist/zukhruf/plugins/schedules/index.js.map +2 -2
- package/dist/zukhruf/plugins/uploads/http.js +1 -0
- package/dist/zukhruf/plugins/uploads/http.js.map +2 -2
- package/dist/zukhruf/runtime/agent-turn-executor.d.ts.map +1 -1
- package/dist/zukhruf/runtime/conversation-status/projector.d.ts.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -3663,7 +3663,7 @@ var ConversationSandboxes = class {
|
|
|
3663
3663
|
};
|
|
3664
3664
|
|
|
3665
3665
|
// packages/experimental/src/zukhruf/runtime/conversation-status/projector.ts
|
|
3666
|
-
import { Latch } from "@zukhruf/async";
|
|
3666
|
+
import { Future, Latch } from "@zukhruf/async";
|
|
3667
3667
|
import { Mutex } from "@zukhruf/mutex";
|
|
3668
3668
|
import { MemoryStore } from "@zukhruf/mutex/memory";
|
|
3669
3669
|
import { EventEmitter, on } from "node:events";
|
|
@@ -3706,8 +3706,8 @@ var Detached = class {
|
|
|
3706
3706
|
var DETACHED = new Detached();
|
|
3707
3707
|
var RemoteAttachment = class {
|
|
3708
3708
|
abort = new AbortController();
|
|
3709
|
-
/**
|
|
3710
|
-
connected = new
|
|
3709
|
+
/** Resolves when the source subscribes; rejects with the error that stopped it. */
|
|
3710
|
+
connected = new Future();
|
|
3711
3711
|
/** Opens when the consume loop has stopped. */
|
|
3712
3712
|
ended = new Latch();
|
|
3713
3713
|
};
|
|
@@ -3891,10 +3891,11 @@ var ConversationStatusProjector = class _ConversationStatusProjector {
|
|
|
3891
3891
|
this.#remote = remote;
|
|
3892
3892
|
void this.#consumeRemote(source, remote);
|
|
3893
3893
|
}
|
|
3894
|
-
|
|
3895
|
-
|
|
3894
|
+
try {
|
|
3895
|
+
await remote.connected.wait();
|
|
3896
|
+
} catch (error) {
|
|
3896
3897
|
await this.#detachRemote();
|
|
3897
|
-
throw
|
|
3898
|
+
throw error;
|
|
3898
3899
|
}
|
|
3899
3900
|
}
|
|
3900
3901
|
async #detachRemote() {
|
|
@@ -3910,7 +3911,7 @@ var ConversationStatusProjector = class _ConversationStatusProjector {
|
|
|
3910
3911
|
try {
|
|
3911
3912
|
const events = await source.subscribe(remote.abort.signal);
|
|
3912
3913
|
connected = true;
|
|
3913
|
-
remote.connected.
|
|
3914
|
+
remote.connected.resolve();
|
|
3914
3915
|
for await (const event of events) {
|
|
3915
3916
|
if (event.type === "reset") {
|
|
3916
3917
|
this.#emit(event);
|
|
@@ -3925,7 +3926,7 @@ var ConversationStatusProjector = class _ConversationStatusProjector {
|
|
|
3925
3926
|
});
|
|
3926
3927
|
}
|
|
3927
3928
|
} catch (error) {
|
|
3928
|
-
if (!connected) remote.connected.
|
|
3929
|
+
if (!connected) remote.connected.reject(error);
|
|
3929
3930
|
if (connected && !(Error.isError(error) && error.name === "AbortError")) {
|
|
3930
3931
|
this.#emit({ type: "error", error });
|
|
3931
3932
|
}
|