@relayfx/sdk 0.0.41 → 0.0.42
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 +317 -275
- package/dist/index.js +461 -419
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -8371,7 +8371,7 @@ __export(exports_agent_loop_service, {
|
|
|
8371
8371
|
AgentLoopBudgetExceeded: () => AgentLoopBudgetExceeded
|
|
8372
8372
|
});
|
|
8373
8373
|
|
|
8374
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8374
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/agent.ts
|
|
8375
8375
|
var exports_agent = {};
|
|
8376
8376
|
__export(exports_agent, {
|
|
8377
8377
|
streamObject: () => streamObject,
|
|
@@ -8381,10 +8381,10 @@ __export(exports_agent, {
|
|
|
8381
8381
|
generate: () => generate,
|
|
8382
8382
|
defaultObjectPrompt: () => defaultObjectPrompt
|
|
8383
8383
|
});
|
|
8384
|
-
import { Cause as Cause3, Effect as Effect45, Fiber, Option as Option15, Queue as Queue2, Ref as Ref10, Schema as
|
|
8384
|
+
import { Cause as Cause3, Effect as Effect45, Fiber, Option as Option15, Queue as Queue2, Ref as Ref10, Schema as Schema46, Stream as Stream7 } from "effect";
|
|
8385
8385
|
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
8386
|
|
|
8387
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8387
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/agent-event.ts
|
|
8388
8388
|
var exports_agent_event = {};
|
|
8389
8389
|
__export(exports_agent_event, {
|
|
8390
8390
|
addUsage: () => addUsage,
|
|
@@ -8441,7 +8441,7 @@ class AgentSuspended extends Schema38.TaggedErrorClass()("@batonfx/core/AgentSus
|
|
|
8441
8441
|
}) {
|
|
8442
8442
|
}
|
|
8443
8443
|
|
|
8444
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8444
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/approvals.ts
|
|
8445
8445
|
var exports_approvals = {};
|
|
8446
8446
|
__export(exports_approvals, {
|
|
8447
8447
|
testLayer: () => testLayer26,
|
|
@@ -8457,7 +8457,7 @@ var autoApprove = Layer29.succeed(Approvals, Approvals.of({ check: () => Effect3
|
|
|
8457
8457
|
var denyAll = Layer29.succeed(Approvals, Approvals.of({ check: () => Effect31.succeed({ _tag: "Denied" }) }));
|
|
8458
8458
|
var testLayer26 = (implementation) => Layer29.succeed(Approvals, Approvals.of(implementation));
|
|
8459
8459
|
|
|
8460
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8460
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/compaction.ts
|
|
8461
8461
|
var exports_compaction = {};
|
|
8462
8462
|
__export(exports_compaction, {
|
|
8463
8463
|
truncate: () => truncate,
|
|
@@ -8475,7 +8475,7 @@ __export(exports_compaction, {
|
|
|
8475
8475
|
import { Context as Context32, Effect as Effect34, Layer as Layer32, Option as Option10, Schema as Schema41 } from "effect";
|
|
8476
8476
|
import { LanguageModel, Prompt as Prompt3, Tokenizer, Toolkit as Toolkit2 } from "effect/unstable/ai";
|
|
8477
8477
|
|
|
8478
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8478
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/session.ts
|
|
8479
8479
|
var exports_session = {};
|
|
8480
8480
|
__export(exports_session, {
|
|
8481
8481
|
testLayer: () => testLayer27,
|
|
@@ -8607,7 +8607,7 @@ var memoryLayer24 = Layer30.effect(SessionStore, Ref7.make(initialState).pipe(Ef
|
|
|
8607
8607
|
}))));
|
|
8608
8608
|
var testLayer27 = (implementation) => Layer30.succeed(SessionStore, SessionStore.of(implementation));
|
|
8609
8609
|
|
|
8610
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8610
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/tool-output.ts
|
|
8611
8611
|
var exports_tool_output = {};
|
|
8612
8612
|
__export(exports_tool_output, {
|
|
8613
8613
|
testLayer: () => testLayer28,
|
|
@@ -8667,7 +8667,7 @@ var bound = (result, options) => Effect33.gen(function* () {
|
|
|
8667
8667
|
return { _tag: "Success", result: output, encodedResult: output };
|
|
8668
8668
|
});
|
|
8669
8669
|
|
|
8670
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8670
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/compaction.ts
|
|
8671
8671
|
var DEFAULT_RESERVE_TOKENS = 16384;
|
|
8672
8672
|
var DEFAULT_KEEP_RECENT_TOKENS = 20000;
|
|
8673
8673
|
var SUMMARY_TEMPLATE = `Summarize the conversation so another agent can continue seamlessly.
|
|
@@ -8850,7 +8850,7 @@ var truncate = (maxTokens) => ({
|
|
|
8850
8850
|
var testLayer29 = (implementation) => Layer32.succeed(Compaction, Compaction.of(implementation));
|
|
8851
8851
|
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
8852
|
|
|
8853
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8853
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/instructions.ts
|
|
8854
8854
|
var exports_instructions = {};
|
|
8855
8855
|
__export(exports_instructions, {
|
|
8856
8856
|
testLayer: () => testLayer30,
|
|
@@ -8899,7 +8899,7 @@ var renderUpdate = (epoch, context) => Effect35.gen(function* () {
|
|
|
8899
8899
|
var layer27 = (sources) => Layer33.succeed(Instructions, Instructions.of({ sources: [...sources] }));
|
|
8900
8900
|
var testLayer30 = (implementation) => Layer33.succeed(Instructions, Instructions.of(implementation));
|
|
8901
8901
|
|
|
8902
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8902
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/memory.ts
|
|
8903
8903
|
var exports_memory = {};
|
|
8904
8904
|
__export(exports_memory, {
|
|
8905
8905
|
testLayer: () => testLayer31,
|
|
@@ -8928,7 +8928,7 @@ var merge = (first, second) => ({
|
|
|
8928
8928
|
var noopLayer = Layer34.succeed(Memory, Memory.of(noop));
|
|
8929
8929
|
var testLayer31 = (implementation) => Layer34.succeed(Memory, Memory.of(implementation));
|
|
8930
8930
|
|
|
8931
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8931
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/model-middleware.ts
|
|
8932
8932
|
var exports_model_middleware = {};
|
|
8933
8933
|
__export(exports_model_middleware, {
|
|
8934
8934
|
layer: () => layer28,
|
|
@@ -8942,7 +8942,7 @@ class ModelMiddleware extends Context35.Service()("@batonfx/core/ModelMiddleware
|
|
|
8942
8942
|
var identityLayer = Layer35.succeed(ModelMiddleware, []);
|
|
8943
8943
|
var layer28 = (middleware) => Layer35.succeed(ModelMiddleware, middleware);
|
|
8944
8944
|
|
|
8945
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8945
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/model-resilience.ts
|
|
8946
8946
|
var exports_model_resilience = {};
|
|
8947
8947
|
__export(exports_model_resilience, {
|
|
8948
8948
|
testLayer: () => testLayer32,
|
|
@@ -8988,7 +8988,7 @@ var apply = (model, resilience) => ({
|
|
|
8988
8988
|
}).pipe(Stream5.retry(retryStreamSchedule(resilience)))
|
|
8989
8989
|
});
|
|
8990
8990
|
|
|
8991
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
8991
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/permissions.ts
|
|
8992
8992
|
var exports_permissions = {};
|
|
8993
8993
|
__export(exports_permissions, {
|
|
8994
8994
|
testLayer: () => testLayer33,
|
|
@@ -9118,7 +9118,7 @@ var ruleStoreMemory = (initialRules = []) => Layer37.effect(RuleStore, Ref9.make
|
|
|
9118
9118
|
var ruleStoreTestLayer = (implementation) => Layer37.succeed(RuleStore, RuleStore.of(implementation));
|
|
9119
9119
|
var testLayer33 = (implementation) => Layer37.succeed(Permissions, Permissions.of(implementation));
|
|
9120
9120
|
|
|
9121
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9121
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/skill-source.ts
|
|
9122
9122
|
var exports_skill_source = {};
|
|
9123
9123
|
__export(exports_skill_source, {
|
|
9124
9124
|
testLayer: () => testLayer34,
|
|
@@ -9176,7 +9176,7 @@ var selectListings = (skills, budgetTokens, recentlyUsed) => {
|
|
|
9176
9176
|
return selected;
|
|
9177
9177
|
};
|
|
9178
9178
|
|
|
9179
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9179
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/steering.ts
|
|
9180
9180
|
var exports_steering = {};
|
|
9181
9181
|
__export(exports_steering, {
|
|
9182
9182
|
testLayer: () => testLayer35,
|
|
@@ -9206,7 +9206,7 @@ var layer30 = (options = {}) => Layer39.effect(Steering, Effect41.gen(function*
|
|
|
9206
9206
|
}));
|
|
9207
9207
|
var testLayer35 = (implementation) => Layer39.succeed(Steering, Steering.of(implementation));
|
|
9208
9208
|
|
|
9209
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9209
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/tool-context.ts
|
|
9210
9210
|
var exports_tool_context = {};
|
|
9211
9211
|
__export(exports_tool_context, {
|
|
9212
9212
|
testLayer: () => testLayer36,
|
|
@@ -9224,18 +9224,22 @@ var layerDefault = Layer40.sync(ToolContext, () => ToolContext.of({
|
|
|
9224
9224
|
}));
|
|
9225
9225
|
var testLayer36 = (implementation) => Layer40.succeed(ToolContext, ToolContext.of(implementation));
|
|
9226
9226
|
|
|
9227
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9227
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/tool-executor.ts
|
|
9228
9228
|
var exports_tool_executor = {};
|
|
9229
9229
|
__export(exports_tool_executor, {
|
|
9230
9230
|
testLayer: () => testLayer37,
|
|
9231
|
+
sandbox: () => sandbox,
|
|
9231
9232
|
router: () => router,
|
|
9232
9233
|
routeToolkit: () => routeToolkit,
|
|
9233
9234
|
route: () => route,
|
|
9235
|
+
remote: () => remote,
|
|
9236
|
+
mcp: () => mcp,
|
|
9234
9237
|
fromToolkit: () => fromToolkit,
|
|
9235
9238
|
executeToolkit: () => executeToolkit,
|
|
9239
|
+
client: () => client,
|
|
9236
9240
|
ToolExecutor: () => ToolExecutor
|
|
9237
9241
|
});
|
|
9238
|
-
import { Cause as Cause2, Context as Context41, Effect as Effect43, Layer as Layer41, Option as Option14, Sink as Sink2, Stream as Stream6 } from "effect";
|
|
9242
|
+
import { Cause as Cause2, Context as Context41, Effect as Effect43, Layer as Layer41, Option as Option14, Schema as Schema45, Sink as Sink2, Stream as Stream6 } from "effect";
|
|
9239
9243
|
class ToolExecutor extends Context41.Service()("@batonfx/core/ToolExecutor") {
|
|
9240
9244
|
}
|
|
9241
9245
|
var failureMessage = (cause) => {
|
|
@@ -9255,6 +9259,24 @@ var resultMessage = (result) => {
|
|
|
9255
9259
|
return String(result);
|
|
9256
9260
|
}
|
|
9257
9261
|
};
|
|
9262
|
+
var schemaMessage = (error) => error instanceof Error ? error.message : typeof error === "string" ? error : resultMessage(error);
|
|
9263
|
+
var decodeSuccess = (tool2, result) => {
|
|
9264
|
+
const successSchema = tool2.successSchema;
|
|
9265
|
+
if (!Schema45.isSchema(successSchema)) {
|
|
9266
|
+
return Effect43.succeed({ _tag: "Success", result, encodedResult: result });
|
|
9267
|
+
}
|
|
9268
|
+
return Schema45.decodeUnknownEffect(successSchema)(result).pipe(Effect43.flatMap((decoded) => Schema45.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
|
+
};
|
|
9270
|
+
var placementOutcome = (placement, tool2, response) => {
|
|
9271
|
+
switch (response._tag) {
|
|
9272
|
+
case "Failure":
|
|
9273
|
+
return Effect43.succeed(failureOutcome(response.message));
|
|
9274
|
+
case "Suspend":
|
|
9275
|
+
return Effect43.succeed({ _tag: "Suspend", token: response.token });
|
|
9276
|
+
case "Success":
|
|
9277
|
+
return decodeSuccess(tool2, response.result).pipe(Effect43.map((outcome) => outcome._tag === "Failure" ? failureOutcome(outcome.message.replace("invalid client result", `invalid ${placement} result`)) : outcome));
|
|
9278
|
+
}
|
|
9279
|
+
};
|
|
9258
9280
|
var executeWithToolkit = (toolkit, request) => {
|
|
9259
9281
|
if (toolkit.tools[request.call.name] === undefined) {
|
|
9260
9282
|
return Effect43.succeed(failureOutcome(`Tool ${request.call.name} is not registered`));
|
|
@@ -9292,6 +9314,24 @@ var route = (options) => {
|
|
|
9292
9314
|
execute: options.execute
|
|
9293
9315
|
};
|
|
9294
9316
|
};
|
|
9317
|
+
var placementRoute = (placement, options) => {
|
|
9318
|
+
const routedTools = options.tools ?? Object.keys(options.toolkit.tools);
|
|
9319
|
+
return route({
|
|
9320
|
+
tools: routedTools,
|
|
9321
|
+
execute: (request) => {
|
|
9322
|
+
const tool2 = options.toolkit.tools[request.call.name];
|
|
9323
|
+
if (tool2 === undefined)
|
|
9324
|
+
return Effect43.succeed(failureOutcome(`Tool ${request.call.name} is not registered`));
|
|
9325
|
+
const effect = options.execute({ ...request, placement, tool: tool2 });
|
|
9326
|
+
const scheduled = "schedule" in options && options.schedule !== undefined ? Effect43.retry(effect, options.schedule) : effect;
|
|
9327
|
+
return scheduled.pipe(Effect43.flatMap((response) => placementOutcome(placement, tool2, response)), Effect43.catchCause((cause) => Cause2.hasInterrupts(cause) ? Effect43.interrupt : Effect43.succeed(failureOutcome(`${placement} tool infrastructure failed: ${failureMessage(cause)}`))));
|
|
9328
|
+
}
|
|
9329
|
+
});
|
|
9330
|
+
};
|
|
9331
|
+
var client = (options) => placementRoute("client", options);
|
|
9332
|
+
var remote = (options) => placementRoute("remote", options);
|
|
9333
|
+
var mcp = (options) => placementRoute("mcp", options);
|
|
9334
|
+
var sandbox = (options) => placementRoute("sandbox", options);
|
|
9295
9335
|
function routeToolkit(toolkit) {
|
|
9296
9336
|
const makeRoute = (handled) => route({
|
|
9297
9337
|
tools: Object.keys(handled.tools),
|
|
@@ -9300,15 +9340,17 @@ function routeToolkit(toolkit) {
|
|
|
9300
9340
|
return "handle" in toolkit ? makeRoute(toolkit) : toolkit.pipe(Effect43.map(makeRoute));
|
|
9301
9341
|
}
|
|
9302
9342
|
var routeInputEffect = (input) => Effect43.isEffect(input) ? input : Effect43.succeed(input);
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
}
|
|
9343
|
+
function router(routes) {
|
|
9344
|
+
return Layer41.effect(ToolExecutor, Effect43.all(Array.from(routes, routeInputEffect)).pipe(Effect43.map((resolved) => ToolExecutor.of({
|
|
9345
|
+
execute: (request) => {
|
|
9346
|
+
const matched = resolved.find((candidate) => candidate.matches(request));
|
|
9347
|
+
return matched === undefined ? Effect43.succeed(failureOutcome(`Tool ${request.call.name} is not registered`)) : matched.execute(request);
|
|
9348
|
+
}
|
|
9349
|
+
}))));
|
|
9350
|
+
}
|
|
9309
9351
|
var testLayer37 = (implementation) => Layer41.succeed(ToolExecutor, ToolExecutor.of(implementation));
|
|
9310
9352
|
|
|
9311
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9353
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/turn-policy.ts
|
|
9312
9354
|
var exports_turn_policy = {};
|
|
9313
9355
|
__export(exports_turn_policy, {
|
|
9314
9356
|
untilToolCall: () => untilToolCall,
|
|
@@ -9347,7 +9389,7 @@ var both = (first, second) => make4((info) => Effect44.gen(function* () {
|
|
|
9347
9389
|
}));
|
|
9348
9390
|
var defaultPolicy = recurs(8);
|
|
9349
9391
|
|
|
9350
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
9392
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/agent.ts
|
|
9351
9393
|
function make5(nameOrOptions, options = {}) {
|
|
9352
9394
|
const resolved = typeof nameOrOptions === "string" ? { ...options, name: nameOrOptions } : nameOrOptions;
|
|
9353
9395
|
return {
|
|
@@ -9360,14 +9402,14 @@ function make5(nameOrOptions, options = {}) {
|
|
|
9360
9402
|
var defaultObjectPrompt = "Return the final structured output for the task above.";
|
|
9361
9403
|
var skillListingBudgetTokens = 2048;
|
|
9362
9404
|
var activateSkillToolName = "activate_skill";
|
|
9363
|
-
var activateSkillParameters =
|
|
9405
|
+
var activateSkillParameters = Schema46.Struct({ name: Schema46.String });
|
|
9364
9406
|
var activateSkillTool = Tool4.make(activateSkillToolName, {
|
|
9365
9407
|
description: "Load the full body for one listed Baton skill by name before applying that skill.",
|
|
9366
9408
|
parameters: activateSkillParameters,
|
|
9367
|
-
success:
|
|
9368
|
-
name:
|
|
9369
|
-
body:
|
|
9370
|
-
allowedTools:
|
|
9409
|
+
success: Schema46.Struct({
|
|
9410
|
+
name: Schema46.String,
|
|
9411
|
+
body: Schema46.String,
|
|
9412
|
+
allowedTools: Schema46.Array(Schema46.String)
|
|
9371
9413
|
})
|
|
9372
9414
|
});
|
|
9373
9415
|
var errorMessage = (error) => error instanceof Error ? `${error.name}: ${error.message}` : String(error);
|
|
@@ -9670,7 +9712,7 @@ var streamInternal = (agent, options, structured) => Stream7.unwrap(Effect45.gen
|
|
|
9670
9712
|
const activateSkillOutcome = (turn, call) => Effect45.gen(function* () {
|
|
9671
9713
|
if (skillRuntime === undefined)
|
|
9672
9714
|
return { _tag: "Failure", message: "SkillSource is not available" };
|
|
9673
|
-
const params =
|
|
9715
|
+
const params = Schema46.decodeUnknownOption(activateSkillParameters)(call.params);
|
|
9674
9716
|
if (Option15.isNone(params))
|
|
9675
9717
|
return { _tag: "Failure", message: "Skill activation requires a name" };
|
|
9676
9718
|
const skill = yield* skillRuntime.source.get(params.value.name).pipe(Effect45.mapError((error) => skillError(turn, error)));
|
|
@@ -10024,14 +10066,14 @@ var generateObject = (agent, options) => Stream7.runFold(streamObject(agent, opt
|
|
|
10024
10066
|
})
|
|
10025
10067
|
})
|
|
10026
10068
|
})));
|
|
10027
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
10069
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/agent-tool.ts
|
|
10028
10070
|
var exports_agent_tool = {};
|
|
10029
10071
|
__export(exports_agent_tool, {
|
|
10030
10072
|
asTool: () => asTool
|
|
10031
10073
|
});
|
|
10032
|
-
import { Cause as Cause4, Effect as Effect46, Schema as
|
|
10074
|
+
import { Cause as Cause4, Effect as Effect46, Schema as Schema47 } from "effect";
|
|
10033
10075
|
import { Tool as Tool5, Toolkit as Toolkit4 } from "effect/unstable/ai";
|
|
10034
|
-
var defaultParameters =
|
|
10076
|
+
var defaultParameters = Schema47.Struct({ prompt: Schema47.String });
|
|
10035
10077
|
var errorMessage2 = (error) => {
|
|
10036
10078
|
if (error instanceof AgentSuspended) {
|
|
10037
10079
|
return `suspended on ${error.tool_name}: ${error.reason}`;
|
|
@@ -10057,14 +10099,14 @@ var lazyHandled = (toolkit, name, handler) => ({
|
|
|
10057
10099
|
var asTool = (agent, options = {}) => {
|
|
10058
10100
|
const name = options.name ?? agent.name;
|
|
10059
10101
|
const parameters = options.parameters ?? defaultParameters;
|
|
10060
|
-
const success2 = options.success ??
|
|
10102
|
+
const success2 = options.success ?? Schema47.String;
|
|
10061
10103
|
const toPrompt = options.toPrompt ?? ((params) => params.prompt);
|
|
10062
10104
|
const fromResult = options.fromResult ?? ((result) => result.text);
|
|
10063
10105
|
const tool2 = Tool5.make(name, {
|
|
10064
10106
|
...options.description === undefined ? {} : { description: options.description },
|
|
10065
10107
|
parameters,
|
|
10066
10108
|
success: success2,
|
|
10067
|
-
failure:
|
|
10109
|
+
failure: Schema47.String,
|
|
10068
10110
|
failureMode: "return"
|
|
10069
10111
|
});
|
|
10070
10112
|
const toolkit = Toolkit4.make(tool2);
|
|
@@ -10082,7 +10124,7 @@ var asTool = (agent, options = {}) => {
|
|
|
10082
10124
|
});
|
|
10083
10125
|
return lazyHandled(toolkit, name, handler);
|
|
10084
10126
|
};
|
|
10085
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
10127
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/guardrail.ts
|
|
10086
10128
|
var exports_guardrail = {};
|
|
10087
10129
|
__export(exports_guardrail, {
|
|
10088
10130
|
validateInput: () => validateInput2,
|
|
@@ -10162,16 +10204,16 @@ var redactOutput = (options) => ({
|
|
|
10162
10204
|
var filterOutput = (keep) => ({
|
|
10163
10205
|
transformPart: (part, context) => Effect47.succeed(part.type === "tool-call" || keep(part, context) ? Option16.some(part) : Option16.none())
|
|
10164
10206
|
});
|
|
10165
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
10207
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/handoff.ts
|
|
10166
10208
|
var exports_handoff = {};
|
|
10167
10209
|
__export(exports_handoff, {
|
|
10168
10210
|
transferTool: () => transferTool,
|
|
10169
10211
|
supervisor: () => supervisor,
|
|
10170
10212
|
fanOut: () => fanOut
|
|
10171
10213
|
});
|
|
10172
|
-
import { Effect as Effect48, Schema as
|
|
10214
|
+
import { Effect as Effect48, Schema as Schema48 } from "effect";
|
|
10173
10215
|
import { AiError as AiError2, Toolkit as Toolkit5 } from "effect/unstable/ai";
|
|
10174
|
-
var defaultTransferParameters =
|
|
10216
|
+
var defaultTransferParameters = Schema48.Struct({ prompt: Schema48.String });
|
|
10175
10217
|
var transferName = (agentName) => `transfer_to_${agentName}`;
|
|
10176
10218
|
var positiveConcurrency = (value) => {
|
|
10177
10219
|
const concurrency = value ?? 4;
|
|
@@ -10225,7 +10267,7 @@ var supervisor = (options) => {
|
|
|
10225
10267
|
toolkit
|
|
10226
10268
|
};
|
|
10227
10269
|
};
|
|
10228
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
10270
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/model-registry.ts
|
|
10229
10271
|
var exports_model_registry = {};
|
|
10230
10272
|
__export(exports_model_registry, {
|
|
10231
10273
|
testLayer: () => testLayer38,
|
|
@@ -10240,13 +10282,13 @@ __export(exports_model_registry, {
|
|
|
10240
10282
|
Service: () => Service29,
|
|
10241
10283
|
LanguageModelNotRegistered: () => LanguageModelNotRegistered
|
|
10242
10284
|
});
|
|
10243
|
-
import { Chunk as Chunk2, Context as Context42, Effect as Effect49, Layer as Layer43, Option as Option17, Ref as Ref11, Schema as
|
|
10285
|
+
import { Chunk as Chunk2, Context as Context42, Effect as Effect49, Layer as Layer43, Option as Option17, Ref as Ref11, Schema as Schema49, Semaphore as Semaphore3 } from "effect";
|
|
10244
10286
|
import { Model } from "effect/unstable/ai";
|
|
10245
10287
|
|
|
10246
|
-
class LanguageModelNotRegistered extends
|
|
10247
|
-
provider:
|
|
10248
|
-
model:
|
|
10249
|
-
registration_key:
|
|
10288
|
+
class LanguageModelNotRegistered extends Schema49.TaggedErrorClass()("LanguageModelNotRegistered", {
|
|
10289
|
+
provider: Schema49.String,
|
|
10290
|
+
model: Schema49.String,
|
|
10291
|
+
registration_key: Schema49.optionalKey(Schema49.String)
|
|
10250
10292
|
}) {
|
|
10251
10293
|
}
|
|
10252
10294
|
|
|
@@ -10314,7 +10356,7 @@ var provide = (selection, effect) => Effect49.gen(function* () {
|
|
|
10314
10356
|
return yield* service.provide(selection, effect);
|
|
10315
10357
|
});
|
|
10316
10358
|
|
|
10317
|
-
// ../../node_modules/.bun/@batonfx+core@0.3.
|
|
10359
|
+
// ../../node_modules/.bun/@batonfx+core@0.3.1/node_modules/@batonfx/core/src/index.ts
|
|
10318
10360
|
import {
|
|
10319
10361
|
AiError as AiError3,
|
|
10320
10362
|
Chat as Chat2,
|
|
@@ -10332,7 +10374,7 @@ import {
|
|
|
10332
10374
|
} from "effect/unstable/ai";
|
|
10333
10375
|
|
|
10334
10376
|
// ../runtime/src/agent/agent-loop-service.ts
|
|
10335
|
-
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
|
|
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 Schema62, Stream as Stream8 } from "effect";
|
|
10336
10378
|
import { Chat as Chat3, LanguageModel as LanguageModel6, Prompt as Prompt12, Tokenizer as Tokenizer4, Toolkit as Toolkit7 } from "effect/unstable/ai";
|
|
10337
10379
|
|
|
10338
10380
|
// ../runtime/src/child/child-run-service.ts
|
|
@@ -10352,31 +10394,31 @@ __export(exports_child_run_service, {
|
|
|
10352
10394
|
ChildRunScopeBroadened: () => ChildRunScopeBroadened,
|
|
10353
10395
|
ChildRunModelMissing: () => ChildRunModelMissing
|
|
10354
10396
|
});
|
|
10355
|
-
import { Context as Context44, Effect as Effect51, HashSet as HashSet5, Layer as Layer45, Option as Option18, Result as Result2, Schema as
|
|
10397
|
+
import { Context as Context44, Effect as Effect51, HashSet as HashSet5, Layer as Layer45, Option as Option18, Result as Result2, Schema as Schema51 } from "effect";
|
|
10356
10398
|
|
|
10357
10399
|
// ../runtime/src/workspace/workspace-provider-service.ts
|
|
10358
|
-
import { Context as Context43, Effect as Effect50, Layer as Layer44, Ref as Ref12, Schema as
|
|
10400
|
+
import { Context as Context43, Effect as Effect50, Layer as Layer44, Ref as Ref12, Schema as Schema50 } from "effect";
|
|
10359
10401
|
|
|
10360
|
-
class WorkspaceNotFound extends
|
|
10402
|
+
class WorkspaceNotFound extends Schema50.TaggedErrorClass()("WorkspaceNotFound", {
|
|
10361
10403
|
sandbox_ref: exports_ids_schema.WorkspaceRef
|
|
10362
10404
|
}) {
|
|
10363
10405
|
}
|
|
10364
10406
|
|
|
10365
|
-
class WorkspaceUnavailable extends
|
|
10407
|
+
class WorkspaceUnavailable extends Schema50.TaggedErrorClass()("WorkspaceUnavailable", {
|
|
10366
10408
|
sandbox_ref: exports_ids_schema.WorkspaceRef,
|
|
10367
|
-
message:
|
|
10409
|
+
message: Schema50.String
|
|
10368
10410
|
}) {
|
|
10369
10411
|
}
|
|
10370
10412
|
|
|
10371
|
-
class WorkspaceCapabilityUnsupported extends
|
|
10372
|
-
capability:
|
|
10413
|
+
class WorkspaceCapabilityUnsupported extends Schema50.TaggedErrorClass()("WorkspaceCapabilityUnsupported", {
|
|
10414
|
+
capability: Schema50.Literals(["suspend", "snapshot", "fork"]),
|
|
10373
10415
|
provider_key: exports_workspace_schema.WorkspaceProviderKey
|
|
10374
10416
|
}) {
|
|
10375
10417
|
}
|
|
10376
10418
|
|
|
10377
|
-
class WorkspaceProviderError extends
|
|
10419
|
+
class WorkspaceProviderError extends Schema50.TaggedErrorClass()("WorkspaceProviderError", {
|
|
10378
10420
|
provider_key: exports_workspace_schema.WorkspaceProviderKey,
|
|
10379
|
-
message:
|
|
10421
|
+
message: Schema50.String
|
|
10380
10422
|
}) {
|
|
10381
10423
|
}
|
|
10382
10424
|
|
|
@@ -10408,28 +10450,28 @@ var destroy = Effect50.fn("WorkspaceProvider.destroy.call")(function* (ref) {
|
|
|
10408
10450
|
});
|
|
10409
10451
|
|
|
10410
10452
|
// ../runtime/src/child/child-run-service.ts
|
|
10411
|
-
class StaticChildRunPresetNotFound extends
|
|
10453
|
+
class StaticChildRunPresetNotFound extends Schema51.TaggedErrorClass()("StaticChildRunPresetNotFound", {
|
|
10412
10454
|
preset_name: exports_shared_schema.NonEmptyString
|
|
10413
10455
|
}) {
|
|
10414
10456
|
}
|
|
10415
10457
|
|
|
10416
|
-
class ChildRunScopeBroadened extends
|
|
10417
|
-
field:
|
|
10458
|
+
class ChildRunScopeBroadened extends Schema51.TaggedErrorClass()("ChildRunScopeBroadened", {
|
|
10459
|
+
field: Schema51.Literals(["tool_names", "permissions"]),
|
|
10418
10460
|
value: exports_shared_schema.NonEmptyString
|
|
10419
10461
|
}) {
|
|
10420
10462
|
}
|
|
10421
10463
|
|
|
10422
|
-
class ChildRunServiceError extends
|
|
10423
|
-
message:
|
|
10464
|
+
class ChildRunServiceError extends Schema51.TaggedErrorClass()("ChildRunServiceError", {
|
|
10465
|
+
message: Schema51.String
|
|
10424
10466
|
}) {
|
|
10425
10467
|
}
|
|
10426
10468
|
|
|
10427
|
-
class ChildRunWorkspaceUnavailable extends
|
|
10428
|
-
reason:
|
|
10469
|
+
class ChildRunWorkspaceUnavailable extends Schema51.TaggedErrorClass()("ChildRunWorkspaceUnavailable", {
|
|
10470
|
+
reason: Schema51.String
|
|
10429
10471
|
}) {
|
|
10430
10472
|
}
|
|
10431
10473
|
|
|
10432
|
-
class ChildRunModelMissing extends
|
|
10474
|
+
class ChildRunModelMissing extends Schema51.TaggedErrorClass()("ChildRunModelMissing", {}) {
|
|
10433
10475
|
}
|
|
10434
10476
|
|
|
10435
10477
|
class Service31 extends Context44.Service()("@relayfx/runtime/ChildRunService") {
|
|
@@ -10657,26 +10699,26 @@ var spawnDynamic = Effect51.fn("ChildRunService.spawnDynamic.call")(function* (i
|
|
|
10657
10699
|
});
|
|
10658
10700
|
|
|
10659
10701
|
// ../runtime/src/child/spawn-child-run-tool.ts
|
|
10660
|
-
import { Effect as Effect52, Schema as
|
|
10702
|
+
import { Effect as Effect52, Schema as Schema52 } from "effect";
|
|
10661
10703
|
var toolName = "spawn_child_run";
|
|
10662
10704
|
var permissionName = "relay.child_run.spawn";
|
|
10663
|
-
var Input =
|
|
10664
|
-
preset_name:
|
|
10665
|
-
instructions:
|
|
10666
|
-
model:
|
|
10667
|
-
tool_names:
|
|
10668
|
-
permissions:
|
|
10669
|
-
output_schema_ref:
|
|
10670
|
-
metadata:
|
|
10671
|
-
input:
|
|
10705
|
+
var Input = Schema52.Struct({
|
|
10706
|
+
preset_name: Schema52.optionalKey(exports_shared_schema.NonEmptyString),
|
|
10707
|
+
instructions: Schema52.optionalKey(Schema52.String),
|
|
10708
|
+
model: Schema52.optionalKey(exports_agent_schema.ModelSelection),
|
|
10709
|
+
tool_names: Schema52.optionalKey(Schema52.Array(Schema52.String)),
|
|
10710
|
+
permissions: Schema52.optionalKey(Schema52.Array(Schema52.String)),
|
|
10711
|
+
output_schema_ref: Schema52.optionalKey(Schema52.String),
|
|
10712
|
+
metadata: Schema52.optionalKey(exports_shared_schema.Metadata),
|
|
10713
|
+
input: Schema52.optionalKey(Schema52.Array(exports_content_schema.Part))
|
|
10672
10714
|
}).annotate({ identifier: "Relay.SpawnChildRunTool.Input" });
|
|
10673
|
-
var Output =
|
|
10715
|
+
var Output = Schema52.Struct({
|
|
10674
10716
|
child_execution_id: exports_ids_schema.ChildExecutionId,
|
|
10675
|
-
status:
|
|
10676
|
-
output:
|
|
10717
|
+
status: Schema52.Literals(["completed", "failed", "cancelled"]),
|
|
10718
|
+
output: Schema52.Array(exports_content_schema.Part)
|
|
10677
10719
|
}).annotate({ identifier: "Relay.SpawnChildRunTool.Output" });
|
|
10678
|
-
var TransferInput =
|
|
10679
|
-
input:
|
|
10720
|
+
var TransferInput = Schema52.Struct({
|
|
10721
|
+
input: Schema52.optionalKey(Schema52.Array(exports_content_schema.Part))
|
|
10680
10722
|
}).annotate({ identifier: "Relay.SpawnChildRunTool.TransferInput" });
|
|
10681
10723
|
var enabled = (agent) => agent.metadata?.multi_agent_enabled === true;
|
|
10682
10724
|
var parentContext = (agent) => ({
|
|
@@ -10863,17 +10905,17 @@ var transferTools = (config) => (config.agent.handoff_targets ?? []).map((target
|
|
|
10863
10905
|
});
|
|
10864
10906
|
|
|
10865
10907
|
// ../runtime/src/memory/memory-service.ts
|
|
10866
|
-
import { Clock as Clock3, Context as Context46, Effect as Effect54, Layer as Layer47, Schema as
|
|
10908
|
+
import { Clock as Clock3, Context as Context46, Effect as Effect54, Layer as Layer47, Schema as Schema54 } from "effect";
|
|
10867
10909
|
import { EmbeddingModel as EmbeddingModel3, Prompt as Prompt9 } from "effect/unstable/ai";
|
|
10868
10910
|
|
|
10869
10911
|
// ../runtime/src/model/embedding-model-service.ts
|
|
10870
|
-
import { Context as Context45, Effect as Effect53, Layer as Layer46, Ref as Ref13, Schema as
|
|
10912
|
+
import { Context as Context45, Effect as Effect53, Layer as Layer46, Ref as Ref13, Schema as Schema53 } from "effect";
|
|
10871
10913
|
import { EmbeddingModel as EmbeddingModel2, Model as Model3 } from "effect/unstable/ai";
|
|
10872
10914
|
|
|
10873
|
-
class EmbeddingModelNotRegistered extends
|
|
10874
|
-
provider:
|
|
10875
|
-
model:
|
|
10876
|
-
registration_key:
|
|
10915
|
+
class EmbeddingModelNotRegistered extends Schema53.TaggedErrorClass()("EmbeddingModelNotRegistered", {
|
|
10916
|
+
provider: Schema53.String,
|
|
10917
|
+
model: Schema53.String,
|
|
10918
|
+
registration_key: Schema53.optionalKey(Schema53.String)
|
|
10877
10919
|
}) {
|
|
10878
10920
|
}
|
|
10879
10921
|
|
|
@@ -10999,7 +11041,7 @@ var defaultTopK = 5;
|
|
|
10999
11041
|
var memoryError = (error) => new exports_memory.MemoryError({
|
|
11000
11042
|
message: error instanceof Error ? `${error.name}: ${error.message}` : String(error)
|
|
11001
11043
|
});
|
|
11002
|
-
var decodeSubject = (subject) =>
|
|
11044
|
+
var decodeSubject = (subject) => Schema54.decodeUnknownEffect(exports_ids_schema.MemorySubjectId)(subject).pipe(Effect54.mapError(memoryError));
|
|
11003
11045
|
var textPart = (text3) => Prompt9.makePart("text", { text: text3 });
|
|
11004
11046
|
var textFromParts = (parts) => parts.filter((part) => part.type === "text").map((part) => part.text).join(`
|
|
11005
11047
|
`).trim();
|
|
@@ -11193,20 +11235,20 @@ __export(exports_model_call_policy, {
|
|
|
11193
11235
|
defaultClassify: () => defaultClassify2,
|
|
11194
11236
|
Service: () => Service35
|
|
11195
11237
|
});
|
|
11196
|
-
import { Context as Context48, Duration as Duration3, Layer as Layer49, Schedule as
|
|
11238
|
+
import { Context as Context48, Duration as Duration3, Layer as Layer49, Schedule as Schedule4 } from "effect";
|
|
11197
11239
|
import { AiError as AiError4 } from "effect/unstable/ai";
|
|
11198
11240
|
|
|
11199
11241
|
class Service35 extends Context48.Service()("@relayfx/runtime/ModelCallPolicy") {
|
|
11200
11242
|
}
|
|
11201
11243
|
var isOutputValidationError = (error) => AiError4.isAiError(error) ? error.reason._tag === "InvalidOutputError" : AiError4.isAiErrorReason(error) && error._tag === "InvalidOutputError";
|
|
11202
11244
|
var defaultClassify2 = (error) => isOutputValidationError(error) ? "terminal" : exports_model_resilience.defaultClassify(error);
|
|
11203
|
-
var defaultSchedule =
|
|
11245
|
+
var defaultSchedule = Schedule4.exponential(Duration3.seconds(1)).pipe(Schedule4.jittered, Schedule4.both(Schedule4.recurs(4)));
|
|
11204
11246
|
var make7 = (input) => ({
|
|
11205
11247
|
classify: input?.classify ?? defaultClassify2,
|
|
11206
11248
|
retrySchedule: input?.retrySchedule ?? defaultSchedule
|
|
11207
11249
|
});
|
|
11208
11250
|
var layer36 = (input) => Layer49.succeed(Service35, Service35.of(make7(input)));
|
|
11209
|
-
var noRetryLayer = layer36({ retrySchedule:
|
|
11251
|
+
var noRetryLayer = layer36({ retrySchedule: Schedule4.recurs(0) });
|
|
11210
11252
|
var testLayer41 = (implementation) => Layer49.succeed(Service35, Service35.of(implementation));
|
|
11211
11253
|
|
|
11212
11254
|
// ../runtime/src/schema-registry/schema-registry-service.ts
|
|
@@ -11221,9 +11263,9 @@ __export(exports_schema_registry_service, {
|
|
|
11221
11263
|
Service: () => Service36,
|
|
11222
11264
|
SchemaRefNotRegistered: () => SchemaRefNotRegistered
|
|
11223
11265
|
});
|
|
11224
|
-
import { Context as Context49, Effect as Effect56, Layer as Layer50, Ref as Ref14, Schema as
|
|
11266
|
+
import { Context as Context49, Effect as Effect56, Layer as Layer50, Ref as Ref14, Schema as Schema55 } from "effect";
|
|
11225
11267
|
|
|
11226
|
-
class SchemaRefNotRegistered extends
|
|
11268
|
+
class SchemaRefNotRegistered extends Schema55.TaggedErrorClass()("SchemaRefNotRegistered", { schema_ref: exports_shared_schema.NonEmptyString }) {
|
|
11227
11269
|
}
|
|
11228
11270
|
|
|
11229
11271
|
class Service36 extends Context49.Service()("@relayfx/runtime/SchemaRegistry") {
|
|
@@ -11356,16 +11398,16 @@ __export(exports_blob_store_service, {
|
|
|
11356
11398
|
BlobStoreError: () => BlobStoreError,
|
|
11357
11399
|
BlobNotResolvable: () => BlobNotResolvable
|
|
11358
11400
|
});
|
|
11359
|
-
import { Context as Context51, Effect as Effect58, Layer as Layer52, Ref as Ref16, Schema as
|
|
11401
|
+
import { Context as Context51, Effect as Effect58, Layer as Layer52, Ref as Ref16, Schema as Schema56 } from "effect";
|
|
11360
11402
|
|
|
11361
|
-
class BlobNotResolvable extends
|
|
11362
|
-
uri:
|
|
11363
|
-
reason:
|
|
11403
|
+
class BlobNotResolvable extends Schema56.TaggedErrorClass()("BlobNotResolvable", {
|
|
11404
|
+
uri: Schema56.String,
|
|
11405
|
+
reason: Schema56.String
|
|
11364
11406
|
}) {
|
|
11365
11407
|
}
|
|
11366
11408
|
|
|
11367
|
-
class BlobStoreError extends
|
|
11368
|
-
message:
|
|
11409
|
+
class BlobStoreError extends Schema56.TaggedErrorClass()("BlobStoreError", {
|
|
11410
|
+
message: Schema56.String
|
|
11369
11411
|
}) {
|
|
11370
11412
|
}
|
|
11371
11413
|
|
|
@@ -11438,7 +11480,7 @@ __export(exports_prompt_assembler_service, {
|
|
|
11438
11480
|
Service: () => Service40,
|
|
11439
11481
|
PromptAssemblerError: () => PromptAssemblerError
|
|
11440
11482
|
});
|
|
11441
|
-
import { Context as Context53, Effect as Effect60, Layer as Layer54, Schema as
|
|
11483
|
+
import { Context as Context53, Effect as Effect60, Layer as Layer54, Schema as Schema58 } from "effect";
|
|
11442
11484
|
import { Prompt as Prompt10 } from "effect/unstable/ai";
|
|
11443
11485
|
|
|
11444
11486
|
// ../runtime/src/content/artifact-store-service.ts
|
|
@@ -11453,11 +11495,11 @@ __export(exports_artifact_store_service, {
|
|
|
11453
11495
|
Memory: () => Memory2,
|
|
11454
11496
|
ArtifactNotResolvable: () => ArtifactNotResolvable
|
|
11455
11497
|
});
|
|
11456
|
-
import { Context as Context52, Effect as Effect59, Layer as Layer53, Schema as
|
|
11498
|
+
import { Context as Context52, Effect as Effect59, Layer as Layer53, Schema as Schema57 } from "effect";
|
|
11457
11499
|
|
|
11458
|
-
class ArtifactNotResolvable extends
|
|
11459
|
-
artifact_id:
|
|
11460
|
-
reason:
|
|
11500
|
+
class ArtifactNotResolvable extends Schema57.TaggedErrorClass()("ArtifactNotResolvable", {
|
|
11501
|
+
artifact_id: Schema57.String,
|
|
11502
|
+
reason: Schema57.String
|
|
11461
11503
|
}) {
|
|
11462
11504
|
}
|
|
11463
11505
|
|
|
@@ -11499,14 +11541,14 @@ var register8 = Effect59.fn("ArtifactStore.register.call")(function* (artifact_i
|
|
|
11499
11541
|
});
|
|
11500
11542
|
|
|
11501
11543
|
// ../runtime/src/agent/prompt-assembler-service.ts
|
|
11502
|
-
class PromptAssemblerError extends
|
|
11503
|
-
message:
|
|
11544
|
+
class PromptAssemblerError extends Schema58.TaggedErrorClass()("PromptAssemblerError", {
|
|
11545
|
+
message: Schema58.String
|
|
11504
11546
|
}) {
|
|
11505
11547
|
}
|
|
11506
11548
|
|
|
11507
11549
|
class Service40 extends Context53.Service()("@relayfx/runtime/PromptAssembler") {
|
|
11508
11550
|
}
|
|
11509
|
-
var jsonValue2 = (value) =>
|
|
11551
|
+
var jsonValue2 = (value) => Schema58.decodeUnknownSync(exports_shared_schema.JsonValue)(value);
|
|
11510
11552
|
var stringifyJson = (value) => JSON.stringify(jsonValue2(value));
|
|
11511
11553
|
var contentToPromptPart = (part) => {
|
|
11512
11554
|
const options = part.provider_options;
|
|
@@ -11650,8 +11692,8 @@ var make9 = (config) => exports_compaction.make(strategy(config), defaultOptions
|
|
|
11650
11692
|
var layerFromEpoch = (epoch) => exports_instructions.layer(epoch.baseline.length === 0 ? [] : [exports_instructions.staticSource("relay:context-epoch", epoch.baseline)]);
|
|
11651
11693
|
|
|
11652
11694
|
// ../runtime/src/agent/relay-permissions.ts
|
|
11653
|
-
import { Clock as Clock6, Effect as Effect62, Equal as Equal2, Layer as Layer56, Option as Option19, Schema as
|
|
11654
|
-
var jsonValue3 = (value) =>
|
|
11695
|
+
import { Clock as Clock6, Effect as Effect62, Equal as Equal2, Layer as Layer56, Option as Option19, Schema as Schema59 } from "effect";
|
|
11696
|
+
var jsonValue3 = (value) => Schema59.decodeUnknownSync(exports_shared_schema.JsonValue)(value === undefined ? null : value);
|
|
11655
11697
|
var waitIdForToolCall = (toolCallId) => exports_ids_schema.WaitId.make(`wait:permission:${toolCallId}`);
|
|
11656
11698
|
var fallbackToolCallId = (request) => `${request.agentName}:${request.turn}:${request.tool}`;
|
|
11657
11699
|
var tokenFor2 = (request) => waitIdForToolCall(request.toolCallId ?? fallbackToolCallId(request));
|
|
@@ -11817,7 +11859,7 @@ var awaitAnswer = Effect62.fn("RelayPermissions.awaitAnswer")(function* (config,
|
|
|
11817
11859
|
});
|
|
11818
11860
|
var rememberRule = Effect62.fn("RelayPermissions.rememberRule")(function* (config, rule) {
|
|
11819
11861
|
const createdAt = yield* Clock6.currentTimeMillis;
|
|
11820
|
-
const decodedRule = yield*
|
|
11862
|
+
const decodedRule = yield* Schema59.decodeUnknownEffect(exports_agent_schema.PermissionRule)(rule).pipe(Effect62.mapError((error) => permissionError(error.message)));
|
|
11821
11863
|
yield* config.repository.remember({
|
|
11822
11864
|
agent: config.agentName,
|
|
11823
11865
|
scope: config.scope,
|
|
@@ -11833,9 +11875,9 @@ var layer40 = (config) => Layer56.mergeAll(Layer56.succeed(exports_permissions.P
|
|
|
11833
11875
|
})));
|
|
11834
11876
|
|
|
11835
11877
|
// ../runtime/src/agent/relay-steering.ts
|
|
11836
|
-
import { Clock as Clock7, Effect as Effect63, Layer as Layer57, Schema as
|
|
11878
|
+
import { Clock as Clock7, Effect as Effect63, Layer as Layer57, Schema as Schema60 } from "effect";
|
|
11837
11879
|
import { Prompt as Prompt11 } from "effect/unstable/ai";
|
|
11838
|
-
var jsonValue4 = (value) =>
|
|
11880
|
+
var jsonValue4 = (value) => Schema60.decodeUnknownSync(exports_shared_schema.JsonValue)(value);
|
|
11839
11881
|
var stringifyJson2 = (value) => JSON.stringify(jsonValue4(value));
|
|
11840
11882
|
var createdAtForSequence2 = (config, sequence) => config.startedAt + sequence - config.eventSequence;
|
|
11841
11883
|
var drainId = (config, kind, sequence) => `drain:${config.executionId}:steering:${kind}:sequence:${sequence}`;
|
|
@@ -11868,7 +11910,7 @@ var contentFromMessage = (message) => {
|
|
|
11868
11910
|
const textParts = promptTextParts(prompt);
|
|
11869
11911
|
if (textParts.length > 0)
|
|
11870
11912
|
return textParts;
|
|
11871
|
-
return [exports_content_schema.text(stringifyJson2(
|
|
11913
|
+
return [exports_content_schema.text(stringifyJson2(Schema60.encodeSync(Prompt11.Prompt)(prompt)))];
|
|
11872
11914
|
};
|
|
11873
11915
|
var steeringReceivedEvent = (config, kind, drain2, messages, sequence) => ({
|
|
11874
11916
|
id: exports_ids_schema.EventId.make(`event:${drain2.drainId}:received`),
|
|
@@ -11913,8 +11955,8 @@ var layer41 = (config) => Layer57.succeed(exports_steering.Steering, exports_ste
|
|
|
11913
11955
|
}));
|
|
11914
11956
|
|
|
11915
11957
|
// ../runtime/src/agent/relay-tool-executor.ts
|
|
11916
|
-
import { Effect as Effect64, Layer as Layer58, Option as Option20, Schema as
|
|
11917
|
-
var jsonValue5 = (value) =>
|
|
11958
|
+
import { Effect as Effect64, Layer as Layer58, Option as Option20, Schema as Schema61 } from "effect";
|
|
11959
|
+
var jsonValue5 = (value) => Schema61.decodeUnknownSync(exports_shared_schema.JsonValue)(value);
|
|
11918
11960
|
var errorDetail = (error) => {
|
|
11919
11961
|
switch (error._tag) {
|
|
11920
11962
|
case "ToolNotRegistered":
|
|
@@ -12021,29 +12063,29 @@ var make12 = (first) => Ref17.make(first).pipe(Effect66.map((ref) => ({
|
|
|
12021
12063
|
})));
|
|
12022
12064
|
|
|
12023
12065
|
// ../runtime/src/agent/agent-loop-service.ts
|
|
12024
|
-
class AgentLoopError extends
|
|
12025
|
-
message:
|
|
12026
|
-
next_event_sequence:
|
|
12066
|
+
class AgentLoopError extends Schema62.TaggedErrorClass()("AgentLoopError", {
|
|
12067
|
+
message: Schema62.String,
|
|
12068
|
+
next_event_sequence: Schema62.optionalKey(exports_execution_schema.ExecutionEventSequence)
|
|
12027
12069
|
}) {
|
|
12028
12070
|
}
|
|
12029
12071
|
|
|
12030
|
-
class AgentLoopWaitRequested extends
|
|
12072
|
+
class AgentLoopWaitRequested extends Schema62.TaggedErrorClass()("AgentLoopWaitRequested", {
|
|
12031
12073
|
wait_id: exports_ids_schema.WaitId,
|
|
12032
12074
|
tool_call: exports_tool_schema.Call,
|
|
12033
12075
|
next_event_sequence: exports_execution_schema.ExecutionEventSequence
|
|
12034
12076
|
}) {
|
|
12035
12077
|
}
|
|
12036
12078
|
|
|
12037
|
-
class AgentLoopBudgetExceeded extends
|
|
12038
|
-
tokens_used:
|
|
12039
|
-
token_budget:
|
|
12079
|
+
class AgentLoopBudgetExceeded extends Schema62.TaggedErrorClass()("AgentLoopBudgetExceeded", {
|
|
12080
|
+
tokens_used: Schema62.Int,
|
|
12081
|
+
token_budget: Schema62.Int,
|
|
12040
12082
|
next_event_sequence: exports_execution_schema.ExecutionEventSequence
|
|
12041
12083
|
}) {
|
|
12042
12084
|
}
|
|
12043
12085
|
|
|
12044
12086
|
class Service41 extends Context54.Service()("@relayfx/runtime/AgentLoop") {
|
|
12045
12087
|
}
|
|
12046
|
-
var jsonValue6 = (value) =>
|
|
12088
|
+
var jsonValue6 = (value) => Schema62.decodeUnknownSync(exports_shared_schema.JsonValue)(value);
|
|
12047
12089
|
var toolNames = (agent) => HashSet6.fromIterable(agent.tool_names);
|
|
12048
12090
|
var availableRegisteredTools = (agent, registered) => {
|
|
12049
12091
|
const names = toolNames(agent);
|
|
@@ -12612,14 +12654,14 @@ var exports_execution_entity = {};
|
|
|
12612
12654
|
__export(exports_execution_entity, {
|
|
12613
12655
|
layer: () => layer49,
|
|
12614
12656
|
entity: () => entity,
|
|
12615
|
-
client: () =>
|
|
12657
|
+
client: () => client2,
|
|
12616
12658
|
Start: () => Start,
|
|
12617
12659
|
SignalWait: () => SignalWait,
|
|
12618
12660
|
Cancel: () => Cancel
|
|
12619
12661
|
});
|
|
12620
12662
|
import { ClusterSchema, Entity } from "effect/unstable/cluster";
|
|
12621
12663
|
import { Rpc } from "effect/unstable/rpc";
|
|
12622
|
-
import { Schema as
|
|
12664
|
+
import { Schema as Schema69 } from "effect";
|
|
12623
12665
|
|
|
12624
12666
|
// ../runtime/src/workflow/execution-workflow.ts
|
|
12625
12667
|
var exports_execution_workflow = {};
|
|
@@ -12650,15 +12692,15 @@ __export(exports_execution_workflow, {
|
|
|
12650
12692
|
ActivityNameTemplates: () => ActivityNameTemplates
|
|
12651
12693
|
});
|
|
12652
12694
|
import { Activity, DurableDeferred, Workflow } from "effect/unstable/workflow";
|
|
12653
|
-
import { Effect as Effect73, Exit as Exit2, Option as Option26, Schema as
|
|
12695
|
+
import { Effect as Effect73, Exit as Exit2, Option as Option26, Schema as Schema68 } from "effect";
|
|
12654
12696
|
|
|
12655
12697
|
// ../runtime/src/child/parent-notifier-service.ts
|
|
12656
|
-
import { Context as Context55, Effect as Effect68, Layer as Layer61, Option as Option23, Ref as Ref19, Schema as
|
|
12657
|
-
class ParentNotifyError extends
|
|
12658
|
-
message:
|
|
12698
|
+
import { Context as Context55, Effect as Effect68, Layer as Layer61, Option as Option23, Ref as Ref19, Schema as Schema63 } from "effect";
|
|
12699
|
+
class ParentNotifyError extends Schema63.TaggedErrorClass()("ParentNotifyError", {
|
|
12700
|
+
message: Schema63.String
|
|
12659
12701
|
}) {
|
|
12660
12702
|
}
|
|
12661
|
-
var ChildTerminalStatus =
|
|
12703
|
+
var ChildTerminalStatus = Schema63.Literals(["completed", "failed", "cancelled"]).annotate({
|
|
12662
12704
|
identifier: "Relay.ParentNotifier.ChildTerminalStatus"
|
|
12663
12705
|
});
|
|
12664
12706
|
|
|
@@ -12757,15 +12799,15 @@ __export(exports_skill_registry_service, {
|
|
|
12757
12799
|
SkillDefinitionInvalid: () => SkillDefinitionInvalid,
|
|
12758
12800
|
Service: () => Service43
|
|
12759
12801
|
});
|
|
12760
|
-
import { Clock as Clock8, Context as Context56, Effect as Effect69, Layer as Layer62, Schema as
|
|
12802
|
+
import { Clock as Clock8, Context as Context56, Effect as Effect69, Layer as Layer62, Schema as Schema64 } from "effect";
|
|
12761
12803
|
|
|
12762
|
-
class SkillDefinitionInvalid extends
|
|
12763
|
-
message:
|
|
12804
|
+
class SkillDefinitionInvalid extends Schema64.TaggedErrorClass()("SkillDefinitionInvalid", {
|
|
12805
|
+
message: Schema64.String
|
|
12764
12806
|
}) {
|
|
12765
12807
|
}
|
|
12766
12808
|
|
|
12767
|
-
class SkillRegistryError extends
|
|
12768
|
-
message:
|
|
12809
|
+
class SkillRegistryError extends Schema64.TaggedErrorClass()("SkillRegistryError", {
|
|
12810
|
+
message: Schema64.String
|
|
12769
12811
|
}) {
|
|
12770
12812
|
}
|
|
12771
12813
|
|
|
@@ -12934,11 +12976,11 @@ __export(exports_execution_service, {
|
|
|
12934
12976
|
Service: () => Service44,
|
|
12935
12977
|
ExecutionServiceError: () => ExecutionServiceError
|
|
12936
12978
|
});
|
|
12937
|
-
import { Clock as Clock9, Context as Context57, Effect as Effect70, Layer as Layer63, Option as Option24, Schema as
|
|
12979
|
+
import { Clock as Clock9, Context as Context57, Effect as Effect70, Layer as Layer63, Option as Option24, Schema as Schema65, Stream as Stream9 } from "effect";
|
|
12938
12980
|
import { ShardingConfig } from "effect/unstable/cluster";
|
|
12939
|
-
class ExecutionServiceError extends
|
|
12940
|
-
message:
|
|
12941
|
-
next_event_sequence:
|
|
12981
|
+
class ExecutionServiceError extends Schema65.TaggedErrorClass()("ExecutionServiceError", {
|
|
12982
|
+
message: Schema65.String,
|
|
12983
|
+
next_event_sequence: Schema65.optionalKey(exports_execution_schema.ExecutionEventSequence)
|
|
12942
12984
|
}) {
|
|
12943
12985
|
}
|
|
12944
12986
|
|
|
@@ -13254,13 +13296,13 @@ var spawnChildRun = Effect70.fn("ExecutionService.spawnChildRun.call")(function*
|
|
|
13254
13296
|
var stream3 = (input) => Stream9.unwrap(Service44.pipe(Effect70.map((service) => service.stream(input))));
|
|
13255
13297
|
|
|
13256
13298
|
// ../runtime/src/workspace/workspace-planner-service.ts
|
|
13257
|
-
import { Context as Context59, Effect as Effect72, HashSet as HashSet7, Layer as Layer65, Option as Option25, Schema as
|
|
13299
|
+
import { Context as Context59, Effect as Effect72, HashSet as HashSet7, Layer as Layer65, Option as Option25, Schema as Schema67 } from "effect";
|
|
13258
13300
|
|
|
13259
13301
|
// ../runtime/src/workspace/workspace-runtime-service.ts
|
|
13260
|
-
import { Context as Context58, Effect as Effect71, Layer as Layer64, Schema as
|
|
13302
|
+
import { Context as Context58, Effect as Effect71, Layer as Layer64, Schema as Schema66 } from "effect";
|
|
13261
13303
|
|
|
13262
|
-
class WorkspaceRuntimeError extends
|
|
13263
|
-
message:
|
|
13304
|
+
class WorkspaceRuntimeError extends Schema66.TaggedErrorClass()("WorkspaceRuntimeError", {
|
|
13305
|
+
message: Schema66.String
|
|
13264
13306
|
}) {
|
|
13265
13307
|
}
|
|
13266
13308
|
|
|
@@ -13288,18 +13330,18 @@ var exec = Effect71.fn("WorkspaceRuntime.exec.call")(function* (input) {
|
|
|
13288
13330
|
});
|
|
13289
13331
|
|
|
13290
13332
|
// ../runtime/src/workspace/workspace-planner-service.ts
|
|
13291
|
-
class WorkspaceRuntimeMissing extends
|
|
13333
|
+
class WorkspaceRuntimeMissing extends Schema67.TaggedErrorClass()("WorkspaceRuntimeMissing", {
|
|
13292
13334
|
execution_id: exports_ids_schema.ExecutionId
|
|
13293
13335
|
}) {
|
|
13294
13336
|
}
|
|
13295
13337
|
|
|
13296
|
-
class WorkspaceLeaseMissingRef extends
|
|
13338
|
+
class WorkspaceLeaseMissingRef extends Schema67.TaggedErrorClass()("WorkspaceLeaseMissingRef", {
|
|
13297
13339
|
execution_id: exports_ids_schema.ExecutionId
|
|
13298
13340
|
}) {
|
|
13299
13341
|
}
|
|
13300
13342
|
|
|
13301
|
-
class WorkspacePlannerError extends
|
|
13302
|
-
message:
|
|
13343
|
+
class WorkspacePlannerError extends Schema67.TaggedErrorClass()("WorkspacePlannerError", {
|
|
13344
|
+
message: Schema67.String
|
|
13303
13345
|
}) {
|
|
13304
13346
|
}
|
|
13305
13347
|
|
|
@@ -13485,67 +13527,67 @@ var fail = Effect72.fn("WorkspacePlanner.fail.call")(function* (input) {
|
|
|
13485
13527
|
});
|
|
13486
13528
|
|
|
13487
13529
|
// ../runtime/src/workflow/execution-workflow.ts
|
|
13488
|
-
class ExecutionWorkflowFailed extends
|
|
13489
|
-
message:
|
|
13530
|
+
class ExecutionWorkflowFailed extends Schema68.TaggedErrorClass()("ExecutionWorkflowFailed", {
|
|
13531
|
+
message: Schema68.String
|
|
13490
13532
|
}) {
|
|
13491
13533
|
}
|
|
13492
|
-
var StartInput =
|
|
13534
|
+
var StartInput = Schema68.Struct({
|
|
13493
13535
|
execution_id: exports_ids_schema.ExecutionId,
|
|
13494
13536
|
root_address_id: exports_ids_schema.AddressId,
|
|
13495
|
-
session_id:
|
|
13496
|
-
input:
|
|
13537
|
+
session_id: Schema68.optionalKey(exports_ids_schema.SessionId),
|
|
13538
|
+
input: Schema68.optionalKey(Schema68.Array(exports_content_schema.Part)),
|
|
13497
13539
|
event_sequence: exports_execution_schema.ExecutionEventSequence,
|
|
13498
13540
|
started_at: exports_shared_schema.TimestampMillis,
|
|
13499
13541
|
completed_at: exports_shared_schema.TimestampMillis,
|
|
13500
|
-
agent_id:
|
|
13501
|
-
agent_revision:
|
|
13502
|
-
agent_snapshot:
|
|
13503
|
-
agent_tool_input_schema_digests:
|
|
13504
|
-
wait_id:
|
|
13505
|
-
resume_tool_call:
|
|
13506
|
-
workflow_generation:
|
|
13507
|
-
metadata:
|
|
13542
|
+
agent_id: Schema68.optionalKey(exports_ids_schema.AgentId),
|
|
13543
|
+
agent_revision: Schema68.optionalKey(exports_agent_schema.DefinitionRevision),
|
|
13544
|
+
agent_snapshot: Schema68.optionalKey(exports_agent_schema.Definition),
|
|
13545
|
+
agent_tool_input_schema_digests: Schema68.optionalKey(exports_agent_schema.ToolInputSchemaDigests),
|
|
13546
|
+
wait_id: Schema68.optionalKey(exports_ids_schema.WaitId),
|
|
13547
|
+
resume_tool_call: Schema68.optionalKey(exports_tool_schema.Call),
|
|
13548
|
+
workflow_generation: Schema68.optionalKey(Schema68.Int.check(Schema68.isGreaterThanOrEqualTo(0))),
|
|
13549
|
+
metadata: Schema68.optionalKey(exports_shared_schema.Metadata)
|
|
13508
13550
|
}).annotate({ identifier: "Relay.ExecutionWorkflow.StartInput" });
|
|
13509
|
-
var WaitSignalState =
|
|
13551
|
+
var WaitSignalState = Schema68.Literals(["resolved", "timed_out", "cancelled"]).annotate({
|
|
13510
13552
|
identifier: "Relay.ExecutionWorkflow.WaitSignalState"
|
|
13511
13553
|
});
|
|
13512
|
-
var WaitSignal =
|
|
13554
|
+
var WaitSignal = Schema68.Struct({
|
|
13513
13555
|
wait_id: exports_ids_schema.WaitId,
|
|
13514
13556
|
state: WaitSignalState,
|
|
13515
13557
|
signaled_at: exports_shared_schema.TimestampMillis
|
|
13516
13558
|
}).annotate({ identifier: "Relay.ExecutionWorkflow.WaitSignal" });
|
|
13517
|
-
var SignalWaitInput =
|
|
13518
|
-
workflow_execution_id:
|
|
13559
|
+
var SignalWaitInput = Schema68.Struct({
|
|
13560
|
+
workflow_execution_id: Schema68.String,
|
|
13519
13561
|
wait_id: exports_ids_schema.WaitId,
|
|
13520
13562
|
state: WaitSignalState,
|
|
13521
13563
|
signaled_at: exports_shared_schema.TimestampMillis
|
|
13522
13564
|
}).annotate({ identifier: "Relay.ExecutionWorkflow.SignalWaitInput" });
|
|
13523
|
-
var CancelExecutionInput =
|
|
13565
|
+
var CancelExecutionInput = Schema68.Struct({
|
|
13524
13566
|
execution_id: exports_ids_schema.ExecutionId,
|
|
13525
13567
|
cancelled_at: exports_shared_schema.TimestampMillis,
|
|
13526
|
-
reason:
|
|
13568
|
+
reason: Schema68.optionalKey(Schema68.String)
|
|
13527
13569
|
}).annotate({ identifier: "Relay.ExecutionWorkflow.CancelExecutionInput" });
|
|
13528
|
-
var CancelExecutionResult =
|
|
13570
|
+
var CancelExecutionResult = Schema68.Struct({
|
|
13529
13571
|
execution_id: exports_ids_schema.ExecutionId,
|
|
13530
13572
|
status: exports_execution_schema.ExecutionStatus
|
|
13531
13573
|
}).annotate({ identifier: "Relay.ExecutionWorkflow.CancelExecutionResult" });
|
|
13532
|
-
var WaitSnapshot =
|
|
13574
|
+
var WaitSnapshot = Schema68.Struct({
|
|
13533
13575
|
id: exports_ids_schema.WaitId,
|
|
13534
13576
|
execution_id: exports_ids_schema.ExecutionId,
|
|
13535
|
-
envelope_id:
|
|
13577
|
+
envelope_id: Schema68.optionalKey(exports_ids_schema.EnvelopeId),
|
|
13536
13578
|
mode: exports_envelope_schema.WaitMode,
|
|
13537
|
-
correlation_key:
|
|
13538
|
-
state:
|
|
13579
|
+
correlation_key: Schema68.optionalKey(Schema68.String),
|
|
13580
|
+
state: Schema68.Literals(["open", "resolved", "timed_out", "cancelled"]),
|
|
13539
13581
|
metadata: exports_shared_schema.Metadata,
|
|
13540
13582
|
created_at: exports_shared_schema.TimestampMillis,
|
|
13541
|
-
resolved_at:
|
|
13583
|
+
resolved_at: Schema68.optionalKey(exports_shared_schema.TimestampMillis)
|
|
13542
13584
|
}).annotate({ identifier: "Relay.ExecutionWorkflow.WaitSnapshot" });
|
|
13543
|
-
var StartResult =
|
|
13585
|
+
var StartResult = Schema68.Struct({
|
|
13544
13586
|
execution_id: exports_ids_schema.ExecutionId,
|
|
13545
13587
|
status: exports_execution_schema.ExecutionStatus,
|
|
13546
|
-
wait_id:
|
|
13547
|
-
wait_state:
|
|
13548
|
-
metadata:
|
|
13588
|
+
wait_id: Schema68.optionalKey(exports_ids_schema.WaitId),
|
|
13589
|
+
wait_state: Schema68.optionalKey(Schema68.Literals(["resolved", "timed_out", "cancelled"])),
|
|
13590
|
+
metadata: Schema68.optionalKey(exports_shared_schema.Metadata)
|
|
13549
13591
|
}).annotate({ identifier: "Relay.ExecutionWorkflow.StartResult" });
|
|
13550
13592
|
var StartExecutionWorkflowName = "Relay/Execution/Start";
|
|
13551
13593
|
var ActivityNames = {
|
|
@@ -13755,7 +13797,7 @@ var cancelExecution = (input, turn, reason) => Activity.make({
|
|
|
13755
13797
|
});
|
|
13756
13798
|
var loadCancellationRequested = (input, turn) => Activity.make({
|
|
13757
13799
|
name: ActivityNames.checkCancel(turn),
|
|
13758
|
-
success:
|
|
13800
|
+
success: Schema68.Boolean,
|
|
13759
13801
|
error: ExecutionWorkflowFailed,
|
|
13760
13802
|
execute: Effect73.gen(function* () {
|
|
13761
13803
|
const repository = yield* exports_execution_repository.Service;
|
|
@@ -13765,7 +13807,7 @@ var loadCancellationRequested = (input, turn) => Activity.make({
|
|
|
13765
13807
|
});
|
|
13766
13808
|
var loadWait = (name, waitId) => Activity.make({
|
|
13767
13809
|
name,
|
|
13768
|
-
success:
|
|
13810
|
+
success: Schema68.UndefinedOr(WaitSnapshot),
|
|
13769
13811
|
error: ExecutionWorkflowFailed,
|
|
13770
13812
|
execute: get11(waitId).pipe(Effect73.map((record2) => record2 === undefined ? undefined : toWaitSnapshot(record2)), Effect73.mapError(mapWaitError2))
|
|
13771
13813
|
});
|
|
@@ -13856,7 +13898,7 @@ var compactionForStart = Effect73.fn("ExecutionWorkflow.compactionForStart")(fun
|
|
|
13856
13898
|
...keepRecentTokens === undefined ? {} : { keepRecentTokens }
|
|
13857
13899
|
};
|
|
13858
13900
|
});
|
|
13859
|
-
var decodeMemorySubject = (value) => typeof value === "string" ?
|
|
13901
|
+
var decodeMemorySubject = (value) => typeof value === "string" ? Schema68.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" }));
|
|
13860
13902
|
var memorySubjectForStart = Effect73.fn("ExecutionWorkflow.memorySubjectForStart")(function* (input) {
|
|
13861
13903
|
const executionSubject = memorySubjectFromMetadata(input.metadata);
|
|
13862
13904
|
if (executionSubject !== undefined)
|
|
@@ -13874,7 +13916,7 @@ var steeringEnabledForStart = (input) => {
|
|
|
13874
13916
|
var nextEventSequence4 = (eventLog, executionId) => eventLog.maxSequence(executionId).pipe(Effect73.map((max) => max === undefined ? 0 : max + 1), Effect73.mapError(mapEventLogError6));
|
|
13875
13917
|
var ensureWorkspace = (input) => Activity.make({
|
|
13876
13918
|
name: ActivityNames.ensureWorkspace,
|
|
13877
|
-
success:
|
|
13919
|
+
success: Schema68.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
13878
13920
|
error: ExecutionWorkflowFailed,
|
|
13879
13921
|
execute: Effect73.gen(function* () {
|
|
13880
13922
|
if (input.agent_snapshot === undefined)
|
|
@@ -13891,19 +13933,19 @@ var ensureWorkspace = (input) => Activity.make({
|
|
|
13891
13933
|
});
|
|
13892
13934
|
var suspendWorkspace = (input, key2) => Activity.make({
|
|
13893
13935
|
name: ActivityNames.suspendWorkspace(key2),
|
|
13894
|
-
success:
|
|
13936
|
+
success: Schema68.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
13895
13937
|
error: ExecutionWorkflowFailed,
|
|
13896
13938
|
execute: suspend2({ executionId: input.execution_id, now: input.started_at }).pipe(Effect73.mapError(mapWorkspaceError))
|
|
13897
13939
|
});
|
|
13898
13940
|
var resumeWorkspace = (input, key2) => Activity.make({
|
|
13899
13941
|
name: ActivityNames.resumeWorkspace(key2),
|
|
13900
|
-
success:
|
|
13942
|
+
success: Schema68.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
13901
13943
|
error: ExecutionWorkflowFailed,
|
|
13902
13944
|
execute: resume2({ executionId: input.execution_id, now: input.started_at }).pipe(Effect73.map((plan2) => plan2?.lease), Effect73.mapError(mapWorkspaceError))
|
|
13903
13945
|
});
|
|
13904
13946
|
var releaseWorkspace = (input) => Activity.make({
|
|
13905
13947
|
name: ActivityNames.releaseWorkspace,
|
|
13906
|
-
success:
|
|
13948
|
+
success: Schema68.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
13907
13949
|
error: ExecutionWorkflowFailed,
|
|
13908
13950
|
execute: release2({ executionId: input.execution_id, now: input.completed_at }).pipe(Effect73.mapError(mapWorkspaceError))
|
|
13909
13951
|
});
|
|
@@ -14004,7 +14046,7 @@ var childDispatchContext = (input) => {
|
|
|
14004
14046
|
};
|
|
14005
14047
|
var loadChildCancellationRequested = (input) => Activity.make({
|
|
14006
14048
|
name: ActivityNames.checkQueuedChildCancellation,
|
|
14007
|
-
success:
|
|
14049
|
+
success: Schema68.Boolean,
|
|
14008
14050
|
error: ExecutionWorkflowFailed,
|
|
14009
14051
|
execute: Effect73.gen(function* () {
|
|
14010
14052
|
const context = childDispatchContext(input);
|
|
@@ -14016,7 +14058,7 @@ var loadChildCancellationRequested = (input) => Activity.make({
|
|
|
14016
14058
|
});
|
|
14017
14059
|
var notifyParentActivity = (input, context, status, output) => Activity.make({
|
|
14018
14060
|
name: ActivityNames.notifyParent(status),
|
|
14019
|
-
success:
|
|
14061
|
+
success: Schema68.Void,
|
|
14020
14062
|
error: ExecutionWorkflowFailed,
|
|
14021
14063
|
execute: Effect73.gen(function* () {
|
|
14022
14064
|
const notifier = yield* Effect73.serviceOption(Service42);
|
|
@@ -14069,7 +14111,7 @@ var waitIdFromExecution = (execution) => {
|
|
|
14069
14111
|
};
|
|
14070
14112
|
var pendingToolCallFromExecution = (execution) => {
|
|
14071
14113
|
const pending = execution.metadata?.pending_tool_call;
|
|
14072
|
-
return
|
|
14114
|
+
return Schema68.decodeUnknownOption(exports_tool_schema.Call)(pending).pipe(Option26.getOrUndefined);
|
|
14073
14115
|
};
|
|
14074
14116
|
var finishCancelledWait = Effect73.fn("ExecutionWorkflow.finishCancelledWait")(function* (startInput, turn, waitId) {
|
|
14075
14117
|
const cancelled = yield* cancelExecution(startInput, turn, "wait cancelled");
|
|
@@ -14283,7 +14325,7 @@ var Start = Rpc.make("start", {
|
|
|
14283
14325
|
}).annotate(ClusterSchema.Persisted, true).annotate(ClusterSchema.Uninterruptible, "server");
|
|
14284
14326
|
var SignalWait = Rpc.make("signalWait", {
|
|
14285
14327
|
payload: SignalWaitInput,
|
|
14286
|
-
success:
|
|
14328
|
+
success: Schema69.Void,
|
|
14287
14329
|
error: ExecutionWorkflowFailed
|
|
14288
14330
|
}).annotate(ClusterSchema.Persisted, true).annotate(ClusterSchema.Uninterruptible, "server");
|
|
14289
14331
|
var Cancel = Rpc.make("cancel", {
|
|
@@ -14297,7 +14339,7 @@ var layer49 = entity.toLayer(entity.of({
|
|
|
14297
14339
|
signalWait: (request) => signalWait(request.payload),
|
|
14298
14340
|
cancel: (request) => cancelRequest(request.payload)
|
|
14299
14341
|
}), { concurrency: "unbounded" });
|
|
14300
|
-
var
|
|
14342
|
+
var client2 = entity.client;
|
|
14301
14343
|
// ../runtime/src/envelope/envelope-service.ts
|
|
14302
14344
|
var exports_envelope_service = {};
|
|
14303
14345
|
__export(exports_envelope_service, {
|
|
@@ -14311,26 +14353,26 @@ __export(exports_envelope_service, {
|
|
|
14311
14353
|
EnvelopeRouteDeferred: () => EnvelopeRouteDeferred,
|
|
14312
14354
|
EnvelopeAddressNotFound: () => EnvelopeAddressNotFound
|
|
14313
14355
|
});
|
|
14314
|
-
import { Context as Context60, Effect as Effect74, Layer as Layer67, Schema as
|
|
14315
|
-
class EnvelopeAddressNotFound extends
|
|
14356
|
+
import { Context as Context60, Effect as Effect74, Layer as Layer67, Schema as Schema70 } from "effect";
|
|
14357
|
+
class EnvelopeAddressNotFound extends Schema70.TaggedErrorClass()("EnvelopeAddressNotFound", {
|
|
14316
14358
|
address_id: exports_ids_schema.AddressId
|
|
14317
14359
|
}) {
|
|
14318
14360
|
}
|
|
14319
14361
|
|
|
14320
|
-
class EnvelopeRouteUnavailable extends
|
|
14362
|
+
class EnvelopeRouteUnavailable extends Schema70.TaggedErrorClass()("EnvelopeRouteUnavailable", {
|
|
14321
14363
|
address_id: exports_ids_schema.AddressId,
|
|
14322
|
-
route_key:
|
|
14364
|
+
route_key: Schema70.String
|
|
14323
14365
|
}) {
|
|
14324
14366
|
}
|
|
14325
14367
|
|
|
14326
|
-
class EnvelopeRouteDeferred extends
|
|
14368
|
+
class EnvelopeRouteDeferred extends Schema70.TaggedErrorClass()("EnvelopeRouteDeferred", {
|
|
14327
14369
|
address_id: exports_ids_schema.AddressId,
|
|
14328
|
-
route_key:
|
|
14370
|
+
route_key: Schema70.String
|
|
14329
14371
|
}) {
|
|
14330
14372
|
}
|
|
14331
14373
|
|
|
14332
|
-
class EnvelopeServiceError extends
|
|
14333
|
-
message:
|
|
14374
|
+
class EnvelopeServiceError extends Schema70.TaggedErrorClass()("EnvelopeServiceError", {
|
|
14375
|
+
message: Schema70.String
|
|
14334
14376
|
}) {
|
|
14335
14377
|
}
|
|
14336
14378
|
|
|
@@ -14488,7 +14530,7 @@ __export(exports_runner_runtime_service, {
|
|
|
14488
14530
|
DatabaseMode: () => DatabaseMode,
|
|
14489
14531
|
ClusterConfigMismatch: () => ClusterConfigMismatch
|
|
14490
14532
|
});
|
|
14491
|
-
import { Config as Config5, Context as Context62, Crypto as Crypto4, Duration as Duration5, Effect as Effect77, Layer as Layer69, Option as Option27, Schema as
|
|
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 Schema72, Stream as Stream10 } from "effect";
|
|
14492
14534
|
import {
|
|
14493
14535
|
ClusterWorkflowEngine,
|
|
14494
14536
|
HttpRunner,
|
|
@@ -14526,7 +14568,7 @@ __export(exports_scheduler_service, {
|
|
|
14526
14568
|
SchedulerError: () => SchedulerError,
|
|
14527
14569
|
ScheduleCronInvalid: () => ScheduleCronInvalid
|
|
14528
14570
|
});
|
|
14529
|
-
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
|
|
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 Schema71 } from "effect";
|
|
14530
14572
|
|
|
14531
14573
|
// ../runtime/src/wait/wait-signal.ts
|
|
14532
14574
|
var exports_wait_signal = {};
|
|
@@ -14536,8 +14578,8 @@ __export(exports_wait_signal, {
|
|
|
14536
14578
|
import { Effect as Effect75 } from "effect";
|
|
14537
14579
|
var signalWorkflowWait = Effect75.fn("WaitSignal.signalWorkflowWait")(function* (input) {
|
|
14538
14580
|
const workflowExecutionId2 = yield* activeWorkflowExecutionIdForExecution(input.executionId);
|
|
14539
|
-
const
|
|
14540
|
-
yield*
|
|
14581
|
+
const client3 = input.makeExecutionClient(input.executionId);
|
|
14582
|
+
yield* client3.signalWait({
|
|
14541
14583
|
workflow_execution_id: workflowExecutionId2,
|
|
14542
14584
|
wait_id: input.waitId,
|
|
14543
14585
|
state: input.state,
|
|
@@ -14546,14 +14588,14 @@ var signalWorkflowWait = Effect75.fn("WaitSignal.signalWorkflowWait")(function*
|
|
|
14546
14588
|
});
|
|
14547
14589
|
|
|
14548
14590
|
// ../runtime/src/schedule/scheduler-service.ts
|
|
14549
|
-
class SchedulerError extends
|
|
14550
|
-
message:
|
|
14591
|
+
class SchedulerError extends Schema71.TaggedErrorClass()("SchedulerError", {
|
|
14592
|
+
message: Schema71.String
|
|
14551
14593
|
}) {
|
|
14552
14594
|
}
|
|
14553
14595
|
|
|
14554
|
-
class ScheduleCronInvalid extends
|
|
14555
|
-
cron_expr:
|
|
14556
|
-
message:
|
|
14596
|
+
class ScheduleCronInvalid extends Schema71.TaggedErrorClass()("ScheduleCronInvalid", {
|
|
14597
|
+
cron_expr: Schema71.String,
|
|
14598
|
+
message: Schema71.String
|
|
14557
14599
|
}) {
|
|
14558
14600
|
}
|
|
14559
14601
|
|
|
@@ -14591,7 +14633,7 @@ var make14 = Effect76.gen(function* () {
|
|
|
14591
14633
|
const waits = yield* Service25;
|
|
14592
14634
|
const eventLog = yield* Service24;
|
|
14593
14635
|
const executionRepository = yield* exports_execution_repository.Service;
|
|
14594
|
-
const makeExecutionClient = yield*
|
|
14636
|
+
const makeExecutionClient = yield* client2;
|
|
14595
14637
|
const workerId = yield* workerIdConfig;
|
|
14596
14638
|
const claimTtlMillis = yield* claimTtlMillisConfig;
|
|
14597
14639
|
const pollIntervalMillis = yield* pollIntervalMillisConfig;
|
|
@@ -14704,25 +14746,25 @@ var runOnce2 = Effect76.fn("SchedulerService.runOnce.call")(function* () {
|
|
|
14704
14746
|
});
|
|
14705
14747
|
|
|
14706
14748
|
// ../runtime/src/runner/runner-runtime-service.ts
|
|
14707
|
-
var DatabaseMode =
|
|
14749
|
+
var DatabaseMode = Schema72.Literals(["sql", "pg", "mysql", "sqlite", "memory"]).annotate({
|
|
14708
14750
|
identifier: "Relay.RunnerRuntime.DatabaseMode"
|
|
14709
14751
|
});
|
|
14710
|
-
var ReadinessStatus =
|
|
14752
|
+
var ReadinessStatus = Schema72.Struct({
|
|
14711
14753
|
database: DatabaseMode,
|
|
14712
|
-
cluster:
|
|
14713
|
-
workflow:
|
|
14714
|
-
executionEntity:
|
|
14754
|
+
cluster: Schema72.Literal("ready"),
|
|
14755
|
+
workflow: Schema72.Literals(["ready", "client"]),
|
|
14756
|
+
executionEntity: Schema72.Literals(["registered", "client"])
|
|
14715
14757
|
}).annotate({ identifier: "Relay.RunnerRuntime.ReadinessStatus" });
|
|
14716
14758
|
|
|
14717
|
-
class RunnerRuntimeError extends
|
|
14718
|
-
message:
|
|
14759
|
+
class RunnerRuntimeError extends Schema72.TaggedErrorClass()("RunnerRuntimeError", {
|
|
14760
|
+
message: Schema72.String
|
|
14719
14761
|
}) {
|
|
14720
14762
|
}
|
|
14721
14763
|
|
|
14722
|
-
class ClusterConfigMismatch extends
|
|
14723
|
-
field:
|
|
14724
|
-
expected:
|
|
14725
|
-
actual:
|
|
14764
|
+
class ClusterConfigMismatch extends Schema72.TaggedErrorClass()("ClusterConfigMismatch", {
|
|
14765
|
+
field: Schema72.String,
|
|
14766
|
+
expected: Schema72.String,
|
|
14767
|
+
actual: Schema72.String
|
|
14726
14768
|
}) {
|
|
14727
14769
|
}
|
|
14728
14770
|
|
|
@@ -14736,7 +14778,7 @@ var memoryClusterLayer = Sharding.layer.pipe(Layer69.provideMerge(Runners.layerN
|
|
|
14736
14778
|
var clusterHost = Config5.string("RELAY_CLUSTER_HOST").pipe(Config5.withDefault("localhost"));
|
|
14737
14779
|
var clusterPort = Config5.int("RELAY_CLUSTER_PORT").pipe(Config5.withDefault(34431));
|
|
14738
14780
|
var clusterShardsPerGroup = Config5.int("RELAY_CLUSTER_SHARDS_PER_GROUP").pipe(Config5.withDefault(300));
|
|
14739
|
-
var clusterShardGroups = Config5.schema(Config5.Array(
|
|
14781
|
+
var clusterShardGroups = Config5.schema(Config5.Array(Schema72.String), "RELAY_CLUSTER_SHARD_GROUPS").pipe(Config5.withDefault(["default", "execution"]));
|
|
14740
14782
|
var runnerAddressKey = (address) => `${address.host}:${address.port}`;
|
|
14741
14783
|
var runnerAddressEquals = (left, right) => left.host === right.host && left.port === right.port;
|
|
14742
14784
|
var shardingConfigFromEnv = () => Layer69.effect(ShardingConfig2.ShardingConfig, Effect77.gen(function* () {
|
|
@@ -14837,7 +14879,7 @@ var testCryptoLayer = Layer69.succeed(Crypto4.Crypto, Crypto4.make({
|
|
|
14837
14879
|
var executionServiceLayer = layer46.pipe(Layer69.provideMerge(layer32));
|
|
14838
14880
|
var addressResolutionLayerWith = (toolRuntimeLayer) => layer25.pipe(Layer69.provideMerge(layerFromRepository), Layer69.provideMerge(layer24.pipe(Layer69.provideMerge(toolRuntimeLayer))));
|
|
14839
14881
|
var parentNotifierLayer = Layer69.effect(Service42, Effect77.gen(function* () {
|
|
14840
|
-
const makeExecutionClient = yield*
|
|
14882
|
+
const makeExecutionClient = yield* client2;
|
|
14841
14883
|
const executionRepository = yield* exports_execution_repository.Service;
|
|
14842
14884
|
return yield* make13({
|
|
14843
14885
|
signalWait: (input) => signalWorkflowWait({
|
|
@@ -14856,7 +14898,7 @@ var workflowAndEntityLayerWith = (toolRuntimeLayer, schedulerLayer, promptAssemb
|
|
|
14856
14898
|
var makeService2 = (database, checkDatabase) => Effect77.gen(function* () {
|
|
14857
14899
|
const sharding = yield* Sharding.Sharding;
|
|
14858
14900
|
const workflow = yield* WorkflowEngine.WorkflowEngine;
|
|
14859
|
-
const makeClient = yield*
|
|
14901
|
+
const makeClient = yield* client2;
|
|
14860
14902
|
return Service49.of({
|
|
14861
14903
|
check: Effect77.fn("RunnerRuntime.check")(function* () {
|
|
14862
14904
|
yield* Effect77.annotateCurrentSpan("relay.database.mode", database);
|
|
@@ -14903,7 +14945,7 @@ var sqlCheckLayer = Layer69.effect(Service49, Effect77.gen(function* () {
|
|
|
14903
14945
|
}));
|
|
14904
14946
|
var makeClientService = (database, checkDatabase) => Effect77.gen(function* () {
|
|
14905
14947
|
const sharding = yield* Sharding.Sharding;
|
|
14906
|
-
const makeClient = yield*
|
|
14948
|
+
const makeClient = yield* client2;
|
|
14907
14949
|
return Service49.of({
|
|
14908
14950
|
check: Effect77.fn("RunnerRuntime.check")(function* () {
|
|
14909
14951
|
yield* Effect77.annotateCurrentSpan("relay.database.mode", database);
|
|
@@ -15066,51 +15108,51 @@ __export(exports_activity_version_registry, {
|
|
|
15066
15108
|
ActivityManifestChange: () => ActivityManifestChange,
|
|
15067
15109
|
ActivityManifest: () => ActivityManifest
|
|
15068
15110
|
});
|
|
15069
|
-
import { Crypto as Crypto5, Effect as Effect78, Schema as
|
|
15111
|
+
import { Crypto as Crypto5, Effect as Effect78, Schema as Schema73 } from "effect";
|
|
15070
15112
|
var generatedFrom = "@relayfx/runtime/ExecutionWorkflow";
|
|
15071
|
-
var ActivityManifestEntry =
|
|
15072
|
-
name:
|
|
15073
|
-
signature_hash:
|
|
15113
|
+
var ActivityManifestEntry = Schema73.Struct({
|
|
15114
|
+
name: Schema73.String,
|
|
15115
|
+
signature_hash: Schema73.String
|
|
15074
15116
|
}).annotate({ identifier: "Relay.ActivityManifestEntry" });
|
|
15075
|
-
var ActivityManifest =
|
|
15076
|
-
version:
|
|
15077
|
-
generated_from:
|
|
15078
|
-
hash_algorithm:
|
|
15079
|
-
activities:
|
|
15117
|
+
var ActivityManifest = Schema73.Struct({
|
|
15118
|
+
version: Schema73.Literal(1),
|
|
15119
|
+
generated_from: Schema73.String,
|
|
15120
|
+
hash_algorithm: Schema73.Literal("sha256-json-schema-v1"),
|
|
15121
|
+
activities: Schema73.Array(ActivityManifestEntry)
|
|
15080
15122
|
}).annotate({ identifier: "Relay.ActivityManifest" });
|
|
15081
|
-
var ActivityManifestChange =
|
|
15082
|
-
type:
|
|
15083
|
-
name:
|
|
15084
|
-
baseline_hash:
|
|
15085
|
-
current_hash:
|
|
15123
|
+
var ActivityManifestChange = Schema73.Struct({
|
|
15124
|
+
type: Schema73.Literals(["removed", "changed", "added"]),
|
|
15125
|
+
name: Schema73.String,
|
|
15126
|
+
baseline_hash: Schema73.optionalKey(Schema73.String),
|
|
15127
|
+
current_hash: Schema73.optionalKey(Schema73.String)
|
|
15086
15128
|
}).annotate({ identifier: "Relay.ActivityManifestChange" });
|
|
15087
|
-
var ActivityManifestGuardResult =
|
|
15088
|
-
status:
|
|
15089
|
-
waiting_executions:
|
|
15090
|
-
breaking_changes:
|
|
15091
|
-
additive_changes:
|
|
15129
|
+
var ActivityManifestGuardResult = Schema73.Struct({
|
|
15130
|
+
status: Schema73.Literals(["pass", "fail"]),
|
|
15131
|
+
waiting_executions: Schema73.Int.check(Schema73.isGreaterThanOrEqualTo(0)),
|
|
15132
|
+
breaking_changes: Schema73.Array(ActivityManifestChange),
|
|
15133
|
+
additive_changes: Schema73.Array(ActivityManifestChange)
|
|
15092
15134
|
}).annotate({ identifier: "Relay.ActivityManifestGuardResult" });
|
|
15093
15135
|
|
|
15094
|
-
class ActivityManifestGuardFailed extends
|
|
15095
|
-
message:
|
|
15136
|
+
class ActivityManifestGuardFailed extends Schema73.TaggedErrorClass()("ActivityManifestGuardFailed", {
|
|
15137
|
+
message: Schema73.String,
|
|
15096
15138
|
result: ActivityManifestGuardResult
|
|
15097
15139
|
}) {
|
|
15098
15140
|
}
|
|
15099
|
-
var TurnInput =
|
|
15141
|
+
var TurnInput = Schema73.Struct({
|
|
15100
15142
|
start: StartInput,
|
|
15101
|
-
turn:
|
|
15143
|
+
turn: Schema73.Int.check(Schema73.isGreaterThanOrEqualTo(0))
|
|
15102
15144
|
});
|
|
15103
|
-
var WaitIdInput =
|
|
15145
|
+
var WaitIdInput = Schema73.Struct({
|
|
15104
15146
|
wait_id: exports_ids_schema.WaitId
|
|
15105
15147
|
});
|
|
15106
|
-
var WorkspaceKeyInput =
|
|
15148
|
+
var WorkspaceKeyInput = Schema73.Struct({
|
|
15107
15149
|
start: StartInput,
|
|
15108
|
-
key:
|
|
15150
|
+
key: Schema73.String
|
|
15109
15151
|
});
|
|
15110
15152
|
var contracts = [
|
|
15111
15153
|
{
|
|
15112
15154
|
name: ActivityNameTemplates.resolveLocalAgent,
|
|
15113
|
-
input:
|
|
15155
|
+
input: Schema73.Struct({ address_id: exports_ids_schema.AddressId }),
|
|
15114
15156
|
success: LocalAgentTarget,
|
|
15115
15157
|
error: ExecutionWorkflowFailed
|
|
15116
15158
|
},
|
|
@@ -15122,66 +15164,66 @@ var contracts = [
|
|
|
15122
15164
|
},
|
|
15123
15165
|
{
|
|
15124
15166
|
name: ActivityNameTemplates.cancel,
|
|
15125
|
-
input:
|
|
15167
|
+
input: Schema73.Struct({ start: StartInput, turn: Schema73.Int, reason: Schema73.String }),
|
|
15126
15168
|
success: exports_execution_schema.Execution,
|
|
15127
15169
|
error: ExecutionWorkflowFailed
|
|
15128
15170
|
},
|
|
15129
15171
|
{
|
|
15130
15172
|
name: ActivityNameTemplates.checkCancel,
|
|
15131
15173
|
input: TurnInput,
|
|
15132
|
-
success:
|
|
15174
|
+
success: Schema73.Boolean,
|
|
15133
15175
|
error: ExecutionWorkflowFailed
|
|
15134
15176
|
},
|
|
15135
15177
|
{
|
|
15136
15178
|
name: ActivityNameTemplates.loadWaitBeforeSleep,
|
|
15137
15179
|
input: WaitIdInput,
|
|
15138
|
-
success:
|
|
15180
|
+
success: Schema73.UndefinedOr(WaitSnapshot),
|
|
15139
15181
|
error: ExecutionWorkflowFailed
|
|
15140
15182
|
},
|
|
15141
15183
|
{
|
|
15142
15184
|
name: ActivityNameTemplates.loadWaitAfterWake,
|
|
15143
15185
|
input: WaitIdInput,
|
|
15144
|
-
success:
|
|
15186
|
+
success: Schema73.UndefinedOr(WaitSnapshot),
|
|
15145
15187
|
error: ExecutionWorkflowFailed
|
|
15146
15188
|
},
|
|
15147
15189
|
{
|
|
15148
15190
|
name: ActivityNameTemplates.markWaiting,
|
|
15149
|
-
input:
|
|
15191
|
+
input: Schema73.Struct({ start: StartInput, wait: WaitSnapshot }),
|
|
15150
15192
|
success: exports_execution_schema.Execution,
|
|
15151
15193
|
error: ExecutionWorkflowFailed
|
|
15152
15194
|
},
|
|
15153
15195
|
{
|
|
15154
15196
|
name: ActivityNameTemplates.ensureWorkspace,
|
|
15155
15197
|
input: StartInput,
|
|
15156
|
-
success:
|
|
15198
|
+
success: Schema73.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
15157
15199
|
error: ExecutionWorkflowFailed
|
|
15158
15200
|
},
|
|
15159
15201
|
{
|
|
15160
15202
|
name: ActivityNameTemplates.suspendWorkspace,
|
|
15161
15203
|
input: WorkspaceKeyInput,
|
|
15162
|
-
success:
|
|
15204
|
+
success: Schema73.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
15163
15205
|
error: ExecutionWorkflowFailed
|
|
15164
15206
|
},
|
|
15165
15207
|
{
|
|
15166
15208
|
name: ActivityNameTemplates.resumeWorkspace,
|
|
15167
15209
|
input: WorkspaceKeyInput,
|
|
15168
|
-
success:
|
|
15210
|
+
success: Schema73.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
15169
15211
|
error: ExecutionWorkflowFailed
|
|
15170
15212
|
},
|
|
15171
15213
|
{
|
|
15172
15214
|
name: ActivityNameTemplates.releaseWorkspace,
|
|
15173
15215
|
input: StartInput,
|
|
15174
|
-
success:
|
|
15216
|
+
success: Schema73.UndefinedOr(exports_workspace_schema.WorkspaceLeaseRecord),
|
|
15175
15217
|
error: ExecutionWorkflowFailed
|
|
15176
15218
|
},
|
|
15177
15219
|
{
|
|
15178
15220
|
name: ActivityNameTemplates.complete,
|
|
15179
|
-
input:
|
|
15221
|
+
input: Schema73.Struct({
|
|
15180
15222
|
start: StartInput,
|
|
15181
|
-
turn:
|
|
15182
|
-
wait_id:
|
|
15183
|
-
wait_state:
|
|
15184
|
-
pending_tool_call:
|
|
15223
|
+
turn: Schema73.Int.check(Schema73.isGreaterThanOrEqualTo(0)),
|
|
15224
|
+
wait_id: Schema73.optionalKey(exports_ids_schema.WaitId),
|
|
15225
|
+
wait_state: Schema73.optionalKey(WaitSignalState),
|
|
15226
|
+
pending_tool_call: Schema73.optionalKey(exports_tool_schema.Call)
|
|
15185
15227
|
}),
|
|
15186
15228
|
success: exports_execution_schema.Execution,
|
|
15187
15229
|
error: ExecutionWorkflowFailed
|
|
@@ -15189,24 +15231,24 @@ var contracts = [
|
|
|
15189
15231
|
{
|
|
15190
15232
|
name: ActivityNameTemplates.checkQueuedChildCancellation,
|
|
15191
15233
|
input: StartInput,
|
|
15192
|
-
success:
|
|
15234
|
+
success: Schema73.Boolean,
|
|
15193
15235
|
error: ExecutionWorkflowFailed
|
|
15194
15236
|
},
|
|
15195
15237
|
{
|
|
15196
15238
|
name: ActivityNameTemplates.notifyParent,
|
|
15197
|
-
input:
|
|
15239
|
+
input: Schema73.Struct({
|
|
15198
15240
|
start: StartInput,
|
|
15199
15241
|
status: ChildTerminalStatus,
|
|
15200
|
-
output:
|
|
15242
|
+
output: Schema73.Array(exports_content_schema.Part)
|
|
15201
15243
|
}),
|
|
15202
|
-
success:
|
|
15244
|
+
success: Schema73.Void,
|
|
15203
15245
|
error: ExecutionWorkflowFailed
|
|
15204
15246
|
},
|
|
15205
15247
|
{
|
|
15206
15248
|
name: ActivityNameTemplates.continueAsNew,
|
|
15207
|
-
input:
|
|
15249
|
+
input: Schema73.Struct({
|
|
15208
15250
|
start: StartInput,
|
|
15209
|
-
turn:
|
|
15251
|
+
turn: Schema73.Int.check(Schema73.isGreaterThanOrEqualTo(0)),
|
|
15210
15252
|
wait_id: exports_ids_schema.WaitId,
|
|
15211
15253
|
pending_tool_call: exports_tool_schema.Call
|
|
15212
15254
|
}),
|
|
@@ -15214,7 +15256,7 @@ var contracts = [
|
|
|
15214
15256
|
error: ExecutionWorkflowFailed
|
|
15215
15257
|
}
|
|
15216
15258
|
];
|
|
15217
|
-
var schemaJson = (schema) =>
|
|
15259
|
+
var schemaJson = (schema) => Schema73.decodeUnknownSync(exports_shared_schema.JsonValue)(Schema73.toJsonSchemaDocument(schema));
|
|
15218
15260
|
var canonical = (value) => {
|
|
15219
15261
|
if (value === null || typeof value !== "object")
|
|
15220
15262
|
return value;
|
|
@@ -15305,11 +15347,11 @@ var guard = Effect78.fn("ActivityVersionRegistry.guard")(function* (input) {
|
|
|
15305
15347
|
}));
|
|
15306
15348
|
});
|
|
15307
15349
|
// src/client.ts
|
|
15308
|
-
import { Clock as Clock11, Context as Context63, Effect as Effect79, Layer as Layer70, Option as Option28, Schema as
|
|
15350
|
+
import { Clock as Clock11, Context as Context63, Effect as Effect79, Layer as Layer70, Option as Option28, Schema as Schema74, SchemaGetter, SchemaIssue, Stream as Stream11 } from "effect";
|
|
15309
15351
|
import { EntityId, ShardId, Sharding as Sharding2, ShardingConfig as ShardingConfig3 } from "effect/unstable/cluster";
|
|
15310
15352
|
|
|
15311
|
-
class ClientError extends
|
|
15312
|
-
message:
|
|
15353
|
+
class ClientError extends Schema74.TaggedErrorClass()("ClientError", {
|
|
15354
|
+
message: Schema74.String
|
|
15313
15355
|
}) {
|
|
15314
15356
|
}
|
|
15315
15357
|
|
|
@@ -15341,11 +15383,11 @@ var decodeCursorFields = (wire) => Effect79.gen(function* () {
|
|
|
15341
15383
|
return yield* Effect79.fail(malformedCursor(wire));
|
|
15342
15384
|
return { updatedAt, id: decoded.slice(separator + 1) };
|
|
15343
15385
|
});
|
|
15344
|
-
var ExecutionCursorFromString = exports_shared_schema.NonEmptyString.pipe(
|
|
15386
|
+
var ExecutionCursorFromString = exports_shared_schema.NonEmptyString.pipe(Schema74.decodeTo(Schema74.Struct({ updatedAt: Schema74.Int, id: exports_ids_schema.ExecutionId }), {
|
|
15345
15387
|
decode: SchemaGetter.transformOrFail((wire) => decodeCursorFields(wire)),
|
|
15346
15388
|
encode: SchemaGetter.transform((cursor) => globalThis.btoa(`${cursor.updatedAt}:${cursor.id}`))
|
|
15347
15389
|
})).annotate({ identifier: "Relay.Client.ExecutionCursor" });
|
|
15348
|
-
var SessionCursorFromString = exports_shared_schema.NonEmptyString.pipe(
|
|
15390
|
+
var SessionCursorFromString = exports_shared_schema.NonEmptyString.pipe(Schema74.decodeTo(Schema74.Struct({ updatedAt: Schema74.Int, id: exports_ids_schema.SessionId }), {
|
|
15349
15391
|
decode: SchemaGetter.transformOrFail((wire) => decodeCursorFields(wire)),
|
|
15350
15392
|
encode: SchemaGetter.transform((cursor) => globalThis.btoa(`${cursor.updatedAt}:${cursor.id}`))
|
|
15351
15393
|
})).annotate({ identifier: "Relay.Client.SessionCursor" });
|
|
@@ -15433,7 +15475,7 @@ var registerAgentPayload = (input) => {
|
|
|
15433
15475
|
return exports_agent_schema.define(input);
|
|
15434
15476
|
return exports_agent_schema.define({
|
|
15435
15477
|
id: input.id,
|
|
15436
|
-
name:
|
|
15478
|
+
name: Schema74.decodeUnknownSync(exports_shared_schema.NonEmptyString)(input.agent.name),
|
|
15437
15479
|
...input.agent.instructions === undefined ? {} : { instructions: input.agent.instructions },
|
|
15438
15480
|
model: input.model,
|
|
15439
15481
|
tools: toolRefsFromBatonAgent(input.agent),
|
|
@@ -15624,25 +15666,25 @@ var layerFromRuntime = Layer70.effect(Service50, Effect79.gen(function* () {
|
|
|
15624
15666
|
return yield* addressBook.list().pipe(Effect79.mapError(toClientError));
|
|
15625
15667
|
}),
|
|
15626
15668
|
startExecution: Effect79.fn("Client.runtime.startExecution")(function* (input) {
|
|
15627
|
-
const
|
|
15628
|
-
return yield*
|
|
15669
|
+
const client3 = makeExecutionClient(input.execution_id);
|
|
15670
|
+
return yield* client3.start(input).pipe(Effect79.mapError(toClientError));
|
|
15629
15671
|
}),
|
|
15630
15672
|
startExecutionByAddress: Effect79.fn("Client.runtime.startExecutionByAddress")(function* (input) {
|
|
15631
15673
|
const payload = startExecutionByAddressPayload(input);
|
|
15632
|
-
const
|
|
15633
|
-
return yield*
|
|
15674
|
+
const client3 = makeExecutionClient(payload.execution_id);
|
|
15675
|
+
return yield* client3.start(payload).pipe(Effect79.mapError(toClientError));
|
|
15634
15676
|
}),
|
|
15635
15677
|
startExecutionByAgentDefinition: Effect79.fn("Client.runtime.startExecutionByAgentDefinition")(function* (input) {
|
|
15636
15678
|
const definition = yield* agentRegistry.get(input.agent_id).pipe(Effect79.mapError(toClientError));
|
|
15637
15679
|
if (definition === undefined)
|
|
15638
15680
|
return yield* Effect79.fail(agentDefinitionNotFound(input.agent_id));
|
|
15639
15681
|
const payload = startExecutionByAgentDefinitionPayload(input, definition);
|
|
15640
|
-
const
|
|
15641
|
-
return yield*
|
|
15682
|
+
const client3 = makeExecutionClient(payload.execution_id);
|
|
15683
|
+
return yield* client3.start(payload).pipe(Effect79.mapError(toClientError));
|
|
15642
15684
|
}),
|
|
15643
15685
|
cancelExecution: Effect79.fn("Client.runtime.cancelExecution")(function* (input) {
|
|
15644
|
-
const
|
|
15645
|
-
return yield*
|
|
15686
|
+
const client3 = makeExecutionClient(input.execution_id);
|
|
15687
|
+
return yield* client3.cancel({
|
|
15646
15688
|
execution_id: input.execution_id,
|
|
15647
15689
|
cancelled_at: input.cancelled_at,
|
|
15648
15690
|
...input.reason === undefined ? {} : { reason: input.reason }
|
|
@@ -15677,27 +15719,27 @@ var layerFromRuntime = Layer70.effect(Service50, Effect79.gen(function* () {
|
|
|
15677
15719
|
return records.map(toWaitView);
|
|
15678
15720
|
}),
|
|
15679
15721
|
listExecutions: Effect79.fn("Client.runtime.listExecutions")(function* (input) {
|
|
15680
|
-
const cursor = input.cursor === undefined ? undefined : yield*
|
|
15722
|
+
const cursor = input.cursor === undefined ? undefined : yield* Schema74.decodeEffect(ExecutionCursorFromString)(input.cursor).pipe(Effect79.mapError(toClientError));
|
|
15681
15723
|
const result = yield* executionRepository.list({
|
|
15682
15724
|
...input.root_address_id === undefined ? {} : { rootAddressId: input.root_address_id },
|
|
15683
15725
|
...input.status === undefined ? {} : { status: input.status },
|
|
15684
15726
|
...input.limit === undefined ? {} : { limit: input.limit },
|
|
15685
15727
|
...cursor === undefined ? {} : { cursor }
|
|
15686
15728
|
}).pipe(Effect79.mapError(toClientError));
|
|
15687
|
-
const nextCursor = result.nextCursor === undefined ? undefined : yield*
|
|
15729
|
+
const nextCursor = result.nextCursor === undefined ? undefined : yield* Schema74.encodeEffect(ExecutionCursorFromString)(result.nextCursor).pipe(Effect79.mapError(toClientError));
|
|
15688
15730
|
return {
|
|
15689
15731
|
records: result.records.map(toConversationSummary),
|
|
15690
15732
|
...nextCursor === undefined ? {} : { next_cursor: nextCursor }
|
|
15691
15733
|
};
|
|
15692
15734
|
}),
|
|
15693
15735
|
listSessions: Effect79.fn("Client.runtime.listSessions")(function* (input) {
|
|
15694
|
-
const cursor = input.cursor === undefined ? undefined : yield*
|
|
15736
|
+
const cursor = input.cursor === undefined ? undefined : yield* Schema74.decodeEffect(SessionCursorFromString)(input.cursor).pipe(Effect79.mapError(toClientError));
|
|
15695
15737
|
const result = yield* sessionRepository.list({
|
|
15696
15738
|
...input.root_address_id === undefined ? {} : { rootAddressId: input.root_address_id },
|
|
15697
15739
|
...input.limit === undefined ? {} : { limit: input.limit },
|
|
15698
15740
|
...cursor === undefined ? {} : { cursor }
|
|
15699
15741
|
}).pipe(Effect79.mapError(toClientError));
|
|
15700
|
-
const nextCursor = result.nextCursor === undefined ? undefined : yield*
|
|
15742
|
+
const nextCursor = result.nextCursor === undefined ? undefined : yield* Schema74.encodeEffect(SessionCursorFromString)(result.nextCursor).pipe(Effect79.mapError(toClientError));
|
|
15701
15743
|
return {
|
|
15702
15744
|
records: result.records.map(toSessionSummary),
|
|
15703
15745
|
...nextCursor === undefined ? {} : { next_cursor: nextCursor }
|
|
@@ -15707,13 +15749,13 @@ var layerFromRuntime = Layer70.effect(Service50, Effect79.gen(function* () {
|
|
|
15707
15749
|
const session = yield* sessionRepository.get(input.session_id).pipe(Effect79.mapError(toClientError));
|
|
15708
15750
|
if (session === undefined)
|
|
15709
15751
|
return yield* new ClientError({ message: `Session not found: ${input.session_id}` });
|
|
15710
|
-
const cursor = input.cursor === undefined ? undefined : yield*
|
|
15752
|
+
const cursor = input.cursor === undefined ? undefined : yield* Schema74.decodeEffect(ExecutionCursorFromString)(input.cursor).pipe(Effect79.mapError(toClientError));
|
|
15711
15753
|
const result = yield* executionRepository.list({
|
|
15712
15754
|
sessionId: input.session_id,
|
|
15713
15755
|
...input.limit === undefined ? {} : { limit: input.limit },
|
|
15714
15756
|
...cursor === undefined ? {} : { cursor }
|
|
15715
15757
|
}).pipe(Effect79.mapError(toClientError));
|
|
15716
|
-
const nextCursor = result.nextCursor === undefined ? undefined : yield*
|
|
15758
|
+
const nextCursor = result.nextCursor === undefined ? undefined : yield* Schema74.encodeEffect(ExecutionCursorFromString)(result.nextCursor).pipe(Effect79.mapError(toClientError));
|
|
15717
15759
|
return {
|
|
15718
15760
|
session: toSessionSummary(session),
|
|
15719
15761
|
executions: result.records.map(toConversationSummary),
|
|
@@ -15802,8 +15844,8 @@ var layerFromRuntime = Layer70.effect(Service50, Effect79.gen(function* () {
|
|
|
15802
15844
|
const createdAt = input.created_at ?? (yield* Clock11.currentTimeMillis);
|
|
15803
15845
|
const parentWaitId = input.wait === true ? yield* createChildJoinWait(waits, eventLog, input, accepted2, createdAt) : undefined;
|
|
15804
15846
|
const startPayload = childStartInput(input, accepted2, pin, definition, createdAt, parentWaitId);
|
|
15805
|
-
const
|
|
15806
|
-
yield*
|
|
15847
|
+
const client3 = makeExecutionClient(startPayload.execution_id);
|
|
15848
|
+
yield* client3.start(startPayload).pipe(Effect79.catchCause(() => Effect79.void), Effect79.forkDetach);
|
|
15807
15849
|
return accepted2;
|
|
15808
15850
|
}),
|
|
15809
15851
|
claimEnvelopeReady: Effect79.fn("Client.runtime.claimEnvelopeReady")(function* (input) {
|
|
@@ -16023,19 +16065,19 @@ var listSchedules = Effect79.fn("Client.listSchedules.call")(function* (input) {
|
|
|
16023
16065
|
class Service51 extends Context64.Service()("@relayfx/sdk/AdapterOutbox") {
|
|
16024
16066
|
}
|
|
16025
16067
|
var layer53 = Layer71.effect(Service51, Effect80.gen(function* () {
|
|
16026
|
-
const
|
|
16068
|
+
const client3 = yield* Service50;
|
|
16027
16069
|
return Service51.of({
|
|
16028
16070
|
claim: Effect80.fn("AdapterOutbox.claim")(function* (input) {
|
|
16029
|
-
return yield*
|
|
16071
|
+
return yield* client3.claimEnvelopeReady(input);
|
|
16030
16072
|
}),
|
|
16031
16073
|
ack: Effect80.fn("AdapterOutbox.ack")(function* (input) {
|
|
16032
|
-
return yield*
|
|
16074
|
+
return yield* client3.ackEnvelopeReady(input);
|
|
16033
16075
|
}),
|
|
16034
16076
|
release: Effect80.fn("AdapterOutbox.release")(function* (input) {
|
|
16035
|
-
return yield*
|
|
16077
|
+
return yield* client3.releaseEnvelopeReady(input);
|
|
16036
16078
|
}),
|
|
16037
16079
|
submitInbound: Effect80.fn("AdapterOutbox.submitInbound")(function* (input) {
|
|
16038
|
-
return yield*
|
|
16080
|
+
return yield* client3.submitInboundEnvelope(input);
|
|
16039
16081
|
})
|
|
16040
16082
|
});
|
|
16041
16083
|
}));
|
|
@@ -16126,92 +16168,92 @@ __export(exports_operation, {
|
|
|
16126
16168
|
CancelExecutionAccepted: () => CancelExecutionAccepted,
|
|
16127
16169
|
AckEnvelopeReadyInput: () => AckEnvelopeReadyInput
|
|
16128
16170
|
});
|
|
16129
|
-
import { Schema as
|
|
16130
|
-
var StartExecutionInput =
|
|
16171
|
+
import { Schema as Schema75 } from "effect";
|
|
16172
|
+
var StartExecutionInput = Schema75.Struct({
|
|
16131
16173
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16132
16174
|
root_address_id: exports_ids_schema.AddressId,
|
|
16133
|
-
session_id:
|
|
16134
|
-
input:
|
|
16175
|
+
session_id: Schema75.optionalKey(exports_ids_schema.SessionId),
|
|
16176
|
+
input: Schema75.optionalKey(Schema75.Array(exports_content_schema.Part)),
|
|
16135
16177
|
event_sequence: exports_execution_schema.ExecutionEventSequence,
|
|
16136
16178
|
started_at: exports_shared_schema.TimestampMillis,
|
|
16137
16179
|
completed_at: exports_shared_schema.TimestampMillis,
|
|
16138
|
-
agent_id:
|
|
16139
|
-
agent_revision:
|
|
16140
|
-
agent_snapshot:
|
|
16141
|
-
agent_tool_input_schema_digests:
|
|
16142
|
-
wait_id:
|
|
16143
|
-
metadata:
|
|
16180
|
+
agent_id: Schema75.optionalKey(exports_ids_schema.AgentId),
|
|
16181
|
+
agent_revision: Schema75.optionalKey(exports_agent_schema.DefinitionRevision),
|
|
16182
|
+
agent_snapshot: Schema75.optionalKey(exports_agent_schema.Definition),
|
|
16183
|
+
agent_tool_input_schema_digests: Schema75.optionalKey(exports_agent_schema.ToolInputSchemaDigests),
|
|
16184
|
+
wait_id: Schema75.optionalKey(exports_ids_schema.WaitId),
|
|
16185
|
+
metadata: Schema75.optionalKey(exports_shared_schema.Metadata)
|
|
16144
16186
|
}).annotate({ identifier: "Relay.Operation.StartExecutionInput" });
|
|
16145
|
-
var StartExecutionResult =
|
|
16187
|
+
var StartExecutionResult = Schema75.Struct({
|
|
16146
16188
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16147
16189
|
status: exports_execution_schema.ExecutionStatus,
|
|
16148
|
-
metadata:
|
|
16190
|
+
metadata: Schema75.optionalKey(exports_shared_schema.Metadata)
|
|
16149
16191
|
}).annotate({ identifier: "Relay.Operation.StartExecutionResult" });
|
|
16150
|
-
var StreamExecutionInput =
|
|
16192
|
+
var StreamExecutionInput = Schema75.Struct({
|
|
16151
16193
|
execution_id: exports_execution_schema.Execution.fields.id,
|
|
16152
|
-
after_cursor:
|
|
16153
|
-
limit:
|
|
16194
|
+
after_cursor: Schema75.optionalKey(exports_shared_schema.NonEmptyString),
|
|
16195
|
+
limit: Schema75.optionalKey(Schema75.Int.check(Schema75.isGreaterThan(0)))
|
|
16154
16196
|
}).annotate({ identifier: "Relay.Operation.StreamExecutionInput" });
|
|
16155
|
-
var WaitTerminalState =
|
|
16197
|
+
var WaitTerminalState = Schema75.Literals(["resolved", "timed_out", "cancelled"]).annotate({
|
|
16156
16198
|
identifier: "Relay.Operation.WaitTerminalState"
|
|
16157
16199
|
});
|
|
16158
|
-
var CancelExecutionInput2 =
|
|
16200
|
+
var CancelExecutionInput2 = Schema75.Struct({
|
|
16159
16201
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16160
16202
|
cancelled_at: exports_shared_schema.TimestampMillis,
|
|
16161
|
-
reason:
|
|
16203
|
+
reason: Schema75.optionalKey(Schema75.String)
|
|
16162
16204
|
}).annotate({ identifier: "Relay.Operation.CancelExecutionInput" });
|
|
16163
|
-
var CancelExecutionAccepted =
|
|
16205
|
+
var CancelExecutionAccepted = Schema75.Struct({
|
|
16164
16206
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16165
16207
|
status: exports_execution_schema.ExecutionStatus
|
|
16166
16208
|
}).annotate({ identifier: "Relay.Operation.CancelExecutionAccepted" });
|
|
16167
|
-
var SteeringKind =
|
|
16209
|
+
var SteeringKind = Schema75.Literals(["steering", "follow_up"]).annotate({
|
|
16168
16210
|
identifier: "Relay.Operation.SteeringKind"
|
|
16169
16211
|
});
|
|
16170
|
-
var SteerInput =
|
|
16212
|
+
var SteerInput = Schema75.Struct({
|
|
16171
16213
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16172
16214
|
kind: SteeringKind,
|
|
16173
|
-
content:
|
|
16215
|
+
content: Schema75.Array(exports_content_schema.Part),
|
|
16174
16216
|
created_at: exports_shared_schema.TimestampMillis
|
|
16175
16217
|
}).annotate({ identifier: "Relay.Operation.SteerInput" });
|
|
16176
|
-
var SteerAccepted =
|
|
16218
|
+
var SteerAccepted = Schema75.Struct({
|
|
16177
16219
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16178
16220
|
kind: SteeringKind,
|
|
16179
|
-
sequence:
|
|
16221
|
+
sequence: Schema75.Int.check(Schema75.isGreaterThanOrEqualTo(0))
|
|
16180
16222
|
}).annotate({ identifier: "Relay.Operation.SteerAccepted" });
|
|
16181
|
-
var WakeInput =
|
|
16223
|
+
var WakeInput = Schema75.Struct({
|
|
16182
16224
|
wait_id: exports_ids_schema.WaitId,
|
|
16183
16225
|
state: WaitTerminalState,
|
|
16184
16226
|
signaled_at: exports_shared_schema.TimestampMillis,
|
|
16185
|
-
from:
|
|
16186
|
-
content:
|
|
16187
|
-
correlation_key:
|
|
16188
|
-
metadata:
|
|
16227
|
+
from: Schema75.optionalKey(exports_ids_schema.AddressId),
|
|
16228
|
+
content: Schema75.optionalKey(Schema75.Array(exports_content_schema.Part)),
|
|
16229
|
+
correlation_key: Schema75.optionalKey(Schema75.String),
|
|
16230
|
+
metadata: Schema75.optionalKey(exports_shared_schema.Metadata)
|
|
16189
16231
|
}).annotate({ identifier: "Relay.Operation.WakeInput" });
|
|
16190
|
-
var WakeAccepted =
|
|
16232
|
+
var WakeAccepted = Schema75.Struct({
|
|
16191
16233
|
wait_id: exports_ids_schema.WaitId,
|
|
16192
16234
|
state: WaitTerminalState,
|
|
16193
16235
|
signaled_at: exports_shared_schema.TimestampMillis
|
|
16194
16236
|
}).annotate({ identifier: "Relay.Operation.WakeAccepted" });
|
|
16195
|
-
var WaitState2 =
|
|
16237
|
+
var WaitState2 = Schema75.Literals(["open", "resolved", "timed_out", "cancelled"]).annotate({
|
|
16196
16238
|
identifier: "Relay.Operation.WaitState"
|
|
16197
16239
|
});
|
|
16198
|
-
var ListWaitsInput =
|
|
16199
|
-
state:
|
|
16200
|
-
execution_id:
|
|
16201
|
-
limit:
|
|
16240
|
+
var ListWaitsInput = Schema75.Struct({
|
|
16241
|
+
state: Schema75.optionalKey(WaitState2),
|
|
16242
|
+
execution_id: Schema75.optionalKey(exports_ids_schema.ExecutionId),
|
|
16243
|
+
limit: Schema75.optionalKey(Schema75.Int.check(Schema75.isGreaterThan(0)))
|
|
16202
16244
|
}).annotate({ identifier: "Relay.Operation.ListWaitsInput" });
|
|
16203
|
-
var WaitView =
|
|
16245
|
+
var WaitView = Schema75.Struct({
|
|
16204
16246
|
wait_id: exports_ids_schema.WaitId,
|
|
16205
16247
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16206
|
-
envelope_id:
|
|
16248
|
+
envelope_id: Schema75.optionalKey(exports_ids_schema.EnvelopeId),
|
|
16207
16249
|
mode: exports_envelope_schema.WaitMode,
|
|
16208
|
-
correlation_key:
|
|
16250
|
+
correlation_key: Schema75.optionalKey(Schema75.String),
|
|
16209
16251
|
state: WaitState2,
|
|
16210
16252
|
metadata: exports_shared_schema.Metadata,
|
|
16211
16253
|
created_at: exports_shared_schema.TimestampMillis,
|
|
16212
|
-
resolved_at:
|
|
16254
|
+
resolved_at: Schema75.optionalKey(exports_shared_schema.TimestampMillis)
|
|
16213
16255
|
}).annotate({ identifier: "Relay.Operation.WaitView" });
|
|
16214
|
-
var PendingToolApproval =
|
|
16256
|
+
var PendingToolApproval = Schema75.Struct({
|
|
16215
16257
|
wait_id: exports_ids_schema.WaitId,
|
|
16216
16258
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16217
16259
|
tool_call_id: exports_ids_schema.ToolCallId,
|
|
@@ -16219,169 +16261,169 @@ var PendingToolApproval = Schema74.Struct({
|
|
|
16219
16261
|
input: exports_shared_schema.JsonValue,
|
|
16220
16262
|
requested_at: exports_shared_schema.TimestampMillis
|
|
16221
16263
|
}).annotate({ identifier: "Relay.Operation.PendingToolApproval" });
|
|
16222
|
-
var ListPendingApprovalsInput =
|
|
16264
|
+
var ListPendingApprovalsInput = Schema75.Struct({
|
|
16223
16265
|
execution_id: exports_ids_schema.ExecutionId
|
|
16224
16266
|
}).annotate({ identifier: "Relay.Operation.ListPendingApprovalsInput" });
|
|
16225
|
-
var PendingToolApprovalList =
|
|
16226
|
-
approvals:
|
|
16267
|
+
var PendingToolApprovalList = Schema75.Struct({
|
|
16268
|
+
approvals: Schema75.Array(PendingToolApproval)
|
|
16227
16269
|
}).annotate({ identifier: "Relay.Operation.PendingToolApprovalList" });
|
|
16228
|
-
var ResolveToolApprovalInput =
|
|
16270
|
+
var ResolveToolApprovalInput = Schema75.Struct({
|
|
16229
16271
|
wait_id: exports_ids_schema.WaitId,
|
|
16230
|
-
approved:
|
|
16231
|
-
comment:
|
|
16272
|
+
approved: Schema75.Boolean,
|
|
16273
|
+
comment: Schema75.optionalKey(Schema75.String),
|
|
16232
16274
|
resolved_at: exports_shared_schema.TimestampMillis
|
|
16233
16275
|
}).annotate({ identifier: "Relay.Operation.ResolveToolApprovalInput" });
|
|
16234
|
-
var PermissionAnswer =
|
|
16276
|
+
var PermissionAnswer = Schema75.Literals(["Approved", "Denied", "Always"]).annotate({
|
|
16235
16277
|
identifier: "Relay.Operation.PermissionAnswer"
|
|
16236
16278
|
});
|
|
16237
|
-
var ResolvePermissionInput =
|
|
16279
|
+
var ResolvePermissionInput = Schema75.Struct({
|
|
16238
16280
|
wait_id: exports_ids_schema.WaitId,
|
|
16239
16281
|
answer: PermissionAnswer,
|
|
16240
|
-
reason:
|
|
16282
|
+
reason: Schema75.optionalKey(Schema75.String),
|
|
16241
16283
|
resolved_at: exports_shared_schema.TimestampMillis
|
|
16242
16284
|
}).annotate({ identifier: "Relay.Operation.ResolvePermissionInput" });
|
|
16243
|
-
var SubmitInboundEnvelopeInput =
|
|
16285
|
+
var SubmitInboundEnvelopeInput = Schema75.Struct({
|
|
16244
16286
|
envelope: exports_envelope_schema.SendInput,
|
|
16245
16287
|
wake: WakeInput
|
|
16246
16288
|
}).annotate({ identifier: "Relay.Operation.SubmitInboundEnvelopeInput" });
|
|
16247
|
-
var SubmitInboundEnvelopeAccepted =
|
|
16289
|
+
var SubmitInboundEnvelopeAccepted = Schema75.Struct({
|
|
16248
16290
|
envelope: exports_envelope_schema.EnvelopeAccepted,
|
|
16249
16291
|
wake: WakeAccepted
|
|
16250
16292
|
}).annotate({ identifier: "Relay.Operation.SubmitInboundEnvelopeAccepted" });
|
|
16251
|
-
var ClaimEnvelopeReadyInput =
|
|
16293
|
+
var ClaimEnvelopeReadyInput = Schema75.Struct({
|
|
16252
16294
|
route_type: exports_address_schema.RouteKind,
|
|
16253
|
-
route_key:
|
|
16295
|
+
route_key: Schema75.optionalKey(Schema75.String),
|
|
16254
16296
|
worker_id: exports_shared_schema.NonEmptyString,
|
|
16255
16297
|
now: exports_shared_schema.TimestampMillis,
|
|
16256
16298
|
claim_expires_at: exports_shared_schema.TimestampMillis
|
|
16257
16299
|
}).annotate({ identifier: "Relay.Operation.ClaimEnvelopeReadyInput" });
|
|
16258
|
-
var EnvelopeReadyLease =
|
|
16300
|
+
var EnvelopeReadyLease = Schema75.Struct({
|
|
16259
16301
|
ready: exports_envelope_schema.EnvelopeReady,
|
|
16260
16302
|
worker_id: exports_shared_schema.NonEmptyString,
|
|
16261
16303
|
claim_expires_at: exports_shared_schema.TimestampMillis
|
|
16262
16304
|
}).annotate({ identifier: "Relay.Operation.EnvelopeReadyLease" });
|
|
16263
|
-
var AckEnvelopeReadyInput =
|
|
16305
|
+
var AckEnvelopeReadyInput = Schema75.Struct({
|
|
16264
16306
|
envelope_ready_id: exports_ids_schema.EnvelopeReadyId,
|
|
16265
16307
|
worker_id: exports_shared_schema.NonEmptyString,
|
|
16266
16308
|
acknowledged_at: exports_shared_schema.TimestampMillis
|
|
16267
16309
|
}).annotate({ identifier: "Relay.Operation.AckEnvelopeReadyInput" });
|
|
16268
|
-
var EnvelopeReadyAcked =
|
|
16310
|
+
var EnvelopeReadyAcked = Schema75.Struct({
|
|
16269
16311
|
envelope_ready_id: exports_ids_schema.EnvelopeReadyId,
|
|
16270
|
-
state:
|
|
16312
|
+
state: Schema75.Literal("acknowledged"),
|
|
16271
16313
|
acknowledged_at: exports_shared_schema.TimestampMillis
|
|
16272
16314
|
}).annotate({ identifier: "Relay.Operation.EnvelopeReadyAcked" });
|
|
16273
|
-
var ReleaseEnvelopeReadyInput =
|
|
16315
|
+
var ReleaseEnvelopeReadyInput = Schema75.Struct({
|
|
16274
16316
|
envelope_ready_id: exports_ids_schema.EnvelopeReadyId,
|
|
16275
16317
|
worker_id: exports_shared_schema.NonEmptyString,
|
|
16276
16318
|
next_available_at: exports_shared_schema.TimestampMillis,
|
|
16277
|
-
error:
|
|
16319
|
+
error: Schema75.optionalKey(Schema75.String)
|
|
16278
16320
|
}).annotate({ identifier: "Relay.Operation.ReleaseEnvelopeReadyInput" });
|
|
16279
|
-
var EnvelopeReadyReleased =
|
|
16321
|
+
var EnvelopeReadyReleased = Schema75.Struct({
|
|
16280
16322
|
envelope_ready_id: exports_ids_schema.EnvelopeReadyId,
|
|
16281
|
-
state:
|
|
16323
|
+
state: Schema75.Literal("ready"),
|
|
16282
16324
|
next_available_at: exports_shared_schema.TimestampMillis
|
|
16283
16325
|
}).annotate({ identifier: "Relay.Operation.EnvelopeReadyReleased" });
|
|
16284
|
-
var CreateScheduleInput =
|
|
16326
|
+
var CreateScheduleInput = Schema75.Struct({
|
|
16285
16327
|
schedule_id: exports_ids_schema.ScheduleId,
|
|
16286
16328
|
kind: exports_schedule_schema.ScheduleKind,
|
|
16287
16329
|
target_kind: exports_schedule_schema.ScheduleTargetKind,
|
|
16288
|
-
address_id:
|
|
16289
|
-
wait_id:
|
|
16290
|
-
cron_expr:
|
|
16291
|
-
input:
|
|
16330
|
+
address_id: Schema75.optionalKey(exports_ids_schema.AddressId),
|
|
16331
|
+
wait_id: Schema75.optionalKey(exports_ids_schema.WaitId),
|
|
16332
|
+
cron_expr: Schema75.optionalKey(exports_shared_schema.NonEmptyString),
|
|
16333
|
+
input: Schema75.optionalKey(Schema75.Array(exports_content_schema.Part)),
|
|
16292
16334
|
next_run_at: exports_shared_schema.TimestampMillis,
|
|
16293
|
-
idempotency_key:
|
|
16294
|
-
metadata:
|
|
16335
|
+
idempotency_key: Schema75.optionalKey(exports_shared_schema.NonEmptyString),
|
|
16336
|
+
metadata: Schema75.optionalKey(exports_shared_schema.Metadata)
|
|
16295
16337
|
}).annotate({ identifier: "Relay.Operation.CreateScheduleInput" });
|
|
16296
|
-
var CreateScheduleResult =
|
|
16338
|
+
var CreateScheduleResult = Schema75.Struct({
|
|
16297
16339
|
schedule: exports_schedule_schema.ScheduleRecord
|
|
16298
16340
|
}).annotate({ identifier: "Relay.Operation.CreateScheduleResult" });
|
|
16299
|
-
var CancelScheduleInput =
|
|
16341
|
+
var CancelScheduleInput = Schema75.Struct({
|
|
16300
16342
|
schedule_id: exports_ids_schema.ScheduleId,
|
|
16301
16343
|
cancelled_at: exports_shared_schema.TimestampMillis
|
|
16302
16344
|
}).annotate({ identifier: "Relay.Operation.CancelScheduleInput" });
|
|
16303
|
-
var CancelScheduleResult =
|
|
16345
|
+
var CancelScheduleResult = Schema75.Struct({
|
|
16304
16346
|
schedule: exports_schedule_schema.ScheduleRecord
|
|
16305
16347
|
}).annotate({ identifier: "Relay.Operation.CancelScheduleResult" });
|
|
16306
|
-
var ListSchedulesInput =
|
|
16307
|
-
state:
|
|
16348
|
+
var ListSchedulesInput = Schema75.Struct({
|
|
16349
|
+
state: Schema75.optionalKey(exports_schedule_schema.ScheduleState)
|
|
16308
16350
|
}).annotate({ identifier: "Relay.Operation.ListSchedulesInput" });
|
|
16309
|
-
var ListSchedulesResult =
|
|
16310
|
-
schedules:
|
|
16351
|
+
var ListSchedulesResult = Schema75.Struct({
|
|
16352
|
+
schedules: Schema75.Array(exports_schedule_schema.ScheduleRecord)
|
|
16311
16353
|
}).annotate({ identifier: "Relay.Operation.ListSchedulesResult" });
|
|
16312
|
-
var ListExecutionsInput =
|
|
16313
|
-
root_address_id:
|
|
16314
|
-
status:
|
|
16315
|
-
limit:
|
|
16316
|
-
cursor:
|
|
16354
|
+
var ListExecutionsInput = Schema75.Struct({
|
|
16355
|
+
root_address_id: Schema75.optionalKey(exports_ids_schema.AddressId),
|
|
16356
|
+
status: Schema75.optionalKey(exports_execution_schema.ExecutionStatus),
|
|
16357
|
+
limit: Schema75.optionalKey(Schema75.Int.check(Schema75.isGreaterThan(0))),
|
|
16358
|
+
cursor: Schema75.optionalKey(exports_shared_schema.NonEmptyString)
|
|
16317
16359
|
}).annotate({ identifier: "Relay.Operation.ListExecutionsInput" });
|
|
16318
|
-
var ConversationKind =
|
|
16360
|
+
var ConversationKind = Schema75.Literals(["user-agent", "agent-agent"]).annotate({
|
|
16319
16361
|
identifier: "Relay.Operation.ConversationKind"
|
|
16320
16362
|
});
|
|
16321
|
-
var ConversationSummary =
|
|
16363
|
+
var ConversationSummary = Schema75.Struct({
|
|
16322
16364
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16323
16365
|
root_address_id: exports_ids_schema.AddressId,
|
|
16324
|
-
session_id:
|
|
16366
|
+
session_id: Schema75.optionalKey(exports_ids_schema.SessionId),
|
|
16325
16367
|
status: exports_execution_schema.ExecutionStatus,
|
|
16326
16368
|
kind: ConversationKind,
|
|
16327
|
-
agent_id:
|
|
16369
|
+
agent_id: Schema75.optionalKey(exports_ids_schema.AgentId),
|
|
16328
16370
|
metadata: exports_shared_schema.Metadata,
|
|
16329
16371
|
created_at: exports_shared_schema.TimestampMillis,
|
|
16330
16372
|
updated_at: exports_shared_schema.TimestampMillis
|
|
16331
16373
|
}).annotate({ identifier: "Relay.Operation.ConversationSummary" });
|
|
16332
|
-
var ListExecutionsResult =
|
|
16333
|
-
records:
|
|
16334
|
-
next_cursor:
|
|
16374
|
+
var ListExecutionsResult = Schema75.Struct({
|
|
16375
|
+
records: Schema75.Array(ConversationSummary),
|
|
16376
|
+
next_cursor: Schema75.optionalKey(exports_shared_schema.NonEmptyString)
|
|
16335
16377
|
}).annotate({ identifier: "Relay.Operation.ListExecutionsResult" });
|
|
16336
|
-
var ListSessionsInput =
|
|
16337
|
-
root_address_id:
|
|
16338
|
-
limit:
|
|
16339
|
-
cursor:
|
|
16378
|
+
var ListSessionsInput = Schema75.Struct({
|
|
16379
|
+
root_address_id: Schema75.optionalKey(exports_ids_schema.AddressId),
|
|
16380
|
+
limit: Schema75.optionalKey(Schema75.Int.check(Schema75.isGreaterThan(0))),
|
|
16381
|
+
cursor: Schema75.optionalKey(exports_shared_schema.NonEmptyString)
|
|
16340
16382
|
}).annotate({ identifier: "Relay.Operation.ListSessionsInput" });
|
|
16341
|
-
var SessionSummary =
|
|
16383
|
+
var SessionSummary = Schema75.Struct({
|
|
16342
16384
|
session_id: exports_ids_schema.SessionId,
|
|
16343
16385
|
root_address_id: exports_ids_schema.AddressId,
|
|
16344
16386
|
metadata: exports_shared_schema.Metadata,
|
|
16345
16387
|
created_at: exports_shared_schema.TimestampMillis,
|
|
16346
16388
|
updated_at: exports_shared_schema.TimestampMillis
|
|
16347
16389
|
}).annotate({ identifier: "Relay.Operation.SessionSummary" });
|
|
16348
|
-
var ListSessionsResult =
|
|
16349
|
-
records:
|
|
16350
|
-
next_cursor:
|
|
16390
|
+
var ListSessionsResult = Schema75.Struct({
|
|
16391
|
+
records: Schema75.Array(SessionSummary),
|
|
16392
|
+
next_cursor: Schema75.optionalKey(exports_shared_schema.NonEmptyString)
|
|
16351
16393
|
}).annotate({ identifier: "Relay.Operation.ListSessionsResult" });
|
|
16352
|
-
var GetSessionInput =
|
|
16394
|
+
var GetSessionInput = Schema75.Struct({
|
|
16353
16395
|
session_id: exports_ids_schema.SessionId,
|
|
16354
|
-
limit:
|
|
16355
|
-
cursor:
|
|
16396
|
+
limit: Schema75.optionalKey(Schema75.Int.check(Schema75.isGreaterThan(0))),
|
|
16397
|
+
cursor: Schema75.optionalKey(exports_shared_schema.NonEmptyString)
|
|
16356
16398
|
}).annotate({ identifier: "Relay.Operation.GetSessionInput" });
|
|
16357
|
-
var GetSessionResult =
|
|
16399
|
+
var GetSessionResult = Schema75.Struct({
|
|
16358
16400
|
session: SessionSummary,
|
|
16359
|
-
executions:
|
|
16360
|
-
next_cursor:
|
|
16401
|
+
executions: Schema75.Array(ConversationSummary),
|
|
16402
|
+
next_cursor: Schema75.optionalKey(exports_shared_schema.NonEmptyString)
|
|
16361
16403
|
}).annotate({ identifier: "Relay.Operation.GetSessionResult" });
|
|
16362
|
-
var ReplayExecutionInput =
|
|
16404
|
+
var ReplayExecutionInput = Schema75.Struct({
|
|
16363
16405
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16364
|
-
after_cursor:
|
|
16365
|
-
limit:
|
|
16406
|
+
after_cursor: Schema75.optionalKey(exports_shared_schema.NonEmptyString),
|
|
16407
|
+
limit: Schema75.optionalKey(Schema75.Int.check(Schema75.isGreaterThan(0)))
|
|
16366
16408
|
}).annotate({ identifier: "Relay.Operation.ReplayExecutionInput" });
|
|
16367
|
-
var ReplayExecutionResult =
|
|
16368
|
-
events:
|
|
16409
|
+
var ReplayExecutionResult = Schema75.Struct({
|
|
16410
|
+
events: Schema75.Array(exports_execution_schema.ExecutionEvent)
|
|
16369
16411
|
}).annotate({ identifier: "Relay.Operation.ReplayExecutionResult" });
|
|
16370
|
-
var RunnerSummary =
|
|
16371
|
-
address:
|
|
16372
|
-
healthy:
|
|
16412
|
+
var RunnerSummary = Schema75.Struct({
|
|
16413
|
+
address: Schema75.String,
|
|
16414
|
+
healthy: Schema75.Boolean,
|
|
16373
16415
|
last_heartbeat: exports_shared_schema.TimestampMillis,
|
|
16374
|
-
owned_shards:
|
|
16416
|
+
owned_shards: Schema75.Int
|
|
16375
16417
|
}).annotate({ identifier: "Relay.Operation.RunnerSummary" });
|
|
16376
|
-
var ListRunnersResult =
|
|
16377
|
-
runners:
|
|
16378
|
-
total_shards:
|
|
16418
|
+
var ListRunnersResult = Schema75.Struct({
|
|
16419
|
+
runners: Schema75.Array(RunnerSummary),
|
|
16420
|
+
total_shards: Schema75.Int
|
|
16379
16421
|
}).annotate({ identifier: "Relay.Operation.ListRunnersResult" });
|
|
16380
|
-
var RouteExecutionResult =
|
|
16422
|
+
var RouteExecutionResult = Schema75.Struct({
|
|
16381
16423
|
execution_id: exports_ids_schema.ExecutionId,
|
|
16382
|
-
shard:
|
|
16383
|
-
runner_address:
|
|
16384
|
-
owned:
|
|
16424
|
+
shard: Schema75.String,
|
|
16425
|
+
runner_address: Schema75.NullOr(Schema75.String),
|
|
16426
|
+
owned: Schema75.Boolean
|
|
16385
16427
|
}).annotate({ identifier: "Relay.Operation.RouteExecutionResult" });
|
|
16386
16428
|
// ../ai/src/embedding-model/embedding-model-registration.ts
|
|
16387
16429
|
import { OpenAiClient, OpenAiEmbeddingModel } from "@effect/ai-openai";
|
|
@@ -16413,7 +16455,7 @@ __export(exports_language_model_registration, {
|
|
|
16413
16455
|
anthropic: () => anthropic
|
|
16414
16456
|
});
|
|
16415
16457
|
|
|
16416
|
-
// ../../node_modules/.bun/@batonfx+providers@0.3.
|
|
16458
|
+
// ../../node_modules/.bun/@batonfx+providers@0.3.1/node_modules/@batonfx/providers/src/anthropic.ts
|
|
16417
16459
|
import { AnthropicClient, AnthropicLanguageModel } from "@effect/ai-anthropic";
|
|
16418
16460
|
import { Layer as Layer72 } from "effect";
|
|
16419
16461
|
import { FetchHttpClient as FetchHttpClient2 } from "effect/unstable/http";
|
|
@@ -16429,13 +16471,13 @@ var anthropic = (input) => exports_model_registry.registrationFromLayer({
|
|
|
16429
16471
|
});
|
|
16430
16472
|
var anthropicClientLayerConfig = AnthropicClient.layerConfig;
|
|
16431
16473
|
var withAnthropic = (options) => exports_model_registry.layerFromRegistrationEffects([anthropic(options)]).pipe(Layer72.provide(AnthropicClient.layerConfig({ ...options.clientConfig, apiKey: options.apiKey })), Layer72.provide(FetchHttpClient2.layer));
|
|
16432
|
-
// ../../node_modules/.bun/@batonfx+providers@0.3.
|
|
16474
|
+
// ../../node_modules/.bun/@batonfx+providers@0.3.1/node_modules/@batonfx/providers/src/deterministic.ts
|
|
16433
16475
|
import { OpenAiClient as OpenAiClient3 } from "@effect/ai-openai";
|
|
16434
16476
|
import { Effect as Effect81, Layer as Layer74, Option as Option29, Stream as Stream12 } from "effect";
|
|
16435
16477
|
import { LanguageModel as LanguageModel8, Response as Response7 } from "effect/unstable/ai";
|
|
16436
16478
|
import { FetchHttpClient as FetchHttpClient4 } from "effect/unstable/http";
|
|
16437
16479
|
|
|
16438
|
-
// ../../node_modules/.bun/@batonfx+providers@0.3.
|
|
16480
|
+
// ../../node_modules/.bun/@batonfx+providers@0.3.1/node_modules/@batonfx/providers/src/openai.ts
|
|
16439
16481
|
import { OpenAiClient as OpenAiClient2, OpenAiLanguageModel } from "@effect/ai-openai";
|
|
16440
16482
|
import { Layer as Layer73 } from "effect";
|
|
16441
16483
|
import { FetchHttpClient as FetchHttpClient3 } from "effect/unstable/http";
|
|
@@ -16452,7 +16494,7 @@ var openAi = (input) => exports_model_registry.registrationFromLayer({
|
|
|
16452
16494
|
var openAiClientLayerConfig2 = OpenAiClient2.layerConfig;
|
|
16453
16495
|
var withOpenAi = (options) => exports_model_registry.layerFromRegistrationEffects([openAi(options)]).pipe(Layer73.provide(OpenAiClient2.layerConfig({ ...options.clientConfig, apiKey: options.apiKey })), Layer73.provide(FetchHttpClient3.layer));
|
|
16454
16496
|
|
|
16455
|
-
// ../../node_modules/.bun/@batonfx+providers@0.3.
|
|
16497
|
+
// ../../node_modules/.bun/@batonfx+providers@0.3.1/node_modules/@batonfx/providers/src/deterministic.ts
|
|
16456
16498
|
var deterministicModelLayer = Layer74.effect(LanguageModel8.LanguageModel, LanguageModel8.make({
|
|
16457
16499
|
generateText: () => Effect81.succeed([{ type: "text", text: "deterministic response" }]),
|
|
16458
16500
|
streamText: () => Stream12.make(Response7.makePart("text-delta", { id: "text", delta: "deterministic response" }))
|
|
@@ -16476,7 +16518,7 @@ var withOpenAiOrDeterministic = (options) => Layer74.unwrap(Effect81.gen(functio
|
|
|
16476
16518
|
...Option29.isSome(openAiRegistration) ? [openAiRegistration.value] : []
|
|
16477
16519
|
]);
|
|
16478
16520
|
}));
|
|
16479
|
-
// ../../node_modules/.bun/@batonfx+providers@0.3.
|
|
16521
|
+
// ../../node_modules/.bun/@batonfx+providers@0.3.1/node_modules/@batonfx/providers/src/openai-compat.ts
|
|
16480
16522
|
import { OpenAiClient as OpenAiClient4, OpenAiLanguageModel as OpenAiLanguageModel2 } from "@effect/ai-openai-compat";
|
|
16481
16523
|
import { Config as Config8, Layer as Layer75 } from "effect";
|
|
16482
16524
|
import { FetchHttpClient as FetchHttpClient5 } from "effect/unstable/http";
|
|
@@ -16497,7 +16539,7 @@ var clientLayerConfig = (options) => OpenAiClient4.layerConfig({
|
|
|
16497
16539
|
...options.baseUrl === undefined ? {} : { apiUrl: Config8.succeed(options.baseUrl) }
|
|
16498
16540
|
});
|
|
16499
16541
|
var withOpenAiCompatible = (options) => exports_model_registry.layerFromRegistrationEffects([openAiCompatible(options)]).pipe(Layer75.provide(clientLayerConfig(options)), Layer75.provide(FetchHttpClient5.layer));
|
|
16500
|
-
// ../../node_modules/.bun/@batonfx+providers@0.3.
|
|
16542
|
+
// ../../node_modules/.bun/@batonfx+providers@0.3.1/node_modules/@batonfx/providers/src/openrouter.ts
|
|
16501
16543
|
import { OpenRouterClient, OpenRouterLanguageModel } from "@effect/ai-openrouter";
|
|
16502
16544
|
import { Layer as Layer76 } from "effect";
|
|
16503
16545
|
import { FetchHttpClient as FetchHttpClient6 } from "effect/unstable/http";
|