Dashboard › craft › Distillation
c6f685f8-7ffe-4222-bc64-4cd8f53a47e4["lore_tm_v1_nmKgXa7lPiIOFG4KryNkp7Pcsk1UNHzaL0YXVjib76M","lore_tm_v1_HRxjlkg7D9euzKaFKuTawK3oJRnYh_XlCuL6mIO_T4s"]
Date: Aug 27, 2026
src/utils/helpers.ts exports MAX_STEP_OUTPUT_BYTES = 64 * 1024; this limit is intended to avoid Linux E2BIG errors when GitHub Actions expands step outputs into later-step environment variables and to remain below GitHubβs approximately 65,536-character issue-body limit.src/utils/helpers.ts defines envToBool(envVar) using falsy values '', 'undefined', 'null', '0', 'false', and 'no' after lowercasing String(envVar).src/utils/helpers.ts, when --workspace occurs multiple times, the final occurrence controls selection; an empty/bare final occurrence clears an earlier CLI value and falls back to CRAFT_WORKSPACE.src/utils/helpers.ts defines global flags 'dry-run', 'no-input', and 'log-level', initialized respectively to false, false, and 'Info'; setGlobals() updates supplied values, traces flags/argv, and calls setLevel(LogLevel[GLOBAL_FLAGS['log-level']]).promptConfirmation() in src/utils/helpers.ts prompts Is everything OK? Type "yes" to proceed: when input is enabled; validation requires at least 2 characters, only case-insensitive yes proceeds, and all other responses log Oh, okay. Aborting. then call process.exit(1). With no-input, it logs Skipping the confirmation prompt.setGitHubActionsOutput(name, value) in src/utils/helpers.ts is a no-op without GITHUB_OUTPUT; it appends single-line values as ${name}=${value}\n and multiline values using a randomized EOF_${Date.now()}_${Math.random().toString(36).slice(2)} heredoc delimiter.writeGitHubActionsFile(name, content) in src/utils/helpers.ts is a no-op without RUNNER_TEMP; otherwise it creates ${RUNNER_TEMP}/craft, writes UTF-8 content to ${name}.md, sets output ${name}_file to the absolute path, and returns that path.truncateForOutput(value, changelogUrl?) in src/utils/helpers.ts returns values at or below MAX_STEP_OUTPUT_BYTES unchanged; oversized UTF-8 content is byte-safely truncated to leave room for either \n\n---\n*Changelog truncated.* or \n\n---\n*Changelog truncated. [View full changelog](${changelogUrl}).*.src/utils/__tests__/helpers.test.ts contains extractWorkspaceSelection coverage for no selection, separate CLI values, inline values, inline dash-prefixed values (--workspace=-cli), separate dash-prefixed tokens, CLI-versus-CRAFT_WORKSPACE precedence, repeated workspace flags, bare --workspace before another option, bare --workspace at end, and empty inline --workspace=.src/index.ts imports extractWorkspaceSelection and setActiveWorkspace; comments identify extractWorkspaceSelection(argv) as the source of truth for selection, and index.ts calls setActiveWorkspace(extractWorkspaceSelection(argv)).src/__tests__/config.test.ts includes tests for resetting with setActiveWorkspace(undefined), selecting cli and mcp, unknown selection nope, and re-resolving configuration when changing active workspace from cli to mcp.