pi-advisor-flow 0.15.1-dev.2 → 0.15.2-dev.1
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/CHANGELOG.md +7 -0
- package/README.md +16 -1
- package/dist/index.js +1157 -502
- package/docs/README.md +9 -0
- package/docs/benchmark.md +22 -0
- package/docs/configuration.md +194 -0
- package/docs/development.md +38 -0
- package/docs/herdr.md +169 -0
- package/docs/privacy.md +102 -0
- package/extensions/index.ts +23 -0
- package/locales/de.json +330 -0
- package/locales/en.json +331 -0
- package/locales/es.json +3 -0
- package/locales/fr.json +330 -0
- package/locales/pt-BR.json +3 -0
- package/locales/pt.json +3 -0
- package/locales/ru.json +3 -0
- package/locales/uk.json +3 -0
- package/locales/zh.json +3 -0
- package/package.json +15 -2
- package/skills/pi-advisor-flow/SKILL.md +62 -0
- package/src/commands/activation-preparation.ts +9 -2
- package/src/commands/activation.ts +28 -8
- package/src/commands/configuration-tool-models.ts +143 -0
- package/src/commands/configuration-tool-policy.ts +177 -0
- package/src/commands/configuration-tool-preview.ts +228 -0
- package/src/commands/configuration-tool-runtime.ts +40 -0
- package/src/commands/configuration-tool-transaction.ts +120 -0
- package/src/commands/configuration-tool-update.ts +230 -0
- package/src/commands/configuration-tool.ts +89 -0
- package/src/commands/lifecycle.ts +6 -1
- package/src/commands/manual-consultation.ts +6 -1
- package/src/commands/manual-progress.ts +4 -3
- package/src/commands/model-commands.ts +2 -1
- package/src/commands/model-options.ts +4 -6
- package/src/commands/model-picker.ts +16 -6
- package/src/commands/registration.ts +2 -0
- package/src/commands/runtime.ts +17 -4
- package/src/commands/settings-commands.ts +30 -7
- package/src/config/schema-validators.ts +104 -0
- package/src/config/schema.ts +35 -102
- package/src/config/storage.ts +160 -7
- package/src/i18n.ts +31 -0
- package/src/scout-group-serialization.ts +66 -0
- package/src/scout-groups.ts +3 -66
- package/src/scout-selection.ts +99 -0
- package/src/scout.ts +6 -93
- package/src/session-state.ts +27 -137
- package/src/tool-input-normalization.ts +119 -0
- package/src/tools/gate-policy.ts +13 -5
- package/src/tools/jev-filter.ts +2 -1
- package/src/tools/jev-turn-gate.ts +2 -1
- package/src/tools/register-lifecycle.ts +5 -1
- package/src/tools/register-outcome.ts +5 -1
- package/src/tools/register-renderers.ts +5 -2
- package/src/tools/render-advisor-result.ts +20 -8
- package/src/tools/render-common.ts +16 -4
- package/src/tools/scout-status.ts +10 -2
- package/src/ui/jev-classifier-submenu.ts +143 -38
- package/src/ui/jev-filter-submenu.ts +52 -14
- package/src/ui/jev-provider-submenu-view.ts +72 -20
- package/src/ui/jev-provider-submenu.ts +40 -12
- package/src/ui/jev-setup-support.ts +48 -19
- package/src/ui/manual-dialog-render.ts +71 -25
- package/src/ui/searchable-model-list.ts +18 -4
- package/src/ui/settings-formatting.ts +5 -2
- package/src/ui/settings-items-jev.ts +216 -0
- package/src/ui/settings-items.ts +216 -259
- package/src/ui/settings-selector.ts +9 -2
- package/src/ui/text-setting-submenu.ts +8 -1
- package/src/usage.ts +9 -3
|
@@ -2,6 +2,7 @@ import { getSettingsListTheme } from "@earendil-works/pi-coding-agent";
|
|
|
2
2
|
import { SettingsList, truncateToWidth } from "@earendil-works/pi-tui";
|
|
3
3
|
import type { Component, Focusable } from "@earendil-works/pi-tui";
|
|
4
4
|
|
|
5
|
+
import { t } from "../i18n.ts";
|
|
5
6
|
import {
|
|
6
7
|
rainbowGradient,
|
|
7
8
|
SIMPLE_MODE_GRADIENT_INTERVAL_MS,
|
|
@@ -50,7 +51,10 @@ export class AdvisorSettingsSelector implements Component, Focusable {
|
|
|
50
51
|
: [
|
|
51
52
|
...options.presets,
|
|
52
53
|
{
|
|
53
|
-
description:
|
|
54
|
+
description: t(
|
|
55
|
+
"settingsSubmenu.customContextLimit",
|
|
56
|
+
"Current custom context limit"
|
|
57
|
+
),
|
|
54
58
|
label: String(configuredContext),
|
|
55
59
|
value: configuredContext,
|
|
56
60
|
},
|
|
@@ -99,7 +103,10 @@ export class AdvisorSettingsSelector implements Component, Focusable {
|
|
|
99
103
|
const defaultLabel = listTheme.label;
|
|
100
104
|
listTheme.label = (text, selected) => {
|
|
101
105
|
if (this.settings.simpleMode && text.startsWith("Simple mode")) {
|
|
102
|
-
return `${rainbowGradient(
|
|
106
|
+
return `${rainbowGradient(
|
|
107
|
+
t("settings.simpleMode.label", "Simple mode"),
|
|
108
|
+
this.simpleModeGradientStartedAt ?? 0
|
|
109
|
+
)}${text.slice("Simple mode".length)}`;
|
|
103
110
|
}
|
|
104
111
|
|
|
105
112
|
return defaultLabel(text, selected);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Input, truncateToWidth } from "@earendil-works/pi-tui";
|
|
2
2
|
import type { Component, Focusable } from "@earendil-works/pi-tui";
|
|
3
3
|
|
|
4
|
+
import { t } from "../i18n.ts";
|
|
4
5
|
import type { TextSettingSubmenuOptions } from "./types.ts";
|
|
5
6
|
|
|
6
7
|
/** Small inline editor used by SettingsList for the two free-form settings. */
|
|
@@ -60,7 +61,13 @@ export class TextSettingSubmenu implements Component, Focusable {
|
|
|
60
61
|
lines.push(theme.fg("error", ` ${this.error}`));
|
|
61
62
|
}
|
|
62
63
|
|
|
63
|
-
lines.push(
|
|
64
|
+
lines.push(
|
|
65
|
+
"",
|
|
66
|
+
theme.fg(
|
|
67
|
+
"dim",
|
|
68
|
+
` ${t("textSetting.hint", "Enter: apply · Esc: cancel")}`
|
|
69
|
+
)
|
|
70
|
+
);
|
|
64
71
|
|
|
65
72
|
return lines.map((line) => truncateToWidth(line, width));
|
|
66
73
|
}
|
package/src/usage.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { Usage } from "@earendil-works/pi-ai/compat";
|
|
|
2
2
|
|
|
3
3
|
import { isNumber, isRecordOf } from "./content-utils.ts";
|
|
4
4
|
import type { JsonValue, RecordValue } from "./content-utils.ts";
|
|
5
|
+
import { t } from "./i18n.ts";
|
|
5
6
|
|
|
6
7
|
export interface AdvisorUsageSnapshot {
|
|
7
8
|
cacheRead?: number;
|
|
@@ -287,9 +288,14 @@ export const formatAdvisorUsageTotals = (totals: AdvisorUsageTotals) => {
|
|
|
287
288
|
const missing = totals.calls - totals.knownCalls;
|
|
288
289
|
|
|
289
290
|
return (
|
|
290
|
-
[
|
|
291
|
+
[
|
|
292
|
+
usage,
|
|
293
|
+
missing > 0
|
|
294
|
+
? `${missing} ${t("usage.withoutData", "without usage data")}`
|
|
295
|
+
: undefined,
|
|
296
|
+
]
|
|
291
297
|
.filter((value): value is string => value !== undefined)
|
|
292
|
-
.join(" · ") || "unavailable"
|
|
298
|
+
.join(" · ") || t("usage.unavailable", "unavailable")
|
|
293
299
|
);
|
|
294
300
|
};
|
|
295
301
|
|
|
@@ -298,5 +304,5 @@ export const formatAdvisorUsageStatus = (totals: AdvisorUsageTotals) => {
|
|
|
298
304
|
return undefined;
|
|
299
305
|
}
|
|
300
306
|
|
|
301
|
-
return
|
|
307
|
+
return `${t("usage.advisorPrefix", "Advisor:")} ${totals.calls} ${totals.calls === 1 ? t("usage.call", "call") : t("usage.calls", "calls")} · ${formatAdvisorUsageTotals(totals)}`;
|
|
302
308
|
};
|