@skein-code/cli 0.3.2 → 0.3.4
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/dist/cli.js +70 -21
- package/dist/cli.js.map +1 -1
- package/package.json +3 -3
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.4",
|
|
224
224
|
description: "A context-first, model-agnostic coding agent with an auditable terminal workspace.",
|
|
225
225
|
type: "module",
|
|
226
226
|
license: "MIT",
|
|
@@ -236,8 +236,8 @@ var package_default = {
|
|
|
236
236
|
},
|
|
237
237
|
skein: {
|
|
238
238
|
releaseNotes: [
|
|
239
|
-
|
|
240
|
-
"
|
|
239
|
+
'New woven-coil "S" logo replaces the plain wordmark in the entry banner',
|
|
240
|
+
"Entry banner pairs the logo with the wordmark and an aligned session spec sheet"
|
|
241
241
|
]
|
|
242
242
|
},
|
|
243
243
|
bin: {
|
|
@@ -7613,6 +7613,14 @@ function classifyTurnIntent(input2) {
|
|
|
7613
7613
|
if (/\b(explain|trace|understand|why|how)\b|解释|分析|梳理|为什么|如何/.test(value)) return "explain";
|
|
7614
7614
|
return "implement";
|
|
7615
7615
|
}
|
|
7616
|
+
function isTrivialTurn(input2) {
|
|
7617
|
+
const value = input2.trim().toLocaleLowerCase();
|
|
7618
|
+
if (!value) return true;
|
|
7619
|
+
if (value.includes("@") || value.includes("/") || value.includes("\\")) return false;
|
|
7620
|
+
if (value.length > 40) return false;
|
|
7621
|
+
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;
|
|
7622
|
+
return smallTalk.test(value);
|
|
7623
|
+
}
|
|
7616
7624
|
function buildTurnDirective(input2) {
|
|
7617
7625
|
const intent = classifyTurnIntent(input2);
|
|
7618
7626
|
const guidance = {
|
|
@@ -7887,8 +7895,9 @@ var AgentRunner = class {
|
|
|
7887
7895
|
this.contextManager.startTurn(this.session, request);
|
|
7888
7896
|
this.session.messages.push(message("user", request));
|
|
7889
7897
|
await this.persist();
|
|
7898
|
+
const trivialTurn = isTrivialTurn(request);
|
|
7890
7899
|
const packed = await this.packContext(request);
|
|
7891
|
-
await emit({ type: "context", packed });
|
|
7900
|
+
if (!trivialTurn) await emit({ type: "context", packed });
|
|
7892
7901
|
const mentions = await this.packMentions(request);
|
|
7893
7902
|
const retrievedContext = buildRetrievedContext(
|
|
7894
7903
|
packed,
|
|
@@ -7927,7 +7936,7 @@ var AgentRunner = class {
|
|
|
7927
7936
|
...augmentation.skills?.length ? [`skills:${augmentation.skills.length}`] : [],
|
|
7928
7937
|
...augmentation.memoryCount ? [`memory:${augmentation.memoryCount}`] : []
|
|
7929
7938
|
];
|
|
7930
|
-
await emit({
|
|
7939
|
+
if (!trivialTurn) await emit({
|
|
7931
7940
|
type: "prompt",
|
|
7932
7941
|
intent: turnDirective.intent,
|
|
7933
7942
|
sections: promptSections,
|
|
@@ -12673,20 +12682,61 @@ function ThemePreview({ name, width, glyphs }) {
|
|
|
12673
12682
|
}
|
|
12674
12683
|
function Banner({ model, engine, workspace, version, width, glyphs }) {
|
|
12675
12684
|
const theme = useTheme();
|
|
12676
|
-
const
|
|
12677
|
-
const wordmark =
|
|
12678
|
-
const
|
|
12679
|
-
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12685
|
+
const rowWidth = safeWidth(width);
|
|
12686
|
+
const wordmark = PRODUCT_NAME.toLowerCase();
|
|
12687
|
+
const innerWidth = Math.max(1, rowWidth - 4);
|
|
12688
|
+
const tagline = `v${version} ${glyphs.separator} a terminal coding agent you can see through`;
|
|
12689
|
+
const metaRows = [
|
|
12690
|
+
{ label: "model", value: sanitizeInlineTerminalText(model) },
|
|
12691
|
+
{ label: "engine", value: sanitizeInlineTerminalText(engine) },
|
|
12692
|
+
{ label: "cwd", value: compactDisplayPath(sanitizeInlineTerminalText(workspace), Math.max(12, innerWidth - 8)) }
|
|
12693
|
+
];
|
|
12694
|
+
const labelCol = 8;
|
|
12695
|
+
const hint = `type a request ${glyphs.separator} /help for commands ${glyphs.separator} @ to attach files`;
|
|
12696
|
+
const useAscii = glyphs.borderStyle === "classic";
|
|
12697
|
+
const fill = useAscii ? "##" : "\u2588\u2588";
|
|
12698
|
+
const gap = " ";
|
|
12699
|
+
const logoPixels = [
|
|
12700
|
+
[0, 1, 1, 1, 1],
|
|
12701
|
+
[1, 0, 0, 0, 0],
|
|
12702
|
+
[0, 1, 1, 1, 0],
|
|
12703
|
+
[0, 0, 0, 0, 1],
|
|
12704
|
+
[1, 1, 1, 1, 0]
|
|
12705
|
+
];
|
|
12706
|
+
const logoRows = logoPixels.map((cells) => cells.map((on) => on ? fill : gap).join(""));
|
|
12707
|
+
const logoWidth = 10;
|
|
12708
|
+
const logoGutter = 2;
|
|
12709
|
+
const showLogo = innerWidth >= logoWidth + logoGutter + 12;
|
|
12710
|
+
const headWidth = showLogo ? Math.max(1, innerWidth - logoWidth - logoGutter) : innerWidth;
|
|
12711
|
+
return /* @__PURE__ */ jsxs(
|
|
12712
|
+
Box,
|
|
12713
|
+
{
|
|
12714
|
+
marginBottom: 1,
|
|
12715
|
+
flexDirection: "column",
|
|
12716
|
+
width: rowWidth,
|
|
12717
|
+
borderStyle: glyphs.borderStyle,
|
|
12718
|
+
borderColor: theme.border,
|
|
12719
|
+
paddingX: 1,
|
|
12720
|
+
children: [
|
|
12721
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "row", children: [
|
|
12722
|
+
showLogo ? /* @__PURE__ */ jsx(Box, { flexDirection: "column", marginRight: logoGutter, children: logoRows.map((line, index) => /* @__PURE__ */ jsx(Text, { color: theme.accent, children: line }, index)) }) : null,
|
|
12723
|
+
/* @__PURE__ */ jsxs(Box, { flexDirection: "column", flexGrow: 1, children: [
|
|
12724
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: theme.accent, children: truncateDisplay(wordmark, headWidth) }),
|
|
12725
|
+
/* @__PURE__ */ jsx(Text, { color: theme.muted, children: truncateDisplay(tagline, headWidth) }),
|
|
12726
|
+
showLogo ? /* @__PURE__ */ jsx(Box, { marginTop: 1, flexDirection: "column", children: metaRows.map((row) => /* @__PURE__ */ jsxs(Box, { children: [
|
|
12727
|
+
/* @__PURE__ */ jsx(Text, { color: theme.dim, children: padDisplay(row.label, labelCol) }),
|
|
12728
|
+
/* @__PURE__ */ jsx(Text, { color: theme.text, children: truncateDisplay(row.value, Math.max(1, headWidth - labelCol)) })
|
|
12729
|
+
] }, row.label)) }) : null
|
|
12730
|
+
] })
|
|
12731
|
+
] }),
|
|
12732
|
+
showLogo ? null : /* @__PURE__ */ jsx(Box, { marginTop: 1, flexDirection: "column", children: metaRows.map((row) => /* @__PURE__ */ jsxs(Box, { children: [
|
|
12733
|
+
/* @__PURE__ */ jsx(Text, { color: theme.dim, children: padDisplay(row.label, labelCol) }),
|
|
12734
|
+
/* @__PURE__ */ jsx(Text, { color: theme.text, children: truncateDisplay(row.value, Math.max(1, innerWidth - labelCol)) })
|
|
12735
|
+
] }, row.label)) }),
|
|
12736
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { color: theme.dim, children: truncateDisplay(hint, innerWidth) }) })
|
|
12737
|
+
]
|
|
12738
|
+
}
|
|
12739
|
+
);
|
|
12690
12740
|
}
|
|
12691
12741
|
function UpdateNotice({ current, latest, command: command2, highlights, width, glyphs }) {
|
|
12692
12742
|
const theme = useTheme();
|
|
@@ -13659,8 +13709,7 @@ function estimateTimelineItemRows(item, { width, compact = false, showToolOutput
|
|
|
13659
13709
|
if (item.kind === "agent" || item.kind === "agent-message") return rowWidth < 64 ? 2 : 1;
|
|
13660
13710
|
if (item.kind === "workflow") return rowWidth < 64 ? 2 : 1;
|
|
13661
13711
|
if (item.kind === "banner") {
|
|
13662
|
-
|
|
13663
|
-
return wordmarkRows + 3 + 1;
|
|
13712
|
+
return 2 + 2 + 1 + 3 + 1 + 1 + 1;
|
|
13664
13713
|
}
|
|
13665
13714
|
return 1;
|
|
13666
13715
|
}
|