@albinocrabs/o-switcher 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/{chunk-VABBGKSR.cjs → chunk-H72U2MNG.cjs} +192 -16
- package/dist/{chunk-IKNWSNAS.js → chunk-XXH633FY.js} +190 -17
- package/dist/index.cjs +88 -145
- package/dist/index.d.cts +43 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.js +9 -77
- package/dist/plugin.cjs +118 -17
- package/dist/plugin.d.cts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.js +103 -2
- package/package.json +11 -5
- package/src/registry/types.ts +65 -0
- package/src/state-bridge.ts +119 -0
- package/src/tui.tsx +218 -0
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkH72U2MNG_cjs = require('./chunk-H72U2MNG.cjs');
|
|
4
4
|
var crypto = require('crypto');
|
|
5
|
-
var tool = require('@opencode-ai/plugin/tool');
|
|
6
5
|
|
|
7
6
|
// src/mode/detection.ts
|
|
8
7
|
var detectDeploymentMode = (hint) => {
|
|
@@ -632,7 +631,7 @@ var createStreamStitcher = (_requestId) => {
|
|
|
632
631
|
|
|
633
632
|
// src/execution/audit-collector.ts
|
|
634
633
|
var createAuditCollector = (logger, requestId) => {
|
|
635
|
-
const requestLogger =
|
|
634
|
+
const requestLogger = chunkH72U2MNG_cjs.createRequestLogger(logger, requestId);
|
|
636
635
|
const attempts = [];
|
|
637
636
|
const segments = [];
|
|
638
637
|
return {
|
|
@@ -662,7 +661,7 @@ var createAuditCollector = (logger, requestId) => {
|
|
|
662
661
|
// src/execution/orchestrator.ts
|
|
663
662
|
var createExecutionOrchestrator = (deps) => ({
|
|
664
663
|
async execute(request) {
|
|
665
|
-
const requestId = request.request_id ||
|
|
664
|
+
const requestId = request.request_id || chunkH72U2MNG_cjs.generateCorrelationId();
|
|
666
665
|
const auditCollector = createAuditCollector(deps.logger, requestId);
|
|
667
666
|
const stitcher = createStreamStitcher();
|
|
668
667
|
const startMs = Date.now();
|
|
@@ -704,7 +703,12 @@ var createExecutionOrchestrator = (deps) => ({
|
|
|
704
703
|
outcome = "success";
|
|
705
704
|
finalTarget = failoverResult.target_id;
|
|
706
705
|
const attemptValue = failoverResult.value;
|
|
707
|
-
const continuationMode = stitcher.segmentCount() === 0 ? "same_target_resume" :
|
|
706
|
+
const continuationMode = stitcher.segmentCount() === 0 ? "same_target_resume" : determineContinuationMode(
|
|
707
|
+
stitcher.assemble().segments[stitcher.segmentCount() - 1].source_target_id,
|
|
708
|
+
failoverResult.target_id,
|
|
709
|
+
true
|
|
710
|
+
// same model assumption in plugin-only mode
|
|
711
|
+
);
|
|
708
712
|
stitcher.addSegment(attemptValue.buffer, {
|
|
709
713
|
request_id: requestId,
|
|
710
714
|
segment_id: stitcher.segmentCount(),
|
|
@@ -756,7 +760,7 @@ var createExecutionOrchestrator = (deps) => ({
|
|
|
756
760
|
};
|
|
757
761
|
} finally {
|
|
758
762
|
auditCollector.flush(outcome, finalTarget);
|
|
759
|
-
const requestLogger =
|
|
763
|
+
const requestLogger = chunkH72U2MNG_cjs.createRequestLogger(deps.logger, requestId);
|
|
760
764
|
const endMs = Date.now();
|
|
761
765
|
requestLogger.info(
|
|
762
766
|
{
|
|
@@ -884,342 +888,282 @@ var validateBearerToken = (authHeader, expectedToken) => {
|
|
|
884
888
|
}
|
|
885
889
|
return { authorized: true };
|
|
886
890
|
};
|
|
887
|
-
var { schema: z } = tool.tool;
|
|
888
|
-
var createOperatorTools = (deps) => ({
|
|
889
|
-
listTargets: tool.tool({
|
|
890
|
-
description: "List all routing targets with health scores, states, and circuit breaker status.",
|
|
891
|
-
args: {},
|
|
892
|
-
async execute() {
|
|
893
|
-
deps.logger.info({ op: "listTargets" }, "operator: listTargets");
|
|
894
|
-
const result = chunkVABBGKSR_cjs.listTargets(deps);
|
|
895
|
-
return JSON.stringify(result, null, 2);
|
|
896
|
-
}
|
|
897
|
-
}),
|
|
898
|
-
pauseTarget: tool.tool({
|
|
899
|
-
description: "Pause a target, preventing new requests from being routed to it.",
|
|
900
|
-
args: { target_id: z.string().min(1) },
|
|
901
|
-
async execute(args) {
|
|
902
|
-
deps.logger.info({ op: "pauseTarget", target_id: args.target_id }, "operator: pauseTarget");
|
|
903
|
-
const result = chunkVABBGKSR_cjs.pauseTarget(deps, args.target_id);
|
|
904
|
-
return JSON.stringify(result, null, 2);
|
|
905
|
-
}
|
|
906
|
-
}),
|
|
907
|
-
resumeTarget: tool.tool({
|
|
908
|
-
description: "Resume a previously paused or disabled target, allowing new requests.",
|
|
909
|
-
args: { target_id: z.string().min(1) },
|
|
910
|
-
async execute(args) {
|
|
911
|
-
deps.logger.info({ op: "resumeTarget", target_id: args.target_id }, "operator: resumeTarget");
|
|
912
|
-
const result = chunkVABBGKSR_cjs.resumeTarget(deps, args.target_id);
|
|
913
|
-
return JSON.stringify(result, null, 2);
|
|
914
|
-
}
|
|
915
|
-
}),
|
|
916
|
-
drainTarget: tool.tool({
|
|
917
|
-
description: "Drain a target, allowing in-flight requests to complete but preventing new ones.",
|
|
918
|
-
args: { target_id: z.string().min(1) },
|
|
919
|
-
async execute(args) {
|
|
920
|
-
deps.logger.info({ op: "drainTarget", target_id: args.target_id }, "operator: drainTarget");
|
|
921
|
-
const result = chunkVABBGKSR_cjs.drainTarget(deps, args.target_id);
|
|
922
|
-
return JSON.stringify(result, null, 2);
|
|
923
|
-
}
|
|
924
|
-
}),
|
|
925
|
-
disableTarget: tool.tool({
|
|
926
|
-
description: "Disable a target entirely, removing it from routing.",
|
|
927
|
-
args: { target_id: z.string().min(1) },
|
|
928
|
-
async execute(args) {
|
|
929
|
-
deps.logger.info(
|
|
930
|
-
{ op: "disableTarget", target_id: args.target_id },
|
|
931
|
-
"operator: disableTarget"
|
|
932
|
-
);
|
|
933
|
-
const result = chunkVABBGKSR_cjs.disableTarget(deps, args.target_id);
|
|
934
|
-
return JSON.stringify(result, null, 2);
|
|
935
|
-
}
|
|
936
|
-
}),
|
|
937
|
-
inspectRequest: tool.tool({
|
|
938
|
-
description: "Inspect a request trace by ID, showing attempts, segments, and outcome.",
|
|
939
|
-
args: { request_id: z.string().min(1) },
|
|
940
|
-
async execute(args) {
|
|
941
|
-
deps.logger.info(
|
|
942
|
-
{ op: "inspectRequest", request_id: args.request_id },
|
|
943
|
-
"operator: inspectRequest"
|
|
944
|
-
);
|
|
945
|
-
const result = chunkVABBGKSR_cjs.inspectRequest(deps, args.request_id);
|
|
946
|
-
return JSON.stringify(result, null, 2);
|
|
947
|
-
}
|
|
948
|
-
}),
|
|
949
|
-
reloadConfig: tool.tool({
|
|
950
|
-
description: "Reload routing configuration with diff-apply. Validates new config before applying.",
|
|
951
|
-
args: { config: z.record(z.string(), z.unknown()) },
|
|
952
|
-
async execute(args) {
|
|
953
|
-
deps.logger.info({ op: "reloadConfig" }, "operator: reloadConfig");
|
|
954
|
-
const result = chunkVABBGKSR_cjs.reloadConfig(deps, args.config);
|
|
955
|
-
return JSON.stringify(result, null, 2);
|
|
956
|
-
}
|
|
957
|
-
})
|
|
958
|
-
});
|
|
959
891
|
|
|
960
892
|
Object.defineProperty(exports, "ADMISSION_RESULTS", {
|
|
961
893
|
enumerable: true,
|
|
962
|
-
get: function () { return
|
|
894
|
+
get: function () { return chunkH72U2MNG_cjs.ADMISSION_RESULTS; }
|
|
963
895
|
});
|
|
964
896
|
Object.defineProperty(exports, "BackoffConfigSchema", {
|
|
965
897
|
enumerable: true,
|
|
966
|
-
get: function () { return
|
|
898
|
+
get: function () { return chunkH72U2MNG_cjs.BackoffConfigSchema; }
|
|
967
899
|
});
|
|
968
900
|
Object.defineProperty(exports, "ConfigValidationError", {
|
|
969
901
|
enumerable: true,
|
|
970
|
-
get: function () { return
|
|
902
|
+
get: function () { return chunkH72U2MNG_cjs.ConfigValidationError; }
|
|
971
903
|
});
|
|
972
904
|
Object.defineProperty(exports, "DEFAULT_ALPHA", {
|
|
973
905
|
enumerable: true,
|
|
974
|
-
get: function () { return
|
|
906
|
+
get: function () { return chunkH72U2MNG_cjs.DEFAULT_ALPHA; }
|
|
975
907
|
});
|
|
976
908
|
Object.defineProperty(exports, "DEFAULT_BACKOFF_BASE_MS", {
|
|
977
909
|
enumerable: true,
|
|
978
|
-
get: function () { return
|
|
910
|
+
get: function () { return chunkH72U2MNG_cjs.DEFAULT_BACKOFF_BASE_MS; }
|
|
979
911
|
});
|
|
980
912
|
Object.defineProperty(exports, "DEFAULT_BACKOFF_JITTER", {
|
|
981
913
|
enumerable: true,
|
|
982
|
-
get: function () { return
|
|
914
|
+
get: function () { return chunkH72U2MNG_cjs.DEFAULT_BACKOFF_JITTER; }
|
|
983
915
|
});
|
|
984
916
|
Object.defineProperty(exports, "DEFAULT_BACKOFF_MAX_MS", {
|
|
985
917
|
enumerable: true,
|
|
986
|
-
get: function () { return
|
|
918
|
+
get: function () { return chunkH72U2MNG_cjs.DEFAULT_BACKOFF_MAX_MS; }
|
|
987
919
|
});
|
|
988
920
|
Object.defineProperty(exports, "DEFAULT_BACKOFF_MULTIPLIER", {
|
|
989
921
|
enumerable: true,
|
|
990
|
-
get: function () { return
|
|
922
|
+
get: function () { return chunkH72U2MNG_cjs.DEFAULT_BACKOFF_MULTIPLIER; }
|
|
991
923
|
});
|
|
992
924
|
Object.defineProperty(exports, "DEFAULT_BACKOFF_PARAMS", {
|
|
993
925
|
enumerable: true,
|
|
994
|
-
get: function () { return
|
|
926
|
+
get: function () { return chunkH72U2MNG_cjs.DEFAULT_BACKOFF_PARAMS; }
|
|
995
927
|
});
|
|
996
928
|
Object.defineProperty(exports, "DEFAULT_FAILOVER_BUDGET", {
|
|
997
929
|
enumerable: true,
|
|
998
|
-
get: function () { return
|
|
930
|
+
get: function () { return chunkH72U2MNG_cjs.DEFAULT_FAILOVER_BUDGET; }
|
|
999
931
|
});
|
|
1000
932
|
Object.defineProperty(exports, "DEFAULT_RETRY", {
|
|
1001
933
|
enumerable: true,
|
|
1002
|
-
get: function () { return
|
|
934
|
+
get: function () { return chunkH72U2MNG_cjs.DEFAULT_RETRY; }
|
|
1003
935
|
});
|
|
1004
936
|
Object.defineProperty(exports, "DEFAULT_RETRY_BUDGET", {
|
|
1005
937
|
enumerable: true,
|
|
1006
|
-
get: function () { return
|
|
938
|
+
get: function () { return chunkH72U2MNG_cjs.DEFAULT_RETRY_BUDGET; }
|
|
1007
939
|
});
|
|
1008
940
|
Object.defineProperty(exports, "DEFAULT_TIMEOUT_MS", {
|
|
1009
941
|
enumerable: true,
|
|
1010
|
-
get: function () { return
|
|
942
|
+
get: function () { return chunkH72U2MNG_cjs.DEFAULT_TIMEOUT_MS; }
|
|
1011
943
|
});
|
|
1012
944
|
Object.defineProperty(exports, "DualBreaker", {
|
|
1013
945
|
enumerable: true,
|
|
1014
|
-
get: function () { return
|
|
946
|
+
get: function () { return chunkH72U2MNG_cjs.DualBreaker; }
|
|
1015
947
|
});
|
|
1016
948
|
Object.defineProperty(exports, "EXCLUSION_REASONS", {
|
|
1017
949
|
enumerable: true,
|
|
1018
|
-
get: function () { return
|
|
950
|
+
get: function () { return chunkH72U2MNG_cjs.EXCLUSION_REASONS; }
|
|
1019
951
|
});
|
|
1020
952
|
Object.defineProperty(exports, "ErrorClassSchema", {
|
|
1021
953
|
enumerable: true,
|
|
1022
|
-
get: function () { return
|
|
954
|
+
get: function () { return chunkH72U2MNG_cjs.ErrorClassSchema; }
|
|
1023
955
|
});
|
|
1024
956
|
Object.defineProperty(exports, "INITIAL_HEALTH_SCORE", {
|
|
1025
957
|
enumerable: true,
|
|
1026
|
-
get: function () { return
|
|
958
|
+
get: function () { return chunkH72U2MNG_cjs.INITIAL_HEALTH_SCORE; }
|
|
1027
959
|
});
|
|
1028
960
|
Object.defineProperty(exports, "REDACT_PATHS", {
|
|
1029
961
|
enumerable: true,
|
|
1030
|
-
get: function () { return
|
|
962
|
+
get: function () { return chunkH72U2MNG_cjs.REDACT_PATHS; }
|
|
1031
963
|
});
|
|
1032
964
|
Object.defineProperty(exports, "SwitcherConfigSchema", {
|
|
1033
965
|
enumerable: true,
|
|
1034
|
-
get: function () { return
|
|
966
|
+
get: function () { return chunkH72U2MNG_cjs.SwitcherConfigSchema; }
|
|
1035
967
|
});
|
|
1036
968
|
Object.defineProperty(exports, "TARGET_STATES", {
|
|
1037
969
|
enumerable: true,
|
|
1038
|
-
get: function () { return
|
|
970
|
+
get: function () { return chunkH72U2MNG_cjs.TARGET_STATES; }
|
|
1039
971
|
});
|
|
1040
972
|
Object.defineProperty(exports, "TargetConfigSchema", {
|
|
1041
973
|
enumerable: true,
|
|
1042
|
-
get: function () { return
|
|
974
|
+
get: function () { return chunkH72U2MNG_cjs.TargetConfigSchema; }
|
|
1043
975
|
});
|
|
1044
976
|
Object.defineProperty(exports, "TargetRegistry", {
|
|
1045
977
|
enumerable: true,
|
|
1046
|
-
get: function () { return
|
|
978
|
+
get: function () { return chunkH72U2MNG_cjs.TargetRegistry; }
|
|
1047
979
|
});
|
|
1048
980
|
Object.defineProperty(exports, "addProfile", {
|
|
1049
981
|
enumerable: true,
|
|
1050
|
-
get: function () { return
|
|
982
|
+
get: function () { return chunkH72U2MNG_cjs.addProfile; }
|
|
1051
983
|
});
|
|
1052
984
|
Object.defineProperty(exports, "applyConfigDiff", {
|
|
1053
985
|
enumerable: true,
|
|
1054
|
-
get: function () { return
|
|
986
|
+
get: function () { return chunkH72U2MNG_cjs.applyConfigDiff; }
|
|
1055
987
|
});
|
|
1056
988
|
Object.defineProperty(exports, "checkHardRejects", {
|
|
1057
989
|
enumerable: true,
|
|
1058
|
-
get: function () { return
|
|
990
|
+
get: function () { return chunkH72U2MNG_cjs.checkHardRejects; }
|
|
1059
991
|
});
|
|
1060
992
|
Object.defineProperty(exports, "computeBackoffMs", {
|
|
1061
993
|
enumerable: true,
|
|
1062
|
-
get: function () { return
|
|
994
|
+
get: function () { return chunkH72U2MNG_cjs.computeBackoffMs; }
|
|
1063
995
|
});
|
|
1064
996
|
Object.defineProperty(exports, "computeConfigDiff", {
|
|
1065
997
|
enumerable: true,
|
|
1066
|
-
get: function () { return
|
|
998
|
+
get: function () { return chunkH72U2MNG_cjs.computeConfigDiff; }
|
|
1067
999
|
});
|
|
1068
1000
|
Object.defineProperty(exports, "computeCooldownMs", {
|
|
1069
1001
|
enumerable: true,
|
|
1070
|
-
get: function () { return
|
|
1002
|
+
get: function () { return chunkH72U2MNG_cjs.computeCooldownMs; }
|
|
1071
1003
|
});
|
|
1072
1004
|
Object.defineProperty(exports, "computeScore", {
|
|
1073
1005
|
enumerable: true,
|
|
1074
|
-
get: function () { return
|
|
1006
|
+
get: function () { return chunkH72U2MNG_cjs.computeScore; }
|
|
1075
1007
|
});
|
|
1076
1008
|
Object.defineProperty(exports, "createAdmissionController", {
|
|
1077
1009
|
enumerable: true,
|
|
1078
|
-
get: function () { return
|
|
1010
|
+
get: function () { return chunkH72U2MNG_cjs.createAdmissionController; }
|
|
1079
1011
|
});
|
|
1080
1012
|
Object.defineProperty(exports, "createAuditLogger", {
|
|
1081
1013
|
enumerable: true,
|
|
1082
|
-
get: function () { return
|
|
1014
|
+
get: function () { return chunkH72U2MNG_cjs.createAuditLogger; }
|
|
1083
1015
|
});
|
|
1084
1016
|
Object.defineProperty(exports, "createAuthWatcher", {
|
|
1085
1017
|
enumerable: true,
|
|
1086
|
-
get: function () { return
|
|
1018
|
+
get: function () { return chunkH72U2MNG_cjs.createAuthWatcher; }
|
|
1087
1019
|
});
|
|
1088
1020
|
Object.defineProperty(exports, "createCircuitBreaker", {
|
|
1089
1021
|
enumerable: true,
|
|
1090
|
-
get: function () { return
|
|
1022
|
+
get: function () { return chunkH72U2MNG_cjs.createCircuitBreaker; }
|
|
1091
1023
|
});
|
|
1092
1024
|
Object.defineProperty(exports, "createConcurrencyTracker", {
|
|
1093
1025
|
enumerable: true,
|
|
1094
|
-
get: function () { return
|
|
1026
|
+
get: function () { return chunkH72U2MNG_cjs.createConcurrencyTracker; }
|
|
1095
1027
|
});
|
|
1096
1028
|
Object.defineProperty(exports, "createCooldownManager", {
|
|
1097
1029
|
enumerable: true,
|
|
1098
|
-
get: function () { return
|
|
1030
|
+
get: function () { return chunkH72U2MNG_cjs.createCooldownManager; }
|
|
1099
1031
|
});
|
|
1100
1032
|
Object.defineProperty(exports, "createFailoverOrchestrator", {
|
|
1101
1033
|
enumerable: true,
|
|
1102
|
-
get: function () { return
|
|
1034
|
+
get: function () { return chunkH72U2MNG_cjs.createFailoverOrchestrator; }
|
|
1103
1035
|
});
|
|
1104
1036
|
Object.defineProperty(exports, "createLogSubscriber", {
|
|
1105
1037
|
enumerable: true,
|
|
1106
|
-
get: function () { return
|
|
1038
|
+
get: function () { return chunkH72U2MNG_cjs.createLogSubscriber; }
|
|
1039
|
+
});
|
|
1040
|
+
Object.defineProperty(exports, "createOperatorTools", {
|
|
1041
|
+
enumerable: true,
|
|
1042
|
+
get: function () { return chunkH72U2MNG_cjs.createOperatorTools; }
|
|
1107
1043
|
});
|
|
1108
1044
|
Object.defineProperty(exports, "createProfileTools", {
|
|
1109
1045
|
enumerable: true,
|
|
1110
|
-
get: function () { return
|
|
1046
|
+
get: function () { return chunkH72U2MNG_cjs.createProfileTools; }
|
|
1111
1047
|
});
|
|
1112
1048
|
Object.defineProperty(exports, "createRegistry", {
|
|
1113
1049
|
enumerable: true,
|
|
1114
|
-
get: function () { return
|
|
1050
|
+
get: function () { return chunkH72U2MNG_cjs.createRegistry; }
|
|
1115
1051
|
});
|
|
1116
1052
|
Object.defineProperty(exports, "createRequestLogger", {
|
|
1117
1053
|
enumerable: true,
|
|
1118
|
-
get: function () { return
|
|
1054
|
+
get: function () { return chunkH72U2MNG_cjs.createRequestLogger; }
|
|
1119
1055
|
});
|
|
1120
1056
|
Object.defineProperty(exports, "createRequestTraceBuffer", {
|
|
1121
1057
|
enumerable: true,
|
|
1122
|
-
get: function () { return
|
|
1058
|
+
get: function () { return chunkH72U2MNG_cjs.createRequestTraceBuffer; }
|
|
1123
1059
|
});
|
|
1124
1060
|
Object.defineProperty(exports, "createRetryPolicy", {
|
|
1125
1061
|
enumerable: true,
|
|
1126
|
-
get: function () { return
|
|
1062
|
+
get: function () { return chunkH72U2MNG_cjs.createRetryPolicy; }
|
|
1127
1063
|
});
|
|
1128
1064
|
Object.defineProperty(exports, "createRoutingEventBus", {
|
|
1129
1065
|
enumerable: true,
|
|
1130
|
-
get: function () { return
|
|
1066
|
+
get: function () { return chunkH72U2MNG_cjs.createRoutingEventBus; }
|
|
1131
1067
|
});
|
|
1132
1068
|
Object.defineProperty(exports, "disableTarget", {
|
|
1133
1069
|
enumerable: true,
|
|
1134
|
-
get: function () { return
|
|
1070
|
+
get: function () { return chunkH72U2MNG_cjs.disableTarget; }
|
|
1135
1071
|
});
|
|
1136
1072
|
Object.defineProperty(exports, "discoverTargets", {
|
|
1137
1073
|
enumerable: true,
|
|
1138
|
-
get: function () { return
|
|
1074
|
+
get: function () { return chunkH72U2MNG_cjs.discoverTargets; }
|
|
1139
1075
|
});
|
|
1140
1076
|
Object.defineProperty(exports, "discoverTargetsFromProfiles", {
|
|
1141
1077
|
enumerable: true,
|
|
1142
|
-
get: function () { return
|
|
1078
|
+
get: function () { return chunkH72U2MNG_cjs.discoverTargetsFromProfiles; }
|
|
1143
1079
|
});
|
|
1144
1080
|
Object.defineProperty(exports, "drainTarget", {
|
|
1145
1081
|
enumerable: true,
|
|
1146
|
-
get: function () { return
|
|
1082
|
+
get: function () { return chunkH72U2MNG_cjs.drainTarget; }
|
|
1147
1083
|
});
|
|
1148
1084
|
Object.defineProperty(exports, "generateCorrelationId", {
|
|
1149
1085
|
enumerable: true,
|
|
1150
|
-
get: function () { return
|
|
1086
|
+
get: function () { return chunkH72U2MNG_cjs.generateCorrelationId; }
|
|
1151
1087
|
});
|
|
1152
1088
|
Object.defineProperty(exports, "getExclusionReason", {
|
|
1153
1089
|
enumerable: true,
|
|
1154
|
-
get: function () { return
|
|
1090
|
+
get: function () { return chunkH72U2MNG_cjs.getExclusionReason; }
|
|
1155
1091
|
});
|
|
1156
1092
|
Object.defineProperty(exports, "getTargetStateTransition", {
|
|
1157
1093
|
enumerable: true,
|
|
1158
|
-
get: function () { return
|
|
1094
|
+
get: function () { return chunkH72U2MNG_cjs.getTargetStateTransition; }
|
|
1159
1095
|
});
|
|
1160
1096
|
Object.defineProperty(exports, "inspectRequest", {
|
|
1161
1097
|
enumerable: true,
|
|
1162
|
-
get: function () { return
|
|
1098
|
+
get: function () { return chunkH72U2MNG_cjs.inspectRequest; }
|
|
1163
1099
|
});
|
|
1164
1100
|
Object.defineProperty(exports, "isRetryable", {
|
|
1165
1101
|
enumerable: true,
|
|
1166
|
-
get: function () { return
|
|
1102
|
+
get: function () { return chunkH72U2MNG_cjs.isRetryable; }
|
|
1167
1103
|
});
|
|
1168
1104
|
Object.defineProperty(exports, "listProfiles", {
|
|
1169
1105
|
enumerable: true,
|
|
1170
|
-
get: function () { return
|
|
1106
|
+
get: function () { return chunkH72U2MNG_cjs.listProfiles; }
|
|
1171
1107
|
});
|
|
1172
1108
|
Object.defineProperty(exports, "listTargets", {
|
|
1173
1109
|
enumerable: true,
|
|
1174
|
-
get: function () { return
|
|
1110
|
+
get: function () { return chunkH72U2MNG_cjs.listTargets; }
|
|
1175
1111
|
});
|
|
1176
1112
|
Object.defineProperty(exports, "loadProfiles", {
|
|
1177
1113
|
enumerable: true,
|
|
1178
|
-
get: function () { return
|
|
1114
|
+
get: function () { return chunkH72U2MNG_cjs.loadProfiles; }
|
|
1179
1115
|
});
|
|
1180
1116
|
Object.defineProperty(exports, "nextProfileId", {
|
|
1181
1117
|
enumerable: true,
|
|
1182
|
-
get: function () { return
|
|
1118
|
+
get: function () { return chunkH72U2MNG_cjs.nextProfileId; }
|
|
1183
1119
|
});
|
|
1184
1120
|
Object.defineProperty(exports, "normalizeLatency", {
|
|
1185
1121
|
enumerable: true,
|
|
1186
|
-
get: function () { return
|
|
1122
|
+
get: function () { return chunkH72U2MNG_cjs.normalizeLatency; }
|
|
1187
1123
|
});
|
|
1188
1124
|
Object.defineProperty(exports, "pauseTarget", {
|
|
1189
1125
|
enumerable: true,
|
|
1190
|
-
get: function () { return
|
|
1126
|
+
get: function () { return chunkH72U2MNG_cjs.pauseTarget; }
|
|
1191
1127
|
});
|
|
1192
1128
|
Object.defineProperty(exports, "reloadConfig", {
|
|
1193
1129
|
enumerable: true,
|
|
1194
|
-
get: function () { return
|
|
1130
|
+
get: function () { return chunkH72U2MNG_cjs.reloadConfig; }
|
|
1195
1131
|
});
|
|
1196
1132
|
Object.defineProperty(exports, "removeProfile", {
|
|
1197
1133
|
enumerable: true,
|
|
1198
|
-
get: function () { return
|
|
1134
|
+
get: function () { return chunkH72U2MNG_cjs.removeProfile; }
|
|
1199
1135
|
});
|
|
1200
1136
|
Object.defineProperty(exports, "resumeTarget", {
|
|
1201
1137
|
enumerable: true,
|
|
1202
|
-
get: function () { return
|
|
1138
|
+
get: function () { return chunkH72U2MNG_cjs.resumeTarget; }
|
|
1203
1139
|
});
|
|
1204
1140
|
Object.defineProperty(exports, "saveProfiles", {
|
|
1205
1141
|
enumerable: true,
|
|
1206
|
-
get: function () { return
|
|
1142
|
+
get: function () { return chunkH72U2MNG_cjs.saveProfiles; }
|
|
1207
1143
|
});
|
|
1208
1144
|
Object.defineProperty(exports, "selectTarget", {
|
|
1209
1145
|
enumerable: true,
|
|
1210
|
-
get: function () { return
|
|
1146
|
+
get: function () { return chunkH72U2MNG_cjs.selectTarget; }
|
|
1147
|
+
});
|
|
1148
|
+
Object.defineProperty(exports, "switchProfile", {
|
|
1149
|
+
enumerable: true,
|
|
1150
|
+
get: function () { return chunkH72U2MNG_cjs.switchProfile; }
|
|
1151
|
+
});
|
|
1152
|
+
Object.defineProperty(exports, "switchToNextProfile", {
|
|
1153
|
+
enumerable: true,
|
|
1154
|
+
get: function () { return chunkH72U2MNG_cjs.switchToNextProfile; }
|
|
1211
1155
|
});
|
|
1212
1156
|
Object.defineProperty(exports, "updateHealthScore", {
|
|
1213
1157
|
enumerable: true,
|
|
1214
|
-
get: function () { return
|
|
1158
|
+
get: function () { return chunkH72U2MNG_cjs.updateHealthScore; }
|
|
1215
1159
|
});
|
|
1216
1160
|
Object.defineProperty(exports, "updateLatencyEma", {
|
|
1217
1161
|
enumerable: true,
|
|
1218
|
-
get: function () { return
|
|
1162
|
+
get: function () { return chunkH72U2MNG_cjs.updateLatencyEma; }
|
|
1219
1163
|
});
|
|
1220
1164
|
Object.defineProperty(exports, "validateConfig", {
|
|
1221
1165
|
enumerable: true,
|
|
1222
|
-
get: function () { return
|
|
1166
|
+
get: function () { return chunkH72U2MNG_cjs.validateConfig; }
|
|
1223
1167
|
});
|
|
1224
1168
|
exports.HEURISTIC_PATTERNS = HEURISTIC_PATTERNS;
|
|
1225
1169
|
exports.PROVIDER_PATTERNS = PROVIDER_PATTERNS;
|
|
@@ -1228,7 +1172,6 @@ exports.classify = classify;
|
|
|
1228
1172
|
exports.createAuditCollector = createAuditCollector;
|
|
1229
1173
|
exports.createExecutionOrchestrator = createExecutionOrchestrator;
|
|
1230
1174
|
exports.createModeAdapter = createModeAdapter;
|
|
1231
|
-
exports.createOperatorTools = createOperatorTools;
|
|
1232
1175
|
exports.createStreamBuffer = createStreamBuffer;
|
|
1233
1176
|
exports.createStreamStitcher = createStreamStitcher;
|
|
1234
1177
|
exports.detectDeploymentMode = detectDeploymentMode;
|
package/dist/index.d.cts
CHANGED
|
@@ -1989,6 +1989,48 @@ interface AuthWatcherOptions {
|
|
|
1989
1989
|
*/
|
|
1990
1990
|
declare const createAuthWatcher: (options?: AuthWatcherOptions) => AuthWatcher;
|
|
1991
1991
|
|
|
1992
|
+
/**
|
|
1993
|
+
* Profile switcher — writes the selected profile's credentials into
|
|
1994
|
+
* OpenCode's auth.json so the next request (or new window) picks them up.
|
|
1995
|
+
*
|
|
1996
|
+
* Also updates .active-openai-auth when switching between auth-work* files.
|
|
1997
|
+
*/
|
|
1998
|
+
|
|
1999
|
+
/** Result of a profile switch attempt. */
|
|
2000
|
+
interface SwitchResult {
|
|
2001
|
+
readonly success: boolean;
|
|
2002
|
+
readonly from?: string;
|
|
2003
|
+
readonly to: string;
|
|
2004
|
+
readonly reason?: string;
|
|
2005
|
+
}
|
|
2006
|
+
/**
|
|
2007
|
+
* Switches the active profile by writing its credentials to auth.json.
|
|
2008
|
+
*
|
|
2009
|
+
* 1. Reads the target profile from profiles.json
|
|
2010
|
+
* 2. Writes its credentials to auth.json (atomic: tmp + rename)
|
|
2011
|
+
* 3. Updates .active-openai-auth if applicable
|
|
2012
|
+
*/
|
|
2013
|
+
declare const switchProfile: (options: {
|
|
2014
|
+
readonly targetProfileId: string;
|
|
2015
|
+
readonly profilesPath?: string;
|
|
2016
|
+
readonly authJsonPath?: string;
|
|
2017
|
+
readonly logger?: pino.Logger;
|
|
2018
|
+
}) => Promise<SwitchResult>;
|
|
2019
|
+
/**
|
|
2020
|
+
* Picks the next healthy profile for a provider and switches to it.
|
|
2021
|
+
*
|
|
2022
|
+
* Selection strategy: round-robin among profiles that are NOT the current one.
|
|
2023
|
+
* The caller (plugin.ts) provides health data to skip unhealthy profiles.
|
|
2024
|
+
*/
|
|
2025
|
+
declare const switchToNextProfile: (options: {
|
|
2026
|
+
readonly provider: string;
|
|
2027
|
+
readonly currentProfileId?: string;
|
|
2028
|
+
readonly excludeProfileIds?: ReadonlyArray<string>;
|
|
2029
|
+
readonly profilesPath?: string;
|
|
2030
|
+
readonly authJsonPath?: string;
|
|
2031
|
+
readonly logger?: pino.Logger;
|
|
2032
|
+
}) => Promise<SwitchResult>;
|
|
2033
|
+
|
|
1992
2034
|
/**
|
|
1993
2035
|
* OpenCode plugin tool definitions for profile management.
|
|
1994
2036
|
*
|
|
@@ -2018,4 +2060,4 @@ interface ProfileToolsOptions {
|
|
|
2018
2060
|
*/
|
|
2019
2061
|
declare const createProfileTools: (options?: ProfileToolsOptions) => ProfileTools;
|
|
2020
2062
|
|
|
2021
|
-
export { ADMISSION_RESULTS, type AdapterRequest, type AdapterResult, type AdmissionConfig, type AdmissionContext, type AdmissionController, type AdmissionDecision, type AdmissionResult, type ApiKeyCredential, type AttemptFn, type AuditCollector, type AuditEvent, type AuditLoggerOptions, type AuthCredential, type AuthResult, type AuthWatcher, type AuthWatcherOptions, type BackoffConfig, BackoffConfigSchema, type BackoffParams, type CircuitBreaker, type CircuitBreakerConfig, type ClassificationResult, type ConcurrencyTrackerApi, type ConfigDiagnostic, type ConfigDiff, type ConfigRef, ConfigValidationError, type ContinuationMode, type CooldownManager, type CorrelationId, DEFAULT_ALPHA, DEFAULT_BACKOFF_BASE_MS, DEFAULT_BACKOFF_JITTER, DEFAULT_BACKOFF_MAX_MS, DEFAULT_BACKOFF_MULTIPLIER, DEFAULT_BACKOFF_PARAMS, DEFAULT_FAILOVER_BUDGET, DEFAULT_RETRY, DEFAULT_RETRY_BUDGET, DEFAULT_TIMEOUT_MS, type DeploymentMode, DualBreaker, EXCLUSION_REASONS, type ErrorClass, ErrorClassSchema, type ExclusionReason, type ExecutionDeps, type ExecutionOrchestrator, type ExecutionProvenance, type ExecutionResult, type FailoverAttempt, type FailoverDeps, type FailoverOrchestrator, type FailoverRegistry, type FailoverResult, HEURISTIC_PATTERNS, INITIAL_HEALTH_SCORE, type InspectResult, type ListTargetsResult, type ModeAdapter, type ModeCapabilities, type NormalizedSignal, type OAuthCredential, type OperatorDeps, type OperatorTools, PROVIDER_PATTERNS, type ProfileEntry, type ProfileStore, type ProfileTools, type ProfileToolsOptions, type ProviderConfigLike, REDACT_PATHS, type RegistrySnapshot, type ReloadResult, type RequestTraceBuffer, type RequestTraceEntry, type RetryDecision, type RetryPolicy, type RoutingEventMap, type RoutingWeights, type SegmentProvenance, type SelectionRecord, type SignalFidelity, type StitchedOutput, type StreamBuffer, type StreamChunk, type StreamStitcher, type SwitcherConfig, SwitcherConfigSchema, TARGET_STATES, TEMPORAL_QUOTA_PATTERN, type TargetActionResult, type TargetConfig, TargetConfigSchema, type TargetEntry, TargetRegistry, type TargetState, type TargetView, addProfile, applyConfigDiff, checkHardRejects, classify, computeBackoffMs, computeConfigDiff, computeCooldownMs, computeScore, createAdmissionController, createAuditCollector, createAuditLogger, createAuthWatcher, createCircuitBreaker, createConcurrencyTracker, createCooldownManager, createExecutionOrchestrator, createFailoverOrchestrator, createLogSubscriber, createModeAdapter, createOperatorTools, createProfileTools, createRegistry, createRequestLogger, createRequestTraceBuffer, createRetryPolicy, createRoutingEventBus, createStreamBuffer, createStreamStitcher, detectDeploymentMode, determineContinuationMode, directSignalFromResponse, disableTarget, discoverTargets, discoverTargetsFromProfiles, drainTarget, extractRetryAfterMs, generateCorrelationId, getExclusionReason, getModeCapabilities, getSignalFidelity, getTargetStateTransition, heuristicSignalFromEvent, inspectRequest, isRetryable, listProfiles, listTargets, loadProfiles, nextProfileId, normalizeLatency, pauseTarget, reloadConfig, removeProfile, resumeTarget, saveProfiles, selectTarget, updateHealthScore, updateLatencyEma, validateBearerToken, validateConfig };
|
|
2063
|
+
export { ADMISSION_RESULTS, type AdapterRequest, type AdapterResult, type AdmissionConfig, type AdmissionContext, type AdmissionController, type AdmissionDecision, type AdmissionResult, type ApiKeyCredential, type AttemptFn, type AuditCollector, type AuditEvent, type AuditLoggerOptions, type AuthCredential, type AuthResult, type AuthWatcher, type AuthWatcherOptions, type BackoffConfig, BackoffConfigSchema, type BackoffParams, type CircuitBreaker, type CircuitBreakerConfig, type ClassificationResult, type ConcurrencyTrackerApi, type ConfigDiagnostic, type ConfigDiff, type ConfigRef, ConfigValidationError, type ContinuationMode, type CooldownManager, type CorrelationId, DEFAULT_ALPHA, DEFAULT_BACKOFF_BASE_MS, DEFAULT_BACKOFF_JITTER, DEFAULT_BACKOFF_MAX_MS, DEFAULT_BACKOFF_MULTIPLIER, DEFAULT_BACKOFF_PARAMS, DEFAULT_FAILOVER_BUDGET, DEFAULT_RETRY, DEFAULT_RETRY_BUDGET, DEFAULT_TIMEOUT_MS, type DeploymentMode, DualBreaker, EXCLUSION_REASONS, type ErrorClass, ErrorClassSchema, type ExclusionReason, type ExecutionDeps, type ExecutionOrchestrator, type ExecutionProvenance, type ExecutionResult, type FailoverAttempt, type FailoverDeps, type FailoverOrchestrator, type FailoverRegistry, type FailoverResult, HEURISTIC_PATTERNS, INITIAL_HEALTH_SCORE, type InspectResult, type ListTargetsResult, type ModeAdapter, type ModeCapabilities, type NormalizedSignal, type OAuthCredential, type OperatorDeps, type OperatorTools, PROVIDER_PATTERNS, type ProfileEntry, type ProfileStore, type ProfileTools, type ProfileToolsOptions, type ProviderConfigLike, REDACT_PATHS, type RegistrySnapshot, type ReloadResult, type RequestTraceBuffer, type RequestTraceEntry, type RetryDecision, type RetryPolicy, type RoutingEventMap, type RoutingWeights, type SegmentProvenance, type SelectionRecord, type SignalFidelity, type StitchedOutput, type StreamBuffer, type StreamChunk, type StreamStitcher, type SwitchResult, type SwitcherConfig, SwitcherConfigSchema, TARGET_STATES, TEMPORAL_QUOTA_PATTERN, type TargetActionResult, type TargetConfig, TargetConfigSchema, type TargetEntry, TargetRegistry, type TargetState, type TargetView, addProfile, applyConfigDiff, checkHardRejects, classify, computeBackoffMs, computeConfigDiff, computeCooldownMs, computeScore, createAdmissionController, createAuditCollector, createAuditLogger, createAuthWatcher, createCircuitBreaker, createConcurrencyTracker, createCooldownManager, createExecutionOrchestrator, createFailoverOrchestrator, createLogSubscriber, createModeAdapter, createOperatorTools, createProfileTools, createRegistry, createRequestLogger, createRequestTraceBuffer, createRetryPolicy, createRoutingEventBus, createStreamBuffer, createStreamStitcher, detectDeploymentMode, determineContinuationMode, directSignalFromResponse, disableTarget, discoverTargets, discoverTargetsFromProfiles, drainTarget, extractRetryAfterMs, generateCorrelationId, getExclusionReason, getModeCapabilities, getSignalFidelity, getTargetStateTransition, heuristicSignalFromEvent, inspectRequest, isRetryable, listProfiles, listTargets, loadProfiles, nextProfileId, normalizeLatency, pauseTarget, reloadConfig, removeProfile, resumeTarget, saveProfiles, selectTarget, switchProfile, switchToNextProfile, updateHealthScore, updateLatencyEma, validateBearerToken, validateConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1989,6 +1989,48 @@ interface AuthWatcherOptions {
|
|
|
1989
1989
|
*/
|
|
1990
1990
|
declare const createAuthWatcher: (options?: AuthWatcherOptions) => AuthWatcher;
|
|
1991
1991
|
|
|
1992
|
+
/**
|
|
1993
|
+
* Profile switcher — writes the selected profile's credentials into
|
|
1994
|
+
* OpenCode's auth.json so the next request (or new window) picks them up.
|
|
1995
|
+
*
|
|
1996
|
+
* Also updates .active-openai-auth when switching between auth-work* files.
|
|
1997
|
+
*/
|
|
1998
|
+
|
|
1999
|
+
/** Result of a profile switch attempt. */
|
|
2000
|
+
interface SwitchResult {
|
|
2001
|
+
readonly success: boolean;
|
|
2002
|
+
readonly from?: string;
|
|
2003
|
+
readonly to: string;
|
|
2004
|
+
readonly reason?: string;
|
|
2005
|
+
}
|
|
2006
|
+
/**
|
|
2007
|
+
* Switches the active profile by writing its credentials to auth.json.
|
|
2008
|
+
*
|
|
2009
|
+
* 1. Reads the target profile from profiles.json
|
|
2010
|
+
* 2. Writes its credentials to auth.json (atomic: tmp + rename)
|
|
2011
|
+
* 3. Updates .active-openai-auth if applicable
|
|
2012
|
+
*/
|
|
2013
|
+
declare const switchProfile: (options: {
|
|
2014
|
+
readonly targetProfileId: string;
|
|
2015
|
+
readonly profilesPath?: string;
|
|
2016
|
+
readonly authJsonPath?: string;
|
|
2017
|
+
readonly logger?: pino.Logger;
|
|
2018
|
+
}) => Promise<SwitchResult>;
|
|
2019
|
+
/**
|
|
2020
|
+
* Picks the next healthy profile for a provider and switches to it.
|
|
2021
|
+
*
|
|
2022
|
+
* Selection strategy: round-robin among profiles that are NOT the current one.
|
|
2023
|
+
* The caller (plugin.ts) provides health data to skip unhealthy profiles.
|
|
2024
|
+
*/
|
|
2025
|
+
declare const switchToNextProfile: (options: {
|
|
2026
|
+
readonly provider: string;
|
|
2027
|
+
readonly currentProfileId?: string;
|
|
2028
|
+
readonly excludeProfileIds?: ReadonlyArray<string>;
|
|
2029
|
+
readonly profilesPath?: string;
|
|
2030
|
+
readonly authJsonPath?: string;
|
|
2031
|
+
readonly logger?: pino.Logger;
|
|
2032
|
+
}) => Promise<SwitchResult>;
|
|
2033
|
+
|
|
1992
2034
|
/**
|
|
1993
2035
|
* OpenCode plugin tool definitions for profile management.
|
|
1994
2036
|
*
|
|
@@ -2018,4 +2060,4 @@ interface ProfileToolsOptions {
|
|
|
2018
2060
|
*/
|
|
2019
2061
|
declare const createProfileTools: (options?: ProfileToolsOptions) => ProfileTools;
|
|
2020
2062
|
|
|
2021
|
-
export { ADMISSION_RESULTS, type AdapterRequest, type AdapterResult, type AdmissionConfig, type AdmissionContext, type AdmissionController, type AdmissionDecision, type AdmissionResult, type ApiKeyCredential, type AttemptFn, type AuditCollector, type AuditEvent, type AuditLoggerOptions, type AuthCredential, type AuthResult, type AuthWatcher, type AuthWatcherOptions, type BackoffConfig, BackoffConfigSchema, type BackoffParams, type CircuitBreaker, type CircuitBreakerConfig, type ClassificationResult, type ConcurrencyTrackerApi, type ConfigDiagnostic, type ConfigDiff, type ConfigRef, ConfigValidationError, type ContinuationMode, type CooldownManager, type CorrelationId, DEFAULT_ALPHA, DEFAULT_BACKOFF_BASE_MS, DEFAULT_BACKOFF_JITTER, DEFAULT_BACKOFF_MAX_MS, DEFAULT_BACKOFF_MULTIPLIER, DEFAULT_BACKOFF_PARAMS, DEFAULT_FAILOVER_BUDGET, DEFAULT_RETRY, DEFAULT_RETRY_BUDGET, DEFAULT_TIMEOUT_MS, type DeploymentMode, DualBreaker, EXCLUSION_REASONS, type ErrorClass, ErrorClassSchema, type ExclusionReason, type ExecutionDeps, type ExecutionOrchestrator, type ExecutionProvenance, type ExecutionResult, type FailoverAttempt, type FailoverDeps, type FailoverOrchestrator, type FailoverRegistry, type FailoverResult, HEURISTIC_PATTERNS, INITIAL_HEALTH_SCORE, type InspectResult, type ListTargetsResult, type ModeAdapter, type ModeCapabilities, type NormalizedSignal, type OAuthCredential, type OperatorDeps, type OperatorTools, PROVIDER_PATTERNS, type ProfileEntry, type ProfileStore, type ProfileTools, type ProfileToolsOptions, type ProviderConfigLike, REDACT_PATHS, type RegistrySnapshot, type ReloadResult, type RequestTraceBuffer, type RequestTraceEntry, type RetryDecision, type RetryPolicy, type RoutingEventMap, type RoutingWeights, type SegmentProvenance, type SelectionRecord, type SignalFidelity, type StitchedOutput, type StreamBuffer, type StreamChunk, type StreamStitcher, type SwitcherConfig, SwitcherConfigSchema, TARGET_STATES, TEMPORAL_QUOTA_PATTERN, type TargetActionResult, type TargetConfig, TargetConfigSchema, type TargetEntry, TargetRegistry, type TargetState, type TargetView, addProfile, applyConfigDiff, checkHardRejects, classify, computeBackoffMs, computeConfigDiff, computeCooldownMs, computeScore, createAdmissionController, createAuditCollector, createAuditLogger, createAuthWatcher, createCircuitBreaker, createConcurrencyTracker, createCooldownManager, createExecutionOrchestrator, createFailoverOrchestrator, createLogSubscriber, createModeAdapter, createOperatorTools, createProfileTools, createRegistry, createRequestLogger, createRequestTraceBuffer, createRetryPolicy, createRoutingEventBus, createStreamBuffer, createStreamStitcher, detectDeploymentMode, determineContinuationMode, directSignalFromResponse, disableTarget, discoverTargets, discoverTargetsFromProfiles, drainTarget, extractRetryAfterMs, generateCorrelationId, getExclusionReason, getModeCapabilities, getSignalFidelity, getTargetStateTransition, heuristicSignalFromEvent, inspectRequest, isRetryable, listProfiles, listTargets, loadProfiles, nextProfileId, normalizeLatency, pauseTarget, reloadConfig, removeProfile, resumeTarget, saveProfiles, selectTarget, updateHealthScore, updateLatencyEma, validateBearerToken, validateConfig };
|
|
2063
|
+
export { ADMISSION_RESULTS, type AdapterRequest, type AdapterResult, type AdmissionConfig, type AdmissionContext, type AdmissionController, type AdmissionDecision, type AdmissionResult, type ApiKeyCredential, type AttemptFn, type AuditCollector, type AuditEvent, type AuditLoggerOptions, type AuthCredential, type AuthResult, type AuthWatcher, type AuthWatcherOptions, type BackoffConfig, BackoffConfigSchema, type BackoffParams, type CircuitBreaker, type CircuitBreakerConfig, type ClassificationResult, type ConcurrencyTrackerApi, type ConfigDiagnostic, type ConfigDiff, type ConfigRef, ConfigValidationError, type ContinuationMode, type CooldownManager, type CorrelationId, DEFAULT_ALPHA, DEFAULT_BACKOFF_BASE_MS, DEFAULT_BACKOFF_JITTER, DEFAULT_BACKOFF_MAX_MS, DEFAULT_BACKOFF_MULTIPLIER, DEFAULT_BACKOFF_PARAMS, DEFAULT_FAILOVER_BUDGET, DEFAULT_RETRY, DEFAULT_RETRY_BUDGET, DEFAULT_TIMEOUT_MS, type DeploymentMode, DualBreaker, EXCLUSION_REASONS, type ErrorClass, ErrorClassSchema, type ExclusionReason, type ExecutionDeps, type ExecutionOrchestrator, type ExecutionProvenance, type ExecutionResult, type FailoverAttempt, type FailoverDeps, type FailoverOrchestrator, type FailoverRegistry, type FailoverResult, HEURISTIC_PATTERNS, INITIAL_HEALTH_SCORE, type InspectResult, type ListTargetsResult, type ModeAdapter, type ModeCapabilities, type NormalizedSignal, type OAuthCredential, type OperatorDeps, type OperatorTools, PROVIDER_PATTERNS, type ProfileEntry, type ProfileStore, type ProfileTools, type ProfileToolsOptions, type ProviderConfigLike, REDACT_PATHS, type RegistrySnapshot, type ReloadResult, type RequestTraceBuffer, type RequestTraceEntry, type RetryDecision, type RetryPolicy, type RoutingEventMap, type RoutingWeights, type SegmentProvenance, type SelectionRecord, type SignalFidelity, type StitchedOutput, type StreamBuffer, type StreamChunk, type StreamStitcher, type SwitchResult, type SwitcherConfig, SwitcherConfigSchema, TARGET_STATES, TEMPORAL_QUOTA_PATTERN, type TargetActionResult, type TargetConfig, TargetConfigSchema, type TargetEntry, TargetRegistry, type TargetState, type TargetView, addProfile, applyConfigDiff, checkHardRejects, classify, computeBackoffMs, computeConfigDiff, computeCooldownMs, computeScore, createAdmissionController, createAuditCollector, createAuditLogger, createAuthWatcher, createCircuitBreaker, createConcurrencyTracker, createCooldownManager, createExecutionOrchestrator, createFailoverOrchestrator, createLogSubscriber, createModeAdapter, createOperatorTools, createProfileTools, createRegistry, createRequestLogger, createRequestTraceBuffer, createRetryPolicy, createRoutingEventBus, createStreamBuffer, createStreamStitcher, detectDeploymentMode, determineContinuationMode, directSignalFromResponse, disableTarget, discoverTargets, discoverTargetsFromProfiles, drainTarget, extractRetryAfterMs, generateCorrelationId, getExclusionReason, getModeCapabilities, getSignalFidelity, getTargetStateTransition, heuristicSignalFromEvent, inspectRequest, isRetryable, listProfiles, listTargets, loadProfiles, nextProfileId, normalizeLatency, pauseTarget, reloadConfig, removeProfile, resumeTarget, saveProfiles, selectTarget, switchProfile, switchToNextProfile, updateHealthScore, updateLatencyEma, validateBearerToken, validateConfig };
|