@the-open-engine/zeroshot 6.35.1 → 6.35.2
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/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@the-open-engine/zeroshot",
|
|
3
|
-
"version": "6.35.
|
|
3
|
+
"version": "6.35.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@the-open-engine/zeroshot",
|
|
9
|
-
"version": "6.35.
|
|
9
|
+
"version": "6.35.2",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED
|
@@ -892,7 +892,6 @@ ${'='.repeat(80)}`);
|
|
|
892
892
|
unsupportedCapability,
|
|
893
893
|
structuredOutputInvalid,
|
|
894
894
|
});
|
|
895
|
-
|
|
896
895
|
// Publish error to message bus for visibility in logs
|
|
897
896
|
agent._publish({
|
|
898
897
|
topic: 'AGENT_ERROR',
|
|
@@ -905,6 +904,7 @@ ${'='.repeat(80)}`);
|
|
|
905
904
|
hookFailure: error?.hookFailure === true,
|
|
906
905
|
restartExhausted: error?.restartExhausted === true,
|
|
907
906
|
terminationExhausted: error?.terminationExhausted === true,
|
|
907
|
+
retryBudgetExhausted: true,
|
|
908
908
|
hookRetries: error?.hookRetries ?? undefined,
|
|
909
909
|
originalHookError: error?.originalHookError ?? undefined,
|
|
910
910
|
agent: agent.id,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
// Validators publish a rejection when their task exhausts retries. Every other named role can
|
|
4
|
+
// execute provider work, including user-defined and orchestrator roles, so exhaustion must
|
|
5
|
+
// terminalize the cluster by default instead of requiring this policy to know each future role.
|
|
6
|
+
const NON_TERMINAL_AGENT_ROLES = new Set(['validator']);
|
|
7
|
+
|
|
8
|
+
function isCriticalAgent(agent) {
|
|
9
|
+
if (agent?.id === 'consensus-coordinator') return true;
|
|
10
|
+
return (
|
|
11
|
+
typeof agent?.role === 'string' &&
|
|
12
|
+
agent.role.length > 0 &&
|
|
13
|
+
!NON_TERMINAL_AGENT_ROLES.has(agent.role)
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
module.exports = { isCriticalAgent };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
|
|
3
3
|
const { getProvider } = require('../providers');
|
|
4
|
+
const { isCriticalAgent } = require('./critical-agent-policy');
|
|
4
5
|
const { extractCliFailure } = require('./output-extraction');
|
|
5
6
|
|
|
6
7
|
function categoryForProviderFailure(error, classification) {
|
|
@@ -120,10 +121,7 @@ function publishCriticalFailure({
|
|
|
120
121
|
unsupportedCapability ||
|
|
121
122
|
error?.vertexModelError ||
|
|
122
123
|
error?.terminationExhausted;
|
|
123
|
-
const critical =
|
|
124
|
-
agent.role === 'implementation' ||
|
|
125
|
-
agent.role === 'coordinator' ||
|
|
126
|
-
agent.id === 'consensus-coordinator';
|
|
124
|
+
const critical = isCriticalAgent(agent);
|
|
127
125
|
if (!critical || specific) return worker;
|
|
128
126
|
|
|
129
127
|
agent._publish({
|
package/src/orchestrator.js
CHANGED
|
@@ -60,6 +60,7 @@ const {
|
|
|
60
60
|
normalizeProviderSession,
|
|
61
61
|
restoreAgentProviderSession,
|
|
62
62
|
} = require('./agent/provider-session');
|
|
63
|
+
const { isCriticalAgent } = require('./agent/critical-agent-policy');
|
|
63
64
|
const {
|
|
64
65
|
commandProofsToQualityGates,
|
|
65
66
|
mergeCommandProofs,
|
|
@@ -1582,6 +1583,7 @@ class Orchestrator {
|
|
|
1582
1583
|
const attempts = message.content?.data?.attempts || 1;
|
|
1583
1584
|
const hookFailure = message.content?.data?.hookFailure === true;
|
|
1584
1585
|
const restartExhausted = message.content?.data?.restartExhausted === true;
|
|
1586
|
+
const retryBudgetExhausted = message.content?.data?.retryBudgetExhausted === true;
|
|
1585
1587
|
const durableClusterFailure = this._findCurrentRunClusterFailure(
|
|
1586
1588
|
messageBus,
|
|
1587
1589
|
clusterId,
|
|
@@ -1590,14 +1592,14 @@ class Orchestrator {
|
|
|
1590
1592
|
|
|
1591
1593
|
await this._saveClusters();
|
|
1592
1594
|
|
|
1593
|
-
const shouldStopForRole =
|
|
1594
|
-
|
|
1595
|
-
agentRole
|
|
1596
|
-
|
|
1595
|
+
const shouldStopForRole = isCriticalAgent({
|
|
1596
|
+
id: message.sender,
|
|
1597
|
+
role: agentRole,
|
|
1598
|
+
});
|
|
1597
1599
|
const shouldStop =
|
|
1598
1600
|
!durableClusterFailure &&
|
|
1599
1601
|
shouldStopForRole &&
|
|
1600
|
-
(hookFailure || restartExhausted ||
|
|
1602
|
+
(hookFailure || restartExhausted || retryBudgetExhausted);
|
|
1601
1603
|
|
|
1602
1604
|
if (shouldStop) {
|
|
1603
1605
|
this._log(`\n${'='.repeat(80)}`);
|
|
@@ -1607,6 +1609,7 @@ class Orchestrator {
|
|
|
1607
1609
|
`${message.sender} (${agentRole || 'unknown role'}) failed` +
|
|
1608
1610
|
(hookFailure ? ` (hookFailure=true)` : ``) +
|
|
1609
1611
|
(restartExhausted ? ` (restartExhausted=true)` : ``) +
|
|
1612
|
+
(retryBudgetExhausted ? ` (retryBudgetExhausted=true)` : ``) +
|
|
1610
1613
|
` after ${attempts} attempts`
|
|
1611
1614
|
);
|
|
1612
1615
|
this._log(`Error: ${message.content?.data?.error || 'unknown'}`);
|