@fiale-plus/pi-rogue-advisor 0.1.5 → 0.1.6
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 +2 -2
- package/package.json +1 -1
- package/skills/advisor/SKILL.md +1 -1
- package/src/extension.test.ts +6 -6
- package/src/extension.ts +2 -2
package/README.md
CHANGED
|
@@ -37,11 +37,11 @@ npm install --workspace packages/advisor
|
|
|
37
37
|
|
|
38
38
|
- `mode`: `auto`
|
|
39
39
|
- `review`: `light`
|
|
40
|
-
- `checkins`: `
|
|
40
|
+
- `checkins`: `off` (orchestration turns them on while a goal/autoresearch flow is active)
|
|
41
41
|
- `checkinIntervalMinutes`: `30`
|
|
42
42
|
- `model`: not set (auto-detected)
|
|
43
43
|
|
|
44
|
-
Check-ins gate on session activity, are bounded, and avoid overlapping calls.
|
|
44
|
+
Check-ins gate on session activity, are bounded, and avoid overlapping calls. They can still be controlled explicitly with `/advisor checkins on|off|<minutes>`.
|
|
45
45
|
|
|
46
46
|
## Stability guarantees
|
|
47
47
|
|
package/package.json
CHANGED
package/skills/advisor/SKILL.md
CHANGED
|
@@ -43,6 +43,6 @@ The advisor surface is separate from orchestration (`goal`/`loop`/`autoresearch`
|
|
|
43
43
|
|
|
44
44
|
- `mode: auto`
|
|
45
45
|
- `review: light`
|
|
46
|
-
- `checkins:
|
|
46
|
+
- `checkins: off` by default; orchestration enables them while a goal/autoresearch flow is active
|
|
47
47
|
- `checkinIntervalMinutes: 30`
|
|
48
48
|
- `model: auto`
|
package/src/extension.test.ts
CHANGED
|
@@ -18,11 +18,11 @@ function state(overrides: Record<string, unknown> = {}) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
describe("AdvisorConfig", () => {
|
|
21
|
-
it("defaults to auto mode, light review, and
|
|
21
|
+
it("defaults to auto mode, light review, and goal-scoped check-ins off", () => {
|
|
22
22
|
const cfg = normalizeAdvisorConfig({});
|
|
23
23
|
expect(cfg.mode).toBe("auto");
|
|
24
24
|
expect(cfg.review).toBe("light");
|
|
25
|
-
expect(cfg.checkins).toBe("
|
|
25
|
+
expect(cfg.checkins).toBe("off");
|
|
26
26
|
expect(cfg.checkinIntervalMinutes).toBe(30);
|
|
27
27
|
expect(cfg.model).toBeUndefined();
|
|
28
28
|
});
|
|
@@ -57,7 +57,7 @@ describe("AdvisorConfig", () => {
|
|
|
57
57
|
const parsed = normalizeAdvisorConfig(JSON.parse(json) as AdvisorConfig);
|
|
58
58
|
expect(parsed.mode).toBe("auto");
|
|
59
59
|
expect(parsed.review).toBe("light");
|
|
60
|
-
expect(parsed.checkins).toBe("
|
|
60
|
+
expect(parsed.checkins).toBe("off");
|
|
61
61
|
expect(parsed.checkinIntervalMinutes).toBe(30);
|
|
62
62
|
expect(parsed.model).toBe("claude-opus-4-6");
|
|
63
63
|
});
|
|
@@ -65,21 +65,21 @@ describe("AdvisorConfig", () => {
|
|
|
65
65
|
|
|
66
66
|
describe("mid-hour check-ins", () => {
|
|
67
67
|
it("does not run immediately after session start", () => {
|
|
68
|
-
const cfg = normalizeAdvisorConfig({ checkinIntervalMinutes: 30 });
|
|
68
|
+
const cfg = normalizeAdvisorConfig({ checkins: "mid-hour", checkinIntervalMinutes: 30 });
|
|
69
69
|
const startedAt = 1_000;
|
|
70
70
|
const now = startedAt + 5 * 60_000;
|
|
71
71
|
expect(shouldRunCheckin(cfg, state(), now, startedAt)).toBeNull();
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
it("runs after interval when there was new activity", () => {
|
|
75
|
-
const cfg = normalizeAdvisorConfig({ checkinIntervalMinutes: 30 });
|
|
75
|
+
const cfg = normalizeAdvisorConfig({ checkins: "mid-hour", checkinIntervalMinutes: 30 });
|
|
76
76
|
const startedAt = 1_000;
|
|
77
77
|
const now = startedAt + 31 * 60_000;
|
|
78
78
|
expect(shouldRunCheckin(cfg, state(), now, startedAt)).toMatch(/mid-hour check-in/);
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
it("does not run without activity since the last check-in", () => {
|
|
82
|
-
const cfg = normalizeAdvisorConfig({ checkinIntervalMinutes: 30 });
|
|
82
|
+
const cfg = normalizeAdvisorConfig({ checkins: "mid-hour", checkinIntervalMinutes: 30 });
|
|
83
83
|
const lastAt = new Date(1_000).toISOString();
|
|
84
84
|
const now = 1_000 + 60 * 60_000;
|
|
85
85
|
expect(shouldRunCheckin(cfg, state({ turns: 5, checkin: { lastAt, lastTurn: 5 } }), now, 1_000)).toBeNull();
|
package/src/extension.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface AdvisorConfig {
|
|
|
38
38
|
const DEFAULT_CONFIG: AdvisorConfig = {
|
|
39
39
|
mode: "auto",
|
|
40
40
|
review: "light",
|
|
41
|
-
checkins: "
|
|
41
|
+
checkins: "off",
|
|
42
42
|
checkinIntervalMinutes: 30,
|
|
43
43
|
};
|
|
44
44
|
|
|
@@ -121,7 +121,7 @@ export function normalizeAdvisorConfig(raw: Partial<AdvisorConfig> = {}): Adviso
|
|
|
121
121
|
return {
|
|
122
122
|
mode: (raw.mode === "manual" || raw.mode === "off") ? raw.mode : "auto",
|
|
123
123
|
review: (raw.review === "strict" || raw.review === "off") ? raw.review : "light",
|
|
124
|
-
checkins: raw.checkins === "
|
|
124
|
+
checkins: raw.checkins === "mid-hour" ? "mid-hour" : DEFAULT_CONFIG.checkins,
|
|
125
125
|
checkinIntervalMinutes: Math.min(MAX_CHECKIN_INTERVAL_MINUTES, Math.max(MIN_CHECKIN_INTERVAL_MINUTES, Number.isFinite(interval) ? Math.round(interval) : DEFAULT_CONFIG.checkinIntervalMinutes)),
|
|
126
126
|
model: raw.model || undefined,
|
|
127
127
|
};
|