@rayss-dev/openclaude 0.30.3-by-rayss → 0.30.4-by-rayss
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/config/defaults/CLAUDE.md +90 -4
- package/config/settings-schema.json +59 -3
- package/dist/acp.mjs +234 -71
- package/dist/cli.mjs +30 -29
- package/dist/sdk.mjs +169 -38
- package/package.json +1 -1
package/dist/sdk.mjs
CHANGED
|
@@ -9490,7 +9490,7 @@ var init_version = __esm(() => {
|
|
|
9490
9490
|
import_semver = __toESM(require_semver2(), 1);
|
|
9491
9491
|
fallbackBuildVersion = (() => {
|
|
9492
9492
|
try {
|
|
9493
|
-
return "0.30.
|
|
9493
|
+
return "0.30.4-by-rayss";
|
|
9494
9494
|
} catch {
|
|
9495
9495
|
return "0.0.0";
|
|
9496
9496
|
}
|
|
@@ -69538,7 +69538,7 @@ function getAttributionHeader(fingerprint, policy) {
|
|
|
69538
69538
|
if (!policy.generate) {
|
|
69539
69539
|
return "";
|
|
69540
69540
|
}
|
|
69541
|
-
const version2 = `${"0.30.
|
|
69541
|
+
const version2 = `${"0.30.4-by-rayss"}.${fingerprint}`;
|
|
69542
69542
|
const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
|
|
69543
69543
|
const cch = "";
|
|
69544
69544
|
const workload = getWorkload();
|
|
@@ -103131,7 +103131,7 @@ var init_metadata = __esm(() => {
|
|
|
103131
103131
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
103132
103132
|
WHITESPACE_REGEX = /\s+/;
|
|
103133
103133
|
getVersionBase = memoize_default(() => {
|
|
103134
|
-
const match = "0.30.
|
|
103134
|
+
const match = "0.30.4-by-rayss".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
103135
103135
|
return match ? match[0] : undefined;
|
|
103136
103136
|
});
|
|
103137
103137
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -103171,9 +103171,9 @@ var init_metadata = __esm(() => {
|
|
|
103171
103171
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
103172
103172
|
isClaudeCodeAction: isEnvTruthy(process.env.CLAUDE_CODE_ACTION),
|
|
103173
103173
|
isClaudeAiAuth: isClaudeAISubscriber(),
|
|
103174
|
-
version: "0.30.
|
|
103174
|
+
version: "0.30.4-by-rayss",
|
|
103175
103175
|
versionBase: getVersionBase(),
|
|
103176
|
-
buildTime: "2026-09-
|
|
103176
|
+
buildTime: "2026-09-21T05:01:30.834Z",
|
|
103177
103177
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
103178
103178
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
103179
103179
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -111896,11 +111896,11 @@ var init_effort = __esm(() => {
|
|
|
111896
111896
|
|
|
111897
111897
|
// src/utils/userAgent.ts
|
|
111898
111898
|
function getClaudeCodeUserAgent() {
|
|
111899
|
-
return `claude-code/${"0.30.
|
|
111899
|
+
return `claude-code/${"0.30.4-by-rayss"}`;
|
|
111900
111900
|
}
|
|
111901
111901
|
function getOpenClaudeUserAgent() {
|
|
111902
111902
|
try {
|
|
111903
|
-
return `openclaude/${"0.30.
|
|
111903
|
+
return `openclaude/${"0.30.4-by-rayss"}`;
|
|
111904
111904
|
} catch {
|
|
111905
111905
|
return "openclaude/0.0.0";
|
|
111906
111906
|
}
|
|
@@ -111912,7 +111912,7 @@ function getUserAgent() {
|
|
|
111912
111912
|
const clientApp = process.env.CLAUDE_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}` : "";
|
|
111913
111913
|
const workload = getWorkload();
|
|
111914
111914
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
111915
|
-
return `claude-cli/${"0.30.
|
|
111915
|
+
return `claude-cli/${"0.30.4-by-rayss"} (${process.env.USER_TYPE}, ${process.env.CLAUDE_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
111916
111916
|
}
|
|
111917
111917
|
function getMCPUserAgent() {
|
|
111918
111918
|
const parts = [];
|
|
@@ -111926,7 +111926,7 @@ function getMCPUserAgent() {
|
|
|
111926
111926
|
parts.push(`client-app/${process.env.CLAUDE_AGENT_SDK_CLIENT_APP}`);
|
|
111927
111927
|
}
|
|
111928
111928
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
111929
|
-
return `claude-code/${"0.30.
|
|
111929
|
+
return `claude-code/${"0.30.4-by-rayss"}${suffix}`;
|
|
111930
111930
|
}
|
|
111931
111931
|
function getWebFetchUserAgent() {
|
|
111932
111932
|
const supportUrl = isFirstPartyAnthropicProvider() ? "https://support.anthropic.com/" : "https://github.com/rayss868/openclaude";
|
|
@@ -156070,7 +156070,7 @@ function computeFingerprint(messageText2, version2) {
|
|
|
156070
156070
|
}
|
|
156071
156071
|
function computeFingerprintFromMessages(messages) {
|
|
156072
156072
|
const firstMessageText = extractFirstMessageText(messages);
|
|
156073
|
-
return computeFingerprint(firstMessageText, "0.30.
|
|
156073
|
+
return computeFingerprint(firstMessageText, "0.30.4-by-rayss");
|
|
156074
156074
|
}
|
|
156075
156075
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
156076
156076
|
var init_fingerprint = () => {};
|
|
@@ -157437,7 +157437,7 @@ var init_client2 = __esm(() => {
|
|
|
157437
157437
|
const client = new Client({
|
|
157438
157438
|
name: "claude-code",
|
|
157439
157439
|
title: "OpenClaude",
|
|
157440
|
-
version: "0.30.
|
|
157440
|
+
version: "0.30.4-by-rayss",
|
|
157441
157441
|
description: "OpenClaude — coding-agent CLI for any LLM provider",
|
|
157442
157442
|
websiteUrl: PRODUCT_URL
|
|
157443
157443
|
}, {
|
|
@@ -162361,6 +162361,7 @@ __export(exports_claudemd, {
|
|
|
162361
162361
|
processMdRules: () => processMdRules,
|
|
162362
162362
|
processConditionedMdRules: () => processConditionedMdRules,
|
|
162363
162363
|
isMemoryFilePath: () => isMemoryFilePath,
|
|
162364
|
+
haveMemoryFilesChanged: () => haveMemoryFilesChanged,
|
|
162364
162365
|
hasExternalClaudeMdIncludes: () => hasExternalClaudeMdIncludes,
|
|
162365
162366
|
getMemoryFilesForNestedDirectory: () => getMemoryFilesForNestedDirectory,
|
|
162366
162367
|
getMemoryFiles: () => getMemoryFiles,
|
|
@@ -162371,7 +162372,9 @@ __export(exports_claudemd, {
|
|
|
162371
162372
|
getClaudeMds: () => getClaudeMds,
|
|
162372
162373
|
getAllMemoryFilePaths: () => getAllMemoryFilePaths,
|
|
162373
162374
|
filterInjectedMemoryFiles: () => filterInjectedMemoryFiles,
|
|
162375
|
+
clearMemoryFileSnapshot: () => clearMemoryFileSnapshot,
|
|
162374
162376
|
clearMemoryFileCaches: () => clearMemoryFileCaches,
|
|
162377
|
+
captureMemoryFileSnapshot: () => captureMemoryFileSnapshot,
|
|
162375
162378
|
MAX_MEMORY_CHARACTER_COUNT: () => MAX_MEMORY_CHARACTER_COUNT
|
|
162376
162379
|
});
|
|
162377
162380
|
import {
|
|
@@ -162688,6 +162691,53 @@ function resetGetMemoryFilesCache(reason = "session_start") {
|
|
|
162688
162691
|
shouldFireHook = true;
|
|
162689
162692
|
clearMemoryFileCaches();
|
|
162690
162693
|
}
|
|
162694
|
+
function captureMemoryFileSnapshot(files) {
|
|
162695
|
+
const fs2 = getFsImplementation();
|
|
162696
|
+
const snapshot = new Map;
|
|
162697
|
+
for (const file2 of files) {
|
|
162698
|
+
if (file2.content.trim().length === 0)
|
|
162699
|
+
continue;
|
|
162700
|
+
try {
|
|
162701
|
+
snapshot.set(normalizePathForComparison(file2.path), fs2.statSync(file2.path).mtimeMs);
|
|
162702
|
+
} catch {}
|
|
162703
|
+
}
|
|
162704
|
+
if (memoryFileMtimeSnapshot !== null) {
|
|
162705
|
+
let dirty = snapshot.size !== memoryFileMtimeSnapshot.size;
|
|
162706
|
+
if (!dirty) {
|
|
162707
|
+
for (const [path11, mtime] of snapshot) {
|
|
162708
|
+
if (memoryFileMtimeSnapshot.get(path11) !== mtime) {
|
|
162709
|
+
dirty = true;
|
|
162710
|
+
break;
|
|
162711
|
+
}
|
|
162712
|
+
}
|
|
162713
|
+
}
|
|
162714
|
+
if (dirty)
|
|
162715
|
+
memoryFilesDirty = true;
|
|
162716
|
+
}
|
|
162717
|
+
memoryFileMtimeSnapshot = snapshot;
|
|
162718
|
+
}
|
|
162719
|
+
function haveMemoryFilesChanged() {
|
|
162720
|
+
if (memoryFilesDirty) {
|
|
162721
|
+
memoryFilesDirty = false;
|
|
162722
|
+
return true;
|
|
162723
|
+
}
|
|
162724
|
+
if (memoryFileMtimeSnapshot === null)
|
|
162725
|
+
return false;
|
|
162726
|
+
const fs2 = getFsImplementation();
|
|
162727
|
+
for (const [path11, mtime] of memoryFileMtimeSnapshot) {
|
|
162728
|
+
try {
|
|
162729
|
+
if (fs2.statSync(path11).mtimeMs !== mtime)
|
|
162730
|
+
return true;
|
|
162731
|
+
} catch {
|
|
162732
|
+
return true;
|
|
162733
|
+
}
|
|
162734
|
+
}
|
|
162735
|
+
return false;
|
|
162736
|
+
}
|
|
162737
|
+
function clearMemoryFileSnapshot() {
|
|
162738
|
+
memoryFileMtimeSnapshot = null;
|
|
162739
|
+
memoryFilesDirty = false;
|
|
162740
|
+
}
|
|
162691
162741
|
function getLargeMemoryFiles(files) {
|
|
162692
162742
|
return files.filter((f) => f.content.length > MAX_MEMORY_CHARACTER_COUNT);
|
|
162693
162743
|
}
|
|
@@ -162809,7 +162859,7 @@ function getAllMemoryFilePaths(files, readFileState) {
|
|
|
162809
162859
|
}
|
|
162810
162860
|
return Array.from(paths2);
|
|
162811
162861
|
}
|
|
162812
|
-
var import_ignore, import_picomatch, teamMemPaths3, hasLoggedInitialLoad = false, MEMORY_INSTRUCTION_PROMPT = "Codebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default behavior and you MUST follow them exactly as written.", MAX_MEMORY_CHARACTER_COUNT = 40000, TEXT_FILE_EXTENSIONS, MAX_INCLUDE_DEPTH = 5, getMemoryFiles, nextEagerLoadReason = "session_start", shouldFireHook = true, getClaudeMds = (memoryFiles, filter2) => {
|
|
162862
|
+
var import_ignore, import_picomatch, teamMemPaths3, hasLoggedInitialLoad = false, MEMORY_INSTRUCTION_PROMPT = "Codebase and user instructions are shown below. Be sure to adhere to these instructions. IMPORTANT: These instructions OVERRIDE any default behavior and you MUST follow them exactly as written.", MAX_MEMORY_CHARACTER_COUNT = 40000, TEXT_FILE_EXTENSIONS, MAX_INCLUDE_DEPTH = 5, getMemoryFiles, nextEagerLoadReason = "session_start", shouldFireHook = true, memoryFileMtimeSnapshot = null, memoryFilesDirty = false, getClaudeMds = (memoryFiles, filter2) => {
|
|
162813
162863
|
const memories = [];
|
|
162814
162864
|
const skipProjectLevel = getFeatureValue_CACHED_MAY_BE_STALE("tengu_paper_halyard", false);
|
|
162815
162865
|
for (const file2 of memoryFiles) {
|
|
@@ -163113,6 +163163,7 @@ var init_claudemd = __esm(() => {
|
|
|
163113
163163
|
}
|
|
163114
163164
|
}
|
|
163115
163165
|
}
|
|
163166
|
+
captureMemoryFileSnapshot(result);
|
|
163116
163167
|
return result;
|
|
163117
163168
|
});
|
|
163118
163169
|
});
|
|
@@ -164475,7 +164526,32 @@ async function runRepoMapBuildWithTimeout({
|
|
|
164475
164526
|
}
|
|
164476
164527
|
return { result, timedOut: false };
|
|
164477
164528
|
}
|
|
164478
|
-
|
|
164529
|
+
function invalidateContextCachesIfMemoryFilesChanged() {
|
|
164530
|
+
if (!haveMemoryFilesChanged())
|
|
164531
|
+
return;
|
|
164532
|
+
clearMemoryFileCaches();
|
|
164533
|
+
clearMemoryFileSnapshot();
|
|
164534
|
+
getUserContext.cache.clear?.();
|
|
164535
|
+
getSystemContext.cache.clear?.();
|
|
164536
|
+
getRepoMapContext.cache.clear?.();
|
|
164537
|
+
}
|
|
164538
|
+
async function loadUserContext() {
|
|
164539
|
+
const startTime = Date.now();
|
|
164540
|
+
logForDiagnosticsNoPII("info", "user_context_started");
|
|
164541
|
+
const shouldDisableClaudeMd = isEnvTruthy(process.env.CLAUDE_CODE_DISABLE_CLAUDE_MDS) || isBareMode() && getAdditionalDirectoriesForClaudeMd().length === 0;
|
|
164542
|
+
const claudeMd = shouldDisableClaudeMd ? null : getClaudeMds(filterInjectedMemoryFiles(await getMemoryFiles()));
|
|
164543
|
+
setCachedClaudeMdContent(claudeMd || null);
|
|
164544
|
+
logForDiagnosticsNoPII("info", "user_context_completed", {
|
|
164545
|
+
duration_ms: Date.now() - startTime,
|
|
164546
|
+
claudemd_length: claudeMd?.length ?? 0,
|
|
164547
|
+
claudemd_disabled: Boolean(shouldDisableClaudeMd)
|
|
164548
|
+
});
|
|
164549
|
+
return {
|
|
164550
|
+
...claudeMd && { claudeMd },
|
|
164551
|
+
currentDate: `Today's date is ${getLocalISODate()}.`
|
|
164552
|
+
};
|
|
164553
|
+
}
|
|
164554
|
+
var MAX_STATUS_CHARS = 2000, REPO_MAP_CONTEXT_TIMEOUT_MS = 5000, REPO_MAP_TIMEOUT, REPO_MAP_CANCELLED, getGitStatus, getRepoMapContext, getSystemContext, loadUserContextMemoized, getUserContext;
|
|
164479
164555
|
var init_context3 = __esm(() => {
|
|
164480
164556
|
init_memoize();
|
|
164481
164557
|
init_state();
|
|
@@ -164621,22 +164697,11 @@ ${result.map}`;
|
|
|
164621
164697
|
...{}
|
|
164622
164698
|
};
|
|
164623
164699
|
});
|
|
164624
|
-
|
|
164625
|
-
|
|
164626
|
-
|
|
164627
|
-
|
|
164628
|
-
|
|
164629
|
-
setCachedClaudeMdContent(claudeMd || null);
|
|
164630
|
-
logForDiagnosticsNoPII("info", "user_context_completed", {
|
|
164631
|
-
duration_ms: Date.now() - startTime,
|
|
164632
|
-
claudemd_length: claudeMd?.length ?? 0,
|
|
164633
|
-
claudemd_disabled: Boolean(shouldDisableClaudeMd)
|
|
164634
|
-
});
|
|
164635
|
-
return {
|
|
164636
|
-
...claudeMd && { claudeMd },
|
|
164637
|
-
currentDate: `Today's date is ${getLocalISODate()}.`
|
|
164638
|
-
};
|
|
164639
|
-
});
|
|
164700
|
+
loadUserContextMemoized = memoize_default(loadUserContext);
|
|
164701
|
+
getUserContext = Object.assign(function getUserContext2() {
|
|
164702
|
+
invalidateContextCachesIfMemoryFilesChanged();
|
|
164703
|
+
return loadUserContextMemoized();
|
|
164704
|
+
}, { cache: loadUserContextMemoized.cache });
|
|
164640
164705
|
});
|
|
164641
164706
|
|
|
164642
164707
|
// src/services/api/dumpPrompts.ts
|
|
@@ -232987,7 +233052,7 @@ async function* queryLoop(params, consumedCommandUuids) {
|
|
|
232987
233052
|
agentStepLimit
|
|
232988
233053
|
} = state2;
|
|
232989
233054
|
const effectiveMaxOutputTokensOverride = maxOutputTokensOverride === undefined ? providerMaxOutputTokensCap : providerMaxOutputTokensCap === undefined ? maxOutputTokensOverride : Math.min(maxOutputTokensOverride, providerMaxOutputTokensCap);
|
|
232990
|
-
const pendingSkillPrefetch = skillPrefetch?.startSkillDiscoveryPrefetch(null, messages, toolUseContext);
|
|
233055
|
+
const pendingSkillPrefetch = isSkillSearchEnabled2() ? skillPrefetch?.startSkillDiscoveryPrefetch(null, messages, toolUseContext) : null;
|
|
232991
233056
|
yield { type: "stream_request_start" };
|
|
232992
233057
|
queryCheckpoint("query_fn_entry");
|
|
232993
233058
|
if (!toolUseContext.agentId) {
|
|
@@ -234375,7 +234440,7 @@ async function* queryLoop(params, consumedCommandUuids) {
|
|
|
234375
234440
|
__callDispose(__stack, _err, _hasErr);
|
|
234376
234441
|
}
|
|
234377
234442
|
}
|
|
234378
|
-
var reactiveCompact = null, contextCollapse, skillPrefetch, snipModule, taskSummaryModule, MAX_OUTPUT_TOKENS_RECOVERY_LIMIT = 3, MAX_CONTINUATION_NUDGES = 20;
|
|
234443
|
+
var reactiveCompact = null, contextCollapse, skillPrefetch, isSkillSearchEnabled2, snipModule, taskSummaryModule, MAX_OUTPUT_TOKENS_RECOVERY_LIMIT = 3, MAX_CONTINUATION_NUDGES = 20;
|
|
234379
234444
|
var init_query = __esm(() => {
|
|
234380
234445
|
init_withRetry();
|
|
234381
234446
|
init_controller();
|
|
@@ -234422,6 +234487,7 @@ var init_query = __esm(() => {
|
|
|
234422
234487
|
init_tokenBudget2();
|
|
234423
234488
|
contextCollapse = (init_contextCollapse(), __toCommonJS(exports_contextCollapse));
|
|
234424
234489
|
skillPrefetch = (init_prefetch(), __toCommonJS(exports_prefetch));
|
|
234490
|
+
({ isSkillSearchEnabled: isSkillSearchEnabled2 } = (init_featureCheck(), __toCommonJS(exports_featureCheck)));
|
|
234425
234491
|
snipModule = (init_snipCompact(), __toCommonJS(exports_snipCompact));
|
|
234426
234492
|
taskSummaryModule = __toCommonJS(exports_taskSummary);
|
|
234427
234493
|
});
|
|
@@ -234632,7 +234698,7 @@ function getAnthropicEnvMetadata() {
|
|
|
234632
234698
|
function getBuildAgeMinutes() {
|
|
234633
234699
|
if (false)
|
|
234634
234700
|
;
|
|
234635
|
-
const buildTime = new Date("2026-09-
|
|
234701
|
+
const buildTime = new Date("2026-09-21T05:01:30.834Z").getTime();
|
|
234636
234702
|
if (isNaN(buildTime))
|
|
234637
234703
|
return;
|
|
234638
234704
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -263444,7 +263510,7 @@ async function readLiteMetadata(filePath, fileSize, buf, sessionId) {
|
|
|
263444
263510
|
const teamName = extractJsonStringField(head, "teamName");
|
|
263445
263511
|
const agentSetting = extractJsonStringField(head, "agentSetting");
|
|
263446
263512
|
const firstPrompt = extractFirstPromptFromChunk(head) || extractJsonStringFieldPrefix(head, "content", 200) || extractJsonStringFieldPrefix(head, "text", 200) || "";
|
|
263447
|
-
const lastPrompt = extractLastJsonStringField(tail, "lastPrompt") ||
|
|
263513
|
+
const lastPrompt = extractLastJsonStringField(tail, "lastPrompt") || extractLastPromptFromChunk(tail) || "";
|
|
263448
263514
|
const customTitle = extractLastJsonStringField(tail, "customTitle") ?? extractLastJsonStringField(head, "customTitle") ?? extractLastJsonStringField(tail, "aiTitle") ?? extractLastJsonStringField(head, "aiTitle");
|
|
263449
263515
|
const summary = extractLastJsonStringField(tail, "summary");
|
|
263450
263516
|
const tagLine = tail.split(`
|
|
@@ -263559,6 +263625,71 @@ function extractFirstPromptFromChunk(chunk) {
|
|
|
263559
263625
|
;
|
|
263560
263626
|
return "";
|
|
263561
263627
|
}
|
|
263628
|
+
function extractLastPromptFromChunk(chunk) {
|
|
263629
|
+
let start = 0;
|
|
263630
|
+
let lastPrompt = "";
|
|
263631
|
+
while (start < chunk.length) {
|
|
263632
|
+
const newlineIdx = chunk.indexOf(`
|
|
263633
|
+
`, start);
|
|
263634
|
+
const line = newlineIdx >= 0 ? chunk.slice(start, newlineIdx) : chunk.slice(start);
|
|
263635
|
+
start = newlineIdx >= 0 ? newlineIdx + 1 : chunk.length;
|
|
263636
|
+
if (!line.includes('"type":"user"') && !line.includes('"type": "user"')) {
|
|
263637
|
+
continue;
|
|
263638
|
+
}
|
|
263639
|
+
if (line.includes('"tool_result"'))
|
|
263640
|
+
continue;
|
|
263641
|
+
if (line.includes('"isMeta":true') || line.includes('"isMeta": true'))
|
|
263642
|
+
continue;
|
|
263643
|
+
try {
|
|
263644
|
+
const entry = jsonParse(line);
|
|
263645
|
+
if (entry.type !== "user")
|
|
263646
|
+
continue;
|
|
263647
|
+
const message = entry.message;
|
|
263648
|
+
if (!message)
|
|
263649
|
+
continue;
|
|
263650
|
+
const content = message.content;
|
|
263651
|
+
const texts = [];
|
|
263652
|
+
if (typeof content === "string") {
|
|
263653
|
+
texts.push(content);
|
|
263654
|
+
} else if (Array.isArray(content)) {
|
|
263655
|
+
for (const block2 of content) {
|
|
263656
|
+
const b = block2;
|
|
263657
|
+
if (b.type === "text" && typeof b.text === "string") {
|
|
263658
|
+
texts.push(b.text);
|
|
263659
|
+
}
|
|
263660
|
+
}
|
|
263661
|
+
}
|
|
263662
|
+
for (const text of texts) {
|
|
263663
|
+
if (!text)
|
|
263664
|
+
continue;
|
|
263665
|
+
let result = text.replace(/\n/g, " ").trim();
|
|
263666
|
+
const commandNameTag = extractTag(result, COMMAND_NAME_TAG);
|
|
263667
|
+
if (commandNameTag) {
|
|
263668
|
+
const name = commandNameTag.replace(/^\//, "");
|
|
263669
|
+
const commandArgs = extractTag(result, "command-args")?.trim() || "";
|
|
263670
|
+
if (getBuiltInCommandNames().has(name) || !commandArgs)
|
|
263671
|
+
continue;
|
|
263672
|
+
lastPrompt = `${commandNameTag} ${commandArgs}`;
|
|
263673
|
+
continue;
|
|
263674
|
+
}
|
|
263675
|
+
const bashInput = extractTag(result, "bash-input");
|
|
263676
|
+
if (bashInput) {
|
|
263677
|
+
lastPrompt = `! ${bashInput}`;
|
|
263678
|
+
continue;
|
|
263679
|
+
}
|
|
263680
|
+
if (SKIP_FIRST_PROMPT_PATTERN2.test(result))
|
|
263681
|
+
continue;
|
|
263682
|
+
if (result.length > 200) {
|
|
263683
|
+
result = result.slice(0, 200).trim() + "…";
|
|
263684
|
+
}
|
|
263685
|
+
lastPrompt = result;
|
|
263686
|
+
}
|
|
263687
|
+
} catch {
|
|
263688
|
+
continue;
|
|
263689
|
+
}
|
|
263690
|
+
}
|
|
263691
|
+
return lastPrompt;
|
|
263692
|
+
}
|
|
263562
263693
|
function extractJsonStringFieldPrefix(text, key, maxLen) {
|
|
263563
263694
|
const patterns = [`"${key}":"`, `"${key}": "`];
|
|
263564
263695
|
for (const pattern of patterns) {
|
|
@@ -263715,7 +263846,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
263715
263846
|
init_slowOperations();
|
|
263716
263847
|
init_transcriptFileLock();
|
|
263717
263848
|
init_uuid();
|
|
263718
|
-
VERSION3 = typeof MACRO !== "undefined" ? "0.30.
|
|
263849
|
+
VERSION3 = typeof MACRO !== "undefined" ? "0.30.4-by-rayss" : "unknown";
|
|
263719
263850
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
263720
263851
|
TRANSCRIPT_COPY_CHUNK_BYTES = 64 * 1024;
|
|
263721
263852
|
transcriptRewriteHooksForTesting = {};
|
|
@@ -265186,7 +265317,7 @@ var init_filesystem = __esm(() => {
|
|
|
265186
265317
|
});
|
|
265187
265318
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
265188
265319
|
const nonce = randomBytes10(16).toString("hex");
|
|
265189
|
-
return join89(getClaudeTempDir(), "bundled-skills", "0.30.
|
|
265320
|
+
return join89(getClaudeTempDir(), "bundled-skills", "0.30.4-by-rayss", nonce);
|
|
265190
265321
|
});
|
|
265191
265322
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
265192
265323
|
});
|
|
@@ -271294,7 +271425,7 @@ function getSessionSpecificGuidanceSection(enabledTools, skillToolCommands) {
|
|
|
271294
271425
|
`For broader codebase exploration and deep research, use the ${AGENT_TOOL_NAME} tool with subagent_type=${EXPLORE_AGENT.agentType}. This is slower than using ${searchTools} directly, so use this only when a simple, directed search proves to be insufficient or when your task will clearly require more than ${EXPLORE_AGENT_MIN_QUERIES} queries.`
|
|
271295
271426
|
] : [],
|
|
271296
271427
|
hasSkills ? `/<skill-name> (e.g., /commit) is shorthand for users to invoke a user-invocable skill. When executed, the skill gets expanded to a full prompt. Use the ${SKILL_TOOL_NAME} tool to execute them. IMPORTANT: Only use ${SKILL_TOOL_NAME} for skills listed in its user-invocable skills section - do not guess or use built-in CLI commands.` : null,
|
|
271297
|
-
DISCOVER_SKILLS_TOOL_NAME2 !== null && hasSkills && enabledTools.has(DISCOVER_SKILLS_TOOL_NAME2) ? getDiscoverSkillsGuidance() : null,
|
|
271428
|
+
DISCOVER_SKILLS_TOOL_NAME2 !== null && hasSkills && enabledTools.has(DISCOVER_SKILLS_TOOL_NAME2) && skillSearchFeatureCheck?.isSkillSearchEnabled() ? getDiscoverSkillsGuidance() : null,
|
|
271298
271429
|
hasAgentTool && true && getFeatureValue_CACHED_MAY_BE_STALE("tengu_hive_evidence", false) ? `The contract: when non-trivial implementation happens on your turn, independent adversarial verification must happen before you report completion — regardless of who did the implementing (you directly, a fork you spawned, or a subagent). You are the one reporting to the user; you own the gate. Non-trivial means: 3+ file edits, backend/API changes, or infrastructure changes. Spawn the ${AGENT_TOOL_NAME} tool with subagent_type="${VERIFICATION_AGENT_TYPE}". Your own checks, caveats, and a fork's self-checks do NOT substitute — only the verifier assigns a verdict; you cannot self-assign PARTIAL. Pass the original user request, all files changed (by anyone), the approach, and the plan file path if applicable. Flag concerns if you have them but do NOT share test results or claim things work. On FAIL: fix, resume the verifier with its findings plus your fix, repeat until PASS. On PASS: spot-check it — re-run 2-3 commands from its report, confirm every PASS has a Command run block with output that matches your re-run. If any PASS lacks a command block or diverges, resume the verifier with the specifics. On PARTIAL (from the verifier): report what passed and what could not be verified.` : null
|
|
271299
271430
|
].filter((item) => item !== null);
|
|
271300
271431
|
if (items.length === 0)
|
|
@@ -279684,7 +279815,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
279684
279815
|
slash_commands: inputs.commands.filter((c7) => c7.userInvocable !== false).map((c7) => c7.name),
|
|
279685
279816
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
279686
279817
|
betas: getSdkBetas(),
|
|
279687
|
-
claude_code_version: "0.30.
|
|
279818
|
+
claude_code_version: "0.30.4-by-rayss",
|
|
279688
279819
|
output_style: outputStyle,
|
|
279689
279820
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
279690
279821
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -284306,4 +284437,4 @@ export {
|
|
|
284306
284437
|
AbortError
|
|
284307
284438
|
};
|
|
284308
284439
|
|
|
284309
|
-
//# debugId=
|
|
284440
|
+
//# debugId=D8B3C94220FA244264756E2164756E21
|
package/package.json
CHANGED