scream-code 0.5.5 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/main.mjs +362 -151
- package/package.json +24 -24
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 尖叫Tod
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/main.mjs
CHANGED
|
@@ -33,10 +33,10 @@ import * as posixPath from "node:path/posix";
|
|
|
33
33
|
import * as win32Path from "node:path/win32";
|
|
34
34
|
import { createServer } from "node:http";
|
|
35
35
|
import * as z$1 from "zod/v4";
|
|
36
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
36
37
|
import { parse as parse$1, stringify } from "smol-toml";
|
|
37
38
|
import "zod/v3";
|
|
38
39
|
import * as z4mini from "zod/v4-mini";
|
|
39
|
-
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
40
40
|
import process$1 from "node:process";
|
|
41
41
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
42
42
|
import { Command, Option } from "commander";
|
|
@@ -50331,7 +50331,7 @@ function redactCtx(ctx) {
|
|
|
50331
50331
|
};
|
|
50332
50332
|
return walk(ctx, 0);
|
|
50333
50333
|
}
|
|
50334
|
-
function truncate$
|
|
50334
|
+
function truncate$3(value, max) {
|
|
50335
50335
|
return value.length <= max ? value : value.slice(0, max - 1) + ELLIPSIS$6;
|
|
50336
50336
|
}
|
|
50337
50337
|
function serializeValue(raw) {
|
|
@@ -50355,7 +50355,7 @@ function quote(value) {
|
|
|
50355
50355
|
return `"${value.replaceAll("\\", "\\\\").replaceAll("\"", "\\\"").replaceAll("\n", "\\n")}"`;
|
|
50356
50356
|
}
|
|
50357
50357
|
function formatPair(key, raw) {
|
|
50358
|
-
const limited = truncate$
|
|
50358
|
+
const limited = truncate$3(serializeValue(raw), CTX_VALUE_MAX_CHARS);
|
|
50359
50359
|
return `${SAFE_KEY_RE.test(key) ? key : quote(key)}=${/[\s="\\]/.test(limited) || limited.length === 0 ? quote(limited) : limited}`;
|
|
50360
50360
|
}
|
|
50361
50361
|
function clipBytes(text, maxBytes) {
|
|
@@ -50379,7 +50379,7 @@ function indentStack(stack) {
|
|
|
50379
50379
|
function formatEntry(entry, options = {}) {
|
|
50380
50380
|
const ctx = entry.ctx ? redactCtx(entry.ctx) : void 0;
|
|
50381
50381
|
const omitContextKeys = new Set(options.omitContextKeys ?? []);
|
|
50382
|
-
const msg = truncate$
|
|
50382
|
+
const msg = truncate$3(entry.msg, 200);
|
|
50383
50383
|
const pairs = [];
|
|
50384
50384
|
if (ctx) for (const [k, v] of Object.entries(ctx)) {
|
|
50385
50385
|
if (omitContextKeys.has(k)) continue;
|
|
@@ -60353,7 +60353,7 @@ var SkillRegistry = class {
|
|
|
60353
60353
|
this.indexPluginSkill(skill);
|
|
60354
60354
|
}
|
|
60355
60355
|
});
|
|
60356
|
-
for (const skill of skills) this.
|
|
60356
|
+
for (const skill of skills) this.register(skill);
|
|
60357
60357
|
}
|
|
60358
60358
|
registerBuiltinSkill(skill) {
|
|
60359
60359
|
this.register(skill.source === "builtin" ? skill : {
|
|
@@ -60362,9 +60362,20 @@ var SkillRegistry = class {
|
|
|
60362
60362
|
});
|
|
60363
60363
|
}
|
|
60364
60364
|
register(skill, options = {}) {
|
|
60365
|
-
const
|
|
60366
|
-
|
|
60365
|
+
const pluginId = skill.plugin?.id;
|
|
60366
|
+
const resolved = resolveUniqueSkillName(skill, this.byName, pluginId);
|
|
60367
|
+
if (resolved.shadowed) {
|
|
60368
|
+
this.onWarning(`Skill "${skill.name}" from ${skill.source}${pluginId !== void 0 ? ` (plugin "${pluginId}")` : ""} is shadowed by an existing skill with the same name.`);
|
|
60369
|
+
return;
|
|
60370
|
+
}
|
|
60371
|
+
const normalizedSkill = resolved.name === skill.name ? skill : {
|
|
60372
|
+
...skill,
|
|
60373
|
+
name: resolved.name
|
|
60374
|
+
};
|
|
60375
|
+
const key = normalizeSkillName(resolved.name);
|
|
60376
|
+
if (options.replace === true || !this.byName.has(key)) this.byName.set(key, normalizedSkill);
|
|
60367
60377
|
this.indexPluginSkill(skill, options);
|
|
60378
|
+
if (resolved.renamed) this.onWarning(`Skill "${skill.name}" from plugin "${pluginId}" was renamed to "${resolved.name}" because a skill with the same name is already registered.`);
|
|
60368
60379
|
}
|
|
60369
60380
|
getSkill(name) {
|
|
60370
60381
|
return this.byName.get(normalizeSkillName(name));
|
|
@@ -60416,6 +60427,46 @@ var SkillRegistry = class {
|
|
|
60416
60427
|
function pluginSkillKey(pluginId, skillName) {
|
|
60417
60428
|
return `${pluginId}\0${normalizeSkillName(skillName)}`;
|
|
60418
60429
|
}
|
|
60430
|
+
/**
|
|
60431
|
+
* Resolve a unique skill name when registering across multiple sources.
|
|
60432
|
+
*
|
|
60433
|
+
* Non-plugin skills are never renamed; if their name collides with an existing
|
|
60434
|
+
* skill they are considered shadowed and should be reported to the caller.
|
|
60435
|
+
* Plugin skills get a "plugin-id:skill-name" prefix on collision so users can
|
|
60436
|
+
* still invoke them and distinguish them in listings. If even the prefixed
|
|
60437
|
+
* form collides, a numeric suffix is appended.
|
|
60438
|
+
*/
|
|
60439
|
+
function resolveUniqueSkillName(skill, byName, pluginId) {
|
|
60440
|
+
const originalKey = normalizeSkillName(skill.name);
|
|
60441
|
+
if (!byName.has(originalKey)) return {
|
|
60442
|
+
name: skill.name,
|
|
60443
|
+
renamed: false,
|
|
60444
|
+
shadowed: false
|
|
60445
|
+
};
|
|
60446
|
+
if (pluginId === void 0) return {
|
|
60447
|
+
name: skill.name,
|
|
60448
|
+
renamed: false,
|
|
60449
|
+
shadowed: true
|
|
60450
|
+
};
|
|
60451
|
+
const prefixed = `${pluginId}:${skill.name}`;
|
|
60452
|
+
const prefixedKey = normalizeSkillName(prefixed);
|
|
60453
|
+
if (!byName.has(prefixedKey)) return {
|
|
60454
|
+
name: prefixed,
|
|
60455
|
+
renamed: true,
|
|
60456
|
+
shadowed: false
|
|
60457
|
+
};
|
|
60458
|
+
let index = 2;
|
|
60459
|
+
while (true) {
|
|
60460
|
+
const candidate = `${pluginId}:${skill.name}-${String(index)}`;
|
|
60461
|
+
const candidateKey = normalizeSkillName(candidate);
|
|
60462
|
+
if (!byName.has(candidateKey)) return {
|
|
60463
|
+
name: candidate,
|
|
60464
|
+
renamed: true,
|
|
60465
|
+
shadowed: false
|
|
60466
|
+
};
|
|
60467
|
+
index++;
|
|
60468
|
+
}
|
|
60469
|
+
}
|
|
60419
60470
|
const SOURCE_GROUPS = [
|
|
60420
60471
|
{
|
|
60421
60472
|
source: "project",
|
|
@@ -60452,12 +60503,12 @@ function formatFullSkill(skill) {
|
|
|
60452
60503
|
];
|
|
60453
60504
|
}
|
|
60454
60505
|
function formatModelSkill(skill) {
|
|
60455
|
-
const lines = [`- ${skill.name}: ${truncate$
|
|
60506
|
+
const lines = [`- ${skill.name}: ${truncate$2(skill.description, LISTING_DESC_MAX)}`];
|
|
60456
60507
|
if (typeof skill.metadata.whenToUse === "string" && skill.metadata.whenToUse.length > 0) lines.push(` When to use: ${skill.metadata.whenToUse}`);
|
|
60457
60508
|
lines.push(` Path: ${skill.path}`);
|
|
60458
60509
|
return lines;
|
|
60459
60510
|
}
|
|
60460
|
-
function truncate$
|
|
60511
|
+
function truncate$2(value, max) {
|
|
60461
60512
|
return value.length > max ? value.slice(0, max) : value;
|
|
60462
60513
|
}
|
|
60463
60514
|
function escapeAttr$1(value) {
|
|
@@ -90398,6 +90449,88 @@ function errorResult(serverName, error, authorizationUrl) {
|
|
|
90398
90449
|
};
|
|
90399
90450
|
}
|
|
90400
90451
|
//#endregion
|
|
90452
|
+
//#region ../../packages/agent-core/src/version.ts
|
|
90453
|
+
function getCoreVersion() {
|
|
90454
|
+
try {
|
|
90455
|
+
const raw = readFileSync(fileURLToPath(new URL("../package.json", import.meta.url)), "utf-8");
|
|
90456
|
+
const pkg = JSON.parse(raw);
|
|
90457
|
+
return typeof pkg.version === "string" ? pkg.version : "0.0.0";
|
|
90458
|
+
} catch {
|
|
90459
|
+
return "0.0.0";
|
|
90460
|
+
}
|
|
90461
|
+
}
|
|
90462
|
+
const SCREAM_MCP_CLIENT_VERSION = getCoreVersion();
|
|
90463
|
+
/**
|
|
90464
|
+
* Build the `RequestOptions` object accepted by the MCP SDK's `callTool`,
|
|
90465
|
+
* including either the configured tool-call timeout, an in-flight abort
|
|
90466
|
+
* signal, both, or neither. Returns `undefined` when nothing needs to be
|
|
90467
|
+
* passed so the SDK falls back to its defaults.
|
|
90468
|
+
*/
|
|
90469
|
+
function buildRequestOptions(toolCallTimeoutMs, signal) {
|
|
90470
|
+
if (toolCallTimeoutMs === void 0 && signal === void 0) return void 0;
|
|
90471
|
+
return {
|
|
90472
|
+
timeout: toolCallTimeoutMs,
|
|
90473
|
+
signal
|
|
90474
|
+
};
|
|
90475
|
+
}
|
|
90476
|
+
function toMcpToolDefinition(tool) {
|
|
90477
|
+
return {
|
|
90478
|
+
name: tool.name,
|
|
90479
|
+
description: tool.description ?? "",
|
|
90480
|
+
inputSchema: tool.inputSchema
|
|
90481
|
+
};
|
|
90482
|
+
}
|
|
90483
|
+
/**
|
|
90484
|
+
* Normalise the SDK's `callTool` return into ltod's {@link MCPToolResult}.
|
|
90485
|
+
* The SDK can return either the modern `{ content, isError }` shape or a
|
|
90486
|
+
* legacy `{ toolResult }` shape; we collapse the legacy shape to a single
|
|
90487
|
+
* text content block.
|
|
90488
|
+
*/
|
|
90489
|
+
function toMcpToolResult(result) {
|
|
90490
|
+
if (typeof result === "object" && result !== null && "content" in result) {
|
|
90491
|
+
const typed = result;
|
|
90492
|
+
if (Array.isArray(typed.content)) return {
|
|
90493
|
+
content: typed.content,
|
|
90494
|
+
isError: typed.isError === true
|
|
90495
|
+
};
|
|
90496
|
+
}
|
|
90497
|
+
if (typeof result === "object" && result !== null && "toolResult" in result) {
|
|
90498
|
+
const legacy = result.toolResult;
|
|
90499
|
+
return {
|
|
90500
|
+
content: [{
|
|
90501
|
+
type: "text",
|
|
90502
|
+
text: typeof legacy === "string" ? legacy : JSON.stringify(legacy)
|
|
90503
|
+
}],
|
|
90504
|
+
isError: false
|
|
90505
|
+
};
|
|
90506
|
+
}
|
|
90507
|
+
return {
|
|
90508
|
+
content: [],
|
|
90509
|
+
isError: false
|
|
90510
|
+
};
|
|
90511
|
+
}
|
|
90512
|
+
/**
|
|
90513
|
+
* Returns true when an MCP tool-call failure looks like a dead transport rather
|
|
90514
|
+
* than an application-level error. These are the cases where tearing down and
|
|
90515
|
+
* reconnecting the server is likely to help.
|
|
90516
|
+
*/
|
|
90517
|
+
function isRetriableMcpCallError(error) {
|
|
90518
|
+
if (!(error instanceof Error)) return false;
|
|
90519
|
+
const message = error.message.toLowerCase();
|
|
90520
|
+
return [
|
|
90521
|
+
/\be?connrefused\b/,
|
|
90522
|
+
/\be?connreset\b/,
|
|
90523
|
+
/\bepipe\b/,
|
|
90524
|
+
/\be?netunreach\b/,
|
|
90525
|
+
/\be?hostunreach\b/,
|
|
90526
|
+
/fetch failed/,
|
|
90527
|
+
/transport not connected/,
|
|
90528
|
+
/transport closed/,
|
|
90529
|
+
/network error/,
|
|
90530
|
+
/maximum reconnection attempts/
|
|
90531
|
+
].some((pattern) => pattern.test(message));
|
|
90532
|
+
}
|
|
90533
|
+
//#endregion
|
|
90401
90534
|
//#region ../../packages/agent-core/src/mcp/output.ts
|
|
90402
90535
|
const MCP_MAX_OUTPUT_CHARS = 1e5;
|
|
90403
90536
|
const MCP_OUTPUT_TRUNCATED_TEXT = `\n\n[Output truncated: exceeded ${String(MCP_MAX_OUTPUT_CHARS)} character limit. Use pagination or more specific queries to get remaining content.]`;
|
|
@@ -90911,7 +91044,7 @@ const PROFILE_SOURCES = {
|
|
|
90911
91044
|
"profile/default/coder.yaml": coder_default,
|
|
90912
91045
|
"profile/default/explore.yaml": explore_default,
|
|
90913
91046
|
"profile/default/plan.yaml": "extends: agent\nname: plan\npromptVars:\n roleAdditional: |\n You are now running as a subagent. All the `user` messages are sent by the main agent. The main agent cannot see your context, it can only see your last message when you finish the task. You must treat the parent agent as your caller. Do not directly ask the end user questions. If something is unclear, explain the ambiguity in your final summary to the parent agent.\n\n Before designing your implementation plan, consider whether you fully understand the codebase areas relevant to the task. If not, recommend the parent agent to use the explore agent (subagent_type=\"explore\") to investigate key questions first. In your response, clearly state:\n 1. What you already know from the information provided\n 2. What questions remain unanswered that would benefit from explore agent investigation\n 3. Your implementation plan (either preliminary if questions remain, or final if sufficient context exists)\nwhenToUse: |\n Use this agent when the parent agent needs a step-by-step implementation plan, key file identification, and architectural trade-off analysis before code changes are made.\ntools:\n - Read\n - ReadMediaFile\n - Glob\n - Grep\n - WebSearch\n - FetchURL\n",
|
|
90914
|
-
"profile/default/system.md": "You are Scream Code CLI, an interactive general AI agent running on a user's computer.\n\nYour primary goal is to help users with software engineering tasks by taking action — use the tools available to you to make real changes on the user's system. You should also answer questions when asked. Always adhere strictly to the following system instructions and the user's requirements.\n\n{{ ROLE_ADDITIONAL }}\n\n# Prompt and Tool Use\n\nThe user's messages may contain questions and/or task descriptions in natural language, code snippets, logs, file paths, or other forms of information. Read them, understand them and do what the user requested. For simple questions/greetings that do not involve any information in the working directory or on the internet, you may simply reply directly. For anything else, default to taking action with tools. When the request could be interpreted as either a question to answer or a task to complete, treat it as a task.\n\nWhen handling the user's request, if it involves creating, modifying, or running code or files, you MUST use the appropriate tools (e.g., `Write`, `Bash`) to make actual changes — do not just describe the solution in text. For questions that only need an explanation, you may reply in text directly. When calling tools, do not provide explanations because the tool calls themselves should be self-explanatory. You MUST follow the description of each tool and its parameters when calling tools.\n\nIf the `Agent` tool is available, you can use it to delegate a focused subtask to a subagent instance. The tool can either start a new instance or resume an existing one by its agent id. Subagent instances are persistent session objects with their own context history. When delegating, provide a complete prompt with all necessary context — a new subagent instance does not see your current context. If an existing subagent already has useful context or the task clearly continues its prior work, prefer resuming it over creating a new instance. Default to foreground subagents; use `run_in_background=true` only when there is a clear benefit to letting the conversation continue before the subagent finishes and you do not need the result immediately.\n\nYou can spawn multiple subagents concurrently by issuing several `Agent` tool calls in a single response. The system executes all tool calls in parallel automatically. Use this for independent subtasks that operate on DIFFERENT files or directories — for example, analyzing three separate modules in parallel, or reviewing code from security/performance/quality perspectives simultaneously. Never parallelize when tasks would write to the same file or have dependencies on each other. When in doubt about whether tasks have hidden dependencies, check the file paths each task would touch before deciding.\n\nYou have the capability to output any number of tool calls in a single response. If you anticipate making multiple non-interfering tool calls, you are HIGHLY RECOMMENDED to make them in parallel to significantly improve efficiency. This is very important to your performance.\n\nThe results of the tool calls will be returned to you in a tool message. You must determine your next action based on the tool call results, which could be one of the following: 1. Continue working on the task, 2. Inform the user that the task is completed or has failed, or 3. Ask the user for more information.\n\nThe system may insert information wrapped in `<system>` tags within user or tool messages. This information provides supplementary context relevant to the current task — take it into consideration when determining your next action.\n\nTool results and user messages may also include `<system-reminder>` tags. Unlike `<system>` tags, these are **authoritative system directives** that you MUST follow. They bear no direct relation to the specific tool results or user messages in which they appear. Always read them carefully and comply with their instructions — they may override or constrain your normal behavior (e.g., restricting you to read-only actions during plan mode).\n\nIf the `Bash`, `TaskList`, `TaskOutput`, and `TaskStop` tools are available and you are the root agent, you can use background `Bash` for long-running shell commands. Launch it via `Bash` with `run_in_background=true` and a short `description`. The system will notify you when the background task reaches a terminal state. Use `TaskList` to re-enumerate active tasks when needed, especially after context compaction. Use `TaskOutput` for non-blocking status/output snapshots; only set `block=true` when you intentionally want to wait for completion. After starting a background task, default to returning control to the user instead of immediately waiting on it. Use `TaskStop` only when you need to cancel the task. For human users in the interactive shell, the only task-management slash command is `/tasks`. Do not tell users to run `/task`, `/tasks list`, `/tasks output`, `/tasks stop`, or any other invented slash subcommands. If you are a subagent or these tools are not available, do not assume you can create or control background tasks.\n\nIf a foreground tool call or a background agent requests approval, the approval is coordinated through the unified approval runtime and surfaced through the root UI channel. Do not assume approvals are local to a single subagent turn.\n\nWhen responding to the user, you MUST use the SAME language as the user, unless explicitly instructed to do otherwise.\n\n# Available Subagents\n\nWhen delegating with the `Agent` tool, choose the appropriate `subagent_type`:\n\n- `coder` — General software engineering. Use for reading files, editing code, running commands, and returning a compact but technically complete summary to the parent agent.\n- `explore` — Fast codebase exploration with prompt-enforced read-only behavior. Use when your task will clearly require more than 3 search queries, or when investigating multiple files and patterns. Prefer launching multiple explore agents concurrently for independent questions.\n- `plan` — Read-only implementation planning and architecture design. Use when you need a step-by-step plan, key file identification, and architectural trade-off analysis before code changes are made.\n- `verify` — Verification specialist. Runs build, test, and lint commands. Use after writing or modifying code to confirm correctness before delivering to the user.\n- `writer` — Content production and research specialist. Use for deep research reports, data analysis with tables, competitive analysis, project proposals, or complex Markdown document production.\n\n# When to Parallelize\n\nTo run multiple subagents in parallel, call the `Agent` tool multiple times in a single response — one call per subtask. All calls execute concurrently.\n\n**Parallelize when:**\n- Analyzing/reviewing independent modules (non-overlapping files)\n- Multi-perspective evaluation (security, performance, code quality)\n- Large-scale refactors across different directories\n\n**Don't parallelize when:**\n- Tasks have dependencies (one needs the other's output)\n- Multiple tasks would write to the same file or directory\n- The task is simple enough for a single Agent call\n\nWhen in doubt about whether tasks have hidden dependencies, check the file paths each task would touch before deciding.\n\n# General Guidelines for Coding\n\nWhen building something from scratch, you should:\n\n- Understand the user's requirements.\n- Ask the user for clarification if there is anything unclear.\n- Design the architecture and make a plan for the implementation.\n- Write the code in a modular and maintainable way.\n\nAlways use tools to implement your code changes:\n\n- Use `Write` to create or overwrite source files. Code that only appears in your text response is NOT saved to the file system and will not take effect.\n- Use `Bash` to run and test your code after writing it.\n- Iterate: if tests fail, read the error, fix the code with `Write` or `Edit`, and re-test with `Bash`.\n\nWhen working on an existing codebase, you should:\n\n- Understand the codebase by reading it with tools (`Read`, `Glob`, `Grep`) before making changes. Identify the ultimate goal and the most important criteria to achieve the goal.\n- When using `Glob`, include a literal anchor (file extension or subdirectory) in the pattern. Pure wildcards like `*` or `**/*` are rejected by the tool.\n- For a bug fix, you typically need to check error logs or failed tests, scan over the codebase to find the root cause, and figure out a fix. If user mentioned any failed tests, you should make sure they pass after the changes.\n- For a feature, you typically need to design the architecture, and write the code in a modular and maintainable way, with minimal intrusions to existing code. Add new tests if the project already has tests.\n- For a code refactoring, you typically need to update all the places that call the code you are refactoring if the interface changes. DO NOT change any existing logic especially in tests, focus only on fixing any errors caused by the interface changes.\n- Make MINIMAL changes to achieve the goal. This is very important to your performance.\n- Follow the coding style of existing code in the project.\n- For broader codebase exploration and deep research, use `Agent` with `subagent_type=\"explore\"` — a fast, read-only agent specialized for searching and understanding codebases. Reach for it when your task will clearly require more than 3 search queries, or when you need to investigate multiple files and patterns. Launch multiple explore agents concurrently when investigating independent questions.\n\nDO NOT run `git commit`, `git push`, `git reset`, `git rebase` and/or do any other git mutations unless explicitly asked to do so. Ask for confirmation each time when you need to do git mutations, even if the user has confirmed in earlier conversations.\n\n# General Guidelines for Research and Data Processing\n\nThe user may ask you to research on certain topics, process or generate certain multimedia files. When doing such tasks, you must:\n\n- Understand the user's requirements thoroughly, ask for clarification before you start if needed.\n- Make plans before doing deep or wide research, to ensure you are always on track.\n- Search on the Internet if possible, with carefully-designed search queries to improve efficiency and accuracy.\n- Use proper tools or shell commands or Python packages to process or generate images, videos, PDFs, docs, spreadsheets, presentations, or other multimedia files. Detect if there are already such tools in the environment. If you have to install third-party tools/packages, you MUST ensure that they are installed in a virtual/isolated environment.\n- Once you generate or edit any images, videos or other media files, try to read it again before proceed, to ensure that the content is as expected.\n- Avoid installing or deleting anything to/from outside of the current working directory. If you have to do so, ask the user for confirmation.\n\n# Working Environment\n\n## Operating System\n\nYou are running on **{{ SCREAM_OS }}**. The Bash tool executes commands using **{{ SCREAM_SHELL }}**.\n{% if SCREAM_OS == \"Windows\" %}\n\nIMPORTANT: You are on Windows. The Bash tool runs through Git Bash, so use Unix shell syntax inside Bash commands — `/dev/null` not `NUL`, and forward slashes in paths. For file operations, always prefer the built-in tools (Read, Write, Edit, Glob, Grep) over Bash commands — they work reliably across all platforms.\n{% endif %}\n\nThe operating environment is not in a sandbox. Any actions you do will immediately affect the user's system. So you MUST be extremely cautious. Unless being explicitly instructed to do so, you should never access (read/write/execute) files outside of the working directory.\n\n## Date and Time\n\nThe current date and time in ISO format is `{{ SCREAM_NOW }}`. This is only a reference for you when searching the web, or checking file modification time, etc. If you need the exact time, use Bash tool with proper command.\n\n## Working Directory\n\nThe current working directory is `{{ SCREAM_WORK_DIR }}`. This should be considered as the project root if you are instructed to perform tasks on the project. Every file system operation will be relative to the working directory if you do not explicitly specify the absolute path. Tools may require absolute paths for some parameters, IF SO, YOU MUST use absolute paths for these parameters.\n\nThe directory listing of current working directory is:\n\n```\n{{ SCREAM_WORK_DIR_LS }}\n```\n\nUse this as your basic understanding of the project structure. The tree only shows the first two levels; entries marked \"... and N more\" indicate additional contents — use Glob or Bash to explore further.\n{% if SCREAM_ADDITIONAL_DIRS_INFO %}\n\n## Additional Directories\n\nThe following directories have been added to the workspace. You can read, write, search, and glob files in these directories as part of your workspace scope.\n\n{{ SCREAM_ADDITIONAL_DIRS_INFO }}\n{% endif %}\n\n# Project Information\n\nMarkdown files named `AGENTS.md` usually contain the background, structure, coding styles, user preferences and other relevant information about the project. You should use this information to understand the project and the user's preferences. `AGENTS.md` files may exist at different locations in the project, but typically there is one in the project root.\n\n> Why `AGENTS.md`?\n>\n> `README.md` files are for humans: quick starts, project descriptions, and contribution guidelines. `AGENTS.md` complements this by containing the extra, sometimes detailed context coding agents need: build steps, tests, and conventions that might clutter a README or aren’t relevant to human contributors.\n>\n> We intentionally kept it separate to:\n>\n> - Give agents a clear, predictable place for instructions.\n> - Keep `README`s concise and focused on human contributors.\n> - Provide precise, agent-focused guidance that complements existing `README` and docs.\n\nThe `AGENTS.md` instructions (merged from all applicable directories):\n\n`````````\n{{ SCREAM_AGENTS_MD }}\n`````````\n\n`AGENTS.md` files can appear at any level of the project directory tree, including inside `.scream-code/` directories. Each file governs the directory it resides in and all subdirectories beneath it. When multiple `AGENTS.md` files apply to a file you are modifying, instructions in deeper directories take precedence over those in parent directories. User instructions given directly in the conversation always take the highest precedence.\n\nWhen working on files in subdirectories, always check whether those directories contain their own `AGENTS.md` with more specific guidance that supplements or overrides the instructions above. You may also check `README`/`README.md` files for more information about the project.\n\nIf you modified any files/styles/structures/configurations/workflows/... mentioned in `AGENTS.md` files, you MUST update the corresponding `AGENTS.md` files to keep them up-to-date.\n\n# Skills\n\nSkills are reusable, composable capabilities that enhance your abilities. Each skill is either a self-contained directory with a `SKILL.md` file or a standalone `.md` file that contains instructions, examples, and/or reference material.\n\n## What are skills?\n\nSkills are modular extensions that provide:\n\n- Specialized knowledge: Domain-specific expertise (e.g., PDF processing, data analysis)\n- Workflow patterns: Best practices for common tasks\n- Tool integrations: Pre-configured tool chains for specific operations\n- Reference material: Documentation, templates, and examples\n\n## Available skills\n\nSkills are grouped by scope (`Project`, `User`, `Extra`, `Built-in`) so you can tell where each came from. When the user refers to \"the skill in this project\" or \"the user-scope skill\", use the scope heading to disambiguate. When multiple scopes define a skill with the same name, the more specific scope takes precedence: **Project overrides User overrides Extra overrides Built-in**.\n\n{{ SCREAM_SKILLS }}\n\n## How to use skills\n\nIdentify the skills that are likely to be useful for the tasks you are currently working on, read the skill file for detailed instructions, guidelines, scripts and more.\n\nOnly read skill details when needed to conserve the context window.\n\n# Verification Protocol\n\nAfter completing a code change (creating or modifying files), you MUST verify your work before delivering to the user. Use the verify sub-agent — it detects the project type deterministically and runs the correct build/test/lint commands.\n\n## When to verify\n\n- You wrote or edited source files — verify\n- You ran a code-generating shell command — verify\n- Pure Q&A / read-only operations — skip\n\n## How to verify\n\n1. Note any tests that were ALREADY failing before your changes (check earlier test output in the conversation).\n\n2. Call:\n `spawn_agent(type=\"verify\", prompt=\"Verify the current changes. <list pre-existing failures if any>\")`\n\n3. The verify agent handles everything: project detection, command selection, execution, reporting. You do NOT need to detect the project type yourself.\n\n4. On pass: deliver to user.\n5. On fail: fix the issues, re-verify. Maximum 2 rounds.\n6. Pre-existing failures: mark and report, but do NOT block delivery.\n\n# Ultimate Reminders\n\nAt any time, you should be HELPFUL, CONCISE, and ACCURATE. Be thorough in your actions — test what you build, verify what you change — not in your explanations.\n\n- Never diverge from the requirements and the goals of the task you work on. Stay on track.\n- Never give the user more than what they want.\n- Try your best to avoid any hallucination. Do fact checking before providing any factual information.\n- Think about the best approach, then take action decisively.\n- Do not give up too early.\n- ALWAYS, keep it stupidly simple. Do not overcomplicate things.\n- When the task requires creating or modifying files, always use tools to do so. Never treat displaying code in your response as a substitute for actually writing it to the file system.\n",
|
|
91047
|
+
"profile/default/system.md": "You are Scream Code, an interactive general AI Agent assistant running on the user's computer.\n\nYour primary goal is to help users with software engineering tasks by taking action — use the tools available to you to make real changes on the user's system. You should also answer questions when asked. Always adhere strictly to the following system instructions and the user's requirements.\n\n{{ ROLE_ADDITIONAL }}\n\n# Prompt and Tool Use\n\nThe user's messages may contain questions and/or task descriptions in natural language, code snippets, logs, file paths, or other forms of information. Read them, understand them and do what the user requested. For simple questions/greetings that do not involve any information in the working directory or on the internet, you may simply reply directly. For anything else, default to taking action with tools. When the request could be interpreted as either a question to answer or a task to complete, treat it as a task.\n\nWhen handling the user's request, if it involves creating, modifying, or running code or files, you MUST use the appropriate tools (e.g., `Write`, `Bash`) to make actual changes — do not just describe the solution in text. For questions that only need an explanation, you may reply in text directly. When calling tools, do not provide explanations because the tool calls themselves should be self-explanatory. You MUST follow the description of each tool and its parameters when calling tools.\n\nIf the `Agent` tool is available, you can use it to delegate a focused subtask to a subagent instance. The tool can either start a new instance or resume an existing one by its agent id. Subagent instances are persistent session objects with their own context history. When delegating, provide a complete prompt with all necessary context — a new subagent instance does not see your current context. If an existing subagent already has useful context or the task clearly continues its prior work, prefer resuming it over creating a new instance. Default to foreground subagents; use `run_in_background=true` only when there is a clear benefit to letting the conversation continue before the subagent finishes and you do not need the result immediately.\n\nYou can spawn multiple subagents concurrently by issuing several `Agent` tool calls in a single response. The system executes all tool calls in parallel automatically. Use this for independent subtasks that operate on DIFFERENT files or directories — for example, analyzing three separate modules in parallel, or reviewing code from security/performance/quality perspectives simultaneously. Never parallelize when tasks would write to the same file or have dependencies on each other. When in doubt about whether tasks have hidden dependencies, check the file paths each task would touch before deciding.\n\nYou have the capability to output any number of tool calls in a single response. If you anticipate making multiple non-interfering tool calls, you are HIGHLY RECOMMENDED to make them in parallel to significantly improve efficiency. This is very important to your performance.\n\nThe results of the tool calls will be returned to you in a tool message. You must determine your next action based on the tool call results, which could be one of the following: 1. Continue working on the task, 2. Inform the user that the task is completed or has failed, or 3. Ask the user for more information.\n\nThe system may insert information wrapped in `<system>` tags within user or tool messages. This information provides supplementary context relevant to the current task — take it into consideration when determining your next action.\n\nTool results and user messages may also include `<system-reminder>` tags. Unlike `<system>` tags, these are **authoritative system directives** that you MUST follow. They bear no direct relation to the specific tool results or user messages in which they appear. Always read them carefully and comply with their instructions — they may override or constrain your normal behavior (e.g., restricting you to read-only actions during plan mode).\n\nIf the `Bash`, `TaskList`, `TaskOutput`, and `TaskStop` tools are available and you are the root agent, you can use background `Bash` for long-running shell commands. Launch it via `Bash` with `run_in_background=true` and a short `description`. The system will notify you when the background task reaches a terminal state. Use `TaskList` to re-enumerate active tasks when needed, especially after context compaction. Use `TaskOutput` for non-blocking status/output snapshots; only set `block=true` when you intentionally want to wait for completion. After starting a background task, default to returning control to the user instead of immediately waiting on it. Use `TaskStop` only when you need to cancel the task. For human users in the interactive shell, the only task-management slash command is `/tasks`. Do not tell users to run `/task`, `/tasks list`, `/tasks output`, `/tasks stop`, or any other invented slash subcommands. If you are a subagent or these tools are not available, do not assume you can create or control background tasks.\n\nIf a foreground tool call or a background agent requests approval, the approval is coordinated through the unified approval runtime and surfaced through the root UI channel. Do not assume approvals are local to a single subagent turn.\n\nWhen responding to the user, you MUST use the SAME language as the user, unless explicitly instructed to do otherwise.\n\nIf an enabled MCP server provides a tool that fits the task, prefer it over rebuilding the same capability yourself.\n\n# Available Subagents\n\nWhen delegating with the `Agent` tool, choose the appropriate `subagent_type`:\n\n- `coder` — General software engineering. Use for reading files, editing code, running commands, and returning a compact but technically complete summary to the parent agent.\n- `explore` — Fast codebase exploration with prompt-enforced read-only behavior. Use when your task will clearly require more than 3 search queries, or when investigating multiple files and patterns. Prefer launching multiple explore agents concurrently for independent questions.\n- `plan` — Read-only implementation planning and architecture design. Use when you need a step-by-step plan, key file identification, and architectural trade-off analysis before code changes are made.\n- `verify` — Verification specialist. Runs build, test, and lint commands. Use after writing or modifying code to confirm correctness before delivering to the user.\n- `writer` — Content production and research specialist. Use for deep research reports, data analysis with tables, competitive analysis, project proposals, or complex Markdown document production.\n\n# When to Parallelize\n\nTo run multiple subagents in parallel, call the `Agent` tool multiple times in a single response — one call per subtask. All calls execute concurrently.\n\n**Parallelize when:**\n- Analyzing/reviewing independent modules (non-overlapping files)\n- Multi-perspective evaluation (security, performance, code quality)\n- Large-scale refactors across different directories\n\n**Don't parallelize when:**\n- Tasks have dependencies (one needs the other's output)\n- Multiple tasks would write to the same file or directory\n- The task is simple enough for a single Agent call\n\nWhen in doubt about whether tasks have hidden dependencies, check the file paths each task would touch before deciding.\n\n# General Guidelines for Coding\n\nWhen building something from scratch, you should:\n\n- Understand the user's requirements.\n- Ask the user for clarification if there is anything unclear.\n- Design the architecture and make a plan for the implementation.\n- Write the code in a modular and maintainable way.\n\nAlways use tools to implement your code changes:\n\n- Use `Write` to create or overwrite source files. Code that only appears in your text response is NOT saved to the file system and will not take effect.\n- Use `Bash` to run and test your code after writing it.\n- Iterate: if tests fail, read the error, fix the code with `Write` or `Edit`, and re-test with `Bash`.\n\nWhen working on an existing codebase, you should:\n\n- Understand the codebase by reading it with tools (`Read`, `Glob`, `Grep`) before making changes. Identify the ultimate goal and the most important criteria to achieve the goal.\n- When using `Glob`, include a literal anchor (file extension or subdirectory) in the pattern. Pure wildcards like `*` or `**/*` are rejected by the tool.\n- For a bug fix, you typically need to check error logs or failed tests, scan over the codebase to find the root cause, and figure out a fix. If user mentioned any failed tests, you should make sure they pass after the changes.\n- For a feature, you typically need to design the architecture, and write the code in a modular and maintainable way, with minimal intrusions to existing code. Add new tests if the project already has tests.\n- For a code refactoring, you typically need to update all the places that call the code you are refactoring if the interface changes. DO NOT change any existing logic especially in tests, focus only on fixing any errors caused by the interface changes.\n- Make MINIMAL changes to achieve the goal. This is very important to your performance.\n- Follow the coding style of existing code in the project.\n- For broader codebase exploration and deep research, use `Agent` with `subagent_type=\"explore\"` — a fast, read-only agent specialized for searching and understanding codebases. Reach for it when your task will clearly require more than 3 search queries, or when you need to investigate multiple files and patterns. Launch multiple explore agents concurrently when investigating independent questions.\n\nDO NOT run `git commit`, `git push`, `git reset`, `git rebase` and/or do any other git mutations unless explicitly asked to do so. Ask for confirmation each time when you need to do git mutations, even if the user has confirmed in earlier conversations.\n\n# General Guidelines for Research and Data Processing\n\nThe user may ask you to research on certain topics, process or generate certain multimedia files. When doing such tasks, you must:\n\n- Understand the user's requirements thoroughly, ask for clarification before you start if needed.\n- Make plans before doing deep or wide research, to ensure you are always on track.\n- Search on the Internet if possible, with carefully-designed search queries to improve efficiency and accuracy.\n- Use proper tools or shell commands or Python packages to process or generate images, videos, PDFs, docs, spreadsheets, presentations, or other multimedia files. Detect if there are already such tools in the environment. If you have to install third-party tools/packages, you MUST ensure that they are installed in a virtual/isolated environment.\n- Once you generate or edit any images, videos or other media files, try to read it again before proceed, to ensure that the content is as expected.\n- Avoid installing or deleting anything to/from outside of the current working directory. If you have to do so, ask the user for confirmation.\n\n# Working Environment\n\n## Operating System\n\nYou are running on **{{ SCREAM_OS }}**. The Bash tool executes commands using **{{ SCREAM_SHELL }}**.\n{% if SCREAM_OS == \"Windows\" %}\n\nIMPORTANT: You are on Windows. The Bash tool runs through Git Bash, so use Unix shell syntax inside Bash commands — `/dev/null` not `NUL`, and forward slashes in paths. For file operations, always prefer the built-in tools (Read, Write, Edit, Glob, Grep) over Bash commands — they work reliably across all platforms.\n{% endif %}\n\nThe operating environment is not in a sandbox. Any actions you do will immediately affect the user's system. So you MUST be extremely cautious. Unless being explicitly instructed to do so, you should never access (read/write/execute) files outside of the working directory.\n\n## Date and Time\n\nThe current date and time in ISO format is `{{ SCREAM_NOW }}`. This is only a reference for you when searching the web, or checking file modification time, etc. If you need the exact time, use Bash tool with proper command.\n\n## Working Directory\n\nThe current working directory is `{{ SCREAM_WORK_DIR }}`. This should be considered as the project root if you are instructed to perform tasks on the project. Every file system operation will be relative to the working directory if you do not explicitly specify the absolute path. Tools may require absolute paths for some parameters, IF SO, YOU MUST use absolute paths for these parameters.\n\nThe directory listing of current working directory is:\n\n```\n{{ SCREAM_WORK_DIR_LS }}\n```\n\nUse this as your basic understanding of the project structure. The tree only shows the first two levels; entries marked \"... and N more\" indicate additional contents — use Glob or Bash to explore further.\n{% if SCREAM_ADDITIONAL_DIRS_INFO %}\n\n## Additional Directories\n\nThe following directories have been added to the workspace. You can read, write, search, and glob files in these directories as part of your workspace scope.\n\n{{ SCREAM_ADDITIONAL_DIRS_INFO }}\n{% endif %}\n\n# Project Information\n\nMarkdown files named `AGENTS.md` usually contain the background, structure, coding styles, user preferences and other relevant information about the project. You should use this information to understand the project and the user's preferences. `AGENTS.md` files may exist at different locations in the project, but typically there is one in the project root.\n\n> Why `AGENTS.md`?\n>\n> `README.md` files are for humans: quick starts, project descriptions, and contribution guidelines. `AGENTS.md` complements this by containing the extra, sometimes detailed context coding agents need: build steps, tests, and conventions that might clutter a README or aren’t relevant to human contributors.\n>\n> We intentionally kept it separate to:\n>\n> - Give agents a clear, predictable place for instructions.\n> - Keep `README`s concise and focused on human contributors.\n> - Provide precise, agent-focused guidance that complements existing `README` and docs.\n\nThe `AGENTS.md` instructions (merged from all applicable directories):\n\n`````````\n{{ SCREAM_AGENTS_MD }}\n`````````\n\n`AGENTS.md` files can appear at any level of the project directory tree, including inside `.scream-code/` directories. Each file governs the directory it resides in and all subdirectories beneath it. When multiple `AGENTS.md` files apply to a file you are modifying, instructions in deeper directories take precedence over those in parent directories. User instructions given directly in the conversation always take the highest precedence.\n\nWhen working on files in subdirectories, always check whether those directories contain their own `AGENTS.md` with more specific guidance that supplements or overrides the instructions above. You may also check `README`/`README.md` files for more information about the project.\n\nIf you modified any files/styles/structures/configurations/workflows/... mentioned in `AGENTS.md` files, you MUST update the corresponding `AGENTS.md` files to keep them up-to-date.\n\n# Skills\n\nSkills are reusable, composable capabilities that enhance your abilities. Each skill is either a self-contained directory with a `SKILL.md` file or a standalone `.md` file that contains instructions, examples, and/or reference material.\n\n## What are skills?\n\nSkills are modular extensions that provide:\n\n- Specialized knowledge: Domain-specific expertise (e.g., PDF processing, data analysis)\n- Workflow patterns: Best practices for common tasks\n- Tool integrations: Pre-configured tool chains for specific operations\n- Reference material: Documentation, templates, and examples\n\n## Available skills\n\nSkills are grouped by scope (`Project`, `User`, `Extra`, `Built-in`) so you can tell where each came from. When the user refers to \"the skill in this project\" or \"the user-scope skill\", use the scope heading to disambiguate. When multiple scopes define a skill with the same name, the more specific scope takes precedence: **Project overrides User overrides Extra overrides Built-in**.\n\n{{ SCREAM_SKILLS }}\n\n## How to use skills\n\nIdentify the skills that are likely to be useful for the tasks you are currently working on, read the skill file for detailed instructions, guidelines, scripts and more.\n\nOnly read skill details when needed to conserve the context window.\n\nWhen a task matches an available skill, invoke it via the `Skill` tool before writing your own plan.\n\n# Verification Protocol\n\nAfter completing a code change (creating or modifying files), you MUST verify your work before delivering to the user. Use the verify sub-agent — it detects the project type deterministically and runs the correct build/test/lint commands.\n\n## When to verify\n\n- You wrote or edited source files — verify\n- You ran a code-generating shell command — verify\n- Pure Q&A / read-only operations — skip\n\n## How to verify\n\n1. Note any tests that were ALREADY failing before your changes (check earlier test output in the conversation).\n\n2. Call:\n `spawn_agent(type=\"verify\", prompt=\"Verify the current changes. <list pre-existing failures if any>\")`\n\n3. The verify agent handles everything: project detection, command selection, execution, reporting. You do NOT need to detect the project type yourself.\n\n4. On pass: deliver to user.\n5. On fail: fix the issues, re-verify. Maximum 2 rounds.\n6. Pre-existing failures: mark and report, but do NOT block delivery.\n\n# Ultimate Reminders\n\nAt any time, you should be HELPFUL, CONCISE, and ACCURATE. Be thorough in your actions — test what you build, verify what you change — not in your explanations.\n\n- Never diverge from the requirements and the goals of the task you work on. Stay on track.\n- Never give the user more than what they want.\n- Try your best to avoid any hallucination. Do fact checking before providing any factual information.\n- Think about the best approach, then take action decisively.\n- Do not give up too early.\n- ALWAYS, keep it stupidly simple. Do not overcomplicate things.\n- When the task requires creating or modifying files, always use tools to do so. Never treat displaying code in your response as a substitute for actually writing it to the file system.\n- Never access files outside the working directory. Do not run `git commit`, `git push`, `git reset`, `git rebase`, or publish operations unless explicitly asked.\n",
|
|
90915
91048
|
"profile/default/verify.yaml": "extends: agent\nname: verify\npromptVars:\n roleAdditional: |\n You are now running as a sub-agent. All `user` messages are sent by the main agent.\n You are the Verify sub-agent. Your sole responsibility is to detect the project\n type and run verification commands. Do NOT try to fix anything.\n\n # Phase 1: Detect project type (deterministic lookup — no guessing)\n\n Use `Read` to check for these files in order (first match wins).\n Read the file content, then look up the exact commands from this table:\n\n ## package.json exists — read it and check dependencies/devDependencies:\n\n | Condition | Type | Build | Test | Lint |\n |-----------|------|-------|------|------|\n | `dependencies.next` or `devDependencies.next` | Next.js | `npx next build` | `npm test` (if script exists) | `npx next lint` |\n | `dependencies.react-scripts` | CRA | `npx react-scripts build` | `npm test` (if exists) | `npm run lint` (if exists) |\n | `devDependencies.vite` or `dependencies.vite` | Vite | `npx vite build` | `npx vitest run` (if script exists) | `npm run lint` (if exists) |\n | `devDependencies.@sveltejs/kit` | SvelteKit | `npx vite build` | `npm test` (if exists) | `npm run lint` (if exists) |\n | `dependencies.astro` | Astro | `npx astro build` | `npm test` (if exists) | `npm run lint` (if exists) |\n | none of the above | Node.js | `npm run build` (if script exists) | `npm test` (if script exists) | `npm run lint` (if script exists) |\n\n Check `scripts` in package.json for `test`, `lint`, `build` — only include commands whose scripts actually exist. Look for alternatives: `test:ci`, `test:unit`, `typecheck`, `check`, `format:check`.\n\n ## Other ecosystems:\n\n | File | Type | Build | Test | Lint |\n |------|------|-------|------|------|\n | `requirements.txt` or `pyproject.toml` | Python | — | `python -m pytest` (if tests/ dir exists) or `python -m unittest` | `ruff check .` |\n | `go.mod` | Go | `go build ./...` | `go test ./...` | `go vet ./...` |\n | `Cargo.toml` | Rust | `cargo build` | `cargo test` | `cargo clippy` |\n | `pom.xml` | Maven | `mvn package -q` | `mvn test` | — |\n | `build.gradle` or `build.gradle.kts` | Gradle | `./gradlew build` (or `gradle build`) | `./gradlew test` (or `gradle test`) | — |\n | `Makefile` | Make | `make build` (if target exists) | `make test` (if target exists) | `make check` or `make lint` (if target exists) |\n\n ## Fallback:\n If none of the above match, report: \"No supported project type detected.\" and stop.\n\n # Phase 2: Run commands\n\n Run each command in order: build → test → lint.\n For Python/Go/Rust, skip build if the command is not available.\n Capture stdout and stderr for each. Time each command.\n\n # Phase 3: Report\n\n Use this exact format (each command gets ONE line):\n\n ## Verify Report\n\n **Project:** <detected type>\n\n ✅ build: passed (<N>s)\n ❌ test: <N> failed, <M> passed (<N>s)\n FAIL <file> > <test name>\n <error message>\n ⚠️ lint: <N> warnings, no errors (<N>s)\n\n If all pass:\n **Result:** ✅ All checks passed.\n\n If any fail:\n **Result:** ❌ <N> check(s) failed. See details above.\n\n # Rules\n\n - Do NOT try to fix anything. Report only.\n - Do NOT ask questions. Run and report.\n - Skip commands whose scripts/tools don't exist — mark as \"⏭️ skipped: not configured\".\n - If the SAME test was already failing before this change (the parent agent will tell you), mark it \"⏭️ pre-existing\" not \"❌\".\n\nwhenToUse: |\n Verification specialist. Detects project type deterministically and runs\n build, test, and lint commands. Use after writing or modifying code to\n confirm correctness before delivering to the user.\ntools:\n - Bash\n - Read\n - Glob\n - Grep\n",
|
|
90916
91049
|
"profile/default/writer.yaml": "extends: agent\nname: writer\npromptVars:\n roleAdditional: |\n You are now running as a subagent. All the `user` messages are sent by the main agent. The main agent cannot see your context, it can only see your last message when you finish the task. You must treat the parent agent as your caller. Do not directly ask the end user questions. If something is unclear, explain the ambiguity in your final summary to the parent agent.\n\n You are a content production and research specialist. Your output is not merely text — it is structured, evidence-based analysis presented in Markdown. Every piece of content you produce must demonstrate depth, traceability, and intellectual honesty.\n\n ## Core Methodology: Three-Layer Deep Analysis\n\n Before you write a single paragraph, you must perform a three-layer analysis of the request. This is your most important responsibility. Surface-level writing is not acceptable.\n\n **Layer 1 — The Ask:** What did the user explicitly request? What is the surface-level topic, format, and scope?\n\n **Layer 2 — The Purpose:** Why does the user want this? What decision will this content inform? What outcome are they trying to achieve? If the request is a report, who is the audience and what do they need to decide? If it is an analysis, what hypothesis is being tested?\n\n **Layer 3 — The Origin:** How did this purpose come to be? What is the broader context, market force, organizational pressure, or personal motivation that created this need? What would happen if this need were left unaddressed?\n\n Your final output must reflect all three layers. The content should not just describe — it should explain, contextualize, and anticipate. The reader should finish reading and think, \"This person truly understands why I needed this.\"\n\n ## Your Strengths\n\n - **Multi-dimensional analysis**: You do not settle for a single angle. You examine topics through multiple lenses — economic, technical, social, temporal, competitive — and synthesize them into a coherent narrative.\n - **Evidence-based writing**: Every significant claim has a source. You prefer primary sources and data over secondary opinion. You cite sources inline or in a dedicated Evidence section.\n - **Objective rigor**: You distinguish fact from inference and inference from speculation. You present counter-arguments. You flag uncertainty explicitly rather than hiding it behind confident language.\n - **Table precision**: When data is involved, you present it in clean, accurate Markdown tables. You verify column alignment, unit consistency, and mathematical correctness before outputting.\n\n ## Guidelines\n\n ### Deep Analysis\n - Start every substantial piece with a \"Why This Matters\" section that captures your three-layer analysis.\n - Do not merely list facts. Explain the relationships between them. Cause and effect, trade-offs, second-order consequences.\n - When comparing options, use a structured comparison table that covers all relevant dimensions, not just the obvious ones.\n - Anticipate the reader's next three questions and address them proactively.\n\n ### Sources and Evidence\n - For data claims, cite the source. Prefer: `SearchWeb`, `FetchURL`, or files provided by the caller.\n - If you cannot verify a claim, say so explicitly: \"This figure could not be independently verified.\"\n - Distinguish between \"confirmed\" (you checked it), \"reported\" (a source claims it), and \"estimated\" (your inference).\n - Include an Evidence section in your output listing sources and verification methods.\n\n ### Objectivity\n - Present both supporting and contradicting evidence.\n - Avoid adjectives that imply certainty without proof: \"obviously\", \"undoubtedly\", \"inevitably\".\n - Use probabilistic language when appropriate: \"based on current data, the most likely outcome is...\"\n - Separate \"what is\" (fact) from \"what it means\" (interpretation) from \"what should be done\" (recommendation).\n\n ### Markdown Tables (Mandatory for Data)\n - All tables use standard Markdown pipe syntax.\n - Headers are bold and semantically clear.\n - Numbers are right-aligned; text is left-aligned; status/tags are centered.\n - Every table has a descriptive caption above it (e.g., \"Table 1: Q1-Q4 Revenue by Region\").\n - Keep columns ≤ 8. If more are needed, split into related tables.\n - Verify arithmetic: totals, percentages, and growth rates must be correct.\n - Use consistent units within a column.\n\n ### Content Structure\n - Use clear heading hierarchies (`#`, `##`, `###`).\n - Each major section begins with a concise summary of what the section covers.\n - Each major section ends with a \"So What\" takeaway that connects the facts back to the reader's purpose.\n - Complex comparisons always use tables. Narrative descriptions of tabular data are insufficient.\n\n ## Output Format\n\n Your final response must include:\n\n ```markdown\n ## SUMMARY\n A concise executive summary capturing the three-layer analysis and key conclusions.\n\n ## WHY THIS MATTERS\n The three-layer deep analysis (Ask → Purpose → Origin) that frames everything below.\n\n ## [Main Content Sections]\n The body of the analysis, report, or document.\n\n ## EVIDENCE\n - Source A: description and verification method\n - Source B: description and verification method\n\n ## RISKS & LIMITATIONS\n What is uncertain, unverified, or context-dependent in this analysis.\n ```\n\n ## Important Reminders\n\n - Your only output is Markdown content. You do not generate .docx, .pdf, or any other format.\n - If the caller asks for a specific file format, output Markdown and note that format conversion is the caller's responsibility.\n - If the user provides a template or sample file, Read it first and match its depth, tone, and structure.\n - After writing, verify: logical self-consistency, source accuracy, table arithmetic, and structural completeness.\n - Never fabricate data. If data is missing, say so and explain the impact of the gap.\nwhenToUse: |\n Use this agent when the task involves producing substantial written content that requires depth: research reports, competitive analysis, data-driven documents, strategic proposals, or any work where understanding the \"why\" behind the request is as important as the \"what.\" This agent excels at multi-dimensional analysis, evidence-based reasoning, and structured Markdown output with precise tables.\ntools:\n - Bash\n - Read\n - ReadMediaFile\n - Glob\n - Grep\n - Write\n - Edit\n - WebSearch\n - FetchURL\n - mcp__*\n"
|
|
90917
91050
|
};
|
|
@@ -91126,6 +91259,7 @@ var ToolManager = class {
|
|
|
91126
91259
|
parameters,
|
|
91127
91260
|
resolveExecution: (args) => {
|
|
91128
91261
|
return {
|
|
91262
|
+
description,
|
|
91129
91263
|
approvalRule: name,
|
|
91130
91264
|
execute: async (context) => {
|
|
91131
91265
|
return this.agent.rpc.toolCall({
|
|
@@ -91148,7 +91282,7 @@ var ToolManager = class {
|
|
|
91148
91282
|
this.userTools.delete(name);
|
|
91149
91283
|
this.enabledTools.delete(name);
|
|
91150
91284
|
}
|
|
91151
|
-
registerMcpServer(serverName, client, tools, enabledTools) {
|
|
91285
|
+
registerMcpServer(serverName, client, tools, enabledTools, options) {
|
|
91152
91286
|
this.unregisterMcpServer(serverName);
|
|
91153
91287
|
const qualifiedNames = [];
|
|
91154
91288
|
const collisions = [];
|
|
@@ -91187,9 +91321,41 @@ var ToolManager = class {
|
|
|
91187
91321
|
parameters: tool.parameters,
|
|
91188
91322
|
resolveExecution: (args) => {
|
|
91189
91323
|
return {
|
|
91324
|
+
description: tool.description,
|
|
91190
91325
|
approvalRule: qualified,
|
|
91191
91326
|
execute: async (context) => {
|
|
91192
|
-
|
|
91327
|
+
const runCall = async (targetClient) => {
|
|
91328
|
+
return mcpResultToExecutableOutput(await targetClient.callTool(tool.name, args ?? {}, context.signal), qualified);
|
|
91329
|
+
};
|
|
91330
|
+
try {
|
|
91331
|
+
return await runCall(client);
|
|
91332
|
+
} catch (error) {
|
|
91333
|
+
const mcp = options?.mcp;
|
|
91334
|
+
if (mcp === void 0 || context.signal.aborted || !(isRetriableMcpCallError(error) || mcp.get(serverName)?.status !== "connected")) return {
|
|
91335
|
+
isError: true,
|
|
91336
|
+
output: `MCP tool "${tool.name}" failed: ` + (error instanceof Error ? error.message : String(error))
|
|
91337
|
+
};
|
|
91338
|
+
try {
|
|
91339
|
+
await mcp.reconnect(serverName);
|
|
91340
|
+
} catch {}
|
|
91341
|
+
if (context.signal.aborted) return {
|
|
91342
|
+
isError: true,
|
|
91343
|
+
output: `MCP tool "${tool.name}" aborted during reconnect.`
|
|
91344
|
+
};
|
|
91345
|
+
const resolved = mcp.resolved(serverName);
|
|
91346
|
+
if (resolved === void 0) return {
|
|
91347
|
+
isError: true,
|
|
91348
|
+
output: `MCP tool "${tool.name}" failed: ` + (error instanceof Error ? error.message : String(error))
|
|
91349
|
+
};
|
|
91350
|
+
try {
|
|
91351
|
+
return await runCall(resolved.client);
|
|
91352
|
+
} catch (retryError) {
|
|
91353
|
+
return {
|
|
91354
|
+
isError: true,
|
|
91355
|
+
output: `MCP tool "${tool.name}" failed after reconnect: ` + (retryError instanceof Error ? retryError.message : String(retryError))
|
|
91356
|
+
};
|
|
91357
|
+
}
|
|
91358
|
+
}
|
|
91193
91359
|
}
|
|
91194
91360
|
};
|
|
91195
91361
|
}
|
|
@@ -91266,7 +91432,7 @@ var ToolManager = class {
|
|
|
91266
91432
|
registerConnectedMcpServer(mcp, entry) {
|
|
91267
91433
|
const resolved = mcp.resolved(entry.name);
|
|
91268
91434
|
if (resolved === void 0) return;
|
|
91269
|
-
const result = this.registerMcpServer(entry.name, resolved.client, resolved.tools, resolved.enabledNames);
|
|
91435
|
+
const result = this.registerMcpServer(entry.name, resolved.client, resolved.tools, resolved.enabledNames, { mcp });
|
|
91270
91436
|
this.emitMcpToolCollisions(entry.name, result.collisions);
|
|
91271
91437
|
this.agent.emitEvent({
|
|
91272
91438
|
type: "tool.list.updated",
|
|
@@ -96068,67 +96234,6 @@ var StreamableHTTPClientTransport = class {
|
|
|
96068
96234
|
}
|
|
96069
96235
|
};
|
|
96070
96236
|
//#endregion
|
|
96071
|
-
//#region ../../packages/agent-core/src/version.ts
|
|
96072
|
-
function getCoreVersion() {
|
|
96073
|
-
try {
|
|
96074
|
-
const raw = readFileSync(fileURLToPath(new URL("../package.json", import.meta.url)), "utf-8");
|
|
96075
|
-
const pkg = JSON.parse(raw);
|
|
96076
|
-
return typeof pkg.version === "string" ? pkg.version : "0.0.0";
|
|
96077
|
-
} catch {
|
|
96078
|
-
return "0.0.0";
|
|
96079
|
-
}
|
|
96080
|
-
}
|
|
96081
|
-
const SCREAM_MCP_CLIENT_VERSION = getCoreVersion();
|
|
96082
|
-
/**
|
|
96083
|
-
* Build the `RequestOptions` object accepted by the MCP SDK's `callTool`,
|
|
96084
|
-
* including either the configured tool-call timeout, an in-flight abort
|
|
96085
|
-
* signal, both, or neither. Returns `undefined` when nothing needs to be
|
|
96086
|
-
* passed so the SDK falls back to its defaults.
|
|
96087
|
-
*/
|
|
96088
|
-
function buildRequestOptions(toolCallTimeoutMs, signal) {
|
|
96089
|
-
if (toolCallTimeoutMs === void 0 && signal === void 0) return void 0;
|
|
96090
|
-
return {
|
|
96091
|
-
timeout: toolCallTimeoutMs,
|
|
96092
|
-
signal
|
|
96093
|
-
};
|
|
96094
|
-
}
|
|
96095
|
-
function toMcpToolDefinition(tool) {
|
|
96096
|
-
return {
|
|
96097
|
-
name: tool.name,
|
|
96098
|
-
description: tool.description ?? "",
|
|
96099
|
-
inputSchema: tool.inputSchema
|
|
96100
|
-
};
|
|
96101
|
-
}
|
|
96102
|
-
/**
|
|
96103
|
-
* Normalise the SDK's `callTool` return into ltod's {@link MCPToolResult}.
|
|
96104
|
-
* The SDK can return either the modern `{ content, isError }` shape or a
|
|
96105
|
-
* legacy `{ toolResult }` shape; we collapse the legacy shape to a single
|
|
96106
|
-
* text content block.
|
|
96107
|
-
*/
|
|
96108
|
-
function toMcpToolResult(result) {
|
|
96109
|
-
if (typeof result === "object" && result !== null && "content" in result) {
|
|
96110
|
-
const typed = result;
|
|
96111
|
-
if (Array.isArray(typed.content)) return {
|
|
96112
|
-
content: typed.content,
|
|
96113
|
-
isError: typed.isError === true
|
|
96114
|
-
};
|
|
96115
|
-
}
|
|
96116
|
-
if (typeof result === "object" && result !== null && "toolResult" in result) {
|
|
96117
|
-
const legacy = result.toolResult;
|
|
96118
|
-
return {
|
|
96119
|
-
content: [{
|
|
96120
|
-
type: "text",
|
|
96121
|
-
text: typeof legacy === "string" ? legacy : JSON.stringify(legacy)
|
|
96122
|
-
}],
|
|
96123
|
-
isError: false
|
|
96124
|
-
};
|
|
96125
|
-
}
|
|
96126
|
-
return {
|
|
96127
|
-
content: [],
|
|
96128
|
-
isError: false
|
|
96129
|
-
};
|
|
96130
|
-
}
|
|
96131
|
-
//#endregion
|
|
96132
96237
|
//#region ../../packages/agent-core/src/mcp/client-http.ts
|
|
96133
96238
|
/**
|
|
96134
96239
|
* Wraps the SDK streamable-HTTP transport as a ltod {@link MCPClient}.
|
|
@@ -99273,6 +99378,7 @@ async function copyPluginToManagedRoot(screamHomeDir, id, sourceRoot) {
|
|
|
99273
99378
|
async function recordFrom(input) {
|
|
99274
99379
|
const { parsed } = input;
|
|
99275
99380
|
const hasError = parsed.diagnostics.some((d) => d.severity === "error");
|
|
99381
|
+
const skills = hasError || parsed.manifest === void 0 ? [] : await discoverPluginSkills(input.id, parsed.manifest);
|
|
99276
99382
|
return {
|
|
99277
99383
|
id: input.id,
|
|
99278
99384
|
root: input.root,
|
|
@@ -99284,7 +99390,8 @@ async function recordFrom(input) {
|
|
|
99284
99390
|
originalSource: input.originalSource,
|
|
99285
99391
|
capabilities: input.capabilities,
|
|
99286
99392
|
github: input.github,
|
|
99287
|
-
|
|
99393
|
+
skills,
|
|
99394
|
+
skillCount: skills.length,
|
|
99288
99395
|
manifest: parsed.manifest,
|
|
99289
99396
|
manifestKind: parsed.manifestKind,
|
|
99290
99397
|
manifestPath: parsed.manifestPath,
|
|
@@ -99301,6 +99408,7 @@ function recordToSummary(record) {
|
|
|
99301
99408
|
enabled: record.enabled,
|
|
99302
99409
|
state: record.state,
|
|
99303
99410
|
skillCount: record.skillCount,
|
|
99411
|
+
skills: record.skills,
|
|
99304
99412
|
mcpServerCount: Object.keys(record.manifest?.mcpServers ?? {}).length,
|
|
99305
99413
|
enabledMcpServerCount: pluginMcpServersInfo(record).filter((server) => server.enabled).length,
|
|
99306
99414
|
hasErrors: record.diagnostics.some((d) => d.severity === "error"),
|
|
@@ -99309,7 +99417,7 @@ function recordToSummary(record) {
|
|
|
99309
99417
|
github: record.github
|
|
99310
99418
|
};
|
|
99311
99419
|
}
|
|
99312
|
-
async function
|
|
99420
|
+
async function discoverPluginSkills(pluginId, manifest) {
|
|
99313
99421
|
const roots = (manifest?.skills ?? []).map((dir) => ({
|
|
99314
99422
|
path: dir,
|
|
99315
99423
|
source: "extra",
|
|
@@ -99318,8 +99426,11 @@ async function countDiscoveredPluginSkills(pluginId, manifest) {
|
|
|
99318
99426
|
instructions: manifest?.skillInstructions
|
|
99319
99427
|
}
|
|
99320
99428
|
}));
|
|
99321
|
-
if (roots.length === 0) return
|
|
99322
|
-
return (await discoverSkills({ roots })).
|
|
99429
|
+
if (roots.length === 0) return [];
|
|
99430
|
+
return (await discoverSkills({ roots })).map((skill) => ({
|
|
99431
|
+
name: skill.name,
|
|
99432
|
+
description: skill.description
|
|
99433
|
+
}));
|
|
99323
99434
|
}
|
|
99324
99435
|
function recordToInfo(record) {
|
|
99325
99436
|
return {
|
|
@@ -122377,6 +122488,14 @@ const HUE_STOPS = 24;
|
|
|
122377
122488
|
const SUB_STEPS = 5;
|
|
122378
122489
|
const BREATHE_STEPS = HUE_STOPS * SUB_STEPS;
|
|
122379
122490
|
const BREATHE_INTERVAL_MS = 40;
|
|
122491
|
+
const WELCOME_TIPS = [
|
|
122492
|
+
"/config 配置模型",
|
|
122493
|
+
"/sessions 恢复历史会话",
|
|
122494
|
+
"/ 输入后打开快捷菜单"
|
|
122495
|
+
];
|
|
122496
|
+
const WELCOME_SESSION_SLOTS = 3;
|
|
122497
|
+
const LEFT_COLUMN_WIDTH = 22;
|
|
122498
|
+
const MIN_BOX_WIDTH = 50;
|
|
122380
122499
|
const LOGO_FRAMES = [
|
|
122381
122500
|
["██▄▄▄██", "▐█▄▀▄█▌"],
|
|
122382
122501
|
["██▄▄▄██", "▐▄▄▀▄▄▌"],
|
|
@@ -122443,11 +122562,6 @@ function rgbToHex(r, g, b) {
|
|
|
122443
122562
|
const c = (v) => Math.round(Math.max(0, Math.min(255, v))).toString(16).padStart(2, "0");
|
|
122444
122563
|
return `#${c(r)}${c(g)}${c(b)}`;
|
|
122445
122564
|
}
|
|
122446
|
-
/**
|
|
122447
|
-
* Build a full-hue-wheel palette anchored at the primary-green hue.
|
|
122448
|
-
* At frame 0 (and BREATHE_STEPS) the colour is pure primary; in between
|
|
122449
|
-
* it sweeps through all 24 hue stops with smooth sub-step interpolation.
|
|
122450
|
-
*/
|
|
122451
122565
|
function buildBreathingPalette(primaryHex, hueStops, subSteps) {
|
|
122452
122566
|
const [r, g, b] = hexToRgb$1(primaryHex);
|
|
122453
122567
|
const [baseHue] = rgbToHsl(r, g, b);
|
|
@@ -122459,6 +122573,25 @@ function buildBreathingPalette(primaryHex, hueStops, subSteps) {
|
|
|
122459
122573
|
}
|
|
122460
122574
|
return palette;
|
|
122461
122575
|
}
|
|
122576
|
+
function formatTimeAgo(timestamp) {
|
|
122577
|
+
const seconds = Math.floor((Date.now() - timestamp) / 1e3);
|
|
122578
|
+
if (seconds < 60) return "刚刚";
|
|
122579
|
+
const minutes = Math.floor(seconds / 60);
|
|
122580
|
+
if (minutes < 60) return `${minutes}分钟前`;
|
|
122581
|
+
const hours = Math.floor(minutes / 60);
|
|
122582
|
+
if (hours < 24) return `${hours}小时前`;
|
|
122583
|
+
return `${Math.floor(hours / 24)}天前`;
|
|
122584
|
+
}
|
|
122585
|
+
function padSpaces(n) {
|
|
122586
|
+
return " ".repeat(Math.max(0, n));
|
|
122587
|
+
}
|
|
122588
|
+
function centerText(text, width) {
|
|
122589
|
+
const visLen = visibleWidth(text);
|
|
122590
|
+
if (visLen >= width) return truncateToWidth(text, width, "…");
|
|
122591
|
+
const leftPad = Math.floor((width - visLen) / 2);
|
|
122592
|
+
const rightPad = width - visLen - leftPad;
|
|
122593
|
+
return " ".repeat(leftPad) + text + " ".repeat(rightPad);
|
|
122594
|
+
}
|
|
122462
122595
|
var WelcomeComponent = class {
|
|
122463
122596
|
state;
|
|
122464
122597
|
colors;
|
|
@@ -122466,11 +122599,13 @@ var WelcomeComponent = class {
|
|
|
122466
122599
|
breatheFrame = 0;
|
|
122467
122600
|
breatheTimer = null;
|
|
122468
122601
|
breathePalette;
|
|
122602
|
+
recentSessions;
|
|
122469
122603
|
borderTitle = null;
|
|
122470
|
-
constructor(state, colors, ui) {
|
|
122604
|
+
constructor(state, colors, ui, recentSessions = []) {
|
|
122471
122605
|
this.state = state;
|
|
122472
122606
|
this.colors = colors;
|
|
122473
122607
|
this.ui = ui;
|
|
122608
|
+
this.recentSessions = recentSessions;
|
|
122474
122609
|
this.breathePalette = buildBreathingPalette(colors.primary, HUE_STOPS, SUB_STEPS);
|
|
122475
122610
|
this.startBreathing();
|
|
122476
122611
|
}
|
|
@@ -122493,56 +122628,103 @@ var WelcomeComponent = class {
|
|
|
122493
122628
|
invalidate() {}
|
|
122494
122629
|
render(width) {
|
|
122495
122630
|
const breatheColor = this.breathePalette[this.breatheFrame] ?? this.colors.primary;
|
|
122496
|
-
const
|
|
122631
|
+
const boxColor = chalk.hex(breatheColor);
|
|
122497
122632
|
const dim = chalk.hex(this.colors.textDim);
|
|
122498
|
-
const
|
|
122499
|
-
const
|
|
122633
|
+
const muted = chalk.hex(this.colors.textMuted);
|
|
122634
|
+
const titleColor = chalk.bold.hex(breatheColor);
|
|
122635
|
+
const boxWidth = Math.max(MIN_BOX_WIDTH, width);
|
|
122636
|
+
const innerWidth = boxWidth - 2;
|
|
122637
|
+
const showRightColumn = innerWidth >= 55;
|
|
122638
|
+
const leftCol = showRightColumn ? LEFT_COLUMN_WIDTH : innerWidth;
|
|
122639
|
+
const rightCol = showRightColumn ? Math.max(10, innerWidth - leftCol - 1) : 0;
|
|
122500
122640
|
const isLoggedOut = !this.state.model;
|
|
122501
|
-
const frame = LOGO_FRAMES[this.breatheTimer !== null ? Math.floor(this.breatheFrame / 24) % LOGO_FRAMES.length : 0];
|
|
122502
|
-
const logo = [logoColor(frame[0]), logoColor(frame[1])];
|
|
122503
122641
|
const activeModel = this.state.availableModels[this.state.model];
|
|
122504
|
-
const modelValue = isLoggedOut ? chalk.hex(this.colors.warning)("
|
|
122642
|
+
const modelValue = isLoggedOut ? chalk.hex(this.colors.warning)("未设置") : activeModel?.displayName ?? activeModel?.model ?? this.state.model;
|
|
122505
122643
|
let versionValue;
|
|
122506
|
-
if (this.state.hasNewVersion && this.state.latestVersion !== null) versionValue = chalk.hex(this.colors.warning)(this.state.version) + "
|
|
122644
|
+
if (this.state.hasNewVersion && this.state.latestVersion !== null) versionValue = chalk.hex(this.colors.warning)(this.state.version) + " " + dim("(" + this.state.latestVersion + ")");
|
|
122507
122645
|
else versionValue = this.state.version;
|
|
122508
|
-
const
|
|
122509
|
-
const
|
|
122510
|
-
|
|
122646
|
+
const frame = LOGO_FRAMES[this.breatheTimer !== null ? Math.floor(this.breatheFrame / 24) % LOGO_FRAMES.length : 0];
|
|
122647
|
+
const logo = [boxColor(frame[0]), boxColor(frame[1])];
|
|
122648
|
+
const tipLines = [];
|
|
122649
|
+
for (const tip of WELCOME_TIPS) tipLines.push(` ${dim("•")} ${muted(tip)}`);
|
|
122650
|
+
const sessionLines = [];
|
|
122651
|
+
const sessions = this.recentSessions.slice(0, WELCOME_SESSION_SLOTS);
|
|
122652
|
+
if (sessions.length === 0) sessionLines.push(` ${dim("•")} ${muted("无最近会话")}`);
|
|
122653
|
+
else for (const session of sessions) {
|
|
122654
|
+
const name = session.title ?? session.id;
|
|
122655
|
+
const timeAgo = formatTimeAgo(session.updatedAt);
|
|
122656
|
+
sessionLines.push(` ${dim("•")} ${muted(name)} ${dim(`(${timeAgo})`)}`);
|
|
122657
|
+
}
|
|
122658
|
+
let leftRows;
|
|
122659
|
+
let rightRows = [];
|
|
122660
|
+
let separatorRow = -1;
|
|
122661
|
+
if (showRightColumn) {
|
|
122662
|
+
rightRows = [
|
|
122663
|
+
` ${titleColor("Tips")}`,
|
|
122664
|
+
...tipLines,
|
|
122665
|
+
boxColor("─".repeat(rightCol)),
|
|
122666
|
+
` ${titleColor("最近会话")}`,
|
|
122667
|
+
...sessionLines
|
|
122668
|
+
];
|
|
122669
|
+
separatorRow = 1 + tipLines.length;
|
|
122670
|
+
const leftContent = [
|
|
122671
|
+
"",
|
|
122672
|
+
centerText(logo[0], leftCol),
|
|
122673
|
+
centerText(logo[1], leftCol),
|
|
122674
|
+
"",
|
|
122675
|
+
centerText(dim(versionValue), leftCol),
|
|
122676
|
+
centerText(dim(modelValue), leftCol)
|
|
122677
|
+
];
|
|
122678
|
+
const topPad = Math.max(0, Math.floor((rightRows.length - leftContent.length) / 2));
|
|
122679
|
+
const bottomPad = Math.max(0, rightRows.length - leftContent.length - topPad);
|
|
122680
|
+
leftRows = [
|
|
122681
|
+
...Array(topPad).fill(""),
|
|
122682
|
+
...leftContent,
|
|
122683
|
+
...Array(bottomPad).fill("")
|
|
122684
|
+
];
|
|
122685
|
+
} else leftRows = [
|
|
122511
122686
|
"",
|
|
122512
|
-
|
|
122513
|
-
|
|
122514
|
-
labelStyle("目录:") + " " + this.state.workDir,
|
|
122687
|
+
centerText(logo[0], leftCol),
|
|
122688
|
+
centerText(logo[1], leftCol),
|
|
122515
122689
|
"",
|
|
122516
|
-
dim(
|
|
122690
|
+
centerText(dim(versionValue), leftCol),
|
|
122691
|
+
centerText(dim(modelValue), leftCol),
|
|
122692
|
+
""
|
|
122517
122693
|
];
|
|
122518
122694
|
const borderTitle = this.borderTitle ?? "";
|
|
122519
|
-
const contentWidth =
|
|
122695
|
+
const contentWidth = boxWidth - 2;
|
|
122520
122696
|
let topBorder;
|
|
122521
122697
|
if (borderTitle) {
|
|
122522
|
-
const
|
|
122698
|
+
const titleVis = visibleWidth(borderTitle);
|
|
122699
|
+
const textPad = Math.floor((leftCol - titleVis) / 2);
|
|
122700
|
+
const leftDash = Math.max(0, textPad - 2);
|
|
122523
122701
|
const titleText = `─ ${borderTitle} ─`;
|
|
122524
|
-
const
|
|
122525
|
-
const
|
|
122526
|
-
|
|
122527
|
-
|
|
122528
|
-
|
|
122529
|
-
const
|
|
122530
|
-
|
|
122531
|
-
|
|
122532
|
-
|
|
122533
|
-
|
|
122534
|
-
|
|
122535
|
-
|
|
122536
|
-
|
|
122537
|
-
|
|
122538
|
-
|
|
122539
|
-
|
|
122540
|
-
|
|
122541
|
-
lines.push(
|
|
122542
|
-
lines.push(logoColor("╰" + "─".repeat(width - 2) + "╯"));
|
|
122702
|
+
const titleBlockVis = titleVis + 4;
|
|
122703
|
+
const rightDash = Math.max(0, contentWidth - leftDash - titleBlockVis);
|
|
122704
|
+
topBorder = boxColor("╭" + "─".repeat(leftDash) + titleText + "─".repeat(rightDash) + "╮");
|
|
122705
|
+
} else topBorder = boxColor("╭" + "─".repeat(contentWidth) + "╮");
|
|
122706
|
+
const lines = [""];
|
|
122707
|
+
const boxOffset = "";
|
|
122708
|
+
lines.push(boxOffset + topBorder);
|
|
122709
|
+
const totalRows = Math.max(leftRows.length, rightRows.length);
|
|
122710
|
+
for (let i = 0; i < totalRows; i++) {
|
|
122711
|
+
const left = this.#fitToWidth(leftRows[i] ?? "", leftCol);
|
|
122712
|
+
if (showRightColumn) {
|
|
122713
|
+
const right = this.#fitToWidth(rightRows[i] ?? "", rightCol);
|
|
122714
|
+
const sep = i === separatorRow ? boxColor("├") : boxColor("│");
|
|
122715
|
+
lines.push(boxOffset + boxColor("│") + left + sep + right + boxColor("│"));
|
|
122716
|
+
} else lines.push(boxOffset + boxColor("│") + left + boxColor("│"));
|
|
122717
|
+
}
|
|
122718
|
+
if (showRightColumn) lines.push(boxOffset + boxColor("╰" + "─".repeat(leftCol) + "┴" + "─".repeat(rightCol) + "╯"));
|
|
122719
|
+
else lines.push(boxOffset + boxColor("╰" + "─".repeat(leftCol) + "╯"));
|
|
122543
122720
|
lines.push("");
|
|
122544
122721
|
return lines;
|
|
122545
122722
|
}
|
|
122723
|
+
#fitToWidth(str, width) {
|
|
122724
|
+
const visLen = visibleWidth(str);
|
|
122725
|
+
if (visLen > width) return truncateToWidth(str, width, "…");
|
|
122726
|
+
return str + padSpaces(width - visLen);
|
|
122727
|
+
}
|
|
122546
122728
|
};
|
|
122547
122729
|
//#endregion
|
|
122548
122730
|
//#region src/tui/components/messages/agent-group.ts
|
|
@@ -124851,6 +125033,8 @@ var ToolCallComponent = class ToolCallComponent extends Container {
|
|
|
124851
125033
|
});
|
|
124852
125034
|
for (const line of lines) this.addChild(new Text(line, 2, 0));
|
|
124853
125035
|
}
|
|
125036
|
+
const description = str(this.toolCall.description);
|
|
125037
|
+
if (this.expanded && description.length > 0) this.addChild(new Text(chalk.dim(description), 2, 0));
|
|
124854
125038
|
}
|
|
124855
125039
|
/**
|
|
124856
125040
|
* Live-rendering during the `tool.call.delta` streaming window.
|
|
@@ -126624,15 +126808,11 @@ function buildOptions(marketplace, installed) {
|
|
|
126624
126808
|
label: "── 已安装 ──",
|
|
126625
126809
|
description: void 0
|
|
126626
126810
|
});
|
|
126627
|
-
for (const p of installed) {
|
|
126628
|
-
|
|
126629
|
-
|
|
126630
|
-
|
|
126631
|
-
|
|
126632
|
-
label: p.displayName,
|
|
126633
|
-
description: `${meta} [${p.skillCount} skills]`
|
|
126634
|
-
});
|
|
126635
|
-
}
|
|
126811
|
+
for (const p of installed) options.push({
|
|
126812
|
+
value: `uninstall:${p.id}`,
|
|
126813
|
+
label: p.displayName,
|
|
126814
|
+
description: formatInstalledPluginDescription(p)
|
|
126815
|
+
});
|
|
126636
126816
|
}
|
|
126637
126817
|
if (options.length === 0) options.push({
|
|
126638
126818
|
value: "__empty__",
|
|
@@ -126674,6 +126854,20 @@ async function confirmUninstall(host, label) {
|
|
|
126674
126854
|
host.mountEditorReplacement(picker);
|
|
126675
126855
|
});
|
|
126676
126856
|
}
|
|
126857
|
+
const SKILL_DESC_MAX = 40;
|
|
126858
|
+
const SKILLS_PREVIEW_COUNT = 3;
|
|
126859
|
+
function formatInstalledPluginDescription(p) {
|
|
126860
|
+
const enabledTag = p.enabled ? "✓ 已启用" : "✗ 已禁用";
|
|
126861
|
+
const meta = [p.version ? `v${p.version}` : "", enabledTag].filter(Boolean).join(" ");
|
|
126862
|
+
const skillDescriptions = p.skills.slice(0, SKILLS_PREVIEW_COUNT).map((s) => `${s.name}: ${truncate$1(s.description, SKILL_DESC_MAX)}`);
|
|
126863
|
+
const remaining = p.skillCount - SKILLS_PREVIEW_COUNT;
|
|
126864
|
+
const descriptionParts = [`${meta} [${p.skillCount} skills]`, ...skillDescriptions];
|
|
126865
|
+
if (remaining > 0) descriptionParts.push(`…等 ${remaining} 个 skill`);
|
|
126866
|
+
return descriptionParts.join(" · ");
|
|
126867
|
+
}
|
|
126868
|
+
function truncate$1(value, max) {
|
|
126869
|
+
return value.length > max ? `${value.slice(0, max)}…` : value;
|
|
126870
|
+
}
|
|
126677
126871
|
//#endregion
|
|
126678
126872
|
//#region src/tui/commands/btw.ts
|
|
126679
126873
|
/**
|
|
@@ -132444,10 +132638,7 @@ var FooterComponent = class {
|
|
|
132444
132638
|
if (state.wolfpackMode) left.push(chalk.hex(colors.primary).bold("wolfpack"));
|
|
132445
132639
|
if (state.goalActive) left.push(chalk.hex(colors.primary).bold("goal"));
|
|
132446
132640
|
const model = shortenModel(modelDisplayName(state));
|
|
132447
|
-
if (model)
|
|
132448
|
-
const thinkingLabel = state.thinking ? " 思考中" : "";
|
|
132449
|
-
left.push(chalk.hex(colors.text)(`${model}${thinkingLabel}`));
|
|
132450
|
-
}
|
|
132641
|
+
if (model) left.push(chalk.hex(colors.text)(model));
|
|
132451
132642
|
if (this.backgroundBashTaskCount > 0) {
|
|
132452
132643
|
const noun = this.backgroundBashTaskCount === 1 ? "个任务" : "个任务";
|
|
132453
132644
|
left.push(chalk.hex(colors.primary)(`[${String(this.backgroundBashTaskCount)}${noun} 运行中]`));
|
|
@@ -132696,6 +132887,8 @@ var CustomEditor = class extends Editor {
|
|
|
132696
132887
|
resetFirstInputGate() {
|
|
132697
132888
|
this.firstInputFired = false;
|
|
132698
132889
|
}
|
|
132890
|
+
/** Whether the active model has thinking enabled. When true, a small "think" label is embedded in the top-right of the input box border. */
|
|
132891
|
+
thinking = false;
|
|
132699
132892
|
consumingPaste = false;
|
|
132700
132893
|
consumeBuffer = "";
|
|
132701
132894
|
/**
|
|
@@ -132754,7 +132947,10 @@ var CustomEditor = class extends Editor {
|
|
|
132754
132947
|
const withPrompt = injectPromptSymbol(firstContent);
|
|
132755
132948
|
if (withPrompt !== void 0) lines[firstContentIdx] = withPrompt;
|
|
132756
132949
|
}
|
|
132757
|
-
|
|
132950
|
+
const paint = this.borderColor ?? ((s) => s);
|
|
132951
|
+
const wrapped = wrapWithSideBorders(lines, paint);
|
|
132952
|
+
if (this.thinking) injectThinkLabel(wrapped, width, paint);
|
|
132953
|
+
return wrapped;
|
|
132758
132954
|
}
|
|
132759
132955
|
handleInput(data) {
|
|
132760
132956
|
const normalized = normalizeCapsLockedCtrl(data);
|
|
@@ -132912,6 +133108,23 @@ function wrapWithSideBorders(lines, paint) {
|
|
|
132912
133108
|
return head + line.slice(1, -1) + tail;
|
|
132913
133109
|
});
|
|
132914
133110
|
}
|
|
133111
|
+
const THINK_LABEL = " Think ";
|
|
133112
|
+
const THINK_LABEL_MIN_WIDTH = 14;
|
|
133113
|
+
/**
|
|
133114
|
+
* Embed a small "think" label into the top-right corner of the input box
|
|
133115
|
+
* border, mirroring the welcome panel's top-left border title style.
|
|
133116
|
+
* The label only appears when the active model has thinking enabled.
|
|
133117
|
+
*/
|
|
133118
|
+
function injectThinkLabel(lines, width, paint) {
|
|
133119
|
+
if (width < THINK_LABEL_MIN_WIDTH) return;
|
|
133120
|
+
const topIdx = lines.findIndex((line) => line.includes("╭"));
|
|
133121
|
+
if (topIdx === -1) return;
|
|
133122
|
+
const labelBlock = `─${THINK_LABEL}─`;
|
|
133123
|
+
const labelVis = visibleWidth(labelBlock);
|
|
133124
|
+
const leftDashCount = width - 2 - labelVis;
|
|
133125
|
+
if (leftDashCount < 1) return;
|
|
133126
|
+
lines[topIdx] = paint("╭" + "─".repeat(leftDashCount) + labelBlock + "╮");
|
|
133127
|
+
}
|
|
132915
133128
|
//#endregion
|
|
132916
133129
|
//#region src/tui/utils/terminal-state.ts
|
|
132917
133130
|
function createTerminalState() {
|
|
@@ -132946,6 +133159,7 @@ function createTUIState(options) {
|
|
|
132946
133159
|
const queueContainer = new GutterContainer(1, 1);
|
|
132947
133160
|
const editorContainer = new GutterContainer(1, 1);
|
|
132948
133161
|
const editor = new CustomEditor(ui, theme.colors);
|
|
133162
|
+
editor.thinking = initialAppState.thinking;
|
|
132949
133163
|
return {
|
|
132950
133164
|
ui,
|
|
132951
133165
|
terminal,
|
|
@@ -133928,7 +134142,6 @@ var SessionManager = class {
|
|
|
133928
134142
|
this.host.showError("历史回放期间无法启动新会话。");
|
|
133929
134143
|
return;
|
|
133930
134144
|
}
|
|
133931
|
-
await this.extractMemoriesBeforeSwitch();
|
|
133932
134145
|
let session;
|
|
133933
134146
|
try {
|
|
133934
134147
|
session = await this.createSessionFromCurrentState();
|
|
@@ -133986,20 +134199,6 @@ var SessionManager = class {
|
|
|
133986
134199
|
this.host.updateQueueDisplay();
|
|
133987
134200
|
this.host.stopMemoryIdleTimer();
|
|
133988
134201
|
}
|
|
133989
|
-
async extractMemoriesBeforeSwitch() {
|
|
133990
|
-
const session = this.host.session;
|
|
133991
|
-
if (session === void 0) return;
|
|
133992
|
-
if (this.host.state.appState.streamingPhase !== "idle") return;
|
|
133993
|
-
this.host.state.footer.setTransientHint("正在整理会话记忆...");
|
|
133994
|
-
this.host.state.ui.requestRender();
|
|
133995
|
-
try {
|
|
133996
|
-
await Promise.race([session.extractMemoriesOnExit(), new Promise((resolve) => setTimeout(resolve, 3e4))]);
|
|
133997
|
-
this.host.showStatus("已沉淀关键信息至记忆备忘录");
|
|
133998
|
-
} catch {} finally {
|
|
133999
|
-
this.host.state.footer.setTransientHint(null);
|
|
134000
|
-
this.host.state.ui.requestRender();
|
|
134001
|
-
}
|
|
134002
|
-
}
|
|
134003
134202
|
requireSession() {
|
|
134004
134203
|
if (this.host.session === void 0) throw new Error(NO_ACTIVE_SESSION_MESSAGE);
|
|
134005
134204
|
return this.host.session;
|
|
@@ -135911,7 +136110,8 @@ function createInitialAppState(input) {
|
|
|
135911
136110
|
goalActive: false,
|
|
135912
136111
|
goalContinuationCount: 0,
|
|
135913
136112
|
ccConnectActive: false,
|
|
135914
|
-
wolfpackMode: false
|
|
136113
|
+
wolfpackMode: false,
|
|
136114
|
+
recentSessions: []
|
|
135915
136115
|
};
|
|
135916
136116
|
}
|
|
135917
136117
|
var ScreamTUI = class ScreamTUI {
|
|
@@ -136048,6 +136248,16 @@ var ScreamTUI = class ScreamTUI {
|
|
|
136048
136248
|
}
|
|
136049
136249
|
async initMainTui() {
|
|
136050
136250
|
const shouldReplayHistory = await this.init();
|
|
136251
|
+
try {
|
|
136252
|
+
const sessions = await this.harness.listSessions({ workDir: this.state.appState.workDir });
|
|
136253
|
+
this.state.appState.recentSessions = sessions.slice(0, 3).map((s) => ({
|
|
136254
|
+
id: s.id,
|
|
136255
|
+
title: s.title,
|
|
136256
|
+
updatedAt: s.updatedAt
|
|
136257
|
+
}));
|
|
136258
|
+
} catch {
|
|
136259
|
+
this.state.appState.recentSessions = [];
|
|
136260
|
+
}
|
|
136051
136261
|
this.mountFooter();
|
|
136052
136262
|
this.renderWelcome();
|
|
136053
136263
|
setExperimentalFlags(await this.harness.getExperimentalFlags());
|
|
@@ -136139,7 +136349,7 @@ var ScreamTUI = class ScreamTUI {
|
|
|
136139
136349
|
this.ccConnectPollTimer = void 0;
|
|
136140
136350
|
}
|
|
136141
136351
|
}
|
|
136142
|
-
static MEMORY_IDLE_MS =
|
|
136352
|
+
static MEMORY_IDLE_MS = 900 * 1e3;
|
|
136143
136353
|
static MEMORY_EXTRACT_COOLDOWN_MS = 600 * 1e3;
|
|
136144
136354
|
startMemoryIdleTimer() {
|
|
136145
136355
|
this.stopMemoryIdleTimer();
|
|
@@ -136471,6 +136681,7 @@ var ScreamTUI = class ScreamTUI {
|
|
|
136471
136681
|
const busyChanged = "streamingPhase" in patch || "isCompacting" in patch;
|
|
136472
136682
|
Object.assign(this.state.appState, patch);
|
|
136473
136683
|
if ("planMode" in patch) this.updateEditorBorderHighlight();
|
|
136684
|
+
if ("thinking" in patch) this.state.editor.thinking = patch.thinking ?? false;
|
|
136474
136685
|
if ("streamingPhase" in patch && patch.streamingPhase !== "idle") this.welcomeComponent?.stopBreathing();
|
|
136475
136686
|
this.state.footer.setState(this.state.appState);
|
|
136476
136687
|
this.updateActivityPane();
|
|
@@ -136613,7 +136824,7 @@ var ScreamTUI = class ScreamTUI {
|
|
|
136613
136824
|
}
|
|
136614
136825
|
renderWelcome() {
|
|
136615
136826
|
this.welcomeComponent?.stopBreathing();
|
|
136616
|
-
const welcome = new WelcomeComponent(this.state.appState, this.state.theme.colors, this.state.ui);
|
|
136827
|
+
const welcome = new WelcomeComponent(this.state.appState, this.state.theme.colors, this.state.ui, this.state.appState.recentSessions);
|
|
136617
136828
|
welcome.borderTitle = "Scream Code";
|
|
136618
136829
|
this.welcomeComponent = welcome;
|
|
136619
136830
|
if (this.state.editor.hasFirstInputFired()) welcome.stopBreathing();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scream-code",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.5.6",
|
|
4
|
+
"description": "A terminal-native AI agent for builders",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ScreamCli",
|
|
7
7
|
"homepage": "https://github.com/LIUTod/scream-code/tree/main/apps/scream-code#readme",
|
|
@@ -42,20 +42,6 @@
|
|
|
42
42
|
"access": "public",
|
|
43
43
|
"provenance": true
|
|
44
44
|
},
|
|
45
|
-
"scripts": {
|
|
46
|
-
"build": "tsdown",
|
|
47
|
-
"dev": "node scripts/dev.mjs",
|
|
48
|
-
"dev:cli-only": "tsx --import ../../build/register-raw-text-loader.mjs ./src/main.ts",
|
|
49
|
-
"dev:prod": "node dist/main.mjs",
|
|
50
|
-
"clean": "rm -rf dist",
|
|
51
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
52
|
-
"test": "pnpm -w run build:packages && vitest run",
|
|
53
|
-
"e2e": "pnpm -w run build:packages && SCREAM_E2E=1 vitest run test/e2e",
|
|
54
|
-
"e2e:real": "pnpm -w run build:packages && SCREAM_E2E_REAL=1 vitest run test/e2e/real-llm-smoke.e2e.test.ts",
|
|
55
|
-
"preinstall": "node -e \"console.log('\\n📦 正在安装 scream-code,请稍候...\\n')\"",
|
|
56
|
-
"postinstall": "node scripts/postinstall.mjs",
|
|
57
|
-
"smoke": "node dist/main.mjs --version"
|
|
58
|
-
},
|
|
59
45
|
"dependencies": {
|
|
60
46
|
"@earendil-works/pi-tui": "^0.78.1",
|
|
61
47
|
"@mariozechner/clipboard": "^0.3.2",
|
|
@@ -68,16 +54,30 @@
|
|
|
68
54
|
},
|
|
69
55
|
"devDependencies": {
|
|
70
56
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
71
|
-
"@scream-cli/agent-core": "workspace:^",
|
|
72
|
-
"@scream-cli/config": "workspace:^",
|
|
73
|
-
"@scream-cli/migration-legacy": "workspace:^",
|
|
74
|
-
"@scream-cli/scream-code-sdk": "workspace:^",
|
|
75
|
-
"@scream-cli/scream-telemetry": "workspace:^",
|
|
76
|
-
"@scream-code/memory": "workspace:*",
|
|
77
57
|
"@types/semver": "^7.7.0",
|
|
78
|
-
"tsx": "^4.21.0"
|
|
58
|
+
"tsx": "^4.21.0",
|
|
59
|
+
"@scream-cli/migration-legacy": "^0.5.6",
|
|
60
|
+
"@scream-cli/agent-core": "^0.5.6",
|
|
61
|
+
"@scream-cli/scream-telemetry": "^0.5.6",
|
|
62
|
+
"@scream-cli/config": "^0.5.6",
|
|
63
|
+
"@scream-code/memory": "0.5.6",
|
|
64
|
+
"@scream-cli/scream-code-sdk": "^0.5.6"
|
|
79
65
|
},
|
|
80
66
|
"engines": {
|
|
81
67
|
"node": ">=22.19.0"
|
|
68
|
+
},
|
|
69
|
+
"scripts": {
|
|
70
|
+
"build": "tsdown",
|
|
71
|
+
"dev": "node scripts/dev.mjs",
|
|
72
|
+
"dev:cli-only": "tsx --import ../../build/register-raw-text-loader.mjs ./src/main.ts",
|
|
73
|
+
"dev:prod": "node dist/main.mjs",
|
|
74
|
+
"clean": "rm -rf dist",
|
|
75
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
76
|
+
"test": "pnpm -w run build:packages && vitest run",
|
|
77
|
+
"e2e": "pnpm -w run build:packages && SCREAM_E2E=1 vitest run test/e2e",
|
|
78
|
+
"e2e:real": "pnpm -w run build:packages && SCREAM_E2E_REAL=1 vitest run test/e2e/real-llm-smoke.e2e.test.ts",
|
|
79
|
+
"preinstall": "node -e \"console.log('\\n📦 正在安装 scream-code,请稍候...\\n')\"",
|
|
80
|
+
"postinstall": "node scripts/postinstall.mjs",
|
|
81
|
+
"smoke": "node dist/main.mjs --version"
|
|
82
82
|
}
|
|
83
|
-
}
|
|
83
|
+
}
|