@cjhyy/code-shell 0.1.5 → 0.1.6
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 +30 -0
- package/dist/arena/index.cjs +4 -4
- package/dist/arena/index.js +3 -3
- package/dist/{arena-O2L4TN6A.js → arena-2LTLIXOL.js} +3 -3
- package/dist/{arena-KBQOPLFV.cjs → arena-ADB7DRFI.cjs} +17 -17
- package/dist/{chunk-XDIQWQJ4.js → chunk-3QO25N6E.js} +2 -2
- package/dist/{chunk-5ECBT4YA.js → chunk-3SBSUOWZ.js} +0 -3
- package/dist/{chunk-YUI524OE.cjs → chunk-7BI3V74Y.cjs} +0 -3
- package/dist/{chunk-2EP3CLEN.js → chunk-7QIM3BKD.js} +1 -1
- package/dist/{chunk-YJ77GQK5.js → chunk-ABRRONJ7.js} +1 -1
- package/dist/{chunk-C5YQBIRK.js → chunk-BZ5TNE7L.js} +1 -1
- package/dist/{chunk-VYL4EFRC.cjs → chunk-DDB6QOKJ.cjs} +7 -7
- package/dist/{chunk-SNT563K3.cjs → chunk-ILHE7XLT.cjs} +6 -6
- package/dist/{chunk-76W334S4.js → chunk-KAQHULYN.js} +1 -1
- package/dist/{chunk-W22P377T.js → chunk-KE4EQOWA.js} +6 -11
- package/dist/{chunk-R47ROHGL.cjs → chunk-MV7YI4WO.cjs} +6 -11
- package/dist/{chunk-7K6SDRRF.js → chunk-PKGRTCCY.js} +54 -9
- package/dist/{chunk-RMYKO74M.js → chunk-QARL3IDQ.js} +1 -1
- package/dist/{chunk-A5LCRPDP.cjs → chunk-S754JHLR.cjs} +2 -2
- package/dist/{chunk-HS2MFNUC.cjs → chunk-TNLGBJYS.cjs} +3 -3
- package/dist/{chunk-BUU5PZK2.cjs → chunk-UXOCVJJ6.cjs} +200 -156
- package/dist/{chunk-BWTOS5BH.cjs → chunk-WZJV6DJC.cjs} +4 -4
- package/dist/{chunk-QRM7IF2S.cjs → chunk-YKIAELDZ.cjs} +2 -2
- package/dist/cli/main.cjs +211 -188
- package/dist/cli/main.js +44 -21
- package/dist/cli/updater.d.ts +8 -0
- package/dist/engine/engine.d.ts +7 -0
- package/dist/index.cjs +8 -8
- package/dist/index.js +9 -9
- package/dist/{manager-C2IUXKRC.js → manager-D65VFAPX.js} +1 -1
- package/dist/manager-TTF5VHJC.cjs +7 -0
- package/dist/{openrouter-models-TGKDKY52.js → openrouter-models-H56GHBHN.js} +1 -1
- package/dist/openrouter-models-TWUFWZ5T.cjs +15 -0
- package/dist/openrouter-sync-5VMGN6C2.cjs +11 -0
- package/dist/{openrouter-sync-UXUSJCIR.js → openrouter-sync-ALEMF5IU.js} +2 -2
- package/dist/product/index.cjs +7 -7
- package/dist/product/index.js +6 -6
- package/dist/run/index.cjs +7 -7
- package/dist/run/index.js +6 -6
- package/dist/tool-system/investigation-guard.d.ts +9 -0
- package/dist/updater-I7QBW4DP.cjs +17 -0
- package/dist/{updater-VFUAHCVY.js → updater-NVME5S3Z.js} +1 -1
- package/package.json +2 -1
- package/skills-builtin/codeshell-help.md +135 -0
- package/dist/manager-YYKWYTRM.cjs +0 -7
- package/dist/openrouter-models-OU4GRZQY.cjs +0 -15
- package/dist/openrouter-sync-BBHUM3R6.cjs +0 -11
- package/dist/updater-QW473OF4.cjs +0 -17
package/dist/cli/main.js
CHANGED
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
getCurrentVersion,
|
|
9
9
|
getUpdateAvailable,
|
|
10
10
|
scheduleAutoInstallOnExit
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-KE4EQOWA.js";
|
|
12
12
|
import {
|
|
13
13
|
syncOpenRouterCatalog
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-KAQHULYN.js";
|
|
15
15
|
import {
|
|
16
16
|
Engine,
|
|
17
17
|
FileRunStore,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
setRuntimeBypass,
|
|
27
27
|
taskManager,
|
|
28
28
|
updateLastInteractionTime
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-PKGRTCCY.js";
|
|
30
30
|
import "../chunk-BSW22MPA.js";
|
|
31
31
|
import {
|
|
32
32
|
defaultCacheDir
|
|
@@ -37,19 +37,19 @@ import "../chunk-VIAGTYYW.js";
|
|
|
37
37
|
import "../chunk-76HYEPDM.js";
|
|
38
38
|
import {
|
|
39
39
|
SettingsManager
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-3SBSUOWZ.js";
|
|
41
41
|
import "../chunk-T6VYG46N.js";
|
|
42
|
-
import "../chunk-
|
|
42
|
+
import "../chunk-QARL3IDQ.js";
|
|
43
43
|
import {
|
|
44
44
|
appendOnboardingResult,
|
|
45
45
|
detectEnvKeys,
|
|
46
46
|
resolveApiKey,
|
|
47
47
|
saveArenaSettingsByKeys
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-BZ5TNE7L.js";
|
|
49
49
|
import {
|
|
50
50
|
findOpenRouterModel,
|
|
51
51
|
getOpenRouterSnapshot
|
|
52
|
-
} from "../chunk-
|
|
52
|
+
} from "../chunk-3QO25N6E.js";
|
|
53
53
|
import "../chunk-SFXHZSRF.js";
|
|
54
54
|
import {
|
|
55
55
|
logger,
|
|
@@ -1385,11 +1385,33 @@ function compactSummary(toolName, content) {
|
|
|
1385
1385
|
}
|
|
1386
1386
|
|
|
1387
1387
|
// src/cli/commands/run.ts
|
|
1388
|
+
function findActiveModelEntry(settings) {
|
|
1389
|
+
const s = settings;
|
|
1390
|
+
if (!s.models?.length) return void 0;
|
|
1391
|
+
if (s.activeKey) {
|
|
1392
|
+
const hit = s.models.find((m) => m.key === s.activeKey);
|
|
1393
|
+
if (hit) return hit;
|
|
1394
|
+
}
|
|
1395
|
+
const legacyName = s.model?.name;
|
|
1396
|
+
if (legacyName) {
|
|
1397
|
+
return s.models.find(
|
|
1398
|
+
(m) => m.model === legacyName || m.model?.endsWith(`/${legacyName}`)
|
|
1399
|
+
);
|
|
1400
|
+
}
|
|
1401
|
+
return void 0;
|
|
1402
|
+
}
|
|
1403
|
+
function findProviderApiKey(settings, providerKey) {
|
|
1404
|
+
if (!providerKey) return void 0;
|
|
1405
|
+
const s = settings;
|
|
1406
|
+
return s.providers?.find((p) => p.key === providerKey)?.apiKey;
|
|
1407
|
+
}
|
|
1388
1408
|
async function runCommand(options) {
|
|
1389
1409
|
const cwd = process.cwd();
|
|
1390
1410
|
const settingsManager = new SettingsManager(cwd);
|
|
1391
1411
|
const settings = settingsManager.get();
|
|
1392
|
-
const
|
|
1412
|
+
const activeModelEntry = findActiveModelEntry(settings);
|
|
1413
|
+
const fallbackApiKey = settings.model?.apiKey ?? activeModelEntry?.apiKey ?? findProviderApiKey(settings, activeModelEntry?.providerKey);
|
|
1414
|
+
const apiKey = resolveApiKey(options.apiKey, fallbackApiKey);
|
|
1393
1415
|
if (!apiKey) {
|
|
1394
1416
|
console.error(
|
|
1395
1417
|
"Error: No API key provided. Use --api-key, set OPENROUTER_API_KEY env var, or add to settings."
|
|
@@ -1397,12 +1419,12 @@ async function runCommand(options) {
|
|
|
1397
1419
|
process.exit(1);
|
|
1398
1420
|
}
|
|
1399
1421
|
const llmConfig = {
|
|
1400
|
-
provider: options.provider ?? settings.model
|
|
1401
|
-
model: options.model ?? settings.model
|
|
1422
|
+
provider: options.provider ?? activeModelEntry?.provider ?? settings.model?.provider ?? "openai",
|
|
1423
|
+
model: options.model ?? activeModelEntry?.model ?? settings.model?.name ?? "anthropic/claude-opus-4-6",
|
|
1402
1424
|
apiKey,
|
|
1403
|
-
baseUrl: options.baseUrl ?? settings.model
|
|
1404
|
-
temperature: settings.model
|
|
1405
|
-
maxTokens: settings.model
|
|
1425
|
+
baseUrl: options.baseUrl ?? activeModelEntry?.baseUrl ?? settings.model?.baseUrl ?? "https://openrouter.ai/api/v1",
|
|
1426
|
+
temperature: settings.model?.temperature,
|
|
1427
|
+
maxTokens: activeModelEntry?.maxOutputTokens ?? settings.model?.maxTokens ?? 8192,
|
|
1406
1428
|
enableStreaming: true
|
|
1407
1429
|
};
|
|
1408
1430
|
const engine = new Engine({
|
|
@@ -1418,7 +1440,8 @@ async function runCommand(options) {
|
|
|
1418
1440
|
maxContextTokens: settings.context.maxTokens,
|
|
1419
1441
|
sessionStorageDir: settings.session.storageDir,
|
|
1420
1442
|
costStore: costTracker,
|
|
1421
|
-
mcpServers: settings.mcpServers
|
|
1443
|
+
mcpServers: settings.mcpServers,
|
|
1444
|
+
headless: true
|
|
1422
1445
|
});
|
|
1423
1446
|
const [serverTransport, clientTransport] = createInProcessTransport();
|
|
1424
1447
|
const _server = new AgentServer({ engine, transport: serverTransport });
|
|
@@ -18758,7 +18781,7 @@ ${diff2.slice(0, 5e3)}${diff2.length > 5e3 ? "\n... (truncated)" : ""}`
|
|
|
18758
18781
|
description: "View or update settings",
|
|
18759
18782
|
usage: "/config [show | set <key> <value> | get <key>]",
|
|
18760
18783
|
execute: async (arg, ctx) => {
|
|
18761
|
-
const { SettingsManager: SettingsManager2 } = await import("../manager-
|
|
18784
|
+
const { SettingsManager: SettingsManager2 } = await import("../manager-D65VFAPX.js");
|
|
18762
18785
|
const sm = new SettingsManager2(ctx.cwd);
|
|
18763
18786
|
const parts = arg.trim().split(/\s+/);
|
|
18764
18787
|
const sub = parts[0] || "show";
|
|
@@ -19203,7 +19226,7 @@ var utilityCommands = [
|
|
|
19203
19226
|
description: "Check for and install updates",
|
|
19204
19227
|
execute: async (_arg, ctx) => {
|
|
19205
19228
|
try {
|
|
19206
|
-
const { getCurrentVersion: getCurrentVersion2, getUpdateAvailable: getUpdateAvailable2, getAutoUpdateDisabledReason } = await import("../updater-
|
|
19229
|
+
const { getCurrentVersion: getCurrentVersion2, getUpdateAvailable: getUpdateAvailable2, getAutoUpdateDisabledReason } = await import("../updater-NVME5S3Z.js");
|
|
19207
19230
|
const current = getCurrentVersion2();
|
|
19208
19231
|
const info = getUpdateAvailable2();
|
|
19209
19232
|
const disabledReason = getAutoUpdateDisabledReason();
|
|
@@ -20085,7 +20108,7 @@ function App2({
|
|
|
20085
20108
|
client.query("models"),
|
|
20086
20109
|
client.query("config_get", "arena.participants"),
|
|
20087
20110
|
client.query("providers"),
|
|
20088
|
-
import("../openrouter-models-
|
|
20111
|
+
import("../openrouter-models-H56GHBHN.js")
|
|
20089
20112
|
]);
|
|
20090
20113
|
const entries = modelsRes.data ?? [];
|
|
20091
20114
|
const snap = snapMod.getOpenRouterSnapshot();
|
|
@@ -20645,9 +20668,9 @@ ${trimmed}`;
|
|
|
20645
20668
|
);
|
|
20646
20669
|
},
|
|
20647
20670
|
onSync: async () => {
|
|
20648
|
-
const mod = await import("../openrouter-sync-
|
|
20671
|
+
const mod = await import("../openrouter-sync-ALEMF5IU.js");
|
|
20649
20672
|
const r = await mod.syncOpenRouterCatalog();
|
|
20650
|
-
const snapMod = await import("../openrouter-models-
|
|
20673
|
+
const snapMod = await import("../openrouter-models-H56GHBHN.js");
|
|
20651
20674
|
const snap = snapMod.getOpenRouterSnapshot();
|
|
20652
20675
|
setModelManager(
|
|
20653
20676
|
(prev) => prev ? { ...prev, snapshot: { count: snap.count, fetchedAt: snap.fetchedAt } } : prev
|
|
@@ -22071,8 +22094,8 @@ addCommonOptions(
|
|
|
22071
22094
|
program.command("arena").description("Multi-model review arena \u2014 agent gathers context, multiple models discuss").argument("<topic>", "What to review (agent will find relevant code)").option("--models <models>", "Models to use (e.g. claude,gpt4o,deepseek)").option("--mode <mode>", "Arena mode: review, discussion, or planning (auto-detected if omitted)")
|
|
22072
22095
|
).action(async (topic, opts) => {
|
|
22073
22096
|
const resolved = resolveOpts(opts);
|
|
22074
|
-
const { runArenaReview } = await import("../arena-
|
|
22075
|
-
const { SettingsManager: SettingsManager2 } = await import("../manager-
|
|
22097
|
+
const { runArenaReview } = await import("../arena-2LTLIXOL.js");
|
|
22098
|
+
const { SettingsManager: SettingsManager2 } = await import("../manager-D65VFAPX.js");
|
|
22076
22099
|
const settings = new SettingsManager2(process.cwd()).get();
|
|
22077
22100
|
const apiKey = resolveApiKey(resolved.apiKey, settings.model.apiKey);
|
|
22078
22101
|
if (!apiKey) {
|
package/dist/cli/updater.d.ts
CHANGED
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
* Concurrency: multiple `code-shell` processes can run at once. A file lock
|
|
16
16
|
* at `~/.code-shell/.update.lock` prevents both from launching `npm i -g`
|
|
17
17
|
* simultaneously (which corrupts the install).
|
|
18
|
+
*
|
|
19
|
+
* Headless safety: `checkForUpdate()` and `scheduleAutoInstallOnExit()` are
|
|
20
|
+
* only invoked from the Ink-based UpdateBanner component, never from the
|
|
21
|
+
* `run` / `arena` headless code paths. Keep it that way — wiring the updater
|
|
22
|
+
* into bare CLI commands would surprise CI users with background `npm i -g`
|
|
23
|
+
* on every short-lived `code-shell run …` invocation. If you need updater
|
|
24
|
+
* behavior in a new headless entry point, gate it on something explicit
|
|
25
|
+
* (e.g. `--auto-update` flag) rather than calling it unconditionally.
|
|
18
26
|
*/
|
|
19
27
|
export interface UpdateInfo {
|
|
20
28
|
latestVersion: string;
|
package/dist/engine/engine.d.ts
CHANGED
|
@@ -36,6 +36,13 @@ export interface EngineConfig {
|
|
|
36
36
|
* Engine doesn't persist cost state — it's a UI concern.
|
|
37
37
|
*/
|
|
38
38
|
costStore?: CostStateStore;
|
|
39
|
+
/**
|
|
40
|
+
* True when the Engine runs in a no-UI / one-shot context (e.g. the `run`
|
|
41
|
+
* command). Currently controls InvestigationGuard soft-mode: in headless
|
|
42
|
+
* we never hard-block a tool call because there is no human to retry.
|
|
43
|
+
* Defaults to false.
|
|
44
|
+
*/
|
|
45
|
+
headless?: boolean;
|
|
39
46
|
}
|
|
40
47
|
export interface EngineHookConfig {
|
|
41
48
|
event: HookEventName;
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkILHE7XLTcjs = require('./chunk-ILHE7XLT.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkTNLGBJYScjs = require('./chunk-TNLGBJYS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -56,7 +56,7 @@ var _chunkSNT563K3cjs = require('./chunk-SNT563K3.cjs');
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
var
|
|
59
|
+
var _chunkUXOCVJJ6cjs = require('./chunk-UXOCVJJ6.cjs');
|
|
60
60
|
|
|
61
61
|
|
|
62
62
|
var _chunk55XGPMAPcjs = require('./chunk-55XGPMAP.cjs');
|
|
@@ -85,7 +85,7 @@ var _chunkNUNC3VFBcjs = require('./chunk-NUNC3VFB.cjs');
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
var
|
|
88
|
+
var _chunk7BI3V74Ycjs = require('./chunk-7BI3V74Y.cjs');
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
var _chunkTUY2T5KPcjs = require('./chunk-TUY2T5KP.cjs');
|
|
@@ -96,7 +96,7 @@ var _chunkTUY2T5KPcjs = require('./chunk-TUY2T5KP.cjs');
|
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
|
|
99
|
-
var
|
|
99
|
+
var _chunkDDB6QOKJcjs = require('./chunk-DDB6QOKJ.cjs');
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
|
|
@@ -124,8 +124,8 @@ var _chunkVYL4EFRCcjs = require('./chunk-VYL4EFRC.cjs');
|
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
|
|
127
|
-
var
|
|
128
|
-
require('./chunk-
|
|
127
|
+
var _chunkWZJV6DJCcjs = require('./chunk-WZJV6DJC.cjs');
|
|
128
|
+
require('./chunk-YKIAELDZ.cjs');
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
var _chunkYIQBXAYUcjs = require('./chunk-YIQBXAYU.cjs');
|
|
@@ -344,4 +344,4 @@ var VERSION = "0.1.0";
|
|
|
344
344
|
|
|
345
345
|
|
|
346
346
|
|
|
347
|
-
exports.AnthropicClient = _chunkYIQBXAYUcjs.AnthropicClient; exports.Arena =
|
|
347
|
+
exports.AnthropicClient = _chunkYIQBXAYUcjs.AnthropicClient; exports.Arena = _chunkWZJV6DJCcjs.Arena; exports.ArenaLedger = _chunkWZJV6DJCcjs.ArenaLedger; exports.ArtifactTracker = _chunkUXOCVJJ6cjs.ArtifactTracker; exports.AutoApprovalBackend = _chunkUXOCVJJ6cjs.AutoApprovalBackend; exports.BUILTIN_AGENT_PRESETS = _chunkUXOCVJJ6cjs.BUILTIN_AGENT_PRESETS; exports.BUILTIN_TOOLS = _chunkUXOCVJJ6cjs.BUILTIN_TOOLS; exports.COMPACTABLE_TOOL_NAMES = _chunk6QVAYW7Ccjs.COMPACTABLE_TOOL_NAMES; exports.CheckpointWriter = _chunkUXOCVJJ6cjs.CheckpointWriter; exports.CompositeEvaluator = _chunkUXOCVJJ6cjs.CompositeEvaluator; exports.ConfigError = _chunk2YW4FPFGcjs.ConfigError; exports.ContextLimitError = _chunk2YW4FPFGcjs.ContextLimitError; exports.ContextManager = _chunkUXOCVJJ6cjs.ContextManager; exports.DEFAULT_AGENT_PRESET = _chunkUXOCVJJ6cjs.DEFAULT_AGENT_PRESET; exports.DEFAULT_CLI_PRESET = _chunkUXOCVJJ6cjs.DEFAULT_CLI_PRESET; exports.DEFAULT_PERSIST_THRESHOLD = _chunkUXOCVJJ6cjs.DEFAULT_PERSIST_THRESHOLD; exports.DiscussionStrategy = _chunkWZJV6DJCcjs.DiscussionStrategy; exports.Engine = _chunkUXOCVJJ6cjs.Engine; exports.EngineRunner = _chunkUXOCVJJ6cjs.EngineRunner; exports.FileHistory = _chunkTUY2T5KPcjs.FileHistory; exports.FileRunStore = _chunkUXOCVJJ6cjs.FileRunStore; exports.FrameworkError = _chunk2YW4FPFGcjs.FrameworkError; exports.HeadlessApprovalBackend = _chunkUXOCVJJ6cjs.HeadlessApprovalBackend; exports.Heartbeat = _chunkUXOCVJJ6cjs.Heartbeat; exports.HookRegistry = _chunkUXOCVJJ6cjs.HookRegistry; exports.IterativeArena = _chunkDDB6QOKJcjs.IterativeArena; exports.LLMClientBase = _chunk7EG3V4JYcjs.LLMClientBase; exports.LLMError = _chunk2YW4FPFGcjs.LLMError; exports.LLMRateLimitError = _chunk2YW4FPFGcjs.LLMRateLimitError; exports.MCPManager = _chunkHEKQCI7Bcjs.MCPManager; exports.MODEL_PRESETS = _chunkWZJV6DJCcjs.MODEL_PRESETS; exports.MemoryManager = _chunkJMR33QVFcjs.MemoryManager; exports.ModelPool = _chunk55XGPMAPcjs.ModelPool; exports.NoopEvaluator = _chunkUXOCVJJ6cjs.NoopEvaluator; exports.OpenAIClient = _chunkKOVYSDHZcjs.OpenAIClient; exports.PER_MESSAGE_AGGREGATE_CAP = _chunkUXOCVJJ6cjs.PER_MESSAGE_AGGREGATE_CAP; exports.PREVIEW_SIZE = _chunkUXOCVJJ6cjs.PREVIEW_SIZE; exports.PermissionClassifier = _chunkUXOCVJJ6cjs.PermissionClassifier; exports.PermissionDeniedError = _chunk2YW4FPFGcjs.PermissionDeniedError; exports.PlanningStrategy = _chunkWZJV6DJCcjs.PlanningStrategy; exports.PromptComposer = _chunkUXOCVJJ6cjs.PromptComposer; exports.ReviewStrategy = _chunkWZJV6DJCcjs.ReviewStrategy; exports.RunApprovalBackend = _chunkUXOCVJJ6cjs.RunApprovalBackend; exports.RunLock = _chunkUXOCVJJ6cjs.RunLock; exports.RunManager = _chunkUXOCVJJ6cjs.RunManager; exports.RunQueue = _chunkUXOCVJJ6cjs.RunQueue; exports.SectionCache = _chunkUXOCVJJ6cjs.SectionCache; exports.SessionError = _chunk2YW4FPFGcjs.SessionError; exports.SessionManager = _chunkNUNC3VFBcjs.SessionManager; exports.SettingsManager = _chunk7BI3V74Ycjs.SettingsManager; exports.SettingsSchema = _chunk7BI3V74Ycjs.SettingsSchema; exports.ToolError = _chunk2YW4FPFGcjs.ToolError; exports.ToolExecutionError = _chunk2YW4FPFGcjs.ToolExecutionError; exports.ToolExecutor = _chunkUXOCVJJ6cjs.ToolExecutor; exports.ToolNotFoundError = _chunk2YW4FPFGcjs.ToolNotFoundError; exports.ToolRegistry = _chunkUXOCVJJ6cjs.ToolRegistry; exports.ToolTimeoutError = _chunk2YW4FPFGcjs.ToolTimeoutError; exports.Transcript = _chunkNUNC3VFBcjs.Transcript; exports.TranscriptError = _chunk2YW4FPFGcjs.TranscriptError; exports.VALID_TRANSITIONS = _chunkUXOCVJJ6cjs.VALID_TRANSITIONS; exports.VERSION = VERSION; exports.applyReviewResult = _chunkWZJV6DJCcjs.applyReviewResult; exports.applySummaryCompaction = _chunk6QVAYW7Ccjs.applySummaryCompaction; exports.applyToolResultPersistence = _chunkUXOCVJJ6cjs.applyToolResultPersistence; exports.availableSections = _chunkUXOCVJJ6cjs.availableSections; exports.buildDigest = _chunkWZJV6DJCcjs.buildDigest; exports.buildPresetSystemPrompt = _chunkUXOCVJJ6cjs.buildPresetSystemPrompt; exports.buildSkillListing = _chunkUXOCVJJ6cjs.buildSkillListing; exports.buildSummarizationPrompt = _chunk6QVAYW7Ccjs.buildSummarizationPrompt; exports.collectEvidence = _chunkWZJV6DJCcjs.collectEvidence; exports.combineInstructions = _chunkUXOCVJJ6cjs.combineInstructions; exports.createContentReplacementState = _chunkUXOCVJJ6cjs.createContentReplacementState; exports.createLLMClient = _chunkWZJV6DJCcjs.createLLMClient; exports.createRunAskUserFn = _chunkUXOCVJJ6cjs.createRunAskUserFn; exports.createRunManager = _chunkTNLGBJYScjs.createRunManager; exports.defaultIterateConvergence = _chunkDDB6QOKJcjs.defaultConvergence; exports.defineProduct = _chunkILHE7XLTcjs.defineProduct; exports.detectArenaMode = detectArenaMode; exports.estimateTokens = _chunk6QVAYW7Ccjs.estimateTokens; exports.formatDigest = _chunkWZJV6DJCcjs.formatDigest; exports.getIterateFormat = _chunkDDB6QOKJcjs.getFormat; exports.getMaxOutputTokens = _chunkWZJV6DJCcjs.getMaxOutputTokens; exports.getStrategy = _chunkWZJV6DJCcjs.getStrategy; exports.getStrategyForPlan = _chunkWZJV6DJCcjs.getStrategyForPlan; exports.hasTools = _chunkWZJV6DJCcjs.hasTools; exports.isPersistedReplacement = _chunkUXOCVJJ6cjs.isPersistedReplacement; exports.isTerminal = _chunkWZJV6DJCcjs.isTerminal; exports.iterateCodeFormat = _chunkDDB6QOKJcjs.codeFormat; exports.iterateDiffRatio = _chunkDDB6QOKJcjs.diffRatio; exports.iterateDocumentFormat = _chunkDDB6QOKJcjs.documentFormat; exports.listPresetNames = _chunkUXOCVJJ6cjs.listPresetNames; exports.loadSection = _chunkUXOCVJJ6cjs.loadSection; exports.loadSections = _chunkUXOCVJJ6cjs.loadSections; exports.logger = _chunkIK4EWJBPcjs.logger; exports.markUnderReview = _chunkWZJV6DJCcjs.markUnderReview; exports.markUnresolved = _chunkWZJV6DJCcjs.markUnresolved; exports.matchSkillsByInput = _chunkUXOCVJJ6cjs.matchSkillsByInput; exports.matchSkillsByTool = _chunkUXOCVJJ6cjs.matchSkillsByTool; exports.microcompact = _chunk6QVAYW7Ccjs.microcompact; exports.planArena = _chunkWZJV6DJCcjs.planArena; exports.reconstructContentReplacementState = _chunkUXOCVJJ6cjs.reconstructContentReplacementState; exports.registerClaims = _chunkWZJV6DJCcjs.registerClaims; exports.registerPreset = _chunkUXOCVJJ6cjs.registerPreset; exports.registerProvider = _chunkWZJV6DJCcjs.registerProvider; exports.registerSection = _chunkUXOCVJJ6cjs.registerSection; exports.resolveAgentPreset = _chunkUXOCVJJ6cjs.resolveAgentPreset; exports.resolveBuiltinToolNames = _chunkUXOCVJJ6cjs.resolveBuiltinToolNames; exports.resolveClaimStatus = _chunkWZJV6DJCcjs.resolveClaimStatus; exports.resolveToolResultsDir = _chunkUXOCVJJ6cjs.resolveToolResultsDir; exports.scanInstructions = _chunkUXOCVJJ6cjs.scanInstructions; exports.scanSkills = _chunkUXOCVJJ6cjs.scanSkills; exports.selectClaimsForReview = _chunkWZJV6DJCcjs.selectClaimsForReview; exports.selectTools = _chunkWZJV6DJCcjs.selectTools; exports.taskManager = _chunkUXOCVJJ6cjs.taskManager; exports.transitionClaim = _chunkWZJV6DJCcjs.transitionClaim; exports.truncateToolResult = _chunk6QVAYW7Ccjs.truncateToolResult; exports.validTransitions = _chunkWZJV6DJCcjs.validTransitions; exports.validateSettings = _chunk7BI3V74Ycjs.validateSettings; exports.windowCompact = _chunk6QVAYW7Ccjs.windowCompact;
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createRunManager
|
|
3
|
-
} from "./chunk-2EP3CLEN.js";
|
|
4
1
|
import {
|
|
5
2
|
defineProduct
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ABRRONJ7.js";
|
|
4
|
+
import {
|
|
5
|
+
createRunManager
|
|
6
|
+
} from "./chunk-7QIM3BKD.js";
|
|
7
7
|
import {
|
|
8
8
|
ArtifactTracker,
|
|
9
9
|
AutoApprovalBackend,
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
scanInstructions,
|
|
57
57
|
scanSkills,
|
|
58
58
|
taskManager
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-PKGRTCCY.js";
|
|
60
60
|
import {
|
|
61
61
|
ModelPool
|
|
62
62
|
} from "./chunk-BSW22MPA.js";
|
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
SettingsManager,
|
|
86
86
|
SettingsSchema,
|
|
87
87
|
validateSettings
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-3SBSUOWZ.js";
|
|
89
89
|
import {
|
|
90
90
|
FileHistory
|
|
91
91
|
} from "./chunk-T6VYG46N.js";
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
diffRatio,
|
|
97
97
|
documentFormat,
|
|
98
98
|
getFormat
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-QARL3IDQ.js";
|
|
100
100
|
import {
|
|
101
101
|
Arena,
|
|
102
102
|
ArenaLedger,
|
|
@@ -124,8 +124,8 @@ import {
|
|
|
124
124
|
selectTools,
|
|
125
125
|
transitionClaim,
|
|
126
126
|
validTransitions
|
|
127
|
-
} from "./chunk-
|
|
128
|
-
import "./chunk-
|
|
127
|
+
} from "./chunk-BZ5TNE7L.js";
|
|
128
|
+
import "./chunk-3QO25N6E.js";
|
|
129
129
|
import {
|
|
130
130
|
AnthropicClient
|
|
131
131
|
} from "./chunk-ZBPSQCPU.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkYKIAELDZcjs = require('./chunk-YKIAELDZ.cjs');
|
|
8
|
+
require('./chunk-KS3RYAYL.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
exports.findOpenRouterModel = _chunkYKIAELDZcjs.findOpenRouterModel; exports.getOpenRouterModels = _chunkYKIAELDZcjs.getOpenRouterModels; exports.getOpenRouterSnapshot = _chunkYKIAELDZcjs.getOpenRouterSnapshot; exports.listOpenRouterModelsByVendor = _chunkYKIAELDZcjs.listOpenRouterModelsByVendor; exports.setOpenRouterSnapshot = _chunkYKIAELDZcjs.setOpenRouterSnapshot;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkS754JHLRcjs = require('./chunk-S754JHLR.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkYKIAELDZcjs = require('./chunk-YKIAELDZ.cjs');
|
|
7
|
+
require('./chunk-KS3RYAYL.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.getOpenRouterSnapshot = _chunkYKIAELDZcjs.getOpenRouterSnapshot; exports.syncOpenRouterCatalog = _chunkS754JHLRcjs.syncOpenRouterCatalog;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
syncOpenRouterCatalog
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KAQHULYN.js";
|
|
4
4
|
import {
|
|
5
5
|
getOpenRouterSnapshot
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3QO25N6E.js";
|
|
7
7
|
import "./chunk-MD32R22I.js";
|
|
8
8
|
export {
|
|
9
9
|
getOpenRouterSnapshot,
|
package/dist/product/index.cjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkILHE7XLTcjs = require('../chunk-ILHE7XLT.cjs');
|
|
4
|
+
require('../chunk-UXOCVJJ6.cjs');
|
|
5
5
|
require('../chunk-55XGPMAP.cjs');
|
|
6
6
|
require('../chunk-52LGZKT3.cjs');
|
|
7
7
|
require('../chunk-HEKQCI7B.cjs');
|
|
8
8
|
require('../chunk-6QVAYW7C.cjs');
|
|
9
9
|
require('../chunk-JMR33QVF.cjs');
|
|
10
10
|
require('../chunk-NUNC3VFB.cjs');
|
|
11
|
-
require('../chunk-
|
|
11
|
+
require('../chunk-7BI3V74Y.cjs');
|
|
12
12
|
require('../chunk-TUY2T5KP.cjs');
|
|
13
|
-
require('../chunk-
|
|
14
|
-
require('../chunk-
|
|
15
|
-
require('../chunk-
|
|
13
|
+
require('../chunk-DDB6QOKJ.cjs');
|
|
14
|
+
require('../chunk-WZJV6DJC.cjs');
|
|
15
|
+
require('../chunk-YKIAELDZ.cjs');
|
|
16
16
|
require('../chunk-2YW4FPFG.cjs');
|
|
17
17
|
require('../chunk-IK4EWJBP.cjs');
|
|
18
18
|
require('../chunk-KS3RYAYL.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
exports.defineProduct =
|
|
21
|
+
exports.defineProduct = _chunkILHE7XLTcjs.defineProduct;
|
package/dist/product/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defineProduct
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-ABRRONJ7.js";
|
|
4
|
+
import "../chunk-PKGRTCCY.js";
|
|
5
5
|
import "../chunk-BSW22MPA.js";
|
|
6
6
|
import "../chunk-3OA5G4TM.js";
|
|
7
7
|
import "../chunk-SIHHIQLO.js";
|
|
8
8
|
import "../chunk-7Y6S3OCX.js";
|
|
9
9
|
import "../chunk-VIAGTYYW.js";
|
|
10
10
|
import "../chunk-76HYEPDM.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-3SBSUOWZ.js";
|
|
12
12
|
import "../chunk-T6VYG46N.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-QARL3IDQ.js";
|
|
14
|
+
import "../chunk-BZ5TNE7L.js";
|
|
15
|
+
import "../chunk-3QO25N6E.js";
|
|
16
16
|
import "../chunk-SFXHZSRF.js";
|
|
17
17
|
import "../chunk-BXCY2FSE.js";
|
|
18
18
|
import "../chunk-MD32R22I.js";
|
package/dist/run/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkTNLGBJYScjs = require('../chunk-TNLGBJYS.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -15,18 +15,18 @@ var _chunkHS2MFNUCcjs = require('../chunk-HS2MFNUC.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkUXOCVJJ6cjs = require('../chunk-UXOCVJJ6.cjs');
|
|
19
19
|
require('../chunk-55XGPMAP.cjs');
|
|
20
20
|
require('../chunk-52LGZKT3.cjs');
|
|
21
21
|
require('../chunk-HEKQCI7B.cjs');
|
|
22
22
|
require('../chunk-6QVAYW7C.cjs');
|
|
23
23
|
require('../chunk-JMR33QVF.cjs');
|
|
24
24
|
require('../chunk-NUNC3VFB.cjs');
|
|
25
|
-
require('../chunk-
|
|
25
|
+
require('../chunk-7BI3V74Y.cjs');
|
|
26
26
|
require('../chunk-TUY2T5KP.cjs');
|
|
27
|
-
require('../chunk-
|
|
28
|
-
require('../chunk-
|
|
29
|
-
require('../chunk-
|
|
27
|
+
require('../chunk-DDB6QOKJ.cjs');
|
|
28
|
+
require('../chunk-WZJV6DJC.cjs');
|
|
29
|
+
require('../chunk-YKIAELDZ.cjs');
|
|
30
30
|
require('../chunk-2YW4FPFG.cjs');
|
|
31
31
|
require('../chunk-IK4EWJBP.cjs');
|
|
32
32
|
require('../chunk-KS3RYAYL.cjs');
|
|
@@ -45,4 +45,4 @@ require('../chunk-KS3RYAYL.cjs');
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
exports.ArtifactTracker =
|
|
48
|
+
exports.ArtifactTracker = _chunkUXOCVJJ6cjs.ArtifactTracker; exports.CheckpointWriter = _chunkUXOCVJJ6cjs.CheckpointWriter; exports.CompositeEvaluator = _chunkUXOCVJJ6cjs.CompositeEvaluator; exports.EngineRunner = _chunkUXOCVJJ6cjs.EngineRunner; exports.FileRunStore = _chunkUXOCVJJ6cjs.FileRunStore; exports.Heartbeat = _chunkUXOCVJJ6cjs.Heartbeat; exports.NoopEvaluator = _chunkUXOCVJJ6cjs.NoopEvaluator; exports.RunApprovalBackend = _chunkUXOCVJJ6cjs.RunApprovalBackend; exports.RunLock = _chunkUXOCVJJ6cjs.RunLock; exports.RunManager = _chunkUXOCVJJ6cjs.RunManager; exports.RunQueue = _chunkUXOCVJJ6cjs.RunQueue; exports.VALID_TRANSITIONS = _chunkUXOCVJJ6cjs.VALID_TRANSITIONS; exports.createRunAskUserFn = _chunkUXOCVJJ6cjs.createRunAskUserFn; exports.createRunManager = _chunkTNLGBJYScjs.createRunManager;
|
package/dist/run/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRunManager
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-7QIM3BKD.js";
|
|
4
4
|
import {
|
|
5
5
|
ArtifactTracker,
|
|
6
6
|
CheckpointWriter,
|
|
@@ -15,18 +15,18 @@ import {
|
|
|
15
15
|
RunQueue,
|
|
16
16
|
VALID_TRANSITIONS,
|
|
17
17
|
createRunAskUserFn
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-PKGRTCCY.js";
|
|
19
19
|
import "../chunk-BSW22MPA.js";
|
|
20
20
|
import "../chunk-3OA5G4TM.js";
|
|
21
21
|
import "../chunk-SIHHIQLO.js";
|
|
22
22
|
import "../chunk-7Y6S3OCX.js";
|
|
23
23
|
import "../chunk-VIAGTYYW.js";
|
|
24
24
|
import "../chunk-76HYEPDM.js";
|
|
25
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-3SBSUOWZ.js";
|
|
26
26
|
import "../chunk-T6VYG46N.js";
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-QARL3IDQ.js";
|
|
28
|
+
import "../chunk-BZ5TNE7L.js";
|
|
29
|
+
import "../chunk-3QO25N6E.js";
|
|
30
30
|
import "../chunk-SFXHZSRF.js";
|
|
31
31
|
import "../chunk-BXCY2FSE.js";
|
|
32
32
|
import "../chunk-MD32R22I.js";
|
|
@@ -28,6 +28,15 @@ export declare class InvestigationGuard {
|
|
|
28
28
|
private turnHasText;
|
|
29
29
|
private turnHasSideEffect;
|
|
30
30
|
private lastReminderSilent;
|
|
31
|
+
/**
|
|
32
|
+
* Soft mode replaces hard blocks (3rd-read dedupe) with a stronger
|
|
33
|
+
* reminder. Used in headless runs (`code-shell run …`) where there is
|
|
34
|
+
* no human to retry the task, so an unattended automation should not
|
|
35
|
+
* be killed by the guard — it should still get the signal to change
|
|
36
|
+
* strategy, but the tool call goes through.
|
|
37
|
+
*/
|
|
38
|
+
private softMode;
|
|
39
|
+
setSoftMode(soft: boolean): void;
|
|
31
40
|
preToolCheck(call: ToolCall): GuardDecision | undefined;
|
|
32
41
|
noteText(text: string | undefined): void;
|
|
33
42
|
noteToolResult(_call: ToolCall, _result: ToolResult): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkMV7YI4WOcjs = require('./chunk-MV7YI4WO.cjs');
|
|
9
|
+
require('./chunk-KS3RYAYL.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
exports.__internal = _chunkMV7YI4WOcjs.__internal; exports.checkForUpdate = _chunkMV7YI4WOcjs.checkForUpdate; exports.getAutoUpdateDisabledReason = _chunkMV7YI4WOcjs.getAutoUpdateDisabledReason; exports.getCurrentVersion = _chunkMV7YI4WOcjs.getCurrentVersion; exports.getUpdateAvailable = _chunkMV7YI4WOcjs.getUpdateAvailable; exports.scheduleAutoInstallOnExit = _chunkMV7YI4WOcjs.scheduleAutoInstallOnExit;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cjhyy/code-shell",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Code Shell — general-purpose agent orchestration framework with a terminal coding preset",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"files": [
|
|
63
63
|
"dist",
|
|
64
64
|
"scripts/check-node.cjs",
|
|
65
|
+
"skills-builtin",
|
|
65
66
|
"README.md",
|
|
66
67
|
"LICENSE",
|
|
67
68
|
"CHANGELOG.md"
|