@matthewfl/pi-contemplator 0.0.8 → 0.0.9
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matthewfl/pi-contemplator",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "A Pi extension that keeps long-running agentic sessions on track with background memory, contemplation, and structural review.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -670,20 +670,23 @@ export class Contemplator {
|
|
|
670
670
|
// designed for agents that run for hours; a probe must be injected after
|
|
671
671
|
// the current tool-call batch, before the very next model request. Never
|
|
672
672
|
// change this to nextTurn: that can postpone delivery until a user prompt.
|
|
673
|
-
//
|
|
673
|
+
// IMPORTANT: omit triggerTurn entirely. Pi 0.84+ interprets an explicit
|
|
674
|
+
// triggerTurn:false as "do not queue while streaming" and inserts directly
|
|
675
|
+
// into agent.state, outside the active run's context snapshot. Omitting it
|
|
676
|
+
// still does not start a turn while idle, but allows steer to work in-run.
|
|
674
677
|
if (this.agentActiveSince !== undefined) this.queuedProbeIds.add(probeId);
|
|
675
678
|
this.pi.sendMessage({
|
|
676
679
|
customType: CONTEMPLATOR_SUGGESTION,
|
|
677
680
|
content: `Background contemplator probe (advisory):\n${question}`,
|
|
678
681
|
display: this.runtime.config.showContemplatorMessages,
|
|
679
682
|
details: { version: 1, question, source, probeId },
|
|
680
|
-
}, { deliverAs: "steer"
|
|
683
|
+
}, { deliverAs: "steer" });
|
|
681
684
|
debugLog("contemplator.suggestion_queued", {
|
|
682
685
|
probeId,
|
|
683
686
|
suggestionLength: question.length,
|
|
684
687
|
delivery: "pi.sendMessage",
|
|
685
688
|
deliverAs: "steer",
|
|
686
|
-
triggerTurn:
|
|
689
|
+
triggerTurn: "omitted",
|
|
687
690
|
source,
|
|
688
691
|
});
|
|
689
692
|
}
|
|
@@ -751,7 +754,9 @@ export class Contemplator {
|
|
|
751
754
|
debugLog(result.outcome === "proposal" ? "reviewer.proposal_created" : "reviewer.no_proposal", { reviewRequestId: request.id, reviewMemoryId: result.id, scope: result.scope });
|
|
752
755
|
if (result.outcome === "proposal") {
|
|
753
756
|
const notice = `BACKGROUND ${result.scope.toUpperCase()} REVIEW PROPOSAL [${result.id}]\n\n${result.summary}\n\nRecall memory [${result.id}] to read the full conceptual proposal when it is relevant.\n\nThis is advisory. Evaluate it against the actual environment and current work.`;
|
|
754
|
-
|
|
757
|
+
// As with probes, triggerTurn must be omitted or Pi 0.84+ bypasses
|
|
758
|
+
// the streaming steer queue and the active run never sees this message.
|
|
759
|
+
this.pi.sendMessage({ customType: REVIEW_PROPOSAL_MESSAGE, content: notice, display: this.runtime.config.showContemplatorMessages, details: { version: 1, reviewRequestId: request.id, reviewMemoryId: result.id, scope: result.scope } }, { deliverAs: "steer" });
|
|
755
760
|
this.pi.appendEntry(OM_REVIEWER_NOTICE, { version: 1, reviewRequestId: request.id, reviewMemoryId: result.id, scope: result.scope, content: notice });
|
|
756
761
|
this.markTipPersisted(ctx);
|
|
757
762
|
debugLog("reviewer.primary_notice_queued", { reviewRequestId: request.id, reviewMemoryId: result.id });
|