@relayfx/sdk 0.2.0 → 0.2.1
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/ai.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./index-
|
|
2
|
+
import"./index-bke4jyr6.js";
|
|
3
3
|
import {
|
|
4
4
|
AiError,
|
|
5
5
|
Chat,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
exports_tool_executor,
|
|
35
35
|
exports_tool_output,
|
|
36
36
|
exports_turn_policy
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-jy6rpstp.js";
|
|
38
38
|
|
|
39
39
|
// src/ai.ts
|
|
40
40
|
var relayAiPackage = "@relayfx/sdk/ai";
|
|
@@ -18642,13 +18642,15 @@ var runWorkflow = Effect93.fn("ExecutionWorkflow.run")(function* (input) {
|
|
|
18642
18642
|
};
|
|
18643
18643
|
}).pipe(Effect93.catch((error5) => failWorkspace(startInput, error5).pipe(Effect93.flatMap(() => notifyParent(startInput, "failed", [])), Effect93.flatMap(() => Effect93.fail(error5)))));
|
|
18644
18644
|
});
|
|
18645
|
-
var
|
|
18646
|
-
const execution = yield* repository.get(input.execution_id).pipe(Effect93.mapError(mapRepositoryError12), Effect93.tap((record2) => record2?.status === "waiting" ? Effect93.void : Effect93.yieldNow), Effect93.repeat({
|
|
18645
|
+
var awaitCanonicalSettledResult = Effect93.fn("ExecutionWorkflow.awaitCanonicalSettledResult")(function* (input, repository) {
|
|
18646
|
+
const execution = yield* repository.get(input.execution_id).pipe(Effect93.mapError(mapRepositoryError12), Effect93.tap((record2) => record2?.status === "waiting" || record2 !== undefined && terminalExecutionStatuses.has(record2.status) ? Effect93.void : Effect93.yieldNow), Effect93.repeat({
|
|
18647
|
+
until: (record2) => record2?.status === "waiting" || record2 !== undefined && terminalExecutionStatuses.has(record2.status)
|
|
18648
|
+
}));
|
|
18647
18649
|
const canonicalWaitId = execution?.metadata?.wait_id;
|
|
18648
18650
|
const waitId = typeof canonicalWaitId === "string" ? exports_ids_schema.WaitId.make(canonicalWaitId) : input.wait_id;
|
|
18649
18651
|
const result = {
|
|
18650
18652
|
execution_id: input.execution_id,
|
|
18651
|
-
status: "waiting",
|
|
18653
|
+
status: execution?.status ?? "waiting",
|
|
18652
18654
|
...waitId === undefined ? {} : { wait_id: waitId },
|
|
18653
18655
|
...execution?.metadata === undefined ? {} : { metadata: execution.metadata }
|
|
18654
18656
|
};
|
|
@@ -18658,7 +18660,9 @@ var awaitStartResult = Effect93.fn("ExecutionWorkflow.awaitStartResult")(functio
|
|
|
18658
18660
|
while (true) {
|
|
18659
18661
|
const result = yield* StartExecutionWorkflow.poll(workflowExecutionId).pipe(Effect93.tap((pollResult) => Option28.isSome(pollResult) ? Effect93.void : Effect93.yieldNow), Effect93.repeat({ until: Option28.isSome }), Effect93.map(Option28.getOrThrow));
|
|
18660
18662
|
if (result._tag === "Suspended") {
|
|
18661
|
-
const waiting = yield*
|
|
18663
|
+
const waiting = yield* awaitCanonicalSettledResult(input, repository);
|
|
18664
|
+
if (waiting.status !== "waiting")
|
|
18665
|
+
return waiting;
|
|
18662
18666
|
const wait = waiting.wait_id === undefined ? undefined : yield* get12(waiting.wait_id).pipe(Effect93.mapError(mapWaitError2));
|
|
18663
18667
|
if (wait?.mode !== "child")
|
|
18664
18668
|
return waiting;
|
|
@@ -18676,8 +18680,10 @@ var startRequest = Effect93.fn("ExecutionWorkflow.startRequest")(function* (inpu
|
|
|
18676
18680
|
if (input.wait_id === undefined) {
|
|
18677
18681
|
const repository2 = yield* exports_execution_repository.Service;
|
|
18678
18682
|
const existing = yield* repository2.get(input.execution_id).pipe(Effect93.mapError(mapRepositoryError12));
|
|
18679
|
-
if (existing === undefined)
|
|
18680
|
-
|
|
18683
|
+
if (existing === undefined) {
|
|
18684
|
+
const workflowExecutionId3 = yield* start(input, { discard: true });
|
|
18685
|
+
return yield* awaitStartResult(input, workflowExecutionId3, repository2);
|
|
18686
|
+
}
|
|
18681
18687
|
const workflowExecutionId2 = yield* activeWorkflowExecutionIdForExecution(input.execution_id);
|
|
18682
18688
|
const existingWaitId = existing.metadata?.wait_id;
|
|
18683
18689
|
const waitId = typeof existingWaitId === "string" ? exports_ids_schema.WaitId.make(existingWaitId) : undefined;
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
exports_language_model_registration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-bke4jyr6.js";
|
|
5
5
|
import {
|
|
6
6
|
Service,
|
|
7
7
|
exports_client,
|
|
8
8
|
exports_command,
|
|
9
9
|
exports_operation
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-9tx9fh58.js";
|
|
11
11
|
import {
|
|
12
12
|
Dialect,
|
|
13
13
|
__export,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
fromDbTimestamp,
|
|
60
60
|
fromNullableDbTimestamp,
|
|
61
61
|
timestampParam
|
|
62
|
-
} from "./index-
|
|
62
|
+
} from "./index-jy6rpstp.js";
|
|
63
63
|
|
|
64
64
|
// src/adapter-outbox.ts
|
|
65
65
|
var exports_adapter_outbox = {};
|
package/dist/sqlite.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
exports_client,
|
|
4
4
|
exports_operation
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-9tx9fh58.js";
|
|
6
6
|
import {
|
|
7
7
|
__export,
|
|
8
8
|
exports_activity_version_registry,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
exports_wait_service,
|
|
47
47
|
exports_workflow_definition_repository,
|
|
48
48
|
exports_workflow_schema
|
|
49
|
-
} from "./index-
|
|
49
|
+
} from "./index-jy6rpstp.js";
|
|
50
50
|
// src/sqlite-runtime.ts
|
|
51
51
|
var exports_sqlite_runtime = {};
|
|
52
52
|
__export(exports_sqlite_runtime, {
|
package/package.json
CHANGED