kubeagent 0.1.17 → 0.1.18
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/diagnoser/index.js +9 -1
- package/package.json +1 -1
package/dist/diagnoser/index.js
CHANGED
|
@@ -149,13 +149,21 @@ If it requires a risky action (rollback, delete, scale to zero), propose it but
|
|
|
149
149
|
...(options?.safeActions ?? []),
|
|
150
150
|
]);
|
|
151
151
|
let appliedAction;
|
|
152
|
-
//
|
|
152
|
+
// Compute incident metadata for server-side model selection
|
|
153
|
+
const incidentMeta = {
|
|
154
|
+
kinds: issues.map((i) => i.kind),
|
|
155
|
+
count: issues.length,
|
|
156
|
+
max_restarts: Math.max(0, ...issues.map((i) => i.details.restartCount ?? 0)),
|
|
157
|
+
severities: [...new Set(issues.map((i) => i.severity))],
|
|
158
|
+
};
|
|
159
|
+
// Agentic loop — model is selected server-side based on incident complexity
|
|
153
160
|
let lastResponse;
|
|
154
161
|
for (let turn = 0; turn < 10; turn++) {
|
|
155
162
|
const params = {
|
|
156
163
|
max_tokens: 16000,
|
|
157
164
|
tools,
|
|
158
165
|
messages,
|
|
166
|
+
incident_meta: incidentMeta,
|
|
159
167
|
};
|
|
160
168
|
const response = await createMessage(params);
|
|
161
169
|
lastResponse = response;
|