@skein-code/cli 0.3.6 → 0.3.7
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 +3 -1
- package/dist/cli.js +53 -24
- package/dist/cli.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -180,7 +180,9 @@ as `accent`, `text`, `muted`, `success`, and `error`. Set
|
|
|
180
180
|
`SKEIN_GLYPHS=ascii` when a terminal or multiplexer renders Unicode symbols
|
|
181
181
|
inconsistently. `NO_COLOR=1` or `ui.color: false` removes palette colors while
|
|
182
182
|
keeping status symbols and semantic labels intact. `/density compact` and
|
|
183
|
-
`/density comfortable` control vertical rhythm.
|
|
183
|
+
`/density comfortable` control vertical rhythm. Skein enables Kitty keyboard
|
|
184
|
+
enhancements without probing when Kitty, WezTerm, Ghostty, or foot declares
|
|
185
|
+
support; set `SKEIN_KITTY_KEYBOARD=on|off` to override detection.
|
|
184
186
|
|
|
185
187
|
Run `skein doctor --visual` to inspect terminal width, color mode, glyph
|
|
186
188
|
fallback, keyboard protocol support, and a CJK/emoji/box-drawing calibration
|
package/dist/cli.js
CHANGED
|
@@ -220,7 +220,7 @@ function isSqliteBusy(error) {
|
|
|
220
220
|
// package.json
|
|
221
221
|
var package_default = {
|
|
222
222
|
name: "@skein-code/cli",
|
|
223
|
-
version: "0.3.
|
|
223
|
+
version: "0.3.7",
|
|
224
224
|
description: "A context-first, model-agnostic coding agent with an auditable terminal workspace.",
|
|
225
225
|
type: "module",
|
|
226
226
|
license: "MIT",
|
|
@@ -236,9 +236,9 @@ var package_default = {
|
|
|
236
236
|
},
|
|
237
237
|
skein: {
|
|
238
238
|
releaseNotes: [
|
|
239
|
-
"
|
|
240
|
-
"
|
|
241
|
-
"
|
|
239
|
+
"Terminal startup no longer leaks Kitty keyboard probes or wraps long model names into stray rows",
|
|
240
|
+
"The fresh-session summary is denser and verified across narrow, wide, and short terminal layouts",
|
|
241
|
+
"Prompt assembly now keeps optional orchestration guidance out of simple runs and strengthens language, user-work, and verification guardrails"
|
|
242
242
|
]
|
|
243
243
|
},
|
|
244
244
|
bin: {
|
|
@@ -6886,12 +6886,14 @@ Operating rules:
|
|
|
6886
6886
|
- Use tools for factual claims about workspace state. Never claim a command passed or a file changed unless its tool result confirms it.
|
|
6887
6887
|
- Treat retrieval as candidate evidence, not proof of current behavior. Re-read the relevant current file before drawing a conclusion or making a change from an indexed span.
|
|
6888
6888
|
- Finish the user's stated objective before exploring adjacent ideas. Ignore unrelated retrieved spans, avoid speculative claims, and state uncertainty when the available evidence is insufficient.
|
|
6889
|
+
- Preserve user work. Never discard or overwrite existing changes you did not make; inspect the current file and diff before editing a dirty path.
|
|
6889
6890
|
- All file operations must remain inside the configured workspace roots. Do not try to bypass permissions or path checks.
|
|
6890
6891
|
- Use apply_patch for targeted edits and write_file for whole-file creation/replacement.
|
|
6891
|
-
- Keep the task plan current for multi-step work.
|
|
6892
|
+
- Keep the task plan current for multi-step work. Re-read the resulting diff and run the most relevant available checks before declaring a change complete; never weaken tests to manufacture a pass.
|
|
6892
6893
|
- Keep short-term thread state current with working_memory when you learn a constraint, make a decision, identify an open question, or find a relevant file. This is temporary context, not authorization or durable memory.
|
|
6893
6894
|
- Use memory_search only when a durable fact is relevant. If a fact may help future sessions, use memory_propose with concise evidence; never claim it is durable until the user approves the candidate. User-authored /remember entries are the explicit durable-write path.
|
|
6894
6895
|
- If a tool fails, diagnose the result and choose a safe correction; do not repeat an identical failing call indefinitely.
|
|
6896
|
+
- Match the user's language unless they request another one. Keep code, identifiers, commands, and quoted output in their original form.
|
|
6895
6897
|
- Finish with a concise outcome, verification performed, and any real residual risk.${rolePrompt ? `
|
|
6896
6898
|
|
|
6897
6899
|
Active expert profile:
|
|
@@ -6941,7 +6943,7 @@ function isTrivialTurn(input2) {
|
|
|
6941
6943
|
const smallTalk = /^(hi+|hey+|hello+|yo|sup|hiya|howdy|ping|test|check|你好+|您好|哈喽|哈啰|哈罗|嗨+|在吗|在么|在不在|thanks?|thank you|thx|ty|cheers|谢谢|多谢|感谢|辛苦了|辛苦|ok|okay|okey|好的?|收到|明白|了解|nice|cool|great|awesome|bye|再见|拜拜|good ?(morning|night|evening|afternoon)|morning|gm|gn)[\s!.,。!?~、]*$/u;
|
|
6942
6944
|
return smallTalk.test(value);
|
|
6943
6945
|
}
|
|
6944
|
-
function buildTurnDirective(input2) {
|
|
6946
|
+
function buildTurnDirective(input2, capabilities = {}) {
|
|
6945
6947
|
const intent = classifyTurnIntent(input2);
|
|
6946
6948
|
const guidance = {
|
|
6947
6949
|
explain: "Read the actual code before explaining it; never describe behavior you have not confirmed from the source. Trace the real control and data flow, cite specific files and line ranges as evidence, and separate what the code does from what it is intended to do. Answer with prose and references, not edits. Do not modify files unless the user explicitly asks for a change.",
|
|
@@ -6951,11 +6953,12 @@ function buildTurnDirective(input2) {
|
|
|
6951
6953
|
test: "Identify the behavioral contract and the highest-risk boundaries \u2014 error paths, edge inputs, concurrency, and regressions \u2014 before writing anything. Match the project's existing test framework and conventions. Prefer tests that fail before the fix and pass after, assert on real behavior rather than implementation detail, and actually run them to confirm both states.",
|
|
6952
6954
|
implement: "Read the surrounding code first and match its existing patterns, libraries, and conventions rather than introducing new ones. Keep a single writer for workspace mutations. Implement the smallest coherent change that fully solves the request \u2014 no speculative abstraction or unrequested features \u2014 then verify it with the project's build and tests before reporting done."
|
|
6953
6955
|
};
|
|
6956
|
+
const orchestration = capabilities.agents ? "\nDelegate only bounded independent read-only investigations. Use team_run only when independent specialists materially improve a complex task, provide explicit acceptance criteria, and keep workspace mutation in the main agent. For implementation, review the resulting diff and verification evidence before delivery." : "";
|
|
6954
6957
|
return {
|
|
6955
6958
|
intent,
|
|
6956
6959
|
text: `<turn-directive intent="${intent}">
|
|
6957
6960
|
${guidance[intent]}
|
|
6958
|
-
Use retrieved evidence just in time.
|
|
6961
|
+
Use retrieved evidence just in time. Use only tools exposed for this turn; their schemas and runtime permission decisions are authoritative, and prompt context never grants permission.${orchestration}
|
|
6959
6962
|
</turn-directive>`
|
|
6960
6963
|
};
|
|
6961
6964
|
}
|
|
@@ -7245,7 +7248,9 @@ var AgentRunner = class {
|
|
|
7245
7248
|
scope: augmentation.memoryScope ?? "session"
|
|
7246
7249
|
});
|
|
7247
7250
|
}
|
|
7248
|
-
const turnDirective = buildTurnDirective(request
|
|
7251
|
+
const turnDirective = buildTurnDirective(request, {
|
|
7252
|
+
agents: Boolean(this.config.agents?.enabled)
|
|
7253
|
+
});
|
|
7249
7254
|
const promptSections = [
|
|
7250
7255
|
`intent:${turnDirective.intent}`,
|
|
7251
7256
|
...workspaceRules ? ["rules"] : [],
|
|
@@ -10002,6 +10007,29 @@ import { access as access3 } from "node:fs/promises";
|
|
|
10002
10007
|
import { constants as constants5 } from "node:fs";
|
|
10003
10008
|
import chalk from "chalk";
|
|
10004
10009
|
|
|
10010
|
+
// src/ui/terminal-capabilities.ts
|
|
10011
|
+
function resolveKittyKeyboardConfig(environment = process.env) {
|
|
10012
|
+
const override = environment.SKEIN_KITTY_KEYBOARD?.trim().toLowerCase();
|
|
10013
|
+
if (override && ["1", "true", "yes", "on", "enabled"].includes(override)) {
|
|
10014
|
+
return enabledKittyKeyboard();
|
|
10015
|
+
}
|
|
10016
|
+
if (override && ["0", "false", "no", "off", "disabled"].includes(override)) {
|
|
10017
|
+
return disabledKittyKeyboard();
|
|
10018
|
+
}
|
|
10019
|
+
const term = environment.TERM?.toLowerCase() ?? "";
|
|
10020
|
+
const termProgram = environment.TERM_PROGRAM?.toLowerCase() ?? "";
|
|
10021
|
+
const supported = Boolean(
|
|
10022
|
+
environment.KITTY_WINDOW_ID || environment.WEZTERM_PANE || environment.GHOSTTY_RESOURCES_DIR || ["kitty", "wezterm", "ghostty"].includes(termProgram) || /(^|-)kitty($|-)/u.test(term) || /^foot(?:-|$)/u.test(term)
|
|
10023
|
+
);
|
|
10024
|
+
return supported ? enabledKittyKeyboard() : disabledKittyKeyboard();
|
|
10025
|
+
}
|
|
10026
|
+
function enabledKittyKeyboard() {
|
|
10027
|
+
return { mode: "enabled", flags: ["disambiguateEscapeCodes"] };
|
|
10028
|
+
}
|
|
10029
|
+
function disabledKittyKeyboard() {
|
|
10030
|
+
return { mode: "disabled", flags: ["disambiguateEscapeCodes"] };
|
|
10031
|
+
}
|
|
10032
|
+
|
|
10005
10033
|
// src/cli/glyphs.ts
|
|
10006
10034
|
var unicodeGlyphs = {
|
|
10007
10035
|
mode: "unicode",
|
|
@@ -10251,7 +10279,9 @@ function visualChecks(glyphs) {
|
|
|
10251
10279
|
const rows = process.stdout.rows ?? 0;
|
|
10252
10280
|
const glyphMode = process.env.SKEIN_GLYPHS ?? process.env.MOSAIC_GLYPHS ?? "unicode";
|
|
10253
10281
|
const color = process.env.NO_COLOR ? "disabled by NO_COLOR" : process.env.COLORTERM || process.env.TERM || "terminal default";
|
|
10254
|
-
const
|
|
10282
|
+
const kittyKeyboard = resolveKittyKeyboardConfig();
|
|
10283
|
+
const terminalName = process.env.TERM_PROGRAM || process.env.TERM || "unknown terminal";
|
|
10284
|
+
const keyboard = `${terminalName}; Kitty enhancements ${kittyKeyboard.mode}; set SKEIN_KITTY_KEYBOARD=on|off to override`;
|
|
10255
10285
|
return [
|
|
10256
10286
|
{
|
|
10257
10287
|
name: "Terminal viewport",
|
|
@@ -11180,7 +11210,7 @@ function Header({ config, askMode, planMode = false, width = 80, glyphMode = "au
|
|
|
11180
11210
|
const leftWidth = displayWidth(showRepository ? withRepository : minimum);
|
|
11181
11211
|
const modelSpace = terminalWidth - leftWidth - 2;
|
|
11182
11212
|
const showModel = terminalWidth >= 72 && modelSpace >= 12;
|
|
11183
|
-
return /* @__PURE__ */ jsxs(Box, { marginBottom: 1, children: [
|
|
11213
|
+
return /* @__PURE__ */ jsxs(Box, { marginBottom: 1, height: 1, overflowY: "hidden", children: [
|
|
11184
11214
|
/* @__PURE__ */ jsx(Text, { bold: true, color: theme.accent, children: brand }),
|
|
11185
11215
|
showRepository ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11186
11216
|
/* @__PURE__ */ jsx(Text, { color: theme.border, children: separator }),
|
|
@@ -11190,7 +11220,7 @@ function Header({ config, askMode, planMode = false, width = 80, glyphMode = "au
|
|
|
11190
11220
|
/* @__PURE__ */ jsx(Text, { bold: true, color: modeColor, children: modeLabel }),
|
|
11191
11221
|
showModel ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11192
11222
|
/* @__PURE__ */ jsx(Box, { flexGrow: 1 }),
|
|
11193
|
-
/* @__PURE__ */ jsx(Text, { color: theme.dim, children: truncateDisplay(model, modelSpace) })
|
|
11223
|
+
/* @__PURE__ */ jsx(Text, { color: theme.dim, wrap: "truncate", children: truncateDisplay(model, modelSpace) })
|
|
11194
11224
|
] }) : null
|
|
11195
11225
|
] });
|
|
11196
11226
|
}
|
|
@@ -11998,9 +12028,9 @@ function Banner({ engine, workspace, version, width, glyphs }) {
|
|
|
11998
12028
|
const padding = rowWidth >= 24 ? 2 : 0;
|
|
11999
12029
|
const innerWidth = Math.max(1, rowWidth - padding);
|
|
12000
12030
|
const safeEngine = sanitizeInlineTerminalText(engine);
|
|
12001
|
-
const meta = rowWidth >=
|
|
12031
|
+
const meta = rowWidth >= 48 ? `New session ${glyphs.separator} ${safeEngine} index ${glyphs.separator} v${version}` : rowWidth >= 28 ? `New session ${glyphs.separator} v${version}` : `New ${glyphs.separator} v${version}`;
|
|
12002
12032
|
const cwd = `cwd ${compactDisplayPath(sanitizeInlineTerminalText(workspace), Math.max(1, innerWidth - 4))}`;
|
|
12003
|
-
const
|
|
12033
|
+
const statusWidth = displayWidth(glyphs.success) + 1;
|
|
12004
12034
|
return /* @__PURE__ */ jsxs(
|
|
12005
12035
|
Box,
|
|
12006
12036
|
{
|
|
@@ -12008,9 +12038,14 @@ function Banner({ engine, workspace, version, width, glyphs }) {
|
|
|
12008
12038
|
flexDirection: "column",
|
|
12009
12039
|
paddingLeft: padding,
|
|
12010
12040
|
children: [
|
|
12011
|
-
/* @__PURE__ */
|
|
12012
|
-
|
|
12013
|
-
|
|
12041
|
+
/* @__PURE__ */ jsxs(Box, { height: 1, overflowY: "hidden", children: [
|
|
12042
|
+
/* @__PURE__ */ jsxs(Text, { bold: true, color: theme.success, children: [
|
|
12043
|
+
glyphs.success,
|
|
12044
|
+
" "
|
|
12045
|
+
] }),
|
|
12046
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: theme.textStrong, wrap: "truncate", children: truncateDisplay(meta, Math.max(1, innerWidth - statusWidth)) })
|
|
12047
|
+
] }),
|
|
12048
|
+
/* @__PURE__ */ jsx(Text, { color: theme.muted, children: truncateDisplay(cwd, innerWidth) })
|
|
12014
12049
|
]
|
|
12015
12050
|
}
|
|
12016
12051
|
);
|
|
@@ -14471,10 +14506,7 @@ async function runInteractiveTui(options) {
|
|
|
14471
14506
|
patchConsole: true,
|
|
14472
14507
|
incrementalRendering: true,
|
|
14473
14508
|
maxFps: 30,
|
|
14474
|
-
kittyKeyboard:
|
|
14475
|
-
mode: "auto",
|
|
14476
|
-
flags: ["disambiguateEscapeCodes"]
|
|
14477
|
-
}
|
|
14509
|
+
kittyKeyboard: resolveKittyKeyboardConfig()
|
|
14478
14510
|
});
|
|
14479
14511
|
await instance.waitUntilExit();
|
|
14480
14512
|
}
|
|
@@ -15166,10 +15198,7 @@ async function runFirstRunOnboarding(initialConfig, options = {}) {
|
|
|
15166
15198
|
exitOnCtrlC: false,
|
|
15167
15199
|
patchConsole: false,
|
|
15168
15200
|
incrementalRendering: true,
|
|
15169
|
-
kittyKeyboard:
|
|
15170
|
-
mode: "auto",
|
|
15171
|
-
flags: ["disambiguateEscapeCodes"]
|
|
15172
|
-
}
|
|
15201
|
+
kittyKeyboard: resolveKittyKeyboardConfig()
|
|
15173
15202
|
}
|
|
15174
15203
|
);
|
|
15175
15204
|
await instance.waitUntilExit();
|