@ycodium-ai/agent-claude 0.2.3614 → 0.2.3635
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.js +40 -10
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -22122,7 +22122,7 @@ var claudeProbeModels = (input) => {
|
|
|
22122
22122
|
out.push({
|
|
22123
22123
|
slug: model.slug,
|
|
22124
22124
|
name: userLabel?.trim() || model.name,
|
|
22125
|
-
capabilities: toProbeCapabilities(model.capabilities)
|
|
22125
|
+
...model.capabilities === null ? {} : { capabilities: toProbeCapabilities(model.capabilities) }
|
|
22126
22126
|
});
|
|
22127
22127
|
}
|
|
22128
22128
|
for (const model of input.customModels) {
|
|
@@ -24424,8 +24424,18 @@ var CLAUDE_SDK_MODELS_TTL_MS = 30 * 6e4;
|
|
|
24424
24424
|
var CLAUDE_SDK_MODELS_RETRY_MS = 2 * 6e4;
|
|
24425
24425
|
var effortLabel = (level) => reasoningEffortShortLabel(level) ?? `${level.slice(0, 1).toUpperCase()}${level.slice(1)}`;
|
|
24426
24426
|
var claudeCatalogModelFromSdk = (info) => {
|
|
24427
|
+
const rawLevels = Array.isArray(info.supportedEffortLevels) ? info.supportedEffortLevels : void 0;
|
|
24428
|
+
const effortsKnown = info.supportsEffort === false || info.supportsEffort === true && rawLevels !== void 0 && rawLevels.every((level) => typeof level === "string" && level.trim().length > 0);
|
|
24429
|
+
if (!effortsKnown) {
|
|
24430
|
+
return {
|
|
24431
|
+
slug: info.value,
|
|
24432
|
+
name: info.displayName.trim().length > 0 ? info.displayName : info.value,
|
|
24433
|
+
isCustom: false,
|
|
24434
|
+
capabilities: null
|
|
24435
|
+
};
|
|
24436
|
+
}
|
|
24427
24437
|
const descriptors = [];
|
|
24428
|
-
const levels = info.supportsEffort ===
|
|
24438
|
+
const levels = info.supportsEffort === true ? rawLevels : [];
|
|
24429
24439
|
if (levels.length > 0) {
|
|
24430
24440
|
descriptors.push({
|
|
24431
24441
|
type: "select",
|
|
@@ -24997,6 +25007,22 @@ function assertSteeringTarget(expectedTurnId, turnState) {
|
|
|
24997
25007
|
throw rejected;
|
|
24998
25008
|
}
|
|
24999
25009
|
|
|
25010
|
+
// src/adapter/reasoningLevelFallback.ts
|
|
25011
|
+
var REASONING_LEVEL_FALLBACK_CODE = "reasoning-level-fallback";
|
|
25012
|
+
function reasoningLevelFallbackWarning(input) {
|
|
25013
|
+
const model = input.model ?? "This model";
|
|
25014
|
+
const outcome = input.appliedEffort === void 0 ? "so the agent picks this turn's level" : `so this turn uses its default, "${input.appliedEffort}"`;
|
|
25015
|
+
return {
|
|
25016
|
+
message: `${model} does not offer the "${input.requestedEffort}" reasoning effort, ${outcome}. Your saved choice is unchanged.`,
|
|
25017
|
+
detail: {
|
|
25018
|
+
code: REASONING_LEVEL_FALLBACK_CODE,
|
|
25019
|
+
...input.model === void 0 ? {} : { model: input.model },
|
|
25020
|
+
requestedEffort: input.requestedEffort,
|
|
25021
|
+
...input.appliedEffort === void 0 ? {} : { appliedEffort: input.appliedEffort }
|
|
25022
|
+
}
|
|
25023
|
+
};
|
|
25024
|
+
}
|
|
25025
|
+
|
|
25000
25026
|
// src/hostMcpAllowRules.ts
|
|
25001
25027
|
import { setsOwnModelConnection as setsOwnModelConnection2 } from "@ycodium-ai/plugin-api/executor";
|
|
25002
25028
|
function claudeHostMcpAllowRules(servers) {
|
|
@@ -25155,7 +25181,7 @@ var makeSendTurn = (deps) => {
|
|
|
25155
25181
|
refreshCatalog: refreshModelCatalogForSend,
|
|
25156
25182
|
refreshSucceeded: modelCatalogRefreshSucceeded
|
|
25157
25183
|
}) : void 0;
|
|
25158
|
-
let
|
|
25184
|
+
let effortFallback;
|
|
25159
25185
|
try {
|
|
25160
25186
|
if (modelSelection?.model && apiModelId !== void 0) {
|
|
25161
25187
|
const turnOptions = resolveClaudeSessionOptions({
|
|
@@ -25169,7 +25195,13 @@ var makeSendTurn = (deps) => {
|
|
|
25169
25195
|
"turn",
|
|
25170
25196
|
log
|
|
25171
25197
|
);
|
|
25172
|
-
|
|
25198
|
+
if (turnOptions.unsupportedEffort !== void 0) {
|
|
25199
|
+
effortFallback = {
|
|
25200
|
+
model: modelSelection.model,
|
|
25201
|
+
requestedEffort: turnOptions.unsupportedEffort,
|
|
25202
|
+
appliedEffort: turnOptions.effort
|
|
25203
|
+
};
|
|
25204
|
+
}
|
|
25173
25205
|
context.session = {
|
|
25174
25206
|
...context.session,
|
|
25175
25207
|
model: modelSelection.model
|
|
@@ -25244,11 +25276,9 @@ var makeSendTurn = (deps) => {
|
|
|
25244
25276
|
context
|
|
25245
25277
|
});
|
|
25246
25278
|
for (const warning of turnText.warnings) await emitRuntimeWarning(context, warning);
|
|
25247
|
-
if (
|
|
25248
|
-
|
|
25249
|
-
|
|
25250
|
-
`${modelSelection.model} does not support the "${unsupportedEffort}" reasoning level, so this turn uses the model's default level. Your saved choice is unchanged.`
|
|
25251
|
-
);
|
|
25279
|
+
if (effortFallback !== void 0) {
|
|
25280
|
+
const warning = reasoningLevelFallbackWarning(effortFallback);
|
|
25281
|
+
await emitRuntimeWarning(context, warning.message, warning.detail);
|
|
25252
25282
|
}
|
|
25253
25283
|
const message = await buildUserMessageFromTurn({
|
|
25254
25284
|
text: turnText,
|
|
@@ -29603,7 +29633,7 @@ var executors = [
|
|
|
29603
29633
|
];
|
|
29604
29634
|
var index_default = definePlugin({
|
|
29605
29635
|
id: "agent-claude",
|
|
29606
|
-
apiVersion:
|
|
29636
|
+
apiVersion: 50,
|
|
29607
29637
|
executors,
|
|
29608
29638
|
activate(ctx) {
|
|
29609
29639
|
capturedAttachments = ctx.attachments;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/agent-claude",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3635",
|
|
4
4
|
"description": "Claude executor: Claude Code CLI via @anthropic-ai/claude-agent-sdk.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@types/node": "24.12.4",
|
|
25
25
|
"esbuild": "0.28.1",
|
|
26
26
|
"vite-plus": "0.2.2",
|
|
27
|
-
"@ycodium-ai/plugin-api": "0.2.
|
|
27
|
+
"@ycodium-ai/plugin-api": "0.2.3635",
|
|
28
28
|
"ycodium-jsonl-stream": "0.0.0",
|
|
29
29
|
"ycodium-executor-testing": "0.0.0",
|
|
30
30
|
"ycodium-composer-tokens": "0.0.0"
|