@relayfx/sdk 0.0.42 → 0.0.44
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 +467 -273
- package/dist/index.js +596 -402
- package/dist/types/store-sql/session/session-repository.d.ts +77 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -5058,6 +5058,38 @@ var payloadFromInput = (input) => {
|
|
|
5058
5058
|
message: input.message,
|
|
5059
5059
|
...input.metadata === undefined ? {} : { metadata: input.metadata }
|
|
5060
5060
|
};
|
|
5061
|
+
case "ToolCall":
|
|
5062
|
+
return {
|
|
5063
|
+
part: input.part,
|
|
5064
|
+
...input.metadata === undefined ? {} : { metadata: input.metadata }
|
|
5065
|
+
};
|
|
5066
|
+
case "ToolResult":
|
|
5067
|
+
return {
|
|
5068
|
+
part: input.part,
|
|
5069
|
+
...input.metadata === undefined ? {} : { metadata: input.metadata }
|
|
5070
|
+
};
|
|
5071
|
+
case "Memory":
|
|
5072
|
+
return {
|
|
5073
|
+
items: input.items,
|
|
5074
|
+
...input.metadata === undefined ? {} : { metadata: input.metadata }
|
|
5075
|
+
};
|
|
5076
|
+
case "Skill":
|
|
5077
|
+
return {
|
|
5078
|
+
name: input.name,
|
|
5079
|
+
body: input.body,
|
|
5080
|
+
...input.metadata === undefined ? {} : { metadata: input.metadata }
|
|
5081
|
+
};
|
|
5082
|
+
case "Steering":
|
|
5083
|
+
return {
|
|
5084
|
+
message: input.message,
|
|
5085
|
+
...input.metadata === undefined ? {} : { metadata: input.metadata }
|
|
5086
|
+
};
|
|
5087
|
+
case "Handoff":
|
|
5088
|
+
return {
|
|
5089
|
+
target: input.target,
|
|
5090
|
+
summary: input.summary,
|
|
5091
|
+
...input.metadata === undefined ? {} : { metadata: input.metadata }
|
|
5092
|
+
};
|
|
5061
5093
|
case "Compaction":
|
|
5062
5094
|
return {
|
|
5063
5095
|
summary: input.summary,
|
|
@@ -5087,6 +5119,44 @@ var toEntryRecord = (row) => {
|
|
|
5087
5119
|
_tag: "Message",
|
|
5088
5120
|
message: payload.message
|
|
5089
5121
|
});
|
|
5122
|
+
case "ToolCall":
|
|
5123
|
+
return Effect18.succeed({
|
|
5124
|
+
...base,
|
|
5125
|
+
_tag: "ToolCall",
|
|
5126
|
+
part: payload.part
|
|
5127
|
+
});
|
|
5128
|
+
case "ToolResult":
|
|
5129
|
+
return Effect18.succeed({
|
|
5130
|
+
...base,
|
|
5131
|
+
_tag: "ToolResult",
|
|
5132
|
+
part: payload.part
|
|
5133
|
+
});
|
|
5134
|
+
case "Memory":
|
|
5135
|
+
return Effect18.succeed({
|
|
5136
|
+
...base,
|
|
5137
|
+
_tag: "Memory",
|
|
5138
|
+
items: Array.isArray(payload.items) ? payload.items.map(String) : []
|
|
5139
|
+
});
|
|
5140
|
+
case "Skill":
|
|
5141
|
+
return Effect18.succeed({
|
|
5142
|
+
...base,
|
|
5143
|
+
_tag: "Skill",
|
|
5144
|
+
name: String(payload.name ?? ""),
|
|
5145
|
+
body: String(payload.body ?? "")
|
|
5146
|
+
});
|
|
5147
|
+
case "Steering":
|
|
5148
|
+
return Effect18.succeed({
|
|
5149
|
+
...base,
|
|
5150
|
+
_tag: "Steering",
|
|
5151
|
+
message: payload.message
|
|
5152
|
+
});
|
|
5153
|
+
case "Handoff":
|
|
5154
|
+
return Effect18.succeed({
|
|
5155
|
+
...base,
|
|
5156
|
+
_tag: "Handoff",
|
|
5157
|
+
target: String(payload.target ?? ""),
|
|
5158
|
+
summary: String(payload.summary ?? "")
|
|
5159
|
+
});
|
|
5090
5160
|
case "Compaction":
|
|
5091
5161
|
return Effect18.succeed({
|
|
5092
5162
|
...base,
|
|
@@ -5134,6 +5204,18 @@ var appendToRecord = (input) => {
|
|
|
5134
5204
|
switch (input.input._tag) {
|
|
5135
5205
|
case "Message":
|
|
5136
5206
|
return { ...base, _tag: "Message", message: input.input.message };
|
|
5207
|
+
case "ToolCall":
|
|
5208
|
+
return { ...base, _tag: "ToolCall", part: input.input.part };
|
|
5209
|
+
case "ToolResult":
|
|
5210
|
+
return { ...base, _tag: "ToolResult", part: input.input.part };
|
|
5211
|
+
case "Memory":
|
|
5212
|
+
return { ...base, _tag: "Memory", items: input.input.items };
|
|
5213
|
+
case "Skill":
|
|
5214
|
+
return { ...base, _tag: "Skill", name: input.input.name, body: input.input.body };
|
|
5215
|
+
case "Steering":
|
|
5216
|
+
return { ...base, _tag: "Steering", message: input.input.message };
|
|
5217
|
+
case "Handoff":
|
|
5218
|
+
return { ...base, _tag: "Handoff", target: input.input.target, summary: input.input.summary };
|
|
5137
5219
|
case "Compaction":
|
|
5138
5220
|
return {
|
|
5139
5221
|
...base,
|
|
@@ -8371,7 +8453,7 @@ __export(exports_agent_loop_service, {
|
|
|
8371
8453
|
AgentLoopBudgetExceeded: () => AgentLoopBudgetExceeded
|
|
8372
8454
|
});
|
|
8373
8455
|
|
|
8374
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8456
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/agent.ts
|
|
8375
8457
|
var exports_agent = {};
|
|
8376
8458
|
__export(exports_agent, {
|
|
8377
8459
|
streamObject: () => streamObject,
|
|
@@ -8381,10 +8463,10 @@ __export(exports_agent, {
|
|
|
8381
8463
|
generate: () => generate,
|
|
8382
8464
|
defaultObjectPrompt: () => defaultObjectPrompt
|
|
8383
8465
|
});
|
|
8384
|
-
import { Cause as Cause3, Effect as Effect45, Fiber, Option as Option15, Queue as Queue2, Ref as Ref10, Schema as
|
|
8466
|
+
import { Cause as Cause3, Effect as Effect45, Fiber, Option as Option15, Queue as Queue2, Ref as Ref10, Schema as Schema47, Stream as Stream7 } from "effect";
|
|
8385
8467
|
import { Chat, LanguageModel as LanguageModel3, Prompt as Prompt4, Response as Response3, Telemetry, Tokenizer as Tokenizer2, Tool as Tool4, Toolkit as Toolkit3 } from "effect/unstable/ai";
|
|
8386
8468
|
|
|
8387
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8469
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/agent-event.ts
|
|
8388
8470
|
var exports_agent_event = {};
|
|
8389
8471
|
__export(exports_agent_event, {
|
|
8390
8472
|
addUsage: () => addUsage,
|
|
@@ -8441,7 +8523,7 @@ class AgentSuspended extends Schema38.TaggedErrorClass()("@batonfx/core/AgentSus
|
|
|
8441
8523
|
}) {
|
|
8442
8524
|
}
|
|
8443
8525
|
|
|
8444
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8526
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/approvals.ts
|
|
8445
8527
|
var exports_approvals = {};
|
|
8446
8528
|
__export(exports_approvals, {
|
|
8447
8529
|
testLayer: () => testLayer26,
|
|
@@ -8457,7 +8539,7 @@ var autoApprove = Layer29.succeed(Approvals, Approvals.of({ check: () => Effect3
|
|
|
8457
8539
|
var denyAll = Layer29.succeed(Approvals, Approvals.of({ check: () => Effect31.succeed({ _tag: "Denied" }) }));
|
|
8458
8540
|
var testLayer26 = (implementation) => Layer29.succeed(Approvals, Approvals.of(implementation));
|
|
8459
8541
|
|
|
8460
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8542
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/compaction.ts
|
|
8461
8543
|
var exports_compaction = {};
|
|
8462
8544
|
__export(exports_compaction, {
|
|
8463
8545
|
truncate: () => truncate,
|
|
@@ -8475,7 +8557,7 @@ __export(exports_compaction, {
|
|
|
8475
8557
|
import { Context as Context32, Effect as Effect34, Layer as Layer32, Option as Option10, Schema as Schema41 } from "effect";
|
|
8476
8558
|
import { LanguageModel, Prompt as Prompt3, Tokenizer, Toolkit as Toolkit2 } from "effect/unstable/ai";
|
|
8477
8559
|
|
|
8478
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8560
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/session.ts
|
|
8479
8561
|
var exports_session = {};
|
|
8480
8562
|
__export(exports_session, {
|
|
8481
8563
|
testLayer: () => testLayer27,
|
|
@@ -8515,6 +8597,18 @@ var entryFromInput = (input, id2, parentId) => {
|
|
|
8515
8597
|
switch (input._tag) {
|
|
8516
8598
|
case "Message":
|
|
8517
8599
|
return { ...base, _tag: "Message", message: input.message };
|
|
8600
|
+
case "ToolCall":
|
|
8601
|
+
return { ...base, _tag: "ToolCall", part: input.part };
|
|
8602
|
+
case "ToolResult":
|
|
8603
|
+
return { ...base, _tag: "ToolResult", part: input.part };
|
|
8604
|
+
case "Memory":
|
|
8605
|
+
return { ...base, _tag: "Memory", items: input.items };
|
|
8606
|
+
case "Skill":
|
|
8607
|
+
return { ...base, _tag: "Skill", name: input.name, body: input.body };
|
|
8608
|
+
case "Steering":
|
|
8609
|
+
return { ...base, _tag: "Steering", message: input.message };
|
|
8610
|
+
case "Handoff":
|
|
8611
|
+
return { ...base, _tag: "Handoff", target: input.target, summary: input.summary };
|
|
8518
8612
|
case "Compaction":
|
|
8519
8613
|
return { ...base, _tag: "Compaction", summary: input.summary, firstKeptEntryId: input.firstKeptEntryId };
|
|
8520
8614
|
case "BranchSummary":
|
|
@@ -8577,6 +8671,17 @@ ${summary}
|
|
|
8577
8671
|
var branchSummaryMessage = (summary) => messageFromText("system", `<abandoned-branch-summary>
|
|
8578
8672
|
${summary}
|
|
8579
8673
|
</abandoned-branch-summary>`);
|
|
8674
|
+
var attributeValue = (value) => value.replaceAll("&", "&").replaceAll('"', """);
|
|
8675
|
+
var memoryMessage = (items) => messageFromText("system", `<memory>
|
|
8676
|
+
${items.join(`
|
|
8677
|
+
`)}
|
|
8678
|
+
</memory>`);
|
|
8679
|
+
var skillMessage = (entry) => messageFromText("system", `<skill name="${attributeValue(entry.name)}">
|
|
8680
|
+
${entry.body}
|
|
8681
|
+
</skill>`);
|
|
8682
|
+
var handoffMessage = (entry) => messageFromText("system", `<handoff target="${attributeValue(entry.target)}">
|
|
8683
|
+
${entry.summary}
|
|
8684
|
+
</handoff>`);
|
|
8580
8685
|
var projectedMessages = (path2) => {
|
|
8581
8686
|
const compactionIndex = path2.findLastIndex((entry) => entry._tag === "Compaction");
|
|
8582
8687
|
const messages = [];
|
|
@@ -8589,6 +8694,24 @@ var projectedMessages = (path2) => {
|
|
|
8589
8694
|
case "Message":
|
|
8590
8695
|
messages.push(entry.message);
|
|
8591
8696
|
break;
|
|
8697
|
+
case "ToolCall":
|
|
8698
|
+
messages.push(Prompt2.makeMessage("assistant", { content: [entry.part] }));
|
|
8699
|
+
break;
|
|
8700
|
+
case "ToolResult":
|
|
8701
|
+
messages.push(Prompt2.makeMessage("tool", { content: [entry.part] }));
|
|
8702
|
+
break;
|
|
8703
|
+
case "Memory":
|
|
8704
|
+
messages.push(memoryMessage(entry.items));
|
|
8705
|
+
break;
|
|
8706
|
+
case "Skill":
|
|
8707
|
+
messages.push(skillMessage(entry));
|
|
8708
|
+
break;
|
|
8709
|
+
case "Steering":
|
|
8710
|
+
messages.push(entry.message);
|
|
8711
|
+
break;
|
|
8712
|
+
case "Handoff":
|
|
8713
|
+
messages.push(handoffMessage(entry));
|
|
8714
|
+
break;
|
|
8592
8715
|
case "BranchSummary":
|
|
8593
8716
|
messages.push(branchSummaryMessage(entry.summary));
|
|
8594
8717
|
break;
|
|
@@ -8607,7 +8730,7 @@ var memoryLayer24 = Layer30.effect(SessionStore, Ref7.make(initialState).pipe(Ef
|
|
|
8607
8730
|
}))));
|
|
8608
8731
|
var testLayer27 = (implementation) => Layer30.succeed(SessionStore, SessionStore.of(implementation));
|
|
8609
8732
|
|
|
8610
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8733
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/tool-output.ts
|
|
8611
8734
|
var exports_tool_output = {};
|
|
8612
8735
|
__export(exports_tool_output, {
|
|
8613
8736
|
testLayer: () => testLayer28,
|
|
@@ -8667,7 +8790,7 @@ var bound = (result, options) => Effect33.gen(function* () {
|
|
|
8667
8790
|
return { _tag: "Success", result: output, encodedResult: output };
|
|
8668
8791
|
});
|
|
8669
8792
|
|
|
8670
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8793
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/compaction.ts
|
|
8671
8794
|
var DEFAULT_RESERVE_TOKENS = 16384;
|
|
8672
8795
|
var DEFAULT_KEEP_RECENT_TOKENS = 20000;
|
|
8673
8796
|
var SUMMARY_TEMPLATE = `Summarize the conversation so another agent can continue seamlessly.
|
|
@@ -8850,7 +8973,7 @@ var truncate = (maxTokens) => ({
|
|
|
8850
8973
|
var testLayer29 = (implementation) => Layer32.succeed(Compaction, Compaction.of(implementation));
|
|
8851
8974
|
var isContextOverflow = (error) => /context|token|prompt/i.test(error instanceof Error ? `${error.name}: ${error.message}` : String(error)) && /overflow|exceed|exceeded|maximum|too large|too long|length/i.test(error instanceof Error ? `${error.name}: ${error.message}` : String(error));
|
|
8852
8975
|
|
|
8853
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8976
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/instructions.ts
|
|
8854
8977
|
var exports_instructions = {};
|
|
8855
8978
|
__export(exports_instructions, {
|
|
8856
8979
|
testLayer: () => testLayer30,
|
|
@@ -8899,7 +9022,7 @@ var renderUpdate = (epoch, context) => Effect35.gen(function* () {
|
|
|
8899
9022
|
var layer27 = (sources) => Layer33.succeed(Instructions, Instructions.of({ sources: [...sources] }));
|
|
8900
9023
|
var testLayer30 = (implementation) => Layer33.succeed(Instructions, Instructions.of(implementation));
|
|
8901
9024
|
|
|
8902
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9025
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/memory.ts
|
|
8903
9026
|
var exports_memory = {};
|
|
8904
9027
|
__export(exports_memory, {
|
|
8905
9028
|
testLayer: () => testLayer31,
|
|
@@ -8928,7 +9051,7 @@ var merge = (first, second) => ({
|
|
|
8928
9051
|
var noopLayer = Layer34.succeed(Memory, Memory.of(noop));
|
|
8929
9052
|
var testLayer31 = (implementation) => Layer34.succeed(Memory, Memory.of(implementation));
|
|
8930
9053
|
|
|
8931
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9054
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/model-middleware.ts
|
|
8932
9055
|
var exports_model_middleware = {};
|
|
8933
9056
|
__export(exports_model_middleware, {
|
|
8934
9057
|
layer: () => layer28,
|
|
@@ -8942,7 +9065,7 @@ class ModelMiddleware extends Context35.Service()("@batonfx/core/ModelMiddleware
|
|
|
8942
9065
|
var identityLayer = Layer35.succeed(ModelMiddleware, []);
|
|
8943
9066
|
var layer28 = (middleware) => Layer35.succeed(ModelMiddleware, middleware);
|
|
8944
9067
|
|
|
8945
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9068
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/model-resilience.ts
|
|
8946
9069
|
var exports_model_resilience = {};
|
|
8947
9070
|
__export(exports_model_resilience, {
|
|
8948
9071
|
testLayer: () => testLayer32,
|
|
@@ -8988,7 +9111,7 @@ var apply = (model, resilience) => ({
|
|
|
8988
9111
|
}).pipe(Stream5.retry(retryStreamSchedule(resilience)))
|
|
8989
9112
|
});
|
|
8990
9113
|
|
|
8991
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9114
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/permissions.ts
|
|
8992
9115
|
var exports_permissions = {};
|
|
8993
9116
|
__export(exports_permissions, {
|
|
8994
9117
|
testLayer: () => testLayer33,
|
|
@@ -9118,7 +9241,7 @@ var ruleStoreMemory = (initialRules = []) => Layer37.effect(RuleStore, Ref9.make
|
|
|
9118
9241
|
var ruleStoreTestLayer = (implementation) => Layer37.succeed(RuleStore, RuleStore.of(implementation));
|
|
9119
9242
|
var testLayer33 = (implementation) => Layer37.succeed(Permissions, Permissions.of(implementation));
|
|
9120
9243
|
|
|
9121
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9244
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/skill-source.ts
|
|
9122
9245
|
var exports_skill_source = {};
|
|
9123
9246
|
__export(exports_skill_source, {
|
|
9124
9247
|
testLayer: () => testLayer34,
|
|
@@ -9176,37 +9299,64 @@ var selectListings = (skills, budgetTokens, recentlyUsed) => {
|
|
|
9176
9299
|
return selected;
|
|
9177
9300
|
};
|
|
9178
9301
|
|
|
9179
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9302
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/steering.ts
|
|
9180
9303
|
var exports_steering = {};
|
|
9181
9304
|
__export(exports_steering, {
|
|
9182
9305
|
testLayer: () => testLayer35,
|
|
9183
9306
|
layer: () => layer30,
|
|
9307
|
+
SteeringQueueFull: () => SteeringQueueFull,
|
|
9184
9308
|
Steering: () => Steering
|
|
9185
9309
|
});
|
|
9186
|
-
import { Context as Context39, Effect as Effect41, Exit, Layer as Layer39, Queue } from "effect";
|
|
9310
|
+
import { Context as Context39, Effect as Effect41, Exit, Layer as Layer39, Queue, Schema as Schema45 } from "effect";
|
|
9187
9311
|
|
|
9188
9312
|
class Steering extends Context39.Service()("@batonfx/core/Steering") {
|
|
9189
9313
|
}
|
|
9314
|
+
|
|
9315
|
+
class SteeringQueueFull extends Schema45.TaggedErrorClass()("@batonfx/core/SteeringQueueFull", {
|
|
9316
|
+
queue: Schema45.Literals(["steering", "followUp"]),
|
|
9317
|
+
capacity: Schema45.Number
|
|
9318
|
+
}) {
|
|
9319
|
+
}
|
|
9320
|
+
var resolvePolicy = (policy, mode) => ({
|
|
9321
|
+
mode: policy?.mode ?? mode,
|
|
9322
|
+
...policy?.capacity === undefined ? {} : { capacity: policy.capacity },
|
|
9323
|
+
onFull: policy?.onFull ?? "fail"
|
|
9324
|
+
});
|
|
9325
|
+
var queueStrategy = (strategy) => {
|
|
9326
|
+
switch (strategy) {
|
|
9327
|
+
case "drop-oldest":
|
|
9328
|
+
return "sliding";
|
|
9329
|
+
case "drop-newest":
|
|
9330
|
+
case "fail":
|
|
9331
|
+
return "dropping";
|
|
9332
|
+
case "suspend":
|
|
9333
|
+
return "suspend";
|
|
9334
|
+
}
|
|
9335
|
+
};
|
|
9336
|
+
var makeQueue = (name, policy) => (policy.capacity === undefined ? Queue.unbounded() : Queue.make({ capacity: policy.capacity, strategy: queueStrategy(policy.onFull) })).pipe(Effect41.map((queue) => ({ name, queue, policy })));
|
|
9337
|
+
var offer = (runtime, message) => Queue.offer(runtime.queue, message).pipe(Effect41.flatMap((offered) => {
|
|
9338
|
+
if (offered || runtime.policy.capacity === undefined || runtime.policy.onFull !== "fail")
|
|
9339
|
+
return Effect41.void;
|
|
9340
|
+
return Effect41.fail(new SteeringQueueFull({ queue: runtime.name, capacity: runtime.policy.capacity }));
|
|
9341
|
+
}));
|
|
9190
9342
|
var drainOne = (queue) => Effect41.sync(() => {
|
|
9191
9343
|
const taken = Queue.takeUnsafe(queue);
|
|
9192
9344
|
return taken === undefined || !Exit.isSuccess(taken) ? [] : [taken.value];
|
|
9193
9345
|
});
|
|
9194
9346
|
var drain = (queue, mode) => mode === "all" ? Queue.clear(queue) : drainOne(queue);
|
|
9195
9347
|
var layer30 = (options = {}) => Layer39.effect(Steering, Effect41.gen(function* () {
|
|
9196
|
-
const steeringQueue = yield*
|
|
9197
|
-
const followUpQueue = yield*
|
|
9198
|
-
const steeringMode = options.steeringMode ?? "all";
|
|
9199
|
-
const followUpMode = options.followUpMode ?? "one-at-a-time";
|
|
9348
|
+
const steeringQueue = yield* makeQueue("steering", resolvePolicy(options.steering, "all"));
|
|
9349
|
+
const followUpQueue = yield* makeQueue("followUp", resolvePolicy(options.followUp, "one-at-a-time"));
|
|
9200
9350
|
return Steering.of({
|
|
9201
|
-
steer: (message) =>
|
|
9202
|
-
followUp: (message) =>
|
|
9203
|
-
takeSteering: () => drain(steeringQueue,
|
|
9204
|
-
takeFollowUp: () => drain(followUpQueue,
|
|
9351
|
+
steer: (message) => offer(steeringQueue, message),
|
|
9352
|
+
followUp: (message) => offer(followUpQueue, message),
|
|
9353
|
+
takeSteering: () => drain(steeringQueue.queue, steeringQueue.policy.mode),
|
|
9354
|
+
takeFollowUp: () => drain(followUpQueue.queue, followUpQueue.policy.mode)
|
|
9205
9355
|
});
|
|
9206
9356
|
}));
|
|
9207
9357
|
var testLayer35 = (implementation) => Layer39.succeed(Steering, Steering.of(implementation));
|
|
9208
9358
|
|
|
9209
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9359
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/tool-context.ts
|
|
9210
9360
|
var exports_tool_context = {};
|
|
9211
9361
|
__export(exports_tool_context, {
|
|
9212
9362
|
testLayer: () => testLayer36,
|
|
@@ -9224,7 +9374,7 @@ var layerDefault = Layer40.sync(ToolContext, () => ToolContext.of({
|
|
|
9224
9374
|
}));
|
|
9225
9375
|
var testLayer36 = (implementation) => Layer40.succeed(ToolContext, ToolContext.of(implementation));
|
|
9226
9376
|
|
|
9227
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9377
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/tool-executor.ts
|
|
9228
9378
|
var exports_tool_executor = {};
|
|
9229
9379
|
__export(exports_tool_executor, {
|
|
9230
9380
|
testLayer: () => testLayer37,
|
|
@@ -9239,7 +9389,7 @@ __export(exports_tool_executor, {
|
|
|
9239
9389
|
client: () => client,
|
|
9240
9390
|
ToolExecutor: () => ToolExecutor
|
|
9241
9391
|
});
|
|
9242
|
-
import { Cause as Cause2, Context as Context41, Effect as Effect43, Layer as Layer41, Option as Option14, Schema as
|
|
9392
|
+
import { Cause as Cause2, Context as Context41, Effect as Effect43, Layer as Layer41, Option as Option14, Schema as Schema46, Sink as Sink2, Stream as Stream6 } from "effect";
|
|
9243
9393
|
class ToolExecutor extends Context41.Service()("@batonfx/core/ToolExecutor") {
|
|
9244
9394
|
}
|
|
9245
9395
|
var failureMessage = (cause) => {
|
|
@@ -9262,10 +9412,10 @@ var resultMessage = (result) => {
|
|
|
9262
9412
|
var schemaMessage = (error) => error instanceof Error ? error.message : typeof error === "string" ? error : resultMessage(error);
|
|
9263
9413
|
var decodeSuccess = (tool2, result) => {
|
|
9264
9414
|
const successSchema = tool2.successSchema;
|
|
9265
|
-
if (!
|
|
9415
|
+
if (!Schema46.isSchema(successSchema)) {
|
|
9266
9416
|
return Effect43.succeed({ _tag: "Success", result, encodedResult: result });
|
|
9267
9417
|
}
|
|
9268
|
-
return
|
|
9418
|
+
return Schema46.decodeUnknownEffect(successSchema)(result).pipe(Effect43.flatMap((decoded) => Schema46.encodeUnknownEffect(successSchema)(decoded).pipe(Effect43.map((encoded) => ({ _tag: "Success", result: decoded, encodedResult: encoded })))), Effect43.catchCause((cause) => Effect43.succeed(failureOutcome(`invalid client result: ${schemaMessage(Cause2.squash(cause))}`))));
|
|
9269
9419
|
};
|
|
9270
9420
|
var placementOutcome = (placement, tool2, response) => {
|
|
9271
9421
|
switch (response._tag) {
|
|
@@ -9350,7 +9500,7 @@ function router(routes) {
|
|
|
9350
9500
|
}
|
|
9351
9501
|
var testLayer37 = (implementation) => Layer41.succeed(ToolExecutor, ToolExecutor.of(implementation));
|
|
9352
9502
|
|
|
9353
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9503
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/turn-policy.ts
|
|
9354
9504
|
var exports_turn_policy = {};
|
|
9355
9505
|
__export(exports_turn_policy, {
|
|
9356
9506
|
untilToolCall: () => untilToolCall,
|
|
@@ -9389,7 +9539,7 @@ var both = (first, second) => make4((info) => Effect44.gen(function* () {
|
|
|
9389
9539
|
}));
|
|
9390
9540
|
var defaultPolicy = recurs(8);
|
|
9391
9541
|
|
|
9392
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9542
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/agent.ts
|
|
9393
9543
|
function make5(nameOrOptions, options = {}) {
|
|
9394
9544
|
const resolved = typeof nameOrOptions === "string" ? { ...options, name: nameOrOptions } : nameOrOptions;
|
|
9395
9545
|
return {
|
|
@@ -9400,16 +9550,22 @@ function make5(nameOrOptions, options = {}) {
|
|
|
9400
9550
|
};
|
|
9401
9551
|
}
|
|
9402
9552
|
var defaultObjectPrompt = "Return the final structured output for the task above.";
|
|
9553
|
+
var steeringDrainedEvent = (turn, queue, messages) => ({
|
|
9554
|
+
_tag: "SteeringDrained",
|
|
9555
|
+
turn,
|
|
9556
|
+
queue,
|
|
9557
|
+
count: messages.length
|
|
9558
|
+
});
|
|
9403
9559
|
var skillListingBudgetTokens = 2048;
|
|
9404
9560
|
var activateSkillToolName = "activate_skill";
|
|
9405
|
-
var activateSkillParameters =
|
|
9561
|
+
var activateSkillParameters = Schema47.Struct({ name: Schema47.String });
|
|
9406
9562
|
var activateSkillTool = Tool4.make(activateSkillToolName, {
|
|
9407
9563
|
description: "Load the full body for one listed Baton skill by name before applying that skill.",
|
|
9408
9564
|
parameters: activateSkillParameters,
|
|
9409
|
-
success:
|
|
9410
|
-
name:
|
|
9411
|
-
body:
|
|
9412
|
-
allowedTools:
|
|
9565
|
+
success: Schema47.Struct({
|
|
9566
|
+
name: Schema47.String,
|
|
9567
|
+
body: Schema47.String,
|
|
9568
|
+
allowedTools: Schema47.Array(Schema47.String)
|
|
9413
9569
|
})
|
|
9414
9570
|
});
|
|
9415
9571
|
var errorMessage = (error) => error instanceof Error ? `${error.name}: ${error.message}` : String(error);
|
|
@@ -9584,9 +9740,9 @@ var streamInternal = (agent, options, structured) => Stream7.unwrap(Effect45.gen
|
|
|
9584
9740
|
}
|
|
9585
9741
|
userParts.push(part);
|
|
9586
9742
|
}
|
|
9587
|
-
const
|
|
9743
|
+
const memoryMessage2 = Prompt4.makeMessage("user", { content: userParts });
|
|
9588
9744
|
const [first, ...rest] = prompt.content;
|
|
9589
|
-
return first?.role === "system" ? Prompt4.fromMessages([first,
|
|
9745
|
+
return first?.role === "system" ? Prompt4.fromMessages([first, memoryMessage2, ...rest]) : Prompt4.fromMessages([memoryMessage2, ...prompt.content]);
|
|
9590
9746
|
});
|
|
9591
9747
|
const recallInitialPrompt = (prompt) => memoryRuntime === undefined ? Effect45.succeed(prompt) : memoryRuntime.service.recall({ key: memoryRuntime.key, turn: 0, prompt }).pipe(Effect45.mapError((error) => memoryError(0, error)), Effect45.flatMap((items) => insertRecalledItems(0, prompt, items)));
|
|
9592
9748
|
const rememberTurn = (turn, transcript, terminal) => memoryRuntime === undefined ? Effect45.void : memoryRuntime.service.remember({ key: memoryRuntime.key, turn, transcript, terminal }).pipe(Effect45.mapError((error) => memoryError(turn, error)));
|
|
@@ -9712,7 +9868,7 @@ var streamInternal = (agent, options, structured) => Stream7.unwrap(Effect45.gen
|
|
|
9712
9868
|
const activateSkillOutcome = (turn, call) => Effect45.gen(function* () {
|
|
9713
9869
|
if (skillRuntime === undefined)
|
|
9714
9870
|
return { _tag: "Failure", message: "SkillSource is not available" };
|
|
9715
|
-
const params =
|
|
9871
|
+
const params = Schema47.decodeUnknownOption(activateSkillParameters)(call.params);
|
|
9716
9872
|
if (Option15.isNone(params))
|
|
9717
9873
|
return { _tag: "Failure", message: "Skill activation requires a name" };
|
|
9718
9874
|
const skill = yield* skillRuntime.source.get(params.value.name).pipe(Effect45.mapError((error) => skillError(turn, error)));
|
|
@@ -9951,7 +10107,7 @@ var streamInternal = (agent, options, structured) => Stream7.unwrap(Effect45.gen
|
|
|
9951
10107
|
const followUp = yield* takeFollowUp();
|
|
9952
10108
|
if (followUp.length > 0) {
|
|
9953
10109
|
return {
|
|
9954
|
-
events: Stream7.fromIterable([completed]),
|
|
10110
|
+
events: Stream7.fromIterable([completed, steeringDrainedEvent(turn, "followUp", followUp)]),
|
|
9955
10111
|
next: { prompt: promptFromSteeringMessages(followUp) }
|
|
9956
10112
|
};
|
|
9957
10113
|
}
|
|
@@ -9987,7 +10143,7 @@ var streamInternal = (agent, options, structured) => Stream7.unwrap(Effect45.gen
|
|
|
9987
10143
|
const basePrompt = steering.length === 0 ? toolPrompt : Prompt4.concat(promptFromSteeringMessages(steering), toolPrompt);
|
|
9988
10144
|
const prompt = decision2.overrides?.instructions === undefined ? basePrompt : withSystem(decision2.overrides.instructions, basePrompt);
|
|
9989
10145
|
return {
|
|
9990
|
-
events: Stream7.fromIterable([completed]),
|
|
10146
|
+
events: Stream7.fromIterable(steering.length === 0 ? [completed] : [completed, steeringDrainedEvent(turn, "steering", steering)]),
|
|
9991
10147
|
next: { prompt, ...decision2.overrides === undefined ? {} : { overrides: decision2.overrides } }
|
|
9992
10148
|
};
|
|
9993
10149
|
});
|
|
@@ -10066,14 +10222,14 @@ var generateObject = (agent, options) => Stream7.runFold(streamObject(agent, opt
|
|
|
10066
10222
|
})
|
|
10067
10223
|
})
|
|
10068
10224
|
})));
|
|
10069
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
10225
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/agent-tool.ts
|
|
10070
10226
|
var exports_agent_tool = {};
|
|
10071
10227
|
__export(exports_agent_tool, {
|
|
10072
10228
|
asTool: () => asTool
|
|
10073
10229
|
});
|
|
10074
|
-
import { Cause as Cause4, Effect as Effect46, Schema as
|
|
10230
|
+
import { Cause as Cause4, Effect as Effect46, Schema as Schema48 } from "effect";
|
|
10075
10231
|
import { Tool as Tool5, Toolkit as Toolkit4 } from "effect/unstable/ai";
|
|
10076
|
-
var defaultParameters =
|
|
10232
|
+
var defaultParameters = Schema48.Struct({ prompt: Schema48.String });
|
|
10077
10233
|
var errorMessage2 = (error) => {
|
|
10078
10234
|
if (error instanceof AgentSuspended) {
|
|
10079
10235
|
return `suspended on ${error.tool_name}: ${error.reason}`;
|
|
@@ -10099,14 +10255,14 @@ var lazyHandled = (toolkit, name, handler) => ({
|
|
|
10099
10255
|
var asTool = (agent, options = {}) => {
|
|
10100
10256
|
const name = options.name ?? agent.name;
|
|
10101
10257
|
const parameters = options.parameters ?? defaultParameters;
|
|
10102
|
-
const success2 = options.success ??
|
|
10258
|
+
const success2 = options.success ?? Schema48.String;
|
|
10103
10259
|
const toPrompt = options.toPrompt ?? ((params) => params.prompt);
|
|
10104
10260
|
const fromResult = options.fromResult ?? ((result) => result.text);
|
|
10105
10261
|
const tool2 = Tool5.make(name, {
|
|
10106
10262
|
...options.description === undefined ? {} : { description: options.description },
|
|
10107
10263
|
parameters,
|
|
10108
10264
|
success: success2,
|
|
10109
|
-
failure:
|
|
10265
|
+
failure: Schema48.String,
|
|
10110
10266
|
failureMode: "return"
|
|
10111
10267
|
});
|
|
10112
10268
|
const toolkit = Toolkit4.make(tool2);
|
|
@@ -10124,7 +10280,7 @@ var asTool = (agent, options = {}) => {
|
|
|
10124
10280
|
});
|
|
10125
10281
|
return lazyHandled(toolkit, name, handler);
|
|
10126
10282
|
};
|
|
10127
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
10283
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/guardrail.ts
|
|
10128
10284
|
var exports_guardrail = {};
|
|
10129
10285
|
__export(exports_guardrail, {
|
|
10130
10286
|
validateInput: () => validateInput2,
|
|
@@ -10204,16 +10360,16 @@ var redactOutput = (options) => ({
|
|
|
10204
10360
|
var filterOutput = (keep) => ({
|
|
10205
10361
|
transformPart: (part, context) => Effect47.succeed(part.type === "tool-call" || keep(part, context) ? Option16.some(part) : Option16.none())
|
|
10206
10362
|
});
|
|
10207
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
10363
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/handoff.ts
|
|
10208
10364
|
var exports_handoff = {};
|
|
10209
10365
|
__export(exports_handoff, {
|
|
10210
10366
|
transferTool: () => transferTool,
|
|
10211
10367
|
supervisor: () => supervisor,
|
|
10212
10368
|
fanOut: () => fanOut
|
|
10213
10369
|
});
|
|
10214
|
-
import { Effect as Effect48, Schema as
|
|
10370
|
+
import { Effect as Effect48, Schema as Schema49 } from "effect";
|
|
10215
10371
|
import { AiError as AiError2, Toolkit as Toolkit5 } from "effect/unstable/ai";
|
|
10216
|
-
var defaultTransferParameters =
|
|
10372
|
+
var defaultTransferParameters = Schema49.Struct({ prompt: Schema49.String });
|
|
10217
10373
|
var transferName = (agentName) => `transfer_to_${agentName}`;
|
|
10218
10374
|
var positiveConcurrency = (value) => {
|
|
10219
10375
|
const concurrency = value ?? 4;
|
|
@@ -10267,7 +10423,7 @@ var supervisor = (options) => {
|
|
|
10267
10423
|
toolkit
|
|
10268
10424
|
};
|
|
10269
10425
|
};
|
|
10270
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
10426
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/model-registry.ts
|
|
10271
10427
|
var exports_model_registry = {};
|
|
10272
10428
|
__export(exports_model_registry, {
|
|
10273
10429
|
testLayer: () => testLayer38,
|
|
@@ -10282,13 +10438,13 @@ __export(exports_model_registry, {
|
|
|
10282
10438
|
Service: () => Service29,
|
|
10283
10439
|
LanguageModelNotRegistered: () => LanguageModelNotRegistered
|
|
10284
10440
|
});
|
|
10285
|
-
import { Chunk as Chunk2, Context as Context42, Effect as Effect49, Layer as Layer43, Option as Option17, Ref as Ref11, Schema as
|
|
10441
|
+
import { Chunk as Chunk2, Context as Context42, Effect as Effect49, Layer as Layer43, Option as Option17, Ref as Ref11, Schema as Schema50, Semaphore as Semaphore3 } from "effect";
|
|
10286
10442
|
import { Model } from "effect/unstable/ai";
|
|
10287
10443
|
|
|
10288
|
-
class LanguageModelNotRegistered extends
|
|
10289
|
-
provider:
|
|
10290
|
-
model:
|
|
10291
|
-
registration_key:
|
|
10444
|
+
class LanguageModelNotRegistered extends Schema50.TaggedErrorClass()("LanguageModelNotRegistered", {
|
|
10445
|
+
provider: Schema50.String,
|
|
10446
|
+
model: Schema50.String,
|
|
10447
|
+
registration_key: Schema50.optionalKey(Schema50.String)
|
|
10292
10448
|
}) {
|
|
10293
10449
|
}
|
|
10294
10450
|
|
|
@@ -10356,7 +10512,7 @@ var provide = (selection, effect) => Effect49.gen(function* () {
|
|
|
10356
10512
|
return yield* service.provide(selection, effect);
|
|
10357
10513
|
});
|
|
10358
10514
|
|
|
10359
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
10515
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.3/node_modules/@batonfx/core/src/index.ts
|
|
10360
10516
|
import {
|
|
10361
10517
|
AiError as AiError3,
|
|
10362
10518
|
Chat as Chat2,
|
|
@@ -10374,7 +10530,7 @@ import {
|
|
|
10374
10530
|
} from "effect/unstable/ai";
|
|
10375
10531
|
|
|
10376
10532
|
// ../runtime/src/agent/agent-loop-service.ts
|
|
10377
|
-
import { Config as Config3, Context as Context54, Crypto as Crypto3, Effect as Effect67, HashSet as HashSet6, Layer as Layer60, Option as Option22, Ref as Ref18, Schema as
|
|
10533
|
+
import { Config as Config3, Context as Context54, Crypto as Crypto3, Effect as Effect67, HashSet as HashSet6, Layer as Layer60, Option as Option22, Ref as Ref18, Schema as Schema63, Stream as Stream8 } from "effect";
|
|
10378
10534
|
import { Chat as Chat3, LanguageModel as LanguageModel6, Prompt as Prompt12, Tokenizer as Tokenizer4, Toolkit as Toolkit7 } from "effect/unstable/ai";
|
|
10379
10535
|
|
|
10380
10536
|
// ../runtime/src/child/child-run-service.ts
|
|
@@ -10394,31 +10550,31 @@ __export(exports_child_run_service, {
|
|
|
10394
10550
|
ChildRunScopeBroadened: () => ChildRunScopeBroadened,
|
|
10395
10551
|
ChildRunModelMissing: () => ChildRunModelMissing
|
|
10396
10552
|
});
|
|
10397
|
-
import { Context as Context44, Effect as Effect51, HashSet as HashSet5, Layer as Layer45, Option as Option18, Result as Result2, Schema as
|
|
10553
|
+
import { Context as Context44, Effect as Effect51, HashSet as HashSet5, Layer as Layer45, Option as Option18, Result as Result2, Schema as Schema52 } from "effect";
|
|
10398
10554
|
|
|
10399
10555
|
// ../runtime/src/workspace/workspace-provider-service.ts
|
|
10400
|
-
import { Context as Context43, Effect as Effect50, Layer as Layer44, Ref as Ref12, Schema as
|
|
10556
|
+
import { Context as Context43, Effect as Effect50, Layer as Layer44, Ref as Ref12, Schema as Schema51 } from "effect";
|
|
10401
10557
|
|
|
10402
|
-
class WorkspaceNotFound extends
|
|
10558
|
+
class WorkspaceNotFound extends Schema51.TaggedErrorClass()("WorkspaceNotFound", {
|
|
10403
10559
|
sandbox_ref: exports_ids_schema.WorkspaceRef
|
|
10404
10560
|
}) {
|
|
10405
10561
|
}
|
|
10406
10562
|
|
|
10407
|
-
class WorkspaceUnavailable extends
|
|
10563
|
+
class WorkspaceUnavailable extends Schema51.TaggedErrorClass()("WorkspaceUnavailable", {
|
|
10408
10564
|
sandbox_ref: exports_ids_schema.WorkspaceRef,
|
|
10409
|
-
message:
|
|
10565
|
+
message: Schema51.String
|
|
10410
10566
|
}) {
|
|
10411
10567
|
}
|
|
10412
10568
|
|
|
10413
|
-
class WorkspaceCapabilityUnsupported extends
|
|
10414
|
-
capability:
|
|
10569
|
+
class WorkspaceCapabilityUnsupported extends Schema51.TaggedErrorClass()("WorkspaceCapabilityUnsupported", {
|
|
10570
|
+
capability: Schema51.Literals(["suspend", "snapshot", "fork"]),
|
|
10415
10571
|
provider_key: exports_workspace_schema.WorkspaceProviderKey
|
|
10416
10572
|
}) {
|
|
10417
10573
|
}
|
|
10418
10574
|
|
|
10419
|
-
class WorkspaceProviderError extends
|
|
10575
|
+
class WorkspaceProviderError extends Schema51.TaggedErrorClass()("WorkspaceProviderError", {
|
|
10420
10576
|
provider_key: exports_workspace_schema.WorkspaceProviderKey,
|
|
10421
|
-
message:
|
|
10577
|
+
message: Schema51.String
|
|
10422
10578
|
}) {
|
|
10423
10579
|
}
|
|
10424
10580
|
|
|
@@ -10450,28 +10606,28 @@ var destroy = Effect50.fn("WorkspaceProvider.destroy.call")(function* (ref) {
|
|
|
10450
10606
|
});
|
|
10451
10607
|
|
|
10452
10608
|
// ../runtime/src/child/child-run-service.ts
|
|
10453
|
-
class StaticChildRunPresetNotFound extends
|
|
10609
|
+
class StaticChildRunPresetNotFound extends Schema52.TaggedErrorClass()("StaticChildRunPresetNotFound", {
|
|
10454
10610
|
preset_name: exports_shared_schema.NonEmptyString
|
|
10455
10611
|
}) {
|
|
10456
10612
|
}
|
|
10457
10613
|
|
|
10458
|
-
class ChildRunScopeBroadened extends
|
|
10459
|
-
field:
|
|
10614
|
+
class ChildRunScopeBroadened extends Schema52.TaggedErrorClass()("ChildRunScopeBroadened", {
|
|
10615
|
+
field: Schema52.Literals(["tool_names", "permissions"]),
|
|
10460
10616
|
value: exports_shared_schema.NonEmptyString
|
|
10461
10617
|
}) {
|
|
10462
10618
|
}
|
|
10463
10619
|
|
|
10464
|
-
class ChildRunServiceError extends
|
|
10465
|
-
message:
|
|
10620
|
+
class ChildRunServiceError extends Schema52.TaggedErrorClass()("ChildRunServiceError", {
|
|
10621
|
+
message: Schema52.String
|
|
10466
10622
|
}) {
|
|
10467
10623
|
}
|
|
10468
10624
|
|
|
10469
|
-
class ChildRunWorkspaceUnavailable extends
|
|
10470
|
-
reason:
|
|
10625
|
+
class ChildRunWorkspaceUnavailable extends Schema52.TaggedErrorClass()("ChildRunWorkspaceUnavailable", {
|
|
10626
|
+
reason: Schema52.String
|
|
10471
10627
|
}) {
|
|
10472
10628
|
}
|
|
10473
10629
|
|
|
10474
|
-
class ChildRunModelMissing extends
|
|
10630
|
+
class ChildRunModelMissing extends Schema52.TaggedErrorClass()("ChildRunModelMissing", {}) {
|
|
10475
10631
|
}
|
|
10476
10632
|
|
|
10477
10633
|
class Service31 extends Context44.Service()("@relayfx/runtime/ChildRunService") {
|
|
@@ -10699,26 +10855,26 @@ var spawnDynamic = Effect51.fn("ChildRunService.spawnDynamic.call")(function* (i
|
|
|
10699
10855
|
});
|
|
10700
10856
|
|
|
10701
10857
|
// ../runtime/src/child/spawn-child-run-tool.ts
|
|
10702
|
-
import { Effect as Effect52, Schema as
|
|
10858
|
+
import { Effect as Effect52, Schema as Schema53 } from "effect";
|
|
10703
10859
|
var toolName = "spawn_child_run";
|
|
10704
10860
|
var permissionName = "relay.child_run.spawn";
|
|
10705
|
-
var Input =
|
|
10706
|
-
preset_name:
|
|
10707
|
-
instructions:
|
|
10708
|
-
model:
|
|
10709
|
-
tool_names:
|
|
10710
|
-
permissions:
|
|
10711
|
-
output_schema_ref:
|
|
10712
|
-
metadata:
|
|
10713
|
-
input:
|
|
10861
|
+
var Input = Schema53.Struct({
|
|
10862
|
+
preset_name: Schema53.optionalKey(exports_shared_schema.NonEmptyString),
|
|
10863
|
+
instructions: Schema53.optionalKey(Schema53.String),
|
|
10864
|
+
model: Schema53.optionalKey(exports_agent_schema.ModelSelection),
|
|
10865
|
+
tool_names: Schema53.optionalKey(Schema53.Array(Schema53.String)),
|
|
10866
|
+
permissions: Schema53.optionalKey(Schema53.Array(Schema53.String)),
|
|
10867
|
+
output_schema_ref: Schema53.optionalKey(Schema53.String),
|
|
10868
|
+
metadata: Schema53.optionalKey(exports_shared_schema.Metadata),
|
|
10869
|
+
input: Schema53.optionalKey(Schema53.Array(exports_content_schema.Part))
|
|
10714
10870
|
}).annotate({ identifier: "Relay.SpawnChildRunTool.Input" });
|
|
10715
|
-
var Output =
|
|
10871
|
+
var Output = Schema53.Struct({
|
|
10716
10872
|
child_execution_id: exports_ids_schema.ChildExecutionId,
|
|
10717
|
-
status:
|
|
10718
|
-
output:
|
|
10873
|
+
status: Schema53.Literals(["completed", "failed", "cancelled"]),
|
|
10874
|
+
output: Schema53.Array(exports_content_schema.Part)
|
|
10719
10875
|
}).annotate({ identifier: "Relay.SpawnChildRunTool.Output" });
|
|
10720
|
-
var TransferInput =
|
|
10721
|
-
input:
|
|
10876
|
+
var TransferInput = Schema53.Struct({
|
|
10877
|
+
input: Schema53.optionalKey(Schema53.Array(exports_content_schema.Part))
|
|
10722
10878
|
}).annotate({ identifier: "Relay.SpawnChildRunTool.TransferInput" });
|
|
10723
10879
|
var enabled = (agent) => agent.metadata?.multi_agent_enabled === true;
|
|
10724
10880
|
var parentContext = (agent) => ({
|
|
@@ -10905,17 +11061,17 @@ var transferTools = (config) => (config.agent.handoff_targets ?? []).map((target
|
|
|
10905
11061
|
});
|
|
10906
11062
|
|
|
10907
11063
|
// ../runtime/src/memory/memory-service.ts
|
|
10908
|
-
import { Clock as Clock3, Context as Context46, Effect as Effect54, Layer as Layer47, Schema as
|
|
11064
|
+
import { Clock as Clock3, Context as Context46, Effect as Effect54, Layer as Layer47, Schema as Schema55 } from "effect";
|
|
10909
11065
|
import { EmbeddingModel as EmbeddingModel3, Prompt as Prompt9 } from "effect/unstable/ai";
|
|
10910
11066
|
|
|
10911
11067
|
// ../runtime/src/model/embedding-model-service.ts
|
|
10912
|
-
import { Context as Context45, Effect as Effect53, Layer as Layer46, Ref as Ref13, Schema as
|
|
11068
|
+
import { Context as Context45, Effect as Effect53, Layer as Layer46, Ref as Ref13, Schema as Schema54 } from "effect";
|
|
10913
11069
|
import { EmbeddingModel as EmbeddingModel2, Model as Model3 } from "effect/unstable/ai";
|
|
10914
11070
|
|
|
10915
|
-
class EmbeddingModelNotRegistered extends
|
|
10916
|
-
provider:
|
|
10917
|
-
model:
|
|
10918
|
-
registration_key:
|
|
11071
|
+
class EmbeddingModelNotRegistered extends Schema54.TaggedErrorClass()("EmbeddingModelNotRegistered", {
|
|
11072
|
+
provider: Schema54.String,
|
|
11073
|
+
model: Schema54.String,
|
|
11074
|
+
registration_key: Schema54.optionalKey(Schema54.String)
|
|
10919
11075
|
}) {
|
|
10920
11076
|
}
|
|
10921
11077
|
|
|
@@ -11041,7 +11197,7 @@ var defaultTopK = 5;
|
|
|
11041
11197
|
var memoryError = (error) => new exports_memory.MemoryError({
|
|
11042
11198
|
message: error instanceof Error ? `${error.name}: ${error.message}` : String(error)
|
|
11043
11199
|
});
|
|
11044
|
-
var decodeSubject = (subject) =>
|
|
11200
|
+
var decodeSubject = (subject) => Schema55.decodeUnknownEffect(exports_ids_schema.MemorySubjectId)(subject).pipe(Effect54.mapError(memoryError));
|
|
11045
11201
|
var textPart = (text3) => Prompt9.makePart("text", { text: text3 });
|
|
11046
11202
|
var textFromParts = (parts) => parts.filter((part) => part.type === "text").map((part) => part.text).join(`
|
|
11047
11203
|
`).trim();
|
|
@@ -11263,9 +11419,9 @@ __export(exports_schema_registry_service, {
|
|
|
11263
11419
|
Service: () => Service36,
|
|
11264
11420
|
SchemaRefNotRegistered: () => SchemaRefNotRegistered
|
|
11265
11421
|
});
|
|
11266
|
-
import { Context as Context49, Effect as Effect56, Layer as Layer50, Ref as Ref14, Schema as
|
|
11422
|
+
import { Context as Context49, Effect as Effect56, Layer as Layer50, Ref as Ref14, Schema as Schema56 } from "effect";
|
|
11267
11423
|
|
|
11268
|
-
class SchemaRefNotRegistered extends
|
|
11424
|
+
class SchemaRefNotRegistered extends Schema56.TaggedErrorClass()("SchemaRefNotRegistered", { schema_ref: exports_shared_schema.NonEmptyString }) {
|
|
11269
11425
|
}
|
|
11270
11426
|
|
|
11271
11427
|
class Service36 extends Context49.Service()("@relayfx/runtime/SchemaRegistry") {
|
|
@@ -11323,6 +11479,44 @@ var toAppendInput = (input) => {
|
|
|
11323
11479
|
message: input.message,
|
|
11324
11480
|
...input.metadata === undefined ? {} : { metadata: metadata10(input.metadata) }
|
|
11325
11481
|
};
|
|
11482
|
+
case "ToolCall":
|
|
11483
|
+
return {
|
|
11484
|
+
_tag: "ToolCall",
|
|
11485
|
+
part: input.part,
|
|
11486
|
+
...input.metadata === undefined ? {} : { metadata: metadata10(input.metadata) }
|
|
11487
|
+
};
|
|
11488
|
+
case "ToolResult":
|
|
11489
|
+
return {
|
|
11490
|
+
_tag: "ToolResult",
|
|
11491
|
+
part: input.part,
|
|
11492
|
+
...input.metadata === undefined ? {} : { metadata: metadata10(input.metadata) }
|
|
11493
|
+
};
|
|
11494
|
+
case "Memory":
|
|
11495
|
+
return {
|
|
11496
|
+
_tag: "Memory",
|
|
11497
|
+
items: input.items,
|
|
11498
|
+
...input.metadata === undefined ? {} : { metadata: metadata10(input.metadata) }
|
|
11499
|
+
};
|
|
11500
|
+
case "Skill":
|
|
11501
|
+
return {
|
|
11502
|
+
_tag: "Skill",
|
|
11503
|
+
name: input.name,
|
|
11504
|
+
body: input.body,
|
|
11505
|
+
...input.metadata === undefined ? {} : { metadata: metadata10(input.metadata) }
|
|
11506
|
+
};
|
|
11507
|
+
case "Steering":
|
|
11508
|
+
return {
|
|
11509
|
+
_tag: "Steering",
|
|
11510
|
+
message: input.message,
|
|
11511
|
+
...input.metadata === undefined ? {} : { metadata: metadata10(input.metadata) }
|
|
11512
|
+
};
|
|
11513
|
+
case "Handoff":
|
|
11514
|
+
return {
|
|
11515
|
+
_tag: "Handoff",
|
|
11516
|
+
target: input.target,
|
|
11517
|
+
summary: input.summary,
|
|
11518
|
+
...input.metadata === undefined ? {} : { metadata: metadata10(input.metadata) }
|
|
11519
|
+
};
|
|
11326
11520
|
case "Compaction":
|
|
11327
11521
|
return {
|
|
11328
11522
|
_tag: "Compaction",
|
|
@@ -11398,16 +11592,16 @@ __export(exports_blob_store_service, {
|
|
|
11398
11592
|
BlobStoreError: () => BlobStoreError,
|
|
11399
11593
|
BlobNotResolvable: () => BlobNotResolvable
|
|
11400
11594
|
});
|
|
11401
|
-
import { Context as Context51, Effect as Effect58, Layer as Layer52, Ref as Ref16, Schema as
|
|
11595
|
+
import { Context as Context51, Effect as Effect58, Layer as Layer52, Ref as Ref16, Schema as Schema57 } from "effect";
|
|
11402
11596
|
|
|
11403
|
-
class BlobNotResolvable extends
|
|
11404
|
-
uri:
|
|
11405
|
-
reason:
|
|
11597
|
+
class BlobNotResolvable extends Schema57.TaggedErrorClass()("BlobNotResolvable", {
|
|
11598
|
+
uri: Schema57.String,
|
|
11599
|
+
reason: Schema57.String
|
|
11406
11600
|
}) {
|
|
11407
11601
|
}
|
|
11408
11602
|
|
|
11409
|
-
class BlobStoreError extends
|
|
11410
|
-
message:
|
|
11603
|
+
class BlobStoreError extends Schema57.TaggedErrorClass()("BlobStoreError", {
|
|
11604
|
+
message: Schema57.String
|
|
11411
11605
|
}) {
|
|
11412
11606
|
}
|
|
11413
11607
|
|
|
@@ -11480,7 +11674,7 @@ __export(exports_prompt_assembler_service, {
|
|
|
11480
11674
|
Service: () => Service40,
|
|
11481
11675
|
PromptAssemblerError: () => PromptAssemblerError
|
|
11482
11676
|
});
|
|
11483
|
-
import { Context as Context53, Effect as Effect60, Layer as Layer54, Schema as
|
|
11677
|
+
import { Context as Context53, Effect as Effect60, Layer as Layer54, Schema as Schema59 } from "effect";
|
|
11484
11678
|
import { Prompt as Prompt10 } from "effect/unstable/ai";
|
|
11485
11679
|
|
|
11486
11680
|
// ../runtime/src/content/artifact-store-service.ts
|
|
@@ -11495,11 +11689,11 @@ __export(exports_artifact_store_service, {
|
|
|
11495
11689
|
Memory: () => Memory2,
|
|
11496
11690
|
ArtifactNotResolvable: () => ArtifactNotResolvable
|
|
11497
11691
|
});
|
|
11498
|
-
import { Context as Context52, Effect as Effect59, Layer as Layer53, Schema as
|
|
11692
|
+
import { Context as Context52, Effect as Effect59, Layer as Layer53, Schema as Schema58 } from "effect";
|
|
11499
11693
|
|
|
11500
|
-
class ArtifactNotResolvable extends
|
|
11501
|
-
artifact_id:
|
|
11502
|
-
reason:
|
|
11694
|
+
class ArtifactNotResolvable extends Schema58.TaggedErrorClass()("ArtifactNotResolvable", {
|
|
11695
|
+
artifact_id: Schema58.String,
|
|
11696
|
+
reason: Schema58.String
|
|
11503
11697
|
}) {
|
|
11504
11698
|
}
|
|
11505
11699
|
|
|
@@ -11541,14 +11735,14 @@ var register8 = Effect59.fn("ArtifactStore.register.call")(function* (artifact_i
|
|
|
11541
11735
|
});
|
|
11542
11736
|
|
|
11543
11737
|
// ../runtime/src/agent/prompt-assembler-service.ts
|
|
11544
|
-
class PromptAssemblerError extends
|
|
11545
|
-
message:
|
|
11738
|
+
class PromptAssemblerError extends Schema59.TaggedErrorClass()("PromptAssemblerError", {
|
|
11739
|
+
message: Schema59.String
|
|
11546
11740
|
}) {
|
|
11547
11741
|
}
|
|
11548
11742
|
|
|
11549
11743
|
class Service40 extends Context53.Service()("@relayfx/runtime/PromptAssembler") {
|
|
11550
11744
|
}
|
|
11551
|
-
var jsonValue2 = (value) =>
|
|
11745
|
+
var jsonValue2 = (value) => Schema59.decodeUnknownSync(exports_shared_schema.JsonValue)(value);
|
|
11552
11746
|
var stringifyJson = (value) => JSON.stringify(jsonValue2(value));
|
|
11553
11747
|
var contentToPromptPart = (part) => {
|
|
11554
11748
|
const options = part.provider_options;
|
|
@@ -11692,8 +11886,8 @@ var make9 = (config) => exports_compaction.make(strategy(config), defaultOptions
|
|
|
11692
11886
|
var layerFromEpoch = (epoch) => exports_instructions.layer(epoch.baseline.length === 0 ? [] : [exports_instructions.staticSource("relay:context-epoch", epoch.baseline)]);
|
|
11693
11887
|
|
|
11694
11888
|
// ../runtime/src/agent/relay-permissions.ts
|
|
11695
|
-
import { Clock as Clock6, Effect as Effect62, Equal as Equal2, Layer as Layer56, Option as Option19, Schema as
|
|
11696
|
-
var jsonValue3 = (value) =>
|
|
11889
|
+
import { Clock as Clock6, Effect as Effect62, Equal as Equal2, Layer as Layer56, Option as Option19, Schema as Schema60 } from "effect";
|
|
11890
|
+
var jsonValue3 = (value) => Schema60.decodeUnknownSync(exports_shared_schema.JsonValue)(value === undefined ? null : value);
|
|
11697
11891
|
var waitIdForToolCall = (toolCallId) => exports_ids_schema.WaitId.make(`wait:permission:${toolCallId}`);
|
|
11698
11892
|
var fallbackToolCallId = (request) => `${request.agentName}:${request.turn}:${request.tool}`;
|
|
11699
11893
|
var tokenFor2 = (request) => waitIdForToolCall(request.toolCallId ?? fallbackToolCallId(request));
|
|
@@ -11859,7 +12053,7 @@ var awaitAnswer = Effect62.fn("RelayPermissions.awaitAnswer")(function* (config,
|
|
|
11859
12053
|
});
|
|
11860
12054
|
var rememberRule = Effect62.fn("RelayPermissions.rememberRule")(function* (config, rule) {
|
|
11861
12055
|
const createdAt = yield* Clock6.currentTimeMillis;
|
|
11862
|
-
const decodedRule = yield*
|
|
12056
|
+
const decodedRule = yield* Schema60.decodeUnknownEffect(exports_agent_schema.PermissionRule)(rule).pipe(Effect62.mapError((error) => permissionError(error.message)));
|
|
11863
12057
|
yield* config.repository.remember({
|
|
11864
12058
|
agent: config.agentName,
|
|
11865
12059
|
scope: config.scope,
|
|
@@ -11875,9 +12069,9 @@ var layer40 = (config) => Layer56.mergeAll(Layer56.succeed(exports_permissions.P
|
|
|
11875
12069
|
})));
|
|
11876
12070
|
|
|
11877
12071
|
// ../runtime/src/agent/relay-steering.ts
|
|
11878
|
-
import { Clock as Clock7, Effect as Effect63, Layer as Layer57, Schema as
|
|
12072
|
+
import { Clock as Clock7, Effect as Effect63, Layer as Layer57, Schema as Schema61 } from "effect";
|
|
11879
12073
|
import { Prompt as Prompt11 } from "effect/unstable/ai";
|
|
11880
|
-
var jsonValue4 = (value) =>
|
|
12074
|
+
var jsonValue4 = (value) => Schema61.decodeUnknownSync(exports_shared_schema.JsonValue)(value);
|
|
11881
12075
|
var stringifyJson2 = (value) => JSON.stringify(jsonValue4(value));
|
|
11882
12076
|
var createdAtForSequence2 = (config, sequence) => config.startedAt + sequence - config.eventSequence;
|
|
11883
12077
|
var drainId = (config, kind, sequence) => `drain:${config.executionId}:steering:${kind}:sequence:${sequence}`;
|
|
@@ -11910,7 +12104,7 @@ var contentFromMessage = (message) => {
|
|
|
11910
12104
|
const textParts = promptTextParts(prompt);
|
|
11911
12105
|
if (textParts.length > 0)
|
|
11912
12106
|
return textParts;
|
|
11913
|
-
return [exports_content_schema.text(stringifyJson2(
|
|
12107
|
+
return [exports_content_schema.text(stringifyJson2(Schema61.encodeSync(Prompt11.Prompt)(prompt)))];
|
|
11914
12108
|
};
|
|
11915
12109
|
var steeringReceivedEvent = (config, kind, drain2, messages, sequence) => ({
|
|
11916
12110
|
id: exports_ids_schema.EventId.make(`event:${drain2.drainId}:received`),
|
|
@@ -11955,8 +12149,8 @@ var layer41 = (config) => Layer57.succeed(exports_steering.Steering, exports_ste
|
|
|
11955
12149
|
}));
|
|
11956
12150
|
|
|
11957
12151
|
// ../runtime/src/agent/relay-tool-executor.ts
|
|
11958
|
-
import { Effect as Effect64, Layer as Layer58, Option as Option20, Schema as
|
|
11959
|
-
var jsonValue5 = (value) =>
|
|
12152
|
+
import { Effect as Effect64, Layer as Layer58, Option as Option20, Schema as Schema62 } from "effect";
|
|
12153
|
+
var jsonValue5 = (value) => Schema62.decodeUnknownSync(exports_shared_schema.JsonValue)(value);
|
|
11960
12154
|
var errorDetail = (error) => {
|
|
11961
12155
|
switch (error._tag) {
|
|
11962
12156
|
case "ToolNotRegistered":
|
|
@@ -12063,29 +12257,29 @@ var make12 = (first) => Ref17.make(first).pipe(Effect66.map((ref) => ({
|
|
|
12063
12257
|
})));
|
|
12064
12258
|
|
|
12065
12259
|
// ../runtime/src/agent/agent-loop-service.ts
|
|
12066
|
-
class AgentLoopError extends
|
|
12067
|
-
message:
|
|
12068
|
-
next_event_sequence:
|
|
12260
|
+
class AgentLoopError extends Schema63.TaggedErrorClass()("AgentLoopError", {
|
|
12261
|
+
message: Schema63.String,
|
|
12262
|
+
next_event_sequence: Schema63.optionalKey(exports_execution_schema.ExecutionEventSequence)
|
|
12069
12263
|
}) {
|
|
12070
12264
|
}
|
|
12071
12265
|
|
|
12072
|
-
class AgentLoopWaitRequested extends
|
|
12266
|
+
class AgentLoopWaitRequested extends Schema63.TaggedErrorClass()("AgentLoopWaitRequested", {
|
|
12073
12267
|
wait_id: exports_ids_schema.WaitId,
|
|
12074
12268
|
tool_call: exports_tool_schema.Call,
|
|
12075
12269
|
next_event_sequence: exports_execution_schema.ExecutionEventSequence
|
|
12076
12270
|
}) {
|
|
12077
12271
|
}
|
|
12078
12272
|
|
|
12079
|
-
class AgentLoopBudgetExceeded extends
|
|
12080
|
-
tokens_used:
|
|
12081
|
-
token_budget:
|
|
12273
|
+
class AgentLoopBudgetExceeded extends Schema63.TaggedErrorClass()("AgentLoopBudgetExceeded", {
|
|
12274
|
+
tokens_used: Schema63.Int,
|
|
12275
|
+
token_budget: Schema63.Int,
|
|
12082
12276
|
next_event_sequence: exports_execution_schema.ExecutionEventSequence
|
|
12083
12277
|
}) {
|
|
12084
12278
|
}
|
|
12085
12279
|
|
|
12086
12280
|
class Service41 extends Context54.Service()("@relayfx/runtime/AgentLoop") {
|
|
12087
12281
|
}
|
|
12088
|
-
var jsonValue6 = (value) =>
|
|
12282
|
+
var jsonValue6 = (value) => Schema63.decodeUnknownSync(exports_shared_schema.JsonValue)(value);
|
|
12089
12283
|
var toolNames = (agent) => HashSet6.fromIterable(agent.tool_names);
|
|
12090
12284
|
var availableRegisteredTools = (agent, registered) => {
|
|
12091
12285
|
const names = toolNames(agent);
|
|
@@ -12661,7 +12855,7 @@ __export(exports_execution_entity, {
|
|
|
12661
12855
|
});
|
|
12662
12856
|
import { ClusterSchema, Entity } from "effect/unstable/cluster";
|
|
12663
12857
|
import { Rpc } from "effect/unstable/rpc";
|
|
12664
|
-
import { Schema as
|
|
12858
|
+
import { Schema as Schema70 } from "effect";
|
|
12665
12859
|
|
|
12666
12860
|
// ../runtime/src/workflow/execution-workflow.ts
|
|
12667
12861
|
var exports_execution_workflow = {};
|
|
@@ -12692,15 +12886,15 @@ __export(exports_execution_workflow, {
|
|
|
12692
12886
|
ActivityNameTemplates: () => ActivityNameTemplates
|
|
12693
12887
|
});
|
|
12694
12888
|
import { Activity, DurableDeferred, Workflow } from "effect/unstable/workflow";
|
|
12695
|
-
import { Effect as Effect73, Exit as Exit2, Option as Option26, Schema as
|
|
12889
|
+
import { Effect as Effect73, Exit as Exit2, Option as Option26, Schema as Schema69 } from "effect";
|
|
12696
12890
|
|
|
12697
12891
|
// ../runtime/src/child/parent-notifier-service.ts
|
|
12698
|
-
import { Context as Context55, Effect as Effect68, Layer as Layer61, Option as Option23, Ref as Ref19, Schema as
|
|
12699
|
-
class ParentNotifyError extends
|
|
12700
|
-
message:
|
|
12892
|
+
import { Context as Context55, Effect as Effect68, Layer as Layer61, Option as Option23, Ref as Ref19, Schema as Schema64 } from "effect";
|
|
12893
|
+
class ParentNotifyError extends Schema64.TaggedErrorClass()("ParentNotifyError", {
|
|
12894
|
+
message: Schema64.String
|
|
12701
12895
|
}) {
|
|
12702
12896
|
}
|
|
12703
|
-
var ChildTerminalStatus =
|
|
12897
|
+
var ChildTerminalStatus = Schema64.Literals(["completed", "failed", "cancelled"]).annotate({
|
|
12704
12898
|
identifier: "Relay.ParentNotifier.ChildTerminalStatus"
|
|
12705
12899
|
});
|
|
12706
12900
|
|
|
@@ -12799,15 +12993,15 @@ __export(exports_skill_registry_service, {
|
|
|
12799
12993
|
SkillDefinitionInvalid: () => SkillDefinitionInvalid,
|
|
12800
12994
|
Service: () => Service43
|
|
12801
12995
|
});
|
|
12802
|
-
import { Clock as Clock8, Context as Context56, Effect as Effect69, Layer as Layer62, Schema as
|
|
12996
|
+
import { Clock as Clock8, Context as Context56, Effect as Effect69, Layer as Layer62, Schema as Schema65 } from "effect";
|
|
12803
12997
|
|
|
12804
|
-
class SkillDefinitionInvalid extends
|
|
12805
|
-
message:
|
|
12998
|
+
class SkillDefinitionInvalid extends Schema65.TaggedErrorClass()("SkillDefinitionInvalid", {
|
|
12999
|
+
message: Schema65.String
|
|
12806
13000
|
}) {
|
|
12807
13001
|
}
|
|
12808
13002
|
|
|
12809
|
-
class SkillRegistryError extends
|
|
12810
|
-
message:
|
|
13003
|
+
class SkillRegistryError extends Schema65.TaggedErrorClass()("SkillRegistryError", {
|
|
13004
|
+
message: Schema65.String
|
|
12811
13005
|
}) {
|
|
12812
13006
|
}
|
|
12813
13007
|
|
|
@@ -12976,11 +13170,11 @@ __export(exports_execution_service, {
|
|
|
12976
13170
|
Service: () => Service44,
|
|
12977
13171
|
ExecutionServiceError: () => ExecutionServiceError
|
|
12978
13172
|
});
|
|
12979
|
-
import { Clock as Clock9, Context as Context57, Effect as Effect70, Layer as Layer63, Option as Option24, Schema as
|
|
13173
|
+
import { Clock as Clock9, Context as Context57, Effect as Effect70, Layer as Layer63, Option as Option24, Schema as Schema66, Stream as Stream9 } from "effect";
|
|
12980
13174
|
import { ShardingConfig } from "effect/unstable/cluster";
|
|
12981
|
-
class ExecutionServiceError extends
|
|
12982
|
-
message:
|
|
12983
|
-
next_event_sequence:
|
|
13175
|
+
class ExecutionServiceError extends Schema66.TaggedErrorClass()("ExecutionServiceError", {
|
|
13176
|
+
message: Schema66.String,
|
|
13177
|
+
next_event_sequence: Schema66.optionalKey(exports_execution_schema.ExecutionEventSequence)
|
|
12984
13178
|
}) {
|
|
12985
13179
|
}
|
|
12986
13180
|
|
|
@@ -13296,13 +13490,13 @@ var spawnChildRun = Effect70.fn("ExecutionService.spawnChildRun.call")(function*
|
|
|
13296
13490
|
var stream3 = (input) => Stream9.unwrap(Service44.pipe(Effect70.map((service) => service.stream(input))));
|
|
13297
13491
|
|
|
13298
13492
|
// ../runtime/src/workspace/workspace-planner-service.ts
|
|
13299
|
-
import { Context as Context59, Effect as Effect72, HashSet as HashSet7, Layer as Layer65, Option as Option25, Schema as
|
|
13493
|
+
import { Context as Context59, Effect as Effect72, HashSet as HashSet7, Layer as Layer65, Option as Option25, Schema as Schema68 } from "effect";
|
|
13300
13494
|
|
|
13301
13495
|
// ../runtime/src/workspace/workspace-runtime-service.ts
|
|
13302
|
-
import { Context as Context58, Effect as Effect71, Layer as Layer64, Schema as
|
|
13496
|
+
import { Context as Context58, Effect as Effect71, Layer as Layer64, Schema as Schema67 } from "effect";
|
|
13303
13497
|
|
|
13304
|
-
class WorkspaceRuntimeError extends
|
|
13305
|
-
message:
|
|
13498
|
+
class WorkspaceRuntimeError extends Schema67.TaggedErrorClass()("WorkspaceRuntimeError", {
|
|
13499
|
+
message: Schema67.String
|
|
13306
13500
|
}) {
|
|
13307
13501
|
}
|
|
13308
13502
|
|
|
@@ -13330,18 +13524,18 @@ var exec = Effect71.fn("WorkspaceRuntime.exec.call")(function* (input) {
|
|
|
13330
13524
|
});
|
|
13331
13525
|
|
|
13332
13526
|
// ../runtime/src/workspace/workspace-planner-service.ts
|
|
13333
|
-
class WorkspaceRuntimeMissing extends
|
|
13527
|
+
class WorkspaceRuntimeMissing extends Schema68.TaggedErrorClass()("WorkspaceRuntimeMissing", {
|
|
13334
13528
|
execution_id: exports_ids_schema.ExecutionId
|
|
13335
13529
|
}) {
|
|
13336
13530
|
}
|
|
13337
13531
|
|
|
13338
|
-
class WorkspaceLeaseMissingRef extends
|
|
13532
|
+
class WorkspaceLeaseMissingRef extends Schema68.TaggedErrorClass()("WorkspaceLeaseMissingRef", {
|
|
13339
13533
|
execution_id: exports_ids_schema.ExecutionId
|
|
13340
13534
|
}) {
|
|
13341
13535
|
}
|
|
13342
13536
|
|
|
13343
|
-
class WorkspacePlannerError extends
|
|
13344
|
-
message:
|
|
13537
|
+
class WorkspacePlannerError extends Schema68.TaggedErrorClass()("WorkspacePlannerError", {
|
|
13538
|
+
message: Schema68.String
|
|
13345
13539
|
}) {
|
|
13346
13540
|
}
|
|
13347
13541
|
|
|
@@ -13527,67 +13721,67 @@ var fail = Effect72.fn("WorkspacePlanner.fail.call")(function* (input) {
|
|
|
13527
13721
|
});
|
|
13528
13722
|
|
|
13529
13723
|
// ../runtime/src/workflow/execution-workflow.ts
|
|
13530
|
-
class ExecutionWorkflowFailed extends
|
|
13531
|
-
message:
|
|
13724
|
+
class ExecutionWorkflowFailed extends Schema69.TaggedErrorClass()("ExecutionWorkflowFailed", {
|
|
13725
|
+
message: Schema69.String
|
|
13532
13726
|
}) {
|
|
13533
13727
|
}
|
|
13534
|
-
var StartInput =
|
|
13728
|
+
var StartInput = Schema69.Struct({
|
|
13535
13729
|
execution_id: exports_ids_schema.ExecutionId,
|
|
13536
13730
|
root_address_id: exports_ids_schema.AddressId,
|
|
13537
|
-
session_id:
|
|
13538
|
-
input:
|
|
13731
|
+
session_id: Schema69.optionalKey(exports_ids_schema.SessionId),
|
|
13732
|
+
input: Schema69.optionalKey(Schema69.Array(exports_content_schema.Part)),
|
|
13539
13733
|
event_sequence: exports_execution_schema.ExecutionEventSequence,
|
|
13540
13734
|
started_at: exports_shared_schema.TimestampMillis,
|
|
13541
13735
|
completed_at: exports_shared_schema.TimestampMillis,
|
|
13542
|
-
agent_id:
|
|
13543
|
-
agent_revision:
|
|
13544
|
-
agent_snapshot:
|
|
13545
|
-
agent_tool_input_schema_digests:
|
|
13546
|
-
wait_id:
|
|
13547
|
-
resume_tool_call:
|
|
13548
|
-
workflow_generation:
|
|
13549
|
-
metadata:
|
|
13736
|
+
agent_id: Schema69.optionalKey(exports_ids_schema.AgentId),
|
|
13737
|
+
agent_revision: Schema69.optionalKey(exports_agent_schema.DefinitionRevision),
|
|
13738
|
+
agent_snapshot: Schema69.optionalKey(exports_agent_schema.Definition),
|
|
13739
|
+
agent_tool_input_schema_digests: Schema69.optionalKey(exports_agent_schema.ToolInputSchemaDigests),
|
|
13740
|
+
wait_id: Schema69.optionalKey(exports_ids_schema.WaitId),
|
|
13741
|
+
resume_tool_call: Schema69.optionalKey(exports_tool_schema.Call),
|
|
13742
|
+
workflow_generation: Schema69.optionalKey(Schema69.Int.check(Schema69.isGreaterThanOrEqualTo(0))),
|
|
13743
|
+
metadata: Schema69.optionalKey(exports_shared_schema.Metadata)
|
|
13550
13744
|
}).annotate({ identifier: "Relay.ExecutionWorkflow.StartInput" });
|
|
13551
|
-
var WaitSignalState =
|
|
13745
|
+
var WaitSignalState = Schema69.Literals(["resolved", "timed_out", "cancelled"]).annotate({
|
|
13552
13746
|
identifier: "Relay.ExecutionWorkflow.WaitSignalState"
|
|
13553
13747
|
});
|
|
13554
|
-
var WaitSignal =
|
|
13748
|
+
var WaitSignal = Schema69.Struct({
|
|
13555
13749
|
wait_id: exports_ids_schema.WaitId,
|
|
13556
13750
|
state: WaitSignalState,
|
|
13557
13751
|
signaled_at: exports_shared_schema.TimestampMillis
|
|
13558
13752
|
}).annotate({ identifier: "Relay.ExecutionWorkflow.WaitSignal" });
|
|
13559
|
-
var SignalWaitInput =
|
|
13560
|
-
workflow_execution_id:
|
|
13753
|
+
var SignalWaitInput = Schema69.Struct({
|
|
13754
|
+
workflow_execution_id: Schema69.String,
|
|
13561
13755
|
wait_id: exports_ids_schema.WaitId,
|
|
13562
13756
|
state: WaitSignalState,
|
|
13563
13757
|
signaled_at: exports_shared_schema.TimestampMillis
|
|
13564
13758
|
}).annotate({ identifier: "Relay.ExecutionWorkflow.SignalWaitInput" });
|
|
13565
|
-
var CancelExecutionInput =
|
|
13759
|
+
var CancelExecutionInput = Schema69.Struct({
|
|
13566
13760
|
execution_id: exports_ids_schema.ExecutionId,
|
|
13567
13761
|
cancelled_at: exports_shared_schema.TimestampMillis,
|
|
13568
|
-
reason:
|
|
13762
|
+
reason: Schema69.optionalKey(Schema69.String)
|
|
13569
13763
|
}).annotate({ identifier: "Relay.ExecutionWorkflow.CancelExecutionInput" });
|
|
13570
|
-
var CancelExecutionResult =
|
|
13764
|
+
var CancelExecutionResult = Schema69.Struct({
|
|
13571
13765
|
execution_id: exports_ids_schema.ExecutionId,
|
|
13572
13766
|
status: exports_execution_schema.ExecutionStatus
|
|
13573
13767
|
}).annotate({ identifier: "Relay.ExecutionWorkflow.CancelExecutionResult" });
|
|
13574
|
-
var WaitSnapshot =
|
|
13768
|
+
var WaitSnapshot = Schema69.Struct({
|
|
13575
13769
|
id: exports_ids_schema.WaitId,
|
|
13576
13770
|
execution_id: exports_ids_schema.ExecutionId,
|
|
13577
|
-
envelope_id:
|
|
13771
|
+
envelope_id: Schema69.optionalKey(exports_ids_schema.EnvelopeId),
|
|
13578
13772
|
mode: exports_envelope_schema.WaitMode,
|
|
13579
|
-
correlation_key:
|
|
13580
|
-
state:
|
|
13773
|
+
correlation_key: Schema69.optionalKey(Schema69.String),
|
|
13774
|
+
state: Schema69.Literals(["open", "resolved", "timed_out", "cancelled"]),
|
|
13581
13775
|
metadata: exports_shared_schema.Metadata,
|
|
13582
13776
|
created_at: exports_shared_schema.TimestampMillis,
|
|
13583
|
-
resolved_at:
|
|
13777
|
+
resolved_at: Schema69.optionalKey(exports_shared_schema.TimestampMillis)
|
|
13584
13778
|
}).annotate({ identifier: "Relay.ExecutionWorkflow.WaitSnapshot" });
|
|
13585
|
-
var StartResult =
|
|
13779
|
+
var StartResult = Schema69.Struct({
|
|
13586
13780
|
execution_id: exports_ids_schema.ExecutionId,
|
|
13587
13781
|
status: exports_execution_schema.ExecutionStatus,
|
|
13588
|
-
wait_id:
|
|
13589
|
-
wait_state:
|
|
13590
|
-
metadata:
|
|
13782
|
+
wait_id: Schema69.optionalKey(exports_ids_schema.WaitId),
|
|
13783
|
+
wait_state: Schema69.optionalKey(Schema69.Literals(["resolved", "timed_out", "cancelled"])),
|
|
13784
|
+
metadata: Schema69.optionalKey(exports_shared_schema.Metadata)
|
|
13591
13785
|
}).annotate({ identifier: "Relay.ExecutionWorkflow.StartResult" });
|
|
13592
13786
|
var StartExecutionWorkflowName = "Relay/Execution/Start";
|
|
13593
13787
|
var ActivityNames = {
|
|
@@ -13797,7 +13991,7 @@ var cancelExecution = (input, turn, reason) => Activity.make({
|
|
|
13797
13991
|
});
|
|
13798
13992
|
var loadCancellationRequested = (input, turn) => Activity.make({
|
|
13799
13993
|
name: ActivityNames.checkCancel(turn),
|
|
13800
|
-
success:
|
|
13994
|
+
success: Schema69.Boolean,
|
|
13801
13995
|
error: ExecutionWorkflowFailed,
|
|
13802
13996
|
execute: Effect73.gen(function* () {
|
|
13803
13997
|
const repository = yield* exports_execution_repository.Service;
|
|
@@ -13807,7 +14001,7 @@ var loadCancellationRequested = (input, turn) => Activity.make({
|
|
|
13807
14001
|
});
|
|
13808
14002
|
var loadWait = (name, waitId) => Activity.make({
|
|
13809
14003
|
name,
|
|
13810
|
-
success:
|
|
14004
|
+
success: Schema69.UndefinedOr(WaitSnapshot),
|
|
13811
14005
|
error: ExecutionWorkflowFailed,
|
|
13812
14006
|
execute: get11(waitId).pipe(Effect73.map((record2) => record2 === undefined ? undefined : toWaitSnapshot(record2)), Effect73.mapError(mapWaitError2))
|
|
13813
14007
|
});
|
|
@@ -13898,7 +14092,7 @@ var compactionForStart = Effect73.fn("ExecutionWorkflow.compactionForStart")(fun
|
|
|
13898
14092
|
...keepRecentTokens === undefined ? {} : { keepRecentTokens }
|
|
13899
14093
|
};
|
|
13900
14094
|
});
|
|
13901
|
-
var decodeMemorySubject = (value) => typeof value === "string" ?
|
|
14095
|
+
var decodeMemorySubject = (value) => typeof value === "string" ? Schema69.decodeUnknownEffect(exports_ids_schema.MemorySubjectId)(value).pipe(Effect73.mapError(() => new ExecutionWorkflowFailed({ message: `Invalid memory_subject_id metadata value: ${value}` }))) : Effect73.fail(new ExecutionWorkflowFailed({ message: "memory_subject_id metadata value must be a string" }));
|
|
13902
14096
|
var memorySubjectForStart = Effect73.fn("ExecutionWorkflow.memorySubjectForStart")(function* (input) {
|
|
13903
14097
|
const executionSubject = memorySubjectFromMetadata(input.metadata);
|
|
13904
14098
|
if (executionSubject !== undefined)
|
|
@@ -13916,7 +14110,7 @@ var steeringEnabledForStart = (input) => {
|
|
|
13916
14110
|
var nextEventSequence4 = (eventLog, executionId) => eventLog.maxSequence(executionId).pipe(Effect73.map((max) => max === undefined ? 0 : max + 1), Effect73.mapError(mapEventLogError6));
|
|
13917
14111
|
var ensureWorkspace = (input) => Activity.make({
|
|
13918
14112
|
name: ActivityNames.ensureWorkspace,
|
|
13919
|
-
success:
|
|
14113
|
+
success: Schema69.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
13920
14114
|
error: ExecutionWorkflowFailed,
|
|
13921
14115
|
execute: Effect73.gen(function* () {
|
|
13922
14116
|
if (input.agent_snapshot === undefined)
|
|
@@ -13933,19 +14127,19 @@ var ensureWorkspace = (input) => Activity.make({
|
|
|
13933
14127
|
});
|
|
13934
14128
|
var suspendWorkspace = (input, key2) => Activity.make({
|
|
13935
14129
|
name: ActivityNames.suspendWorkspace(key2),
|
|
13936
|
-
success:
|
|
14130
|
+
success: Schema69.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
13937
14131
|
error: ExecutionWorkflowFailed,
|
|
13938
14132
|
execute: suspend2({ executionId: input.execution_id, now: input.started_at }).pipe(Effect73.mapError(mapWorkspaceError))
|
|
13939
14133
|
});
|
|
13940
14134
|
var resumeWorkspace = (input, key2) => Activity.make({
|
|
13941
14135
|
name: ActivityNames.resumeWorkspace(key2),
|
|
13942
|
-
success:
|
|
14136
|
+
success: Schema69.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
13943
14137
|
error: ExecutionWorkflowFailed,
|
|
13944
14138
|
execute: resume2({ executionId: input.execution_id, now: input.started_at }).pipe(Effect73.map((plan2) => plan2?.lease), Effect73.mapError(mapWorkspaceError))
|
|
13945
14139
|
});
|
|
13946
14140
|
var releaseWorkspace = (input) => Activity.make({
|
|
13947
14141
|
name: ActivityNames.releaseWorkspace,
|
|
13948
|
-
success:
|
|
14142
|
+
success: Schema69.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
13949
14143
|
error: ExecutionWorkflowFailed,
|
|
13950
14144
|
execute: release2({ executionId: input.execution_id, now: input.completed_at }).pipe(Effect73.mapError(mapWorkspaceError))
|
|
13951
14145
|
});
|
|
@@ -14046,7 +14240,7 @@ var childDispatchContext = (input) => {
|
|
|
14046
14240
|
};
|
|
14047
14241
|
var loadChildCancellationRequested = (input) => Activity.make({
|
|
14048
14242
|
name: ActivityNames.checkQueuedChildCancellation,
|
|
14049
|
-
success:
|
|
14243
|
+
success: Schema69.Boolean,
|
|
14050
14244
|
error: ExecutionWorkflowFailed,
|
|
14051
14245
|
execute: Effect73.gen(function* () {
|
|
14052
14246
|
const context = childDispatchContext(input);
|
|
@@ -14058,7 +14252,7 @@ var loadChildCancellationRequested = (input) => Activity.make({
|
|
|
14058
14252
|
});
|
|
14059
14253
|
var notifyParentActivity = (input, context, status, output) => Activity.make({
|
|
14060
14254
|
name: ActivityNames.notifyParent(status),
|
|
14061
|
-
success:
|
|
14255
|
+
success: Schema69.Void,
|
|
14062
14256
|
error: ExecutionWorkflowFailed,
|
|
14063
14257
|
execute: Effect73.gen(function* () {
|
|
14064
14258
|
const notifier = yield* Effect73.serviceOption(Service42);
|
|
@@ -14111,7 +14305,7 @@ var waitIdFromExecution = (execution) => {
|
|
|
14111
14305
|
};
|
|
14112
14306
|
var pendingToolCallFromExecution = (execution) => {
|
|
14113
14307
|
const pending = execution.metadata?.pending_tool_call;
|
|
14114
|
-
return
|
|
14308
|
+
return Schema69.decodeUnknownOption(exports_tool_schema.Call)(pending).pipe(Option26.getOrUndefined);
|
|
14115
14309
|
};
|
|
14116
14310
|
var finishCancelledWait = Effect73.fn("ExecutionWorkflow.finishCancelledWait")(function* (startInput, turn, waitId) {
|
|
14117
14311
|
const cancelled = yield* cancelExecution(startInput, turn, "wait cancelled");
|
|
@@ -14325,7 +14519,7 @@ var Start = Rpc.make("start", {
|
|
|
14325
14519
|
}).annotate(ClusterSchema.Persisted, true).annotate(ClusterSchema.Uninterruptible, "server");
|
|
14326
14520
|
var SignalWait = Rpc.make("signalWait", {
|
|
14327
14521
|
payload: SignalWaitInput,
|
|
14328
|
-
success:
|
|
14522
|
+
success: Schema70.Void,
|
|
14329
14523
|
error: ExecutionWorkflowFailed
|
|
14330
14524
|
}).annotate(ClusterSchema.Persisted, true).annotate(ClusterSchema.Uninterruptible, "server");
|
|
14331
14525
|
var Cancel = Rpc.make("cancel", {
|
|
@@ -14353,26 +14547,26 @@ __export(exports_envelope_service, {
|
|
|
14353
14547
|
EnvelopeRouteDeferred: () => EnvelopeRouteDeferred,
|
|
14354
14548
|
EnvelopeAddressNotFound: () => EnvelopeAddressNotFound
|
|
14355
14549
|
});
|
|
14356
|
-
import { Context as Context60, Effect as Effect74, Layer as Layer67, Schema as
|
|
14357
|
-
class EnvelopeAddressNotFound extends
|
|
14550
|
+
import { Context as Context60, Effect as Effect74, Layer as Layer67, Schema as Schema71 } from "effect";
|
|
14551
|
+
class EnvelopeAddressNotFound extends Schema71.TaggedErrorClass()("EnvelopeAddressNotFound", {
|
|
14358
14552
|
address_id: exports_ids_schema.AddressId
|
|
14359
14553
|
}) {
|
|
14360
14554
|
}
|
|
14361
14555
|
|
|
14362
|
-
class EnvelopeRouteUnavailable extends
|
|
14556
|
+
class EnvelopeRouteUnavailable extends Schema71.TaggedErrorClass()("EnvelopeRouteUnavailable", {
|
|
14363
14557
|
address_id: exports_ids_schema.AddressId,
|
|
14364
|
-
route_key:
|
|
14558
|
+
route_key: Schema71.String
|
|
14365
14559
|
}) {
|
|
14366
14560
|
}
|
|
14367
14561
|
|
|
14368
|
-
class EnvelopeRouteDeferred extends
|
|
14562
|
+
class EnvelopeRouteDeferred extends Schema71.TaggedErrorClass()("EnvelopeRouteDeferred", {
|
|
14369
14563
|
address_id: exports_ids_schema.AddressId,
|
|
14370
|
-
route_key:
|
|
14564
|
+
route_key: Schema71.String
|
|
14371
14565
|
}) {
|
|
14372
14566
|
}
|
|
14373
14567
|
|
|
14374
|
-
class EnvelopeServiceError extends
|
|
14375
|
-
message:
|
|
14568
|
+
class EnvelopeServiceError extends Schema71.TaggedErrorClass()("EnvelopeServiceError", {
|
|
14569
|
+
message: Schema71.String
|
|
14376
14570
|
}) {
|
|
14377
14571
|
}
|
|
14378
14572
|
|
|
@@ -14530,7 +14724,7 @@ __export(exports_runner_runtime_service, {
|
|
|
14530
14724
|
DatabaseMode: () => DatabaseMode,
|
|
14531
14725
|
ClusterConfigMismatch: () => ClusterConfigMismatch
|
|
14532
14726
|
});
|
|
14533
|
-
import { Config as Config5, Context as Context62, Crypto as Crypto4, Duration as Duration5, Effect as Effect77, Layer as Layer69, Option as Option27, Schema as
|
|
14727
|
+
import { Config as Config5, Context as Context62, Crypto as Crypto4, Duration as Duration5, Effect as Effect77, Layer as Layer69, Option as Option27, Schema as Schema73, Stream as Stream10 } from "effect";
|
|
14534
14728
|
import {
|
|
14535
14729
|
ClusterWorkflowEngine,
|
|
14536
14730
|
HttpRunner,
|
|
@@ -14568,7 +14762,7 @@ __export(exports_scheduler_service, {
|
|
|
14568
14762
|
SchedulerError: () => SchedulerError,
|
|
14569
14763
|
ScheduleCronInvalid: () => ScheduleCronInvalid
|
|
14570
14764
|
});
|
|
14571
|
-
import { Clock as Clock10, Config as Config4, Context as Context61, Cron, Duration as Duration4, Effect as Effect76, Layer as Layer68, Random, Result as Result3, Schema as
|
|
14765
|
+
import { Clock as Clock10, Config as Config4, Context as Context61, Cron, Duration as Duration4, Effect as Effect76, Layer as Layer68, Random, Result as Result3, Schema as Schema72 } from "effect";
|
|
14572
14766
|
|
|
14573
14767
|
// ../runtime/src/wait/wait-signal.ts
|
|
14574
14768
|
var exports_wait_signal = {};
|
|
@@ -14588,14 +14782,14 @@ var signalWorkflowWait = Effect75.fn("WaitSignal.signalWorkflowWait")(function*
|
|
|
14588
14782
|
});
|
|
14589
14783
|
|
|
14590
14784
|
// ../runtime/src/schedule/scheduler-service.ts
|
|
14591
|
-
class SchedulerError extends
|
|
14592
|
-
message:
|
|
14785
|
+
class SchedulerError extends Schema72.TaggedErrorClass()("SchedulerError", {
|
|
14786
|
+
message: Schema72.String
|
|
14593
14787
|
}) {
|
|
14594
14788
|
}
|
|
14595
14789
|
|
|
14596
|
-
class ScheduleCronInvalid extends
|
|
14597
|
-
cron_expr:
|
|
14598
|
-
message:
|
|
14790
|
+
class ScheduleCronInvalid extends Schema72.TaggedErrorClass()("ScheduleCronInvalid", {
|
|
14791
|
+
cron_expr: Schema72.String,
|
|
14792
|
+
message: Schema72.String
|
|
14599
14793
|
}) {
|
|
14600
14794
|
}
|
|
14601
14795
|
|
|
@@ -14746,25 +14940,25 @@ var runOnce2 = Effect76.fn("SchedulerService.runOnce.call")(function* () {
|
|
|
14746
14940
|
});
|
|
14747
14941
|
|
|
14748
14942
|
// ../runtime/src/runner/runner-runtime-service.ts
|
|
14749
|
-
var DatabaseMode =
|
|
14943
|
+
var DatabaseMode = Schema73.Literals(["sql", "pg", "mysql", "sqlite", "memory"]).annotate({
|
|
14750
14944
|
identifier: "Relay.RunnerRuntime.DatabaseMode"
|
|
14751
14945
|
});
|
|
14752
|
-
var ReadinessStatus =
|
|
14946
|
+
var ReadinessStatus = Schema73.Struct({
|
|
14753
14947
|
database: DatabaseMode,
|
|
14754
|
-
cluster:
|
|
14755
|
-
workflow:
|
|
14756
|
-
executionEntity:
|
|
14948
|
+
cluster: Schema73.Literal("ready"),
|
|
14949
|
+
workflow: Schema73.Literals(["ready", "client"]),
|
|
14950
|
+
executionEntity: Schema73.Literals(["registered", "client"])
|
|
14757
14951
|
}).annotate({ identifier: "Relay.RunnerRuntime.ReadinessStatus" });
|
|
14758
14952
|
|
|
14759
|
-
class RunnerRuntimeError extends
|
|
14760
|
-
message:
|
|
14953
|
+
class RunnerRuntimeError extends Schema73.TaggedErrorClass()("RunnerRuntimeError", {
|
|
14954
|
+
message: Schema73.String
|
|
14761
14955
|
}) {
|
|
14762
14956
|
}
|
|
14763
14957
|
|
|
14764
|
-
class ClusterConfigMismatch extends
|
|
14765
|
-
field:
|
|
14766
|
-
expected:
|
|
14767
|
-
actual:
|
|
14958
|
+
class ClusterConfigMismatch extends Schema73.TaggedErrorClass()("ClusterConfigMismatch", {
|
|
14959
|
+
field: Schema73.String,
|
|
14960
|
+
expected: Schema73.String,
|
|
14961
|
+
actual: Schema73.String
|
|
14768
14962
|
}) {
|
|
14769
14963
|
}
|
|
14770
14964
|
|
|
@@ -14778,7 +14972,7 @@ var memoryClusterLayer = Sharding.layer.pipe(Layer69.provideMerge(Runners.layerN
|
|
|
14778
14972
|
var clusterHost = Config5.string("RELAY_CLUSTER_HOST").pipe(Config5.withDefault("localhost"));
|
|
14779
14973
|
var clusterPort = Config5.int("RELAY_CLUSTER_PORT").pipe(Config5.withDefault(34431));
|
|
14780
14974
|
var clusterShardsPerGroup = Config5.int("RELAY_CLUSTER_SHARDS_PER_GROUP").pipe(Config5.withDefault(300));
|
|
14781
|
-
var clusterShardGroups = Config5.schema(Config5.Array(
|
|
14975
|
+
var clusterShardGroups = Config5.schema(Config5.Array(Schema73.String), "RELAY_CLUSTER_SHARD_GROUPS").pipe(Config5.withDefault(["default", "execution"]));
|
|
14782
14976
|
var runnerAddressKey = (address) => `${address.host}:${address.port}`;
|
|
14783
14977
|
var runnerAddressEquals = (left, right) => left.host === right.host && left.port === right.port;
|
|
14784
14978
|
var shardingConfigFromEnv = () => Layer69.effect(ShardingConfig2.ShardingConfig, Effect77.gen(function* () {
|
|
@@ -15108,51 +15302,51 @@ __export(exports_activity_version_registry, {
|
|
|
15108
15302
|
ActivityManifestChange: () => ActivityManifestChange,
|
|
15109
15303
|
ActivityManifest: () => ActivityManifest
|
|
15110
15304
|
});
|
|
15111
|
-
import { Crypto as Crypto5, Effect as Effect78, Schema as
|
|
15305
|
+
import { Crypto as Crypto5, Effect as Effect78, Schema as Schema74 } from "effect";
|
|
15112
15306
|
var generatedFrom = "@relayfx/runtime/ExecutionWorkflow";
|
|
15113
|
-
var ActivityManifestEntry =
|
|
15114
|
-
name:
|
|
15115
|
-
signature_hash:
|
|
15307
|
+
var ActivityManifestEntry = Schema74.Struct({
|
|
15308
|
+
name: Schema74.String,
|
|
15309
|
+
signature_hash: Schema74.String
|
|
15116
15310
|
}).annotate({ identifier: "Relay.ActivityManifestEntry" });
|
|
15117
|
-
var ActivityManifest =
|
|
15118
|
-
version:
|
|
15119
|
-
generated_from:
|
|
15120
|
-
hash_algorithm:
|
|
15121
|
-
activities:
|
|
15311
|
+
var ActivityManifest = Schema74.Struct({
|
|
15312
|
+
version: Schema74.Literal(1),
|
|
15313
|
+
generated_from: Schema74.String,
|
|
15314
|
+
hash_algorithm: Schema74.Literal("sha256-json-schema-v1"),
|
|
15315
|
+
activities: Schema74.Array(ActivityManifestEntry)
|
|
15122
15316
|
}).annotate({ identifier: "Relay.ActivityManifest" });
|
|
15123
|
-
var ActivityManifestChange =
|
|
15124
|
-
type:
|
|
15125
|
-
name:
|
|
15126
|
-
baseline_hash:
|
|
15127
|
-
current_hash:
|
|
15317
|
+
var ActivityManifestChange = Schema74.Struct({
|
|
15318
|
+
type: Schema74.Literals(["removed", "changed", "added"]),
|
|
15319
|
+
name: Schema74.String,
|
|
15320
|
+
baseline_hash: Schema74.optionalKey(Schema74.String),
|
|
15321
|
+
current_hash: Schema74.optionalKey(Schema74.String)
|
|
15128
15322
|
}).annotate({ identifier: "Relay.ActivityManifestChange" });
|
|
15129
|
-
var ActivityManifestGuardResult =
|
|
15130
|
-
status:
|
|
15131
|
-
waiting_executions:
|
|
15132
|
-
breaking_changes:
|
|
15133
|
-
additive_changes:
|
|
15323
|
+
var ActivityManifestGuardResult = Schema74.Struct({
|
|
15324
|
+
status: Schema74.Literals(["pass", "fail"]),
|
|
15325
|
+
waiting_executions: Schema74.Int.check(Schema74.isGreaterThanOrEqualTo(0)),
|
|
15326
|
+
breaking_changes: Schema74.Array(ActivityManifestChange),
|
|
15327
|
+
additive_changes: Schema74.Array(ActivityManifestChange)
|
|
15134
15328
|
}).annotate({ identifier: "Relay.ActivityManifestGuardResult" });
|
|
15135
15329
|
|
|
15136
|
-
class ActivityManifestGuardFailed extends
|
|
15137
|
-
message:
|
|
15330
|
+
class ActivityManifestGuardFailed extends Schema74.TaggedErrorClass()("ActivityManifestGuardFailed", {
|
|
15331
|
+
message: Schema74.String,
|
|
15138
15332
|
result: ActivityManifestGuardResult
|
|
15139
15333
|
}) {
|
|
15140
15334
|
}
|
|
15141
|
-
var TurnInput =
|
|
15335
|
+
var TurnInput = Schema74.Struct({
|
|
15142
15336
|
start: StartInput,
|
|
15143
|
-
turn:
|
|
15337
|
+
turn: Schema74.Int.check(Schema74.isGreaterThanOrEqualTo(0))
|
|
15144
15338
|
});
|
|
15145
|
-
var WaitIdInput =
|
|
15339
|
+
var WaitIdInput = Schema74.Struct({
|
|
15146
15340
|
wait_id: exports_ids_schema.WaitId
|
|
15147
15341
|
});
|
|
15148
|
-
var WorkspaceKeyInput =
|
|
15342
|
+
var WorkspaceKeyInput = Schema74.Struct({
|
|
15149
15343
|
start: StartInput,
|
|
15150
|
-
key:
|
|
15344
|
+
key: Schema74.String
|
|
15151
15345
|
});
|
|
15152
15346
|
var contracts = [
|
|
15153
15347
|
{
|
|
15154
15348
|
name: ActivityNameTemplates.resolveLocalAgent,
|
|
15155
|
-
input:
|
|
15349
|
+
input: Schema74.Struct({ address_id: exports_ids_schema.AddressId }),
|
|
15156
15350
|
success: LocalAgentTarget,
|
|
15157
15351
|
error: ExecutionWorkflowFailed
|
|
15158
15352
|
},
|
|
@@ -15164,66 +15358,66 @@ var contracts = [
|
|
|
15164
15358
|
},
|
|
15165
15359
|
{
|
|
15166
15360
|
name: ActivityNameTemplates.cancel,
|
|
15167
|
-
input:
|
|
15361
|
+
input: Schema74.Struct({ start: StartInput, turn: Schema74.Int, reason: Schema74.String }),
|
|
15168
15362
|
success: exports_execution_schema.Execution,
|
|
15169
15363
|
error: ExecutionWorkflowFailed
|
|
15170
15364
|
},
|
|
15171
15365
|
{
|
|
15172
15366
|
name: ActivityNameTemplates.checkCancel,
|
|
15173
15367
|
input: TurnInput,
|
|
15174
|
-
success:
|
|
15368
|
+
success: Schema74.Boolean,
|
|
15175
15369
|
error: ExecutionWorkflowFailed
|
|
15176
15370
|
},
|
|
15177
15371
|
{
|
|
15178
15372
|
name: ActivityNameTemplates.loadWaitBeforeSleep,
|
|
15179
15373
|
input: WaitIdInput,
|
|
15180
|
-
success:
|
|
15374
|
+
success: Schema74.UndefinedOr(WaitSnapshot),
|
|
15181
15375
|
error: ExecutionWorkflowFailed
|
|
15182
15376
|
},
|
|
15183
15377
|
{
|
|
15184
15378
|
name: ActivityNameTemplates.loadWaitAfterWake,
|
|
15185
15379
|
input: WaitIdInput,
|
|
15186
|
-
success:
|
|
15380
|
+
success: Schema74.UndefinedOr(WaitSnapshot),
|
|
15187
15381
|
error: ExecutionWorkflowFailed
|
|
15188
15382
|
},
|
|
15189
15383
|
{
|
|
15190
15384
|
name: ActivityNameTemplates.markWaiting,
|
|
15191
|
-
input:
|
|
15385
|
+
input: Schema74.Struct({ start: StartInput, wait: WaitSnapshot }),
|
|
15192
15386
|
success: exports_execution_schema.Execution,
|
|
15193
15387
|
error: ExecutionWorkflowFailed
|
|
15194
15388
|
},
|
|
15195
15389
|
{
|
|
15196
15390
|
name: ActivityNameTemplates.ensureWorkspace,
|
|
15197
15391
|
input: StartInput,
|
|
15198
|
-
success:
|
|
15392
|
+
success: Schema74.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
15199
15393
|
error: ExecutionWorkflowFailed
|
|
15200
15394
|
},
|
|
15201
15395
|
{
|
|
15202
15396
|
name: ActivityNameTemplates.suspendWorkspace,
|
|
15203
15397
|
input: WorkspaceKeyInput,
|
|
15204
|
-
success:
|
|
15398
|
+
success: Schema74.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
15205
15399
|
error: ExecutionWorkflowFailed
|
|
15206
15400
|
},
|
|
15207
15401
|
{
|
|
15208
15402
|
name: ActivityNameTemplates.resumeWorkspace,
|
|
15209
15403
|
input: WorkspaceKeyInput,
|
|
15210
|
-
success:
|
|
15404
|
+
success: Schema74.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
15211
15405
|
error: ExecutionWorkflowFailed
|
|
15212
15406
|
},
|
|
15213
15407
|
{
|
|
15214
15408
|
name: ActivityNameTemplates.releaseWorkspace,
|
|
15215
15409
|
input: StartInput,
|
|
15216
|
-
success:
|
|
15410
|
+
success: Schema74.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
15217
15411
|
error: ExecutionWorkflowFailed
|
|
15218
15412
|
},
|
|
15219
15413
|
{
|
|
15220
15414
|
name: ActivityNameTemplates.complete,
|
|
15221
|
-
input:
|
|
15415
|
+
input: Schema74.Struct({
|
|
15222
15416
|
start: StartInput,
|
|
15223
|
-
turn:
|
|
15224
|
-
wait_id:
|
|
15225
|
-
wait_state:
|
|
15226
|
-
pending_tool_call:
|
|
15417
|
+
turn: Schema74.Int.check(Schema74.isGreaterThanOrEqualTo(0)),
|
|
15418
|
+
wait_id: Schema74.optionalKey(exports_ids_schema.WaitId),
|
|
15419
|
+
wait_state: Schema74.optionalKey(WaitSignalState),
|
|
15420
|
+
pending_tool_call: Schema74.optionalKey(exports_tool_schema.Call)
|
|
15227
15421
|
}),
|
|
15228
15422
|
success: exports_execution_schema.Execution,
|
|
15229
15423
|
error: ExecutionWorkflowFailed
|
|
@@ -15231,24 +15425,24 @@ var contracts = [
|
|
|
15231
15425
|
{
|
|
15232
15426
|
name: ActivityNameTemplates.checkQueuedChildCancellation,
|
|
15233
15427
|
input: StartInput,
|
|
15234
|
-
success:
|
|
15428
|
+
success: Schema74.Boolean,
|
|
15235
15429
|
error: ExecutionWorkflowFailed
|
|
15236
15430
|
},
|
|
15237
15431
|
{
|
|
15238
15432
|
name: ActivityNameTemplates.notifyParent,
|
|
15239
|
-
input:
|
|
15433
|
+
input: Schema74.Struct({
|
|
15240
15434
|
start: StartInput,
|
|
15241
15435
|
status: ChildTerminalStatus,
|
|
15242
|
-
output:
|
|
15436
|
+
output: Schema74.Array(exports_content_schema.Part)
|
|
15243
15437
|
}),
|
|
15244
|
-
success:
|
|
15438
|
+
success: Schema74.Void,
|
|
15245
15439
|
error: ExecutionWorkflowFailed
|
|
15246
15440
|
},
|
|
15247
15441
|
{
|
|
15248
15442
|
name: ActivityNameTemplates.continueAsNew,
|
|
15249
|
-
input:
|
|
15443
|
+
input: Schema74.Struct({
|
|
15250
15444
|
start: StartInput,
|
|
15251
|
-
turn:
|
|
15445
|
+
turn: Schema74.Int.check(Schema74.isGreaterThanOrEqualTo(0)),
|
|
15252
15446
|
wait_id: exports_ids_schema.WaitId,
|
|
15253
15447
|
pending_tool_call: exports_tool_schema.Call
|
|
15254
15448
|
}),
|
|
@@ -15256,7 +15450,7 @@ var contracts = [
|
|
|
15256
15450
|
error: ExecutionWorkflowFailed
|
|
15257
15451
|
}
|
|
15258
15452
|
];
|
|
15259
|
-
var schemaJson = (schema) =>
|
|
15453
|
+
var schemaJson = (schema) => Schema74.decodeUnknownSync(exports_shared_schema.JsonValue)(Schema74.toJsonSchemaDocument(schema));
|
|
15260
15454
|
var canonical = (value) => {
|
|
15261
15455
|
if (value === null || typeof value !== "object")
|
|
15262
15456
|
return value;
|
|
@@ -15347,11 +15541,11 @@ var guard = Effect78.fn("ActivityVersionRegistry.guard")(function* (input) {
|
|
|
15347
15541
|
}));
|
|
15348
15542
|
});
|
|
15349
15543
|
// src/client.ts
|
|
15350
|
-
import { Clock as Clock11, Context as Context63, Effect as Effect79, Layer as Layer70, Option as Option28, Schema as
|
|
15544
|
+
import { Clock as Clock11, Context as Context63, Effect as Effect79, Layer as Layer70, Option as Option28, Schema as Schema75, SchemaGetter, SchemaIssue, Stream as Stream11 } from "effect";
|
|
15351
15545
|
import { EntityId, ShardId, Sharding as Sharding2, ShardingConfig as ShardingConfig3 } from "effect/unstable/cluster";
|
|
15352
15546
|
|
|
15353
|
-
class ClientError extends
|
|
15354
|
-
message:
|
|
15547
|
+
class ClientError extends Schema75.TaggedErrorClass()("ClientError", {
|
|
15548
|
+
message: Schema75.String
|
|
15355
15549
|
}) {
|
|
15356
15550
|
}
|
|
15357
15551
|
|
|
@@ -15383,11 +15577,11 @@ var decodeCursorFields = (wire) => Effect79.gen(function* () {
|
|
|
15383
15577
|
return yield* Effect79.fail(malformedCursor(wire));
|
|
15384
15578
|
return { updatedAt, id: decoded.slice(separator + 1) };
|
|
15385
15579
|
});
|
|
15386
|
-
var ExecutionCursorFromString = exports_shared_schema.NonEmptyString.pipe(
|
|
15580
|
+
var ExecutionCursorFromString = exports_shared_schema.NonEmptyString.pipe(Schema75.decodeTo(Schema75.Struct({ updatedAt: Schema75.Int, id: exports_ids_schema.ExecutionId }), {
|
|
15387
15581
|
decode: SchemaGetter.transformOrFail((wire) => decodeCursorFields(wire)),
|
|
15388
15582
|
encode: SchemaGetter.transform((cursor) => globalThis.btoa(`${cursor.updatedAt}:${cursor.id}`))
|
|
15389
15583
|
})).annotate({ identifier: "Relay.Client.ExecutionCursor" });
|
|
15390
|
-
var SessionCursorFromString = exports_shared_schema.NonEmptyString.pipe(
|
|
15584
|
+
var SessionCursorFromString = exports_shared_schema.NonEmptyString.pipe(Schema75.decodeTo(Schema75.Struct({ updatedAt: Schema75.Int, id: exports_ids_schema.SessionId }), {
|
|
15391
15585
|
decode: SchemaGetter.transformOrFail((wire) => decodeCursorFields(wire)),
|
|
15392
15586
|
encode: SchemaGetter.transform((cursor) => globalThis.btoa(`${cursor.updatedAt}:${cursor.id}`))
|
|
15393
15587
|
})).annotate({ identifier: "Relay.Client.SessionCursor" });
|
|
@@ -15475,7 +15669,7 @@ var registerAgentPayload = (input) => {
|
|
|
15475
15669
|
return exports_agent_schema.define(input);
|
|
15476
15670
|
return exports_agent_schema.define({
|
|
15477
15671
|
id: input.id,
|
|
15478
|
-
name:
|
|
15672
|
+
name: Schema75.decodeUnknownSync(exports_shared_schema.NonEmptyString)(input.agent.name),
|
|
15479
15673
|
...input.agent.instructions === undefined ? {} : { instructions: input.agent.instructions },
|
|
15480
15674
|
model: input.model,
|
|
15481
15675
|
tools: toolRefsFromBatonAgent(input.agent),
|
|
@@ -15719,27 +15913,27 @@ var layerFromRuntime = Layer70.effect(Service50, Effect79.gen(function* () {
|
|
|
15719
15913
|
return records.map(toWaitView);
|
|
15720
15914
|
}),
|
|
15721
15915
|
listExecutions: Effect79.fn("Client.runtime.listExecutions")(function* (input) {
|
|
15722
|
-
const cursor = input.cursor === undefined ? undefined : yield*
|
|
15916
|
+
const cursor = input.cursor === undefined ? undefined : yield* Schema75.decodeEffect(ExecutionCursorFromString)(input.cursor).pipe(Effect79.mapError(toClientError));
|
|
15723
15917
|
const result = yield* executionRepository.list({
|
|
15724
15918
|
...input.root_address_id === undefined ? {} : { rootAddressId: input.root_address_id },
|
|
15725
15919
|
...input.status === undefined ? {} : { status: input.status },
|
|
15726
15920
|
...input.limit === undefined ? {} : { limit: input.limit },
|
|
15727
15921
|
...cursor === undefined ? {} : { cursor }
|
|
15728
15922
|
}).pipe(Effect79.mapError(toClientError));
|
|
15729
|
-
const nextCursor = result.nextCursor === undefined ? undefined : yield*
|
|
15923
|
+
const nextCursor = result.nextCursor === undefined ? undefined : yield* Schema75.encodeEffect(ExecutionCursorFromString)(result.nextCursor).pipe(Effect79.mapError(toClientError));
|
|
15730
15924
|
return {
|
|
15731
15925
|
records: result.records.map(toConversationSummary),
|
|
15732
15926
|
...nextCursor === undefined ? {} : { next_cursor: nextCursor }
|
|
15733
15927
|
};
|
|
15734
15928
|
}),
|
|
15735
15929
|
listSessions: Effect79.fn("Client.runtime.listSessions")(function* (input) {
|
|
15736
|
-
const cursor = input.cursor === undefined ? undefined : yield*
|
|
15930
|
+
const cursor = input.cursor === undefined ? undefined : yield* Schema75.decodeEffect(SessionCursorFromString)(input.cursor).pipe(Effect79.mapError(toClientError));
|
|
15737
15931
|
const result = yield* sessionRepository.list({
|
|
15738
15932
|
...input.root_address_id === undefined ? {} : { rootAddressId: input.root_address_id },
|
|
15739
15933
|
...input.limit === undefined ? {} : { limit: input.limit },
|
|
15740
15934
|
...cursor === undefined ? {} : { cursor }
|
|
15741
15935
|
}).pipe(Effect79.mapError(toClientError));
|
|
15742
|
-
const nextCursor = result.nextCursor === undefined ? undefined : yield*
|
|
15936
|
+
const nextCursor = result.nextCursor === undefined ? undefined : yield* Schema75.encodeEffect(SessionCursorFromString)(result.nextCursor).pipe(Effect79.mapError(toClientError));
|
|
15743
15937
|
return {
|
|
15744
15938
|
records: result.records.map(toSessionSummary),
|
|
15745
15939
|
...nextCursor === undefined ? {} : { next_cursor: nextCursor }
|
|
@@ -15749,13 +15943,13 @@ var layerFromRuntime = Layer70.effect(Service50, Effect79.gen(function* () {
|
|
|
15749
15943
|
const session = yield* sessionRepository.get(input.session_id).pipe(Effect79.mapError(toClientError));
|
|
15750
15944
|
if (session === undefined)
|
|
15751
15945
|
return yield* new ClientError({ message: `Session not found: ${input.session_id}` });
|
|
15752
|
-
const cursor = input.cursor === undefined ? undefined : yield*
|
|
15946
|
+
const cursor = input.cursor === undefined ? undefined : yield* Schema75.decodeEffect(ExecutionCursorFromString)(input.cursor).pipe(Effect79.mapError(toClientError));
|
|
15753
15947
|
const result = yield* executionRepository.list({
|
|
15754
15948
|
sessionId: input.session_id,
|
|
15755
15949
|
...input.limit === undefined ? {} : { limit: input.limit },
|
|
15756
15950
|
...cursor === undefined ? {} : { cursor }
|
|
15757
15951
|
}).pipe(Effect79.mapError(toClientError));
|
|
15758
|
-
const nextCursor = result.nextCursor === undefined ? undefined : yield*
|
|
15952
|
+
const nextCursor = result.nextCursor === undefined ? undefined : yield* Schema75.encodeEffect(ExecutionCursorFromString)(result.nextCursor).pipe(Effect79.mapError(toClientError));
|
|
15759
15953
|
return {
|
|
15760
15954
|
session: toSessionSummary(session),
|
|
15761
15955
|
executions: result.records.map(toConversationSummary),
|
|
@@ -16168,92 +16362,92 @@ __export(exports_operation, {
|
|
|
16168
16362
|
CancelExecutionAccepted: () => CancelExecutionAccepted,
|
|
16169
16363
|
AckEnvelopeReadyInput: () => AckEnvelopeReadyInput
|
|
16170
16364
|
});
|
|
16171
|
-
import { Schema as
|
|
16172
|
-
var StartExecutionInput =
|
|
16365
|
+
import { Schema as Schema76 } from "effect";
|
|
16366
|
+
var StartExecutionInput = Schema76.Struct({
|
|
16173
16367
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16174
16368
|
root_address_id: exports_ids_schema.AddressId,
|
|
16175
|
-
session_id:
|
|
16176
|
-
input:
|
|
16369
|
+
session_id: Schema76.optionalKey(exports_ids_schema.SessionId),
|
|
16370
|
+
input: Schema76.optionalKey(Schema76.Array(exports_content_schema.Part)),
|
|
16177
16371
|
event_sequence: exports_execution_schema.ExecutionEventSequence,
|
|
16178
16372
|
started_at: exports_shared_schema.TimestampMillis,
|
|
16179
16373
|
completed_at: exports_shared_schema.TimestampMillis,
|
|
16180
|
-
agent_id:
|
|
16181
|
-
agent_revision:
|
|
16182
|
-
agent_snapshot:
|
|
16183
|
-
agent_tool_input_schema_digests:
|
|
16184
|
-
wait_id:
|
|
16185
|
-
metadata:
|
|
16374
|
+
agent_id: Schema76.optionalKey(exports_ids_schema.AgentId),
|
|
16375
|
+
agent_revision: Schema76.optionalKey(exports_agent_schema.DefinitionRevision),
|
|
16376
|
+
agent_snapshot: Schema76.optionalKey(exports_agent_schema.Definition),
|
|
16377
|
+
agent_tool_input_schema_digests: Schema76.optionalKey(exports_agent_schema.ToolInputSchemaDigests),
|
|
16378
|
+
wait_id: Schema76.optionalKey(exports_ids_schema.WaitId),
|
|
16379
|
+
metadata: Schema76.optionalKey(exports_shared_schema.Metadata)
|
|
16186
16380
|
}).annotate({ identifier: "Relay.Operation.StartExecutionInput" });
|
|
16187
|
-
var StartExecutionResult =
|
|
16381
|
+
var StartExecutionResult = Schema76.Struct({
|
|
16188
16382
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16189
16383
|
status: exports_execution_schema.ExecutionStatus,
|
|
16190
|
-
metadata:
|
|
16384
|
+
metadata: Schema76.optionalKey(exports_shared_schema.Metadata)
|
|
16191
16385
|
}).annotate({ identifier: "Relay.Operation.StartExecutionResult" });
|
|
16192
|
-
var StreamExecutionInput =
|
|
16386
|
+
var StreamExecutionInput = Schema76.Struct({
|
|
16193
16387
|
execution_id: exports_execution_schema.Execution.fields.id,
|
|
16194
|
-
after_cursor:
|
|
16195
|
-
limit:
|
|
16388
|
+
after_cursor: Schema76.optionalKey(exports_shared_schema.NonEmptyString),
|
|
16389
|
+
limit: Schema76.optionalKey(Schema76.Int.check(Schema76.isGreaterThan(0)))
|
|
16196
16390
|
}).annotate({ identifier: "Relay.Operation.StreamExecutionInput" });
|
|
16197
|
-
var WaitTerminalState =
|
|
16391
|
+
var WaitTerminalState = Schema76.Literals(["resolved", "timed_out", "cancelled"]).annotate({
|
|
16198
16392
|
identifier: "Relay.Operation.WaitTerminalState"
|
|
16199
16393
|
});
|
|
16200
|
-
var CancelExecutionInput2 =
|
|
16394
|
+
var CancelExecutionInput2 = Schema76.Struct({
|
|
16201
16395
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16202
16396
|
cancelled_at: exports_shared_schema.TimestampMillis,
|
|
16203
|
-
reason:
|
|
16397
|
+
reason: Schema76.optionalKey(Schema76.String)
|
|
16204
16398
|
}).annotate({ identifier: "Relay.Operation.CancelExecutionInput" });
|
|
16205
|
-
var CancelExecutionAccepted =
|
|
16399
|
+
var CancelExecutionAccepted = Schema76.Struct({
|
|
16206
16400
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16207
16401
|
status: exports_execution_schema.ExecutionStatus
|
|
16208
16402
|
}).annotate({ identifier: "Relay.Operation.CancelExecutionAccepted" });
|
|
16209
|
-
var SteeringKind =
|
|
16403
|
+
var SteeringKind = Schema76.Literals(["steering", "follow_up"]).annotate({
|
|
16210
16404
|
identifier: "Relay.Operation.SteeringKind"
|
|
16211
16405
|
});
|
|
16212
|
-
var SteerInput =
|
|
16406
|
+
var SteerInput = Schema76.Struct({
|
|
16213
16407
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16214
16408
|
kind: SteeringKind,
|
|
16215
|
-
content:
|
|
16409
|
+
content: Schema76.Array(exports_content_schema.Part),
|
|
16216
16410
|
created_at: exports_shared_schema.TimestampMillis
|
|
16217
16411
|
}).annotate({ identifier: "Relay.Operation.SteerInput" });
|
|
16218
|
-
var SteerAccepted =
|
|
16412
|
+
var SteerAccepted = Schema76.Struct({
|
|
16219
16413
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16220
16414
|
kind: SteeringKind,
|
|
16221
|
-
sequence:
|
|
16415
|
+
sequence: Schema76.Int.check(Schema76.isGreaterThanOrEqualTo(0))
|
|
16222
16416
|
}).annotate({ identifier: "Relay.Operation.SteerAccepted" });
|
|
16223
|
-
var WakeInput =
|
|
16417
|
+
var WakeInput = Schema76.Struct({
|
|
16224
16418
|
wait_id: exports_ids_schema.WaitId,
|
|
16225
16419
|
state: WaitTerminalState,
|
|
16226
16420
|
signaled_at: exports_shared_schema.TimestampMillis,
|
|
16227
|
-
from:
|
|
16228
|
-
content:
|
|
16229
|
-
correlation_key:
|
|
16230
|
-
metadata:
|
|
16421
|
+
from: Schema76.optionalKey(exports_ids_schema.AddressId),
|
|
16422
|
+
content: Schema76.optionalKey(Schema76.Array(exports_content_schema.Part)),
|
|
16423
|
+
correlation_key: Schema76.optionalKey(Schema76.String),
|
|
16424
|
+
metadata: Schema76.optionalKey(exports_shared_schema.Metadata)
|
|
16231
16425
|
}).annotate({ identifier: "Relay.Operation.WakeInput" });
|
|
16232
|
-
var WakeAccepted =
|
|
16426
|
+
var WakeAccepted = Schema76.Struct({
|
|
16233
16427
|
wait_id: exports_ids_schema.WaitId,
|
|
16234
16428
|
state: WaitTerminalState,
|
|
16235
16429
|
signaled_at: exports_shared_schema.TimestampMillis
|
|
16236
16430
|
}).annotate({ identifier: "Relay.Operation.WakeAccepted" });
|
|
16237
|
-
var WaitState2 =
|
|
16431
|
+
var WaitState2 = Schema76.Literals(["open", "resolved", "timed_out", "cancelled"]).annotate({
|
|
16238
16432
|
identifier: "Relay.Operation.WaitState"
|
|
16239
16433
|
});
|
|
16240
|
-
var ListWaitsInput =
|
|
16241
|
-
state:
|
|
16242
|
-
execution_id:
|
|
16243
|
-
limit:
|
|
16434
|
+
var ListWaitsInput = Schema76.Struct({
|
|
16435
|
+
state: Schema76.optionalKey(WaitState2),
|
|
16436
|
+
execution_id: Schema76.optionalKey(exports_ids_schema.ExecutionId),
|
|
16437
|
+
limit: Schema76.optionalKey(Schema76.Int.check(Schema76.isGreaterThan(0)))
|
|
16244
16438
|
}).annotate({ identifier: "Relay.Operation.ListWaitsInput" });
|
|
16245
|
-
var WaitView =
|
|
16439
|
+
var WaitView = Schema76.Struct({
|
|
16246
16440
|
wait_id: exports_ids_schema.WaitId,
|
|
16247
16441
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16248
|
-
envelope_id:
|
|
16442
|
+
envelope_id: Schema76.optionalKey(exports_ids_schema.EnvelopeId),
|
|
16249
16443
|
mode: exports_envelope_schema.WaitMode,
|
|
16250
|
-
correlation_key:
|
|
16444
|
+
correlation_key: Schema76.optionalKey(Schema76.String),
|
|
16251
16445
|
state: WaitState2,
|
|
16252
16446
|
metadata: exports_shared_schema.Metadata,
|
|
16253
16447
|
created_at: exports_shared_schema.TimestampMillis,
|
|
16254
|
-
resolved_at:
|
|
16448
|
+
resolved_at: Schema76.optionalKey(exports_shared_schema.TimestampMillis)
|
|
16255
16449
|
}).annotate({ identifier: "Relay.Operation.WaitView" });
|
|
16256
|
-
var PendingToolApproval =
|
|
16450
|
+
var PendingToolApproval = Schema76.Struct({
|
|
16257
16451
|
wait_id: exports_ids_schema.WaitId,
|
|
16258
16452
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16259
16453
|
tool_call_id: exports_ids_schema.ToolCallId,
|
|
@@ -16261,169 +16455,169 @@ var PendingToolApproval = Schema75.Struct({
|
|
|
16261
16455
|
input: exports_shared_schema.JsonValue,
|
|
16262
16456
|
requested_at: exports_shared_schema.TimestampMillis
|
|
16263
16457
|
}).annotate({ identifier: "Relay.Operation.PendingToolApproval" });
|
|
16264
|
-
var ListPendingApprovalsInput =
|
|
16458
|
+
var ListPendingApprovalsInput = Schema76.Struct({
|
|
16265
16459
|
execution_id: exports_ids_schema.ExecutionId
|
|
16266
16460
|
}).annotate({ identifier: "Relay.Operation.ListPendingApprovalsInput" });
|
|
16267
|
-
var PendingToolApprovalList =
|
|
16268
|
-
approvals:
|
|
16461
|
+
var PendingToolApprovalList = Schema76.Struct({
|
|
16462
|
+
approvals: Schema76.Array(PendingToolApproval)
|
|
16269
16463
|
}).annotate({ identifier: "Relay.Operation.PendingToolApprovalList" });
|
|
16270
|
-
var ResolveToolApprovalInput =
|
|
16464
|
+
var ResolveToolApprovalInput = Schema76.Struct({
|
|
16271
16465
|
wait_id: exports_ids_schema.WaitId,
|
|
16272
|
-
approved:
|
|
16273
|
-
comment:
|
|
16466
|
+
approved: Schema76.Boolean,
|
|
16467
|
+
comment: Schema76.optionalKey(Schema76.String),
|
|
16274
16468
|
resolved_at: exports_shared_schema.TimestampMillis
|
|
16275
16469
|
}).annotate({ identifier: "Relay.Operation.ResolveToolApprovalInput" });
|
|
16276
|
-
var PermissionAnswer =
|
|
16470
|
+
var PermissionAnswer = Schema76.Literals(["Approved", "Denied", "Always"]).annotate({
|
|
16277
16471
|
identifier: "Relay.Operation.PermissionAnswer"
|
|
16278
16472
|
});
|
|
16279
|
-
var ResolvePermissionInput =
|
|
16473
|
+
var ResolvePermissionInput = Schema76.Struct({
|
|
16280
16474
|
wait_id: exports_ids_schema.WaitId,
|
|
16281
16475
|
answer: PermissionAnswer,
|
|
16282
|
-
reason:
|
|
16476
|
+
reason: Schema76.optionalKey(Schema76.String),
|
|
16283
16477
|
resolved_at: exports_shared_schema.TimestampMillis
|
|
16284
16478
|
}).annotate({ identifier: "Relay.Operation.ResolvePermissionInput" });
|
|
16285
|
-
var SubmitInboundEnvelopeInput =
|
|
16479
|
+
var SubmitInboundEnvelopeInput = Schema76.Struct({
|
|
16286
16480
|
envelope: exports_envelope_schema.SendInput,
|
|
16287
16481
|
wake: WakeInput
|
|
16288
16482
|
}).annotate({ identifier: "Relay.Operation.SubmitInboundEnvelopeInput" });
|
|
16289
|
-
var SubmitInboundEnvelopeAccepted =
|
|
16483
|
+
var SubmitInboundEnvelopeAccepted = Schema76.Struct({
|
|
16290
16484
|
envelope: exports_envelope_schema.EnvelopeAccepted,
|
|
16291
16485
|
wake: WakeAccepted
|
|
16292
16486
|
}).annotate({ identifier: "Relay.Operation.SubmitInboundEnvelopeAccepted" });
|
|
16293
|
-
var ClaimEnvelopeReadyInput =
|
|
16487
|
+
var ClaimEnvelopeReadyInput = Schema76.Struct({
|
|
16294
16488
|
route_type: exports_address_schema.RouteKind,
|
|
16295
|
-
route_key:
|
|
16489
|
+
route_key: Schema76.optionalKey(Schema76.String),
|
|
16296
16490
|
worker_id: exports_shared_schema.NonEmptyString,
|
|
16297
16491
|
now: exports_shared_schema.TimestampMillis,
|
|
16298
16492
|
claim_expires_at: exports_shared_schema.TimestampMillis
|
|
16299
16493
|
}).annotate({ identifier: "Relay.Operation.ClaimEnvelopeReadyInput" });
|
|
16300
|
-
var EnvelopeReadyLease =
|
|
16494
|
+
var EnvelopeReadyLease = Schema76.Struct({
|
|
16301
16495
|
ready: exports_envelope_schema.EnvelopeReady,
|
|
16302
16496
|
worker_id: exports_shared_schema.NonEmptyString,
|
|
16303
16497
|
claim_expires_at: exports_shared_schema.TimestampMillis
|
|
16304
16498
|
}).annotate({ identifier: "Relay.Operation.EnvelopeReadyLease" });
|
|
16305
|
-
var AckEnvelopeReadyInput =
|
|
16499
|
+
var AckEnvelopeReadyInput = Schema76.Struct({
|
|
16306
16500
|
envelope_ready_id: exports_ids_schema.EnvelopeReadyId,
|
|
16307
16501
|
worker_id: exports_shared_schema.NonEmptyString,
|
|
16308
16502
|
acknowledged_at: exports_shared_schema.TimestampMillis
|
|
16309
16503
|
}).annotate({ identifier: "Relay.Operation.AckEnvelopeReadyInput" });
|
|
16310
|
-
var EnvelopeReadyAcked =
|
|
16504
|
+
var EnvelopeReadyAcked = Schema76.Struct({
|
|
16311
16505
|
envelope_ready_id: exports_ids_schema.EnvelopeReadyId,
|
|
16312
|
-
state:
|
|
16506
|
+
state: Schema76.Literal("acknowledged"),
|
|
16313
16507
|
acknowledged_at: exports_shared_schema.TimestampMillis
|
|
16314
16508
|
}).annotate({ identifier: "Relay.Operation.EnvelopeReadyAcked" });
|
|
16315
|
-
var ReleaseEnvelopeReadyInput =
|
|
16509
|
+
var ReleaseEnvelopeReadyInput = Schema76.Struct({
|
|
16316
16510
|
envelope_ready_id: exports_ids_schema.EnvelopeReadyId,
|
|
16317
16511
|
worker_id: exports_shared_schema.NonEmptyString,
|
|
16318
16512
|
next_available_at: exports_shared_schema.TimestampMillis,
|
|
16319
|
-
error:
|
|
16513
|
+
error: Schema76.optionalKey(Schema76.String)
|
|
16320
16514
|
}).annotate({ identifier: "Relay.Operation.ReleaseEnvelopeReadyInput" });
|
|
16321
|
-
var EnvelopeReadyReleased =
|
|
16515
|
+
var EnvelopeReadyReleased = Schema76.Struct({
|
|
16322
16516
|
envelope_ready_id: exports_ids_schema.EnvelopeReadyId,
|
|
16323
|
-
state:
|
|
16517
|
+
state: Schema76.Literal("ready"),
|
|
16324
16518
|
next_available_at: exports_shared_schema.TimestampMillis
|
|
16325
16519
|
}).annotate({ identifier: "Relay.Operation.EnvelopeReadyReleased" });
|
|
16326
|
-
var CreateScheduleInput =
|
|
16520
|
+
var CreateScheduleInput = Schema76.Struct({
|
|
16327
16521
|
schedule_id: exports_ids_schema.ScheduleId,
|
|
16328
16522
|
kind: exports_schedule_schema.ScheduleKind,
|
|
16329
16523
|
target_kind: exports_schedule_schema.ScheduleTargetKind,
|
|
16330
|
-
address_id:
|
|
16331
|
-
wait_id:
|
|
16332
|
-
cron_expr:
|
|
16333
|
-
input:
|
|
16524
|
+
address_id: Schema76.optionalKey(exports_ids_schema.AddressId),
|
|
16525
|
+
wait_id: Schema76.optionalKey(exports_ids_schema.WaitId),
|
|
16526
|
+
cron_expr: Schema76.optionalKey(exports_shared_schema.NonEmptyString),
|
|
16527
|
+
input: Schema76.optionalKey(Schema76.Array(exports_content_schema.Part)),
|
|
16334
16528
|
next_run_at: exports_shared_schema.TimestampMillis,
|
|
16335
|
-
idempotency_key:
|
|
16336
|
-
metadata:
|
|
16529
|
+
idempotency_key: Schema76.optionalKey(exports_shared_schema.NonEmptyString),
|
|
16530
|
+
metadata: Schema76.optionalKey(exports_shared_schema.Metadata)
|
|
16337
16531
|
}).annotate({ identifier: "Relay.Operation.CreateScheduleInput" });
|
|
16338
|
-
var CreateScheduleResult =
|
|
16532
|
+
var CreateScheduleResult = Schema76.Struct({
|
|
16339
16533
|
schedule: exports_schedule_schema.ScheduleRecord
|
|
16340
16534
|
}).annotate({ identifier: "Relay.Operation.CreateScheduleResult" });
|
|
16341
|
-
var CancelScheduleInput =
|
|
16535
|
+
var CancelScheduleInput = Schema76.Struct({
|
|
16342
16536
|
schedule_id: exports_ids_schema.ScheduleId,
|
|
16343
16537
|
cancelled_at: exports_shared_schema.TimestampMillis
|
|
16344
16538
|
}).annotate({ identifier: "Relay.Operation.CancelScheduleInput" });
|
|
16345
|
-
var CancelScheduleResult =
|
|
16539
|
+
var CancelScheduleResult = Schema76.Struct({
|
|
16346
16540
|
schedule: exports_schedule_schema.ScheduleRecord
|
|
16347
16541
|
}).annotate({ identifier: "Relay.Operation.CancelScheduleResult" });
|
|
16348
|
-
var ListSchedulesInput =
|
|
16349
|
-
state:
|
|
16542
|
+
var ListSchedulesInput = Schema76.Struct({
|
|
16543
|
+
state: Schema76.optionalKey(exports_schedule_schema.ScheduleState)
|
|
16350
16544
|
}).annotate({ identifier: "Relay.Operation.ListSchedulesInput" });
|
|
16351
|
-
var ListSchedulesResult =
|
|
16352
|
-
schedules:
|
|
16545
|
+
var ListSchedulesResult = Schema76.Struct({
|
|
16546
|
+
schedules: Schema76.Array(exports_schedule_schema.ScheduleRecord)
|
|
16353
16547
|
}).annotate({ identifier: "Relay.Operation.ListSchedulesResult" });
|
|
16354
|
-
var ListExecutionsInput =
|
|
16355
|
-
root_address_id:
|
|
16356
|
-
status:
|
|
16357
|
-
limit:
|
|
16358
|
-
cursor:
|
|
16548
|
+
var ListExecutionsInput = Schema76.Struct({
|
|
16549
|
+
root_address_id: Schema76.optionalKey(exports_ids_schema.AddressId),
|
|
16550
|
+
status: Schema76.optionalKey(exports_execution_schema.ExecutionStatus),
|
|
16551
|
+
limit: Schema76.optionalKey(Schema76.Int.check(Schema76.isGreaterThan(0))),
|
|
16552
|
+
cursor: Schema76.optionalKey(exports_shared_schema.NonEmptyString)
|
|
16359
16553
|
}).annotate({ identifier: "Relay.Operation.ListExecutionsInput" });
|
|
16360
|
-
var ConversationKind =
|
|
16554
|
+
var ConversationKind = Schema76.Literals(["user-agent", "agent-agent"]).annotate({
|
|
16361
16555
|
identifier: "Relay.Operation.ConversationKind"
|
|
16362
16556
|
});
|
|
16363
|
-
var ConversationSummary =
|
|
16557
|
+
var ConversationSummary = Schema76.Struct({
|
|
16364
16558
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16365
16559
|
root_address_id: exports_ids_schema.AddressId,
|
|
16366
|
-
session_id:
|
|
16560
|
+
session_id: Schema76.optionalKey(exports_ids_schema.SessionId),
|
|
16367
16561
|
status: exports_execution_schema.ExecutionStatus,
|
|
16368
16562
|
kind: ConversationKind,
|
|
16369
|
-
agent_id:
|
|
16563
|
+
agent_id: Schema76.optionalKey(exports_ids_schema.AgentId),
|
|
16370
16564
|
metadata: exports_shared_schema.Metadata,
|
|
16371
16565
|
created_at: exports_shared_schema.TimestampMillis,
|
|
16372
16566
|
updated_at: exports_shared_schema.TimestampMillis
|
|
16373
16567
|
}).annotate({ identifier: "Relay.Operation.ConversationSummary" });
|
|
16374
|
-
var ListExecutionsResult =
|
|
16375
|
-
records:
|
|
16376
|
-
next_cursor:
|
|
16568
|
+
var ListExecutionsResult = Schema76.Struct({
|
|
16569
|
+
records: Schema76.Array(ConversationSummary),
|
|
16570
|
+
next_cursor: Schema76.optionalKey(exports_shared_schema.NonEmptyString)
|
|
16377
16571
|
}).annotate({ identifier: "Relay.Operation.ListExecutionsResult" });
|
|
16378
|
-
var ListSessionsInput =
|
|
16379
|
-
root_address_id:
|
|
16380
|
-
limit:
|
|
16381
|
-
cursor:
|
|
16572
|
+
var ListSessionsInput = Schema76.Struct({
|
|
16573
|
+
root_address_id: Schema76.optionalKey(exports_ids_schema.AddressId),
|
|
16574
|
+
limit: Schema76.optionalKey(Schema76.Int.check(Schema76.isGreaterThan(0))),
|
|
16575
|
+
cursor: Schema76.optionalKey(exports_shared_schema.NonEmptyString)
|
|
16382
16576
|
}).annotate({ identifier: "Relay.Operation.ListSessionsInput" });
|
|
16383
|
-
var SessionSummary =
|
|
16577
|
+
var SessionSummary = Schema76.Struct({
|
|
16384
16578
|
session_id: exports_ids_schema.SessionId,
|
|
16385
16579
|
root_address_id: exports_ids_schema.AddressId,
|
|
16386
16580
|
metadata: exports_shared_schema.Metadata,
|
|
16387
16581
|
created_at: exports_shared_schema.TimestampMillis,
|
|
16388
16582
|
updated_at: exports_shared_schema.TimestampMillis
|
|
16389
16583
|
}).annotate({ identifier: "Relay.Operation.SessionSummary" });
|
|
16390
|
-
var ListSessionsResult =
|
|
16391
|
-
records:
|
|
16392
|
-
next_cursor:
|
|
16584
|
+
var ListSessionsResult = Schema76.Struct({
|
|
16585
|
+
records: Schema76.Array(SessionSummary),
|
|
16586
|
+
next_cursor: Schema76.optionalKey(exports_shared_schema.NonEmptyString)
|
|
16393
16587
|
}).annotate({ identifier: "Relay.Operation.ListSessionsResult" });
|
|
16394
|
-
var GetSessionInput =
|
|
16588
|
+
var GetSessionInput = Schema76.Struct({
|
|
16395
16589
|
session_id: exports_ids_schema.SessionId,
|
|
16396
|
-
limit:
|
|
16397
|
-
cursor:
|
|
16590
|
+
limit: Schema76.optionalKey(Schema76.Int.check(Schema76.isGreaterThan(0))),
|
|
16591
|
+
cursor: Schema76.optionalKey(exports_shared_schema.NonEmptyString)
|
|
16398
16592
|
}).annotate({ identifier: "Relay.Operation.GetSessionInput" });
|
|
16399
|
-
var GetSessionResult =
|
|
16593
|
+
var GetSessionResult = Schema76.Struct({
|
|
16400
16594
|
session: SessionSummary,
|
|
16401
|
-
executions:
|
|
16402
|
-
next_cursor:
|
|
16595
|
+
executions: Schema76.Array(ConversationSummary),
|
|
16596
|
+
next_cursor: Schema76.optionalKey(exports_shared_schema.NonEmptyString)
|
|
16403
16597
|
}).annotate({ identifier: "Relay.Operation.GetSessionResult" });
|
|
16404
|
-
var ReplayExecutionInput =
|
|
16598
|
+
var ReplayExecutionInput = Schema76.Struct({
|
|
16405
16599
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16406
|
-
after_cursor:
|
|
16407
|
-
limit:
|
|
16600
|
+
after_cursor: Schema76.optionalKey(exports_shared_schema.NonEmptyString),
|
|
16601
|
+
limit: Schema76.optionalKey(Schema76.Int.check(Schema76.isGreaterThan(0)))
|
|
16408
16602
|
}).annotate({ identifier: "Relay.Operation.ReplayExecutionInput" });
|
|
16409
|
-
var ReplayExecutionResult =
|
|
16410
|
-
events:
|
|
16603
|
+
var ReplayExecutionResult = Schema76.Struct({
|
|
16604
|
+
events: Schema76.Array(exports_execution_schema.ExecutionEvent)
|
|
16411
16605
|
}).annotate({ identifier: "Relay.Operation.ReplayExecutionResult" });
|
|
16412
|
-
var RunnerSummary =
|
|
16413
|
-
address:
|
|
16414
|
-
healthy:
|
|
16606
|
+
var RunnerSummary = Schema76.Struct({
|
|
16607
|
+
address: Schema76.String,
|
|
16608
|
+
healthy: Schema76.Boolean,
|
|
16415
16609
|
last_heartbeat: exports_shared_schema.TimestampMillis,
|
|
16416
|
-
owned_shards:
|
|
16610
|
+
owned_shards: Schema76.Int
|
|
16417
16611
|
}).annotate({ identifier: "Relay.Operation.RunnerSummary" });
|
|
16418
|
-
var ListRunnersResult =
|
|
16419
|
-
runners:
|
|
16420
|
-
total_shards:
|
|
16612
|
+
var ListRunnersResult = Schema76.Struct({
|
|
16613
|
+
runners: Schema76.Array(RunnerSummary),
|
|
16614
|
+
total_shards: Schema76.Int
|
|
16421
16615
|
}).annotate({ identifier: "Relay.Operation.ListRunnersResult" });
|
|
16422
|
-
var RouteExecutionResult =
|
|
16616
|
+
var RouteExecutionResult = Schema76.Struct({
|
|
16423
16617
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16424
|
-
shard:
|
|
16425
|
-
runner_address:
|
|
16426
|
-
owned:
|
|
16618
|
+
shard: Schema76.String,
|
|
16619
|
+
runner_address: Schema76.NullOr(Schema76.String),
|
|
16620
|
+
owned: Schema76.Boolean
|
|
16427
16621
|
}).annotate({ identifier: "Relay.Operation.RouteExecutionResult" });
|
|
16428
16622
|
// ../ai/src/embedding-model/embedding-model-registration.ts
|
|
16429
16623
|
import { OpenAiClient, OpenAiEmbeddingModel } from "@effect/ai-openai";
|
|
@@ -16455,7 +16649,7 @@ __export(exports_language_model_registration, {
|
|
|
16455
16649
|
anthropic: () => anthropic
|
|
16456
16650
|
});
|
|
16457
16651
|
|
|
16458
|
-
// ../../node_modules/.bun/@batonfx+providers@0.3.
|
|
16652
|
+
// ../../node_modules/.bun/@batonfx+providers@0.3.3/node_modules/@batonfx/providers/src/anthropic.ts
|
|
16459
16653
|
import { AnthropicClient, AnthropicLanguageModel } from "@effect/ai-anthropic";
|
|
16460
16654
|
import { Layer as Layer72 } from "effect";
|
|
16461
16655
|
import { FetchHttpClient as FetchHttpClient2 } from "effect/unstable/http";
|
|
@@ -16471,13 +16665,13 @@ var anthropic = (input) => exports_model_registry.registrationFromLayer({
|
|
|
16471
16665
|
});
|
|
16472
16666
|
var anthropicClientLayerConfig = AnthropicClient.layerConfig;
|
|
16473
16667
|
var withAnthropic = (options) => exports_model_registry.layerFromRegistrationEffects([anthropic(options)]).pipe(Layer72.provide(AnthropicClient.layerConfig({ ...options.clientConfig, apiKey: options.apiKey })), Layer72.provide(FetchHttpClient2.layer));
|
|
16474
|
-
// ../../node_modules/.bun/@batonfx+providers@0.3.
|
|
16668
|
+
// ../../node_modules/.bun/@batonfx+providers@0.3.3/node_modules/@batonfx/providers/src/deterministic.ts
|
|
16475
16669
|
import { OpenAiClient as OpenAiClient3 } from "@effect/ai-openai";
|
|
16476
16670
|
import { Effect as Effect81, Layer as Layer74, Option as Option29, Stream as Stream12 } from "effect";
|
|
16477
16671
|
import { LanguageModel as LanguageModel8, Response as Response7 } from "effect/unstable/ai";
|
|
16478
16672
|
import { FetchHttpClient as FetchHttpClient4 } from "effect/unstable/http";
|
|
16479
16673
|
|
|
16480
|
-
// ../../node_modules/.bun/@batonfx+providers@0.3.
|
|
16674
|
+
// ../../node_modules/.bun/@batonfx+providers@0.3.3/node_modules/@batonfx/providers/src/openai.ts
|
|
16481
16675
|
import { OpenAiClient as OpenAiClient2, OpenAiLanguageModel } from "@effect/ai-openai";
|
|
16482
16676
|
import { Layer as Layer73 } from "effect";
|
|
16483
16677
|
import { FetchHttpClient as FetchHttpClient3 } from "effect/unstable/http";
|
|
@@ -16494,7 +16688,7 @@ var openAi = (input) => exports_model_registry.registrationFromLayer({
|
|
|
16494
16688
|
var openAiClientLayerConfig2 = OpenAiClient2.layerConfig;
|
|
16495
16689
|
var withOpenAi = (options) => exports_model_registry.layerFromRegistrationEffects([openAi(options)]).pipe(Layer73.provide(OpenAiClient2.layerConfig({ ...options.clientConfig, apiKey: options.apiKey })), Layer73.provide(FetchHttpClient3.layer));
|
|
16496
16690
|
|
|
16497
|
-
// ../../node_modules/.bun/@batonfx+providers@0.3.
|
|
16691
|
+
// ../../node_modules/.bun/@batonfx+providers@0.3.3/node_modules/@batonfx/providers/src/deterministic.ts
|
|
16498
16692
|
var deterministicModelLayer = Layer74.effect(LanguageModel8.LanguageModel, LanguageModel8.make({
|
|
16499
16693
|
generateText: () => Effect81.succeed([{ type: "text", text: "deterministic response" }]),
|
|
16500
16694
|
streamText: () => Stream12.make(Response7.makePart("text-delta", { id: "text", delta: "deterministic response" }))
|
|
@@ -16518,7 +16712,7 @@ var withOpenAiOrDeterministic = (options) => Layer74.unwrap(Effect81.gen(functio
|
|
|
16518
16712
|
...Option29.isSome(openAiRegistration) ? [openAiRegistration.value] : []
|
|
16519
16713
|
]);
|
|
16520
16714
|
}));
|
|
16521
|
-
// ../../node_modules/.bun/@batonfx+providers@0.3.
|
|
16715
|
+
// ../../node_modules/.bun/@batonfx+providers@0.3.3/node_modules/@batonfx/providers/src/openai-compat.ts
|
|
16522
16716
|
import { OpenAiClient as OpenAiClient4, OpenAiLanguageModel as OpenAiLanguageModel2 } from "@effect/ai-openai-compat";
|
|
16523
16717
|
import { Config as Config8, Layer as Layer75 } from "effect";
|
|
16524
16718
|
import { FetchHttpClient as FetchHttpClient5 } from "effect/unstable/http";
|
|
@@ -16539,7 +16733,7 @@ var clientLayerConfig = (options) => OpenAiClient4.layerConfig({
|
|
|
16539
16733
|
...options.baseUrl === undefined ? {} : { apiUrl: Config8.succeed(options.baseUrl) }
|
|
16540
16734
|
});
|
|
16541
16735
|
var withOpenAiCompatible = (options) => exports_model_registry.layerFromRegistrationEffects([openAiCompatible(options)]).pipe(Layer75.provide(clientLayerConfig(options)), Layer75.provide(FetchHttpClient5.layer));
|
|
16542
|
-
// ../../node_modules/.bun/@batonfx+providers@0.3.
|
|
16736
|
+
// ../../node_modules/.bun/@batonfx+providers@0.3.3/node_modules/@batonfx/providers/src/openrouter.ts
|
|
16543
16737
|
import { OpenRouterClient, OpenRouterLanguageModel } from "@effect/ai-openrouter";
|
|
16544
16738
|
import { Layer as Layer76 } from "effect";
|
|
16545
16739
|
import { FetchHttpClient as FetchHttpClient6 } from "effect/unstable/http";
|