@pleri/olam-cli 0.1.74 → 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.
@@ -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: (conversationId, eventName, data) => this.#broadcast(conversationId, eventName, data),
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(promptContent).catch((err) => {
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pleri/olam-cli",
3
- "version": "0.1.74",
3
+ "version": "0.1.76",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "olam": "./bin/olam.cjs"