ur-agent 1.65.11 → 1.65.13
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 +36 -0
- package/dist/cli.js +1118 -493
- package/docs/VALIDATION.md +1 -1
- package/documentation/index.html +1 -1
- package/extensions/jetbrains-ur/build.gradle.kts +1 -1
- package/extensions/vscode-ur-inline-diffs/package.json +1 -1
- package/package.json +1 -1
- package/technical/04-tools.md +52 -8
- package/technical/05-providers-and-models.md +9 -6
- package/technical/09-multi-agent.md +12 -4
- package/technical/README.md +1 -1
package/dist/cli.js
CHANGED
|
@@ -56693,6 +56693,150 @@ var init_ollamaTuning = __esm(() => {
|
|
|
56693
56693
|
NUM_CTX_BUCKETS = [32768, 49152, 65536, 98304, 131072, 196608, 262144];
|
|
56694
56694
|
});
|
|
56695
56695
|
|
|
56696
|
+
// src/tools/ExitPlanModeTool/constants.ts
|
|
56697
|
+
var EXIT_PLAN_MODE_TOOL_NAME = "ExitPlanMode", EXIT_PLAN_MODE_V2_TOOL_NAME = "ExitPlanMode";
|
|
56698
|
+
|
|
56699
|
+
// src/tools/AskUserQuestionTool/prompt.ts
|
|
56700
|
+
var ASK_USER_QUESTION_TOOL_NAME = "AskUserQuestion", ASK_USER_QUESTION_TOOL_CHIP_WIDTH = 12, DESCRIPTION = "Asks the user multiple choice questions to gather information, clarify ambiguity, understand preferences, make decisions or offer them choices. This is the required way to present the user with a choice: whenever you would otherwise end a message by asking the user to pick between options or decide a direction, call this tool instead of asking in plain text, so the user gets a selectable menu rather than having to type a free-form answer.", PREVIEW_FEATURE_PROMPT, ASK_USER_QUESTION_TOOL_PROMPT;
|
|
56701
|
+
var init_prompt = __esm(() => {
|
|
56702
|
+
PREVIEW_FEATURE_PROMPT = {
|
|
56703
|
+
markdown: `
|
|
56704
|
+
Preview feature:
|
|
56705
|
+
Use the optional \`preview\` field on options when presenting concrete artifacts that users need to visually compare:
|
|
56706
|
+
- ASCII mockups of UI layouts or components
|
|
56707
|
+
- Code snippets showing different implementations
|
|
56708
|
+
- Diagram variations
|
|
56709
|
+
- Configuration examples
|
|
56710
|
+
|
|
56711
|
+
Preview content is rendered as markdown in a monospace box. Multi-line text with newlines is supported. When any option has a preview, the UI switches to a side-by-side layout with a vertical option list on the left and preview on the right. Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).
|
|
56712
|
+
`,
|
|
56713
|
+
html: `
|
|
56714
|
+
Preview feature:
|
|
56715
|
+
Use the optional \`preview\` field on options when presenting concrete artifacts that users need to visually compare:
|
|
56716
|
+
- Plain-text or ASCII mockups of UI layouts or components
|
|
56717
|
+
- Inert code snippets showing different implementations
|
|
56718
|
+
- Textual visual comparisons or diagrams
|
|
56719
|
+
|
|
56720
|
+
Preview content is untrusted text: raw HTML is not accepted or executed. It is escaped and rendered as inert preformatted text. Do not include HTML tags, attributes, URLs, scripts, styles, event handlers, or other executable markup. Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).
|
|
56721
|
+
`
|
|
56722
|
+
};
|
|
56723
|
+
ASK_USER_QUESTION_TOOL_PROMPT = `Use this tool when you need to ask the user questions during execution. This allows you to:
|
|
56724
|
+
1. Gather user preferences or requirements
|
|
56725
|
+
2. Clarify ambiguous instructions
|
|
56726
|
+
3. Get decisions on implementation choices as you work
|
|
56727
|
+
4. Offer choices to the user about what direction to take.
|
|
56728
|
+
|
|
56729
|
+
Strongly prefer this tool over asking a question in plain assistant text. Any time your reply would end with a question that offers the user options or asks them to choose a direction (e.g. "Would you like A or B?", "Which approach should I take?", "Want me to do X or Y?"), call this tool with those options instead so the user gets a selectable arrow-key menu. Only ask in plain text when the answer is genuinely open-ended and cannot be expressed as a small set of choices.
|
|
56730
|
+
|
|
56731
|
+
Strict input hierarchy:
|
|
56732
|
+
- Invoke the tool with exactly one top-level \`questions\` array containing 1-4 complete question objects.
|
|
56733
|
+
- Every question object contains \`question\`, a concise \`header\` (maximum 12 characters), and an \`options\` array with 2-8 option objects. Use \`multiSelect: true\` only when more than one choice may apply.
|
|
56734
|
+
- Every option object contains a \`label\`. Add \`description\` only when it contributes a real consequence, trade-off, or limitation; \`preview\` is optional.
|
|
56735
|
+
- Keep each question and its own options nested together. Never put option rows directly in the top-level \`questions\` array, and never send incomplete header/prompt-only entries.
|
|
56736
|
+
|
|
56737
|
+
Canonical valid tool arguments (invoke the structured tool; do not print this object as prose):
|
|
56738
|
+
{"questions":[{"question":"Which database should we use?","header":"Database","options":[{"label":"PostgreSQL (Recommended)","description":"Strong consistency and concurrency; requires a running server and migrations."},{"label":"SQLite","description":"Zero setup and a single file; unsuitable for multiple concurrent writers."}],"multiSelect":false}]}
|
|
56739
|
+
|
|
56740
|
+
Usage notes:
|
|
56741
|
+
- Users will always be able to select "Other" to provide custom text input, so it is safe to offer choices even when you are unsure you have listed every option
|
|
56742
|
+
- Use multiSelect: true to allow multiple answers to be selected for a question
|
|
56743
|
+
- If you recommend a specific option, make that the first option in the list and add "(Recommended)" at the end of the label
|
|
56744
|
+
- Do not over-question. Ask only decisions that materially affect the result and cannot be inferred safely. If more than four decisions are truly needed, ask the most blocking 1-4 first and ask the remainder in a later round.
|
|
56745
|
+
|
|
56746
|
+
Writing the three fields \u2014 they must each carry DIFFERENT information:
|
|
56747
|
+
- \`header\` names the dimension being decided ("Database", "Auth method"). It is not a shortened copy of the question.
|
|
56748
|
+
- \`label\` names the choice ("PostgreSQL"). It is not a restatement of the question.
|
|
56749
|
+
- \`description\` says what happens if this is picked and what it costs \u2014 the trade-off, limitation or consequence the label does not already convey. It is the only field with room to be genuinely informative, so it must not paraphrase the label back to the user.
|
|
56750
|
+
|
|
56751
|
+
A description that can be derived from reading the label is wasted space and makes the menu harder to use, not easier. Before writing one, ask: does this tell the user something they could not already see? If not, replace it with the thing that actually distinguishes this option from its neighbours.
|
|
56752
|
+
|
|
56753
|
+
Bad \u2014 description restates the label:
|
|
56754
|
+
question: "Which database should we use?"
|
|
56755
|
+
header: "Which DB" (repeats the question)
|
|
56756
|
+
label: "Use PostgreSQL" description: "Use PostgreSQL as the database."
|
|
56757
|
+
|
|
56758
|
+
Good \u2014 each field adds something:
|
|
56759
|
+
question: "Which database should we use?"
|
|
56760
|
+
header: "Database"
|
|
56761
|
+
label: "PostgreSQL" description: "Relational with strong consistency; needs a running server and a migration step."
|
|
56762
|
+
label: "SQLite" description: "Zero setup, single file; no concurrent writers, so it will not survive multiple workers."
|
|
56763
|
+
|
|
56764
|
+
Plan mode note: In plan mode, use this tool to clarify requirements or choose between approaches BEFORE finalizing your plan. Do NOT use this tool to ask "Is my plan ready?" or "Should I proceed?" - use ${EXIT_PLAN_MODE_TOOL_NAME} for plan approval. IMPORTANT: Do not reference "the plan" in your questions (e.g., "Do you have feedback about the plan?", "Does the plan look good?") because the user cannot see the plan in the UI until you call ${EXIT_PLAN_MODE_TOOL_NAME}. If you need plan approval, use ${EXIT_PLAN_MODE_TOOL_NAME} instead.
|
|
56765
|
+
`;
|
|
56766
|
+
});
|
|
56767
|
+
|
|
56768
|
+
// src/tools/AskUserQuestionTool/normalization.ts
|
|
56769
|
+
function objectValue(value) {
|
|
56770
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
56771
|
+
}
|
|
56772
|
+
function sliceWithoutSplittingSurrogate(value, max) {
|
|
56773
|
+
let result = value.slice(0, max);
|
|
56774
|
+
if (result.length > 0 && /[\uD800-\uDBFF]/.test(result[result.length - 1])) {
|
|
56775
|
+
result = result.slice(0, -1);
|
|
56776
|
+
}
|
|
56777
|
+
return result;
|
|
56778
|
+
}
|
|
56779
|
+
function headerFromQuestion(question, index2) {
|
|
56780
|
+
const word = question.replace(/[^A-Za-z0-9]+/g, " ").split(/\s+/).find((part) => part && !HEADER_STOP_WORDS.has(part.toLowerCase())) ?? `Question ${index2 + 1}`;
|
|
56781
|
+
return sliceWithoutSplittingSurrogate(word, ASK_USER_QUESTION_TOOL_CHIP_WIDTH);
|
|
56782
|
+
}
|
|
56783
|
+
function normalizeQuestionHeader(header, question, index2) {
|
|
56784
|
+
const trimmed = header.trim();
|
|
56785
|
+
if (trimmed.length <= ASK_USER_QUESTION_TOOL_CHIP_WIDTH || trimmed.length > MAX_RECOVERABLE_HEADER_CHARS || CONTROL_OR_ANSI_RE.test(trimmed)) {
|
|
56786
|
+
return trimmed;
|
|
56787
|
+
}
|
|
56788
|
+
const firstWord = trimmed.split(/\s+/)[0] ?? "";
|
|
56789
|
+
const compact = sliceWithoutSplittingSurrogate(firstWord, ASK_USER_QUESTION_TOOL_CHIP_WIDTH);
|
|
56790
|
+
return compact || headerFromQuestion(question, index2);
|
|
56791
|
+
}
|
|
56792
|
+
function normalizeAskQuestionHeaders(value) {
|
|
56793
|
+
if (!Array.isArray(value.questions))
|
|
56794
|
+
return value;
|
|
56795
|
+
let changed = false;
|
|
56796
|
+
const questions = value.questions.map((candidate, index2) => {
|
|
56797
|
+
const question = objectValue(candidate);
|
|
56798
|
+
if (!question || typeof question.header !== "string" || typeof question.question !== "string") {
|
|
56799
|
+
return candidate;
|
|
56800
|
+
}
|
|
56801
|
+
const header = normalizeQuestionHeader(question.header, question.question, index2);
|
|
56802
|
+
if (header === question.header)
|
|
56803
|
+
return candidate;
|
|
56804
|
+
changed = true;
|
|
56805
|
+
return { ...question, header };
|
|
56806
|
+
});
|
|
56807
|
+
return changed ? { ...value, questions } : value;
|
|
56808
|
+
}
|
|
56809
|
+
var MAX_RECOVERABLE_HEADER_CHARS = 500, CONTROL_OR_ANSI_RE, HEADER_STOP_WORDS;
|
|
56810
|
+
var init_normalization = __esm(() => {
|
|
56811
|
+
init_prompt();
|
|
56812
|
+
CONTROL_OR_ANSI_RE = /[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]|\u001B\[/;
|
|
56813
|
+
HEADER_STOP_WORDS = new Set([
|
|
56814
|
+
"a",
|
|
56815
|
+
"about",
|
|
56816
|
+
"also",
|
|
56817
|
+
"an",
|
|
56818
|
+
"are",
|
|
56819
|
+
"be",
|
|
56820
|
+
"do",
|
|
56821
|
+
"does",
|
|
56822
|
+
"for",
|
|
56823
|
+
"is",
|
|
56824
|
+
"or",
|
|
56825
|
+
"should",
|
|
56826
|
+
"support",
|
|
56827
|
+
"that",
|
|
56828
|
+
"the",
|
|
56829
|
+
"this",
|
|
56830
|
+
"to",
|
|
56831
|
+
"want",
|
|
56832
|
+
"what",
|
|
56833
|
+
"which",
|
|
56834
|
+
"with",
|
|
56835
|
+
"without",
|
|
56836
|
+
"you"
|
|
56837
|
+
]);
|
|
56838
|
+
});
|
|
56839
|
+
|
|
56696
56840
|
// src/cli/transports/kimiToolCalls.ts
|
|
56697
56841
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
56698
56842
|
function parsedToolCallId(prefix, index2) {
|
|
@@ -56918,38 +57062,9 @@ function removableLineRange(text, start, end) {
|
|
|
56918
57062
|
return null;
|
|
56919
57063
|
return { prefixEnd: lineStart, end: end + after[0].length };
|
|
56920
57064
|
}
|
|
56921
|
-
function
|
|
57065
|
+
function objectValue2(value) {
|
|
56922
57066
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
56923
57067
|
}
|
|
56924
|
-
function headerFromQuestion(question, index2) {
|
|
56925
|
-
const stopWords = new Set([
|
|
56926
|
-
"a",
|
|
56927
|
-
"about",
|
|
56928
|
-
"also",
|
|
56929
|
-
"an",
|
|
56930
|
-
"are",
|
|
56931
|
-
"be",
|
|
56932
|
-
"do",
|
|
56933
|
-
"does",
|
|
56934
|
-
"for",
|
|
56935
|
-
"is",
|
|
56936
|
-
"or",
|
|
56937
|
-
"should",
|
|
56938
|
-
"support",
|
|
56939
|
-
"that",
|
|
56940
|
-
"the",
|
|
56941
|
-
"this",
|
|
56942
|
-
"to",
|
|
56943
|
-
"want",
|
|
56944
|
-
"what",
|
|
56945
|
-
"which",
|
|
56946
|
-
"with",
|
|
56947
|
-
"without",
|
|
56948
|
-
"you"
|
|
56949
|
-
]);
|
|
56950
|
-
const word = question.replace(/[^A-Za-z0-9]+/g, " ").split(/\s+/).find((part) => part && !stopWords.has(part.toLowerCase())) ?? `Question ${index2 + 1}`;
|
|
56951
|
-
return word.slice(0, 12);
|
|
56952
|
-
}
|
|
56953
57068
|
function stringField(input, names) {
|
|
56954
57069
|
for (const name of names) {
|
|
56955
57070
|
const value = input[name];
|
|
@@ -56959,7 +57074,7 @@ function stringField(input, names) {
|
|
|
56959
57074
|
return "";
|
|
56960
57075
|
}
|
|
56961
57076
|
function normalizeQuestionOption(value) {
|
|
56962
|
-
const option =
|
|
57077
|
+
const option = objectValue2(value);
|
|
56963
57078
|
if (!option)
|
|
56964
57079
|
return null;
|
|
56965
57080
|
if (!sameKeys(option, ["label"], ["description", "preview"]))
|
|
@@ -56979,7 +57094,7 @@ function normalizeQuestionOption(value) {
|
|
|
56979
57094
|
};
|
|
56980
57095
|
}
|
|
56981
57096
|
function normalizeQuestion(value, index2) {
|
|
56982
|
-
const question =
|
|
57097
|
+
const question = objectValue2(value);
|
|
56983
57098
|
if (!question)
|
|
56984
57099
|
return null;
|
|
56985
57100
|
const questionText = stringField(question, [
|
|
@@ -57001,7 +57116,7 @@ function normalizeQuestion(value, index2) {
|
|
|
57001
57116
|
const options = normalizedOptions;
|
|
57002
57117
|
if (options.length < 2 || options.length > 8)
|
|
57003
57118
|
return null;
|
|
57004
|
-
const header = typeof question.header === "string" && question.header.trim() ? question.header
|
|
57119
|
+
const header = typeof question.header === "string" && question.header.trim() ? normalizeQuestionHeader(question.header, questionText, index2) : headerFromQuestion(questionText, index2);
|
|
57005
57120
|
return {
|
|
57006
57121
|
question: questionText,
|
|
57007
57122
|
header,
|
|
@@ -57018,7 +57133,7 @@ function normalizeAskUserQuestionInput(input) {
|
|
|
57018
57133
|
return null;
|
|
57019
57134
|
return {
|
|
57020
57135
|
questions,
|
|
57021
|
-
...
|
|
57136
|
+
...objectValue2(input.metadata) ? { metadata: input.metadata } : {}
|
|
57022
57137
|
};
|
|
57023
57138
|
}
|
|
57024
57139
|
function stringArray(value) {
|
|
@@ -57084,7 +57199,7 @@ function normalizeTaskUpdateInput(input) {
|
|
|
57084
57199
|
"metadata"
|
|
57085
57200
|
];
|
|
57086
57201
|
const allowedStatuses = new Set(["pending", "in_progress", "completed", "deleted"]);
|
|
57087
|
-
if (!sameKeys(input, ["taskId"], updateFields) || typeof input.taskId !== "string" || !updateFields.some((field) => Object.prototype.hasOwnProperty.call(input, field)) || input.subject !== undefined && typeof input.subject !== "string" || input.description !== undefined && typeof input.description !== "string" || input.activeForm !== undefined && typeof input.activeForm !== "string" || input.status !== undefined && (typeof input.status !== "string" || !allowedStatuses.has(input.status)) || input.addBlocks !== undefined && !stringArray(input.addBlocks) || input.addBlockedBy !== undefined && !stringArray(input.addBlockedBy) || input.owner !== undefined && typeof input.owner !== "string" || input.metadata !== undefined && !
|
|
57202
|
+
if (!sameKeys(input, ["taskId"], updateFields) || typeof input.taskId !== "string" || !updateFields.some((field) => Object.prototype.hasOwnProperty.call(input, field)) || input.subject !== undefined && typeof input.subject !== "string" || input.description !== undefined && typeof input.description !== "string" || input.activeForm !== undefined && typeof input.activeForm !== "string" || input.status !== undefined && (typeof input.status !== "string" || !allowedStatuses.has(input.status)) || input.addBlocks !== undefined && !stringArray(input.addBlocks) || input.addBlockedBy !== undefined && !stringArray(input.addBlockedBy) || input.owner !== undefined && typeof input.owner !== "string" || input.metadata !== undefined && !objectValue2(input.metadata)) {
|
|
57088
57203
|
return null;
|
|
57089
57204
|
}
|
|
57090
57205
|
return input;
|
|
@@ -57101,10 +57216,11 @@ function maybeBareJsonToolCall(text, availableToolNames, index2) {
|
|
|
57101
57216
|
if (!hasTool(availableToolNames, name)) {
|
|
57102
57217
|
return null;
|
|
57103
57218
|
}
|
|
57219
|
+
const wrappedInput = input.input;
|
|
57104
57220
|
return {
|
|
57105
57221
|
id: parsedToolCallId("bare", index2),
|
|
57106
57222
|
name,
|
|
57107
|
-
input:
|
|
57223
|
+
input: name === "AskUserQuestion" ? normalizeAskQuestionHeaders(wrappedInput) : wrappedInput
|
|
57108
57224
|
};
|
|
57109
57225
|
}
|
|
57110
57226
|
if (hasTool(availableToolNames, "TaskCreate") && sameKeys(input, ["subject", "description"], ["activeForm", "metadata"]) && typeof input.subject === "string" && typeof input.description === "string" && (input.activeForm === undefined || typeof input.activeForm === "string") && (input.metadata === undefined || typeof input.metadata === "object" && input.metadata !== null && !Array.isArray(input.metadata))) {
|
|
@@ -57308,6 +57424,7 @@ function synthesizeKimiToolCalls(message) {
|
|
|
57308
57424
|
var SECTION_RE, CALL_RE, STRAY_RE, KimiToolCallParseError;
|
|
57309
57425
|
var init_kimiToolCalls = __esm(() => {
|
|
57310
57426
|
init_json();
|
|
57427
|
+
init_normalization();
|
|
57311
57428
|
SECTION_RE = /<\|tool_calls_section_begin\|>([\s\S]*?)<\|tool_calls_section_end\|>/g;
|
|
57312
57429
|
CALL_RE = /<\|tool_call_begin\|>([\s\S]*?)<\|tool_call_argument_begin\|>([\s\S]*?)<\|tool_call_end\|>/g;
|
|
57313
57430
|
STRAY_RE = /<\|tool_calls?_section_(?:begin|end)\|>|<\|tool_call_(?:begin|end|argument_begin)\|>/g;
|
|
@@ -57328,6 +57445,7 @@ __export(exports_ollama, {
|
|
|
57328
57445
|
mergeToolCalls: () => mergeToolCalls,
|
|
57329
57446
|
isOllamaCloudModel: () => isOllamaCloudModel2,
|
|
57330
57447
|
getOllamaRequestTimeoutMs: () => getOllamaRequestTimeoutMs,
|
|
57448
|
+
getOllamaModelDefaultTimeoutMs: () => getOllamaModelDefaultTimeoutMs,
|
|
57331
57449
|
getEffectiveOllamaBaseUrl: () => getEffectiveOllamaBaseUrl,
|
|
57332
57450
|
createOllamaURHQClient: () => createOllamaURHQClient,
|
|
57333
57451
|
consumePendingProviderNotice: () => consumePendingProviderNotice,
|
|
@@ -57480,14 +57598,21 @@ function getOllamaRequestTimeoutMs(options, env4 = process.env, model) {
|
|
|
57480
57598
|
if (isTruthyEnv(env4.UR_CODE_REMOTE)) {
|
|
57481
57599
|
return REMOTE_OLLAMA_REQUEST_TIMEOUT_MS;
|
|
57482
57600
|
}
|
|
57601
|
+
return getOllamaModelDefaultTimeoutMs(model);
|
|
57602
|
+
}
|
|
57603
|
+
function isOllamaCloudModel2(model) {
|
|
57604
|
+
return model?.trim().toLowerCase().endsWith(":cloud") ?? false;
|
|
57605
|
+
}
|
|
57606
|
+
function getOllamaModelDefaultTimeoutMs(model) {
|
|
57607
|
+
const normalized = model?.trim().toLowerCase() ?? "";
|
|
57608
|
+
if (/^kimi-k2\.7(?:[-.:]|$)/.test(normalized) && isOllamaCloudModel2(model)) {
|
|
57609
|
+
return KIMI_CLOUD_REQUEST_TIMEOUT_MS;
|
|
57610
|
+
}
|
|
57483
57611
|
if (isOllamaCloudModel2(model)) {
|
|
57484
57612
|
return CLOUD_OLLAMA_REQUEST_TIMEOUT_MS;
|
|
57485
57613
|
}
|
|
57486
57614
|
return DEFAULT_OLLAMA_REQUEST_TIMEOUT_MS;
|
|
57487
57615
|
}
|
|
57488
|
-
function isOllamaCloudModel2(model) {
|
|
57489
|
-
return model?.trim().toLowerCase().endsWith(":cloud") ?? false;
|
|
57490
|
-
}
|
|
57491
57616
|
function isTruthyEnv(value) {
|
|
57492
57617
|
if (!value) {
|
|
57493
57618
|
return false;
|
|
@@ -58416,7 +58541,7 @@ function parseToolInput(input) {
|
|
|
58416
58541
|
}
|
|
58417
58542
|
return normalized;
|
|
58418
58543
|
}
|
|
58419
|
-
var DEFAULT_OLLAMA_REQUEST_TIMEOUT_MS = 300000, REMOTE_OLLAMA_REQUEST_TIMEOUT_MS = 120000, CLOUD_OLLAMA_REQUEST_TIMEOUT_MS = 120000, OLLAMA_GATEWAY_TIMEOUT_MESSAGE = "Ollama gateway timed out while waiting for the model to respond. Check the selected Ollama endpoint or increase API_TIMEOUT_MS if the model needs more time.", ollamaModelCapabilitiesCache, warnedToolsUnsupportedModels, TEXT_TOOL_CALL_HINT, pendingProviderNotice = null, LEVELED_THINK_MODEL_RE;
|
|
58544
|
+
var DEFAULT_OLLAMA_REQUEST_TIMEOUT_MS = 300000, REMOTE_OLLAMA_REQUEST_TIMEOUT_MS = 120000, CLOUD_OLLAMA_REQUEST_TIMEOUT_MS = 120000, KIMI_CLOUD_REQUEST_TIMEOUT_MS = 300000, OLLAMA_GATEWAY_TIMEOUT_MESSAGE = "Ollama gateway timed out while waiting for the model to respond. Check the selected Ollama endpoint or increase API_TIMEOUT_MS if the model needs more time.", ollamaModelCapabilitiesCache, warnedToolsUnsupportedModels, TEXT_TOOL_CALL_HINT, pendingProviderNotice = null, LEVELED_THINK_MODEL_RE;
|
|
58420
58545
|
var init_ollama = __esm(() => {
|
|
58421
58546
|
init_urhq_sdk();
|
|
58422
58547
|
init_ollamaModels();
|
|
@@ -75436,7 +75561,7 @@ var init_auth = __esm(() => {
|
|
|
75436
75561
|
|
|
75437
75562
|
// src/utils/userAgent.ts
|
|
75438
75563
|
function getURCodeUserAgent() {
|
|
75439
|
-
return `ur/${"1.65.
|
|
75564
|
+
return `ur/${"1.65.13"}`;
|
|
75440
75565
|
}
|
|
75441
75566
|
|
|
75442
75567
|
// src/utils/workloadContext.ts
|
|
@@ -75458,7 +75583,7 @@ function getUserAgent() {
|
|
|
75458
75583
|
const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
|
|
75459
75584
|
const workload = getWorkload();
|
|
75460
75585
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
75461
|
-
return `ur-cli/${"1.65.
|
|
75586
|
+
return `ur-cli/${"1.65.13"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
75462
75587
|
}
|
|
75463
75588
|
function getMCPUserAgent() {
|
|
75464
75589
|
const parts = [];
|
|
@@ -75472,7 +75597,7 @@ function getMCPUserAgent() {
|
|
|
75472
75597
|
parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
|
|
75473
75598
|
}
|
|
75474
75599
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
75475
|
-
return `ur/${"1.65.
|
|
75600
|
+
return `ur/${"1.65.13"}${suffix}`;
|
|
75476
75601
|
}
|
|
75477
75602
|
function getWebFetchUserAgent() {
|
|
75478
75603
|
return `UR-User (${getURCodeUserAgent()})`;
|
|
@@ -75610,7 +75735,7 @@ var init_user = __esm(() => {
|
|
|
75610
75735
|
deviceId,
|
|
75611
75736
|
sessionId: getSessionId(),
|
|
75612
75737
|
email: getEmail(),
|
|
75613
|
-
appVersion: "1.65.
|
|
75738
|
+
appVersion: "1.65.13",
|
|
75614
75739
|
platform: getHostPlatformForAnalytics(),
|
|
75615
75740
|
organizationUuid,
|
|
75616
75741
|
accountUuid,
|
|
@@ -83810,7 +83935,7 @@ var init_metadata = __esm(() => {
|
|
|
83810
83935
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
83811
83936
|
WHITESPACE_REGEX = /\s+/;
|
|
83812
83937
|
getVersionBase = memoize_default(() => {
|
|
83813
|
-
const match = "1.65.
|
|
83938
|
+
const match = "1.65.13".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
83814
83939
|
return match ? match[0] : undefined;
|
|
83815
83940
|
});
|
|
83816
83941
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -83850,7 +83975,7 @@ var init_metadata = __esm(() => {
|
|
|
83850
83975
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
83851
83976
|
isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
|
|
83852
83977
|
isURAiAuth: isURAISubscriber(),
|
|
83853
|
-
version: "1.65.
|
|
83978
|
+
version: "1.65.13",
|
|
83854
83979
|
versionBase: getVersionBase(),
|
|
83855
83980
|
buildTime: "",
|
|
83856
83981
|
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
@@ -84520,7 +84645,7 @@ function initialize1PEventLogging() {
|
|
|
84520
84645
|
const platform2 = getPlatform();
|
|
84521
84646
|
const attributes = {
|
|
84522
84647
|
[import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
|
|
84523
|
-
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.65.
|
|
84648
|
+
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.65.13"
|
|
84524
84649
|
};
|
|
84525
84650
|
if (platform2 === "wsl") {
|
|
84526
84651
|
const wslVersion = getWslVersion();
|
|
@@ -84548,7 +84673,7 @@ function initialize1PEventLogging() {
|
|
|
84548
84673
|
})
|
|
84549
84674
|
]
|
|
84550
84675
|
});
|
|
84551
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.65.
|
|
84676
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.65.13");
|
|
84552
84677
|
}
|
|
84553
84678
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
84554
84679
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -86608,7 +86733,7 @@ var init_constants2 = __esm(() => {
|
|
|
86608
86733
|
var TASK_OUTPUT_TOOL_NAME = "TaskOutput";
|
|
86609
86734
|
|
|
86610
86735
|
// src/tools/TaskStopTool/prompt.ts
|
|
86611
|
-
var TASK_STOP_TOOL_NAME = "TaskStop",
|
|
86736
|
+
var TASK_STOP_TOOL_NAME = "TaskStop", DESCRIPTION2 = `
|
|
86612
86737
|
- Stops a running background task by its ID
|
|
86613
86738
|
- Takes a task_id parameter identifying the task to stop
|
|
86614
86739
|
- Returns a success or failure status
|
|
@@ -94436,7 +94561,7 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
|
|
|
94436
94561
|
function formatA2AAgentCard(options = {}, pretty = true) {
|
|
94437
94562
|
return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
|
|
94438
94563
|
}
|
|
94439
|
-
var urVersion = "1.65.
|
|
94564
|
+
var urVersion = "1.65.13", researchSnapshotDate = "2026-07-15", coverage, priorityRoadmap;
|
|
94440
94565
|
var init_trends = __esm(() => {
|
|
94441
94566
|
init_a2aCardSignature();
|
|
94442
94567
|
coverage = [
|
|
@@ -97239,7 +97364,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
97239
97364
|
if (!isAttributionHeaderEnabled()) {
|
|
97240
97365
|
return "";
|
|
97241
97366
|
}
|
|
97242
|
-
const version2 = `${"1.65.
|
|
97367
|
+
const version2 = `${"1.65.13"}.${fingerprint}`;
|
|
97243
97368
|
const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
|
|
97244
97369
|
const cch = "";
|
|
97245
97370
|
const workload = getWorkload();
|
|
@@ -97680,7 +97805,7 @@ function getDescription() {
|
|
|
97680
97805
|
`;
|
|
97681
97806
|
}
|
|
97682
97807
|
var GREP_TOOL_NAME = "Grep";
|
|
97683
|
-
var
|
|
97808
|
+
var init_prompt2 = __esm(() => {
|
|
97684
97809
|
init_constants2();
|
|
97685
97810
|
});
|
|
97686
97811
|
|
|
@@ -97745,8 +97870,8 @@ ${lineFormat}
|
|
|
97745
97870
|
- You will regularly be asked to read screenshots. If the user provides a path to a screenshot, ALWAYS use this tool to view the file at the path. This tool will work with all temporary file paths.
|
|
97746
97871
|
- If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.`;
|
|
97747
97872
|
}
|
|
97748
|
-
var FILE_READ_TOOL_NAME = "Read", FILE_UNCHANGED_STUB = "File unchanged since last read. The content from the earlier Read tool_result in this conversation is still current \u2014 refer to that instead of re-reading.", MAX_LINES_TO_READ = 2000,
|
|
97749
|
-
var
|
|
97873
|
+
var FILE_READ_TOOL_NAME = "Read", FILE_UNCHANGED_STUB = "File unchanged since last read. The content from the earlier Read tool_result in this conversation is still current \u2014 refer to that instead of re-reading.", MAX_LINES_TO_READ = 2000, DESCRIPTION3 = "Read a file from the local filesystem.", LINE_FORMAT_INSTRUCTION = "- Results are returned using cat -n format, with line numbers starting at 1", OFFSET_INSTRUCTION_DEFAULT = "- You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters", OFFSET_INSTRUCTION_TARGETED = "- When you already know which part of the file you need, only read that part. This can be important for larger files.";
|
|
97874
|
+
var init_prompt3 = __esm(() => {
|
|
97750
97875
|
init_pdfUtils();
|
|
97751
97876
|
});
|
|
97752
97877
|
|
|
@@ -97769,12 +97894,12 @@ Usage:
|
|
|
97769
97894
|
- Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.`;
|
|
97770
97895
|
}
|
|
97771
97896
|
var FILE_WRITE_TOOL_NAME = "Write";
|
|
97772
|
-
var
|
|
97773
|
-
|
|
97897
|
+
var init_prompt4 = __esm(() => {
|
|
97898
|
+
init_prompt3();
|
|
97774
97899
|
});
|
|
97775
97900
|
|
|
97776
97901
|
// src/tools/GlobTool/prompt.ts
|
|
97777
|
-
var GLOB_TOOL_NAME = "Glob",
|
|
97902
|
+
var GLOB_TOOL_NAME = "Glob", DESCRIPTION4 = `- Fast file pattern matching tool that works with any codebase size
|
|
97778
97903
|
- Supports glob patterns like "**/*.js" or "src/**/*.ts"
|
|
97779
97904
|
- Returns matching file paths sorted by modification time
|
|
97780
97905
|
- Use this tool when you need to find files by name patterns
|
|
@@ -97795,9 +97920,9 @@ var REPL_TOOL_NAME = "REPL", REPL_ONLY_TOOLS;
|
|
|
97795
97920
|
var init_constants4 = __esm(() => {
|
|
97796
97921
|
init_envUtils();
|
|
97797
97922
|
init_constants2();
|
|
97798
|
-
init_prompt2();
|
|
97799
97923
|
init_prompt3();
|
|
97800
|
-
|
|
97924
|
+
init_prompt4();
|
|
97925
|
+
init_prompt2();
|
|
97801
97926
|
REPL_ONLY_TOOLS = new Set([
|
|
97802
97927
|
FILE_READ_TOOL_NAME,
|
|
97803
97928
|
FILE_WRITE_TOOL_NAME,
|
|
@@ -114631,28 +114756,28 @@ function getEventPriority(eventType) {
|
|
|
114631
114756
|
case "focus":
|
|
114632
114757
|
case "blur":
|
|
114633
114758
|
case "paste":
|
|
114634
|
-
return
|
|
114759
|
+
return import_constants12.DiscreteEventPriority;
|
|
114635
114760
|
case "resize":
|
|
114636
114761
|
case "scroll":
|
|
114637
114762
|
case "mousemove":
|
|
114638
|
-
return
|
|
114763
|
+
return import_constants12.ContinuousEventPriority;
|
|
114639
114764
|
default:
|
|
114640
|
-
return
|
|
114765
|
+
return import_constants12.DefaultEventPriority;
|
|
114641
114766
|
}
|
|
114642
114767
|
}
|
|
114643
114768
|
|
|
114644
114769
|
class Dispatcher {
|
|
114645
114770
|
currentEvent = null;
|
|
114646
|
-
currentUpdatePriority =
|
|
114771
|
+
currentUpdatePriority = import_constants12.DefaultEventPriority;
|
|
114647
114772
|
discreteUpdates = null;
|
|
114648
114773
|
resolveEventPriority() {
|
|
114649
|
-
if (this.currentUpdatePriority !==
|
|
114774
|
+
if (this.currentUpdatePriority !== import_constants12.NoEventPriority) {
|
|
114650
114775
|
return this.currentUpdatePriority;
|
|
114651
114776
|
}
|
|
114652
114777
|
if (this.currentEvent) {
|
|
114653
114778
|
return getEventPriority(this.currentEvent.type);
|
|
114654
114779
|
}
|
|
114655
|
-
return
|
|
114780
|
+
return import_constants12.DefaultEventPriority;
|
|
114656
114781
|
}
|
|
114657
114782
|
dispatch(target, event) {
|
|
114658
114783
|
const previousEvent = this.currentEvent;
|
|
@@ -114677,18 +114802,18 @@ class Dispatcher {
|
|
|
114677
114802
|
dispatchContinuous(target, event) {
|
|
114678
114803
|
const previousPriority = this.currentUpdatePriority;
|
|
114679
114804
|
try {
|
|
114680
|
-
this.currentUpdatePriority =
|
|
114805
|
+
this.currentUpdatePriority = import_constants12.ContinuousEventPriority;
|
|
114681
114806
|
return this.dispatch(target, event);
|
|
114682
114807
|
} finally {
|
|
114683
114808
|
this.currentUpdatePriority = previousPriority;
|
|
114684
114809
|
}
|
|
114685
114810
|
}
|
|
114686
114811
|
}
|
|
114687
|
-
var
|
|
114812
|
+
var import_constants12;
|
|
114688
114813
|
var init_dispatcher = __esm(() => {
|
|
114689
114814
|
init_log2();
|
|
114690
114815
|
init_event_handlers();
|
|
114691
|
-
|
|
114816
|
+
import_constants12 = __toESM(require_constants2(), 1);
|
|
114692
114817
|
});
|
|
114693
114818
|
|
|
114694
114819
|
// src/ink/events/terminal-event.ts
|
|
@@ -123489,7 +123614,7 @@ function applyPositionedHighlight(screen, stylePool, positions, rowOffset, curre
|
|
|
123489
123614
|
}
|
|
123490
123615
|
return true;
|
|
123491
123616
|
}
|
|
123492
|
-
var
|
|
123617
|
+
var import_constants14, timing;
|
|
123493
123618
|
var init_render_to_screen = __esm(() => {
|
|
123494
123619
|
init_debug();
|
|
123495
123620
|
init_dom();
|
|
@@ -123498,7 +123623,7 @@ var init_render_to_screen = __esm(() => {
|
|
|
123498
123623
|
init_reconciler();
|
|
123499
123624
|
init_render_node_to_output();
|
|
123500
123625
|
init_screen();
|
|
123501
|
-
|
|
123626
|
+
import_constants14 = __toESM(require_constants2(), 1);
|
|
123502
123627
|
timing = { reconcile: 0, yoga: 0, paint: 0, scan: 0, calls: 0 };
|
|
123503
123628
|
});
|
|
123504
123629
|
|
|
@@ -123808,7 +123933,7 @@ class Ink {
|
|
|
123808
123933
|
};
|
|
123809
123934
|
}
|
|
123810
123935
|
};
|
|
123811
|
-
this.container = reconciler_default.createContainer(this.rootNode,
|
|
123936
|
+
this.container = reconciler_default.createContainer(this.rootNode, import_constants15.ConcurrentRoot, null, false, null, "id", noop_default, noop_default, noop_default, noop_default);
|
|
123812
123937
|
if (false) {}
|
|
123813
123938
|
}
|
|
123814
123939
|
handleResume = () => {
|
|
@@ -124621,7 +124746,7 @@ function drainStdin(stdin = process.stdin) {
|
|
|
124621
124746
|
}
|
|
124622
124747
|
}
|
|
124623
124748
|
}
|
|
124624
|
-
var
|
|
124749
|
+
var import_constants15, jsx_dev_runtime8, ALT_SCREEN_ANCHOR_CURSOR, CURSOR_HOME_PATCH, ERASE_THEN_HOME_PATCH, CONSOLE_STDOUT_METHODS, CONSOLE_STDERR_METHODS;
|
|
124625
124750
|
var init_ink = __esm(() => {
|
|
124626
124751
|
init_noop();
|
|
124627
124752
|
init_throttle2();
|
|
@@ -124653,7 +124778,7 @@ var init_ink = __esm(() => {
|
|
|
124653
124778
|
init_dec();
|
|
124654
124779
|
init_osc();
|
|
124655
124780
|
init_useTerminalNotification();
|
|
124656
|
-
|
|
124781
|
+
import_constants15 = __toESM(require_constants2(), 1);
|
|
124657
124782
|
jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
|
|
124658
124783
|
ALT_SCREEN_ANCHOR_CURSOR = Object.freeze({
|
|
124659
124784
|
x: 0,
|
|
@@ -129921,7 +130046,7 @@ A small ${species} named ${name} sits beside the user's input box and occasional
|
|
|
129921
130046
|
|
|
129922
130047
|
When the user addresses ${name} directly (by name), its bubble will answer. Your job in that moment is to stay out of the way: respond in ONE line or less, or just answer any part of the message meant for you. Don't explain that you're not ${name} \u2014 they know. Don't narrate what ${name} might say \u2014 the bubble handles that.`;
|
|
129923
130048
|
}
|
|
129924
|
-
var
|
|
130049
|
+
var init_prompt5 = __esm(() => {
|
|
129925
130050
|
init_config();
|
|
129926
130051
|
init_companion();
|
|
129927
130052
|
});
|
|
@@ -138603,7 +138728,7 @@ ${prompt}
|
|
|
138603
138728
|
${guidelines}
|
|
138604
138729
|
`;
|
|
138605
138730
|
}
|
|
138606
|
-
var WEB_FETCH_TOOL_NAME = "WebFetch",
|
|
138731
|
+
var WEB_FETCH_TOOL_NAME = "WebFetch", DESCRIPTION5 = `
|
|
138607
138732
|
- Fetches content from a specified URL and processes it using an AI model
|
|
138608
138733
|
- Takes a URL and a prompt as input
|
|
138609
138734
|
- Fetches the URL content, converts HTML to markdown
|
|
@@ -139129,7 +139254,7 @@ var init_sandbox_adapter = __esm(() => {
|
|
|
139129
139254
|
init_constants();
|
|
139130
139255
|
init_managedPath();
|
|
139131
139256
|
init_settings2();
|
|
139132
|
-
|
|
139257
|
+
init_prompt3();
|
|
139133
139258
|
init_errors();
|
|
139134
139259
|
init_filesystem();
|
|
139135
139260
|
init_ripgrep();
|
|
@@ -144389,8 +144514,8 @@ var init_loadPluginAgents = __esm(() => {
|
|
|
144389
144514
|
init_memoize();
|
|
144390
144515
|
init_paths();
|
|
144391
144516
|
init_agentMemory();
|
|
144392
|
-
init_prompt2();
|
|
144393
144517
|
init_prompt3();
|
|
144518
|
+
init_prompt4();
|
|
144394
144519
|
init_debug();
|
|
144395
144520
|
init_effort();
|
|
144396
144521
|
init_frontmatterParser();
|
|
@@ -144576,7 +144701,7 @@ IMPORTANT - Use the correct year in search queries:
|
|
|
144576
144701
|
`;
|
|
144577
144702
|
}
|
|
144578
144703
|
var WEB_SEARCH_TOOL_NAME = "WebSearch";
|
|
144579
|
-
var
|
|
144704
|
+
var init_prompt6 = __esm(() => {
|
|
144580
144705
|
init_common2();
|
|
144581
144706
|
});
|
|
144582
144707
|
|
|
@@ -144649,9 +144774,9 @@ function getFeedbackGuideline() {
|
|
|
144649
144774
|
}
|
|
144650
144775
|
var UR_CODE_DOCS_MAP_URL = "https://docs.ur.dev/docs/en/ur_docs_map.md", CDP_DOCS_MAP_URL = "https://docs.claude.com/llms.txt", UR_CODE_GUIDE_AGENT_TYPE = "ur-guide", UR_CODE_GUIDE_AGENT;
|
|
144651
144776
|
var init_urCodeGuideAgent = __esm(() => {
|
|
144777
|
+
init_prompt3();
|
|
144652
144778
|
init_prompt2();
|
|
144653
|
-
|
|
144654
|
-
init_prompt5();
|
|
144779
|
+
init_prompt6();
|
|
144655
144780
|
init_auth();
|
|
144656
144781
|
init_embeddedTools();
|
|
144657
144782
|
init_settings2();
|
|
@@ -144737,9 +144862,6 @@ When answering questions, consider these configured features and proactively sug
|
|
|
144737
144862
|
};
|
|
144738
144863
|
});
|
|
144739
144864
|
|
|
144740
|
-
// src/tools/ExitPlanModeTool/constants.ts
|
|
144741
|
-
var EXIT_PLAN_MODE_TOOL_NAME = "ExitPlanMode", EXIT_PLAN_MODE_V2_TOOL_NAME = "ExitPlanMode";
|
|
144742
|
-
|
|
144743
144865
|
// src/tools/AgentTool/built-in/exploreAgent.ts
|
|
144744
144866
|
function getExploreSystemPrompt() {
|
|
144745
144867
|
const embedded = hasEmbeddedSearchTools();
|
|
@@ -144782,9 +144904,9 @@ Complete the user's search request efficiently and report your findings clearly.
|
|
|
144782
144904
|
}
|
|
144783
144905
|
var EXPLORE_AGENT_MIN_QUERIES = 3, EXPLORE_WHEN_TO_USE = 'Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. "src/components/**/*.tsx"), search code for keywords (eg. "API endpoints"), or answer questions about the codebase (eg. "how do API endpoints work?"). When calling this agent, specify the desired thoroughness level: "quick" for basic searches, "medium" for moderate exploration, or "very thorough" for comprehensive analysis across multiple locations and naming conventions.', EXPLORE_AGENT;
|
|
144784
144906
|
var init_exploreAgent = __esm(() => {
|
|
144785
|
-
init_prompt2();
|
|
144786
144907
|
init_prompt3();
|
|
144787
|
-
|
|
144908
|
+
init_prompt4();
|
|
144909
|
+
init_prompt2();
|
|
144788
144910
|
init_embeddedTools();
|
|
144789
144911
|
init_constants2();
|
|
144790
144912
|
EXPLORE_AGENT = {
|
|
@@ -144949,9 +145071,9 @@ REMEMBER: You can ONLY explore and plan. You CANNOT and MUST NOT write, edit, or
|
|
|
144949
145071
|
var PLAN_AGENT;
|
|
144950
145072
|
var init_planAgent = __esm(() => {
|
|
144951
145073
|
init_planImplementationContract();
|
|
144952
|
-
init_prompt2();
|
|
144953
145074
|
init_prompt3();
|
|
144954
|
-
|
|
145075
|
+
init_prompt4();
|
|
145076
|
+
init_prompt2();
|
|
144955
145077
|
init_embeddedTools();
|
|
144956
145078
|
init_constants2();
|
|
144957
145079
|
init_exploreAgent();
|
|
@@ -145122,7 +145244,7 @@ var init_statuslineSetup = __esm(() => {
|
|
|
145122
145244
|
// src/tools/AgentTool/built-in/verificationAgent.ts
|
|
145123
145245
|
var VERIFICATION_SYSTEM_PROMPT, VERIFICATION_WHEN_TO_USE, VERIFICATION_AGENT;
|
|
145124
145246
|
var init_verificationAgent = __esm(() => {
|
|
145125
|
-
|
|
145247
|
+
init_prompt4();
|
|
145126
145248
|
init_constants2();
|
|
145127
145249
|
VERIFICATION_SYSTEM_PROMPT = `You are a verification specialist. Your job is not to confirm the implementation works \u2014 it's to try to break it.
|
|
145128
145250
|
|
|
@@ -145598,8 +145720,8 @@ var init_loadAgentsDir = __esm(() => {
|
|
|
145598
145720
|
init_loadPluginAgents();
|
|
145599
145721
|
init_types2();
|
|
145600
145722
|
init_slowOperations();
|
|
145601
|
-
init_prompt2();
|
|
145602
145723
|
init_prompt3();
|
|
145724
|
+
init_prompt4();
|
|
145603
145725
|
init_agentColorManager();
|
|
145604
145726
|
init_agentMemory();
|
|
145605
145727
|
init_agentMemorySnapshot();
|
|
@@ -145820,7 +145942,7 @@ async function getSkillInfo(cwd2) {
|
|
|
145820
145942
|
}
|
|
145821
145943
|
}
|
|
145822
145944
|
var SKILL_BUDGET_CONTEXT_PERCENT = 0.01, CHARS_PER_TOKEN = 4, DEFAULT_CHAR_BUDGET = 8000, MAX_LISTING_DESC_CHARS = 250, MIN_DESC_LENGTH = 20, getPrompt;
|
|
145823
|
-
var
|
|
145945
|
+
var init_prompt7 = __esm(() => {
|
|
145824
145946
|
init_lodash();
|
|
145825
145947
|
init_commands3();
|
|
145826
145948
|
init_xml();
|
|
@@ -145935,7 +146057,7 @@ Query forms:
|
|
|
145935
146057
|
- "select:Read,Edit,Grep" \u2014 fetch these exact tools by name
|
|
145936
146058
|
- "notebook jupyter" \u2014 keyword search, up to max_results best matches
|
|
145937
146059
|
- "+slack send" \u2014 require "slack" in the name, rank by remaining terms`;
|
|
145938
|
-
var
|
|
146060
|
+
var init_prompt8 = __esm(() => {
|
|
145939
146061
|
init_state();
|
|
145940
146062
|
init_growthbook();
|
|
145941
146063
|
init_constants2();
|
|
@@ -146970,10 +147092,10 @@ function maybeTimeBasedMicrocompact(messages, querySource) {
|
|
|
146970
147092
|
var TIME_BASED_MC_CLEARED_MESSAGE = "[Old tool result content cleared]", IMAGE_MAX_TOKEN_SIZE = 2000, COMPACTABLE_TOOLS, cachedMCState = null, pendingCacheEdits = null;
|
|
146971
147093
|
var init_microCompact = __esm(() => {
|
|
146972
147094
|
init_toolResultPruningConfig();
|
|
146973
|
-
init_prompt2();
|
|
146974
147095
|
init_prompt3();
|
|
146975
|
-
|
|
146976
|
-
|
|
147096
|
+
init_prompt4();
|
|
147097
|
+
init_prompt2();
|
|
147098
|
+
init_prompt6();
|
|
146977
147099
|
init_debug();
|
|
146978
147100
|
init_shellToolUtils();
|
|
146979
147101
|
init_slowOperations();
|
|
@@ -152194,7 +152316,7 @@ var init_ToolSearchTool = __esm(() => {
|
|
|
152194
152316
|
init_debug();
|
|
152195
152317
|
init_stringUtils();
|
|
152196
152318
|
init_toolSearch();
|
|
152197
|
-
|
|
152319
|
+
init_prompt8();
|
|
152198
152320
|
inputSchema = lazySchema(() => exports_external.object({
|
|
152199
152321
|
query: exports_external.string().describe('Query to find deferred tools. Use "select:<tool_name>" for direct selection, or keywords to search.'),
|
|
152200
152322
|
max_results: exports_external.number().optional().default(5).describe("Maximum number of results to return (default: 5)")
|
|
@@ -154460,7 +154582,7 @@ var init_headlessProfiler = __esm(() => {
|
|
|
154460
154582
|
|
|
154461
154583
|
// src/tools/SleepTool/prompt.ts
|
|
154462
154584
|
var SLEEP_TOOL_NAME = "Sleep", SLEEP_TOOL_PROMPT;
|
|
154463
|
-
var
|
|
154585
|
+
var init_prompt9 = __esm(() => {
|
|
154464
154586
|
init_xml();
|
|
154465
154587
|
SLEEP_TOOL_PROMPT = `Wait for a specified duration. The user can interrupt the sleep at any time.
|
|
154466
154588
|
|
|
@@ -155112,7 +155234,7 @@ var init_projectSafety = __esm(() => {
|
|
|
155112
155234
|
function getInstruments() {
|
|
155113
155235
|
if (instruments)
|
|
155114
155236
|
return instruments;
|
|
155115
|
-
const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.65.
|
|
155237
|
+
const meter = import_api10.metrics.getMeter("ur-agent.gen_ai", "1.65.13");
|
|
155116
155238
|
instruments = {
|
|
155117
155239
|
operationDuration: meter.createHistogram("gen_ai.client.operation.duration", {
|
|
155118
155240
|
description: "GenAI operation duration.",
|
|
@@ -155210,7 +155332,7 @@ function genAiAgentAttributes() {
|
|
|
155210
155332
|
"gen_ai.operation.name": GEN_AI_OPERATION_INVOKE_AGENT,
|
|
155211
155333
|
"gen_ai.provider.name": "ur",
|
|
155212
155334
|
"gen_ai.agent.name": "UR-Nexus",
|
|
155213
|
-
"gen_ai.agent.version": "1.65.
|
|
155335
|
+
"gen_ai.agent.version": "1.65.13"
|
|
155214
155336
|
};
|
|
155215
155337
|
}
|
|
155216
155338
|
function genAiWorkflowAttributes(workflowName) {
|
|
@@ -155226,7 +155348,7 @@ function genAiWorkflowAttributes(workflowName) {
|
|
|
155226
155348
|
function startGenAiWorkflowSpan(workflowName) {
|
|
155227
155349
|
const attributes = genAiWorkflowAttributes(workflowName);
|
|
155228
155350
|
const name = typeof attributes["gen_ai.workflow.name"] === "string" ? `invoke_workflow ${attributes["gen_ai.workflow.name"]}` : GEN_AI_OPERATION_INVOKE_WORKFLOW;
|
|
155229
|
-
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.65.
|
|
155351
|
+
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.65.13").startSpan(name, { kind: import_api10.SpanKind.INTERNAL, attributes });
|
|
155230
155352
|
}
|
|
155231
155353
|
function endGenAiWorkflowSpan(span, options2 = {}) {
|
|
155232
155354
|
try {
|
|
@@ -155264,7 +155386,7 @@ function startGenAiMemorySpan(operation, options2 = {}) {
|
|
|
155264
155386
|
if (options2.recordCount !== undefined && Number.isInteger(options2.recordCount) && options2.recordCount >= 0) {
|
|
155265
155387
|
attributes["gen_ai.memory.record.count"] = options2.recordCount;
|
|
155266
155388
|
}
|
|
155267
|
-
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.65.
|
|
155389
|
+
return import_api10.trace.getTracer("ur-agent.gen_ai", "1.65.13").startSpan(operation, { kind: import_api10.SpanKind.INTERNAL, attributes });
|
|
155268
155390
|
}
|
|
155269
155391
|
function endGenAiMemorySpan(span, options2 = {}) {
|
|
155270
155392
|
try {
|
|
@@ -248747,7 +248869,7 @@ function getTelemetryAttributes() {
|
|
|
248747
248869
|
attributes["session.id"] = sessionId;
|
|
248748
248870
|
}
|
|
248749
248871
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
248750
|
-
attributes["app.version"] = "1.65.
|
|
248872
|
+
attributes["app.version"] = "1.65.13";
|
|
248751
248873
|
}
|
|
248752
248874
|
const oauthAccount = getOauthAccountInfo();
|
|
248753
248875
|
if (oauthAccount) {
|
|
@@ -257720,8 +257842,8 @@ var init_queryHelpers = __esm(() => {
|
|
|
257720
257842
|
init_state();
|
|
257721
257843
|
init_toolOrchestration();
|
|
257722
257844
|
init_Tool();
|
|
257723
|
-
init_prompt2();
|
|
257724
257845
|
init_prompt3();
|
|
257846
|
+
init_prompt4();
|
|
257725
257847
|
init_debug();
|
|
257726
257848
|
init_envUtils();
|
|
257727
257849
|
init_errors();
|
|
@@ -264941,75 +265063,6 @@ var init_promptCategory = __esm(() => {
|
|
|
264941
265063
|
// src/tools/EnterPlanModeTool/constants.ts
|
|
264942
265064
|
var ENTER_PLAN_MODE_TOOL_NAME = "EnterPlanMode";
|
|
264943
265065
|
|
|
264944
|
-
// src/tools/AskUserQuestionTool/prompt.ts
|
|
264945
|
-
var ASK_USER_QUESTION_TOOL_NAME = "AskUserQuestion", ASK_USER_QUESTION_TOOL_CHIP_WIDTH = 12, DESCRIPTION5 = "Asks the user multiple choice questions to gather information, clarify ambiguity, understand preferences, make decisions or offer them choices. This is the required way to present the user with a choice: whenever you would otherwise end a message by asking the user to pick between options or decide a direction, call this tool instead of asking in plain text, so the user gets a selectable menu rather than having to type a free-form answer.", PREVIEW_FEATURE_PROMPT, ASK_USER_QUESTION_TOOL_PROMPT;
|
|
264946
|
-
var init_prompt9 = __esm(() => {
|
|
264947
|
-
PREVIEW_FEATURE_PROMPT = {
|
|
264948
|
-
markdown: `
|
|
264949
|
-
Preview feature:
|
|
264950
|
-
Use the optional \`preview\` field on options when presenting concrete artifacts that users need to visually compare:
|
|
264951
|
-
- ASCII mockups of UI layouts or components
|
|
264952
|
-
- Code snippets showing different implementations
|
|
264953
|
-
- Diagram variations
|
|
264954
|
-
- Configuration examples
|
|
264955
|
-
|
|
264956
|
-
Preview content is rendered as markdown in a monospace box. Multi-line text with newlines is supported. When any option has a preview, the UI switches to a side-by-side layout with a vertical option list on the left and preview on the right. Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).
|
|
264957
|
-
`,
|
|
264958
|
-
html: `
|
|
264959
|
-
Preview feature:
|
|
264960
|
-
Use the optional \`preview\` field on options when presenting concrete artifacts that users need to visually compare:
|
|
264961
|
-
- Plain-text or ASCII mockups of UI layouts or components
|
|
264962
|
-
- Inert code snippets showing different implementations
|
|
264963
|
-
- Textual visual comparisons or diagrams
|
|
264964
|
-
|
|
264965
|
-
Preview content is untrusted text: raw HTML is not accepted or executed. It is escaped and rendered as inert preformatted text. Do not include HTML tags, attributes, URLs, scripts, styles, event handlers, or other executable markup. Do not use previews for simple preference questions where labels and descriptions suffice. Note: previews are only supported for single-select questions (not multiSelect).
|
|
264966
|
-
`
|
|
264967
|
-
};
|
|
264968
|
-
ASK_USER_QUESTION_TOOL_PROMPT = `Use this tool when you need to ask the user questions during execution. This allows you to:
|
|
264969
|
-
1. Gather user preferences or requirements
|
|
264970
|
-
2. Clarify ambiguous instructions
|
|
264971
|
-
3. Get decisions on implementation choices as you work
|
|
264972
|
-
4. Offer choices to the user about what direction to take.
|
|
264973
|
-
|
|
264974
|
-
Strongly prefer this tool over asking a question in plain assistant text. Any time your reply would end with a question that offers the user options or asks them to choose a direction (e.g. "Would you like A or B?", "Which approach should I take?", "Want me to do X or Y?"), call this tool with those options instead so the user gets a selectable arrow-key menu. Only ask in plain text when the answer is genuinely open-ended and cannot be expressed as a small set of choices.
|
|
264975
|
-
|
|
264976
|
-
Strict input hierarchy:
|
|
264977
|
-
- Invoke the tool with exactly one top-level \`questions\` array containing 1-4 complete question objects.
|
|
264978
|
-
- Every question object contains \`question\`, a concise \`header\` (maximum 12 characters), and an \`options\` array with 2-8 option objects. Use \`multiSelect: true\` only when more than one choice may apply.
|
|
264979
|
-
- Every option object contains a \`label\`. Add \`description\` only when it contributes a real consequence, trade-off, or limitation; \`preview\` is optional.
|
|
264980
|
-
- Keep each question and its own options nested together. Never put option rows directly in the top-level \`questions\` array, and never send incomplete header/prompt-only entries.
|
|
264981
|
-
|
|
264982
|
-
Canonical valid tool arguments (invoke the structured tool; do not print this object as prose):
|
|
264983
|
-
{"questions":[{"question":"Which database should we use?","header":"Database","options":[{"label":"PostgreSQL (Recommended)","description":"Strong consistency and concurrency; requires a running server and migrations."},{"label":"SQLite","description":"Zero setup and a single file; unsuitable for multiple concurrent writers."}],"multiSelect":false}]}
|
|
264984
|
-
|
|
264985
|
-
Usage notes:
|
|
264986
|
-
- Users will always be able to select "Other" to provide custom text input, so it is safe to offer choices even when you are unsure you have listed every option
|
|
264987
|
-
- Use multiSelect: true to allow multiple answers to be selected for a question
|
|
264988
|
-
- If you recommend a specific option, make that the first option in the list and add "(Recommended)" at the end of the label
|
|
264989
|
-
- Do not over-question. Ask only decisions that materially affect the result and cannot be inferred safely. If more than four decisions are truly needed, ask the most blocking 1-4 first and ask the remainder in a later round.
|
|
264990
|
-
|
|
264991
|
-
Writing the three fields \u2014 they must each carry DIFFERENT information:
|
|
264992
|
-
- \`header\` names the dimension being decided ("Database", "Auth method"). It is not a shortened copy of the question.
|
|
264993
|
-
- \`label\` names the choice ("PostgreSQL"). It is not a restatement of the question.
|
|
264994
|
-
- \`description\` says what happens if this is picked and what it costs \u2014 the trade-off, limitation or consequence the label does not already convey. It is the only field with room to be genuinely informative, so it must not paraphrase the label back to the user.
|
|
264995
|
-
|
|
264996
|
-
A description that can be derived from reading the label is wasted space and makes the menu harder to use, not easier. Before writing one, ask: does this tell the user something they could not already see? If not, replace it with the thing that actually distinguishes this option from its neighbours.
|
|
264997
|
-
|
|
264998
|
-
Bad \u2014 description restates the label:
|
|
264999
|
-
question: "Which database should we use?"
|
|
265000
|
-
header: "Which DB" (repeats the question)
|
|
265001
|
-
label: "Use PostgreSQL" description: "Use PostgreSQL as the database."
|
|
265002
|
-
|
|
265003
|
-
Good \u2014 each field adds something:
|
|
265004
|
-
question: "Which database should we use?"
|
|
265005
|
-
header: "Database"
|
|
265006
|
-
label: "PostgreSQL" description: "Relational with strong consistency; needs a running server and a migration step."
|
|
265007
|
-
label: "SQLite" description: "Zero setup, single file; no concurrent writers, so it will not survive multiple workers."
|
|
265008
|
-
|
|
265009
|
-
Plan mode note: In plan mode, use this tool to clarify requirements or choose between approaches BEFORE finalizing your plan. Do NOT use this tool to ask "Is my plan ready?" or "Should I proceed?" - use ${EXIT_PLAN_MODE_TOOL_NAME} for plan approval. IMPORTANT: Do not reference "the plan" in your questions (e.g., "Do you have feedback about the plan?", "Does the plan look good?") because the user cannot see the plan in the UI until you call ${EXIT_PLAN_MODE_TOOL_NAME}. If you need plan approval, use ${EXIT_PLAN_MODE_TOOL_NAME} instead.
|
|
265010
|
-
`;
|
|
265011
|
-
});
|
|
265012
|
-
|
|
265013
265066
|
// src/tools/SkillTool/constants.ts
|
|
265014
265067
|
var SKILL_TOOL_NAME = "Skill";
|
|
265015
265068
|
|
|
@@ -265258,13 +265311,13 @@ var init_prompt10 = __esm(() => {
|
|
|
265258
265311
|
var ALL_AGENT_DISALLOWED_TOOLS, CUSTOM_AGENT_DISALLOWED_TOOLS, ASYNC_AGENT_ALLOWED_TOOLS, IN_PROCESS_TEAMMATE_ALLOWED_TOOLS, COORDINATOR_MODE_ALLOWED_TOOLS;
|
|
265259
265312
|
var init_tools = __esm(() => {
|
|
265260
265313
|
init_constants2();
|
|
265261
|
-
init_prompt9();
|
|
265262
|
-
init_prompt2();
|
|
265263
|
-
init_prompt5();
|
|
265264
265314
|
init_prompt();
|
|
265265
|
-
init_shellToolUtils();
|
|
265266
265315
|
init_prompt3();
|
|
265267
|
-
|
|
265316
|
+
init_prompt6();
|
|
265317
|
+
init_prompt2();
|
|
265318
|
+
init_shellToolUtils();
|
|
265319
|
+
init_prompt4();
|
|
265320
|
+
init_prompt8();
|
|
265268
265321
|
init_SyntheticOutputTool();
|
|
265269
265322
|
init_prompt10();
|
|
265270
265323
|
ALL_AGENT_DISALLOWED_TOOLS = new Set([
|
|
@@ -265329,7 +265382,7 @@ var init_coordinatorMode = __esm(() => {
|
|
|
265329
265382
|
init_growthbook();
|
|
265330
265383
|
init_analytics();
|
|
265331
265384
|
init_constants2();
|
|
265332
|
-
|
|
265385
|
+
init_prompt3();
|
|
265333
265386
|
init_SyntheticOutputTool();
|
|
265334
265387
|
init_envUtils();
|
|
265335
265388
|
INTERNAL_WORKER_TOOLS = new Set([
|
|
@@ -295291,7 +295344,7 @@ function getInstallationEnv() {
|
|
|
295291
295344
|
return;
|
|
295292
295345
|
}
|
|
295293
295346
|
function getURCodeVersion() {
|
|
295294
|
-
return "1.65.
|
|
295347
|
+
return "1.65.13";
|
|
295295
295348
|
}
|
|
295296
295349
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
295297
295350
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -302622,7 +302675,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
302622
302675
|
const client2 = new Client({
|
|
302623
302676
|
name: "ur",
|
|
302624
302677
|
title: "UR",
|
|
302625
|
-
version: "1.65.
|
|
302678
|
+
version: "1.65.13",
|
|
302626
302679
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
302627
302680
|
websiteUrl: PRODUCT_URL
|
|
302628
302681
|
}, {
|
|
@@ -302982,7 +303035,7 @@ var init_client5 = __esm(() => {
|
|
|
302982
303035
|
const client2 = new Client({
|
|
302983
303036
|
name: "ur",
|
|
302984
303037
|
title: "UR",
|
|
302985
|
-
version: "1.65.
|
|
303038
|
+
version: "1.65.13",
|
|
302986
303039
|
description: "UR-Nexus autonomous engineering workflow engine",
|
|
302987
303040
|
websiteUrl: PRODUCT_URL
|
|
302988
303041
|
}, {
|
|
@@ -315521,7 +315574,7 @@ async function createRuntime() {
|
|
|
315521
315574
|
bootstrapTelemetry();
|
|
315522
315575
|
const resource = defaultResource().merge(detectResources({ detectors: [envDetector] })).merge(resourceFromAttributes({
|
|
315523
315576
|
[import_semantic_conventions7.ATTR_SERVICE_NAME]: "ur-agent",
|
|
315524
|
-
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.65.
|
|
315577
|
+
[import_semantic_conventions7.ATTR_SERVICE_VERSION]: "1.65.13"
|
|
315525
315578
|
}));
|
|
315526
315579
|
const tracerProvider = exporters.traces.length > 0 ? new BasicTracerProvider({
|
|
315527
315580
|
resource,
|
|
@@ -315554,11 +315607,11 @@ async function createRuntime() {
|
|
|
315554
315607
|
setMeterProvider(meterProvider);
|
|
315555
315608
|
setLoggerProvider(loggerProvider);
|
|
315556
315609
|
if (meterProvider) {
|
|
315557
|
-
const meter = meterProvider.getMeter("ur-agent", "1.65.
|
|
315610
|
+
const meter = meterProvider.getMeter("ur-agent", "1.65.13");
|
|
315558
315611
|
setMeter(meter, (name, options2) => meter.createCounter(name, options2));
|
|
315559
315612
|
}
|
|
315560
315613
|
if (loggerProvider) {
|
|
315561
|
-
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.65.
|
|
315614
|
+
setEventLogger(loggerProvider.getLogger("ur-agent.events", "1.65.13"));
|
|
315562
315615
|
}
|
|
315563
315616
|
if (!cleanupRegistered2) {
|
|
315564
315617
|
cleanupRegistered2 = true;
|
|
@@ -316220,9 +316273,9 @@ async function assertMinVersion() {
|
|
|
316220
316273
|
if (false) {}
|
|
316221
316274
|
try {
|
|
316222
316275
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
316223
|
-
if (versionConfig.minVersion && lt("1.65.
|
|
316276
|
+
if (versionConfig.minVersion && lt("1.65.13", versionConfig.minVersion)) {
|
|
316224
316277
|
console.error(`
|
|
316225
|
-
It looks like your version of UR (${"1.65.
|
|
316278
|
+
It looks like your version of UR (${"1.65.13"}) needs an update.
|
|
316226
316279
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
316227
316280
|
|
|
316228
316281
|
To update, please run:
|
|
@@ -316438,7 +316491,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
316438
316491
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
316439
316492
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
316440
316493
|
pid: process.pid,
|
|
316441
|
-
currentVersion: "1.65.
|
|
316494
|
+
currentVersion: "1.65.13"
|
|
316442
316495
|
});
|
|
316443
316496
|
return "in_progress";
|
|
316444
316497
|
}
|
|
@@ -316447,7 +316500,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
316447
316500
|
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
316448
316501
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
316449
316502
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
316450
|
-
currentVersion: "1.65.
|
|
316503
|
+
currentVersion: "1.65.13"
|
|
316451
316504
|
});
|
|
316452
316505
|
console.error(`
|
|
316453
316506
|
Error: Windows NPM detected in WSL
|
|
@@ -316982,7 +317035,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
316982
317035
|
}
|
|
316983
317036
|
async function getDoctorDiagnostic() {
|
|
316984
317037
|
const installationType = await getCurrentInstallationType();
|
|
316985
|
-
const version2 = typeof MACRO !== "undefined" ? "1.65.
|
|
317038
|
+
const version2 = typeof MACRO !== "undefined" ? "1.65.13" : "unknown";
|
|
316986
317039
|
const installationPath = await getInstallationPath();
|
|
316987
317040
|
const invokedBinary = getInvokedBinary();
|
|
316988
317041
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -317917,8 +317970,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
317917
317970
|
const maxVersion = await getMaxVersion();
|
|
317918
317971
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
317919
317972
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
317920
|
-
if (gte("1.65.
|
|
317921
|
-
logForDebugging(`Native installer: current version ${"1.65.
|
|
317973
|
+
if (gte("1.65.13", maxVersion)) {
|
|
317974
|
+
logForDebugging(`Native installer: current version ${"1.65.13"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
317922
317975
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
317923
317976
|
latency_ms: Date.now() - startTime,
|
|
317924
317977
|
max_version: maxVersion,
|
|
@@ -317929,7 +317982,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
317929
317982
|
version2 = maxVersion;
|
|
317930
317983
|
}
|
|
317931
317984
|
}
|
|
317932
|
-
if (!forceReinstall && version2 === "1.65.
|
|
317985
|
+
if (!forceReinstall && version2 === "1.65.13" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
|
|
317933
317986
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
317934
317987
|
logEvent("tengu_native_update_complete", {
|
|
317935
317988
|
latency_ms: Date.now() - startTime,
|
|
@@ -345300,7 +345353,7 @@ var init_SkillTool = __esm(() => {
|
|
|
345300
345353
|
init_skillUsageTracking();
|
|
345301
345354
|
init_uuid();
|
|
345302
345355
|
init_runAgent();
|
|
345303
|
-
|
|
345356
|
+
init_prompt7();
|
|
345304
345357
|
init_UI5();
|
|
345305
345358
|
inputSchema10 = lazySchema(() => exports_external.object({
|
|
345306
345359
|
skill: exports_external.string().describe('The skill name. E.g., "commit", "review-pr", or "pdf"'),
|
|
@@ -358363,9 +358416,9 @@ var init_prompt11 = __esm(() => {
|
|
|
358363
358416
|
init_envUtils();
|
|
358364
358417
|
init_outputLimits();
|
|
358365
358418
|
init_powershellDetection();
|
|
358366
|
-
init_prompt2();
|
|
358367
358419
|
init_prompt3();
|
|
358368
|
-
|
|
358420
|
+
init_prompt4();
|
|
358421
|
+
init_prompt2();
|
|
358369
358422
|
});
|
|
358370
358423
|
|
|
358371
358424
|
// src/tools/PowerShellTool/UI.tsx
|
|
@@ -361007,7 +361060,7 @@ Usage:${getPreReadInstruction2()}
|
|
|
361007
361060
|
}
|
|
361008
361061
|
var init_prompt12 = __esm(() => {
|
|
361009
361062
|
init_file();
|
|
361010
|
-
|
|
361063
|
+
init_prompt3();
|
|
361011
361064
|
});
|
|
361012
361065
|
|
|
361013
361066
|
// src/tools/FileEditTool/types.ts
|
|
@@ -363397,30 +363450,48 @@ function findSearchAnchor(fileContent, searchString) {
|
|
|
363397
363450
|
occurrencesByLine.set(normalized, { firstIndex: index2, count: 1 });
|
|
363398
363451
|
}
|
|
363399
363452
|
}
|
|
363400
|
-
|
|
363401
|
-
|
|
363402
|
-
`)
|
|
363453
|
+
const candidates = [];
|
|
363454
|
+
const searchLines = searchString.split(`
|
|
363455
|
+
`);
|
|
363456
|
+
for (let searchIndex = 0;searchIndex < searchLines.length; searchIndex++) {
|
|
363457
|
+
const searchLine = searchLines[searchIndex];
|
|
363403
363458
|
const normalized = normalizeLineForMatch(searchLine);
|
|
363404
363459
|
if (normalized.trim().length === 0)
|
|
363405
363460
|
continue;
|
|
363406
363461
|
const occurrence = occurrencesByLine.get(normalized);
|
|
363407
363462
|
if (!occurrence)
|
|
363408
363463
|
continue;
|
|
363409
|
-
|
|
363410
|
-
return { fileLine: occurrence.firstIndex + 1, unique: true };
|
|
363411
|
-
}
|
|
363412
|
-
repeatedMatch ??= {
|
|
363464
|
+
candidates.push({
|
|
363413
363465
|
fileLine: occurrence.firstIndex + 1,
|
|
363414
|
-
unique:
|
|
363415
|
-
|
|
363466
|
+
unique: occurrence.count === 1,
|
|
363467
|
+
searchLine: normalized,
|
|
363468
|
+
searchLineNumber: searchIndex + 1,
|
|
363469
|
+
occurrenceCount: occurrence.count,
|
|
363470
|
+
distinctiveCharacterCount: normalized.replace(/[^A-Za-z0-9_$]/g, "").length
|
|
363471
|
+
});
|
|
363416
363472
|
}
|
|
363417
|
-
|
|
363473
|
+
candidates.sort((left, right) => {
|
|
363474
|
+
if (left.unique !== right.unique)
|
|
363475
|
+
return left.unique ? -1 : 1;
|
|
363476
|
+
if (left.occurrenceCount !== right.occurrenceCount) {
|
|
363477
|
+
return left.occurrenceCount - right.occurrenceCount;
|
|
363478
|
+
}
|
|
363479
|
+
if (left.distinctiveCharacterCount !== right.distinctiveCharacterCount) {
|
|
363480
|
+
return right.distinctiveCharacterCount - left.distinctiveCharacterCount;
|
|
363481
|
+
}
|
|
363482
|
+
if (left.searchLine.length !== right.searchLine.length) {
|
|
363483
|
+
return right.searchLine.length - left.searchLine.length;
|
|
363484
|
+
}
|
|
363485
|
+
return left.searchLineNumber - right.searchLineNumber;
|
|
363486
|
+
});
|
|
363487
|
+
return candidates[0] ?? null;
|
|
363418
363488
|
}
|
|
363419
363489
|
function formatStringNotFoundMessage(fileContent, searchString) {
|
|
363420
363490
|
const lineCount = searchString.split(`
|
|
363421
363491
|
`).length;
|
|
363422
363492
|
const anchor = findSearchAnchor(fileContent, searchString);
|
|
363423
|
-
const
|
|
363493
|
+
const anchorPreview = anchor ? JSON.stringify(anchor.searchLine.length > 160 ? `${anchor.searchLine.slice(0, 160)}\u2026` : anchor.searchLine) : null;
|
|
363494
|
+
const location = anchor ? `The verified anchor ${anchorPreview} from old_string line ${anchor.searchLineNumber} ${anchor.unique ? "uniquely " : ""}matches the current file at line ${anchor.fileLine}, but the complete ${lineCount}-line block is not contiguous there.` : "No complete non-empty line from old_string matches the current file.";
|
|
363424
363495
|
const recovery = anchor ? `Re-read the target around line ${anchor.fileLine}, then retry with the smallest unique contiguous old_string copied from the current Read output (usually 2-4 lines).` : "Search for a short distinctive fragment, re-read the current target region, then retry with the smallest unique contiguous old_string (usually 2-4 lines).";
|
|
363425
363496
|
const preview = searchString.length > STRING_NOT_FOUND_PREVIEW_CHARS ? `${searchString.slice(0, STRING_NOT_FOUND_PREVIEW_CHARS)}
|
|
363426
363497
|
\u2026 [old_string preview truncated; ${searchString.length} characters total]` : searchString;
|
|
@@ -365041,7 +365112,7 @@ var init_FileWriteTool = __esm(() => {
|
|
|
365041
365112
|
init_filesystem();
|
|
365042
365113
|
init_shellRuleMatching();
|
|
365043
365114
|
init_types11();
|
|
365044
|
-
|
|
365115
|
+
init_prompt4();
|
|
365045
365116
|
init_UI9();
|
|
365046
365117
|
inputSchema13 = lazySchema(() => exports_external.strictObject({
|
|
365047
365118
|
file_path: exports_external.string().describe("The absolute path to the file to write (must be absolute, not relative)"),
|
|
@@ -365703,7 +365774,7 @@ var init_GrepTool = __esm(() => {
|
|
|
365703
365774
|
init_semanticBoolean();
|
|
365704
365775
|
init_semanticNumber();
|
|
365705
365776
|
init_stringUtils();
|
|
365706
|
-
|
|
365777
|
+
init_prompt2();
|
|
365707
365778
|
init_UI10();
|
|
365708
365779
|
inputSchema14 = lazySchema(() => exports_external.strictObject({
|
|
365709
365780
|
pattern: exports_external.string().describe("The regular expression pattern to search for in file contents"),
|
|
@@ -366139,7 +366210,7 @@ var init_GlobTool = __esm(() => {
|
|
|
366139
366210
|
searchHint: "find files by name pattern or wildcard",
|
|
366140
366211
|
maxResultSizeChars: 1e5,
|
|
366141
366212
|
async description() {
|
|
366142
|
-
return
|
|
366213
|
+
return DESCRIPTION4;
|
|
366143
366214
|
},
|
|
366144
366215
|
userFacingName: userFacingName5,
|
|
366145
366216
|
getToolUseSummary: getToolUseSummary4,
|
|
@@ -366211,7 +366282,7 @@ var init_GlobTool = __esm(() => {
|
|
|
366211
366282
|
return checkReadPermissionForTool(GlobTool, input, appState.toolPermissionContext);
|
|
366212
366283
|
},
|
|
366213
366284
|
async prompt() {
|
|
366214
|
-
return
|
|
366285
|
+
return DESCRIPTION4;
|
|
366215
366286
|
},
|
|
366216
366287
|
renderToolUseMessage: renderToolUseMessage12,
|
|
366217
366288
|
renderToolUseErrorMessage: renderToolUseErrorMessage8,
|
|
@@ -368179,7 +368250,7 @@ var init_WebFetchTool = __esm(() => {
|
|
|
368179
368250
|
},
|
|
368180
368251
|
async prompt(_options) {
|
|
368181
368252
|
return `IMPORTANT: WebFetch WILL FAIL for authenticated or private URLs. Before using this tool, check if the URL points to an authenticated service (e.g. Google Docs, Confluence, Jira, GitHub). If so, look for a specialized MCP tool that provides authenticated access.
|
|
368182
|
-
${
|
|
368253
|
+
${DESCRIPTION5}`;
|
|
368183
368254
|
},
|
|
368184
368255
|
async validateInput(input) {
|
|
368185
368256
|
const { url: url3 } = input;
|
|
@@ -369714,7 +369785,7 @@ var init_TaskStopTool = __esm(() => {
|
|
|
369714
369785
|
return `Stop a running background task by ID`;
|
|
369715
369786
|
},
|
|
369716
369787
|
async prompt() {
|
|
369717
|
-
return
|
|
369788
|
+
return DESCRIPTION2;
|
|
369718
369789
|
},
|
|
369719
369790
|
mapToolResultToToolResultBlockParam(output, toolUseID) {
|
|
369720
369791
|
return {
|
|
@@ -370993,7 +371064,7 @@ var init_WebSearchTool = __esm(() => {
|
|
|
370993
371064
|
init_model();
|
|
370994
371065
|
init_permissions2();
|
|
370995
371066
|
init_slowOperations();
|
|
370996
|
-
|
|
371067
|
+
init_prompt6();
|
|
370997
371068
|
init_UI17();
|
|
370998
371069
|
inputSchema28 = lazySchema(() => exports_external.strictObject({
|
|
370999
371070
|
query: exports_external.string().min(2).describe("The search query to use"),
|
|
@@ -371456,7 +371527,7 @@ var init_UI18 = __esm(() => {
|
|
|
371456
371527
|
|
|
371457
371528
|
// src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts
|
|
371458
371529
|
import { writeFile as writeFile21 } from "fs/promises";
|
|
371459
|
-
function
|
|
371530
|
+
function objectValue3(value) {
|
|
371460
371531
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
371461
371532
|
}
|
|
371462
371533
|
function isBashToolName(value) {
|
|
@@ -371476,7 +371547,7 @@ function normalizeAllowedPromptItem(value) {
|
|
|
371476
371547
|
const prompt2 = value.trim();
|
|
371477
371548
|
return prompt2 ? [{ tool: "Bash", prompt: prompt2 }] : [];
|
|
371478
371549
|
}
|
|
371479
|
-
const item =
|
|
371550
|
+
const item = objectValue3(value);
|
|
371480
371551
|
if (!item || !isBashToolName(item.tool))
|
|
371481
371552
|
return [];
|
|
371482
371553
|
const prompt = promptTextFromObject(item);
|
|
@@ -371491,7 +371562,7 @@ function normalizeAllowedPromptsValue(value) {
|
|
|
371491
371562
|
return normalizeAllowedPromptItem(value);
|
|
371492
371563
|
if (Array.isArray(value))
|
|
371493
371564
|
return value.flatMap(normalizeAllowedPromptItem);
|
|
371494
|
-
const prompts =
|
|
371565
|
+
const prompts = objectValue3(value);
|
|
371495
371566
|
if (!prompts)
|
|
371496
371567
|
return [];
|
|
371497
371568
|
const prompt = promptTextFromObject(prompts);
|
|
@@ -371504,7 +371575,7 @@ function normalizeAllowedPromptsValue(value) {
|
|
|
371504
371575
|
});
|
|
371505
371576
|
}
|
|
371506
371577
|
function normalizeExitPlanModeInput(value) {
|
|
371507
|
-
const input =
|
|
371578
|
+
const input = objectValue3(value);
|
|
371508
371579
|
if (!input)
|
|
371509
371580
|
return value;
|
|
371510
371581
|
const rawAllowedPrompts = input.allowedPrompts ?? input.allowed_prompts ?? input.prompts ?? input.permissions;
|
|
@@ -373032,7 +373103,7 @@ Notes:
|
|
|
373032
373103
|
}
|
|
373033
373104
|
var CODE_SEARCH_TOOL_NAME = "CodeSearch";
|
|
373034
373105
|
var init_prompt15 = __esm(() => {
|
|
373035
|
-
|
|
373106
|
+
init_prompt2();
|
|
373036
373107
|
});
|
|
373037
373108
|
|
|
373038
373109
|
// src/tools/CodeSearchTool/CodeSearchTool.ts
|
|
@@ -373206,14 +373277,9 @@ var init_zodToJsonSchema2 = __esm(() => {
|
|
|
373206
373277
|
});
|
|
373207
373278
|
|
|
373208
373279
|
// src/tools/AskUserQuestionTool/AskUserQuestionTool.tsx
|
|
373209
|
-
function
|
|
373280
|
+
function objectValue4(value) {
|
|
373210
373281
|
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
373211
373282
|
}
|
|
373212
|
-
function headerFromQuestion2(question, index2) {
|
|
373213
|
-
const stopWords = new Set(["a", "about", "also", "an", "are", "be", "do", "does", "for", "is", "or", "should", "support", "that", "the", "this", "to", "want", "what", "which", "with", "without", "you"]);
|
|
373214
|
-
const word = question.replace(/[^A-Za-z0-9]+/g, " ").split(/\s+/).find((part) => part && !stopWords.has(part.toLowerCase())) ?? `Question ${index2 + 1}`;
|
|
373215
|
-
return word.slice(0, ASK_USER_QUESTION_TOOL_CHIP_WIDTH);
|
|
373216
|
-
}
|
|
373217
373283
|
function stringField2(input, names) {
|
|
373218
373284
|
for (const name of names) {
|
|
373219
373285
|
const value = input[name];
|
|
@@ -373229,7 +373295,7 @@ function normalizeQuestionOptionInput(value) {
|
|
|
373229
373295
|
label
|
|
373230
373296
|
} : value;
|
|
373231
373297
|
}
|
|
373232
|
-
const option =
|
|
373298
|
+
const option = objectValue4(value);
|
|
373233
373299
|
if (!option)
|
|
373234
373300
|
return value;
|
|
373235
373301
|
const normalized = { ...option };
|
|
@@ -373251,7 +373317,7 @@ function normalizePreviewInput(preview) {
|
|
|
373251
373317
|
return `<pre data-ur-preview="text">${escaped}</pre>`;
|
|
373252
373318
|
}
|
|
373253
373319
|
function normalizeQuestionInput(value, index2) {
|
|
373254
|
-
const question =
|
|
373320
|
+
const question = objectValue4(value);
|
|
373255
373321
|
if (!question)
|
|
373256
373322
|
return value;
|
|
373257
373323
|
const normalized = { ...question };
|
|
@@ -373276,14 +373342,14 @@ function normalizeQuestionInput(value, index2) {
|
|
|
373276
373342
|
normalized.options = options2.map(normalizeQuestionOptionInput);
|
|
373277
373343
|
}
|
|
373278
373344
|
if (typeof question.header === "string" && question.header.trim()) {
|
|
373279
|
-
normalized.header = question.header
|
|
373345
|
+
normalized.header = normalizeQuestionHeader(question.header, questionText, index2);
|
|
373280
373346
|
} else if (questionText) {
|
|
373281
|
-
normalized.header =
|
|
373347
|
+
normalized.header = headerFromQuestion(questionText, index2);
|
|
373282
373348
|
}
|
|
373283
373349
|
return normalized;
|
|
373284
373350
|
}
|
|
373285
373351
|
function normalizeAskUserQuestionInput2(value) {
|
|
373286
|
-
const input =
|
|
373352
|
+
const input = objectValue4(value);
|
|
373287
373353
|
if (!input)
|
|
373288
373354
|
return value;
|
|
373289
373355
|
const normalized = { ...input };
|
|
@@ -373325,7 +373391,7 @@ function normalizeAskUserQuestionInput2(value) {
|
|
|
373325
373391
|
return normalized;
|
|
373326
373392
|
}
|
|
373327
373393
|
function boundedText(max2, field) {
|
|
373328
|
-
return exports_external.string().trim().min(1, `${field} cannot be empty`).max(max2, `${field} must be at most ${max2} characters`).refine((value) => !
|
|
373394
|
+
return exports_external.string().trim().min(1, `${field} cannot be empty`).max(max2, `${field} must be at most ${max2} characters`).refine((value) => !CONTROL_OR_ANSI_RE2.test(value), `${field} must not contain control or ANSI escape characters`);
|
|
373329
373395
|
}
|
|
373330
373396
|
function AskUserQuestionResultMessage(t0) {
|
|
373331
373397
|
const $2 = import_compiler_runtime114.c(3);
|
|
@@ -373398,7 +373464,7 @@ function validateHtmlPreview(preview) {
|
|
|
373398
373464
|
}
|
|
373399
373465
|
return null;
|
|
373400
373466
|
}
|
|
373401
|
-
var import_compiler_runtime114, jsx_dev_runtime145, MAX_QUESTIONS = 4, MAX_OPTIONS = 8, MAX_QUESTION_CHARS = 500, MAX_LABEL_CHARS = 80, MAX_DESCRIPTION_CHARS = 500, MAX_PREVIEW_CHARS, MAX_PREVIEW_LINES = 200, MAX_ANSWER_CHARS = 2000, MAX_TOTAL_INPUT_CHARS, RESERVED_RECORD_KEYS, QUESTION_TEXT_ALIASES,
|
|
373467
|
+
var import_compiler_runtime114, jsx_dev_runtime145, MAX_QUESTIONS = 4, MAX_OPTIONS = 8, MAX_QUESTION_CHARS = 500, MAX_LABEL_CHARS = 80, MAX_DESCRIPTION_CHARS = 500, MAX_PREVIEW_CHARS, MAX_PREVIEW_LINES = 200, MAX_ANSWER_CHARS = 2000, MAX_TOTAL_INPUT_CHARS, RESERVED_RECORD_KEYS, QUESTION_TEXT_ALIASES, CONTROL_OR_ANSI_RE2, UNIQUENESS_REFINE, questionOptionSchema, questionSchema, annotationsSchema, responseFields, metadataSchema, requestObjectSchema, inputSchema32, modelInputJSONSchema, outputSchema27, AskUserQuestionTool;
|
|
373402
373468
|
var init_AskUserQuestionTool = __esm(() => {
|
|
373403
373469
|
init_state();
|
|
373404
373470
|
init_MessageResponse();
|
|
@@ -373409,14 +373475,15 @@ var init_AskUserQuestionTool = __esm(() => {
|
|
|
373409
373475
|
init_ink2();
|
|
373410
373476
|
init_Tool();
|
|
373411
373477
|
init_zodToJsonSchema2();
|
|
373412
|
-
|
|
373478
|
+
init_normalization();
|
|
373479
|
+
init_prompt();
|
|
373413
373480
|
import_compiler_runtime114 = __toESM(require_compiler_runtime(), 1);
|
|
373414
373481
|
jsx_dev_runtime145 = __toESM(require_jsx_dev_runtime(), 1);
|
|
373415
373482
|
MAX_PREVIEW_CHARS = 16 * 1024;
|
|
373416
373483
|
MAX_TOTAL_INPUT_CHARS = 64 * 1024;
|
|
373417
373484
|
RESERVED_RECORD_KEYS = new Set(["__proto__", "constructor", "prototype", "toString", "valueOf"]);
|
|
373418
373485
|
QUESTION_TEXT_ALIASES = ["question", "questionText", "question_text", "prompt", "text"];
|
|
373419
|
-
|
|
373486
|
+
CONTROL_OR_ANSI_RE2 = /[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]|\u001B\[/;
|
|
373420
373487
|
UNIQUENESS_REFINE = {
|
|
373421
373488
|
check: (data) => {
|
|
373422
373489
|
const questions = data.questions.map((q) => q.question.toLocaleLowerCase());
|
|
@@ -373492,7 +373559,7 @@ var init_AskUserQuestionTool = __esm(() => {
|
|
|
373492
373559
|
maxResultSizeChars: 1e5,
|
|
373493
373560
|
shouldDefer: false,
|
|
373494
373561
|
async description() {
|
|
373495
|
-
return
|
|
373562
|
+
return DESCRIPTION;
|
|
373496
373563
|
},
|
|
373497
373564
|
async prompt() {
|
|
373498
373565
|
const format5 = getQuestionPreviewFormat();
|
|
@@ -375166,7 +375233,7 @@ function getEnterPlanModeToolPrompt() {
|
|
|
375166
375233
|
var WHAT_HAPPENS_SECTION;
|
|
375167
375234
|
var init_prompt16 = __esm(() => {
|
|
375168
375235
|
init_planModeV2();
|
|
375169
|
-
|
|
375236
|
+
init_prompt();
|
|
375170
375237
|
WHAT_HAPPENS_SECTION = `## What Happens in Plan Mode
|
|
375171
375238
|
|
|
375172
375239
|
In plan mode, you'll:
|
|
@@ -377997,6 +378064,117 @@ var init_TaskGetTool = __esm(() => {
|
|
|
377997
378064
|
});
|
|
377998
378065
|
});
|
|
377999
378066
|
|
|
378067
|
+
// src/tools/TaskUpdateTool/completionEvidence.ts
|
|
378068
|
+
function messageBlocks(message) {
|
|
378069
|
+
const content = message.message?.content;
|
|
378070
|
+
return Array.isArray(content) ? content : [];
|
|
378071
|
+
}
|
|
378072
|
+
function successfulCalls(messages) {
|
|
378073
|
+
if (!Array.isArray(messages))
|
|
378074
|
+
return [];
|
|
378075
|
+
const toolUses = new Map;
|
|
378076
|
+
const calls = [];
|
|
378077
|
+
let sequence = 0;
|
|
378078
|
+
for (const [messageIndex, candidate] of messages.entries()) {
|
|
378079
|
+
if (typeof candidate !== "object" || candidate === null)
|
|
378080
|
+
continue;
|
|
378081
|
+
const message = candidate;
|
|
378082
|
+
for (const block2 of messageBlocks(message)) {
|
|
378083
|
+
sequence++;
|
|
378084
|
+
if (typeof block2 !== "object" || block2 === null)
|
|
378085
|
+
continue;
|
|
378086
|
+
const value = block2;
|
|
378087
|
+
if (value.type === "tool_use" && typeof value.id === "string" && typeof value.name === "string") {
|
|
378088
|
+
toolUses.set(value.id, {
|
|
378089
|
+
name: value.name,
|
|
378090
|
+
input: typeof value.input === "object" && value.input !== null ? value.input : {},
|
|
378091
|
+
sequence,
|
|
378092
|
+
assistantMessage: messageIndex
|
|
378093
|
+
});
|
|
378094
|
+
continue;
|
|
378095
|
+
}
|
|
378096
|
+
if (value.type !== "tool_result" || typeof value.tool_use_id !== "string") {
|
|
378097
|
+
continue;
|
|
378098
|
+
}
|
|
378099
|
+
const toolUse = toolUses.get(value.tool_use_id);
|
|
378100
|
+
if (!toolUse)
|
|
378101
|
+
continue;
|
|
378102
|
+
calls.push({
|
|
378103
|
+
...toolUse,
|
|
378104
|
+
succeeded: value.is_error !== true
|
|
378105
|
+
});
|
|
378106
|
+
}
|
|
378107
|
+
}
|
|
378108
|
+
return calls.sort((left, right) => left.sequence - right.sequence);
|
|
378109
|
+
}
|
|
378110
|
+
function sameTaskId(value, taskId) {
|
|
378111
|
+
return (typeof value === "string" || typeof value === "number") && String(value) === taskId;
|
|
378112
|
+
}
|
|
378113
|
+
function mutationTarget(call6) {
|
|
378114
|
+
for (const key of ["file_path", "notebook_path", "path"]) {
|
|
378115
|
+
const value = call6.input[key];
|
|
378116
|
+
if (typeof value === "string" && value.trim() !== "")
|
|
378117
|
+
return value;
|
|
378118
|
+
}
|
|
378119
|
+
return;
|
|
378120
|
+
}
|
|
378121
|
+
function evaluateCompletionEvidence(input) {
|
|
378122
|
+
const calls = successfulCalls(input.messages);
|
|
378123
|
+
let startedAt = -1;
|
|
378124
|
+
for (const call6 of calls) {
|
|
378125
|
+
if (call6.succeeded && call6.name === "TaskUpdate" && sameTaskId(call6.input.taskId, input.taskId) && call6.input.status === "in_progress") {
|
|
378126
|
+
startedAt = call6.sequence;
|
|
378127
|
+
}
|
|
378128
|
+
}
|
|
378129
|
+
if (startedAt < 0)
|
|
378130
|
+
return { defer: false };
|
|
378131
|
+
let latestMutation;
|
|
378132
|
+
let hasEvidenceAfterMutation = false;
|
|
378133
|
+
for (const call6 of calls) {
|
|
378134
|
+
if (!call6.succeeded || call6.sequence <= startedAt)
|
|
378135
|
+
continue;
|
|
378136
|
+
if (FILE_MUTATION_TOOLS.has(call6.name)) {
|
|
378137
|
+
latestMutation = call6;
|
|
378138
|
+
hasEvidenceAfterMutation = false;
|
|
378139
|
+
continue;
|
|
378140
|
+
}
|
|
378141
|
+
if (latestMutation && call6.assistantMessage > latestMutation.assistantMessage && COMPLETION_EVIDENCE_TOOLS.has(call6.name)) {
|
|
378142
|
+
hasEvidenceAfterMutation = true;
|
|
378143
|
+
}
|
|
378144
|
+
}
|
|
378145
|
+
if (!latestMutation || hasEvidenceAfterMutation) {
|
|
378146
|
+
return { defer: false };
|
|
378147
|
+
}
|
|
378148
|
+
return {
|
|
378149
|
+
defer: true,
|
|
378150
|
+
mutationTool: latestMutation.name,
|
|
378151
|
+
target: mutationTarget(latestMutation)
|
|
378152
|
+
};
|
|
378153
|
+
}
|
|
378154
|
+
var FILE_MUTATION_TOOLS, COMPLETION_EVIDENCE_TOOLS;
|
|
378155
|
+
var init_completionEvidence = __esm(() => {
|
|
378156
|
+
FILE_MUTATION_TOOLS = new Set([
|
|
378157
|
+
"Write",
|
|
378158
|
+
"Edit",
|
|
378159
|
+
"MultiEdit",
|
|
378160
|
+
"NotebookEdit"
|
|
378161
|
+
]);
|
|
378162
|
+
COMPLETION_EVIDENCE_TOOLS = new Set([
|
|
378163
|
+
"Read",
|
|
378164
|
+
"Grep",
|
|
378165
|
+
"Glob",
|
|
378166
|
+
"LSP",
|
|
378167
|
+
"Bash",
|
|
378168
|
+
"PowerShell",
|
|
378169
|
+
"TestRunner",
|
|
378170
|
+
"Browser",
|
|
378171
|
+
"Computer",
|
|
378172
|
+
"TaskOutput",
|
|
378173
|
+
"Agent",
|
|
378174
|
+
"Task"
|
|
378175
|
+
]);
|
|
378176
|
+
});
|
|
378177
|
+
|
|
378000
378178
|
// src/tools/TaskUpdateTool/prompt.ts
|
|
378001
378179
|
var DESCRIPTION16 = "Update a task in the task list", PROMPT7 = `Use this tool to update a task in the task list.
|
|
378002
378180
|
|
|
@@ -378008,6 +378186,12 @@ var DESCRIPTION16 = "Update a task in the task list", PROMPT7 = `Use this tool t
|
|
|
378008
378186
|
- After completion, call TaskList to find the next unblocked task
|
|
378009
378187
|
|
|
378010
378188
|
- ONLY mark a task as completed when you have FULLY accomplished it
|
|
378189
|
+
- After changing a file, run a relevant observable check in a later tool turn
|
|
378190
|
+
before completing the final actionable task. A Write/Edit result proves only
|
|
378191
|
+
that bytes changed, not that the result works.
|
|
378192
|
+
- If that final completion has no successful post-change check, TaskUpdate
|
|
378193
|
+
keeps the same task in_progress and names the next verification action. Run
|
|
378194
|
+
it and retry completion; do not create a duplicate task.
|
|
378011
378195
|
- If you encounter errors, blockers, or cannot finish, keep the task as in_progress
|
|
378012
378196
|
- When blocked, record the blocking work as a dependency or notify the owner
|
|
378013
378197
|
- Never mark a task as completed if:
|
|
@@ -378072,6 +378256,7 @@ var init_TaskUpdateTool = __esm(() => {
|
|
|
378072
378256
|
init_teammateMailbox();
|
|
378073
378257
|
init_constants2();
|
|
378074
378258
|
init_taskIdInput();
|
|
378259
|
+
init_completionEvidence();
|
|
378075
378260
|
inputSchema40 = lazySchema(() => {
|
|
378076
378261
|
const TaskUpdateStatusSchema = TaskStatusSchema2().or(exports_external.literal("deleted"));
|
|
378077
378262
|
const TaskIdSchema = taskIdInputSchema("The ID of the task to update. Positive integer JSON values are accepted and normalized to strings.");
|
|
@@ -378096,7 +378281,10 @@ var init_TaskUpdateTool = __esm(() => {
|
|
|
378096
378281
|
from: exports_external.string(),
|
|
378097
378282
|
to: exports_external.string()
|
|
378098
378283
|
}).optional(),
|
|
378099
|
-
verificationNudgeNeeded: exports_external.boolean().optional()
|
|
378284
|
+
verificationNudgeNeeded: exports_external.boolean().optional(),
|
|
378285
|
+
completionDeferred: exports_external.boolean().optional(),
|
|
378286
|
+
completionMutationTool: exports_external.string().optional(),
|
|
378287
|
+
completionVerificationTarget: exports_external.string().optional()
|
|
378100
378288
|
}));
|
|
378101
378289
|
TaskUpdateTool = buildTool({
|
|
378102
378290
|
name: TASK_UPDATE_TOOL_NAME,
|
|
@@ -378192,6 +378380,9 @@ var init_TaskUpdateTool = __esm(() => {
|
|
|
378192
378380
|
};
|
|
378193
378381
|
}
|
|
378194
378382
|
const updatedFields = [];
|
|
378383
|
+
let completionDeferred = false;
|
|
378384
|
+
let completionMutationTool;
|
|
378385
|
+
let completionVerificationTarget;
|
|
378195
378386
|
const updates = {};
|
|
378196
378387
|
if (subject !== undefined && subject !== existingTask.subject) {
|
|
378197
378388
|
updates.subject = subject;
|
|
@@ -378262,27 +378453,43 @@ var init_TaskUpdateTool = __esm(() => {
|
|
|
378262
378453
|
}
|
|
378263
378454
|
};
|
|
378264
378455
|
}
|
|
378265
|
-
const
|
|
378266
|
-
|
|
378267
|
-
|
|
378268
|
-
|
|
378269
|
-
|
|
378456
|
+
const otherActionableTasks = [...tasksById.values()].filter((task) => task.id !== taskId && !task.metadata?._internal && (task.status === "pending" || task.status === "in_progress"));
|
|
378457
|
+
if (existingTask.status === "in_progress" && otherActionableTasks.length === 0) {
|
|
378458
|
+
const evidence = evaluateCompletionEvidence({
|
|
378459
|
+
messages: context5.messages,
|
|
378460
|
+
taskId
|
|
378461
|
+
});
|
|
378462
|
+
if (evidence.defer) {
|
|
378463
|
+
completionDeferred = true;
|
|
378464
|
+
completionMutationTool = evidence.mutationTool;
|
|
378465
|
+
completionVerificationTarget = evidence.target;
|
|
378466
|
+
}
|
|
378467
|
+
}
|
|
378468
|
+
if (!completionDeferred) {
|
|
378469
|
+
const blockingErrors = [];
|
|
378470
|
+
const generator = executeTaskCompletedHooks(taskId, existingTask.subject, existingTask.description, getAgentName(), getTeamName(), undefined, context5?.abortController?.signal, undefined, context5);
|
|
378471
|
+
for await (const result of generator) {
|
|
378472
|
+
if (result.blockingError) {
|
|
378473
|
+
blockingErrors.push(getTaskCompletedHookMessage(result.blockingError));
|
|
378474
|
+
}
|
|
378270
378475
|
}
|
|
378271
|
-
|
|
378272
|
-
|
|
378273
|
-
|
|
378274
|
-
|
|
378275
|
-
|
|
378276
|
-
|
|
378277
|
-
|
|
378278
|
-
error: blockingErrors.join(`
|
|
378476
|
+
if (blockingErrors.length > 0) {
|
|
378477
|
+
return {
|
|
378478
|
+
data: {
|
|
378479
|
+
success: false,
|
|
378480
|
+
taskId,
|
|
378481
|
+
updatedFields: [],
|
|
378482
|
+
error: blockingErrors.join(`
|
|
378279
378483
|
`)
|
|
378280
|
-
|
|
378281
|
-
|
|
378484
|
+
}
|
|
378485
|
+
};
|
|
378486
|
+
}
|
|
378282
378487
|
}
|
|
378283
378488
|
}
|
|
378284
|
-
|
|
378285
|
-
|
|
378489
|
+
if (!completionDeferred) {
|
|
378490
|
+
updates.status = status;
|
|
378491
|
+
updatedFields.push("status");
|
|
378492
|
+
}
|
|
378286
378493
|
}
|
|
378287
378494
|
}
|
|
378288
378495
|
const newBlocks = (normalizedAddBlocks ?? []).filter((id) => !existingTask.blocks.includes(id));
|
|
@@ -378329,7 +378536,10 @@ var init_TaskUpdateTool = __esm(() => {
|
|
|
378329
378536
|
taskId,
|
|
378330
378537
|
updatedFields,
|
|
378331
378538
|
statusChange: updates.status !== undefined ? { from: existingTask.status, to: updates.status } : undefined,
|
|
378332
|
-
verificationNudgeNeeded
|
|
378539
|
+
verificationNudgeNeeded,
|
|
378540
|
+
completionDeferred: completionDeferred || undefined,
|
|
378541
|
+
completionMutationTool,
|
|
378542
|
+
completionVerificationTarget
|
|
378333
378543
|
}
|
|
378334
378544
|
};
|
|
378335
378545
|
},
|
|
@@ -378340,7 +378550,10 @@ var init_TaskUpdateTool = __esm(() => {
|
|
|
378340
378550
|
updatedFields,
|
|
378341
378551
|
error: error40,
|
|
378342
378552
|
statusChange,
|
|
378343
|
-
verificationNudgeNeeded
|
|
378553
|
+
verificationNudgeNeeded,
|
|
378554
|
+
completionDeferred,
|
|
378555
|
+
completionMutationTool,
|
|
378556
|
+
completionVerificationTarget
|
|
378344
378557
|
} = content;
|
|
378345
378558
|
if (!success2) {
|
|
378346
378559
|
return {
|
|
@@ -378350,6 +378563,14 @@ var init_TaskUpdateTool = __esm(() => {
|
|
|
378350
378563
|
is_error: true
|
|
378351
378564
|
};
|
|
378352
378565
|
}
|
|
378566
|
+
if (completionDeferred) {
|
|
378567
|
+
const target = completionVerificationTarget ? ` to ${completionVerificationTarget}` : "";
|
|
378568
|
+
return {
|
|
378569
|
+
tool_use_id: toolUseID,
|
|
378570
|
+
type: "tool_result",
|
|
378571
|
+
content: `Task #${taskId} remains in_progress. ` + `${completionMutationTool ?? "A file tool"} made the latest change` + `${target}, but no successful observable check ran afterward. ` + `Run the smallest relevant verification now, fix any failure, then ` + `retry TaskUpdate with status completed. For a browser UI, load it ` + `and inspect runtime/console behavior. Do not create a duplicate ` + `task; this task is still actionable.`
|
|
378572
|
+
};
|
|
378573
|
+
}
|
|
378353
378574
|
let resultContent = `Updated task #${taskId} ${updatedFields.join(", ")}`;
|
|
378354
378575
|
if (statusChange?.to === "completed" && getAgentId() && isAgentSwarmsEnabled()) {
|
|
378355
378576
|
resultContent += `
|
|
@@ -381718,7 +381939,7 @@ var init_prompt20 = __esm(() => {
|
|
|
381718
381939
|
init_envUtils();
|
|
381719
381940
|
init_teammate();
|
|
381720
381941
|
init_teammateContext();
|
|
381721
|
-
|
|
381942
|
+
init_prompt3();
|
|
381722
381943
|
init_constants2();
|
|
381723
381944
|
init_forkSubagent();
|
|
381724
381945
|
});
|
|
@@ -381772,7 +381993,7 @@ var init_AgentTool = __esm(() => {
|
|
|
381772
381993
|
init_uuid();
|
|
381773
381994
|
init_worktree3();
|
|
381774
381995
|
init_UI6();
|
|
381775
|
-
|
|
381996
|
+
init_prompt3();
|
|
381776
381997
|
init_spawnMultiAgent();
|
|
381777
381998
|
init_agentColorManager();
|
|
381778
381999
|
init_agentToolUtils();
|
|
@@ -383357,11 +383578,11 @@ function summarizeRecentActivities(activities) {
|
|
|
383357
383578
|
var MAX_HINT_CHARS = 300;
|
|
383358
383579
|
var init_collapseReadSearch = __esm(() => {
|
|
383359
383580
|
init_Tool();
|
|
383360
|
-
|
|
383581
|
+
init_prompt4();
|
|
383361
383582
|
init_constants4();
|
|
383362
383583
|
init_primitiveTools();
|
|
383363
383584
|
init_gitOperationTracking();
|
|
383364
|
-
|
|
383585
|
+
init_prompt8();
|
|
383365
383586
|
init_file();
|
|
383366
383587
|
init_fullscreen();
|
|
383367
383588
|
init_memoryFileDetection();
|
|
@@ -384517,12 +384738,12 @@ var init_sessionFileAccessHooks = __esm(() => {
|
|
|
384517
384738
|
init_analytics();
|
|
384518
384739
|
init_types11();
|
|
384519
384740
|
init_FileReadTool();
|
|
384520
|
-
init_prompt2();
|
|
384521
|
-
init_FileWriteTool();
|
|
384522
384741
|
init_prompt3();
|
|
384742
|
+
init_FileWriteTool();
|
|
384743
|
+
init_prompt4();
|
|
384523
384744
|
init_GlobTool();
|
|
384524
384745
|
init_GrepTool();
|
|
384525
|
-
|
|
384746
|
+
init_prompt2();
|
|
384526
384747
|
init_memoryFileDetection();
|
|
384527
384748
|
init_agentContext();
|
|
384528
384749
|
});
|
|
@@ -384757,9 +384978,9 @@ var MEMORY_ACCESS_TOOL_NAMES;
|
|
|
384757
384978
|
var init_attribution = __esm(() => {
|
|
384758
384979
|
init_state();
|
|
384759
384980
|
init_xml();
|
|
384760
|
-
init_prompt2();
|
|
384761
384981
|
init_prompt3();
|
|
384762
|
-
|
|
384982
|
+
init_prompt4();
|
|
384983
|
+
init_prompt2();
|
|
384763
384984
|
init_commitAttribution();
|
|
384764
384985
|
init_debug();
|
|
384765
384986
|
init_json();
|
|
@@ -385074,9 +385295,9 @@ var init_prompt21 = __esm(() => {
|
|
|
385074
385295
|
init_slowOperations();
|
|
385075
385296
|
init_undercover();
|
|
385076
385297
|
init_constants2();
|
|
385077
|
-
init_prompt2();
|
|
385078
385298
|
init_prompt3();
|
|
385079
|
-
|
|
385299
|
+
init_prompt4();
|
|
385300
|
+
init_prompt2();
|
|
385080
385301
|
init_TodoWriteTool();
|
|
385081
385302
|
});
|
|
385082
385303
|
|
|
@@ -387805,7 +388026,7 @@ function isAnyTracingEnabled() {
|
|
|
387805
388026
|
return isTelemetryEnabled() || isEnhancedTelemetryEnabled() || isBetaTracingEnabled();
|
|
387806
388027
|
}
|
|
387807
388028
|
function getTracer() {
|
|
387808
|
-
return import_api39.trace.getTracer("ur-agent.gen_ai", "1.65.
|
|
388029
|
+
return import_api39.trace.getTracer("ur-agent.gen_ai", "1.65.13");
|
|
387809
388030
|
}
|
|
387810
388031
|
function createSpanAttributes(spanType, customAttributes = {}) {
|
|
387811
388032
|
const baseAttributes = getTelemetryAttributes();
|
|
@@ -388533,7 +388754,7 @@ function getAskUserQuestionCorrection(error40) {
|
|
|
388533
388754
|
return typeof index2 === "number" ? Math.max(count3, index2 + 1) : count3;
|
|
388534
388755
|
}, 0);
|
|
388535
388756
|
const countNotice = inferredCount > 4 ? ` This call contains at least ${inferredCount} incomplete question entries.` : "";
|
|
388536
|
-
return "AskUserQuestion requires 1-4 complete question objects. Each object must " + "contain `question`, `header`, and an `options` array with 2-8 " + "objects containing `label`; include `description` only when it adds a " + "useful consequence or trade-off." + countNotice + " Do not invent missing choices or truncate
|
|
388757
|
+
return "AskUserQuestion requires 1-4 complete question objects. Each object must " + "contain `question`, `header`, and an `options` array with 2-8 " + "objects containing `label`; include `description` only when it adds a " + "useful consequence or trade-off." + countNotice + " Do not invent missing choices or truncate question/option content. " + "Overlong UI headers are compacted automatically. Retry with at most four " + "complete questions, ask remaining decisions in later rounds, and do not " + "repeat the unchanged call.";
|
|
388537
388758
|
}
|
|
388538
388759
|
function getWriteCorrection(error40) {
|
|
388539
388760
|
const missingRequiredField = error40.issues.some((issue2) => issue2.code === "invalid_type" && issue2.message.includes("received undefined") && (issue2.path[0] === "file_path" || issue2.path[0] === "content"));
|
|
@@ -388595,9 +388816,65 @@ var init_toolErrors = __esm(() => {
|
|
|
388595
388816
|
});
|
|
388596
388817
|
|
|
388597
388818
|
// src/services/tools/taskListGate.ts
|
|
388819
|
+
import { dirname as dirname45 } from "path";
|
|
388820
|
+
function isShellOperator(token, operator) {
|
|
388821
|
+
return typeof token === "object" && token !== null && "op" in token && token.op === operator;
|
|
388822
|
+
}
|
|
388823
|
+
function isPlanDirectoryBootstrapForGate(input) {
|
|
388824
|
+
if (typeof input.toolInput !== "object" || input.toolInput === null) {
|
|
388825
|
+
return false;
|
|
388826
|
+
}
|
|
388827
|
+
const candidate = input.toolInput;
|
|
388828
|
+
if (typeof candidate.command !== "string" || candidate.run_in_background === true || candidate.dangerouslyDisableSandbox === true || candidate._simulatedSedEdit !== undefined) {
|
|
388829
|
+
return false;
|
|
388830
|
+
}
|
|
388831
|
+
const command = candidate.command;
|
|
388832
|
+
if (command.includes("$") || command.includes("`") || command.includes("\\") || command.includes(`
|
|
388833
|
+
`) || command.includes("\r") || command.includes("\x00") || hasUnbalancedQuotes(command)) {
|
|
388834
|
+
return false;
|
|
388835
|
+
}
|
|
388836
|
+
const parsed = tryParseShellCommand(command);
|
|
388837
|
+
if (!parsed.success)
|
|
388838
|
+
return false;
|
|
388839
|
+
const tokens = parsed.tokens;
|
|
388840
|
+
let expectedPlanDirectory;
|
|
388841
|
+
try {
|
|
388842
|
+
expectedPlanDirectory = dirname45(expandPath(input.expectedPlanFile));
|
|
388843
|
+
} catch {
|
|
388844
|
+
return false;
|
|
388845
|
+
}
|
|
388846
|
+
const isPlanDirectory = (token) => {
|
|
388847
|
+
if (typeof token !== "string" || token.trim() === "")
|
|
388848
|
+
return false;
|
|
388849
|
+
try {
|
|
388850
|
+
return expandPath(token) === expectedPlanDirectory;
|
|
388851
|
+
} catch {
|
|
388852
|
+
return false;
|
|
388853
|
+
}
|
|
388854
|
+
};
|
|
388855
|
+
const isMkdir = tokens.length === 3 && tokens[0] === "mkdir" && tokens[1] === "-p" && isPlanDirectory(tokens[2]);
|
|
388856
|
+
if (isMkdir)
|
|
388857
|
+
return true;
|
|
388858
|
+
const hasSilentStderr = tokens[3] === "2" && isShellOperator(tokens[4], ">") && tokens[5] === "/dev/null";
|
|
388859
|
+
const guardOperatorIndex = hasSilentStderr ? 6 : 3;
|
|
388860
|
+
const mkdirIndex = guardOperatorIndex + 1;
|
|
388861
|
+
const hasGuardedMkdir = tokens[0] === "ls" && tokens[1] === "-la" && isPlanDirectory(tokens[2]) && isShellOperator(tokens[guardOperatorIndex], "||") && tokens[mkdirIndex] === "mkdir" && tokens[mkdirIndex + 1] === "-p" && isPlanDirectory(tokens[mkdirIndex + 2]);
|
|
388862
|
+
if (!hasGuardedMkdir)
|
|
388863
|
+
return false;
|
|
388864
|
+
const afterMkdir = mkdirIndex + 3;
|
|
388865
|
+
if (tokens.length === afterMkdir)
|
|
388866
|
+
return true;
|
|
388867
|
+
return tokens.length === afterMkdir + 4 && isShellOperator(tokens[afterMkdir], "&&") && tokens[afterMkdir + 1] === "ls" && tokens[afterMkdir + 2] === "-la" && isPlanDirectory(tokens[afterMkdir + 3]);
|
|
388868
|
+
}
|
|
388598
388869
|
function isPlanArtifactMutationForGate(input) {
|
|
388599
388870
|
if (!input.isPlanMode)
|
|
388600
388871
|
return false;
|
|
388872
|
+
if (input.toolName === "Bash") {
|
|
388873
|
+
return isPlanDirectoryBootstrapForGate({
|
|
388874
|
+
toolInput: input.toolInput,
|
|
388875
|
+
expectedPlanFile: input.expectedPlanFile
|
|
388876
|
+
});
|
|
388877
|
+
}
|
|
388601
388878
|
if (!PLAN_ARTIFACT_MUTATING_TOOLS.has(input.toolName))
|
|
388602
388879
|
return false;
|
|
388603
388880
|
if (typeof input.toolInput !== "object" || input.toolInput === null || !("file_path" in input.toolInput)) {
|
|
@@ -388636,10 +388913,47 @@ function isLocalPreviewOpenForTaskGate(input) {
|
|
|
388636
388913
|
return false;
|
|
388637
388914
|
}
|
|
388638
388915
|
}
|
|
388916
|
+
function safeInlineHtmlSyntaxCheck(script) {
|
|
388917
|
+
const match = script.match(/^const\s+(?<fs>[A-Za-z_$][\w$]*)\s*=\s*require\((?<fsq>['"])fs\k<fsq>\)\s*;\s*const\s+(?<source>[A-Za-z_$][\w$]*)\s*=\s*\k<fs>\.readFileSync\((?<pathq>['"])(?<path>[^'"\0\r\n]+)\k<pathq>\s*,\s*(?<utfq>['"])utf8\k<utfq>\)\s*;\s*try\s*\{\s*new\s+Function\(\k<source>\.split\((?<openq>['"])<script>\k<openq>\)\[1\]\.split\((?<closeq>['"])<\/script>\k<closeq>\)\[0\]\)\s*;\s*console\.log\((?<okq>['"])[^'"\0\r\n]*\k<okq>\)\s*;\s*\}\s*catch\s*\((?<error>[A-Za-z_$][\w$]*)\)\s*\{\s*console\.log\((?<errorq>['"])[^'"\0\r\n]*\k<errorq>\s*,\s*\k<error>\.message\)\s*;\s*\}\s*;?$/);
|
|
388918
|
+
const path14 = match?.groups?.path;
|
|
388919
|
+
return path14 ? { path: path14 } : null;
|
|
388920
|
+
}
|
|
388921
|
+
function isSyntaxVerificationForTaskGate(input) {
|
|
388922
|
+
if (input.toolName !== "Bash" || typeof input.toolInput !== "object" || input.toolInput === null) {
|
|
388923
|
+
return false;
|
|
388924
|
+
}
|
|
388925
|
+
const candidate = input.toolInput;
|
|
388926
|
+
if (typeof candidate.command !== "string" || candidate.command.trim() === "" || candidate.run_in_background === true || candidate.dangerouslyDisableSandbox === true || candidate._simulatedSedEdit !== undefined || candidate.command.includes("$") || candidate.command.includes("`") || candidate.command.includes("\\") || candidate.command.includes(`
|
|
388927
|
+
`) || candidate.command.includes("\r") || candidate.command.includes("\x00") || hasUnbalancedQuotes(candidate.command)) {
|
|
388928
|
+
return false;
|
|
388929
|
+
}
|
|
388930
|
+
const parsed = tryParseShellCommand(candidate.command);
|
|
388931
|
+
if (!parsed.success)
|
|
388932
|
+
return false;
|
|
388933
|
+
const tokens = parsed.tokens;
|
|
388934
|
+
const allStrings = (values2) => values2.every((value) => typeof value === "string");
|
|
388935
|
+
const safeNodeCheckCommand = /^node[ \t]+--check[ \t]+(?:"[^"$`\\\0\r\n]+"|'[^'\0\r\n]+'|[A-Za-z0-9_./:@%+,=\-]+)[ \t]*$/.test(candidate.command);
|
|
388936
|
+
if (safeNodeCheckCommand && tokens.length === 3 && allStrings(tokens) && tokens[0] === "node" && tokens[1] === "--check") {
|
|
388937
|
+
const path14 = tokens[2];
|
|
388938
|
+
return Boolean(path14 && !path14.startsWith("-") && !/[\0\r\n$`]/.test(path14));
|
|
388939
|
+
}
|
|
388940
|
+
const hasLeadingWc = tokens.length === 7 && tokens[0] === "wc" && tokens[1] === "-l" && typeof tokens[2] === "string" && isShellOperator(tokens[3], "&&");
|
|
388941
|
+
const nodeIndex = hasLeadingWc ? 4 : 0;
|
|
388942
|
+
if (tokens.length !== nodeIndex + 3 || tokens[nodeIndex] !== "node" || tokens[nodeIndex + 1] !== "-e" || typeof tokens[nodeIndex + 2] !== "string") {
|
|
388943
|
+
return false;
|
|
388944
|
+
}
|
|
388945
|
+
const check3 = safeInlineHtmlSyntaxCheck(tokens[nodeIndex + 2]);
|
|
388946
|
+
if (!check3)
|
|
388947
|
+
return false;
|
|
388948
|
+
return !hasLeadingWc || tokens[2] === check3.path;
|
|
388949
|
+
}
|
|
388639
388950
|
function isMutationRequiringTaskList(input) {
|
|
388640
388951
|
return input.isMutating && !isLocalPreviewOpenForTaskGate({
|
|
388641
388952
|
toolName: input.toolName,
|
|
388642
388953
|
toolInput: input.toolInput
|
|
388954
|
+
}) && !isSyntaxVerificationForTaskGate({
|
|
388955
|
+
toolName: input.toolName,
|
|
388956
|
+
toolInput: input.toolInput
|
|
388643
388957
|
});
|
|
388644
388958
|
}
|
|
388645
388959
|
function getTaskListGateConfig() {
|
|
@@ -389141,7 +389455,7 @@ var init_rootcause = __esm(() => {
|
|
|
389141
389455
|
|
|
389142
389456
|
// src/stability/ledger.ts
|
|
389143
389457
|
import { appendFileSync as appendFileSync4, existsSync as existsSync29, mkdirSync as mkdirSync19, readFileSync as readFileSync31 } from "fs";
|
|
389144
|
-
import { dirname as
|
|
389458
|
+
import { dirname as dirname46, join as join109 } from "path";
|
|
389145
389459
|
function ledgerPath(cwd2) {
|
|
389146
389460
|
return join109(cwd2, ".ur", "actions.jsonl");
|
|
389147
389461
|
}
|
|
@@ -389169,7 +389483,7 @@ function filesFromArgs(args) {
|
|
|
389169
389483
|
function recordAction(cwd2, record3) {
|
|
389170
389484
|
try {
|
|
389171
389485
|
const file2 = ledgerPath(cwd2);
|
|
389172
|
-
mkdirSync19(
|
|
389486
|
+
mkdirSync19(dirname46(file2), { recursive: true });
|
|
389173
389487
|
appendFileSync4(file2, JSON.stringify(record3) + `
|
|
389174
389488
|
`);
|
|
389175
389489
|
} catch {}
|
|
@@ -389816,7 +390130,7 @@ async function countTasksForGate(toolUseContext) {
|
|
|
389816
390130
|
}
|
|
389817
390131
|
}
|
|
389818
390132
|
function isCurrentPlanArtifactMutation(toolName, input, toolUseContext) {
|
|
389819
|
-
if (toolName !== FILE_WRITE_TOOL_NAME && toolName !== FILE_EDIT_TOOL_NAME && toolName !== "MultiEdit") {
|
|
390133
|
+
if (toolName !== FILE_WRITE_TOOL_NAME && toolName !== FILE_EDIT_TOOL_NAME && toolName !== "MultiEdit" && toolName !== BASH_TOOL_NAME) {
|
|
389820
390134
|
return false;
|
|
389821
390135
|
}
|
|
389822
390136
|
try {
|
|
@@ -391149,10 +391463,10 @@ var init_toolExecution = __esm(() => {
|
|
|
391149
391463
|
init_Tool();
|
|
391150
391464
|
init_constants2();
|
|
391151
391465
|
init_bashPermissions();
|
|
391152
|
-
init_prompt2();
|
|
391153
391466
|
init_prompt3();
|
|
391467
|
+
init_prompt4();
|
|
391154
391468
|
init_gitOperationTracking();
|
|
391155
|
-
|
|
391469
|
+
init_prompt8();
|
|
391156
391470
|
init_tools2();
|
|
391157
391471
|
init_attachments2();
|
|
391158
391472
|
init_debug();
|
|
@@ -391552,6 +391866,294 @@ var init_StreamingToolExecutor = __esm(() => {
|
|
|
391552
391866
|
init_toolExecution();
|
|
391553
391867
|
});
|
|
391554
391868
|
|
|
391869
|
+
// src/utils/explicitChoiceRecovery.ts
|
|
391870
|
+
function objectValue5(value) {
|
|
391871
|
+
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
391872
|
+
}
|
|
391873
|
+
function hasOnlyKeys(value, required2, optional3 = []) {
|
|
391874
|
+
const allowed = new Set([...required2, ...optional3]);
|
|
391875
|
+
const keys2 = Object.keys(value);
|
|
391876
|
+
return required2.every((key) => Object.prototype.hasOwnProperty.call(value, key)) && keys2.every((key) => allowed.has(key));
|
|
391877
|
+
}
|
|
391878
|
+
function hasCanonicalAskShape(value) {
|
|
391879
|
+
const input = objectValue5(value);
|
|
391880
|
+
if (!input || !hasOnlyKeys(input, ["questions"], ["metadata"]) || !Array.isArray(input.questions) || input.questions.length < 1 || input.questions.length > MAX_QUESTIONS2) {
|
|
391881
|
+
return false;
|
|
391882
|
+
}
|
|
391883
|
+
if (input.metadata !== undefined && !objectValue5(input.metadata)) {
|
|
391884
|
+
return false;
|
|
391885
|
+
}
|
|
391886
|
+
return input.questions.every((questionValue) => {
|
|
391887
|
+
const question = objectValue5(questionValue);
|
|
391888
|
+
if (!question || !hasOnlyKeys(question, ["question", "header", "options"], ["multiSelect"]) || typeof question.question !== "string" || typeof question.header !== "string" || !Array.isArray(question.options) || question.options.length < 2 || question.options.length > MAX_OPTIONS2 || question.multiSelect !== undefined && typeof question.multiSelect !== "boolean") {
|
|
391889
|
+
return false;
|
|
391890
|
+
}
|
|
391891
|
+
return question.options.every((optionValue) => {
|
|
391892
|
+
const option = objectValue5(optionValue);
|
|
391893
|
+
return Boolean(option && hasOnlyKeys(option, ["label"], ["description", "preview"]) && typeof option.label === "string" && (option.description === undefined || typeof option.description === "string") && (option.preview === undefined || typeof option.preview === "string"));
|
|
391894
|
+
});
|
|
391895
|
+
});
|
|
391896
|
+
}
|
|
391897
|
+
function findJsonObjectEnd2(text, start) {
|
|
391898
|
+
let depth = 0;
|
|
391899
|
+
let inString = false;
|
|
391900
|
+
let escaped = false;
|
|
391901
|
+
for (let index2 = start;index2 < text.length; index2++) {
|
|
391902
|
+
const character = text[index2];
|
|
391903
|
+
if (inString) {
|
|
391904
|
+
if (escaped) {
|
|
391905
|
+
escaped = false;
|
|
391906
|
+
} else if (character === "\\") {
|
|
391907
|
+
escaped = true;
|
|
391908
|
+
} else if (character === '"') {
|
|
391909
|
+
inString = false;
|
|
391910
|
+
}
|
|
391911
|
+
continue;
|
|
391912
|
+
}
|
|
391913
|
+
if (character === '"') {
|
|
391914
|
+
inString = true;
|
|
391915
|
+
} else if (character === "{") {
|
|
391916
|
+
depth++;
|
|
391917
|
+
} else if (character === "}") {
|
|
391918
|
+
depth--;
|
|
391919
|
+
if (depth === 0)
|
|
391920
|
+
return index2 + 1;
|
|
391921
|
+
if (depth < 0)
|
|
391922
|
+
return null;
|
|
391923
|
+
}
|
|
391924
|
+
}
|
|
391925
|
+
return null;
|
|
391926
|
+
}
|
|
391927
|
+
function hasExplicitAskToolIntent(prefix) {
|
|
391928
|
+
const nearby = prefix.slice(-1000);
|
|
391929
|
+
if (/\b(?:for example|example|sample|illustration|schema)\b/i.test(nearby.slice(-240))) {
|
|
391930
|
+
return false;
|
|
391931
|
+
}
|
|
391932
|
+
return /\b(?:use|using|call|calling|invoke|invoking|emit|emitting)\b[\s\S]{0,100}\bAskUserQuestion\b/i.test(nearby) || /\bAskUserQuestion\b[\s\S]{0,100}\b(?:tool|call|invoke)\b/i.test(nearby);
|
|
391933
|
+
}
|
|
391934
|
+
function parseFinalReasoningAskJson(reasoning) {
|
|
391935
|
+
if (reasoning.length === 0 || reasoning.length > MAX_REASONING_CHARS) {
|
|
391936
|
+
return null;
|
|
391937
|
+
}
|
|
391938
|
+
const trimmed = reasoning.trimEnd();
|
|
391939
|
+
if (!trimmed.endsWith("}"))
|
|
391940
|
+
return null;
|
|
391941
|
+
const candidates2 = [];
|
|
391942
|
+
for (let start = trimmed.indexOf("{");start !== -1; start = trimmed.indexOf("{", start + 1)) {
|
|
391943
|
+
const end = findJsonObjectEnd2(trimmed, start);
|
|
391944
|
+
if (end !== trimmed.length)
|
|
391945
|
+
continue;
|
|
391946
|
+
try {
|
|
391947
|
+
const parsed = JSON.parse(trimmed.slice(start));
|
|
391948
|
+
if (hasCanonicalAskShape(parsed)) {
|
|
391949
|
+
candidates2.push({ start, input: parsed });
|
|
391950
|
+
}
|
|
391951
|
+
} catch {}
|
|
391952
|
+
}
|
|
391953
|
+
if (candidates2.length !== 1)
|
|
391954
|
+
return null;
|
|
391955
|
+
const candidate = candidates2[0];
|
|
391956
|
+
const prefix = trimmed.slice(0, candidate.start);
|
|
391957
|
+
if (prefix.includes("```") || !hasExplicitAskToolIntent(prefix))
|
|
391958
|
+
return null;
|
|
391959
|
+
return candidate.input;
|
|
391960
|
+
}
|
|
391961
|
+
function headerFromQuestion2(question) {
|
|
391962
|
+
const stopWords = new Set([
|
|
391963
|
+
"a",
|
|
391964
|
+
"about",
|
|
391965
|
+
"also",
|
|
391966
|
+
"an",
|
|
391967
|
+
"are",
|
|
391968
|
+
"be",
|
|
391969
|
+
"do",
|
|
391970
|
+
"does",
|
|
391971
|
+
"for",
|
|
391972
|
+
"is",
|
|
391973
|
+
"or",
|
|
391974
|
+
"should",
|
|
391975
|
+
"support",
|
|
391976
|
+
"that",
|
|
391977
|
+
"the",
|
|
391978
|
+
"this",
|
|
391979
|
+
"to",
|
|
391980
|
+
"want",
|
|
391981
|
+
"we",
|
|
391982
|
+
"what",
|
|
391983
|
+
"which",
|
|
391984
|
+
"with",
|
|
391985
|
+
"without",
|
|
391986
|
+
"you"
|
|
391987
|
+
]);
|
|
391988
|
+
const word = question.replace(/[^A-Za-z0-9]+/g, " ").split(/\s+/).find((part) => part && !stopWords.has(part.toLowerCase()));
|
|
391989
|
+
const header = word ?? "Choice";
|
|
391990
|
+
return (header.slice(0, 1).toLocaleUpperCase() + header.slice(1)).slice(0, 12);
|
|
391991
|
+
}
|
|
391992
|
+
function parseExplicitChoicePrompt(text) {
|
|
391993
|
+
if (!text || text.length > MAX_MENU_CHARS || /```|[{}]/.test(text)) {
|
|
391994
|
+
return null;
|
|
391995
|
+
}
|
|
391996
|
+
const lines = text.replace(/\r\n?/g, `
|
|
391997
|
+
`).split(`
|
|
391998
|
+
`).map((line) => line.trim()).filter(Boolean);
|
|
391999
|
+
const questionIndexes = lines.flatMap((line, index2) => /^\*\*[^*\n]+\?\*\*$/.test(line) ? [index2] : []);
|
|
392000
|
+
if (questionIndexes.length !== 1)
|
|
392001
|
+
return null;
|
|
392002
|
+
const questionIndex = questionIndexes[0];
|
|
392003
|
+
const preamble = lines.slice(0, questionIndex);
|
|
392004
|
+
if (preamble.length > 2 || preamble.some((line) => line.length > 500 || line.includes("?") || /^[-*+#>]/.test(line))) {
|
|
392005
|
+
return null;
|
|
392006
|
+
}
|
|
392007
|
+
const questionMatch = lines[questionIndex].match(/^\*\*([^*\n]+\?)\*\*$/);
|
|
392008
|
+
const question = questionMatch?.[1];
|
|
392009
|
+
if (!question || question.length > MAX_QUESTION_CHARS2)
|
|
392010
|
+
return null;
|
|
392011
|
+
const options2 = [];
|
|
392012
|
+
let lineIndex = questionIndex + 1;
|
|
392013
|
+
while (lineIndex < lines.length) {
|
|
392014
|
+
const match = lines[lineIndex].match(/^-\s+\*\*([^*\n]+)\*\*\s+[\u2013\u2014]\s+(.+)$/);
|
|
392015
|
+
if (!match)
|
|
392016
|
+
break;
|
|
392017
|
+
const label = match[1];
|
|
392018
|
+
const description = match[2];
|
|
392019
|
+
const normalizedLabel = label.toLocaleLowerCase();
|
|
392020
|
+
if (label.length > MAX_LABEL_CHARS2 || description.length > MAX_DESCRIPTION_CHARS2 || normalizedLabel === "other" || normalizedLabel === "__other__") {
|
|
392021
|
+
return null;
|
|
392022
|
+
}
|
|
392023
|
+
options2.push({ label, description });
|
|
392024
|
+
lineIndex++;
|
|
392025
|
+
}
|
|
392026
|
+
if (options2.length < 2 || options2.length > MAX_OPTIONS2)
|
|
392027
|
+
return null;
|
|
392028
|
+
if (new Set(options2.map((option) => option.label.toLocaleLowerCase())).size !== options2.length) {
|
|
392029
|
+
return null;
|
|
392030
|
+
}
|
|
392031
|
+
const trailing = lines.slice(lineIndex);
|
|
392032
|
+
if (trailing.length !== 1 || trailing[0].includes("?") || !/^(?:please\s+)?(?:select|choose|pick)\b.{0,120}\b(?:option|choice)\b/i.test(trailing[0])) {
|
|
392033
|
+
return null;
|
|
392034
|
+
}
|
|
392035
|
+
return {
|
|
392036
|
+
input: {
|
|
392037
|
+
questions: [
|
|
392038
|
+
{
|
|
392039
|
+
question,
|
|
392040
|
+
header: headerFromQuestion2(question),
|
|
392041
|
+
options: options2
|
|
392042
|
+
}
|
|
392043
|
+
]
|
|
392044
|
+
},
|
|
392045
|
+
source: "markdown_menu",
|
|
392046
|
+
remainingText: preamble.join(`
|
|
392047
|
+
`)
|
|
392048
|
+
};
|
|
392049
|
+
}
|
|
392050
|
+
function collectExplicitChoiceCandidates({
|
|
392051
|
+
thinkingBlocks,
|
|
392052
|
+
textBlocks
|
|
392053
|
+
}) {
|
|
392054
|
+
const candidates2 = [];
|
|
392055
|
+
const reasoningCandidates = thinkingBlocks.map(parseFinalReasoningAskJson).filter((input) => input !== null);
|
|
392056
|
+
if (reasoningCandidates.length === 1) {
|
|
392057
|
+
candidates2.push({
|
|
392058
|
+
input: reasoningCandidates[0],
|
|
392059
|
+
source: "thinking_json",
|
|
392060
|
+
remainingText: ""
|
|
392061
|
+
});
|
|
392062
|
+
}
|
|
392063
|
+
const menuCandidates = textBlocks.map(parseExplicitChoicePrompt).filter((candidate) => candidate !== null);
|
|
392064
|
+
if (menuCandidates.length === 1) {
|
|
392065
|
+
candidates2.push(menuCandidates[0]);
|
|
392066
|
+
}
|
|
392067
|
+
return candidates2;
|
|
392068
|
+
}
|
|
392069
|
+
var MAX_REASONING_CHARS, MAX_MENU_CHARS, MAX_QUESTION_CHARS2 = 500, MAX_LABEL_CHARS2 = 80, MAX_DESCRIPTION_CHARS2 = 500, MAX_OPTIONS2 = 8, MAX_QUESTIONS2 = 4;
|
|
392070
|
+
var init_explicitChoiceRecovery = __esm(() => {
|
|
392071
|
+
MAX_REASONING_CHARS = 64 * 1024;
|
|
392072
|
+
MAX_MENU_CHARS = 4 * 1024;
|
|
392073
|
+
});
|
|
392074
|
+
|
|
392075
|
+
// src/services/tools/explicitChoiceRecovery.ts
|
|
392076
|
+
import { isDeepStrictEqual as isDeepStrictEqual3 } from "util";
|
|
392077
|
+
function recoverExplicitChoiceToolUse({
|
|
392078
|
+
assistantMessages,
|
|
392079
|
+
tools,
|
|
392080
|
+
agentId,
|
|
392081
|
+
isNonInteractiveSession,
|
|
392082
|
+
uuid: uuid3
|
|
392083
|
+
}) {
|
|
392084
|
+
if (assistantMessages.length === 0 || agentId !== undefined || isNonInteractiveSession || assistantMessages.some((message) => {
|
|
392085
|
+
const content = message.message?.content;
|
|
392086
|
+
return message.isApiErrorMessage || Array.isArray(content) && content.some((block2) => block2.type === "tool_use");
|
|
392087
|
+
})) {
|
|
392088
|
+
return null;
|
|
392089
|
+
}
|
|
392090
|
+
const sourceMessage = assistantMessages.at(-1);
|
|
392091
|
+
if (!sourceMessage?.message || sourceMessage.message.stop_reason !== "end_turn") {
|
|
392092
|
+
return null;
|
|
392093
|
+
}
|
|
392094
|
+
const askTool = findToolByName(tools, ASK_USER_QUESTION_TOOL_NAME);
|
|
392095
|
+
if (!askTool)
|
|
392096
|
+
return null;
|
|
392097
|
+
try {
|
|
392098
|
+
if (!askTool.isEnabled())
|
|
392099
|
+
return null;
|
|
392100
|
+
} catch {
|
|
392101
|
+
return null;
|
|
392102
|
+
}
|
|
392103
|
+
const thinkingBlocks = [];
|
|
392104
|
+
const textBlocks = [];
|
|
392105
|
+
for (const assistantMessage of assistantMessages) {
|
|
392106
|
+
const content = assistantMessage.message?.content;
|
|
392107
|
+
if (!Array.isArray(content))
|
|
392108
|
+
continue;
|
|
392109
|
+
for (const block2 of content) {
|
|
392110
|
+
if (block2.type === "thinking" && typeof block2.thinking === "string") {
|
|
392111
|
+
thinkingBlocks.push(block2.thinking);
|
|
392112
|
+
} else if (block2.type === "text" && typeof block2.text === "string") {
|
|
392113
|
+
textBlocks.push(block2.text);
|
|
392114
|
+
}
|
|
392115
|
+
}
|
|
392116
|
+
}
|
|
392117
|
+
for (const candidate of collectExplicitChoiceCandidates({
|
|
392118
|
+
thinkingBlocks,
|
|
392119
|
+
textBlocks
|
|
392120
|
+
})) {
|
|
392121
|
+
const headerNormalizedInput = normalizeAskQuestionHeaders(candidate.input);
|
|
392122
|
+
const parsed = askTool.inputSchema.safeParse(headerNormalizedInput);
|
|
392123
|
+
if (!parsed.success || !isDeepStrictEqual3(parsed.data, headerNormalizedInput)) {
|
|
392124
|
+
continue;
|
|
392125
|
+
}
|
|
392126
|
+
const idSuffix = uuid3().replace(/[^A-Za-z0-9]/g, "");
|
|
392127
|
+
const toolUse = {
|
|
392128
|
+
type: "tool_use",
|
|
392129
|
+
id: `toolu_recovered_${idSuffix}`,
|
|
392130
|
+
name: ASK_USER_QUESTION_TOOL_NAME,
|
|
392131
|
+
input: parsed.data
|
|
392132
|
+
};
|
|
392133
|
+
const assistantMessage = {
|
|
392134
|
+
...sourceMessage,
|
|
392135
|
+
uuid: uuid3(),
|
|
392136
|
+
message: {
|
|
392137
|
+
...sourceMessage.message,
|
|
392138
|
+
content: [toolUse],
|
|
392139
|
+
stop_reason: "tool_use"
|
|
392140
|
+
}
|
|
392141
|
+
};
|
|
392142
|
+
return {
|
|
392143
|
+
assistantMessage,
|
|
392144
|
+
source: candidate.source,
|
|
392145
|
+
toolUse
|
|
392146
|
+
};
|
|
392147
|
+
}
|
|
392148
|
+
return null;
|
|
392149
|
+
}
|
|
392150
|
+
var init_explicitChoiceRecovery2 = __esm(() => {
|
|
392151
|
+
init_Tool();
|
|
392152
|
+
init_normalization();
|
|
392153
|
+
init_prompt();
|
|
392154
|
+
init_explicitChoiceRecovery();
|
|
392155
|
+
});
|
|
392156
|
+
|
|
391555
392157
|
// src/utils/queryProfiler.ts
|
|
391556
392158
|
function startQueryProfile() {
|
|
391557
392159
|
if (!ENABLED)
|
|
@@ -392128,9 +392730,9 @@ var init_memoryScan = __esm(() => {
|
|
|
392128
392730
|
// src/services/extractMemories/prompts.ts
|
|
392129
392731
|
var init_prompts = __esm(() => {
|
|
392130
392732
|
init_memoryTypes();
|
|
392131
|
-
init_prompt2();
|
|
392132
392733
|
init_prompt3();
|
|
392133
|
-
|
|
392734
|
+
init_prompt4();
|
|
392735
|
+
init_prompt2();
|
|
392134
392736
|
});
|
|
392135
392737
|
|
|
392136
392738
|
// src/services/extractMemories/extractMemories.ts
|
|
@@ -392174,9 +392776,9 @@ var init_extractMemories = __esm(() => {
|
|
|
392174
392776
|
init_memdir();
|
|
392175
392777
|
init_memoryScan();
|
|
392176
392778
|
init_paths();
|
|
392177
|
-
init_prompt2();
|
|
392178
392779
|
init_prompt3();
|
|
392179
|
-
|
|
392780
|
+
init_prompt4();
|
|
392781
|
+
init_prompt2();
|
|
392180
392782
|
init_constants4();
|
|
392181
392783
|
init_abortController();
|
|
392182
392784
|
init_debug();
|
|
@@ -392420,7 +393022,7 @@ var init_autoDream = __esm(() => {
|
|
|
392420
393022
|
init_consolidationPrompt();
|
|
392421
393023
|
init_consolidationLock();
|
|
392422
393024
|
init_DreamTask();
|
|
392423
|
-
|
|
393025
|
+
init_prompt4();
|
|
392424
393026
|
SESSION_SCAN_INTERVAL_MS = 10 * 60 * 1000;
|
|
392425
393027
|
DEFAULTS2 = {
|
|
392426
393028
|
minHours: 24,
|
|
@@ -392651,7 +393253,7 @@ import {
|
|
|
392651
393253
|
unlinkSync as unlinkSync8,
|
|
392652
393254
|
writeFileSync as writeFileSync20
|
|
392653
393255
|
} from "fs";
|
|
392654
|
-
import { isAbsolute as isAbsolute30, dirname as
|
|
393256
|
+
import { isAbsolute as isAbsolute30, dirname as dirname47, join as join111, relative as relative29, sep as sep25 } from "path";
|
|
392655
393257
|
function readJsonl(file2) {
|
|
392656
393258
|
if (!file2 || !existsSync30(file2))
|
|
392657
393259
|
return [];
|
|
@@ -392679,7 +393281,7 @@ function append2(file2, rec) {
|
|
|
392679
393281
|
});
|
|
392680
393282
|
}
|
|
392681
393283
|
function writeAtomic(file2, content) {
|
|
392682
|
-
mkdirSync20(
|
|
393284
|
+
mkdirSync20(dirname47(file2), { recursive: true });
|
|
392683
393285
|
const temporary = `${file2}.${process.pid}.${Date.now()}.tmp`;
|
|
392684
393286
|
try {
|
|
392685
393287
|
writeFileSync20(temporary, content, { mode: 384 });
|
|
@@ -393705,6 +394307,25 @@ async function* queryLoop(params, consumedCommandUuids, ownedRepeatedFailureQuer
|
|
|
393705
394307
|
logAntError("Query error", error40);
|
|
393706
394308
|
return { reason: "model_error", error: error40 };
|
|
393707
394309
|
}
|
|
394310
|
+
if (!toolUseContext.abortController.signal.aborted) {
|
|
394311
|
+
const recoveredChoice = recoverExplicitChoiceToolUse({
|
|
394312
|
+
assistantMessages,
|
|
394313
|
+
tools: toolUseContext.options.tools,
|
|
394314
|
+
agentId: toolUseContext.agentId,
|
|
394315
|
+
isNonInteractiveSession: Boolean(toolUseContext.options.isNonInteractiveSession),
|
|
394316
|
+
uuid: deps.uuid
|
|
394317
|
+
});
|
|
394318
|
+
if (recoveredChoice) {
|
|
394319
|
+
assistantMessages.push(recoveredChoice.assistantMessage);
|
|
394320
|
+
toolUseBlocks.push(recoveredChoice.toolUse);
|
|
394321
|
+
needsFollowUp = true;
|
|
394322
|
+
logForDebugging(`Recovered explicit AskUserQuestion call from ${recoveredChoice.source}`);
|
|
394323
|
+
yield recoveredChoice.assistantMessage;
|
|
394324
|
+
if (streamingToolExecutor && !toolUseContext.abortController.signal.aborted) {
|
|
394325
|
+
streamingToolExecutor.addTool(recoveredChoice.toolUse, recoveredChoice.assistantMessage);
|
|
394326
|
+
}
|
|
394327
|
+
}
|
|
394328
|
+
}
|
|
393708
394329
|
if (assistantMessages.length > 0) {
|
|
393709
394330
|
executePostSamplingHooks([...messagesForQuery, ...assistantMessages], systemPrompt, userContext, systemContext, toolUseContext, querySource);
|
|
393710
394331
|
}
|
|
@@ -394204,13 +394825,14 @@ var init_query = __esm(() => {
|
|
|
394204
394825
|
init_tokens();
|
|
394205
394826
|
init_context();
|
|
394206
394827
|
init_growthbook();
|
|
394207
|
-
|
|
394828
|
+
init_prompt9();
|
|
394208
394829
|
init_postSamplingHooks();
|
|
394209
394830
|
init_hooks5();
|
|
394210
394831
|
init_projectContextManifest();
|
|
394211
394832
|
init_dumpPrompts();
|
|
394212
394833
|
init_verifier();
|
|
394213
394834
|
init_StreamingToolExecutor();
|
|
394835
|
+
init_explicitChoiceRecovery2();
|
|
394214
394836
|
init_queryProfiler();
|
|
394215
394837
|
init_toolOrchestration();
|
|
394216
394838
|
init_repeatedFailureGuard();
|
|
@@ -396228,7 +396850,7 @@ var init_compact = __esm(() => {
|
|
|
396228
396850
|
init_state();
|
|
396229
396851
|
init_state();
|
|
396230
396852
|
init_FileReadTool();
|
|
396231
|
-
|
|
396853
|
+
init_prompt3();
|
|
396232
396854
|
init_ToolSearchTool();
|
|
396233
396855
|
init_attachments2();
|
|
396234
396856
|
init_config();
|
|
@@ -397063,7 +397685,7 @@ async function countBuiltInToolTokens(tools, getToolPermissionContext, agentInfo
|
|
|
397063
397685
|
};
|
|
397064
397686
|
}
|
|
397065
397687
|
const { isToolSearchEnabled: isToolSearchEnabled2 } = await Promise.resolve().then(() => (init_toolSearch(), exports_toolSearch));
|
|
397066
|
-
const { isDeferredTool: isDeferredTool2 } = await Promise.resolve().then(() => (
|
|
397688
|
+
const { isDeferredTool: isDeferredTool2 } = await Promise.resolve().then(() => (init_prompt8(), exports_prompt2));
|
|
397067
397689
|
const isDeferred = await isToolSearchEnabled2(model ?? "", tools, getToolPermissionContext, agentInfo?.activeAgents ?? [], "analyzeBuiltIn");
|
|
397068
397690
|
const alwaysLoadedTools = builtInTools.filter((t) => !isDeferredTool2(t));
|
|
397069
397691
|
const deferredBuiltinTools = builtInTools.filter((t) => isDeferredTool2(t));
|
|
@@ -397198,7 +397820,7 @@ async function countMcpToolTokens(tools, getToolPermissionContext, agentInfo, mo
|
|
|
397198
397820
|
const estimateTotal = estimates.reduce((s, e) => s + e, 0) || 1;
|
|
397199
397821
|
const mcpToolTokensByTool = estimates.map((e) => Math.round(e / estimateTotal * totalTokens));
|
|
397200
397822
|
const { isToolSearchEnabled: isToolSearchEnabled2 } = await Promise.resolve().then(() => (init_toolSearch(), exports_toolSearch));
|
|
397201
|
-
const { isDeferredTool: isDeferredTool2 } = await Promise.resolve().then(() => (
|
|
397823
|
+
const { isDeferredTool: isDeferredTool2 } = await Promise.resolve().then(() => (init_prompt8(), exports_prompt2));
|
|
397202
397824
|
const isDeferred = await isToolSearchEnabled2(model, tools, getToolPermissionContext, agentInfo?.activeAgents ?? [], "analyzeMcp");
|
|
397203
397825
|
const loadedMcpToolNames = new Set;
|
|
397204
397826
|
if (isDeferred && messages) {
|
|
@@ -397620,7 +398242,7 @@ var init_analyzeContext = __esm(() => {
|
|
|
397620
398242
|
init_tokenEstimation();
|
|
397621
398243
|
init_loadSkillsDir();
|
|
397622
398244
|
init_Tool();
|
|
397623
|
-
|
|
398245
|
+
init_prompt7();
|
|
397624
398246
|
init_api3();
|
|
397625
398247
|
init_agentmd();
|
|
397626
398248
|
init_context();
|
|
@@ -397935,7 +398557,7 @@ var init_toolSearch = __esm(() => {
|
|
|
397935
398557
|
init_growthbook();
|
|
397936
398558
|
init_analytics();
|
|
397937
398559
|
init_Tool();
|
|
397938
|
-
|
|
398560
|
+
init_prompt8();
|
|
397939
398561
|
init_analyzeContext();
|
|
397940
398562
|
init_betas2();
|
|
397941
398563
|
init_context();
|
|
@@ -397963,7 +398585,7 @@ var init_toolSearch = __esm(() => {
|
|
|
397963
398585
|
// src/services/vcr.ts
|
|
397964
398586
|
import { createHash as createHash34, randomUUID as randomUUID39 } from "crypto";
|
|
397965
398587
|
import { mkdir as mkdir24, readFile as readFile33, writeFile as writeFile24 } from "fs/promises";
|
|
397966
|
-
import { dirname as
|
|
398588
|
+
import { dirname as dirname48, join as join114 } from "path";
|
|
397967
398589
|
function shouldUseVCR() {
|
|
397968
398590
|
if (false) {}
|
|
397969
398591
|
if (process.env.USER_TYPE === "ant" && isEnvTruthy(process.env.FORCE_VCR)) {
|
|
@@ -397990,7 +398612,7 @@ async function withFixture(input, fixtureName, f) {
|
|
|
397990
398612
|
throw new Error(`Fixture missing: ${filename}. Re-run tests with VCR_RECORD=1, then commit the result.`);
|
|
397991
398613
|
}
|
|
397992
398614
|
const result = await f();
|
|
397993
|
-
await mkdir24(
|
|
398615
|
+
await mkdir24(dirname48(filename), { recursive: true });
|
|
397994
398616
|
await writeFile24(filename, jsonStringify(result, null, 2), {
|
|
397995
398617
|
encoding: "utf8"
|
|
397996
398618
|
});
|
|
@@ -398029,7 +398651,7 @@ ${jsonStringify(dehydratedInput, null, 2)}`);
|
|
|
398029
398651
|
if (env2.isCI && !isEnvTruthy(process.env.VCR_RECORD)) {
|
|
398030
398652
|
return results;
|
|
398031
398653
|
}
|
|
398032
|
-
await mkdir24(
|
|
398654
|
+
await mkdir24(dirname48(filename), { recursive: true });
|
|
398033
398655
|
await writeFile24(filename, jsonStringify({
|
|
398034
398656
|
input: dehydratedInput,
|
|
398035
398657
|
output: results.map((message, index2) => mapMessage(message, dehydrateValue, index2))
|
|
@@ -399261,7 +399883,7 @@ var init_FileReadTool = __esm(() => {
|
|
|
399261
399883
|
init_semanticNumber();
|
|
399262
399884
|
init_slowOperations();
|
|
399263
399885
|
init_limits();
|
|
399264
|
-
|
|
399886
|
+
init_prompt3();
|
|
399265
399887
|
init_UI26();
|
|
399266
399888
|
BLOCKED_DEVICE_PATHS = new Set([
|
|
399267
399889
|
"/dev/zero",
|
|
@@ -399366,7 +399988,7 @@ var init_FileReadTool = __esm(() => {
|
|
|
399366
399988
|
maxResultSizeChars: Infinity,
|
|
399367
399989
|
strict: true,
|
|
399368
399990
|
async description() {
|
|
399369
|
-
return
|
|
399991
|
+
return DESCRIPTION3;
|
|
399370
399992
|
},
|
|
399371
399993
|
async prompt() {
|
|
399372
399994
|
const limits = getDefaultFileReadingLimits();
|
|
@@ -400174,7 +400796,7 @@ var init_findRelevantMemories = __esm(() => {
|
|
|
400174
400796
|
|
|
400175
400797
|
// src/utils/attachments.ts
|
|
400176
400798
|
import { readdir as readdir18, stat as stat32 } from "fs/promises";
|
|
400177
|
-
import { dirname as
|
|
400799
|
+
import { dirname as dirname49, parse as parse13, relative as relative30, resolve as resolve40 } from "path";
|
|
400178
400800
|
import { randomUUID as randomUUID41 } from "crypto";
|
|
400179
400801
|
function isAttachment(value) {
|
|
400180
400802
|
return typeof value === "object" && value !== null && "type" in value;
|
|
@@ -400567,21 +401189,21 @@ async function getSelectedLinesFromIDE(ideSelection, toolUseContext) {
|
|
|
400567
401189
|
];
|
|
400568
401190
|
}
|
|
400569
401191
|
function getDirectoriesToProcess(targetPath, originalCwd) {
|
|
400570
|
-
const targetDir =
|
|
401192
|
+
const targetDir = dirname49(resolve40(targetPath));
|
|
400571
401193
|
const nestedDirs = [];
|
|
400572
401194
|
let currentDir = targetDir;
|
|
400573
401195
|
while (currentDir !== originalCwd && currentDir !== parse13(currentDir).root) {
|
|
400574
401196
|
if (currentDir.startsWith(originalCwd)) {
|
|
400575
401197
|
nestedDirs.push(currentDir);
|
|
400576
401198
|
}
|
|
400577
|
-
currentDir =
|
|
401199
|
+
currentDir = dirname49(currentDir);
|
|
400578
401200
|
}
|
|
400579
401201
|
nestedDirs.reverse();
|
|
400580
401202
|
const cwdLevelDirs = [];
|
|
400581
401203
|
currentDir = originalCwd;
|
|
400582
401204
|
while (currentDir !== parse13(currentDir).root) {
|
|
400583
401205
|
cwdLevelDirs.push(currentDir);
|
|
400584
|
-
currentDir =
|
|
401206
|
+
currentDir = dirname49(currentDir);
|
|
400585
401207
|
}
|
|
400586
401208
|
cwdLevelDirs.reverse();
|
|
400587
401209
|
return { nestedDirs, cwdLevelDirs };
|
|
@@ -401761,9 +402383,9 @@ var init_attachments2 = __esm(() => {
|
|
|
401761
402383
|
init_commands3();
|
|
401762
402384
|
init_uniqBy();
|
|
401763
402385
|
init_state();
|
|
401764
|
-
|
|
402386
|
+
init_prompt7();
|
|
401765
402387
|
init_context();
|
|
401766
|
-
|
|
402388
|
+
init_prompt3();
|
|
401767
402389
|
init_limits();
|
|
401768
402390
|
init_fileStateCache();
|
|
401769
402391
|
init_abortController();
|
|
@@ -401807,7 +402429,7 @@ var init_attachments2 = __esm(() => {
|
|
|
401807
402429
|
init_teammateContext();
|
|
401808
402430
|
init_teamHelpers();
|
|
401809
402431
|
init_tasks();
|
|
401810
|
-
|
|
402432
|
+
init_prompt5();
|
|
401811
402433
|
TODO_REMINDER_CONFIG = {
|
|
401812
402434
|
TURNS_SINCE_WRITE: 10,
|
|
401813
402435
|
TURNS_BETWEEN_REMINDERS: 10
|
|
@@ -401827,21 +402449,21 @@ var init_attachments2 = __esm(() => {
|
|
|
401827
402449
|
});
|
|
401828
402450
|
|
|
401829
402451
|
// src/utils/plugins/loadPluginCommands.ts
|
|
401830
|
-
import { basename as basename32, dirname as
|
|
402452
|
+
import { basename as basename32, dirname as dirname50, join as join117 } from "path";
|
|
401831
402453
|
function isSkillFile2(filePath) {
|
|
401832
402454
|
return /^skill\.md$/i.test(basename32(filePath));
|
|
401833
402455
|
}
|
|
401834
402456
|
function getCommandNameFromFile(filePath, baseDir, pluginName) {
|
|
401835
402457
|
const isSkill = isSkillFile2(filePath);
|
|
401836
402458
|
if (isSkill) {
|
|
401837
|
-
const skillDirectory =
|
|
401838
|
-
const parentOfSkillDir =
|
|
402459
|
+
const skillDirectory = dirname50(filePath);
|
|
402460
|
+
const parentOfSkillDir = dirname50(skillDirectory);
|
|
401839
402461
|
const commandBaseName = basename32(skillDirectory);
|
|
401840
402462
|
const relativePath = parentOfSkillDir.startsWith(baseDir) ? parentOfSkillDir.slice(baseDir.length).replace(/^\//, "") : "";
|
|
401841
402463
|
const namespace = relativePath ? relativePath.split("/").join(":") : "";
|
|
401842
402464
|
return namespace ? `${pluginName}:${namespace}:${commandBaseName}` : `${pluginName}:${commandBaseName}`;
|
|
401843
402465
|
} else {
|
|
401844
|
-
const fileDirectory =
|
|
402466
|
+
const fileDirectory = dirname50(filePath);
|
|
401845
402467
|
const commandBaseName = basename32(filePath).replace(/\.md$/, "");
|
|
401846
402468
|
const relativePath = fileDirectory.startsWith(baseDir) ? fileDirectory.slice(baseDir.length).replace(/^\//, "") : "";
|
|
401847
402469
|
const namespace = relativePath ? relativePath.split("/").join(":") : "";
|
|
@@ -401868,7 +402490,7 @@ async function collectMarkdownFiles(dirPath, baseDir, loadedPaths) {
|
|
|
401868
402490
|
function transformPluginSkillFiles(files) {
|
|
401869
402491
|
const filesByDir = new Map;
|
|
401870
402492
|
for (const file2 of files) {
|
|
401871
|
-
const dir =
|
|
402493
|
+
const dir = dirname50(file2.filePath);
|
|
401872
402494
|
const dirFiles = filesByDir.get(dir) ?? [];
|
|
401873
402495
|
dirFiles.push(file2);
|
|
401874
402496
|
filesByDir.set(dir, dirFiles);
|
|
@@ -401957,7 +402579,7 @@ function createPluginCommand(commandName, file2, sourceName, pluginManifest, plu
|
|
|
401957
402579
|
return displayName || commandName;
|
|
401958
402580
|
},
|
|
401959
402581
|
async getPromptForCommand(args, context5) {
|
|
401960
|
-
let finalContent = config2.isSkillMode ? `Base directory for this skill: ${
|
|
402582
|
+
let finalContent = config2.isSkillMode ? `Base directory for this skill: ${dirname50(file2.filePath)}
|
|
401961
402583
|
|
|
401962
402584
|
${content}` : content;
|
|
401963
402585
|
finalContent = substituteArguments(finalContent, args, true, argumentNames);
|
|
@@ -401969,7 +402591,7 @@ ${content}` : content;
|
|
|
401969
402591
|
finalContent = substituteUserConfigInContent(finalContent, loadPluginOptions(sourceName), pluginManifest.userConfig);
|
|
401970
402592
|
}
|
|
401971
402593
|
if (config2.isSkillMode) {
|
|
401972
|
-
const rawSkillDir =
|
|
402594
|
+
const rawSkillDir = dirname50(file2.filePath);
|
|
401973
402595
|
const skillDir = process.platform === "win32" ? rawSkillDir.replace(/\\/g, "/") : rawSkillDir;
|
|
401974
402596
|
finalContent = finalContent.replace(/\$\{UR_SKILL_DIR\}/g, skillDir);
|
|
401975
402597
|
}
|
|
@@ -402029,7 +402651,7 @@ async function loadSkillsFromDirectory(skillsPath, pluginName, sourceName, plugi
|
|
|
402029
402651
|
const skillName = `${pluginName}:${basename32(skillsPath)}`;
|
|
402030
402652
|
const file2 = {
|
|
402031
402653
|
filePath: directSkillPath,
|
|
402032
|
-
baseDir:
|
|
402654
|
+
baseDir: dirname50(directSkillPath),
|
|
402033
402655
|
frontmatter,
|
|
402034
402656
|
content: markdownContent
|
|
402035
402657
|
};
|
|
@@ -402078,7 +402700,7 @@ async function loadSkillsFromDirectory(skillsPath, pluginName, sourceName, plugi
|
|
|
402078
402700
|
const skillName = `${pluginName}:${entry.name}`;
|
|
402079
402701
|
const file2 = {
|
|
402080
402702
|
filePath: skillFilePath,
|
|
402081
|
-
baseDir:
|
|
402703
|
+
baseDir: dirname50(skillFilePath),
|
|
402082
402704
|
frontmatter,
|
|
402083
402705
|
content: markdownContent
|
|
402084
402706
|
};
|
|
@@ -402191,7 +402813,7 @@ var init_loadPluginCommands = __esm(() => {
|
|
|
402191
402813
|
} : frontmatter;
|
|
402192
402814
|
const file2 = {
|
|
402193
402815
|
filePath: commandPath,
|
|
402194
|
-
baseDir:
|
|
402816
|
+
baseDir: dirname50(commandPath),
|
|
402195
402817
|
frontmatter: finalFrontmatter,
|
|
402196
402818
|
content: markdownContent
|
|
402197
402819
|
};
|
|
@@ -402454,7 +403076,7 @@ import {
|
|
|
402454
403076
|
writeFile as writeFile25
|
|
402455
403077
|
} from "fs/promises";
|
|
402456
403078
|
import { tmpdir as tmpdir9 } from "os";
|
|
402457
|
-
import { basename as basename34, dirname as
|
|
403079
|
+
import { basename as basename34, dirname as dirname52, join as join119 } from "path";
|
|
402458
403080
|
function isPluginZipCacheEnabled() {
|
|
402459
403081
|
return isEnvTruthy(process.env.UR_CODE_PLUGIN_USE_ZIP_CACHE);
|
|
402460
403082
|
}
|
|
@@ -402517,7 +403139,7 @@ async function cleanupSessionPluginCache() {
|
|
|
402517
403139
|
}
|
|
402518
403140
|
}
|
|
402519
403141
|
async function atomicWriteToZipCache(targetPath, data) {
|
|
402520
|
-
const dir =
|
|
403142
|
+
const dir = dirname52(targetPath);
|
|
402521
403143
|
await getFsImplementation().mkdir(dir);
|
|
402522
403144
|
const tmpName = `.${basename34(targetPath)}.tmp.${randomBytes13(4).toString("hex")}`;
|
|
402523
403145
|
const tmpPath = join119(dir, tmpName);
|
|
@@ -402614,7 +403236,7 @@ async function extractZipToDirectory(zipPath, targetDir) {
|
|
|
402614
403236
|
continue;
|
|
402615
403237
|
}
|
|
402616
403238
|
const fullPath = join119(targetDir, relPath);
|
|
402617
|
-
await getFsImplementation().mkdir(
|
|
403239
|
+
await getFsImplementation().mkdir(dirname52(fullPath));
|
|
402618
403240
|
await writeFile25(fullPath, data);
|
|
402619
403241
|
const mode = modes[relPath];
|
|
402620
403242
|
if (mode && mode & 73) {
|
|
@@ -402776,7 +403398,7 @@ var init_cacheUtils = __esm(() => {
|
|
|
402776
403398
|
init_commands3();
|
|
402777
403399
|
init_outputStyles();
|
|
402778
403400
|
init_loadAgentsDir();
|
|
402779
|
-
|
|
403401
|
+
init_prompt7();
|
|
402780
403402
|
init_attachments2();
|
|
402781
403403
|
init_debug();
|
|
402782
403404
|
init_errors();
|
|
@@ -403110,7 +403732,7 @@ var init_marketplaceHelpers = __esm(() => {
|
|
|
403110
403732
|
|
|
403111
403733
|
// src/utils/plugins/officialMarketplaceGcs.ts
|
|
403112
403734
|
import { chmod as chmod9, mkdir as mkdir26, readFile as readFile36, rename as rename5, rm as rm7, writeFile as writeFile27 } from "fs/promises";
|
|
403113
|
-
import { dirname as
|
|
403735
|
+
import { dirname as dirname53, join as join121, resolve as resolve41, sep as sep26 } from "path";
|
|
403114
403736
|
async function fetchOfficialMarketplaceFromGcs(installLocation, marketplacesCacheDir) {
|
|
403115
403737
|
if (!GCS_BASE) {
|
|
403116
403738
|
return null;
|
|
@@ -403160,7 +403782,7 @@ async function fetchOfficialMarketplaceFromGcs(installLocation, marketplacesCach
|
|
|
403160
403782
|
if (!rel || rel.endsWith("/"))
|
|
403161
403783
|
continue;
|
|
403162
403784
|
const dest = join121(staging, rel);
|
|
403163
|
-
await mkdir26(
|
|
403785
|
+
await mkdir26(dirname53(dest), { recursive: true });
|
|
403164
403786
|
await writeFile27(dest, data);
|
|
403165
403787
|
const mode = modes[arcPath];
|
|
403166
403788
|
if (mode && mode & 73) {
|
|
@@ -403239,7 +403861,7 @@ var init_officialMarketplaceGcs = __esm(() => {
|
|
|
403239
403861
|
|
|
403240
403862
|
// src/utils/plugins/marketplaceManager.ts
|
|
403241
403863
|
import { writeFile as writeFile28 } from "fs/promises";
|
|
403242
|
-
import { basename as basename35, dirname as
|
|
403864
|
+
import { basename as basename35, dirname as dirname54, isAbsolute as isAbsolute31, join as join122, resolve as resolve42, sep as sep27 } from "path";
|
|
403243
403865
|
function getKnownMarketplacesFile() {
|
|
403244
403866
|
return join122(getPluginsDirectory(), "known_marketplaces.json");
|
|
403245
403867
|
}
|
|
@@ -403919,7 +404541,7 @@ async function loadAndCacheMarketplace(source, onProgress) {
|
|
|
403919
404541
|
case "file": {
|
|
403920
404542
|
const absPath = resolve42(source.path);
|
|
403921
404543
|
marketplacePath = absPath;
|
|
403922
|
-
temporaryCachePath =
|
|
404544
|
+
temporaryCachePath = dirname54(dirname54(absPath));
|
|
403923
404545
|
cleanupNeeded = false;
|
|
403924
404546
|
break;
|
|
403925
404547
|
}
|
|
@@ -403934,7 +404556,7 @@ async function loadAndCacheMarketplace(source, onProgress) {
|
|
|
403934
404556
|
temporaryCachePath = join122(cacheDir, source.name);
|
|
403935
404557
|
marketplacePath = join122(temporaryCachePath, ".ur-plugin", "marketplace.json");
|
|
403936
404558
|
cleanupNeeded = false;
|
|
403937
|
-
await fs4.mkdir(
|
|
404559
|
+
await fs4.mkdir(dirname54(marketplacePath));
|
|
403938
404560
|
await writeFile28(marketplacePath, jsonStringify({
|
|
403939
404561
|
name: source.name,
|
|
403940
404562
|
owner: source.owner ?? { name: "settings" },
|
|
@@ -404429,7 +405051,7 @@ var init_marketplaceManager = __esm(() => {
|
|
|
404429
405051
|
});
|
|
404430
405052
|
|
|
404431
405053
|
// src/utils/plugins/installedPluginsManager.ts
|
|
404432
|
-
import { dirname as
|
|
405054
|
+
import { dirname as dirname55, join as join123 } from "path";
|
|
404433
405055
|
function getInstalledPluginsFilePath() {
|
|
404434
405056
|
return join123(getPluginsDirectory(), "installed_plugins.json");
|
|
404435
405057
|
}
|
|
@@ -404995,7 +405617,7 @@ var init_pluginVersioning = __esm(() => {
|
|
|
404995
405617
|
// src/utils/plugins/pluginInstallationHelpers.ts
|
|
404996
405618
|
import { randomBytes as randomBytes14 } from "crypto";
|
|
404997
405619
|
import { rename as rename6, rm as rm8 } from "fs/promises";
|
|
404998
|
-
import { dirname as
|
|
405620
|
+
import { dirname as dirname56, join as join124, resolve as resolve43, sep as sep28 } from "path";
|
|
404999
405621
|
function getCurrentTimestamp() {
|
|
405000
405622
|
return new Date().toISOString();
|
|
405001
405623
|
}
|
|
@@ -405019,14 +405641,14 @@ async function cacheAndRegisterPlugin(pluginId, entry, scope = "user", projectPa
|
|
|
405019
405641
|
const versionedPath = getVersionedCachePath(pluginId, version2);
|
|
405020
405642
|
let finalPath = cacheResult.path;
|
|
405021
405643
|
if (cacheResult.path !== versionedPath) {
|
|
405022
|
-
await getFsImplementation().mkdir(
|
|
405644
|
+
await getFsImplementation().mkdir(dirname56(versionedPath));
|
|
405023
405645
|
await rm8(versionedPath, { recursive: true, force: true });
|
|
405024
405646
|
const normalizedCachePath = cacheResult.path.endsWith(sep28) ? cacheResult.path : cacheResult.path + sep28;
|
|
405025
405647
|
const isSubdirectory = versionedPath.startsWith(normalizedCachePath);
|
|
405026
405648
|
if (isSubdirectory) {
|
|
405027
|
-
const tempPath = join124(
|
|
405649
|
+
const tempPath = join124(dirname56(cacheResult.path), `.ur-plugin-temp-${Date.now()}-${randomBytes14(4).toString("hex")}`);
|
|
405028
405650
|
await rename6(cacheResult.path, tempPath);
|
|
405029
|
-
await getFsImplementation().mkdir(
|
|
405651
|
+
await getFsImplementation().mkdir(dirname56(versionedPath));
|
|
405030
405652
|
await rename6(tempPath, versionedPath);
|
|
405031
405653
|
} else {
|
|
405032
405654
|
await rename6(cacheResult.path, versionedPath);
|
|
@@ -405255,7 +405877,7 @@ import {
|
|
|
405255
405877
|
stat as stat35,
|
|
405256
405878
|
symlink as symlink3
|
|
405257
405879
|
} from "fs/promises";
|
|
405258
|
-
import { basename as basename36, dirname as
|
|
405880
|
+
import { basename as basename36, dirname as dirname57, join as join125, relative as relative31, resolve as resolve44, sep as sep29 } from "path";
|
|
405259
405881
|
function getPluginCachePath() {
|
|
405260
405882
|
return join125(getPluginsDirectory(), "cache");
|
|
405261
405883
|
}
|
|
@@ -405285,7 +405907,7 @@ async function probeSeedCache(pluginId, version2) {
|
|
|
405285
405907
|
}
|
|
405286
405908
|
async function probeSeedCacheAnyVersion(pluginId) {
|
|
405287
405909
|
for (const seedDir of getPluginSeedDirs()) {
|
|
405288
|
-
const pluginDir =
|
|
405910
|
+
const pluginDir = dirname57(getVersionedCachePathIn(seedDir, pluginId, "_"));
|
|
405289
405911
|
try {
|
|
405290
405912
|
const versions2 = await readdir21(pluginDir);
|
|
405291
405913
|
if (versions2.length !== 1)
|
|
@@ -405327,7 +405949,7 @@ async function copyDir(src, dest) {
|
|
|
405327
405949
|
if (resolvedTarget.startsWith(srcPrefix) || resolvedTarget === resolvedSrc) {
|
|
405328
405950
|
const targetRelativeToSrc = relative31(resolvedSrc, resolvedTarget);
|
|
405329
405951
|
const destTargetPath = join125(dest, targetRelativeToSrc);
|
|
405330
|
-
const relativeLinkPath = relative31(
|
|
405952
|
+
const relativeLinkPath = relative31(dirname57(destPath), destTargetPath);
|
|
405331
405953
|
await symlink3(relativeLinkPath, destPath);
|
|
405332
405954
|
} else {
|
|
405333
405955
|
await symlink3(resolvedTarget, destPath);
|
|
@@ -405358,7 +405980,7 @@ async function copyPluginToVersionedCache(sourcePath, pluginId, version2, entry,
|
|
|
405358
405980
|
logForDebugging(`Using seed cache for ${pluginId}@${version2} at ${seedPath}`);
|
|
405359
405981
|
return seedPath;
|
|
405360
405982
|
}
|
|
405361
|
-
await getFsImplementation().mkdir(
|
|
405983
|
+
await getFsImplementation().mkdir(dirname57(cachePath));
|
|
405362
405984
|
if (entry && typeof entry.source === "string" && marketplaceDir) {
|
|
405363
405985
|
const sourceDir = validatePathWithinBase(marketplaceDir, entry.source);
|
|
405364
405986
|
logForDebugging(`Copying source directory ${entry.source} for plugin ${pluginId}`);
|
|
@@ -410387,7 +411009,7 @@ var init_messages = __esm(() => {
|
|
|
410387
411009
|
init_last();
|
|
410388
411010
|
init_analytics();
|
|
410389
411011
|
init_metadata();
|
|
410390
|
-
|
|
411012
|
+
init_prompt5();
|
|
410391
411013
|
init_outputStyles();
|
|
410392
411014
|
init_paths();
|
|
410393
411015
|
init_growthbook();
|
|
@@ -410403,13 +411025,13 @@ var init_messages = __esm(() => {
|
|
|
410403
411025
|
init_planAgent();
|
|
410404
411026
|
init_builtInAgents();
|
|
410405
411027
|
init_constants2();
|
|
410406
|
-
|
|
411028
|
+
init_prompt();
|
|
410407
411029
|
init_BashTool();
|
|
410408
411030
|
init_ExitPlanModeV2Tool();
|
|
410409
411031
|
init_FileEditTool();
|
|
410410
|
-
|
|
411032
|
+
init_prompt3();
|
|
410411
411033
|
init_FileWriteTool();
|
|
410412
|
-
|
|
411034
|
+
init_prompt2();
|
|
410413
411035
|
init_state();
|
|
410414
411036
|
init_xml();
|
|
410415
411037
|
init_planImplementationContract();
|
|
@@ -413794,7 +414416,7 @@ __export(exports_terminalSetup, {
|
|
|
413794
414416
|
import { randomBytes as randomBytes16 } from "crypto";
|
|
413795
414417
|
import { copyFile as copyFile8, mkdir as mkdir27, readFile as readFile38, writeFile as writeFile29 } from "fs/promises";
|
|
413796
414418
|
import { homedir as homedir28, platform as platform4 } from "os";
|
|
413797
|
-
import { dirname as
|
|
414419
|
+
import { dirname as dirname58, join as join128 } from "path";
|
|
413798
414420
|
import { pathToFileURL as pathToFileURL7 } from "url";
|
|
413799
414421
|
function isVSCodeRemoteSSH() {
|
|
413800
414422
|
const askpassMain = process.env.VSCODE_GIT_ASKPASS_MAIN ?? "";
|
|
@@ -414116,7 +414738,7 @@ chars = "\\u001B\\r"`;
|
|
|
414116
414738
|
return `${color("warning", theme)("Error backing up existing Alacritty config. Bailing out.")}${EOL5}${source_default.dim(`See ${formatPathLink(configPath)}`)}${EOL5}${source_default.dim(`Backup path: ${formatPathLink(backupPath)}`)}${EOL5}`;
|
|
414117
414739
|
}
|
|
414118
414740
|
} else {
|
|
414119
|
-
await mkdir27(
|
|
414741
|
+
await mkdir27(dirname58(configPath), {
|
|
414120
414742
|
recursive: true
|
|
414121
414743
|
});
|
|
414122
414744
|
}
|
|
@@ -416563,7 +417185,7 @@ var init_TextInput = __esm(() => {
|
|
|
416563
417185
|
});
|
|
416564
417186
|
|
|
416565
417187
|
// src/utils/suggestions/directoryCompletion.ts
|
|
416566
|
-
import { basename as basename40, dirname as
|
|
417188
|
+
import { basename as basename40, dirname as dirname59, join as join131, sep as sep30 } from "path";
|
|
416567
417189
|
function parsePartialPath(partialPath, basePath) {
|
|
416568
417190
|
if (!partialPath) {
|
|
416569
417191
|
const directory2 = basePath || getCwd();
|
|
@@ -416573,7 +417195,7 @@ function parsePartialPath(partialPath, basePath) {
|
|
|
416573
417195
|
if (partialPath.endsWith("/") || partialPath.endsWith(sep30)) {
|
|
416574
417196
|
return { directory: resolved, prefix: "" };
|
|
416575
417197
|
}
|
|
416576
|
-
const directory =
|
|
417198
|
+
const directory = dirname59(resolved);
|
|
416577
417199
|
const prefix = basename40(partialPath);
|
|
416578
417200
|
return { directory, prefix };
|
|
416579
417201
|
}
|
|
@@ -418502,7 +419124,7 @@ function Feedback({
|
|
|
418502
419124
|
platform: env2.platform,
|
|
418503
419125
|
gitRepo: envInfo.isGit,
|
|
418504
419126
|
terminal: env2.terminal,
|
|
418505
|
-
version: "1.65.
|
|
419127
|
+
version: "1.65.13",
|
|
418506
419128
|
transcript: normalizeMessagesForAPI(messages),
|
|
418507
419129
|
errors: sanitizedErrors,
|
|
418508
419130
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -418694,7 +419316,7 @@ function Feedback({
|
|
|
418694
419316
|
", ",
|
|
418695
419317
|
env2.terminal,
|
|
418696
419318
|
", v",
|
|
418697
|
-
"1.65.
|
|
419319
|
+
"1.65.13"
|
|
418698
419320
|
]
|
|
418699
419321
|
}, undefined, true, undefined, this)
|
|
418700
419322
|
]
|
|
@@ -418800,7 +419422,7 @@ ${sanitizedDescription}
|
|
|
418800
419422
|
` + `**Environment Info**
|
|
418801
419423
|
` + `- Platform: ${env2.platform}
|
|
418802
419424
|
` + `- Terminal: ${env2.terminal}
|
|
418803
|
-
` + `- Version: ${"1.65.
|
|
419425
|
+
` + `- Version: ${"1.65.13"}
|
|
418804
419426
|
` + `- Feedback ID: ${feedbackId}
|
|
418805
419427
|
` + `
|
|
418806
419428
|
**Errors**
|
|
@@ -419969,7 +420591,7 @@ function clearSessionCaches(preservedAgentIds = new Set) {
|
|
|
419969
420591
|
Promise.resolve().then(() => (init_utils11(), exports_utils2)).then(({ clearWebFetchCache: clearWebFetchCache2 }) => clearWebFetchCache2());
|
|
419970
420592
|
Promise.resolve().then(() => (init_ToolSearchTool(), exports_ToolSearchTool)).then(({ clearToolSearchDescriptionCache: clearToolSearchDescriptionCache2 }) => clearToolSearchDescriptionCache2());
|
|
419971
420593
|
Promise.resolve().then(() => (init_loadAgentsDir(), exports_loadAgentsDir)).then(({ clearAgentDefinitionsCache: clearAgentDefinitionsCache2 }) => clearAgentDefinitionsCache2());
|
|
419972
|
-
Promise.resolve().then(() => (
|
|
420594
|
+
Promise.resolve().then(() => (init_prompt7(), exports_prompt)).then(({ clearPromptCache: clearPromptCache2 }) => clearPromptCache2());
|
|
419973
420595
|
}
|
|
419974
420596
|
var init_caches = __esm(() => {
|
|
419975
420597
|
init_state();
|
|
@@ -421910,7 +422532,7 @@ function buildPrimarySection() {
|
|
|
421910
422532
|
}, undefined, false, undefined, this);
|
|
421911
422533
|
return [{
|
|
421912
422534
|
label: "Version",
|
|
421913
|
-
value: "1.65.
|
|
422535
|
+
value: "1.65.13"
|
|
421914
422536
|
}, {
|
|
421915
422537
|
label: "Session name",
|
|
421916
422538
|
value: nameValue
|
|
@@ -425240,7 +425862,7 @@ function Config({
|
|
|
425240
425862
|
}
|
|
425241
425863
|
}, undefined, false, undefined, this)
|
|
425242
425864
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime179.jsxDEV(ChannelDowngradeDialog, {
|
|
425243
|
-
currentVersion: "1.65.
|
|
425865
|
+
currentVersion: "1.65.13",
|
|
425244
425866
|
onChoice: (choice) => {
|
|
425245
425867
|
setShowSubmenu(null);
|
|
425246
425868
|
setTabsHidden(false);
|
|
@@ -425252,7 +425874,7 @@ function Config({
|
|
|
425252
425874
|
autoUpdatesChannel: "stable"
|
|
425253
425875
|
};
|
|
425254
425876
|
if (choice === "stay") {
|
|
425255
|
-
newSettings.minimumVersion = "1.65.
|
|
425877
|
+
newSettings.minimumVersion = "1.65.13";
|
|
425256
425878
|
}
|
|
425257
425879
|
updateSettingsForSource("userSettings", newSettings);
|
|
425258
425880
|
setSettingsData((prev_27) => ({
|
|
@@ -426590,8 +427212,8 @@ function checkAutoCompactDisabled(data, suggestions) {
|
|
|
426590
427212
|
}
|
|
426591
427213
|
var LARGE_TOOL_RESULT_PERCENT = 15, LARGE_TOOL_RESULT_TOKENS = 1e4, READ_BLOAT_PERCENT = 5, NEAR_CAPACITY_PERCENT = 80, MEMORY_HIGH_PERCENT = 5, MEMORY_HIGH_TOKENS = 5000;
|
|
426592
427214
|
var init_contextSuggestions = __esm(() => {
|
|
427215
|
+
init_prompt3();
|
|
426593
427216
|
init_prompt2();
|
|
426594
|
-
init_prompt();
|
|
426595
427217
|
init_file();
|
|
426596
427218
|
init_format2();
|
|
426597
427219
|
});
|
|
@@ -433316,7 +433938,7 @@ function HelpV2(t0) {
|
|
|
433316
433938
|
let t6;
|
|
433317
433939
|
if ($2[31] !== tabs) {
|
|
433318
433940
|
t6 = /* @__PURE__ */ jsx_dev_runtime206.jsxDEV(Tabs, {
|
|
433319
|
-
title: `UR v${"1.65.
|
|
433941
|
+
title: `UR v${"1.65.13"}`,
|
|
433320
433942
|
color: "professionalBlue",
|
|
433321
433943
|
defaultTab: "general",
|
|
433322
433944
|
children: tabs
|
|
@@ -434249,7 +434871,7 @@ function buildToolUseContext(tools, readFileStateCache, toolPermissionContext, a
|
|
|
434249
434871
|
async function handleInitialize(options2) {
|
|
434250
434872
|
return {
|
|
434251
434873
|
name: "UR",
|
|
434252
|
-
version: "1.65.
|
|
434874
|
+
version: "1.65.13",
|
|
434253
434875
|
protocolVersion: "0.1.0",
|
|
434254
434876
|
workspaceRoot: options2.cwd,
|
|
434255
434877
|
capabilities: {
|
|
@@ -436291,7 +436913,7 @@ __export(exports_keybindings, {
|
|
|
436291
436913
|
call: () => call24
|
|
436292
436914
|
});
|
|
436293
436915
|
import { mkdir as mkdir32, writeFile as writeFile34 } from "fs/promises";
|
|
436294
|
-
import { dirname as
|
|
436916
|
+
import { dirname as dirname61 } from "path";
|
|
436295
436917
|
async function call24() {
|
|
436296
436918
|
if (!isKeybindingCustomizationEnabled()) {
|
|
436297
436919
|
return {
|
|
@@ -436301,7 +436923,7 @@ async function call24() {
|
|
|
436301
436923
|
}
|
|
436302
436924
|
const keybindingsPath = getKeybindingsPath();
|
|
436303
436925
|
let fileExists = false;
|
|
436304
|
-
await mkdir32(
|
|
436926
|
+
await mkdir32(dirname61(keybindingsPath), { recursive: true });
|
|
436305
436927
|
try {
|
|
436306
436928
|
await writeFile34(keybindingsPath, generateKeybindingsTemplate(), {
|
|
436307
436929
|
encoding: "utf-8",
|
|
@@ -443928,7 +444550,7 @@ var init_DiscoverPlugins = __esm(() => {
|
|
|
443928
444550
|
});
|
|
443929
444551
|
|
|
443930
444552
|
// src/services/plugins/pluginOperations.ts
|
|
443931
|
-
import { dirname as
|
|
444553
|
+
import { dirname as dirname62, join as join142 } from "path";
|
|
443932
444554
|
function assertInstallableScope(scope) {
|
|
443933
444555
|
if (!VALID_INSTALLABLE_SCOPES.includes(scope)) {
|
|
443934
444556
|
throw new Error(`Invalid scope "${scope}". Must be one of: ${VALID_INSTALLABLE_SCOPES.join(", ")}`);
|
|
@@ -444405,7 +445027,7 @@ async function performPluginUpdate({
|
|
|
444405
445027
|
}
|
|
444406
445028
|
throw e;
|
|
444407
445029
|
}
|
|
444408
|
-
const marketplaceDir = marketplaceStats.isDirectory() ? marketplaceInstallLocation :
|
|
445030
|
+
const marketplaceDir = marketplaceStats.isDirectory() ? marketplaceInstallLocation : dirname62(marketplaceInstallLocation);
|
|
444409
445031
|
sourcePath = join142(marketplaceDir, entry.source);
|
|
444410
445032
|
try {
|
|
444411
445033
|
await fs4.stat(sourcePath);
|
|
@@ -451237,7 +451859,7 @@ ${args ? "Additional user input: " + args : ""}
|
|
|
451237
451859
|
|
|
451238
451860
|
// src/utils/releaseNotes.ts
|
|
451239
451861
|
import { mkdir as mkdir33, readFile as readFile45, writeFile as writeFile37 } from "fs/promises";
|
|
451240
|
-
import { dirname as
|
|
451862
|
+
import { dirname as dirname64, join as join146 } from "path";
|
|
451241
451863
|
function getChangelogCachePath() {
|
|
451242
451864
|
return join146(getURConfigHomeDir(), "cache", "changelog.md");
|
|
451243
451865
|
}
|
|
@@ -451248,7 +451870,7 @@ async function migrateChangelogFromConfig() {
|
|
|
451248
451870
|
}
|
|
451249
451871
|
const cachePath = getChangelogCachePath();
|
|
451250
451872
|
try {
|
|
451251
|
-
await mkdir33(
|
|
451873
|
+
await mkdir33(dirname64(cachePath), { recursive: true });
|
|
451252
451874
|
await writeFile37(cachePath, config3.cachedChangelog, {
|
|
451253
451875
|
encoding: "utf-8",
|
|
451254
451876
|
flag: "wx"
|
|
@@ -451270,7 +451892,7 @@ async function fetchAndStoreChangelog() {
|
|
|
451270
451892
|
return;
|
|
451271
451893
|
}
|
|
451272
451894
|
const cachePath = getChangelogCachePath();
|
|
451273
|
-
await mkdir33(
|
|
451895
|
+
await mkdir33(dirname64(cachePath), { recursive: true });
|
|
451274
451896
|
await writeFile37(cachePath, changelogContent, { encoding: "utf-8" });
|
|
451275
451897
|
changelogMemoryCache = changelogContent;
|
|
451276
451898
|
const changelogLastFetched = Date.now();
|
|
@@ -451357,7 +451979,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
451357
451979
|
return [];
|
|
451358
451980
|
}
|
|
451359
451981
|
}
|
|
451360
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.65.
|
|
451982
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.65.13") {
|
|
451361
451983
|
if (process.env.USER_TYPE === "ant") {
|
|
451362
451984
|
const changelog = "";
|
|
451363
451985
|
if (changelog) {
|
|
@@ -451384,7 +452006,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.65.11")
|
|
|
451384
452006
|
releaseNotes
|
|
451385
452007
|
};
|
|
451386
452008
|
}
|
|
451387
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.65.
|
|
452009
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.65.13") {
|
|
451388
452010
|
if (process.env.USER_TYPE === "ant") {
|
|
451389
452011
|
const changelog = "";
|
|
451390
452012
|
if (changelog) {
|
|
@@ -454250,7 +454872,7 @@ function getRecentActivitySync() {
|
|
|
454250
454872
|
return cachedActivity;
|
|
454251
454873
|
}
|
|
454252
454874
|
function getLogoDisplayData() {
|
|
454253
|
-
const version2 = process.env.DEMO_VERSION ?? "1.65.
|
|
454875
|
+
const version2 = process.env.DEMO_VERSION ?? "1.65.13";
|
|
454254
454876
|
const serverUrl = getDirectConnectServerUrl();
|
|
454255
454877
|
const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
|
|
454256
454878
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -455117,7 +455739,7 @@ function LogoV2() {
|
|
|
455117
455739
|
if ($2[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
455118
455740
|
t2 = () => {
|
|
455119
455741
|
const currentConfig2 = getGlobalConfig();
|
|
455120
|
-
if (currentConfig2.lastReleaseNotesSeen === "1.65.
|
|
455742
|
+
if (currentConfig2.lastReleaseNotesSeen === "1.65.13") {
|
|
455121
455743
|
return;
|
|
455122
455744
|
}
|
|
455123
455745
|
saveGlobalConfig(_temp325);
|
|
@@ -455802,12 +456424,12 @@ function LogoV2() {
|
|
|
455802
456424
|
return t41;
|
|
455803
456425
|
}
|
|
455804
456426
|
function _temp325(current) {
|
|
455805
|
-
if (current.lastReleaseNotesSeen === "1.65.
|
|
456427
|
+
if (current.lastReleaseNotesSeen === "1.65.13") {
|
|
455806
456428
|
return current;
|
|
455807
456429
|
}
|
|
455808
456430
|
return {
|
|
455809
456431
|
...current,
|
|
455810
|
-
lastReleaseNotesSeen: "1.65.
|
|
456432
|
+
lastReleaseNotesSeen: "1.65.13"
|
|
455811
456433
|
};
|
|
455812
456434
|
}
|
|
455813
456435
|
function _temp241(s_0) {
|
|
@@ -462079,7 +462701,7 @@ import {
|
|
|
462079
462701
|
readFileSync as readFileSync34,
|
|
462080
462702
|
statSync as statSync14
|
|
462081
462703
|
} from "fs";
|
|
462082
|
-
import { dirname as
|
|
462704
|
+
import { dirname as dirname65, isAbsolute as isAbsolute33, resolve as resolve51 } from "path";
|
|
462083
462705
|
function validateTranscriptContent(content) {
|
|
462084
462706
|
const errors4 = [];
|
|
462085
462707
|
let messageCount = 0;
|
|
@@ -462135,7 +462757,7 @@ function importSessionFile(sourcePath) {
|
|
|
462135
462757
|
while (sessionIdExists(sessionId))
|
|
462136
462758
|
sessionId = randomUUID46();
|
|
462137
462759
|
const target = getTranscriptPathForSession(sessionId);
|
|
462138
|
-
mkdirSync21(
|
|
462760
|
+
mkdirSync21(dirname65(target), { recursive: true });
|
|
462139
462761
|
copyFileSync2(source, target);
|
|
462140
462762
|
return { sessionId, path: target, messageCount: validation.messageCount };
|
|
462141
462763
|
}
|
|
@@ -467891,7 +468513,7 @@ var init_RemoteSessionDetailDialog = __esm(() => {
|
|
|
467891
468513
|
init_ink2();
|
|
467892
468514
|
init_RemoteAgentTask();
|
|
467893
468515
|
init_constants2();
|
|
467894
|
-
|
|
468516
|
+
init_prompt();
|
|
467895
468517
|
init_browser();
|
|
467896
468518
|
init_errors();
|
|
467897
468519
|
init_format2();
|
|
@@ -469770,7 +470392,7 @@ var init_attackSurface = __esm(() => {
|
|
|
469770
470392
|
|
|
469771
470393
|
// src/security/findings.ts
|
|
469772
470394
|
import * as fs7 from "fs";
|
|
469773
|
-
import { dirname as
|
|
470395
|
+
import { dirname as dirname66, join as join151 } from "path";
|
|
469774
470396
|
function severityRank(s) {
|
|
469775
470397
|
return ORDER.indexOf(s);
|
|
469776
470398
|
}
|
|
@@ -469788,7 +470410,7 @@ class FindingStore {
|
|
|
469788
470410
|
}
|
|
469789
470411
|
}
|
|
469790
470412
|
persist() {
|
|
469791
|
-
fs7.mkdirSync(
|
|
470413
|
+
fs7.mkdirSync(dirname66(this.file), { recursive: true });
|
|
469792
470414
|
fs7.writeFileSync(this.file, JSON.stringify(this.findings, null, 2));
|
|
469793
470415
|
}
|
|
469794
470416
|
add(items) {
|
|
@@ -471808,7 +472430,7 @@ import {
|
|
|
471808
472430
|
writeFileSync as writeFileSync26
|
|
471809
472431
|
} from "fs";
|
|
471810
472432
|
import { tmpdir as tmpdir12 } from "os";
|
|
471811
|
-
import { dirname as
|
|
472433
|
+
import { dirname as dirname67, isAbsolute as isAbsolute35, join as join157, relative as relative40, resolve as resolve55, sep as sep39 } from "path";
|
|
471812
472434
|
function positiveInteger(value, min, max2) {
|
|
471813
472435
|
return typeof value === "number" && Number.isInteger(value) && value >= min && value <= max2;
|
|
471814
472436
|
}
|
|
@@ -472339,7 +472961,7 @@ function manifestPathFor(dir, runId) {
|
|
|
472339
472961
|
return join157(dir, runId, "manifest.json");
|
|
472340
472962
|
}
|
|
472341
472963
|
function writeAgenticCiResult(result) {
|
|
472342
|
-
mkdirSync27(
|
|
472964
|
+
mkdirSync27(dirname67(result.manifestPath), { recursive: true });
|
|
472343
472965
|
writeFileSync26(result.manifestPath, `${JSON.stringify(result, null, 2)}
|
|
472344
472966
|
`, {
|
|
472345
472967
|
mode: 384
|
|
@@ -472635,7 +473257,7 @@ async function runAgenticCi(options2) {
|
|
|
472635
473257
|
let patch;
|
|
472636
473258
|
if (diff2.trim() && violations.length === 0) {
|
|
472637
473259
|
const digest3 = sha2562(diff2);
|
|
472638
|
-
const runDir =
|
|
473260
|
+
const runDir = dirname67(manifestPath5);
|
|
472639
473261
|
mkdirSync27(runDir, { recursive: true });
|
|
472640
473262
|
const patchPath = join157(runDir, `patch-${digest3}.diff`);
|
|
472641
473263
|
writeFileSync26(patchPath, diff2, { mode: 384 });
|
|
@@ -472731,7 +473353,7 @@ function saveAgenticCiSpec(cwd2, spec, options2 = {}) {
|
|
|
472731
473353
|
if (!validation.valid)
|
|
472732
473354
|
throw new Error(validation.errors.join("; "));
|
|
472733
473355
|
const path22 = agenticCiSpecPath(cwd2, spec.name);
|
|
472734
|
-
mkdirSync27(
|
|
473356
|
+
mkdirSync27(dirname67(path22), { recursive: true });
|
|
472735
473357
|
if (existsSync41(path22) && !options2.force)
|
|
472736
473358
|
return { path: path22, created: false };
|
|
472737
473359
|
writeFileSync26(path22, import_yaml3.stringify(spec), { mode: 384 });
|
|
@@ -472747,7 +473369,7 @@ function compileAgenticCiWorkflow(specName = "default", options2 = {}) {
|
|
|
472747
473369
|
if (spec.name !== specName) {
|
|
472748
473370
|
throw new Error("Agentic CI workflow spec name does not match");
|
|
472749
473371
|
}
|
|
472750
|
-
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.65.
|
|
473372
|
+
const packageVersion = options2.packageVersion ?? (typeof MACRO !== "undefined" ? "1.65.13" : "1.65.13");
|
|
472751
473373
|
if (!/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(packageVersion)) {
|
|
472752
473374
|
throw new Error("invalid ur-agent package version");
|
|
472753
473375
|
}
|
|
@@ -473086,12 +473708,12 @@ var init_agenticCi = __esm(() => {
|
|
|
473086
473708
|
|
|
473087
473709
|
// src/services/agents/featureScaffolds.ts
|
|
473088
473710
|
import { existsSync as existsSync42, mkdirSync as mkdirSync28, writeFileSync as writeFileSync27 } from "fs";
|
|
473089
|
-
import { dirname as
|
|
473711
|
+
import { dirname as dirname68, join as join158 } from "path";
|
|
473090
473712
|
function writeSeedFile(root2, file2, result, force) {
|
|
473091
|
-
const baseRoot = file2.root === "project" ?
|
|
473713
|
+
const baseRoot = file2.root === "project" ? dirname68(root2) : root2;
|
|
473092
473714
|
const fullPath = join158(baseRoot, file2.path);
|
|
473093
473715
|
const displayPath = file2.path;
|
|
473094
|
-
mkdirSync28(
|
|
473716
|
+
mkdirSync28(dirname68(fullPath), { recursive: true });
|
|
473095
473717
|
if (!force && existsSync42(fullPath)) {
|
|
473096
473718
|
result.skipped.push(displayPath);
|
|
473097
473719
|
return;
|
|
@@ -473740,7 +474362,7 @@ runner; \`ur trigger\` is the inbound parser that decides what to run.
|
|
|
473740
474362
|
path: ".github/workflows/ur.yml",
|
|
473741
474363
|
root: "project",
|
|
473742
474364
|
content: compileAgenticCiWorkflow("default", {
|
|
473743
|
-
packageVersion: typeof MACRO !== "undefined" ? "1.65.
|
|
474365
|
+
packageVersion: typeof MACRO !== "undefined" ? "1.65.13" : "1.65.13"
|
|
473744
474366
|
})
|
|
473745
474367
|
},
|
|
473746
474368
|
{
|
|
@@ -473804,13 +474426,13 @@ __export(exports_agent_ci, {
|
|
|
473804
474426
|
call: () => call56
|
|
473805
474427
|
});
|
|
473806
474428
|
import { existsSync as existsSync43, mkdirSync as mkdirSync29, writeFileSync as writeFileSync28 } from "fs";
|
|
473807
|
-
import { dirname as
|
|
474429
|
+
import { dirname as dirname69, join as join159 } from "path";
|
|
473808
474430
|
function value(tokens, flag) {
|
|
473809
474431
|
const index2 = tokens.indexOf(flag);
|
|
473810
474432
|
return index2 >= 0 ? tokens[index2 + 1] : undefined;
|
|
473811
474433
|
}
|
|
473812
474434
|
function cliVersion() {
|
|
473813
|
-
return typeof MACRO !== "undefined" ? "1.65.
|
|
474435
|
+
return typeof MACRO !== "undefined" ? "1.65.13" : "1.65.13";
|
|
473814
474436
|
}
|
|
473815
474437
|
function workflowPath(cwd2) {
|
|
473816
474438
|
return join159(cwd2, ".github", "workflows", "ur-agentic-ci.yml");
|
|
@@ -473868,7 +474490,7 @@ var call56 = async (args) => {
|
|
|
473868
474490
|
const target = workflowPath(cwd2);
|
|
473869
474491
|
let workflowCreated = false;
|
|
473870
474492
|
if (!existsSync43(target) || force) {
|
|
473871
|
-
mkdirSync29(
|
|
474493
|
+
mkdirSync29(dirname69(target), { recursive: true });
|
|
473872
474494
|
writeFileSync28(target, compileAgenticCiWorkflow(name, {
|
|
473873
474495
|
packageVersion: cliVersion(),
|
|
473874
474496
|
spec: compiledSpec
|
|
@@ -473913,7 +474535,7 @@ Use --force to replace it.`
|
|
|
473913
474535
|
value: json2 ? JSON.stringify(result, null, 2) : `${result.replacing ? "Would replace" : "Would write"} hardened workflow at ${target}`
|
|
473914
474536
|
};
|
|
473915
474537
|
}
|
|
473916
|
-
mkdirSync29(
|
|
474538
|
+
mkdirSync29(dirname69(target), { recursive: true });
|
|
473917
474539
|
writeFileSync28(target, compileAgenticCiWorkflow(name, {
|
|
473918
474540
|
packageVersion: cliVersion(),
|
|
473919
474541
|
spec: workflowSpec
|
|
@@ -479675,7 +480297,7 @@ function createAcpStdioApp(deps) {
|
|
|
479675
480297
|
}
|
|
479676
480298
|
},
|
|
479677
480299
|
authMethods: [],
|
|
479678
|
-
agentInfo: { name: "UR-Nexus", version: "1.65.
|
|
480300
|
+
agentInfo: { name: "UR-Nexus", version: "1.65.13" }
|
|
479679
480301
|
})).onRequest("authenticate", () => ({})).onRequest("session/new", async (context6) => {
|
|
479680
480302
|
const result = runtime2.newSession(context6.params.cwd, context6.params.mcpServers, context6.params.additionalDirectories);
|
|
479681
480303
|
await runtime2.announce({
|
|
@@ -479772,7 +480394,7 @@ function createAcpStdioAgent(deps) {
|
|
|
479772
480394
|
}
|
|
479773
480395
|
},
|
|
479774
480396
|
authMethods: [],
|
|
479775
|
-
agentInfo: { name: "UR-Nexus", version: "1.65.
|
|
480397
|
+
agentInfo: { name: "UR-Nexus", version: "1.65.13" }
|
|
479776
480398
|
});
|
|
479777
480399
|
return;
|
|
479778
480400
|
case "authenticate":
|
|
@@ -481545,7 +482167,7 @@ var init_validation5 = () => {};
|
|
|
481545
482167
|
|
|
481546
482168
|
// src/services/promptPlanning/executor.ts
|
|
481547
482169
|
import { realpathSync as realpathSync13 } from "fs";
|
|
481548
|
-
import { basename as basename45, dirname as
|
|
482170
|
+
import { basename as basename45, dirname as dirname70, resolve as resolve56 } from "path";
|
|
481549
482171
|
function cloneTasks(tasks2) {
|
|
481550
482172
|
return tasks2.map((task) => ({
|
|
481551
482173
|
...task,
|
|
@@ -481577,7 +482199,7 @@ function canonicalLockKey(cwd2, value2) {
|
|
|
481577
482199
|
const suffix = [];
|
|
481578
482200
|
let current = absolute;
|
|
481579
482201
|
for (;; ) {
|
|
481580
|
-
const parent2 =
|
|
482202
|
+
const parent2 = dirname70(current);
|
|
481581
482203
|
if (parent2 === current)
|
|
481582
482204
|
return absolute;
|
|
481583
482205
|
suffix.unshift(basename45(current));
|
|
@@ -486196,7 +486818,7 @@ import {
|
|
|
486196
486818
|
writeFileSync as writeFileSync36
|
|
486197
486819
|
} from "fs";
|
|
486198
486820
|
import { homedir as homedir32 } from "os";
|
|
486199
|
-
import { dirname as
|
|
486821
|
+
import { dirname as dirname71, isAbsolute as isAbsolute39, join as join171, resolve as resolve58, sep as pathSep3 } from "path";
|
|
486200
486822
|
function parseCommandTokens(tokens) {
|
|
486201
486823
|
const positional = [];
|
|
486202
486824
|
const flags = new Set;
|
|
@@ -486264,7 +486886,7 @@ function readPrivateKey(path22) {
|
|
|
486264
486886
|
}
|
|
486265
486887
|
function writeTrustedKeys(keys2) {
|
|
486266
486888
|
const path22 = trustedSkillKeysPath();
|
|
486267
|
-
mkdirSync37(
|
|
486889
|
+
mkdirSync37(dirname71(path22), { recursive: true, mode: 448 });
|
|
486268
486890
|
const temporary = `${path22}.${process.pid}.${randomUUID52()}.tmp`;
|
|
486269
486891
|
try {
|
|
486270
486892
|
writeFileSync36(temporary, `${JSON.stringify(keys2, null, 2)}
|
|
@@ -486347,7 +486969,7 @@ var VALUE_OPTIONS, call70 = async (args) => {
|
|
|
486347
486969
|
const { privateKey, publicKey } = generateKeyPairSync2("ed25519");
|
|
486348
486970
|
const privatePem = privateKey.export({ type: "pkcs8", format: "pem" });
|
|
486349
486971
|
const publicPem = publicKey.export({ type: "spki", format: "pem" }).toString();
|
|
486350
|
-
mkdirSync37(
|
|
486972
|
+
mkdirSync37(dirname71(privatePath), { recursive: true, mode: 448 });
|
|
486351
486973
|
writeFileSync36(privatePath, privatePem, { flag: "wx", mode: 384 });
|
|
486352
486974
|
createdPrivate = true;
|
|
486353
486975
|
writeFileSync36(publicPath, publicPem, { flag: "wx", mode: 420 });
|
|
@@ -487317,7 +487939,7 @@ import {
|
|
|
487317
487939
|
writeFileSync as writeFileSync39
|
|
487318
487940
|
} from "fs";
|
|
487319
487941
|
import { tmpdir as tmpdir14 } from "os";
|
|
487320
|
-
import { dirname as
|
|
487942
|
+
import { dirname as dirname72, join as join175 } from "path";
|
|
487321
487943
|
function redactArenaText(value2) {
|
|
487322
487944
|
return redactAgenticCiText(value2);
|
|
487323
487945
|
}
|
|
@@ -487791,7 +488413,7 @@ async function applyWinner(cwd2, baseSha, runId, winner) {
|
|
|
487791
488413
|
}
|
|
487792
488414
|
const digest3 = sha2563(winner.diff);
|
|
487793
488415
|
const patch = join175(cwd2, ".ur", "arena", runId, `winner-${digest3}.patch`);
|
|
487794
|
-
mkdirSync39(
|
|
488416
|
+
mkdirSync39(dirname72(patch), { recursive: true });
|
|
487795
488417
|
writeFileSync39(patch, winner.diff, { mode: 384 });
|
|
487796
488418
|
const check3 = await git4(cwd2, ["apply", "--check", "--3way", patch]);
|
|
487797
488419
|
if (check3.code !== 0) {
|
|
@@ -490530,17 +491152,17 @@ __export(exports_agent_inspect, {
|
|
|
490530
491152
|
call: () => call78
|
|
490531
491153
|
});
|
|
490532
491154
|
import { readdirSync as readdirSync23, statSync as statSync23 } from "fs";
|
|
490533
|
-
import { dirname as
|
|
491155
|
+
import { dirname as dirname73, join as join183 } from "path";
|
|
490534
491156
|
function resolveSessionSubagentsDir() {
|
|
490535
491157
|
let live;
|
|
490536
491158
|
try {
|
|
490537
|
-
live =
|
|
491159
|
+
live = dirname73(getAgentTranscriptPath("probe"));
|
|
490538
491160
|
} catch {
|
|
490539
491161
|
return null;
|
|
490540
491162
|
}
|
|
490541
491163
|
if (hasTranscripts(live))
|
|
490542
491164
|
return live;
|
|
490543
|
-
const projectDir =
|
|
491165
|
+
const projectDir = dirname73(dirname73(live));
|
|
490544
491166
|
let sessions;
|
|
490545
491167
|
try {
|
|
490546
491168
|
sessions = readdirSync23(projectDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => join183(projectDir, entry.name, "subagents")).filter(hasTranscripts);
|
|
@@ -490884,7 +491506,7 @@ var init_memoryIntegrity = __esm(() => {
|
|
|
490884
491506
|
});
|
|
490885
491507
|
|
|
490886
491508
|
// src/memdir/teamMemPaths.ts
|
|
490887
|
-
import { dirname as
|
|
491509
|
+
import { dirname as dirname74, join as join185, resolve as resolve60, sep as sep43 } from "path";
|
|
490888
491510
|
function getTeamMemPath() {
|
|
490889
491511
|
return (join185(getAutoMemPath(), "team") + sep43).normalize("NFC");
|
|
490890
491512
|
}
|
|
@@ -497165,7 +497787,7 @@ import {
|
|
|
497165
497787
|
writeFileSync as writeFileSync54
|
|
497166
497788
|
} from "fs";
|
|
497167
497789
|
import {
|
|
497168
|
-
dirname as
|
|
497790
|
+
dirname as dirname75,
|
|
497169
497791
|
isAbsolute as isAbsolute43,
|
|
497170
497792
|
join as join198,
|
|
497171
497793
|
relative as relative48,
|
|
@@ -497210,7 +497832,7 @@ function existingAncestor(path22) {
|
|
|
497210
497832
|
for (;; ) {
|
|
497211
497833
|
if (existsSync77(current))
|
|
497212
497834
|
return realpathSync15(current);
|
|
497213
|
-
const parent2 =
|
|
497835
|
+
const parent2 = dirname75(current);
|
|
497214
497836
|
if (parent2 === current)
|
|
497215
497837
|
return current;
|
|
497216
497838
|
current = parent2;
|
|
@@ -497220,7 +497842,7 @@ function initTargetAllowed(cwd2, path22, allowExternal) {
|
|
|
497220
497842
|
if (allowExternal)
|
|
497221
497843
|
return true;
|
|
497222
497844
|
const workspace = realpathSync15(cwd2);
|
|
497223
|
-
return pathIsWithin4(workspace, resolve64(path22)) && pathIsWithin4(workspace, existingAncestor(
|
|
497845
|
+
return pathIsWithin4(workspace, resolve64(path22)) && pathIsWithin4(workspace, existingAncestor(dirname75(path22)));
|
|
497224
497846
|
}
|
|
497225
497847
|
async function runDesktopQaCommand(args, cwd2, dependencies = {}) {
|
|
497226
497848
|
const runFixture = dependencies.runFixture ?? runDesktopQaFixture;
|
|
@@ -497310,7 +497932,7 @@ async function runDesktopQaCommand(args, cwd2, dependencies = {}) {
|
|
|
497310
497932
|
value: `Fixture already exists: ${path22} (use --force to replace it).`
|
|
497311
497933
|
};
|
|
497312
497934
|
}
|
|
497313
|
-
mkdirSync54(
|
|
497935
|
+
mkdirSync54(dirname75(path22), { recursive: true, mode: 448 });
|
|
497314
497936
|
writeFileSync54(path22, `${JSON.stringify(EXAMPLE_FIXTURE, null, 2)}
|
|
497315
497937
|
`, {
|
|
497316
497938
|
mode: 384
|
|
@@ -498194,7 +498816,7 @@ import {
|
|
|
498194
498816
|
readFileSync as readFileSync72,
|
|
498195
498817
|
writeFileSync as writeFileSync55
|
|
498196
498818
|
} from "fs";
|
|
498197
|
-
import { dirname as
|
|
498819
|
+
import { dirname as dirname76, join as join199, relative as relative49 } from "path";
|
|
498198
498820
|
function defaultTraceDir(cwd2) {
|
|
498199
498821
|
return join199(cwd2, ".ur", "test-first", "traces");
|
|
498200
498822
|
}
|
|
@@ -498247,7 +498869,7 @@ function mergeStringArray(existing2, additions) {
|
|
|
498247
498869
|
}
|
|
498248
498870
|
function installTestFirstGates(cwd2, stack = detectTestFirstStack(cwd2)) {
|
|
498249
498871
|
const path22 = join199(cwd2, ".ur", "verify.json");
|
|
498250
|
-
mkdirSync55(
|
|
498872
|
+
mkdirSync55(dirname76(path22), { recursive: true });
|
|
498251
498873
|
const commands = stack.commands.map((command5) => command5.command);
|
|
498252
498874
|
const existing2 = readExistingVerifyConfig(path22);
|
|
498253
498875
|
const next = {
|
|
@@ -502658,7 +503280,7 @@ var init_os2 = __esm(() => {
|
|
|
502658
503280
|
import { createHash as createHash47, randomUUID as randomUUID59 } from "crypto";
|
|
502659
503281
|
import { existsSync as existsSync83, lstatSync as lstatSync20, realpathSync as realpathSync16, rmSync as rmSync18 } from "fs";
|
|
502660
503282
|
import { tmpdir as tmpdir16 } from "os";
|
|
502661
|
-
import { dirname as
|
|
503283
|
+
import { dirname as dirname77, isAbsolute as isAbsolute44, join as join204, relative as relative50, resolve as resolve66 } from "path";
|
|
502662
503284
|
function workspaceDir(cwd2) {
|
|
502663
503285
|
return join204(cwd2, ".ur", "workspaces");
|
|
502664
503286
|
}
|
|
@@ -503067,7 +503689,7 @@ async function prepareRepositoryState(cwd2, spec2, validation, runId, options3)
|
|
|
503067
503689
|
if (filters.code !== 0 && filters.code !== 1) {
|
|
503068
503690
|
throw new Error(`Could not inspect ${repo.id} Git filters`);
|
|
503069
503691
|
}
|
|
503070
|
-
ensurePrivateDirectory(workspaceDir(cwd2),
|
|
503692
|
+
ensurePrivateDirectory(workspaceDir(cwd2), dirname77(worktree2));
|
|
503071
503693
|
const created = await git7(details.root, ["worktree", "add", "-b", branch, worktree2, repo.baseRef], options3.commandRunner);
|
|
503072
503694
|
if (created.code !== 0) {
|
|
503073
503695
|
throw new Error(`Could not create ${repo.id} worktree: ${created.stderr || created.error || created.stdout}`);
|
|
@@ -503164,7 +503786,7 @@ async function runWorkspace(cwd2, name, options3 = {}) {
|
|
|
503164
503786
|
const persist = () => {
|
|
503165
503787
|
state.updatedAt = new Date().toISOString();
|
|
503166
503788
|
if (!options3.dryRun) {
|
|
503167
|
-
ensurePrivateDirectory(workspaceDir(cwd2),
|
|
503789
|
+
ensurePrivateDirectory(workspaceDir(cwd2), dirname77(workspaceStatePath(cwd2, name)));
|
|
503168
503790
|
withPrivateStateLock(workspaceDir(cwd2), `state-${name}`, () => saveState(cwd2, state));
|
|
503169
503791
|
}
|
|
503170
503792
|
};
|
|
@@ -503825,7 +504447,7 @@ import {
|
|
|
503825
504447
|
readdirSync as readdirSync32,
|
|
503826
504448
|
writeFileSync as writeFileSync59
|
|
503827
504449
|
} from "fs";
|
|
503828
|
-
import { dirname as
|
|
504450
|
+
import { dirname as dirname78, join as join205 } from "path";
|
|
503829
504451
|
function memoryDir(cwd2) {
|
|
503830
504452
|
return join205(cwd2, ".ur", "memory");
|
|
503831
504453
|
}
|
|
@@ -503860,7 +504482,7 @@ function saveMemoryRetentionPolicy(cwd2, patch) {
|
|
|
503860
504482
|
decayDays: patch.decayDays === undefined ? current.decayDays : validPositive(patch.decayDays),
|
|
503861
504483
|
updatedAt: new Date().toISOString()
|
|
503862
504484
|
};
|
|
503863
|
-
mkdirSync59(
|
|
504485
|
+
mkdirSync59(dirname78(policyPath2(cwd2)), { recursive: true });
|
|
503864
504486
|
writeFileSync59(policyPath2(cwd2), `${JSON.stringify(next, null, 2)}
|
|
503865
504487
|
`);
|
|
503866
504488
|
return next;
|
|
@@ -673551,7 +674173,7 @@ import {
|
|
|
673551
674173
|
statSync as statSync29,
|
|
673552
674174
|
writeFileSync as writeFileSync61
|
|
673553
674175
|
} from "fs";
|
|
673554
|
-
import { dirname as
|
|
674176
|
+
import { dirname as dirname79, extname as extname19, isAbsolute as isAbsolute45, join as join207, relative as relative52, resolve as resolve67 } from "path";
|
|
673555
674177
|
import { promisify as promisify4 } from "util";
|
|
673556
674178
|
function repoEditIndexPath(root2) {
|
|
673557
674179
|
return join207(root2, ".ur", "repo-edit", "index.json");
|
|
@@ -673691,7 +674313,7 @@ ${content}`),
|
|
|
673691
674313
|
builtAt: new Date().toISOString(),
|
|
673692
674314
|
files
|
|
673693
674315
|
};
|
|
673694
|
-
mkdirSync61(
|
|
674316
|
+
mkdirSync61(dirname79(repoEditIndexPath(root2)), { recursive: true });
|
|
673695
674317
|
writeFileSync61(repoEditIndexPath(root2), `${JSON.stringify(index2, null, 2)}
|
|
673696
674318
|
`);
|
|
673697
674319
|
return index2;
|
|
@@ -674368,7 +674990,7 @@ var init_diagnostics = __esm(() => {
|
|
|
674368
674990
|
});
|
|
674369
674991
|
|
|
674370
674992
|
// src/services/repoEditing/ast/workspaceEdit.ts
|
|
674371
|
-
import { dirname as
|
|
674993
|
+
import { dirname as dirname80, isAbsolute as isAbsolute46, relative as relative53, resolve as resolve68, sep as sep47 } from "path";
|
|
674372
674994
|
import {
|
|
674373
674995
|
chmodSync as chmodSync11,
|
|
674374
674996
|
existsSync as existsSync87,
|
|
@@ -674419,7 +675041,7 @@ function realpathForMissing(path22) {
|
|
|
674419
675041
|
const suffix = [];
|
|
674420
675042
|
let cursor = path22;
|
|
674421
675043
|
while (!existsSync87(cursor)) {
|
|
674422
|
-
const parent2 =
|
|
675044
|
+
const parent2 = dirname80(cursor);
|
|
674423
675045
|
if (parent2 === cursor)
|
|
674424
675046
|
return path22;
|
|
674425
675047
|
suffix.unshift(cursor.slice(parent2.length + (parent2.endsWith(sep47) ? 0 : 1)));
|
|
@@ -674449,8 +675071,8 @@ function workspaceRelativePath(root2, file2) {
|
|
|
674449
675071
|
return relative53(realpathSync17(root2), resolveWorkspaceFile(root2, file2)).split(sep47).join("/");
|
|
674450
675072
|
}
|
|
674451
675073
|
function atomicWrite(path22, content, mode) {
|
|
674452
|
-
mkdirSync62(
|
|
674453
|
-
const temp = resolve68(
|
|
675074
|
+
mkdirSync62(dirname80(path22), { recursive: true });
|
|
675075
|
+
const temp = resolve68(dirname80(path22), `.${randomUUID60()}.ur-repo-edit.tmp`);
|
|
674454
675076
|
try {
|
|
674455
675077
|
writeFileSync62(temp, content, { flag: "wx", ...mode !== undefined ? { mode } : {} });
|
|
674456
675078
|
renameSync17(temp, path22);
|
|
@@ -674499,14 +675121,14 @@ function rollbackWorkspaceEdit(root2, snapshots) {
|
|
|
674499
675121
|
continue;
|
|
674500
675122
|
}
|
|
674501
675123
|
rmSync19(abs, { force: true, recursive: true });
|
|
674502
|
-
let parent2 =
|
|
675124
|
+
let parent2 = dirname80(abs);
|
|
674503
675125
|
while (parent2 !== realRoot && isWithin(realRoot, parent2)) {
|
|
674504
675126
|
try {
|
|
674505
675127
|
rmdirSync2(parent2);
|
|
674506
675128
|
} catch {
|
|
674507
675129
|
break;
|
|
674508
675130
|
}
|
|
674509
|
-
parent2 =
|
|
675131
|
+
parent2 = dirname80(parent2);
|
|
674510
675132
|
}
|
|
674511
675133
|
}
|
|
674512
675134
|
}
|
|
@@ -674654,7 +675276,7 @@ var init_lspEditEngine = __esm(() => {
|
|
|
674654
675276
|
});
|
|
674655
675277
|
|
|
674656
675278
|
// src/services/repoEditing/ast/typescriptEngine.ts
|
|
674657
|
-
import { dirname as
|
|
675279
|
+
import { dirname as dirname81, join as join209, relative as relative54 } from "path";
|
|
674658
675280
|
import { existsSync as existsSync88, readFileSync as readFileSync81 } from "fs";
|
|
674659
675281
|
function loadProgram(root2, files) {
|
|
674660
675282
|
const configPath2 = import_typescript3.default.findConfigFile(root2, import_typescript3.default.sys.fileExists, "tsconfig.json");
|
|
@@ -674915,11 +675537,11 @@ function normalizePath4(value2) {
|
|
|
674915
675537
|
function resolveRelativeImport(importingFileRel, specifier) {
|
|
674916
675538
|
if (!specifier.startsWith("."))
|
|
674917
675539
|
return;
|
|
674918
|
-
const base2 = normalizePath4(join209(
|
|
675540
|
+
const base2 = normalizePath4(join209(dirname81(importingFileRel), specifier));
|
|
674919
675541
|
return stripKnownExtension(base2);
|
|
674920
675542
|
}
|
|
674921
675543
|
function moduleSpecifierBetween(importingFileRel, targetFileRel) {
|
|
674922
|
-
let specifier = normalizePath4(relative54(
|
|
675544
|
+
let specifier = normalizePath4(relative54(dirname81(importingFileRel), stripKnownExtension(targetFileRel)));
|
|
674923
675545
|
if (!specifier.startsWith("."))
|
|
674924
675546
|
specifier = `./${specifier}`;
|
|
674925
675547
|
return specifier;
|
|
@@ -690932,7 +691554,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
|
|
|
690932
691554
|
smapsRollup,
|
|
690933
691555
|
platform: process.platform,
|
|
690934
691556
|
nodeVersion: process.version,
|
|
690935
|
-
ccVersion: "1.65.
|
|
691557
|
+
ccVersion: "1.65.13"
|
|
690936
691558
|
};
|
|
690937
691559
|
}
|
|
690938
691560
|
async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
|
|
@@ -691512,7 +692134,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
691512
692134
|
var call153 = async () => {
|
|
691513
692135
|
return {
|
|
691514
692136
|
type: "text",
|
|
691515
|
-
value: "1.65.
|
|
692137
|
+
value: "1.65.13"
|
|
691516
692138
|
};
|
|
691517
692139
|
}, version2, version_default;
|
|
691518
692140
|
var init_version = __esm(() => {
|
|
@@ -693699,7 +694321,7 @@ var init_advisor2 = __esm(() => {
|
|
|
693699
694321
|
// src/skills/bundledSkills.ts
|
|
693700
694322
|
import { constants as fsConstants6 } from "fs";
|
|
693701
694323
|
import { mkdir as mkdir38, open as open15 } from "fs/promises";
|
|
693702
|
-
import { dirname as
|
|
694324
|
+
import { dirname as dirname82, isAbsolute as isAbsolute52, join as join223, normalize as normalize16, sep as pathSep4 } from "path";
|
|
693703
694325
|
function registerBundledSkill(definition) {
|
|
693704
694326
|
const { files: files2 } = definition;
|
|
693705
694327
|
let skillRoot;
|
|
@@ -693763,7 +694385,7 @@ async function writeSkillFiles(dir, files2) {
|
|
|
693763
694385
|
const byParent = new Map;
|
|
693764
694386
|
for (const [relPath, content] of Object.entries(files2)) {
|
|
693765
694387
|
const target = resolveSkillFilePath(dir, relPath);
|
|
693766
|
-
const parent2 =
|
|
694388
|
+
const parent2 = dirname82(target);
|
|
693767
694389
|
const entry = [target, content];
|
|
693768
694390
|
const group = byParent.get(parent2);
|
|
693769
694391
|
if (group)
|
|
@@ -694146,7 +694768,7 @@ var init_exit2 = __esm(() => {
|
|
|
694146
694768
|
// src/utils/exportPath.ts
|
|
694147
694769
|
import { existsSync as existsSync99, lstatSync as lstatSync23, realpathSync as realpathSync22 } from "fs";
|
|
694148
694770
|
import {
|
|
694149
|
-
dirname as
|
|
694771
|
+
dirname as dirname83,
|
|
694150
694772
|
extname as extname23,
|
|
694151
694773
|
isAbsolute as isAbsolute53,
|
|
694152
694774
|
relative as relative61,
|
|
@@ -694184,7 +694806,7 @@ function resolveExportPath(cwd2, input) {
|
|
|
694184
694806
|
const root2 = realpathSync22(cwd2);
|
|
694185
694807
|
const filename = normalizeExportFilename(trimmed);
|
|
694186
694808
|
const target = resolve73(root2, filename);
|
|
694187
|
-
const parent2 = realpathSync22(
|
|
694809
|
+
const parent2 = realpathSync22(dirname83(target));
|
|
694188
694810
|
if (escapes(root2, parent2)) {
|
|
694189
694811
|
throw new Error("Export path resolves outside the workspace");
|
|
694190
694812
|
}
|
|
@@ -702692,7 +703314,7 @@ function generateHtmlReport(data, insights) {
|
|
|
702692
703314
|
</html>`;
|
|
702693
703315
|
}
|
|
702694
703316
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
702695
|
-
const version3 = typeof MACRO !== "undefined" ? "1.65.
|
|
703317
|
+
const version3 = typeof MACRO !== "undefined" ? "1.65.13" : "unknown";
|
|
702696
703318
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
702697
703319
|
const facets_summary = {
|
|
702698
703320
|
total: facets.size,
|
|
@@ -704154,7 +704776,7 @@ import {
|
|
|
704154
704776
|
unlink as unlink23,
|
|
704155
704777
|
writeFile as writeFile44
|
|
704156
704778
|
} from "fs/promises";
|
|
704157
|
-
import { basename as basename51, dirname as
|
|
704779
|
+
import { basename as basename51, dirname as dirname85, join as join228 } from "path";
|
|
704158
704780
|
function isTranscriptMessage(entry) {
|
|
704159
704781
|
const t = entry.type;
|
|
704160
704782
|
return t === "user" || t === "assistant" || t === "attachment" || t === "system";
|
|
@@ -704203,7 +704825,7 @@ function getAgentMetadataPath(agentId) {
|
|
|
704203
704825
|
}
|
|
704204
704826
|
async function writeAgentMetadata(agentId, metadata) {
|
|
704205
704827
|
const path22 = getAgentMetadataPath(agentId);
|
|
704206
|
-
await mkdir41(
|
|
704828
|
+
await mkdir41(dirname85(path22), { recursive: true });
|
|
704207
704829
|
await writeFile44(path22, JSON.stringify(metadata));
|
|
704208
704830
|
}
|
|
704209
704831
|
async function readAgentMetadata(agentId) {
|
|
@@ -704226,7 +704848,7 @@ function getRemoteAgentMetadataPath(taskId) {
|
|
|
704226
704848
|
}
|
|
704227
704849
|
async function writeRemoteAgentMetadata(taskId, metadata) {
|
|
704228
704850
|
const path22 = getRemoteAgentMetadataPath(taskId);
|
|
704229
|
-
await mkdir41(
|
|
704851
|
+
await mkdir41(dirname85(path22), { recursive: true });
|
|
704230
704852
|
await writeFile44(path22, JSON.stringify(metadata));
|
|
704231
704853
|
}
|
|
704232
704854
|
async function readRemoteAgentMetadata(taskId) {
|
|
@@ -704434,7 +705056,7 @@ class Project {
|
|
|
704434
705056
|
try {
|
|
704435
705057
|
await fsAppendFile(filePath, data, { mode: 384 });
|
|
704436
705058
|
} catch {
|
|
704437
|
-
await mkdir41(
|
|
705059
|
+
await mkdir41(dirname85(filePath), { recursive: true, mode: 448 });
|
|
704438
705060
|
await fsAppendFile(filePath, data, { mode: 384 });
|
|
704439
705061
|
}
|
|
704440
705062
|
}
|
|
@@ -705048,7 +705670,7 @@ async function hydrateFromCCRv2InternalEvents(sessionId) {
|
|
|
705048
705670
|
}
|
|
705049
705671
|
for (const [agentId, entries] of byAgent) {
|
|
705050
705672
|
const agentFile = getAgentTranscriptPath(asAgentId(agentId));
|
|
705051
|
-
await mkdir41(
|
|
705673
|
+
await mkdir41(dirname85(agentFile), { recursive: true, mode: 448 });
|
|
705052
705674
|
const agentContent = entries.map((p2) => jsonStringify(p2) + `
|
|
705053
705675
|
`).join("");
|
|
705054
705676
|
await writeFile44(agentFile, agentContent, {
|
|
@@ -705585,7 +706207,7 @@ function appendEntryToFile(fullPath, entry) {
|
|
|
705585
706207
|
try {
|
|
705586
706208
|
fs12.appendFileSync(fullPath, line, { mode: 384 });
|
|
705587
706209
|
} catch {
|
|
705588
|
-
fs12.mkdirSync(
|
|
706210
|
+
fs12.mkdirSync(dirname85(fullPath), { mode: 448 });
|
|
705589
706211
|
fs12.appendFileSync(fullPath, line, { mode: 384 });
|
|
705590
706212
|
}
|
|
705591
706213
|
}
|
|
@@ -707019,7 +707641,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
707019
707641
|
init_settings2();
|
|
707020
707642
|
init_slowOperations();
|
|
707021
707643
|
init_uuid();
|
|
707022
|
-
VERSION7 = typeof MACRO !== "undefined" ? "1.65.
|
|
707644
|
+
VERSION7 = typeof MACRO !== "undefined" ? "1.65.13" : "unknown";
|
|
707023
707645
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
707024
707646
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
707025
707647
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -707257,7 +707879,7 @@ var init_memdir = __esm(() => {
|
|
|
707257
707879
|
init_state();
|
|
707258
707880
|
init_growthbook();
|
|
707259
707881
|
init_analytics();
|
|
707260
|
-
|
|
707882
|
+
init_prompt2();
|
|
707261
707883
|
init_constants4();
|
|
707262
707884
|
init_debug();
|
|
707263
707885
|
init_embeddedTools();
|
|
@@ -708187,7 +708809,7 @@ var init_filesystem = __esm(() => {
|
|
|
708187
708809
|
init_agentMemory();
|
|
708188
708810
|
init_state();
|
|
708189
708811
|
init_growthbook();
|
|
708190
|
-
|
|
708812
|
+
init_prompt3();
|
|
708191
708813
|
init_cwd2();
|
|
708192
708814
|
init_envUtils();
|
|
708193
708815
|
init_fsOperations();
|
|
@@ -708234,7 +708856,7 @@ var init_filesystem = __esm(() => {
|
|
|
708234
708856
|
});
|
|
708235
708857
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
708236
708858
|
const nonce = randomBytes20(16).toString("hex");
|
|
708237
|
-
return join230(getURTempDir(), "bundled-skills", "1.65.
|
|
708859
|
+
return join230(getURTempDir(), "bundled-skills", "1.65.13", nonce);
|
|
708238
708860
|
});
|
|
708239
708861
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
708240
708862
|
});
|
|
@@ -712802,7 +713424,7 @@ import {
|
|
|
712802
713424
|
symlink as symlink5,
|
|
712803
713425
|
utimes as utimes2
|
|
712804
713426
|
} from "fs/promises";
|
|
712805
|
-
import { basename as basename53, dirname as
|
|
713427
|
+
import { basename as basename53, dirname as dirname86, join as join232 } from "path";
|
|
712806
713428
|
function validateWorktreeSlug(slug5) {
|
|
712807
713429
|
if (slug5.length > MAX_WORKTREE_SLUG_LENGTH) {
|
|
712808
713430
|
throw new Error(`Invalid worktree name: must be ${MAX_WORKTREE_SLUG_LENGTH} characters or fewer (got ${slug5.length})`);
|
|
@@ -712998,7 +713620,7 @@ async function copyWorktreeIncludeFiles(repoRoot, worktreePath) {
|
|
|
712998
713620
|
const srcPath = join232(repoRoot, relativePath3);
|
|
712999
713621
|
const destPath = join232(worktreePath, relativePath3);
|
|
713000
713622
|
try {
|
|
713001
|
-
await mkdir43(
|
|
713623
|
+
await mkdir43(dirname86(destPath), { recursive: true });
|
|
713002
713624
|
await copyFile10(srcPath, destPath);
|
|
713003
713625
|
copied.push(relativePath3);
|
|
713004
713626
|
} catch (e) {
|
|
@@ -713015,7 +713637,7 @@ async function performPostCreationSetup(repoRoot, worktreePath) {
|
|
|
713015
713637
|
const sourceSettingsLocal = join232(repoRoot, localSettingsRelativePath);
|
|
713016
713638
|
try {
|
|
713017
713639
|
const destSettingsLocal = join232(worktreePath, localSettingsRelativePath);
|
|
713018
|
-
await mkdirRecursive(
|
|
713640
|
+
await mkdirRecursive(dirname86(destSettingsLocal));
|
|
713019
713641
|
await copyFile10(sourceSettingsLocal, destSettingsLocal);
|
|
713020
713642
|
logForDebugging(`Copied settings.local.json to worktree: ${destSettingsLocal}`);
|
|
713021
713643
|
} catch (e) {
|
|
@@ -714087,17 +714709,17 @@ var init_prompts4 = __esm(() => {
|
|
|
714087
714709
|
init_common2();
|
|
714088
714710
|
init_settings2();
|
|
714089
714711
|
init_constants2();
|
|
714712
|
+
init_prompt4();
|
|
714090
714713
|
init_prompt3();
|
|
714091
|
-
init_prompt2();
|
|
714092
714714
|
init_model();
|
|
714093
714715
|
init_antModels();
|
|
714094
714716
|
init_providers();
|
|
714095
714717
|
init_providerRegistry();
|
|
714096
714718
|
init_commands3();
|
|
714097
714719
|
init_outputStyles();
|
|
714098
|
-
|
|
714720
|
+
init_prompt2();
|
|
714099
714721
|
init_embeddedTools();
|
|
714100
|
-
|
|
714722
|
+
init_prompt();
|
|
714101
714723
|
init_exploreAgent();
|
|
714102
714724
|
init_builtInAgents();
|
|
714103
714725
|
init_filesystem();
|
|
@@ -714107,7 +714729,7 @@ var init_prompts4 = __esm(() => {
|
|
|
714107
714729
|
init_betas2();
|
|
714108
714730
|
init_forkSubagent();
|
|
714109
714731
|
init_systemPromptSections();
|
|
714110
|
-
|
|
714732
|
+
init_prompt9();
|
|
714111
714733
|
init_xml();
|
|
714112
714734
|
init_debug();
|
|
714113
714735
|
init_memdir();
|
|
@@ -714562,7 +715184,7 @@ function computeFingerprint(messageText2, version3) {
|
|
|
714562
715184
|
}
|
|
714563
715185
|
function computeFingerprintFromMessages(messages) {
|
|
714564
715186
|
const firstMessageText = extractFirstMessageText(messages);
|
|
714565
|
-
return computeFingerprint(firstMessageText, "1.65.
|
|
715187
|
+
return computeFingerprint(firstMessageText, "1.65.13");
|
|
714566
715188
|
}
|
|
714567
715189
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
714568
715190
|
var init_fingerprint = () => {};
|
|
@@ -714627,10 +715249,10 @@ function getAPIContextManagement(options4) {
|
|
|
714627
715249
|
}
|
|
714628
715250
|
var DEFAULT_MAX_INPUT_TOKENS = 180000, DEFAULT_TARGET_INPUT_TOKENS = 40000, TOOLS_CLEARABLE_RESULTS, TOOLS_CLEARABLE_USES;
|
|
714629
715251
|
var init_apiMicrocompact = __esm(() => {
|
|
714630
|
-
init_prompt2();
|
|
714631
715252
|
init_prompt3();
|
|
714632
|
-
|
|
714633
|
-
|
|
715253
|
+
init_prompt4();
|
|
715254
|
+
init_prompt2();
|
|
715255
|
+
init_prompt6();
|
|
714634
715256
|
init_shellToolUtils();
|
|
714635
715257
|
init_envUtils();
|
|
714636
715258
|
TOOLS_CLEARABLE_RESULTS = [
|
|
@@ -714957,7 +715579,9 @@ function getNonstreamingFallbackTimeoutMs(model, env4 = process.env, provider =
|
|
|
714957
715579
|
const override = parseInt(env4.API_TIMEOUT_MS || "", 10);
|
|
714958
715580
|
if (override)
|
|
714959
715581
|
return override;
|
|
714960
|
-
|
|
715582
|
+
if (isEnvTruthy(env4.UR_CODE_REMOTE))
|
|
715583
|
+
return 120000;
|
|
715584
|
+
return provider === "ollama" ? getOllamaModelDefaultTimeoutMs(model) : 300000;
|
|
714961
715585
|
}
|
|
714962
715586
|
function shouldSkipOllamaNonStreamingFallback(error40, model, provider = getAPIProvider()) {
|
|
714963
715587
|
return isOllamaCloudRuntime(model, provider) && error40 instanceof APIConnectionTimeoutError && error40.message === "Ollama stream timed out";
|
|
@@ -716400,7 +717024,7 @@ var init_ur2 = __esm(() => {
|
|
|
716400
717024
|
init_toolSearch();
|
|
716401
717025
|
init_apiLimits();
|
|
716402
717026
|
init_betas();
|
|
716403
|
-
|
|
717027
|
+
init_prompt8();
|
|
716404
717028
|
init_envValidation();
|
|
716405
717029
|
init_json();
|
|
716406
717030
|
init_bedrock();
|
|
@@ -716415,6 +717039,7 @@ var init_ur2 = __esm(() => {
|
|
|
716415
717039
|
init_utils3();
|
|
716416
717040
|
init_vcr();
|
|
716417
717041
|
init_client2();
|
|
717042
|
+
init_ollama();
|
|
716418
717043
|
init_errors6();
|
|
716419
717044
|
init_logging();
|
|
716420
717045
|
init_promptCacheBreakDetection();
|
|
@@ -716458,7 +717083,7 @@ async function sideQuery(opts) {
|
|
|
716458
717083
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
716459
717084
|
}
|
|
716460
717085
|
const messageText2 = extractFirstUserMessageText(messages);
|
|
716461
|
-
const fingerprint2 = computeFingerprint(messageText2, "1.65.
|
|
717086
|
+
const fingerprint2 = computeFingerprint(messageText2, "1.65.13");
|
|
716462
717087
|
const attributionHeader = getAttributionHeader(fingerprint2);
|
|
716463
717088
|
const systemBlocks = [
|
|
716464
717089
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -721245,7 +721870,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
721245
721870
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
721246
721871
|
apiKeySource: getURHQApiKeyWithSource().source,
|
|
721247
721872
|
betas: getSdkBetas(),
|
|
721248
|
-
ur_version: "1.65.
|
|
721873
|
+
ur_version: "1.65.13",
|
|
721249
721874
|
output_style: outputStyle2,
|
|
721250
721875
|
agents: inputs.agents.map((agent2) => agent2.agentType),
|
|
721251
721876
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill2) => skill2.name),
|
|
@@ -735196,7 +735821,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
735196
735821
|
function getSemverPart(version3) {
|
|
735197
735822
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
735198
735823
|
}
|
|
735199
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.65.
|
|
735824
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.65.13") {
|
|
735200
735825
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react222.useState(() => getSemverPart(initialVersion));
|
|
735201
735826
|
if (!updatedVersion) {
|
|
735202
735827
|
return null;
|
|
@@ -735245,7 +735870,7 @@ function AutoUpdater({
|
|
|
735245
735870
|
return;
|
|
735246
735871
|
}
|
|
735247
735872
|
if (false) {}
|
|
735248
|
-
const currentVersion = "1.65.
|
|
735873
|
+
const currentVersion = "1.65.13";
|
|
735249
735874
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
735250
735875
|
let latestVersion = await getLatestVersion(channel);
|
|
735251
735876
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -735474,12 +736099,12 @@ function NativeAutoUpdater({
|
|
|
735474
736099
|
logEvent("tengu_native_auto_updater_start", {});
|
|
735475
736100
|
try {
|
|
735476
736101
|
const maxVersion = await getMaxVersion();
|
|
735477
|
-
if (maxVersion && gt("1.65.
|
|
736102
|
+
if (maxVersion && gt("1.65.13", maxVersion)) {
|
|
735478
736103
|
const msg = await getMaxVersionMessage();
|
|
735479
736104
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
735480
736105
|
}
|
|
735481
736106
|
const result = await installLatest(channel);
|
|
735482
|
-
const currentVersion = "1.65.
|
|
736107
|
+
const currentVersion = "1.65.13";
|
|
735483
736108
|
const latencyMs = Date.now() - startTime;
|
|
735484
736109
|
if (result.lockFailed) {
|
|
735485
736110
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -735616,17 +736241,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
735616
736241
|
const maxVersion = await getMaxVersion();
|
|
735617
736242
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
735618
736243
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
735619
|
-
if (gte("1.65.
|
|
735620
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.65.
|
|
736244
|
+
if (gte("1.65.13", maxVersion)) {
|
|
736245
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.65.13"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
735621
736246
|
setUpdateAvailable(false);
|
|
735622
736247
|
return;
|
|
735623
736248
|
}
|
|
735624
736249
|
latest = maxVersion;
|
|
735625
736250
|
}
|
|
735626
|
-
const hasUpdate = latest && !gte("1.65.
|
|
736251
|
+
const hasUpdate = latest && !gte("1.65.13", latest) && !shouldSkipVersion(latest);
|
|
735627
736252
|
setUpdateAvailable(!!hasUpdate);
|
|
735628
736253
|
if (hasUpdate) {
|
|
735629
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.65.
|
|
736254
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.65.13"} -> ${latest}`);
|
|
735630
736255
|
}
|
|
735631
736256
|
};
|
|
735632
736257
|
$2[0] = t1;
|
|
@@ -735660,7 +736285,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
735660
736285
|
wrap: "truncate",
|
|
735661
736286
|
children: [
|
|
735662
736287
|
"currentVersion: ",
|
|
735663
|
-
"1.65.
|
|
736288
|
+
"1.65.13"
|
|
735664
736289
|
]
|
|
735665
736290
|
}, undefined, true, undefined, this);
|
|
735666
736291
|
$2[3] = verbose;
|
|
@@ -746380,7 +747005,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
746380
747005
|
project_dir: getOriginalCwd(),
|
|
746381
747006
|
added_dirs: addedDirs
|
|
746382
747007
|
},
|
|
746383
|
-
version: "1.65.
|
|
747008
|
+
version: "1.65.13",
|
|
746384
747009
|
output_style: {
|
|
746385
747010
|
name: outputStyleName
|
|
746386
747011
|
},
|
|
@@ -746458,7 +747083,7 @@ function StatusLineInner({
|
|
|
746458
747083
|
const taskValues = Object.values(tasks2);
|
|
746459
747084
|
const taskRunningCount = countActiveBackgroundTasks(taskValues);
|
|
746460
747085
|
const defaultStatusLineText = buildDefaultStatusBar({
|
|
746461
|
-
version: "1.65.
|
|
747086
|
+
version: "1.65.13",
|
|
746462
747087
|
providerLabel: providerRuntime.providerLabel,
|
|
746463
747088
|
authMode: providerRuntime.authLabel,
|
|
746464
747089
|
model: renderModelName(mainLoopModel) || providerRuntime.model || "",
|
|
@@ -756992,7 +757617,7 @@ __export(exports_asciicast, {
|
|
|
756992
757617
|
_resetRecordingStateForTesting: () => _resetRecordingStateForTesting
|
|
756993
757618
|
});
|
|
756994
757619
|
import { appendFile as appendFile7, rename as rename11 } from "fs/promises";
|
|
756995
|
-
import { basename as basename66, dirname as
|
|
757620
|
+
import { basename as basename66, dirname as dirname87, join as join238 } from "path";
|
|
756996
757621
|
function getRecordFilePath() {
|
|
756997
757622
|
if (recordingState.filePath !== null) {
|
|
756998
757623
|
return recordingState.filePath;
|
|
@@ -757074,7 +757699,7 @@ function installAsciicastRecorder() {
|
|
|
757074
757699
|
}
|
|
757075
757700
|
});
|
|
757076
757701
|
try {
|
|
757077
|
-
getFsImplementation().mkdirSync(
|
|
757702
|
+
getFsImplementation().mkdirSync(dirname87(filePath));
|
|
757078
757703
|
} catch {}
|
|
757079
757704
|
getFsImplementation().appendFileSync(filePath, header + `
|
|
757080
757705
|
`, { mode: 384 });
|
|
@@ -757143,7 +757768,7 @@ var init_asciicast = __esm(() => {
|
|
|
757143
757768
|
});
|
|
757144
757769
|
|
|
757145
757770
|
// src/utils/sessionRestore.ts
|
|
757146
|
-
import { dirname as
|
|
757771
|
+
import { dirname as dirname88 } from "path";
|
|
757147
757772
|
function extractTodosFromTranscript(messages) {
|
|
757148
757773
|
for (let i3 = messages.length - 1;i3 >= 0; i3--) {
|
|
757149
757774
|
const msg = messages[i3];
|
|
@@ -757268,7 +757893,7 @@ async function processResumedConversation(result, opts, context6) {
|
|
|
757268
757893
|
if (!opts.forkSession) {
|
|
757269
757894
|
const sid = opts.sessionIdOverride ?? result.sessionId;
|
|
757270
757895
|
if (sid) {
|
|
757271
|
-
switchSession(asSessionId(sid), opts.transcriptPath ?
|
|
757896
|
+
switchSession(asSessionId(sid), opts.transcriptPath ? dirname88(opts.transcriptPath) : null);
|
|
757272
757897
|
await renameRecordingForSession();
|
|
757273
757898
|
await resetSessionFilePointer();
|
|
757274
757899
|
restoreCostStateForSession(sid);
|
|
@@ -758638,7 +759263,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
|
|
|
758638
759263
|
} catch {}
|
|
758639
759264
|
const data = {
|
|
758640
759265
|
trigger: trigger2,
|
|
758641
|
-
version: "1.65.
|
|
759266
|
+
version: "1.65.13",
|
|
758642
759267
|
platform: process.platform,
|
|
758643
759268
|
transcript,
|
|
758644
759269
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -759183,7 +759808,7 @@ var init_useMemorySurvey = __esm(() => {
|
|
|
759183
759808
|
init_analytics();
|
|
759184
759809
|
init_paths();
|
|
759185
759810
|
init_policyLimits();
|
|
759186
|
-
|
|
759811
|
+
init_prompt3();
|
|
759187
759812
|
init_config();
|
|
759188
759813
|
init_envUtils();
|
|
759189
759814
|
init_memoryFileDetection();
|
|
@@ -766368,7 +766993,7 @@ var exports_REPL = {};
|
|
|
766368
766993
|
__export(exports_REPL, {
|
|
766369
766994
|
REPL: () => REPL
|
|
766370
766995
|
});
|
|
766371
|
-
import { dirname as
|
|
766996
|
+
import { dirname as dirname89, join as join241 } from "path";
|
|
766372
766997
|
import { tmpdir as tmpdir20 } from "os";
|
|
766373
766998
|
import { writeFile as writeFile47 } from "fs/promises";
|
|
766374
766999
|
import { randomUUID as randomUUID83 } from "crypto";
|
|
@@ -767308,7 +767933,7 @@ function REPL({
|
|
|
767308
767933
|
const targetSessionCosts = getStoredSessionCosts(sessionId);
|
|
767309
767934
|
saveCurrentSessionCosts();
|
|
767310
767935
|
resetCostState();
|
|
767311
|
-
switchSession(asSessionId(sessionId), log2.fullPath ?
|
|
767936
|
+
switchSession(asSessionId(sessionId), log2.fullPath ? dirname89(log2.fullPath) : null);
|
|
767312
767937
|
const {
|
|
767313
767938
|
renameRecordingForSession: renameRecordingForSession2
|
|
767314
767939
|
} = await Promise.resolve().then(() => (init_asciicast(), exports_asciicast));
|
|
@@ -769800,7 +770425,7 @@ var init_REPL = __esm(() => {
|
|
|
769800
770425
|
init_ExitPlanModePermissionRequest();
|
|
769801
770426
|
init_permissionSetup();
|
|
769802
770427
|
init_filesystem();
|
|
769803
|
-
|
|
770428
|
+
init_prompt9();
|
|
769804
770429
|
init_bashPermissions();
|
|
769805
770430
|
init_config();
|
|
769806
770431
|
init_billing();
|
|
@@ -771003,7 +771628,7 @@ function WelcomeV2() {
|
|
|
771003
771628
|
dimColor: true,
|
|
771004
771629
|
children: [
|
|
771005
771630
|
"v",
|
|
771006
|
-
"1.65.
|
|
771631
|
+
"1.65.13"
|
|
771007
771632
|
]
|
|
771008
771633
|
}, undefined, true, undefined, this)
|
|
771009
771634
|
]
|
|
@@ -772263,7 +772888,7 @@ function completeOnboarding() {
|
|
|
772263
772888
|
saveGlobalConfig((current) => ({
|
|
772264
772889
|
...current,
|
|
772265
772890
|
hasCompletedOnboarding: true,
|
|
772266
|
-
lastOnboardingVersion: "1.65.
|
|
772891
|
+
lastOnboardingVersion: "1.65.13"
|
|
772267
772892
|
}));
|
|
772268
772893
|
}
|
|
772269
772894
|
function showDialog(root2, renderer) {
|
|
@@ -773407,7 +774032,7 @@ var exports_ResumeConversation = {};
|
|
|
773407
774032
|
__export(exports_ResumeConversation, {
|
|
773408
774033
|
ResumeConversation: () => ResumeConversation
|
|
773409
774034
|
});
|
|
773410
|
-
import { dirname as
|
|
774035
|
+
import { dirname as dirname90 } from "path";
|
|
773411
774036
|
function parsePrIdentifier(value2) {
|
|
773412
774037
|
const directNumber = parseInt(value2, 10);
|
|
773413
774038
|
if (!isNaN(directNumber) && directNumber > 0) {
|
|
@@ -773539,7 +774164,7 @@ function ResumeConversation({
|
|
|
773539
774164
|
}
|
|
773540
774165
|
if (false) {}
|
|
773541
774166
|
if (result_3.sessionId && !forkSession) {
|
|
773542
|
-
switchSession(asSessionId(result_3.sessionId), log_0.fullPath ?
|
|
774167
|
+
switchSession(asSessionId(result_3.sessionId), log_0.fullPath ? dirname90(log_0.fullPath) : null);
|
|
773543
774168
|
await renameRecordingForSession();
|
|
773544
774169
|
await resetSessionFilePointer();
|
|
773545
774170
|
restoreCostStateForSession(result_3.sessionId);
|
|
@@ -774104,7 +774729,7 @@ Examples:
|
|
|
774104
774729
|
/batch add type annotations to untyped functions`;
|
|
774105
774730
|
var init_batch = __esm(() => {
|
|
774106
774731
|
init_constants2();
|
|
774107
|
-
|
|
774732
|
+
init_prompt();
|
|
774108
774733
|
init_git();
|
|
774109
774734
|
init_bundledSkills();
|
|
774110
774735
|
WORKER_INSTRUCTIONS = `After implementing the assigned unit:
|
|
@@ -776649,7 +777274,7 @@ async function logSkillsLoaded(cwd2, contextWindowTokens) {
|
|
|
776649
777274
|
var init_skillLoadedEvent = __esm(() => {
|
|
776650
777275
|
init_commands3();
|
|
776651
777276
|
init_analytics();
|
|
776652
|
-
|
|
777277
|
+
init_prompt7();
|
|
776653
777278
|
});
|
|
776654
777279
|
|
|
776655
777280
|
// src/cli/exit.ts
|
|
@@ -777258,7 +777883,7 @@ var init_createDirectConnectSession = __esm(() => {
|
|
|
777258
777883
|
});
|
|
777259
777884
|
|
|
777260
777885
|
// src/utils/errorLogSink.ts
|
|
777261
|
-
import { dirname as
|
|
777886
|
+
import { dirname as dirname91, join as join242 } from "path";
|
|
777262
777887
|
function getErrorsPath() {
|
|
777263
777888
|
return join242(CACHE_PATHS.errors(), DATE + ".jsonl");
|
|
777264
777889
|
}
|
|
@@ -777279,7 +777904,7 @@ function createJsonlWriter(options4) {
|
|
|
777279
777904
|
function getLogWriter(path24) {
|
|
777280
777905
|
let writer = logWriters.get(path24);
|
|
777281
777906
|
if (!writer) {
|
|
777282
|
-
const dir =
|
|
777907
|
+
const dir = dirname91(path24);
|
|
777283
777908
|
writer = createJsonlWriter({
|
|
777284
777909
|
writeFn: (content) => {
|
|
777285
777910
|
try {
|
|
@@ -777307,7 +777932,7 @@ function appendToLog(path24, message) {
|
|
|
777307
777932
|
cwd: getFsImplementation().cwd(),
|
|
777308
777933
|
userType: process.env.USER_TYPE,
|
|
777309
777934
|
sessionId: getSessionId(),
|
|
777310
|
-
version: "1.65.
|
|
777935
|
+
version: "1.65.13"
|
|
777311
777936
|
};
|
|
777312
777937
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
777313
777938
|
}
|
|
@@ -780191,10 +780816,10 @@ var init_remoteIO = __esm(() => {
|
|
|
780191
780816
|
// src/utils/streamlinedTransform.ts
|
|
780192
780817
|
var COMMAND_TOOLS;
|
|
780193
780818
|
var init_streamlinedTransform = __esm(() => {
|
|
780194
|
-
init_prompt2();
|
|
780195
780819
|
init_prompt3();
|
|
780196
|
-
|
|
780197
|
-
|
|
780820
|
+
init_prompt4();
|
|
780821
|
+
init_prompt2();
|
|
780822
|
+
init_prompt6();
|
|
780198
780823
|
init_messages();
|
|
780199
780824
|
init_shellToolUtils();
|
|
780200
780825
|
init_stringUtils();
|
|
@@ -781471,8 +782096,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
781471
782096
|
}
|
|
781472
782097
|
async function checkEnvLessBridgeMinVersion() {
|
|
781473
782098
|
const cfg = await getEnvLessBridgeConfig();
|
|
781474
|
-
if (cfg.min_version && lt("1.65.
|
|
781475
|
-
return `Your version of UR (${"1.65.
|
|
782099
|
+
if (cfg.min_version && lt("1.65.13", cfg.min_version)) {
|
|
782100
|
+
return `Your version of UR (${"1.65.13"}) is too old for Remote Control.
|
|
781476
782101
|
Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
|
|
781477
782102
|
}
|
|
781478
782103
|
return null;
|
|
@@ -781800,14 +782425,14 @@ __export(exports_bridgePointer, {
|
|
|
781800
782425
|
BRIDGE_POINTER_TTL_MS: () => BRIDGE_POINTER_TTL_MS
|
|
781801
782426
|
});
|
|
781802
782427
|
import { mkdir as mkdir47, readFile as readFile57, stat as stat51, unlink as unlink27, writeFile as writeFile50 } from "fs/promises";
|
|
781803
|
-
import { dirname as
|
|
782428
|
+
import { dirname as dirname92, join as join247 } from "path";
|
|
781804
782429
|
function getBridgePointerPath(dir) {
|
|
781805
782430
|
return join247(getProjectsDir(), sanitizePath2(dir), "bridge-pointer.json");
|
|
781806
782431
|
}
|
|
781807
782432
|
async function writeBridgePointer(dir, pointer) {
|
|
781808
782433
|
const path24 = getBridgePointerPath(dir);
|
|
781809
782434
|
try {
|
|
781810
|
-
await mkdir47(
|
|
782435
|
+
await mkdir47(dirname92(path24), { recursive: true });
|
|
781811
782436
|
await writeFile50(path24, jsonStringify(pointer), "utf8");
|
|
781812
782437
|
logForDebugging(`[bridge:pointer] wrote ${path24}`);
|
|
781813
782438
|
} catch (err2) {
|
|
@@ -781946,7 +782571,7 @@ async function initBridgeCore(params) {
|
|
|
781946
782571
|
const rawApi = createBridgeApiClient({
|
|
781947
782572
|
baseUrl,
|
|
781948
782573
|
getAccessToken,
|
|
781949
|
-
runnerVersion: "1.65.
|
|
782574
|
+
runnerVersion: "1.65.13",
|
|
781950
782575
|
onDebug: logForDebugging,
|
|
781951
782576
|
onAuth401,
|
|
781952
782577
|
getTrustedDeviceToken
|
|
@@ -783811,7 +784436,7 @@ __export(exports_print, {
|
|
|
783811
784436
|
canBatchWith: () => canBatchWith
|
|
783812
784437
|
});
|
|
783813
784438
|
import { readFile as readFile58, stat as stat52, writeFile as writeFile51 } from "fs/promises";
|
|
783814
|
-
import { dirname as
|
|
784439
|
+
import { dirname as dirname93 } from "path";
|
|
783815
784440
|
import { cwd as cwd2 } from "process";
|
|
783816
784441
|
import { randomUUID as randomUUID89 } from "crypto";
|
|
783817
784442
|
function trackReceivedMessageUuid(uuid3) {
|
|
@@ -786268,7 +786893,7 @@ async function loadInitialMessages(setAppState, options4) {
|
|
|
786268
786893
|
if (false) {}
|
|
786269
786894
|
if (!options4.forkSession) {
|
|
786270
786895
|
if (result.sessionId) {
|
|
786271
|
-
switchSession(asSessionId(result.sessionId), result.fullPath ?
|
|
786896
|
+
switchSession(asSessionId(result.sessionId), result.fullPath ? dirname93(result.fullPath) : null);
|
|
786272
786897
|
if (persistSession) {
|
|
786273
786898
|
await resetSessionFilePointer();
|
|
786274
786899
|
}
|
|
@@ -786366,7 +786991,7 @@ async function loadInitialMessages(setAppState, options4) {
|
|
|
786366
786991
|
}
|
|
786367
786992
|
if (false) {}
|
|
786368
786993
|
if (!options4.forkSession && result.sessionId) {
|
|
786369
|
-
switchSession(asSessionId(result.sessionId), result.fullPath ?
|
|
786994
|
+
switchSession(asSessionId(result.sessionId), result.fullPath ? dirname93(result.fullPath) : null);
|
|
786370
786995
|
if (persistSession) {
|
|
786371
786996
|
await resetSessionFilePointer();
|
|
786372
786997
|
}
|
|
@@ -791419,7 +792044,7 @@ function getAgUiCapabilities() {
|
|
|
791419
792044
|
name: "UR-Nexus",
|
|
791420
792045
|
type: "ur-nexus",
|
|
791421
792046
|
description: "Provider-flexible, local-first autonomous engineering workflow agent.",
|
|
791422
|
-
version: "1.65.
|
|
792047
|
+
version: "1.65.13",
|
|
791423
792048
|
provider: "UR",
|
|
791424
792049
|
documentationUrl: "https://github.com/Maitham16/UR/blob/master/docs/AG_UI.md"
|
|
791425
792050
|
},
|
|
@@ -792559,7 +793184,7 @@ function createMCPServer(cwd4, debug2, verbose) {
|
|
|
792559
793184
|
};
|
|
792560
793185
|
const server2 = new Server({
|
|
792561
793186
|
name: "ur-nexus",
|
|
792562
|
-
version: "1.65.
|
|
793187
|
+
version: "1.65.13"
|
|
792563
793188
|
}, {
|
|
792564
793189
|
capabilities: {
|
|
792565
793190
|
tools: {}
|
|
@@ -793717,7 +794342,7 @@ function thrownResponse(error40) {
|
|
|
793717
794342
|
}
|
|
793718
794343
|
async function createUrMcp2026Runtime(options4) {
|
|
793719
794344
|
const server2 = createMCPServer(options4.cwd, options4.debug === true, options4.verbose === true);
|
|
793720
|
-
const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.65.
|
|
794345
|
+
const client2 = new Client({ name: "ur-mcp-2026-adapter", version: "1.65.13" }, { capabilities: {} });
|
|
793721
794346
|
const [clientTransport, serverTransport] = createLinkedTransportPair();
|
|
793722
794347
|
try {
|
|
793723
794348
|
await server2.connect(serverTransport);
|
|
@@ -793728,7 +794353,7 @@ async function createUrMcp2026Runtime(options4) {
|
|
|
793728
794353
|
}
|
|
793729
794354
|
const runtime2 = new Mcp2026Runtime({
|
|
793730
794355
|
cwd: options4.cwd,
|
|
793731
|
-
version: "1.65.
|
|
794356
|
+
version: "1.65.13",
|
|
793732
794357
|
backend: {
|
|
793733
794358
|
listTools: async () => {
|
|
793734
794359
|
const listed = await client2.listTools();
|
|
@@ -794691,7 +795316,7 @@ __export(exports_plugins, {
|
|
|
794691
795316
|
VALID_UPDATE_SCOPES: () => VALID_UPDATE_SCOPES,
|
|
794692
795317
|
VALID_INSTALLABLE_SCOPES: () => VALID_INSTALLABLE_SCOPES
|
|
794693
795318
|
});
|
|
794694
|
-
import { basename as basename69, dirname as
|
|
795319
|
+
import { basename as basename69, dirname as dirname95, join as join251, resolve as resolve76 } from "path";
|
|
794695
795320
|
function handleMarketplaceError(error40, action3) {
|
|
794696
795321
|
logError2(error40);
|
|
794697
795322
|
cliError(`${figures_default.cross} Failed to ${action3}: ${errorMessage2(error40)}`);
|
|
@@ -794744,9 +795369,9 @@ async function pluginValidateHandler(manifestPath6, options4) {
|
|
|
794744
795369
|
printValidationResult(result);
|
|
794745
795370
|
let contentResults = [];
|
|
794746
795371
|
if (result.fileType === "plugin") {
|
|
794747
|
-
const manifestDir =
|
|
795372
|
+
const manifestDir = dirname95(result.filePath);
|
|
794748
795373
|
if (basename69(manifestDir) === ".ur-plugin") {
|
|
794749
|
-
contentResults = await validatePluginContents(
|
|
795374
|
+
contentResults = await validatePluginContents(dirname95(manifestDir));
|
|
794750
795375
|
for (const r of contentResults) {
|
|
794751
795376
|
console.log(`Validating ${r.fileType}: ${r.filePath}
|
|
794752
795377
|
`);
|
|
@@ -795861,7 +796486,7 @@ async function update() {
|
|
|
795861
796486
|
logEvent("tengu_update_check", {});
|
|
795862
796487
|
const diagnostic2 = await getDoctorDiagnostic();
|
|
795863
796488
|
const result = await checkUpgradeStatus({
|
|
795864
|
-
currentVersion: "1.65.
|
|
796489
|
+
currentVersion: "1.65.13",
|
|
795865
796490
|
packageName: UR_AGENT_PACKAGE_NAME,
|
|
795866
796491
|
installationType: diagnostic2.installationType,
|
|
795867
796492
|
latestVersion: () => getLatestNpmPackageVersion(UR_AGENT_PACKAGE_NAME)
|
|
@@ -797177,7 +797802,7 @@ ${customInstructions}` : customInstructions;
|
|
|
797177
797802
|
}
|
|
797178
797803
|
}
|
|
797179
797804
|
logForDiagnosticsNoPII("info", "started", {
|
|
797180
|
-
version: "1.65.
|
|
797805
|
+
version: "1.65.13",
|
|
797181
797806
|
is_native_binary: isInBundledMode()
|
|
797182
797807
|
});
|
|
797183
797808
|
registerCleanup(async () => {
|
|
@@ -797963,7 +798588,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
797963
798588
|
pendingHookMessages
|
|
797964
798589
|
}, renderAndRun);
|
|
797965
798590
|
}
|
|
797966
|
-
}).version("1.65.
|
|
798591
|
+
}).version("1.65.13 (UR-Nexus)", "-v, --version", "Output the version number");
|
|
797967
798592
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
797968
798593
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
797969
798594
|
if (canUserConfigureAdvisor()) {
|
|
@@ -799022,7 +799647,7 @@ if (false) {}
|
|
|
799022
799647
|
async function main2() {
|
|
799023
799648
|
const args = process.argv.slice(2);
|
|
799024
799649
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
799025
|
-
console.log(`${"1.65.
|
|
799650
|
+
console.log(`${"1.65.13"} (UR-Nexus)`);
|
|
799026
799651
|
return;
|
|
799027
799652
|
}
|
|
799028
799653
|
if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {
|