@lazyingart/agintiflow 0.20.156 → 0.20.157
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/package.json +1 -1
- package/scripts/smoke-cli-chat.js +21 -0
- package/src/interactive-cli.js +36 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lazyingart/agintiflow",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.157",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AgInTiFlow is a project-aware agent workspace for hybrid wet-dry R&D, hardware-aware intelligence, software automation, and industrial workflows.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -405,6 +405,16 @@ try {
|
|
|
405
405
|
) {
|
|
406
406
|
throw new Error("terminal prompt layout did not render visual-only input padding safely");
|
|
407
407
|
}
|
|
408
|
+
const footerPromptLayout = buildPromptLayout("hello", 5, 110, 24, {
|
|
409
|
+
commandCwd: "/tmp/aginti-project",
|
|
410
|
+
footerStatus: "scs=auto aaps=off venice=off",
|
|
411
|
+
});
|
|
412
|
+
const footerPromptText = footerPromptLayout.renderedRows
|
|
413
|
+
.map((line) => line.replace(/\x1b\[[0-9;?]*[ -/]*[@-~]/g, ""))
|
|
414
|
+
.join("\n");
|
|
415
|
+
if (!footerPromptText.includes("cwd /tmp/aginti-project scs=auto aaps=off venice=off")) {
|
|
416
|
+
throw new Error("terminal prompt layout did not render mode status after the cwd footer");
|
|
417
|
+
}
|
|
408
418
|
const committedUserText = formatCommittedUserPromptLines("list files", 90)
|
|
409
419
|
.map((line) => line.replace(/\x1b\[[0-9;?]*[ -/]*[@-~]/g, ""))
|
|
410
420
|
.join("\n");
|
|
@@ -687,6 +697,13 @@ try {
|
|
|
687
697
|
if (!scsDefaultStatusResult.stdout.includes("SCS mode: auto")) {
|
|
688
698
|
throw new Error("interactive /scs status did not show default auto mode");
|
|
689
699
|
}
|
|
700
|
+
const statusFooterResult = await runChat("/status\n");
|
|
701
|
+
if (
|
|
702
|
+
!statusFooterResult.stdout.includes(`cwd=${tempRoot} scs=auto aaps=off venice=off`) ||
|
|
703
|
+
!statusFooterResult.stdout.includes("permission=")
|
|
704
|
+
) {
|
|
705
|
+
throw new Error("interactive /status did not include scs/aaps/venice mode state on the cwd line");
|
|
706
|
+
}
|
|
690
707
|
const scsOnResult = await runChat("/scs on\n");
|
|
691
708
|
if (!scsOnResult.stdout.includes("scs=on")) {
|
|
692
709
|
throw new Error("interactive /scs on did not enable SCS");
|
|
@@ -708,6 +725,10 @@ try {
|
|
|
708
725
|
if (!scsAutoResult.stdout.includes("scs=auto")) {
|
|
709
726
|
throw new Error("interactive /scs auto did not enable auto mode");
|
|
710
727
|
}
|
|
728
|
+
const aapsAutoResult = await runChat("/aaps auto\n");
|
|
729
|
+
if (!aapsAutoResult.stdout.includes("aaps=auto profile=aaps")) {
|
|
730
|
+
throw new Error("interactive /aaps auto did not enable AAPS auto mode");
|
|
731
|
+
}
|
|
711
732
|
const safeResult = await runChat("/safe\n");
|
|
712
733
|
if (!safeResult.stdout.includes("permission=safe") || !safeResult.stdout.includes("writePolicy=prompt")) {
|
|
713
734
|
throw new Error("interactive /safe did not switch to safe permission mode");
|
package/src/interactive-cli.js
CHANGED
|
@@ -1082,7 +1082,8 @@ export function buildPromptLayout(buffer = "", cursor = 0, width = terminalWidth
|
|
|
1082
1082
|
renderedRows.push(panelLine(`${labelText("hint", { prompt: true })}${renderSuggestionList(suggestions, suggestionIndex)}`, ansi.systemBg, lineWidth));
|
|
1083
1083
|
}
|
|
1084
1084
|
if (options.commandCwd) {
|
|
1085
|
-
|
|
1085
|
+
const footerStatus = options.footerStatus ? ` ${options.footerStatus}` : "";
|
|
1086
|
+
renderedRows.push(panelLine(`${labelText("cwd", { prompt: true })}${options.commandCwd}${footerStatus}`, ansi.systemBg, lineWidth));
|
|
1086
1087
|
}
|
|
1087
1088
|
|
|
1088
1089
|
return {
|
|
@@ -1555,7 +1556,11 @@ function readTtyPrompt(options = {}) {
|
|
|
1555
1556
|
|
|
1556
1557
|
async function readPromptAnswer(rl, state = {}) {
|
|
1557
1558
|
if (input.isTTY && output.isTTY && typeof input.setRawMode === "function") {
|
|
1558
|
-
return readTtyPrompt({
|
|
1559
|
+
return readTtyPrompt({
|
|
1560
|
+
commandCwd: state.commandCwd || process.cwd(),
|
|
1561
|
+
language: state.language || cliLanguage,
|
|
1562
|
+
footerStatus: modeFooterStatus(state),
|
|
1563
|
+
});
|
|
1559
1564
|
}
|
|
1560
1565
|
return rl.question(userPrompt());
|
|
1561
1566
|
}
|
|
@@ -1656,6 +1661,7 @@ class LiveRunInput {
|
|
|
1656
1661
|
this.rendered = renderPromptBuffer(this.buffer, this.cursor, this.rendered, {
|
|
1657
1662
|
commandCwd: this.commandCwd,
|
|
1658
1663
|
language: this.state.language || cliLanguage,
|
|
1664
|
+
footerStatus: modeFooterStatus(this.state),
|
|
1659
1665
|
statusLine: this.currentStatusLine(),
|
|
1660
1666
|
pendingAsap: this.pendingAsap,
|
|
1661
1667
|
pendingQueued: this.pendingQueued,
|
|
@@ -1688,6 +1694,7 @@ class LiveRunInput {
|
|
|
1688
1694
|
const layout = buildPromptLayout(this.buffer, this.cursor, terminalWidth(), terminalHeight(), {
|
|
1689
1695
|
commandCwd: this.commandCwd,
|
|
1690
1696
|
language: this.state.language || cliLanguage,
|
|
1697
|
+
footerStatus: modeFooterStatus(this.state),
|
|
1691
1698
|
statusLine: this.currentStatusLine(),
|
|
1692
1699
|
pendingAsap: this.pendingAsap,
|
|
1693
1700
|
pendingQueued: this.pendingQueued,
|
|
@@ -1900,9 +1907,29 @@ class LiveRunInput {
|
|
|
1900
1907
|
}
|
|
1901
1908
|
}
|
|
1902
1909
|
|
|
1910
|
+
function aapsModeStatus(state = {}) {
|
|
1911
|
+
if (state.taskProfile !== "aaps") return "off";
|
|
1912
|
+
if (state.aapsMode === "auto") return "auto";
|
|
1913
|
+
return "on";
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
function veniceModeStatus(state = {}) {
|
|
1917
|
+
const providers = [state.provider, state.routeProvider, state.mainProvider].filter(Boolean);
|
|
1918
|
+
if (providers.includes("venice")) return "on";
|
|
1919
|
+
return state.veniceMode === "on" ? "on" : "off";
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
function modeFooterStatus(state = {}) {
|
|
1923
|
+
return [
|
|
1924
|
+
`scs=${normalizeScsMode(state.enableScs || "off")}`,
|
|
1925
|
+
`aaps=${aapsModeStatus(state)}`,
|
|
1926
|
+
`venice=${veniceModeStatus(state)}`,
|
|
1927
|
+
].join(" ");
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1903
1930
|
function printStatus(state) {
|
|
1904
1931
|
printSystemLine(`project=${process.cwd()}`);
|
|
1905
|
-
printSystemLine(`cwd=${state.commandCwd || process.cwd()}`);
|
|
1932
|
+
printSystemLine(`cwd=${state.commandCwd || process.cwd()} ${modeFooterStatus(state)}`);
|
|
1906
1933
|
printSystemLine(`session=${state.sessionId || "new"}`);
|
|
1907
1934
|
const progress =
|
|
1908
1935
|
state.currentStep && state.currentMaxSteps ? ` progress=${state.currentStep}/${state.currentMaxSteps}` : state.currentStep ? ` progress=${state.currentStep}` : "";
|
|
@@ -2191,6 +2218,8 @@ function createState(args = {}) {
|
|
|
2191
2218
|
auxiliaryProvider: args.auxiliaryProvider || "grsai",
|
|
2192
2219
|
auxiliaryModel: args.auxiliaryModel || "nano-banana-2",
|
|
2193
2220
|
taskProfile: normalizeTaskProfile(args.taskProfile || "auto"),
|
|
2221
|
+
aapsMode: normalizeTaskProfile(args.taskProfile || "auto") === "aaps" ? "on" : "off",
|
|
2222
|
+
veniceMode: "",
|
|
2194
2223
|
language: resolveLanguage(args.language || process.env.AGINTI_LANGUAGE || ""),
|
|
2195
2224
|
headless: args.headless ?? false,
|
|
2196
2225
|
maxSteps:
|
|
@@ -2228,6 +2257,7 @@ function useDeepSeekDefaults(state) {
|
|
|
2228
2257
|
state.routingMode = "smart";
|
|
2229
2258
|
state.provider = "deepseek";
|
|
2230
2259
|
state.model = "";
|
|
2260
|
+
state.veniceMode = "off";
|
|
2231
2261
|
state.routeProvider = "deepseek";
|
|
2232
2262
|
state.routeModel = "deepseek-v4-flash";
|
|
2233
2263
|
state.routeReasoning = "";
|
|
@@ -2294,6 +2324,7 @@ function useVeniceModels(state, routeModel = "venice-uncensored-1-2", mainModel
|
|
|
2294
2324
|
state.routingMode = "smart";
|
|
2295
2325
|
state.provider = "deepseek";
|
|
2296
2326
|
state.model = "";
|
|
2327
|
+
state.veniceMode = "on";
|
|
2297
2328
|
state.routeProvider = "venice";
|
|
2298
2329
|
state.routeModel = routeModel;
|
|
2299
2330
|
state.mainProvider = "venice";
|
|
@@ -3168,6 +3199,7 @@ async function handleCommand(line, state, packageDir) {
|
|
|
3168
3199
|
const normalizedAction = String(action || "status").toLowerCase();
|
|
3169
3200
|
if (normalizedAction === "on" || normalizedAction === "auto") {
|
|
3170
3201
|
state.taskProfile = "aaps";
|
|
3202
|
+
state.aapsMode = normalizedAction;
|
|
3171
3203
|
state.maxSteps = Math.max(state.maxSteps, 36);
|
|
3172
3204
|
printSystemLine(`aaps=${normalizedAction} profile=aaps maxSteps=${state.maxSteps}`);
|
|
3173
3205
|
printAgentMessage("AAPS mode enabled. Use `/aaps init`, `/aaps validate`, `/aaps compile`, or write normal requests about .aaps workflows.");
|
|
@@ -3175,6 +3207,7 @@ async function handleCommand(line, state, packageDir) {
|
|
|
3175
3207
|
}
|
|
3176
3208
|
if (normalizedAction === "off") {
|
|
3177
3209
|
state.taskProfile = "auto";
|
|
3210
|
+
state.aapsMode = "off";
|
|
3178
3211
|
printSystemLine("aaps=off profile=auto");
|
|
3179
3212
|
return true;
|
|
3180
3213
|
}
|