@relayfx/sdk 0.7.3 → 0.7.5
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 +1 -1
- package/dist/http-server.js +1 -1
- package/dist/{index-5y7758mg.js → index-6rpm95kc.js} +601 -206
- package/dist/{index-qa93yf6j.js → index-etc2cnk2.js} +47 -47
- package/dist/{index-pa991hq0.js → index-m8bs31hg.js} +1 -1
- package/dist/{index-syx9q5v3.js → index-nb078xsy.js} +831 -592
- package/dist/index.js +11 -11
- package/dist/mysql.js +4 -4
- package/dist/postgres.js +4 -4
- package/dist/sqlite.js +4 -4
- package/dist/types/relay/client-child-runs.d.ts +11 -0
- package/dist/types/relay/client-public-executions.d.ts +2 -2
- package/dist/types/relay/client-public.d.ts +2 -0
- package/dist/types/relay/operation.d.ts +282 -5
- package/dist/types/runtime/address/address-resolution-service.d.ts +1 -1
- package/dist/types/runtime/agent/agent-loop-events.d.ts +16 -5
- package/dist/types/runtime/agent/agent-loop-service.d.ts +1 -0
- package/dist/types/runtime/child/spawn-child-run-tool.d.ts +2 -0
- package/dist/types/runtime/workflow/execution-workflow.d.ts +22 -2
- package/dist/types/schema/agent-schema.d.ts +8 -8
- package/dist/types/schema/execution-analytics-schema.d.ts +507 -0
- package/dist/types/schema/execution-schema.d.ts +34 -20
- package/dist/types/store-sql/child/child-fan-out-repository.d.ts +2 -0
- package/dist/types/store-sql/prompt-wire.d.ts +2 -0
- package/package.json +4 -4
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
__export
|
|
4
4
|
} from "./index-nb39b5ae.js";
|
|
5
5
|
|
|
6
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
6
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/turn-policy.js
|
|
7
7
|
var exports_turn_policy = {};
|
|
8
8
|
__export(exports_turn_policy, {
|
|
9
9
|
untilToolCall: () => untilToolCall,
|
|
@@ -72,7 +72,7 @@ var both = dual(2, (first, second) => ({
|
|
|
72
72
|
}));
|
|
73
73
|
var defaultPolicy = forever;
|
|
74
74
|
|
|
75
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
75
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/agent-event.js
|
|
76
76
|
var exports_agent_event = {};
|
|
77
77
|
__export(exports_agent_event, {
|
|
78
78
|
addUsage: () => addUsage,
|
|
@@ -90,7 +90,7 @@ __export(exports_agent_event, {
|
|
|
90
90
|
import { Function, Schema as Schema4 } from "effect";
|
|
91
91
|
import { Prompt as Prompt3, Response as Response3, Tool } from "effect/unstable/ai";
|
|
92
92
|
|
|
93
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
93
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/model-telemetry.js
|
|
94
94
|
var exports_model_telemetry = {};
|
|
95
95
|
__export(exports_model_telemetry, {
|
|
96
96
|
layerNoop: () => layerNoop,
|
|
@@ -348,7 +348,7 @@ var CurrentSummaryCall = Context.Reference("@batonfx/core/ModelTelemetry/Current
|
|
|
348
348
|
} });
|
|
349
349
|
var generateId = Effect2.flatMap(Effect2.serviceOption(IdGenerator.IdGenerator), (service) => Option.getOrElse(service, () => IdGenerator.defaultIdGenerator).generateId());
|
|
350
350
|
|
|
351
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
351
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/session-sync.js
|
|
352
352
|
import { Schema as Schema3 } from "effect";
|
|
353
353
|
import { Prompt as Prompt2 } from "effect/unstable/ai";
|
|
354
354
|
var Divergence = Schema3.Struct({
|
|
@@ -439,7 +439,7 @@ var diagnose = (input) => {
|
|
|
439
439
|
};
|
|
440
440
|
};
|
|
441
441
|
|
|
442
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
442
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/agent-event.js
|
|
443
443
|
var addUsageField = (left, right) => left === undefined && right === undefined ? undefined : (left ?? 0) + (right ?? 0);
|
|
444
444
|
var addUsage = Function.dual(2, (left, right) => Response3.Usage.make({
|
|
445
445
|
inputTokens: {
|
|
@@ -542,7 +542,7 @@ class ResumeMismatch extends Schema4.TaggedErrorClass()("@batonfx/core/ResumeMis
|
|
|
542
542
|
}) {
|
|
543
543
|
}
|
|
544
544
|
|
|
545
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
545
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/memory.js
|
|
546
546
|
var exports_memory = {};
|
|
547
547
|
__export(exports_memory, {
|
|
548
548
|
replaceRecalledMessage: () => replaceRecalledMessage,
|
|
@@ -608,7 +608,7 @@ var merge = dual2(2, (first, second) => ({
|
|
|
608
608
|
var layerNoop2 = Layer3.succeed(Memory, Memory.of(noop));
|
|
609
609
|
var layerTest = (implementation) => Layer3.succeed(Memory, Memory.of(implementation));
|
|
610
610
|
|
|
611
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
611
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/model-registry.js
|
|
612
612
|
var exports_model_registry = {};
|
|
613
613
|
__export(exports_model_registry, {
|
|
614
614
|
stream: () => stream,
|
|
@@ -627,7 +627,7 @@ __export(exports_model_registry, {
|
|
|
627
627
|
import { Context as Context3, Effect as Effect4, Fiber, Function as Function2, HashMap, Layer as Layer4, Option as Option3, Ref, Schema as Schema6, Scope, Semaphore, Stream } from "effect";
|
|
628
628
|
import { LanguageModel as LanguageModel3, Model } from "effect/unstable/ai";
|
|
629
629
|
|
|
630
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
630
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/context-overflow.js
|
|
631
631
|
var exports_context_overflow = {};
|
|
632
632
|
__export(exports_context_overflow, {
|
|
633
633
|
classify: () => classify
|
|
@@ -666,7 +666,7 @@ var evidence = (value, depth) => {
|
|
|
666
666
|
};
|
|
667
667
|
var classify = (error) => overflowEvidence.test(evidence(error, 0)) ? "context-overflow" : "other";
|
|
668
668
|
|
|
669
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
669
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/model-registry.js
|
|
670
670
|
var FailureClassifierTypeId = Symbol.for("@batonfx/core/model-registry/FailureClassifier");
|
|
671
671
|
var classifyFailure = Function2.dual(2, (model, error) => {
|
|
672
672
|
const classified = model[FailureClassifierTypeId]?.(error);
|
|
@@ -784,7 +784,7 @@ var operate = Function2.dual(2, (selection, effect) => Effect4.gen(function* ()
|
|
|
784
784
|
}));
|
|
785
785
|
var stream = Function2.dual(2, (selection, operation) => Stream.unwrap(ModelRegistry.pipe(Effect4.map((service) => service.stream(selection, operation)))));
|
|
786
786
|
|
|
787
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
787
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/tool-context.js
|
|
788
788
|
var exports_tool_context = {};
|
|
789
789
|
__export(exports_tool_context, {
|
|
790
790
|
layerTest: () => layerTest3,
|
|
@@ -802,7 +802,7 @@ var layerDefault = Layer5.sync(ToolContext, () => ToolContext.of({
|
|
|
802
802
|
}));
|
|
803
803
|
var layerTest3 = (implementation) => Layer5.succeed(ToolContext, ToolContext.of(implementation));
|
|
804
804
|
|
|
805
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
805
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/tool-executor.js
|
|
806
806
|
var exports_tool_executor = {};
|
|
807
807
|
__export(exports_tool_executor, {
|
|
808
808
|
sandbox: () => sandbox,
|
|
@@ -823,11 +823,11 @@ __export(exports_tool_executor, {
|
|
|
823
823
|
import { Context as Context5, Effect as Effect8, Layer as Layer6, Option as Option4, Schema as Schema8, Stream as Stream2 } from "effect";
|
|
824
824
|
import { AiError as AiError4, Response as Response4, Tool as Tool4, Toolkit } from "effect/unstable/ai";
|
|
825
825
|
|
|
826
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
826
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/tool-placement.js
|
|
827
827
|
import { Effect as Effect7, Schedule } from "effect";
|
|
828
828
|
import { Tool as Tool3 } from "effect/unstable/ai";
|
|
829
829
|
|
|
830
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
830
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/tool-result-codec.js
|
|
831
831
|
import { Effect as Effect6, Schema as Schema7 } from "effect";
|
|
832
832
|
import { AiError as AiError3, Tool as Tool2 } from "effect/unstable/ai";
|
|
833
833
|
var resultMessage = (result) => {
|
|
@@ -892,7 +892,7 @@ var toolResultCodec = {
|
|
|
892
892
|
schemaMessage
|
|
893
893
|
};
|
|
894
894
|
|
|
895
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
895
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/tool-placement.js
|
|
896
896
|
var placementOutcomeFromResponse = (placement, tool, response) => {
|
|
897
897
|
if (typeof response !== "object" || response === null || !("_tag" in response)) {
|
|
898
898
|
return Effect7.fail(toolResultCodec.frameworkFailure("placement", tool.name, "Placement returned an invalid response"));
|
|
@@ -910,7 +910,7 @@ var placementOutcomeFromResponse = (placement, tool, response) => {
|
|
|
910
910
|
};
|
|
911
911
|
var placementOutcome = { fromResponse: placementOutcomeFromResponse };
|
|
912
912
|
|
|
913
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
913
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/tool-executor.js
|
|
914
914
|
var FrameworkStage = Schema8.Literals([
|
|
915
915
|
"decode-input",
|
|
916
916
|
"handler",
|
|
@@ -1051,7 +1051,7 @@ function layerRouter(routes) {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
var layerTest4 = (implementation) => Layer6.succeed(ToolExecutor, ToolExecutor.of(implementation));
|
|
1053
1053
|
|
|
1054
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
1054
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/approvals.js
|
|
1055
1055
|
var exports_approvals = {};
|
|
1056
1056
|
__export(exports_approvals, {
|
|
1057
1057
|
layerTest: () => layerTest5,
|
|
@@ -1067,7 +1067,7 @@ var layerAutoApprove = Layer7.succeed(Approvals, Approvals.of({ resolve: () => E
|
|
|
1067
1067
|
var layerDenyAll = Layer7.succeed(Approvals, Approvals.of({ resolve: () => Effect9.succeed({ _tag: "Denied" }) }));
|
|
1068
1068
|
var layerTest5 = (implementation) => Layer7.succeed(Approvals, Approvals.of(implementation));
|
|
1069
1069
|
|
|
1070
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
1070
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/session.js
|
|
1071
1071
|
var exports_session = {};
|
|
1072
1072
|
__export(exports_session, {
|
|
1073
1073
|
layerTest: () => layerTest6,
|
|
@@ -1359,7 +1359,7 @@ var layerMemory2 = Layer8.effect(SessionStore, Ref2.make(initialState).pipe(Effe
|
|
|
1359
1359
|
}))));
|
|
1360
1360
|
var layerTest6 = (implementation) => Layer8.succeed(SessionStore, SessionStore.of(implementation));
|
|
1361
1361
|
|
|
1362
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
1362
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/tool-output.js
|
|
1363
1363
|
var exports_tool_output = {};
|
|
1364
1364
|
__export(exports_tool_output, {
|
|
1365
1365
|
layerTest: () => layerTest7,
|
|
@@ -1435,7 +1435,7 @@ var bound = Function3.dual(2, (result, options) => Effect11.gen(function* () {
|
|
|
1435
1435
|
return boundedFromOriginal(encoded, bytes, options.maxBytes, [path.value]);
|
|
1436
1436
|
}));
|
|
1437
1437
|
|
|
1438
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
1438
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/compaction.js
|
|
1439
1439
|
var exports_compaction = {};
|
|
1440
1440
|
__export(exports_compaction, {
|
|
1441
1441
|
withLifecycle: () => withLifecycle,
|
|
@@ -1458,7 +1458,7 @@ __export(exports_compaction, {
|
|
|
1458
1458
|
import { Context as Context10, Effect as Effect14, Function as Function5, Layer as Layer11, Option as Option8, Schema as Schema11 } from "effect";
|
|
1459
1459
|
import { LanguageModel as LanguageModel6, Prompt as Prompt6, Tokenizer, Toolkit as Toolkit2 } from "effect/unstable/ai";
|
|
1460
1460
|
|
|
1461
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
1461
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/compaction-telemetry.js
|
|
1462
1462
|
import { Clock, Effect as Effect12, Exit, Function as Function4, Option as Option7 } from "effect";
|
|
1463
1463
|
import { LanguageModel as LanguageModel4 } from "effect/unstable/ai";
|
|
1464
1464
|
var resultKind = (result) => Option7.isNone(result) ? "unchanged" : result.value._tag === "Summarize" ? "summarize" : "microcompact";
|
|
@@ -1494,7 +1494,7 @@ var summaryLanguageModel = Effect12.gen(function* () {
|
|
|
1494
1494
|
return instrumentation === undefined ? model : instrumentation.wrap(model);
|
|
1495
1495
|
});
|
|
1496
1496
|
|
|
1497
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
1497
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/summary-model.js
|
|
1498
1498
|
import { Context as Context9, Deferred, Effect as Effect13, Fiber as Fiber2, Layer as Layer10, Scope as Scope2 } from "effect";
|
|
1499
1499
|
import { LanguageModel as LanguageModel5 } from "effect/unstable/ai";
|
|
1500
1500
|
var makeSummaryModelProvider = (model) => {
|
|
@@ -1519,7 +1519,7 @@ var makeSummaryModelProvider = (model) => {
|
|
|
1519
1519
|
});
|
|
1520
1520
|
};
|
|
1521
1521
|
|
|
1522
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
1522
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/compaction.js
|
|
1523
1523
|
var DEFAULT_RESERVE_TOKENS = 16384;
|
|
1524
1524
|
var DEFAULT_KEEP_RECENT_TOKENS = 20000;
|
|
1525
1525
|
var SUMMARY_TEMPLATE = `Summarize the conversation so another agent can continue seamlessly.
|
|
@@ -1777,7 +1777,7 @@ var truncate = (maxTokens) => ({
|
|
|
1777
1777
|
});
|
|
1778
1778
|
var layerTest8 = (implementation) => Layer11.succeed(Compaction, Compaction.of(implementation));
|
|
1779
1779
|
|
|
1780
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
1780
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/instructions.js
|
|
1781
1781
|
var exports_instructions = {};
|
|
1782
1782
|
__export(exports_instructions, {
|
|
1783
1783
|
staticSource: () => staticSource,
|
|
@@ -1808,7 +1808,7 @@ var openEpoch = dual4(2, (instructions, context) => Effect15.gen(function* () {
|
|
|
1808
1808
|
var layer3 = (sources) => Layer12.succeed(Instructions, Instructions.of({ sources: [...sources] }));
|
|
1809
1809
|
var layerTest9 = (implementation) => Layer12.succeed(Instructions, Instructions.of(implementation));
|
|
1810
1810
|
|
|
1811
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
1811
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/model-middleware.js
|
|
1812
1812
|
var exports_model_middleware = {};
|
|
1813
1813
|
__export(exports_model_middleware, {
|
|
1814
1814
|
layerIdentity: () => layerIdentity,
|
|
@@ -1822,7 +1822,7 @@ class ModelMiddleware extends Context12.Service()("@batonfx/core/ModelMiddleware
|
|
|
1822
1822
|
var layerIdentity = Layer13.succeed(ModelMiddleware, []);
|
|
1823
1823
|
var layer4 = (middleware) => Layer13.succeed(ModelMiddleware, middleware);
|
|
1824
1824
|
|
|
1825
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
1825
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/model-resilience.js
|
|
1826
1826
|
var exports_model_resilience = {};
|
|
1827
1827
|
__export(exports_model_resilience, {
|
|
1828
1828
|
none: () => none,
|
|
@@ -1875,7 +1875,7 @@ var apply = Function6.dual(2, (model, resilience) => ({
|
|
|
1875
1875
|
streamText: (options) => retryStream(() => model.streamText(options), (error) => Response6.makePart("error", { error }), resilience)
|
|
1876
1876
|
}));
|
|
1877
1877
|
|
|
1878
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
1878
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/permissions.js
|
|
1879
1879
|
var exports_permissions = {};
|
|
1880
1880
|
__export(exports_permissions, {
|
|
1881
1881
|
matches: () => matches,
|
|
@@ -2020,7 +2020,7 @@ var layerRuleStoreMemory = (initialRules = []) => Layer15.effect(RuleStore, Ref4
|
|
|
2020
2020
|
var layerRuleStoreTest = (implementation) => Layer15.succeed(RuleStore, RuleStore.of(implementation));
|
|
2021
2021
|
var layerTest11 = (implementation) => Layer15.succeed(Permissions, Permissions.of(implementation));
|
|
2022
2022
|
|
|
2023
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
2023
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/skill-source.js
|
|
2024
2024
|
var exports_skill_source = {};
|
|
2025
2025
|
__export(exports_skill_source, {
|
|
2026
2026
|
selectListings: () => selectListings,
|
|
@@ -2110,7 +2110,7 @@ var selectListings = Function7.dual(3, (skills, budgetTokens, recentlyUsed) => {
|
|
|
2110
2110
|
return selected;
|
|
2111
2111
|
});
|
|
2112
2112
|
|
|
2113
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
2113
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/steering.js
|
|
2114
2114
|
var exports_steering = {};
|
|
2115
2115
|
__export(exports_steering, {
|
|
2116
2116
|
layerTest: () => layerTest13,
|
|
@@ -2168,7 +2168,7 @@ var layer7 = (options = {}) => Layer17.effect(Steering, Effect20.gen(function* (
|
|
|
2168
2168
|
}));
|
|
2169
2169
|
var layerTest13 = (implementation) => Layer17.succeed(Steering, Steering.of(implementation));
|
|
2170
2170
|
|
|
2171
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
2171
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/agent.js
|
|
2172
2172
|
var exports_agent = {};
|
|
2173
2173
|
__export(exports_agent, {
|
|
2174
2174
|
stream: () => stream2,
|
|
@@ -2182,11 +2182,11 @@ import { Effect as Effect27, Option as Option17, Schema as Schema21, Stream as S
|
|
|
2182
2182
|
import { dual as dual7 } from "effect/Function";
|
|
2183
2183
|
import { AiError as AiError8, Chat as Chat3, LanguageModel as LanguageModel10, Prompt as Prompt12, Tool as Tool10, Toolkit as Toolkit5 } from "effect/unstable/ai";
|
|
2184
2184
|
|
|
2185
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
2185
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/agent-run.js
|
|
2186
2186
|
import { Cause as Cause6, Channel, Effect as Effect26, Equal as Equal2, Exit as Exit4, Fiber as Fiber3, HashMap as HashMap6, Option as Option16, Queue as Queue2, Ref as Ref5, Schema as Schema20, Semaphore as Semaphore3, Stream as Stream5 } from "effect";
|
|
2187
2187
|
import { AiError as AiError7, Chat as Chat2, LanguageModel as LanguageModel9, Prompt as Prompt11, Response as Response11, Telemetry, Tokenizer as Tokenizer2, Tool as Tool9, Toolkit as Toolkit4 } from "effect/unstable/ai";
|
|
2188
2188
|
|
|
2189
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
2189
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/model-instrumentation.js
|
|
2190
2190
|
import { Cause as Cause4, Clock as Clock2, Duration, Effect as Effect21, Exit as Exit3, Function as Function8, Option as Option12, Schedule as Schedule3, Stream as Stream4 } from "effect";
|
|
2191
2191
|
import { AiError as AiError6, LanguageModel as LanguageModel8, Model as Model2, Response as Response7 } from "effect/unstable/ai";
|
|
2192
2192
|
var makeIdentityCell = () => ({ current: undefined });
|
|
@@ -2441,7 +2441,7 @@ var instrument = Function8.dual(2, (model, options) => {
|
|
|
2441
2441
|
};
|
|
2442
2442
|
});
|
|
2443
2443
|
|
|
2444
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
2444
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/tool-authorization.js
|
|
2445
2445
|
import { Cause as Cause5, Context as Context17, Effect as Effect22, Layer as Layer18, Schema as Schema16 } from "effect";
|
|
2446
2446
|
import"effect/unstable/ai";
|
|
2447
2447
|
class PermissionDenied extends Schema16.TaggedErrorClass()("@batonfx/core/PermissionDenied", {
|
|
@@ -2515,7 +2515,7 @@ var make4 = (options) => ({
|
|
|
2515
2515
|
})
|
|
2516
2516
|
});
|
|
2517
2517
|
|
|
2518
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
2518
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/tool-registry.js
|
|
2519
2519
|
import { Array as Array2, Effect as Effect23, HashMap as HashMap4, Option as Option13 } from "effect";
|
|
2520
2520
|
import { dual as dual6 } from "effect/Function";
|
|
2521
2521
|
import { Tool as Tool7, Toolkit as Toolkit3 } from "effect/unstable/ai";
|
|
@@ -2561,7 +2561,7 @@ var select = dual6(2, (registry, names) => {
|
|
|
2561
2561
|
};
|
|
2562
2562
|
});
|
|
2563
2563
|
|
|
2564
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
2564
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/agent-persistence-lock.js
|
|
2565
2565
|
import { Context as Context18, Effect as Effect24, Layer as Layer19, RcMap, Scope as Scope3, Semaphore as Semaphore2 } from "effect";
|
|
2566
2566
|
import { Chat } from "effect/unstable/ai";
|
|
2567
2567
|
|
|
@@ -2579,11 +2579,11 @@ var makeRuntime = Effect24.gen(function* () {
|
|
|
2579
2579
|
});
|
|
2580
2580
|
var layerRuntime = Layer19.effect(Runtime, makeRuntime);
|
|
2581
2581
|
|
|
2582
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
2582
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/agent-message.js
|
|
2583
2583
|
import { Effect as Effect25, Option as Option14, Schema as Schema18 } from "effect";
|
|
2584
2584
|
import { Prompt as Prompt9, Response as Response8 } from "effect/unstable/ai";
|
|
2585
2585
|
|
|
2586
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
2586
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/agent-skill-tool.js
|
|
2587
2587
|
import { Schema as Schema17 } from "effect";
|
|
2588
2588
|
import { Tool as Tool8 } from "effect/unstable/ai";
|
|
2589
2589
|
var skillListingBudgetTokens = 2048;
|
|
@@ -2606,7 +2606,7 @@ var activateSkillTool = Tool8.make(activateSkillToolName, {
|
|
|
2606
2606
|
failureMode: "return"
|
|
2607
2607
|
});
|
|
2608
2608
|
|
|
2609
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
2609
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/agent-message.js
|
|
2610
2610
|
var withSystem = (instructions, prompt) => Prompt9.fromMessages([Prompt9.makeMessage("system", { content: instructions }), ...prompt.content]);
|
|
2611
2611
|
var skillListingsInstructions = (listings) => `Available skills:
|
|
2612
2612
|
${listings}
|
|
@@ -2654,7 +2654,7 @@ var applyPartChain = (chain, part, context) => Effect25.gen(function* () {
|
|
|
2654
2654
|
return current;
|
|
2655
2655
|
});
|
|
2656
2656
|
|
|
2657
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
2657
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/agent-suspension.js
|
|
2658
2658
|
import { Equal, Option as Option15, Schema as Schema19 } from "effect";
|
|
2659
2659
|
import { Prompt as Prompt10, Response as Response9 } from "effect/unstable/ai";
|
|
2660
2660
|
var suspensionCheckpointOption = "@batonfx/core/suspension";
|
|
@@ -2760,7 +2760,7 @@ var suspended = (call, toolCallBatch, toolCallIndex, token, reason) => AgentSusp
|
|
|
2760
2760
|
tool_call_batch: toolCallBatch.calls
|
|
2761
2761
|
});
|
|
2762
2762
|
|
|
2763
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
2763
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/agent-tool-result.js
|
|
2764
2764
|
import { HashMap as HashMap5 } from "effect";
|
|
2765
2765
|
import { Response as Response10 } from "effect/unstable/ai";
|
|
2766
2766
|
var successResult = (call, outcome) => Response10.toolResultPart({
|
|
@@ -2782,7 +2782,7 @@ var domainFailureResult = (call, outcome) => Response10.toolResultPart({
|
|
|
2782
2782
|
preliminary: false
|
|
2783
2783
|
});
|
|
2784
2784
|
|
|
2785
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
2785
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/agent-run.js
|
|
2786
2786
|
var classifyOtherFailure = (error) => classify(error);
|
|
2787
2787
|
var defaultProgressOverflowPolicy = { _tag: "Backpressure", capacity: 64 };
|
|
2788
2788
|
var progressCapacitySchema = Schema20.Finite.pipe(Schema20.check(Schema20.isInt(), Schema20.isGreaterThan(0)));
|
|
@@ -2922,9 +2922,9 @@ var streamInternal = (agent, options, structured) => Stream5.unwrap(Effect26.gen
|
|
|
2922
2922
|
});
|
|
2923
2923
|
}
|
|
2924
2924
|
const progressPolicy = decodedProgressPolicy.value;
|
|
2925
|
-
if (agent.toolExecution !== undefined && (!Number.isSafeInteger(agent.toolExecution.concurrency) || agent.toolExecution.concurrency <= 0)) {
|
|
2925
|
+
if (agent.toolExecution !== undefined && agent.toolExecution.concurrency !== "unbounded" && (!Number.isSafeInteger(agent.toolExecution.concurrency) || agent.toolExecution.concurrency <= 0)) {
|
|
2926
2926
|
return yield* AgentError.make({
|
|
2927
|
-
message:
|
|
2927
|
+
message: 'Agent.toolExecution.concurrency must be a positive safe integer or "unbounded"',
|
|
2928
2928
|
turn: 0
|
|
2929
2929
|
});
|
|
2930
2930
|
}
|
|
@@ -3922,7 +3922,7 @@ var streamInternal = (agent, options, structured) => Stream5.unwrap(Effect26.gen
|
|
|
3922
3922
|
}));
|
|
3923
3923
|
})).pipe(Stream5.withSpan("Baton.Agent.run", { attributes: { "baton.agent.name": agent.name } }));
|
|
3924
3924
|
|
|
3925
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
3925
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/agent.js
|
|
3926
3926
|
var AgentTypeId = Symbol.for("@batonfx/core/Agent");
|
|
3927
3927
|
function make5(options) {
|
|
3928
3928
|
const declaredTools = "tools" in options && Array.isArray(options.tools) ? options.tools : undefined;
|
|
@@ -3987,7 +3987,7 @@ var generate = dual7(2, (agent, options) => options.output === undefined ? gener
|
|
|
3987
3987
|
objectPrompt: options.output.prompt ?? defaultObjectPrompt
|
|
3988
3988
|
}));
|
|
3989
3989
|
|
|
3990
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
3990
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/agent-tool.js
|
|
3991
3991
|
var exports_agent_tool = {};
|
|
3992
3992
|
__export(exports_agent_tool, {
|
|
3993
3993
|
asTool: () => asTool
|
|
@@ -4058,7 +4058,7 @@ var asTool = Function9.dual((args) => args.length !== 1 || ("name" in args[0]),
|
|
|
4058
4058
|
return lazyHandled(toolkit, name, handler);
|
|
4059
4059
|
});
|
|
4060
4060
|
|
|
4061
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
4061
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/guardrail.js
|
|
4062
4062
|
var exports_guardrail = {};
|
|
4063
4063
|
__export(exports_guardrail, {
|
|
4064
4064
|
validateInput: () => validateInput,
|
|
@@ -4139,7 +4139,7 @@ var filterOutput = (keep) => ({
|
|
|
4139
4139
|
transformPart: (part, context) => Effect29.succeed(part.type === "tool-call" || keep(part, context) ? Option18.some(part) : Option18.none())
|
|
4140
4140
|
});
|
|
4141
4141
|
|
|
4142
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
4142
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/handoff.js
|
|
4143
4143
|
var exports_handoff = {};
|
|
4144
4144
|
__export(exports_handoff, {
|
|
4145
4145
|
transferTool: () => transferTool,
|
|
@@ -4219,7 +4219,7 @@ var supervisor = (options) => {
|
|
|
4219
4219
|
};
|
|
4220
4220
|
};
|
|
4221
4221
|
|
|
4222
|
-
// ../../node_modules/.bun/@batonfx+core@0.11.
|
|
4222
|
+
// ../../node_modules/.bun/@batonfx+core@0.11.4+74997d64abff4185/node_modules/@batonfx/core/dist/index.js
|
|
4223
4223
|
import { AiError as AiError10, Chat as Chat4, EmbeddingModel, IdGenerator as IdGenerator2, LanguageModel as LanguageModel12, Model as Model3, Prompt as Prompt16, Response as Response13, ResponseIdTracker, Telemetry as Telemetry2, Tokenizer as Tokenizer3, Tool as Tool13, Toolkit as Toolkit8 } from "effect/unstable/ai";
|
|
4224
4224
|
|
|
4225
4225
|
export { exports_model_telemetry, exports_turn_policy, exports_agent_event, exports_memory, exports_context_overflow, exports_model_registry, exports_tool_context, exports_tool_executor, exports_approvals, exports_session, exports_tool_output, exports_compaction, exports_instructions, exports_model_middleware, exports_model_resilience, exports_permissions, exports_skill_source, exports_steering, exports_agent, exports_agent_tool, exports_guardrail, exports_handoff, AiError10 as AiError, Chat4 as Chat, EmbeddingModel, IdGenerator2 as IdGenerator, Model3 as Model, Prompt16 as Prompt, Response13 as Response, ResponseIdTracker, Telemetry2 as Telemetry, Tokenizer3 as Tokenizer, Tool13 as Tool, Toolkit8 as Toolkit };
|