@pillar-ai/sdk 0.1.8 → 0.1.13
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 +115 -59
- package/dist/actions/index.d.ts +1 -1
- package/dist/actions/registry.d.ts +15 -27
- package/dist/actions/types.d.ts +11 -5
- package/dist/api/client.d.ts +12 -1
- package/dist/api/mcp-client.d.ts +13 -1
- package/dist/cli/sync.d.ts +0 -1
- package/dist/cli/sync.js +37 -6
- package/dist/components/Panel/Panel.d.ts +1 -0
- package/dist/components/Panel/styles.d.ts +1 -1
- package/dist/components/Progress/ProgressRow.d.ts +12 -0
- package/dist/components/Progress/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/core/Pillar.d.ts +19 -15
- package/dist/core/config.d.ts +11 -3
- package/dist/index.d.ts +4 -4
- package/dist/pillar.esm.js +1 -1
- package/dist/store/chat.d.ts +22 -1
- package/package.json +1 -1
- package/src/actions/types.ts +11 -5
package/dist/store/chat.d.ts
CHANGED
|
@@ -25,15 +25,33 @@ export declare const messages: import("@preact/signals-core").Signal<StoredChatM
|
|
|
25
25
|
export declare const conversationId: import("@preact/signals-core").Signal<string | null>;
|
|
26
26
|
export declare const isLoading: import("@preact/signals-core").Signal<boolean>;
|
|
27
27
|
export interface ProgressStatus {
|
|
28
|
-
kind: 'search' | 'search_complete' | '
|
|
28
|
+
kind: 'processing' | 'search' | 'search_complete' | 'query' | 'query_complete' | 'query_failed' | 'generating' | null;
|
|
29
29
|
message?: string;
|
|
30
30
|
}
|
|
31
31
|
export declare const progressStatus: import("@preact/signals-core").Signal<ProgressStatus>;
|
|
32
|
+
export interface ProgressEvent {
|
|
33
|
+
kind: 'processing' | 'search' | 'search_complete' | 'query' | 'query_complete' | 'query_failed' | 'generating';
|
|
34
|
+
message?: string;
|
|
35
|
+
progress_id?: string;
|
|
36
|
+
metadata?: {
|
|
37
|
+
sources?: Array<{
|
|
38
|
+
title: string;
|
|
39
|
+
url: string;
|
|
40
|
+
score?: number;
|
|
41
|
+
}>;
|
|
42
|
+
result_count?: number;
|
|
43
|
+
query?: string;
|
|
44
|
+
action_name?: string;
|
|
45
|
+
no_sources_used?: boolean;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export declare const progressEvents: import("@preact/signals-core").Signal<ProgressEvent[]>;
|
|
32
49
|
export declare const isExpanded: import("@preact/signals-core").Signal<boolean>;
|
|
33
50
|
export declare const currentSources: import("@preact/signals-core").Signal<ArticleSummary[]>;
|
|
34
51
|
export declare const currentActions: import("@preact/signals-core").Signal<TaskButtonData[]>;
|
|
35
52
|
export declare const prefillText: import("@preact/signals-core").Signal<string>;
|
|
36
53
|
export declare const pendingMessage: import("@preact/signals-core").Signal<string | null>;
|
|
54
|
+
export declare const submitPendingTrigger: import("@preact/signals-core").Signal<number>;
|
|
37
55
|
export declare const focusInputTrigger: import("@preact/signals-core").Signal<number>;
|
|
38
56
|
export declare const userContext: import("@preact/signals-core").Signal<import("../types").HighlightedTextContext[]>;
|
|
39
57
|
export declare const pendingUserContext: import("@preact/signals-core").Signal<import("../types").HighlightedTextContext[]>;
|
|
@@ -70,12 +88,15 @@ export declare const clearActions: () => void;
|
|
|
70
88
|
export declare const setLoading: (loading: boolean) => void;
|
|
71
89
|
export declare const setProgressStatus: (status: ProgressStatus) => void;
|
|
72
90
|
export declare const clearProgressStatus: () => void;
|
|
91
|
+
export declare const addProgressEvent: (event: ProgressEvent) => void;
|
|
92
|
+
export declare const clearProgressEvents: () => void;
|
|
73
93
|
export declare const expandChat: () => void;
|
|
74
94
|
export declare const collapseChat: () => void;
|
|
75
95
|
export declare const setPrefillText: (text: string) => void;
|
|
76
96
|
export declare const clearPrefillText: () => void;
|
|
77
97
|
export declare const setPendingMessage: (message: string) => void;
|
|
78
98
|
export declare const clearPendingMessage: () => void;
|
|
99
|
+
export declare const triggerSubmitPending: () => void;
|
|
79
100
|
export declare const triggerInputFocus: () => void;
|
|
80
101
|
export declare const addUserContext: (item: Omit<UserContextItem, "id">) => void;
|
|
81
102
|
export declare const removeUserContext: (id: string) => void;
|
package/package.json
CHANGED
package/src/actions/types.ts
CHANGED
|
@@ -6,16 +6,22 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```ts
|
|
9
|
-
*
|
|
9
|
+
* // lib/pillar/actions/index.ts
|
|
10
|
+
* import type { SyncActionDefinitions } from '@pillar-ai/sdk';
|
|
10
11
|
*
|
|
11
|
-
* const actions =
|
|
12
|
+
* export const actions = {
|
|
12
13
|
* open_settings: {
|
|
13
14
|
* description: 'Navigate to the settings page',
|
|
14
|
-
* type: 'navigate',
|
|
15
|
+
* type: 'navigate' as const,
|
|
15
16
|
* path: '/settings',
|
|
16
|
-
*
|
|
17
|
+
* autoRun: true,
|
|
17
18
|
* },
|
|
18
|
-
* }
|
|
19
|
+
* } as const satisfies SyncActionDefinitions;
|
|
20
|
+
*
|
|
21
|
+
* export default actions;
|
|
22
|
+
*
|
|
23
|
+
* // Sync via CI/CD: npx pillar-sync --actions ./lib/pillar/actions/index.ts
|
|
24
|
+
* // Register handlers at runtime: pillar.onTask('open_settings', () => router.push('/settings'));
|
|
19
25
|
* ```
|
|
20
26
|
*/
|
|
21
27
|
|