@pleri/olam-cli 0.1.75 → 0.1.76
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/image-digests.json +3 -3
- package/dist/index.js +285 -219
- package/dist/mcp-server.js +168 -111
- package/host-cp/src/plan-orchestrator.mjs +12 -10
- package/package.json +1 -1
|
@@ -156,7 +156,7 @@ export class PlanOrchestrator {
|
|
|
156
156
|
this.#ropeEngine = new RopeEngine({
|
|
157
157
|
registry: this.#registry,
|
|
158
158
|
db: this.#db,
|
|
159
|
-
broadcast: (
|
|
159
|
+
broadcast: (cId, evt, data) => this.#broadcast(cId, evt, data),
|
|
160
160
|
authorityConfig,
|
|
161
161
|
});
|
|
162
162
|
}
|
|
@@ -681,14 +681,6 @@ export class PlanOrchestrator {
|
|
|
681
681
|
this.#broadcast(conversationId, 'tool_stub_call', { persona: personaId, ...event });
|
|
682
682
|
};
|
|
683
683
|
|
|
684
|
-
// Run autoRope delegation (e.g. PM→Scout evidence gathering) before the main turn.
|
|
685
|
-
const promptContent = await this.#ropeEngine.autoDelegateIfNeeded({
|
|
686
|
-
conversationId,
|
|
687
|
-
callerPersonaId: personaId,
|
|
688
|
-
content,
|
|
689
|
-
fetchToken: () => this.#fetchToken(),
|
|
690
|
-
});
|
|
691
|
-
|
|
692
684
|
const { session, authStorage } = await this.#registry.getAgent(conversationId, personaId, { onStubCall });
|
|
693
685
|
|
|
694
686
|
// Wire events on first use (idempotent because pi de-duplicates subscribers).
|
|
@@ -698,9 +690,19 @@ export class PlanOrchestrator {
|
|
|
698
690
|
const token = await this.#fetchToken();
|
|
699
691
|
authStorage.setRuntimeApiKey('anthropic', token);
|
|
700
692
|
|
|
693
|
+
// Pre-turn autoRope enrichment (Phase D): run any persona's autoRope rules
|
|
694
|
+
// before the caller's session sees the content. Keeps pm_gathering_context
|
|
695
|
+
// backward-compat; rope_start/rope_complete are emitted by RopeEngine.
|
|
696
|
+
const enrichedContent = await this.#ropeEngine.autoDelegateIfNeeded({
|
|
697
|
+
conversationId,
|
|
698
|
+
callerPersonaId: personaId,
|
|
699
|
+
content,
|
|
700
|
+
fetchToken: () => this.#fetchToken(),
|
|
701
|
+
});
|
|
702
|
+
|
|
701
703
|
const turnId = randomUUID();
|
|
702
704
|
|
|
703
|
-
session.prompt(
|
|
705
|
+
session.prompt(enrichedContent).catch((err) => {
|
|
704
706
|
console.error(`[plan] prompt error ${conversationId}/${personaId}:`, err.message);
|
|
705
707
|
this.#broadcast(conversationId, 'error', {
|
|
706
708
|
message: err.message,
|