scream-code 0.18.1 → 0.18.3
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/README.md +1 -0
- package/dist/{app-BQW2gDgm.mjs → app-DpKIeocS.mjs} +43 -10
- package/dist/{dispatch-Byc9hdXF.mjs → dispatch-CYy-62kt.mjs} +1 -1
- package/dist/{dispatch-FYZpdI9u.mjs → dispatch-DD5FtPHZ.mjs} +827 -33
- package/dist/main.mjs +1 -1
- package/dist/public/assets/index-BgrNzOAz.css +1 -0
- package/dist/public/assets/{index-DOnRKkt2.js → index-BsmGEP9G.js} +33 -33
- package/dist/public/assets/index-BsmGEP9G.js.map +1 -0
- package/dist/public/index.html +2 -2
- package/dist/{text-input-dialog-b-TqTP2z.mjs → text-input-dialog-DCMeCMoC.mjs} +1 -1
- package/dist/{text-input-dialog-Bu8GPguU.mjs → text-input-dialog-Dw-Cl3DW.mjs} +18 -0
- package/package.json +1 -1
- package/dist/public/assets/index-DOnRKkt2.js.map +0 -1
- package/dist/public/assets/index-m8QsxSTy.css +0 -1
package/README.md
CHANGED
|
@@ -109,6 +109,7 @@ Type `/` in the input to browse. All 55 commands:
|
|
|
109
109
|
| `/language` (`/lang`) | Switch interface language |
|
|
110
110
|
| `/theme` | Set terminal UI theme |
|
|
111
111
|
| `/permission` | Select permission mode |
|
|
112
|
+
| `/grants` | Review and revoke session approvals |
|
|
112
113
|
| `/editor` | Set external editor |
|
|
113
114
|
| `/settings` | Open TUI settings |
|
|
114
115
|
| `/init` | Analyze codebase and generate AGENTS.md |
|
|
@@ -5,8 +5,8 @@ const __filename = __cjsShimFileURLToPath(import.meta.url);
|
|
|
5
5
|
const __dirname = __cjsShimDirname(__filename);
|
|
6
6
|
import "./suppress-sqlite-warning-C2VB0doZ.mjs";
|
|
7
7
|
import { A as sharedMemoStore } from "./src-C7C9e5Ds.mjs";
|
|
8
|
-
import { $n as
|
|
9
|
-
import { a as setLocale, i as getLocale, o as t } from "./text-input-dialog-
|
|
8
|
+
import { $ as refineGoal, $n as ScreamHarness, $t as FooterComponent, A as renderDiffLinesClustered, An as setExperimentalFlags, At as isEmptySessionHintDismissed, B as AssistantMessageComponent, Bn as saveTuiConfig, Bt as ENABLE_TERMINAL_FOCUS_REPORTING, C as readJsonlFile, Cn as getCtrlDHint, Ct as supportsBalance, D as UserMessageComponent, Dn as BUILTIN_SLASH_COMMANDS, Dt as resolveThemeSync, En as buildSkillSlashCommands, F as NoticeMessageComponent, Fn as PIXEL_PULSE_FRAMES, Ft as getColorPalette, G as BackgroundAgentStatusComponent, Gn as detectInstallSource, Gt as OSC11_RESPONSE_PREFIX_NO_ESC, H as charsForTokenBudget, Hn as getDataDir, Ht as OSC11_QUERY, I as StatusMessageComponent, In as PULSE_WAVE_FRAMES, It as detectTerminalTheme, J as BREATHE_CYCLE_MS, Jn as CLI_USER_AGENT_PRODUCT, Jt as TERMINAL_FOCUS_OUT, K as AgentGroupComponent, Kn as CLI_COMMAND_NAME, Kt as QUERY_TERMINAL_THEME, L as replaceTabs, Ln as TuiConfigParseError, Lt as parseOsc11BackgroundTheme, M as langFromPath, Mn as getKnowledgeStore, Mt as toggleEmptySessionHint, N as CachedContainer, Nn as hasEmbeddingModelCache, Nt as createThemeStyles, O as ToolCallComponent, On as sortSlashCommands, Ot as createEditorTheme, P as ThinkingComponent, Pn as startManualEmbeddingDownload, Pt as contrastTextHex, Q as clearGoalState, Qn as saveCatalogCache, Qt as isStreaming, R as sanitizeShellOutput, Rn as TuiLikePreferencesSchema, Rt as DISABLE_TERMINAL_FOCUS_REPORTING, S as appendJsonlLine, Sn as getCtrlCHint, St as refreshProviderBalance, T as getDaemonInstructions, Tn as getNoActiveSessionMessage, U as estimateTokens, Un as getInputHistoryFile, Ut as OSC11_RESPONSE, V as ActivityGroupComponent, Vn as detectShellEnvironment, Vt as ENABLE_TERMINAL_THEME_REPORTING, W as getSharedSpeedTracker, Wn as getLogDir, Wt as OSC11_RESPONSE_PREFIX, X as resetBreathingClock, Xn as DEFAULT_CATALOG_URL, Xt as TERMINAL_THEME_LIGHT, Y as getBreathingFrame, Yn as PRODUCT_NAME, Yt as TERMINAL_THEME_DARK, Z as CompactionComponent, Zn as fetchCatalog, Zt as isBusy, _n as EMPTY_SESSION_HINT_URL, a as buildRoleAdditionalText, at as isInternalMessage, b as refreshUpdateCache, bn as SESSION_TIPS, cn as appendSessionHeaderHint, cr as resolveScreamHome, ct as getModelCycleLevel, d as isExpandable, dn as formatErrorMessage, dr as resolveGlobalLogPath, en as lerpGradient, er as encodeWorkDirKey, f as isPlanExpandable, fn as isTodoItemShape, fr as isScreamError, gn as truncateErrorMessage, hn as stringValue, hr as SCREAM_ERROR_INFO, ht as handlePlanCommand, i as openUrl, ir as removeSessionIndexEntry, j as highlightLines, jn as embeddingFailureDetail, jt as isTurnElapsedEnabled, k as renderDiffLines, kn as isExperimentalFlagEnabled, kt as createMarkdownTheme, l as disposeChildren, ln as appendStreamingArgsPreview, lr as flushDiagnosticLogs, m as formatMemoryMemoForInjection, mn as serializeToolResultOutput, mr as ErrorCodes, n as clearEvalPanelState, nr as appendSessionIndexEntry, o as syncDiagramCapabilityPrompt, on as printableChar, or as isRealUserPrompt, ot as toTerminalHyperlink, p as MoonLoader, pn as parseStreamingArgs, pr as isOrphanedToolCallError, pt as handleFusionPlanCommand, q as WelcomeComponent, qn as CLI_UI_MODE, qt as TERMINAL_FOCUS_IN, rr as readSessionIndex, sn as STATUS_BULLET, sr as parseRlmMaxDepthArg, st as changeThinkingLevel, t as dispatchInput, tn as SubagentSlots, tr as normalizeWorkDir, u as hasDispose, un as argsRecord, ur as log, vn as EXIT_CONFIRM_WINDOW_MS, wn as getLlmNotSetMessage, wt as clearInfoPanelState, x as readUpdateCache, xn as TIP_ROTATION_INTERVAL_MS, y as selectUpdateTarget, yn as MAIN_AGENT_ID, z as SkillActivationComponent, zn as loadTuiConfig, zt as DISABLE_TERMINAL_THEME_REPORTING } from "./dispatch-DD5FtPHZ.mjs";
|
|
9
|
+
import { a as setLocale, i as getLocale, o as t } from "./text-input-dialog-Dw-Cl3DW.mjs";
|
|
10
10
|
import { createRequire } from "node:module";
|
|
11
11
|
import { randomBytes, randomUUID, scryptSync, timingSafeEqual } from "node:crypto";
|
|
12
12
|
import { access, appendFile, chmod, mkdir, mkdtemp, readFile, readdir, realpath, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
|
|
@@ -33,7 +33,7 @@ function optionalBuildString(value) {
|
|
|
33
33
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
34
34
|
}
|
|
35
35
|
const SCREAM_BUILD_INFO = {
|
|
36
|
-
version: optionalBuildString("0.18.
|
|
36
|
+
version: optionalBuildString("0.18.3"),
|
|
37
37
|
channel: optionalBuildString(""),
|
|
38
38
|
commit: optionalBuildString(""),
|
|
39
39
|
buildTarget: optionalBuildString("darwin-arm64")
|
|
@@ -11754,7 +11754,9 @@ function adaptApprovalRequest(event) {
|
|
|
11754
11754
|
action: event.action,
|
|
11755
11755
|
description: resolved.description,
|
|
11756
11756
|
display: resolved.blocks,
|
|
11757
|
-
choices: adaptChoices(event.toolName, event.display),
|
|
11757
|
+
choices: adaptChoices(event.toolName, event.display, event.grantOptions),
|
|
11758
|
+
...event.reasons !== void 0 && event.reasons.length > 0 ? { reasons: [...event.reasons] } : {},
|
|
11759
|
+
...event.requestSummary !== void 0 && event.requestSummary.length > 0 ? { request_summary: event.requestSummary } : {},
|
|
11758
11760
|
...sourceLabel !== void 0 ? { source_label: sourceLabel } : {}
|
|
11759
11761
|
};
|
|
11760
11762
|
}
|
|
@@ -12021,9 +12023,22 @@ function adaptDisplay(display) {
|
|
|
12021
12023
|
default: return [];
|
|
12022
12024
|
}
|
|
12023
12025
|
}
|
|
12024
|
-
function adaptChoices(toolName, display) {
|
|
12026
|
+
function adaptChoices(toolName, display, grantOptions) {
|
|
12025
12027
|
if (toolName === "ExitPlanMode" || display.kind === "plan_review") return adaptPlanReviewChoices(display);
|
|
12026
|
-
return getDefaultApprovalChoices().map((choice) => cloneChoice(choice));
|
|
12028
|
+
return getDefaultApprovalChoices().filter((choice) => isGrantOffered(choice, grantOptions)).map((choice) => cloneChoice(choice));
|
|
12029
|
+
}
|
|
12030
|
+
/**
|
|
12031
|
+
* A narrowed `grantOptions` list drops the grants it does not offer — e.g. a
|
|
12032
|
+
* dangerous-command prompt offers `once` only, so the panel must not paint a
|
|
12033
|
+
* "allow for session" button. The response validation in the core downgrades
|
|
12034
|
+
* such a scope anyway; hiding the button keeps the UI from offering a choice
|
|
12035
|
+
* that cannot be honored. Absent list = every grant (older emitters).
|
|
12036
|
+
*/
|
|
12037
|
+
function isGrantOffered(choice, grantOptions) {
|
|
12038
|
+
if (grantOptions === void 0) return true;
|
|
12039
|
+
if (choice.response === "approved") return grantOptions.includes("once");
|
|
12040
|
+
if (choice.response === "approved_for_session") return grantOptions.includes("session");
|
|
12041
|
+
return true;
|
|
12027
12042
|
}
|
|
12028
12043
|
function adaptPlanReviewChoices(display) {
|
|
12029
12044
|
return [...display.kind === "plan_review" && display.options !== void 0 && display.options.length >= 2 ? display.options.map((option) => ({
|
|
@@ -12670,6 +12685,15 @@ var ApprovalPanelComponent = class extends Container {
|
|
|
12670
12685
|
const title = headerFor(data.tool_name);
|
|
12671
12686
|
const lines = [horizontalBar, indent(`${borderColorBold("→")} ${borderColorBold(title)}`)];
|
|
12672
12687
|
if (data.source_label !== void 0 && data.source_label.length > 0) lines.push(indent(dim(truncateToWidth(data.source_label, Math.max(width - 4, 1)))));
|
|
12688
|
+
if (data.request_summary !== void 0 && data.request_summary.length > 0) {
|
|
12689
|
+
const prefix = `${t("approval.request_summary")} `;
|
|
12690
|
+
lines.push(indent(dim(`${prefix}${truncateToWidth(replaceTabs(data.request_summary), Math.max(width - 4 - visibleWidth(prefix), 1))}`)));
|
|
12691
|
+
}
|
|
12692
|
+
if (data.reasons !== void 0 && data.reasons.length > 0) {
|
|
12693
|
+
const warning = chalk.hex(this.colors.warning);
|
|
12694
|
+
lines.push(indent(warning(t("approval.warnings_title"))));
|
|
12695
|
+
for (const reason of data.reasons) lines.push(indent(warning(`· ${truncateToWidth(replaceTabs(reason), Math.max(width - 6, 1))}`)));
|
|
12696
|
+
}
|
|
12673
12697
|
const visibleBlocks = data.display.filter((block) => !isDuplicateBriefBlock(block, data.description)).slice(0, 5);
|
|
12674
12698
|
const hasPreviewable = visibleBlocks.some((block) => block.type === "diff" || block.type === "file_content");
|
|
12675
12699
|
if (visibleBlocks.length > 0) {
|
|
@@ -15185,7 +15209,7 @@ var ScreamTUI = class {
|
|
|
15185
15209
|
const card = new OnboardingCardComponent({
|
|
15186
15210
|
colors: this.state.theme.colors,
|
|
15187
15211
|
onConfigure: () => {
|
|
15188
|
-
import("./dispatch-
|
|
15212
|
+
import("./dispatch-CYy-62kt.mjs").then(({ handleConnectCommand }) => handleConnectCommand(this, "")).finally(() => {
|
|
15189
15213
|
this.restoreEditor();
|
|
15190
15214
|
onDone?.();
|
|
15191
15215
|
});
|
|
@@ -18783,7 +18807,10 @@ var WebSession = class {
|
|
|
18783
18807
|
sourceAgentId: request.sourceAgentId,
|
|
18784
18808
|
sourceAgentName: request.sourceAgentName,
|
|
18785
18809
|
sourceToolName: request.sourceToolName,
|
|
18786
|
-
sourceCapabilityMode: request.sourceCapabilityMode
|
|
18810
|
+
sourceCapabilityMode: request.sourceCapabilityMode,
|
|
18811
|
+
reasons: request.reasons,
|
|
18812
|
+
grantOptions: request.grantOptions,
|
|
18813
|
+
requestSummary: request.requestSummary
|
|
18787
18814
|
});
|
|
18788
18815
|
const payload = {
|
|
18789
18816
|
id,
|
|
@@ -18793,7 +18820,10 @@ var WebSession = class {
|
|
|
18793
18820
|
sourceAgentId: request.sourceAgentId,
|
|
18794
18821
|
sourceAgentName: request.sourceAgentName,
|
|
18795
18822
|
sourceToolName: request.sourceToolName,
|
|
18796
|
-
sourceCapabilityMode: request.sourceCapabilityMode
|
|
18823
|
+
sourceCapabilityMode: request.sourceCapabilityMode,
|
|
18824
|
+
reasons: request.reasons,
|
|
18825
|
+
grantOptions: request.grantOptions,
|
|
18826
|
+
requestSummary: request.requestSummary
|
|
18797
18827
|
};
|
|
18798
18828
|
this.broadcast({
|
|
18799
18829
|
type: "approval_request",
|
|
@@ -18845,7 +18875,10 @@ var WebSession = class {
|
|
|
18845
18875
|
sourceAgentId: approval.sourceAgentId,
|
|
18846
18876
|
sourceAgentName: approval.sourceAgentName,
|
|
18847
18877
|
sourceToolName: approval.sourceToolName,
|
|
18848
|
-
sourceCapabilityMode: approval.sourceCapabilityMode
|
|
18878
|
+
sourceCapabilityMode: approval.sourceCapabilityMode,
|
|
18879
|
+
reasons: approval.reasons,
|
|
18880
|
+
grantOptions: approval.grantOptions,
|
|
18881
|
+
requestSummary: approval.requestSummary
|
|
18849
18882
|
})),
|
|
18850
18883
|
status: this.cachedStatus ?? {
|
|
18851
18884
|
model: "unknown",
|
|
@@ -3,5 +3,5 @@ import { fileURLToPath as __cjsShimFileURLToPath } from 'node:url';
|
|
|
3
3
|
import { dirname as __cjsShimDirname } from 'node:path';
|
|
4
4
|
const __filename = __cjsShimFileURLToPath(import.meta.url);
|
|
5
5
|
const __dirname = __cjsShimDirname(__filename);
|
|
6
|
-
import {
|
|
6
|
+
import { in as handleConnectCommand } from "./dispatch-DD5FtPHZ.mjs";
|
|
7
7
|
export { handleConnectCommand };
|