@pillar-ai/sdk 0.1.16 → 0.1.18

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.
@@ -2,7 +2,6 @@
2
2
  * Main Pillar SDK Class
3
3
  * Entry point for all SDK functionality
4
4
  */
5
- import { APIClient } from "../api/client";
6
5
  import { type PillarConfig, type ResolvedConfig, type ThemeConfig } from "./config";
7
6
  import { type Context, type Suggestion, type UserProfile } from "./context";
8
7
  import { type CardRenderer, type PillarEvents, type TaskExecutePayload } from "./events";
@@ -734,9 +733,5 @@ export declare class Pillar {
734
733
  */
735
734
  private _destroy;
736
735
  }
737
- /**
738
- * Get the API client from the current Pillar instance.
739
- * Returns null if SDK is not initialized.
740
- */
741
- export declare function getApiClient(): APIClient | null;
736
+ export { getApiClient } from "./instance";
742
737
  export default Pillar;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Pillar Singleton Instance Registry
3
+ *
4
+ * Lightweight module that holds the Pillar singleton reference.
5
+ * Components import from here instead of Pillar.ts to avoid circular dependencies.
6
+ *
7
+ * The cycle exists because Pillar.ts imports components (Panel, DebugPanel)
8
+ * to render them, and those components need Pillar.getInstance() for config,
9
+ * events, and task execution. This module breaks that cycle.
10
+ */
11
+ import type { APIClient } from "../api/client";
12
+ /** Store the Pillar singleton (called from Pillar.ts) */
13
+ export declare function setPillarInstance(instance: any): void;
14
+ /** Get the current Pillar instance (replaces Pillar.getInstance() in components) */
15
+ export declare function getPillarInstance(): any;
16
+ /**
17
+ * Get the API client from the current Pillar instance.
18
+ * Returns null if SDK is not initialized.
19
+ */
20
+ export declare function getApiClient(): APIClient | null;