@runtypelabs/sdk 1.13.1 → 1.13.3
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/index.cjs +5 -13
- package/dist/index.mjs +5 -13
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6067,12 +6067,6 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
6067
6067
|
if ((state.consecutiveBlockedVerificationSessions || 0) >= 2 && state.verificationRequired) {
|
|
6068
6068
|
state.verificationRequired = false;
|
|
6069
6069
|
state.lastVerificationPassed = true;
|
|
6070
|
-
if (!state.planWritten) {
|
|
6071
|
-
state.planWritten = true;
|
|
6072
|
-
}
|
|
6073
|
-
if (!state.bestCandidateVerified) {
|
|
6074
|
-
state.bestCandidateVerified = true;
|
|
6075
|
-
}
|
|
6076
6070
|
}
|
|
6077
6071
|
const modelKey = options.model || "default";
|
|
6078
6072
|
if (!state.costByModel) state.costByModel = {};
|
|
@@ -6133,12 +6127,6 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
6133
6127
|
if ((state.consecutiveBlockedVerificationSessions || 0) >= 2) {
|
|
6134
6128
|
state.verificationRequired = false;
|
|
6135
6129
|
state.lastVerificationPassed = true;
|
|
6136
|
-
if (!state.planWritten) {
|
|
6137
|
-
state.planWritten = true;
|
|
6138
|
-
}
|
|
6139
|
-
if (!state.bestCandidateVerified) {
|
|
6140
|
-
state.bestCandidateVerified = true;
|
|
6141
|
-
}
|
|
6142
6130
|
}
|
|
6143
6131
|
}
|
|
6144
6132
|
} else {
|
|
@@ -6151,7 +6139,11 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
6151
6139
|
state.consecutiveEmptySessions = (state.consecutiveEmptySessions || 0) + 1;
|
|
6152
6140
|
}
|
|
6153
6141
|
if (sessionResult.stopReason === "complete" && !detectedTaskCompletion) {
|
|
6154
|
-
|
|
6142
|
+
const currentPhase = workflow.phases.find((p) => p.name === state.workflowPhase);
|
|
6143
|
+
const gatesSatisfied = currentPhase?.canAcceptCompletion ? currentPhase.canAcceptCompletion(state, sessionTrace) : true;
|
|
6144
|
+
if (gatesSatisfied) {
|
|
6145
|
+
state.status = "complete";
|
|
6146
|
+
}
|
|
6155
6147
|
} else if (sessionResult.stopReason === "error") {
|
|
6156
6148
|
if (_AgentsEndpoint.isRetryableSessionError(sessionResult.error) && consecutiveServerNetworkErrors < maxServerNetworkRetries) {
|
|
6157
6149
|
consecutiveServerNetworkErrors++;
|
package/dist/index.mjs
CHANGED
|
@@ -5997,12 +5997,6 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
5997
5997
|
if ((state.consecutiveBlockedVerificationSessions || 0) >= 2 && state.verificationRequired) {
|
|
5998
5998
|
state.verificationRequired = false;
|
|
5999
5999
|
state.lastVerificationPassed = true;
|
|
6000
|
-
if (!state.planWritten) {
|
|
6001
|
-
state.planWritten = true;
|
|
6002
|
-
}
|
|
6003
|
-
if (!state.bestCandidateVerified) {
|
|
6004
|
-
state.bestCandidateVerified = true;
|
|
6005
|
-
}
|
|
6006
6000
|
}
|
|
6007
6001
|
const modelKey = options.model || "default";
|
|
6008
6002
|
if (!state.costByModel) state.costByModel = {};
|
|
@@ -6063,12 +6057,6 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
6063
6057
|
if ((state.consecutiveBlockedVerificationSessions || 0) >= 2) {
|
|
6064
6058
|
state.verificationRequired = false;
|
|
6065
6059
|
state.lastVerificationPassed = true;
|
|
6066
|
-
if (!state.planWritten) {
|
|
6067
|
-
state.planWritten = true;
|
|
6068
|
-
}
|
|
6069
|
-
if (!state.bestCandidateVerified) {
|
|
6070
|
-
state.bestCandidateVerified = true;
|
|
6071
|
-
}
|
|
6072
6060
|
}
|
|
6073
6061
|
}
|
|
6074
6062
|
} else {
|
|
@@ -6081,7 +6069,11 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
6081
6069
|
state.consecutiveEmptySessions = (state.consecutiveEmptySessions || 0) + 1;
|
|
6082
6070
|
}
|
|
6083
6071
|
if (sessionResult.stopReason === "complete" && !detectedTaskCompletion) {
|
|
6084
|
-
|
|
6072
|
+
const currentPhase = workflow.phases.find((p) => p.name === state.workflowPhase);
|
|
6073
|
+
const gatesSatisfied = currentPhase?.canAcceptCompletion ? currentPhase.canAcceptCompletion(state, sessionTrace) : true;
|
|
6074
|
+
if (gatesSatisfied) {
|
|
6075
|
+
state.status = "complete";
|
|
6076
|
+
}
|
|
6085
6077
|
} else if (sessionResult.stopReason === "error") {
|
|
6086
6078
|
if (_AgentsEndpoint.isRetryableSessionError(sessionResult.error) && consecutiveServerNetworkErrors < maxServerNetworkRetries) {
|
|
6087
6079
|
consecutiveServerNetworkErrors++;
|
package/package.json
CHANGED